From c6d1b0a1ccf45b7819b1e6f1efe8687b240f495a Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 4 Sep 2024 16:00:44 +0200 Subject: fix(byonm): resolve npm deps of jsr deps (#25399) This allows using npm deps of jsr deps without having to add them to the root package.json. Works by taking the package requirement and scanning the `node_modules/.deno` directory for the best matching package, so it relies on deno's node_modules structure. Additionally to make the transition from package.json to deno.json easier, Deno now: 1. Installs npm deps in a deno.json at the same time as installing npm deps from a package.json. 2. Uses the alias in the import map for `node_modules/` for better package.json compatiblity. --- tests/specs/install/alias_invalid_path_char/verify.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/specs/install/alias_invalid_path_char/verify.ts (limited to 'tests/specs/install/alias_invalid_path_char/verify.ts') diff --git a/tests/specs/install/alias_invalid_path_char/verify.ts b/tests/specs/install/alias_invalid_path_char/verify.ts new file mode 100644 index 000000000..497e1d8dd --- /dev/null +++ b/tests/specs/install/alias_invalid_path_char/verify.ts @@ -0,0 +1,10 @@ +const entries = Array.from( + Deno.readDirSync(new URL("./node_modules", import.meta.url)), +); +const names = entries.map((entry) => entry.name); +names.sort(); + +// won't have the invalid path alias +for (const name of names) { + console.log(name); +} -- cgit v1.2.3