diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-09-04 16:00:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-04 14:00:44 +0000 |
commit | c6d1b0a1ccf45b7819b1e6f1efe8687b240f495a (patch) | |
tree | 6be2c0c611e4aee950402a34aaedd1c9b6bcaac3 /tests/integration/lsp_tests.rs | |
parent | 13911eb8efb77bd14a80412072aecb664aa55fd5 (diff) |
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/<alias>` for
better package.json compatiblity.
Diffstat (limited to 'tests/integration/lsp_tests.rs')
-rw-r--r-- | tests/integration/lsp_tests.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/integration/lsp_tests.rs b/tests/integration/lsp_tests.rs index 4693b7222..4f0f8a985 100644 --- a/tests/integration/lsp_tests.rs +++ b/tests/integration/lsp_tests.rs @@ -14797,7 +14797,7 @@ fn lsp_byonm() { "severity": 1, "code": "resolver-error", "source": "deno", - "message": "Could not find a matching package for 'npm:chalk' in a package.json file. You must specify this as a package.json dependency when the node_modules folder is not managed by Deno.", + "message": "Could not find a matching package for 'npm:chalk' in the node_modules directory. Ensure you have all your JSR and npm dependencies listed in your deno.json or package.json, then run `deno install`. Alternatively, turn on auto-install by specifying `\"nodeModulesDir\": \"auto\"` in your deno.json file.", }, { "range": { @@ -14842,7 +14842,7 @@ fn lsp_byonm() { "severity": 1, "code": "resolver-error", "source": "deno", - "message": "Could not find a matching package for 'npm:chalk' in a package.json file. You must specify this as a package.json dependency when the node_modules folder is not managed by Deno.", + "message": "Could not find a matching package for 'npm:chalk' in the node_modules directory. Ensure you have all your JSR and npm dependencies listed in your deno.json or package.json, then run `deno install`. Alternatively, turn on auto-install by specifying `\"nodeModulesDir\": \"auto\"` in your deno.json file.", }, ]) ); |