0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -05:00

fix(ext/node): fix unable to resolve fraction.js (#18544)

Turns out `autoprefixer` is a better reproduction case then
`microbundle`.

Fixes #18535 
Fixes #18600

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
Marvin Hagemeister 2023-04-06 16:12:50 +02:00 committed by GitHub
parent 4cc8784f5b
commit e51985ca74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 29 additions and 1 deletions

View file

@ -735,6 +735,15 @@ itest!(node_modules_dir_require_added_node_modules_folder {
temp_cwd: true,
});
itest!(node_modules_dir_require_main_entry {
args: "run --node-modules-dir -A --quiet $TESTDATA/npm/require_main/main.js",
output: "npm/require_main/main.out",
envs: env_vars_for_npm_tests(),
http_server: true,
exit_code: 0,
temp_cwd: true,
});
itest!(node_modules_dir_with_deps {
args: "run --allow-read --allow-env --node-modules-dir $TESTDATA/npm/cjs_with_deps/main.js",
output: "npm/cjs_with_deps/main_node_modules.out",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
{"name":"normalize-range","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"normalize-range","version":"0.1.0","devDependencies":{"codeclimate-test-reporter":"^0.1.0","coveralls":"^2.11.2","istanbul":"^0.3.17","jscs":"^2.1.1","jshint":"^2.8.0","jshint-stylish":"^2.0.1","mocha":"^2.2.5"},"dist":{"shasum":"7dc10354319857a4bc115926c2c0b46584963102","tarball":"http://localhost:4545/npm/registry/normalize-range/normalize-range-0.1.0.tgz","integrity":"sha512-4fsB/sNmYhDAIP6QbzL9PmwCvnLfWL0Ln69oYIN2oZENUe4rLxjlXjEJuT9idgayeSJA9sMhp5mWsCTVIIpONg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB2CC+fsxUBSR/x5AQclibqWsHjYaroDVX0t6mecusFSAiEAuOk6cKVrq/xKaJuUVp/RbahS2+ly1bHziRjjNc0uCTM="}]},"engines":{"node":">=0.10.0"}},"0.1.1":{"name":"normalize-range","version":"0.1.1","devDependencies":{"codeclimate-test-reporter":"^0.1.0","coveralls":"^2.11.2","istanbul":"^0.3.17","jscs":"^2.1.1","jshint":"^2.8.0","jshint-stylish":"^2.0.1","mocha":"^2.2.5"},"dist":{"shasum":"a40ffccb98fe9d3a2ebb52014b0ef42973fe0209","tarball":"http://localhost:4545/npm/registry/normalize-range/normalize-range-0.1.1.tgz","integrity":"sha512-E40wR+fwvuCNoAPhlT89paNVG4Dx+QFWq0P5RPjHtRU0UDWW1Zc4tYGnFqOYCrprKvoUSz0zIW0sYz6bh5gY5A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/UFjvwwZGgQcE0y9dcb3t2X+D4WzSxZTxSPaqZdOIQwIgXVUyEpzKlSUVKYlirK2CltJztrd8qLEqwGvmKYTaNu0="}]},"engines":{"node":">=0.10.0"}},"0.1.2":{"name":"normalize-range","version":"0.1.2","devDependencies":{"almost-equal":"^1.0.0","codeclimate-test-reporter":"^0.1.0","coveralls":"^2.11.2","istanbul":"^0.3.17","jscs":"^2.1.1","jshint":"^2.8.0","jshint-stylish":"^2.0.1","mocha":"^2.2.5","stringify-pi":"0.0.3"},"dist":{"shasum":"2d10c06bdfd312ea9777695a4d28439456b75942","tarball":"http://localhost:4545/npm/registry/normalize-range/normalize-range-0.1.2.tgz","integrity":"sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE/pPGFro0Dc2jy+Xczxvr24YzO9s1xQynEBZoe2bi1MAiEAu5ZcDlfU7EqSGImCiQY9jpsumxIQCyAlpFAuAnfjDw8="}]},"engines":{"node":">=0.10.0"}}},"modified":"2022-06-22T05:32:01.991Z"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,2 @@
import fraction from "npm:autoprefixer";
console.log(typeof fraction);

View file

@ -0,0 +1 @@
function

View file

@ -470,7 +470,13 @@ where
{
modules_path
} else {
path_resolve(vec![modules_path, name])
let orignal = modules_path.clone();
let mod_dir = path_resolve(vec![modules_path, name]);
if Env::Fs::is_dir(&mod_dir) {
mod_dir
} else {
orignal
}
};
let pkg = PackageJson::load::<Env::Fs>(
&*resolver,