Leo Kettmeir
4fe353c961
refactor: update deno_core and use more concrete errors ( #27620 )
...
waiting for https://github.com/denoland/deno_core/pull/1043
Fixes #27672
(cherry picked from commit 054075730c
)
2025-01-22 00:24:19 +01:00
denobot
4ee86d8d12
2.1.6 ( #27704 )
...
Bumped versions for 2.1.6
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-01-17 00:35:01 +01:00
David Sherret
1bd66b09cc
refactor: move CliNpmResolver
to deno_resolver::npm::NpmResolver
( #27659 )
...
As title. After this PR all npm resolution will be out of the CLI crate.
2025-01-16 23:32:11 +01:00
David Sherret
8b5b6cd561
refactor: create NpmInstaller
( #27626 )
...
This separates npm resolution code from npm installation (more work
towards moving resolution code out of the CLI and cleaning up this
code).
2025-01-16 23:32:10 +01:00
Benjamin Swerdlow
428456681f
refactor(node_resolver): make conditions_from_resolution_mode configurable ( #27596 )
2025-01-16 23:32:09 +01:00
David Sherret
62cf8fca69
refactor: remove CliNpmReqResolver
trait in deno_resolver ( #27616 )
2025-01-16 23:32:09 +01:00
David Sherret
42bf54914d
refactor: implement NpmPackageFolderResolver
in deno_resolver ( #27614 )
2025-01-16 23:32:08 +01:00
David Sherret
a9da90a44d
refactor(npm): move SloppyImportsCachedFs
to deno_resolver ( #27610 )
2025-01-16 23:32:08 +01:00
David Sherret
d15a95e28b
chore: fix publish ( #27612 )
2025-01-09 15:55:14 -05:00
denobot
e842e5a59f
2.1.5 ( #27611 )
...
Co-authored-by: dsherret <dsherret@users.noreply.github.com>
2025-01-09 15:27:39 -05:00
David Sherret
0e42884a4c
refactor(npm): move InNpmPackageChecker
code to deno_resolver ( #27609 )
...
As title. Will allow consumers to create this struct and use our
behaviour.
Closes #27409
2025-01-09 15:19:21 -05:00
David Sherret
f3e851927c
refactor(npm): extract out some npm fs resolution code from the cli ( #27607 )
...
Moves the npm fs resolvers into the deno_resolution crate.
This does not entirely move things out, but is a step in that direction.
2025-01-09 15:19:21 -05:00
Leo Kettmeir
5064e9051b
refactor: update deno_core for error refactor ( #26867 )
...
Closes #26171
---------
Co-authored-by: David Sherret <dsherret@gmail.com>
2025-01-09 15:19:21 -05:00
Kenta Moriuchi
a39c83170f
chore: Happy New Year 2025 ( #27509 )
2025-01-09 15:19:16 -05:00
David Sherret
0bbb302318
chore: cargo fmt - turn on group_imports=StdExternalCrate ( #26646 )
2025-01-09 15:19:15 -05:00
David Sherret
68287ab9b1
refactor: use sys_traits ( #27480 )
2025-01-09 15:19:14 -05:00
David Sherret
78827c77f9
fix(node): handle cjs exports with escaped chars ( #27438 )
...
Closes https://github.com/denoland/deno/issues/27422
2025-01-09 15:19:12 -05:00
David Sherret
131a4ea816
perf: remove now needless canonicalization getting closest package.json ( #27437 )
...
This is no longer required because we now store everything in the file
system for deno compile instead of in an eszip.
2025-01-09 15:19:12 -05:00
David Sherret
e417475a0c
perf: upgrade to deno_semver 0.7 ( #27426 )
2025-01-09 15:19:12 -05:00
Bartek Iwańczuk
9529d2a77f
fix: deno_resolver crate without 'sync' feature ( #27403 )
2025-01-09 15:19:10 -05:00
denobot
11df8e3257
chore: release "deno_*" crates ( #27402 )
...
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-01-09 15:19:10 -05:00
David Sherret
48b760c38b
refactor: extract out FileFetcher
to deno_cache_dir
( #27263 )
2025-01-09 15:19:09 -05:00
Bartek Iwańczuk
fbf569fdfa
refactor: add 'sync' feature to deno_resolver crate ( #27357 )
2025-01-09 15:19:08 -05:00
David Sherret
40866e3aa4
fix(npm): search node_modules folder for package matching npm specifier ( #27345 )
2025-01-09 15:19:07 -05:00
denobot
b32ed7516c
2.1.4 ( #27327 )
...
Bumped versions for 2.1.4
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-12-11 04:31:27 +01:00
David Sherret
c402448061
chore: reduce allocations in a few places ( #27288 )
...
Probably doesn't have much impact. I didn't measure any of these, but
reducing allocations should always be good.
2024-12-11 03:37:33 +01:00
denobot
7f9b1ff30f
2.1.3 ( #27244 )
...
Bumped versions for 2.1.3
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-12-06 00:36:23 +01:00
David Sherret
a34839e9d0
fix: improve auto-imports for npm packages ( #27224 )
...
Improves auto-imports when using `"nodeModulesDir": "auto"`
2024-12-05 23:03:54 +01:00
David Sherret
66f5d4b7e6
refactor: remove CliNpmRegistryApi
( #27222 )
...
Extracts more code out of the CLI.
2024-12-05 23:03:53 +01:00
David Sherret
774232764b
refactor: add deno_npm_cache crate ( #27200 )
...
Extracting out more code from the CLI for reuse elsewhere (still more
work to do, but this is a start).
This is the code for extracting npm tarballs and saving information in
the npm cache in the global deno_dir.
2024-12-05 23:03:52 +01:00
Bartek Iwańczuk
6cac2ab63f
fix: support workspace:^
and workspace:~
version constraints ( #27096 )
...
This commit adds support for understanding "workpace:^"
and "workspace:~" version constraints in npm/pnpm workspaces.
This is done by upgrading various crates to their latest versions.
Closes https://github.com/denoland/deno/issues/26726
---------
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-12-05 23:03:51 +01:00
denobot
2039abe8d2
2.1.2 ( #27135 )
...
Bumped versions for 2.1.2
---------
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-11-28 16:45:48 +01:00
David Sherret
fdba58ce59
perf(compile): read embedded files as static references when UTF-8 and reading as strings ( #27033 )
2024-11-28 15:47:29 +01:00
David Sherret
bb3e918f4a
feat(unstable): repurpose --unstable-detect-cjs
to attempt loading more modules as cjs ( #27094 )
...
This resurrects the `--unstable-detect-cjs` flag (which became stable),
and repurposes it to attempt loading .js/.jsx/.ts/.tsx files as CJS in
the following additional scenarios:
1. There is no package.json
1. There is a package.json without a "type" field
Also cleans up the implementation of this in the LSP a lot by hanging
`resolution_mode()` off `Document` (didn't think about doing that until
now).
2024-11-28 15:47:28 +01:00
David Sherret
8cd9fa6aae
fix(node): correct resolution of dynamic import of esm from cjs ( #27071 )
...
Ensures a dynamic import in a CJS file will consider the referrer as an import for node resolution.
Also adds fixes (adds) support for `"resolution-mode"` in TypeScript.
2024-11-28 15:47:26 +01:00
denobot
5d71b46153
2.1.1 ( #26978 )
...
Co-authored-by: dsherret <dsherret@users.noreply.github.com>
2024-11-21 12:28:20 -05:00
David Sherret
d1b086b05a
chore: fix cargo publish ( #26958 )
2024-11-21 12:13:16 -05:00
denobot
3da4eca7c1
2.1.0 ( #26957 )
...
Bumped versions for 2.1.0
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-11-21 03:05:02 +01:00
David Sherret
186b52731c
fix(node): handle resolving ".//<something>" in npm packages ( #26920 )
...
The issue was this package had an import like: `".//index.js"` and we
resolved that as specified, but node normalizes it to `"./index.js"` so
we have to copy node.
2024-11-19 09:57:12 -05:00
David Sherret
48b94c0995
refactor: use boxed_error in some places ( #26887 )
2024-11-15 23:22:50 -05:00
David Sherret
617350e79c
refactor(resolver): move more resolution code into deno_resolver ( #26873 )
...
Follow-up to cjs refactor.
This moves most of the resolution code into the deno_resolver crate.
Still pending is the npm resolution code.
2024-11-14 15:24:25 -05:00
David Sherret
f091d1ad69
feat(node): stabilize detecting if CJS via "type": "commonjs"
in a package.json ( #26439 )
...
This will respect `"type": "commonjs"` in a package.json to determine if
`.js`/`.jsx`/`.ts`/.tsx` files are CJS or ESM. If the file is found to
be ESM it will be loaded as ESM though.
2024-11-13 15:10:09 +00:00
denobot
e1b40a69c0
chore: forward v2.0.6 release commit to main ( #26804 )
...
This is the release commit being forwarded back to main for 2.0.6
Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-11-10 13:12:18 +05:30
denobot
ef7432c03f
chore: forward v2.0.5 release commit to main ( #26755 )
...
This is the release commit being forwarded back to main for 2.0.5
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-11-06 02:27:14 +01:00
David Sherret
826e42a5b5
fix: improved support for cjs and cts modules ( #26558 )
...
* cts support
* better cjs/cts type checking
* deno compile cjs/cts support
* More efficient detect cjs (going towards stabilization)
* Determination of whether .js, .ts, .jsx, or .tsx is cjs or esm is only
done after loading
* Support `import x = require(...);`
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-11-01 12:27:00 -04:00
denobot
a1473d82c5
chore: forward v2.0.4 release commit to main ( #26636 )
...
This is the release commit being forwarded back to main for 2.0.4
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-10-30 13:46:31 +01:00
Bartek Iwańczuk
730331622e
chore: forward v2.0.3 commit to main ( #26535 )
...
Forwarding v2.0.3 commit to `main`
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-10-25 09:57:40 -04:00
denobot
3ae10a01e0
chore: forward v2.0.2 release commit to main ( #26376 )
...
This is the release commit being forwarded back to main for 2.0.2
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-18 03:12:49 +02:00
denobot
3385d1252e
chore: forward v2.0.1 release commit to main ( #26338 )
...
This is the release commit being forwarded back to main for 2.0.1
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-16 23:48:42 +00:00
denobot
a62c7e036a
2.0.0 ( #26063 )
...
Bumped versions for 2.0.0
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-08 07:37:28 -07:00