From 7ad64283a16cb0bfc9671ed482890d005eed9dcc Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 24 Feb 2023 13:51:21 -0500 Subject: fix(npm): package.json auto-discovery should respect `--no-config` and `--no-npm` (#17924) Part of #17916 --- .../testdata/run/with_package_json/no_deno_json/noconfig.out | 3 +++ cli/tests/testdata/run/with_package_json/no_deno_json/noconfig.ts | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 cli/tests/testdata/run/with_package_json/no_deno_json/noconfig.out create mode 100644 cli/tests/testdata/run/with_package_json/no_deno_json/noconfig.ts (limited to 'cli/tests/testdata') diff --git a/cli/tests/testdata/run/with_package_json/no_deno_json/noconfig.out b/cli/tests/testdata/run/with_package_json/no_deno_json/noconfig.out new file mode 100644 index 000000000..ee6e346de --- /dev/null +++ b/cli/tests/testdata/run/with_package_json/no_deno_json/noconfig.out @@ -0,0 +1,3 @@ +[WILDCARD]package.json auto-discovery is disabled +[WILDCARD] +success diff --git a/cli/tests/testdata/run/with_package_json/no_deno_json/noconfig.ts b/cli/tests/testdata/run/with_package_json/no_deno_json/noconfig.ts new file mode 100644 index 000000000..73b348fbc --- /dev/null +++ b/cli/tests/testdata/run/with_package_json/no_deno_json/noconfig.ts @@ -0,0 +1,8 @@ +// ensure the cwd is this directory +const cwd = Deno.cwd(); +if (!cwd.endsWith("no_deno_json")) { + console.log(cwd); + throw "FAIL"; +} else { + console.log("success"); +} -- cgit v1.2.3