summaryrefslogtreecommitdiff
path: root/ext/node
AgeCommit message (Collapse)Author
2023-01-17chore: forward v1.29.4 release commit to main (#17453)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-14fix(npm): use original node regex in npm resolution (#17404)Kiryl Dziamura
Fixes regex for matching conditional exports in a package. Updated to the same regex Node.js uses.
2023-01-13chore: forward 1.29.3 release back to main (#17401)David Sherret
2023-01-13chore: add `copyright_checker` tool and add the missing copyright (#17285)Yiyu Lin
2023-01-10fix(npm): allow to read package.json if permissions are granted (#17209)Bartek Iwańczuk
This commit changes signature of "deno_core::ModuleLoader::resolve" to pass an enum indicating whether or not we're resolving a specifier for dynamic import. Additionally "CliModuleLoader" was changes to store both "parent permissions" (or "root permissions") as well as "dynamic permissions" that allow to check for permissions in top-level module load an dynamic imports. Then all code paths that have anything to do with Node/npm compat are now checking for permissions which are passed from module loader instance associated with given worker.
2023-01-08feat(core): allow specifying name and dependencies of an Extension (#17301)Leo Kettmeir
2023-01-06fix(npm): handle declaration file resolution where packages incorrectly ↵David Sherret
define "types" last in "exports" (#17290) Closes #17279
2023-01-05chore: forward v1.29.2 release commit to main (#17277)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-19fix(npm): conditional exports with --node-modules-dir (#17111)Bartek Iwańczuk
This commit fixes conditional exports in `require()` implementation if `--node-modules-dir` flag is used.
2022-12-17chore: update to Rust 1.66.0 (#17078)linbingquan
2022-12-16fix(npm): fix require resolution if using --node-modules-dir (#17087)Bartek Iwańczuk
In our `require()` implementation we use a special logic to resolve "base path" when looking for matching packages, however this logic is in contradiction to what needs to happen if there's a local "node_modules" directory used. This commit changes require implementation to be aware if we're running off of global node modules cache or a local one.
2022-12-15fix(npm): improve exports resolution when type checking (#17071)David Sherret
Closes #17012
2022-12-15chore: forward v1.29.1 release commit to main (#17067)denobot
Co-authored-by: dsherret <dsherret@users.noreply.github.com>
2022-12-15Revert "feat(ops): Fast zero copy string arguments (#16777)" (#17063)Bartek Iwańczuk
This reverts commit 9b2b8df927ac23cfa99016a684179f2a3198ba2e. Closes https://github.com/dsherret/ts-morph/issues/1372 Closes https://github.com/denoland/deno/issues/16979
2022-12-151.29.0 (#17052)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-12-07feat(fmt): improve width calculation (#16982)David Sherret
Formats code according to Unicode Standard Annex #11 rules (https://crates.io/crates/unicode-width). This aligns `deno fmt` more with prettier.
2022-12-05refactor: remove references to Deno.core in bootstrap code (#16937)Bartek Iwańczuk
Prerequisite for https://github.com/denoland/deno/pull/16881
2022-12-02feat(ops): Fast zero copy string arguments (#16777)Divy Srivastava
Uses SeqOneByteString optimization to do zero-copy `&str` arguments in fast calls. - [x] Depends on https://github.com/denoland/rusty_v8/pull/1129 - [x] Depends on https://chromium-review.googlesource.com/c/v8/v8/+/4036884 - [x] Disable in async ops - [x] Make it work with owned `String` with an extra alloc in fast path. - [x] Support `Cow<'_, str>`. Owned for slow case, Borrowed for fast case ```rust #[op] fn op_string_len(s: &str) -> u32 { str.len() as u32 } ```
2022-12-01chore: forward v1.28.3 release commit to main (#16884)denobot
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2022-11-30fix(npm): improve package.json exports support for types (#16880)David Sherret
2022-11-29fix(ext/node): allow absolute path in createRequire (#16853)Yoshiya Hinosawa
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-11-28fix(npm): don't resolve JS files when resolving types (#16854)David Sherret
Closes #16851
2022-11-28fix(npm): allow to inspect npm modules with --inspect-brk (#16841)Bartek Iwańczuk
2022-11-24chore: forward v1.28.2 release commit to main (#16796)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-11-24fix(npm/types): resolve main entrypoint declaration file when no types entry ↵David Sherret
(#16791) Closes #16782
2022-11-22chore: workspace inheritance (#16343)Leo Kettmeir
2022-11-19fix(npm): handle directory resolution when resolving declaration files (#16706)David Sherret
Also fixes resolving specifiers like `./something.generated` in declaration files. Closes #16695
2022-11-19fix(ext/node): handle URL in createRequire (#16682)Yoshiya Hinosawa
2022-11-17chore: forward v1.28.1 release commit to main (#16678)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
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)