summaryrefslogtreecommitdiff
path: root/ext/node
AgeCommit message (Collapse)Author
2022-11-16fix(npm): using types for packages with subpath (#16656)Bartek Iwańczuk
For CommonJS packages we were not trying different extensions for files specified as subpath of the package ([package_name]/[subpath]). This commit fixes that.
2022-11-131.28.0 (#16620)denobot
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-11-10feat: remove --unstable flag requirement for npm: specifiers (#16473)Bartek Iwańczuk
This commit makes "npm:" specifiers not require "--unstable" flag. At the moment some APIs used by Node polyfills still require "--unstable" which will be addressed in follow up PRs.
2022-11-09chore: forward v1.27.2 release commit to main (#16572)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2022-11-08refactor(ext/node): remove unwraps (#16559)Bartek Iwańczuk
2022-11-06fix(npm): fix CJS resolution with local node_modules dir (#16547)Bartek Iwańczuk
This commit fixes CJS resolution when there's a local "node_modules/" directory. Before this commit relative imports from CJS files where resolved relative to root directory of the package instead of relative to referrer file.
2022-11-04chore: forward v1.27.1 release commit to main (#16533)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-11-02fix(npm): add `console` global for node environment (#16519)David Sherret
This global is already isolated to node during type checking. Closes #16518
2022-10-271.27.0 (#16442)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-10-21feat(unstable/npm): initial type checking of npm specifiers (#16332)David Sherret
2022-10-21chore(core): remove `core.opSync` (#16379)Divy Srivastava
This patch removes the last uses of `core.opSync` from Deno. The new and JIT-friendly way to call sync ops is `core.ops.op_name()`.
2022-10-17chore: forward v1.26.2 to main (#16331)Bartek Iwańczuk
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> <!-- Before submitting a PR, please read http://deno.land/manual/contributing 1. Give the PR a descriptive title. Examples of good title: - fix(std/http): Fix race condition in server - docs(console): Update docstrings - feat(doc): Handle nested reexports Examples of bad title: - fix #7123 - update docs - fix bugs 2. Ensure there is a related issue and it is referenced in the PR text. 3. Ensure there are tests that cover the changes. 4. Ensure `cargo test` passes. 5. Ensure `./tools/format.js` passes without changing files. 6. Ensure `./tools/lint.js` passes. --> Co-authored-by: denobot <33910674+denobot@users.noreply.github.com> Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2022-10-16fix(npm): disable loading native module for "fsevents" package (#16273)Bartek Iwańczuk
Currently causes a hang in Vite, disable this one specific package as remaining tests for NAPI in various modules work fine.
2022-10-06chore: forward v1.26.1 release commit to main (#16178)denobot
This is the release commit being forwarded back to main for 1.26.1 Please ensure: - [x] Everything looks ok in the PR - [x] The release has been published To make edits to this PR: ```shell git fetch upstream forward_v1.26.1 && git checkout -b forward_v1.26.1 upstream/forward_v1.26.1 ``` Don't need this PR? Close it. cc @cjihrig Co-authored-by: cjihrig <cjihrig@users.noreply.github.com>
2022-10-05feat(npm): implement Node API (#13633)Divy Srivastava
This PR implements the NAPI for loading native modules into Deno. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: DjDeveloper <43033058+DjDeveloperr@users.noreply.github.com> Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2022-10-03fix(npm): better error is version is specified after subpath (#16131)Bartek Iwańczuk
2022-09-291.26.0denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-09-26fix(require): tryPackage uses optional chaining (#16020)Bartek Iwańczuk
2022-09-22chore: forward v1.25.4 release commit to main (#16001)David Sherret
2022-09-22feat(npm): add flag for creating and resolving npm packages to a local ↵David Sherret
node_modules folder (#15971)
2022-09-17fix(ext/node): fix builtin module module (#15904)Yoshiya Hinosawa
2022-09-17refactor(ext/node): use primordials (#15912)Marcos Casagrande
2022-09-15chore: forward v1.25.3 release commit to main (#15919)Colin Ihrig
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com> Co-authored-by: cjihrig <cjihrig@users.noreply.github.com>
2022-09-14fix(ops): add node.js env variable allowlist (#15893)Colin Ihrig
This commit allows the Node compatibility layer to skip environment variable permission checks when --unstable is passed and the variable name is one that Node uses. Fixes: https://github.com/denoland/deno/issues/15890
2022-09-13refactor(npm): create general use `NpmPackageResolver` (#15882)David Sherret
2022-09-12fix(npm): support cjs resolution of package subpath with package.json (#15855)David Sherret
2022-09-10fix(npm): remove export binding to match node (#15837)David Sherret
2022-09-09chore: forward v1.25.2 release commit to main (#15831)denobot
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2022-09-08fix(npm): recursive translation of reexports, remove window global in node ↵Bartek Iwańczuk
code (#15806) Co-authored-by: David Sherret <dsherret@gmail.com>
2022-09-06fix(npm): conditional exports in npm: specifiers (#15778)Bartek Iwańczuk
2022-09-05refactor: cleanup Node compatibility code (#15766)Bartek Iwańczuk
- move errors related to Node compat from cli/node/errors.rs to "ext/node" crate - remove dependency on "node_resolver" crate - make some of structures private to the "cli/node" module
2022-09-03BREAKING(unstable): remove --compat mode (#15678)Bartek Iwańczuk
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.
2022-09-02chore: forward v1.25.1 release commit to main (#15735)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2022-08-30fix(npm): prefer importing esm from esm (#15676)David Sherret
2022-08-29fix(ext/node): better error for importing ES module via require() call (#15671)Bartek Iwańczuk
2022-08-29fix(npm): conditional exports with wildcards (#15652)Bartek Iwańczuk
2022-08-26fix(ext/node): fix global in node env (#15622)Yoshiya Hinosawa
2022-08-25fix: avoid global declaration collisions in cjs (#15608)David Sherret
* Use a default stack size * 2 in debug for Windows because swc using so much stack size. We should look into this more later though.
2022-08-25fix(ext/node): add missing primordial (#15595)Bartek Iwańczuk
2022-08-25v1.25.0Bartek Iwańczuk
2022-08-24feat(unstable): add more permission checks for ext/node/ (#15581)Bartek Iwańczuk
2022-08-24fix(unstable): various resolution bugs for npm: specifiers (#15546)Bartek Iwańczuk
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-08-23feat: binary npm commands (#15542)David Sherret
2022-08-20feat(unstable): initial support for npm specifiers (#15484)David Sherret
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-08-11chore(ext/node): correct publishing for ext/node (#15461)David Sherret
2022-08-11chore: forward v1.24.3 release commit to main (#15462)denobot
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-08-11refactor(ext/node): remove several TODOs (#15452)Bartek Iwańczuk
2022-08-11perf(ops): Monomorphic sync op calls (#15337)Aapo Alasuutari
Welcome to better optimised op calls! Currently opSync is called with parameters of every type and count. This most definitely makes the call megamorphic. Additionally, it seems that spread params leads to V8 not being able to optimise the calls quite as well (apparently Fast Calls cannot be used with spread params). Monomorphising op calls should lead to some improved performance. Now that unwrapping of sync ops results is done on Rust side, this is pretty simple: ``` opSync("op_foo", param1, param2); // -> turns to ops.op_foo(param1, param2); ``` This means sync op calls are now just directly calling the native binding function. When V8 Fast API Calls are enabled, this will enable those to be called on the optimised path. Monomorphising async ops likely requires using callbacks and is left as an exercise to the reader.
2022-08-09chore: temporarily disable `ext/node` and use unstable ops (#15438)David Sherret
2022-08-09chore: temporarily disable `op_require_read_file` (#15433)David Sherret