Age | Commit message (Collapse) | Author |
|
language server (#17891)
|
|
(#17885)
|
|
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>
|
|
This changes npm specifiers to be handled by deno_graph and resolved to
an npm package name and version when the specifier is encountered. It
also slightly changes how npm specifier resolution occurs—previously it
would collect all the npm specifiers and resolve them all at once, but
now it resolves them on the fly as they are encountered in the module
graph.
https://github.com/denoland/deno_graph/pull/232
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
This commits adds auto-discovery of "package.json" file when running
"deno run" and "deno task" subcommands. In case of "deno run" the
"package.json" is being looked up starting from the directory of the
script that is being run, stopping early if "deno.json(c)" file is found
(ie. FS tree won't be traversed "up" from "deno.json").
When "package.json" is discovered the "--node-modules-dir" flag is
implied, leading to creation of local "node_modules/" directory - we
did that, because most tools relying on "package.json" will expect
"node_modules/" directory to be present (eg. Vite). Additionally
"dependencies" and "devDependencies" specified in the "package.json"
are downloaded on startup.
This is a stepping stone to supporting bare specifier imports, but
the actual integration will be done in a follow up commit.
---------
Co-authored-by: David Sherret <dsherret@gmail.com>
|
|
Makes the resolver required and prints a warning when vendoring and a
dynamic import can't be resolved.
Closes #16522
|
|
|
|
|
|
This isn't used.
|
|
Just some watcher init step that I thought would be "cloned over" but
needs to be done again on reset.
|
|
(#15466) (#17591)
This reverts commit 3545bff678f20c3fdf17fe6b26f96cf1b74f917c.
|
|
(#17566)
Closes #17563
|
|
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
built-in Node modules (#17519)
|
|
Co-authored-by: David Sherret <dsherret@gmail.com>
|
|
See https://github.com/denoland/deno_graph/pull/205 for more details.
|
|
This commit changes "ProcState" to store "file_fetcher" field in an "Arc",
allowing it to be preserved between restarts and thus keeping the state
alive between the restarts. File watchers for "deno test" and "deno bench"
now reset "ProcState" between restarts.
|
|
mutability (#17134)
Turns out we were cloning permissions which after prompting were discarded,
so the state of permissions was never preserved. To handle that we need to store
all permissions behind "Arc<Mutex<>>" (because there are situations where we
need to send them to other thread).
Testing and benching code still uses "Permissions" in most places - it's undesirable
to share the same permission set between various test/bench files - otherwise
granting or revoking permissions in one file would influence behavior of other test
files.
|
|
|
|
|
|
Yearly tradition of creating extra noise in git.
|
|
|
|
1. Extracts out some code from main.rs
2. Inlines all the `x_command` functions in main.rs
|
|
This is just a straight refactor and doesn't make any improvements to
the code that could now be made.
Closes #16493
|
|
|
|
|
|
|
|
|
|
|
|
This commit removes "compat" mode. We shipped support for "npm:" specifier
support in v1.25 and that is preferred way to interact with Node code that we
will iterate and improve upon.
|
|
memory (#15502)
|
|
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
Closes #15440
|
|
Ref: denoland/deno_graph#166
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This commit adds CJS/ESM interoperability when running in --compat mode.
Before executing files, they are analyzed and all CommonJS modules are
transformed on the fly to a ES modules. This is done by utilizing analyze_cjs()
functionality from deno_ast. After discovering exports and reexports, an ES
module is rendered and saved in memory for later use.
There's a caveat that all files ending with ".js" extension are considered as
CommonJS modules (unless there's a related "package.json" with "type": "module").
|
|
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
|
|
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
|
|
|
|
|