From ac04787c30b67ba9c7fb800eae8361ba419e7f4e Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 14 Dec 2023 16:09:05 +0100 Subject: fix(node): support resolving a package.json import to a builtin node module (#21576) Closes https://github.com/denoland/deno/issues/21501 --- .../npm/registry/@denotest/imports-package-json/1.0.0/main.js | 6 ++++++ .../npm/registry/@denotest/imports-package-json/1.0.0/package.json | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'cli/tests/testdata/npm/registry/@denotest') diff --git a/cli/tests/testdata/npm/registry/@denotest/imports-package-json/1.0.0/main.js b/cli/tests/testdata/npm/registry/@denotest/imports-package-json/1.0.0/main.js index 46625479e..9e7c247b7 100644 --- a/cli/tests/testdata/npm/registry/@denotest/imports-package-json/1.0.0/main.js +++ b/cli/tests/testdata/npm/registry/@denotest/imports-package-json/1.0.0/main.js @@ -1,7 +1,13 @@ import hi from "#hi"; import bye from "./sub_path/main.js"; +import fs from "#fs"; +import path from "#path"; +import fs2 from "#fs2"; export default { hi, bye, + fs, + path, + fs2, }; diff --git a/cli/tests/testdata/npm/registry/@denotest/imports-package-json/1.0.0/package.json b/cli/tests/testdata/npm/registry/@denotest/imports-package-json/1.0.0/package.json index a4fbc8889..2c294e680 100644 --- a/cli/tests/testdata/npm/registry/@denotest/imports-package-json/1.0.0/package.json +++ b/cli/tests/testdata/npm/registry/@denotest/imports-package-json/1.0.0/package.json @@ -11,6 +11,11 @@ "./sub-path-import-not-defined": "./sub_path/import_not_defined.js" }, "imports": { - "#hi": "./hi.js" + "#hi": "./hi.js", + "#fs": "fs", + "#path": "node:path", + "#fs2": { + "node": "fs" + } } } -- cgit v1.2.3