diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-02-22 23:21:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-22 23:21:05 +0100 |
| commit | 1c14127c4f54d815b3e1be48bddd5198dcb33a50 (patch) | |
| tree | 56dbbea5e9a39fc95d3c722811b47bce08e21b59 /cli/tests/testdata/run/with_package_json/with_stop/some | |
| parent | c18e0d1d37878bb4441f7f8d339cc23ac8e68448 (diff) | |
feat: support bare specifier resolution with package.json (#17864)
This commit enables resolution of "bare specifiers" (eg. "import express
from 'express';") if a "package.json" file is discovered.
It's a step towards being able to run projects authored for Node.js
without any changes.
With this commit we are able to successfully run Vite projects without
any changes to the user code.
---------
Co-authored-by: David Sherret <dsherret@gmail.com>
Diffstat (limited to 'cli/tests/testdata/run/with_package_json/with_stop/some')
| -rw-r--r-- | cli/tests/testdata/run/with_package_json/with_stop/some/nested/dir/main.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/tests/testdata/run/with_package_json/with_stop/some/nested/dir/main.ts b/cli/tests/testdata/run/with_package_json/with_stop/some/nested/dir/main.ts index daefa8f60..6016470a1 100644 --- a/cli/tests/testdata/run/with_package_json/with_stop/some/nested/dir/main.ts +++ b/cli/tests/testdata/run/with_package_json/with_stop/some/nested/dir/main.ts @@ -1,6 +1,6 @@ -// TODO(bartlomieju): currently we don't support actual bare specifier -// imports; this will be done in a follow up PR. -// import express from "express"; +// This import should fail, because `package.json` is not discovered, as we're +// stopping the discovery when encountering `deno.json`. +import chalk from "chalk"; -// console.log(express); console.log("ok"); +console.log(chalk); |
