Bartek Iwańczuk
e7d7da85df
fix(npm): fix CJS resolution with local node_modules dir ( #16547 )
...
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-06 00:58:21 +01:00
Bartek Iwańczuk
5dea510b02
fix(lock): autodiscovery of lockfile ( #16498 )
...
This commit adds autodiscovery of lockfile.
This only happens if Deno discovers the configuration file (either
"deno.json" or "deno.jsonc"). In such case Deno tries to load
"deno.lock"
file that sits next to the configuration file, or creates one for user
if
the lockfile doesn't exist yet.
As a consequence, "--lock" and "--lock-write" flags had been updated.
"--lock" no longer requires a value, if one is not provided, it defaults
to "./deno.lock" resolved from the current working directory.
"--lock-write"
description was updated to say that it forces to overwrite a lockfile.
Autodiscovery is currently not handled by the LSP.
2022-11-02 16:32:30 +01:00
David Sherret
5e4e324ceb
fix(lockfile): error if a referenced package id doesn't exist in list of packages ( #16509 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-11-02 01:07:45 +00:00
David Sherret
cb08b4683f
feat(unstable/npm): deno info --json
support for npm specifiers ( #16472 )
2022-10-31 10:25:46 -04:00
David Sherret
edaceecec7
feat: support npm specifiers in deno info
for display text output only ( #16470 )
2022-10-28 16:19:55 -04:00
David Sherret
a4d4acd1af
chore(npm): add explicit tests for module.exports
assignment with type checking ( #16435 )
2022-10-27 17:54:46 -04:00
David Sherret
678ac5757b
fix(compile): show an error when using npm specifiers ( #16430 )
...
Closes #16427
2022-10-26 13:55:26 +00:00
Bartek Iwańczuk
9835b095e5
fix(npm): add support for npm packages in lock files ( #15938 )
...
This commit adds support for npm packages in the lock file.
2022-10-25 18:20:07 +02:00
David Sherret
bcfe279fba
feat(unstable/npm): initial type checking of npm specifiers ( #16332 )
2022-10-21 15:20:18 +00:00
Bartek Iwańczuk
fde938116d
feat(unstable): add support for npm specifier cli arguments for 'deno cache' ( #16141 )
...
This commit adds support for npm specifier in "deno cache" subcommand.
```
$ deno cache --unstable npm:vite npm:chalk https://deno.land/std/http/file_server.ts
```
Besides downloading requested npm package(s), it will also download
necessary code from "std/node/".
2022-10-03 23:26:42 +02:00
Bartek Iwańczuk
5b097fd7e5
fix(npm): better error is version is specified after subpath ( #16131 )
2022-10-03 19:10:53 +02:00
Bartek Iwańczuk
8e1b2fca59
fix(npm): panic on invalid package name ( #16123 )
2022-10-03 17:45:01 +02:00
Bartek Iwańczuk
048c06f84f
fix(npm): handle json files in require ( #16125 )
2022-10-01 22:21:19 +02:00
David Sherret
d677ba67f5
feat(npm): functionality to support child_process.fork ( #15891 )
2022-09-28 13:04:16 -04:00
David Sherret
f6a9b49dfb
perf: don't re-download package tarball to global cache if local node_modules folder exists for package ( #16005 )
2022-09-23 17:35:48 -04:00
David Sherret
716005a0d4
feat(npm): add flag for creating and resolving npm packages to a local node_modules folder ( #15971 )
2022-09-22 11:17:02 -04:00
Bartek Iwańczuk
9a216806d5
feat(npm): add support for --reload=npm: and --reload=npm:<package> ( #15972 )
2022-09-22 10:39:58 -04:00
Bartek Iwańczuk
7b98282993
fix(npm): binary entrypoint for .js or no extension ( #15900 )
2022-09-14 10:41:47 -04:00
Bartek Iwańczuk
233d5422fd
fix(npm): use shim from deno_node crate for 'module' built-in module ( #15881 )
2022-09-12 18:11:32 -04:00
David Sherret
dee9f0acaf
fix(npm): align Node esm code importing cjs with Node ( #15838 )
2022-09-10 15:00:45 -04:00
David Sherret
3b0de03b59
fix(npm): remove export binding to match node ( #15837 )
2022-09-10 11:38:11 -04:00
Bartek Iwańczuk
6c179daff0
fix(npm): recursive translation of reexports, remove window global in node code ( #15806 )
...
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-09-08 22:01:48 +02:00
Bartek Iwańczuk
4a250b2f25
feat: add --no-npm flag to disable npm: imports ( #15673 )
...
This commit adds "--no-npm" flag, it's similar to "--no-remote"
flag. This flag makes Deno error out if "npm:" specifier is encountered.
2022-09-07 15:33:51 +02:00
Bartek Iwańczuk
fc4025c878
fix(npm): add more context to errors when file doesn't exist ( #15749 )
2022-09-03 15:43:35 +02:00
Bartek Iwańczuk
adec4f575e
fix(npm): translate CJS to ESM with name clashes for files and dirs ( #15697 )
2022-08-31 00:31:59 +02:00
David Sherret
5f251b283b
fix(npm): prefer importing esm from esm ( #15676 )
2022-08-30 14:09:22 -04:00
Bartek Iwańczuk
54be07d05e
fix(npm): skip extracting pax_global_header from tarballs ( #15677 )
2022-08-30 17:15:41 +02:00
Bartek Iwańczuk
2851a98072
fix(npm): conditional exports with wildcards ( #15652 )
2022-08-29 19:15:20 +02:00
Bartek Iwańczuk
ad98c9fdd1
chore: update test_util/std/ submodule ( #15657 )
2022-08-29 11:35:27 +02:00
David Sherret
ec98d86d21
fix(npm): handle cjs re-exports with the same name as an export ( #15626 )
2022-08-26 14:34:35 -04:00
Yoshiya Hinosawa
9b324b1cf4
fix(ext/node): fix global in node env ( #15622 )
2022-08-26 23:39:05 +09:00
David Sherret
f583a7ebf4
chore(npm): add test for esm npm binary package ( #15609 )
2022-08-26 09:17:48 -04:00
David Sherret
376665d115
fix: avoid global declaration collisions in cjs ( #15608 )
...
* 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-25 20:24:18 -04:00
David Sherret
348291f5ec
fix(npm): always require --unstable flag even for esm ( #15583 )
2022-08-24 13:44:38 -04:00
David Sherret
684aabbc25
feat: support subpaths in npm package references ( #15578 )
2022-08-24 11:25:32 -04:00
David Sherret
452df99222
feat(npm): support packages with multiple command names ( #15565 )
2022-08-23 22:01:21 -04:00
David Sherret
e7367044d9
feat: binary npm commands ( #15542 )
2022-08-23 10:39:19 -04:00
Bartek Iwańczuk
c66386dbd2
feat(unstable): Respect --cached-only flags for npm: specifiers ( #15512 )
...
This commit changes "npm:" specifier handling to respect "--cached-only" flags and adds "Download" messages for npm registry api calls.
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-08-22 17:35:04 +02:00
David Sherret
87f80ff6be
feat(unstable): initial support for npm specifiers ( #15484 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-08-20 11:31:33 -04:00