0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
Commit graph

8401 commits

Author SHA1 Message Date
David Sherret
e0dd275935
refactor: move generated_symbol_exports_list_* files to napi folder (#16822) 2022-11-25 18:49:02 -05:00
David Sherret
6de3d7f184
refactor: move cdp.rs to tools/repl (#16821) 2022-11-25 18:38:08 -05:00
David Sherret
dcb4ffb93a
refactor: move dts files, diagnostics.rs, and tsc.rs to tsc folder (#16820) 2022-11-25 18:29:48 -05:00
David Sherret
0cc90d9246
refactor: move lockfile.rs to args module (#16818)
This should be in the `args` folder as it's similar to `config_file`.
2022-11-25 17:00:28 -05:00
David Sherret
d0a4e23ae8
fix(npm): better error message when attempting to use typescript in npm packages (#16813) 2022-11-25 13:42:05 -05:00
Divy Srivastava
8fc62f93bf
fix(ops): circular dependency in deno_ops test (#16809) 2022-11-25 20:17:21 +05:30
David Sherret
d80af8324d
refactor(lsp): consolidate relative_specifier (#16780)
Closes #14840
2022-11-25 09:16:56 -05:00
Luca Casonato
3f79c9b6e5
fix(cli/js): improve resource sanitizer messages (#16798)
This commit improves the guidance for how to close a child process
stdout / stderr to also include guidance for when using
`new Deno.Command()`.
2022-11-25 14:22:23 +01:00
Bartek Iwańczuk
433f38084b
fix(repl): more reliable history handling (#16797)
This commit changes history handling of the REPL.

There were some situations were history wasn't properly saved and flushed to a
file, making history very spotty. This commit changes it to save every line into
the history file and flush it to disk before being evaluated.

Thanks to this all lines, including "close()" will be stored in the history
file.

If for any reason we're not able to save history file, a single warning will be
printed to the REPL and it will continue to work, even if subsequent tries will
fail to save to disk.
2022-11-25 02:56:47 +01:00
David Sherret
e6a9588b43
fix(task): output encoding issues on windows (#16794)
Closes #16792
2022-11-24 19:37:02 -05:00
denobot
72dd7ad807
chore: forward v1.28.2 release commit to main (#16796)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-11-24 23:59:42 +01:00
David Sherret
823a5f6015
fix(npm/types): resolve main entrypoint declaration file when no types entry (#16791)
Closes #16782
2022-11-24 19:13:51 +01:00
Yusuke Tanaka
fd023cf793
fix(ext/flash): graceful server startup/shutdown with unsettled promises in mind (#16616)
This PR resets the revert commit made by #16610, bringing back #16383
which attempts to fix the issue happening when we use the flash server
with `--watch` option enabled.
Also, some code changes are made to pass the regression test added in
#16610.
2022-11-24 18:38:09 +01:00
David Sherret
b6f49cf479
fix(npm/check): prioritize exports over types entry (#16788) 2022-11-24 17:07:36 +00:00
Ikko Ashimine
04afc06b00
refactor(core): fix typo in ops_builtin.rs (#16613) 2022-11-24 15:22:39 +01:00
Asher Gomez
fe7e3a12ca
feat(cli): add warning for incorrectly ordered flags (#16734)
This code checks if permission flags are incorrectly defined after the
module name (e.g. `deno run mod.ts --allow-read` instead of the correct
`deno run --allow-read mod.ts`). If so, a simple warning is displayed.
2022-11-24 03:00:31 +00:00
David Sherret
beaa0d8867
chore: more debug logging and avoid allocating strings in ts logging when not debug (#16689) 2022-11-23 13:34:44 -05:00
David Sherret
cbf4fa143f
chore: remove unnecessary qualifier in declaration file (#16767) 2022-11-23 12:50:15 -05:00
David Sherret
f2330fcd9b
fix(fmt/markdown): scenario where whitespace was being incorrectly stripped in inline links (#16769)
https://github.com/dprint/dprint-plugin-markdown/pull/69

Closes #16730
2022-11-23 12:44:57 -05:00
Leo Kettmeir
13e3acf71d
chore: workspace inheritance (#16343) 2022-11-22 21:07:35 +01:00
Bartek Iwańczuk
14904f6a2c
ci: increase timeout to 120 minutes (#16764) 2022-11-22 21:03:36 +01:00
Bartek Iwańczuk
b70f520ebc
fix: Make npm packages works with import maps (#16754)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-11-22 20:09:30 +01:00
Bartek Iwańczuk
f077c4f248
chore: update import_map and deno_doc (#16755) 2022-11-22 16:19:41 +01:00
Divy Srivastava
ef82211377
Reland "perf(ext/flash): optimize response streaming" (#16660) 2022-11-22 16:23:58 +05:30
Bartek Iwańczuk
1ec357faf3
fix(inspector): ensure console methods provided by inspector are available (#16724) 2022-11-22 02:17:14 +01:00
Bartek Iwańczuk
5c7dc904fb
test: disable commandChildUnref flaky test (#16752) 2022-11-22 02:16:24 +01:00
David Sherret
4b07c7b159
fix(install): deno install -f should overwrite lockfile from previous installation (#16744) 2022-11-21 14:24:51 -05:00
David Sherret
a300b968b0
fix(npm): automatically find binary entrypoint when values are all the same (#16735) 2022-11-21 10:53:03 -05:00
Bartek Iwańczuk
c0482e09c3
Revert "fix(ext/websocket): make try_send ops infallible (#16454)" (#16743)
This reverts commit d76014192d.
2022-11-21 16:23:47 +01:00
David Sherret
449b1317c8
fix(npm): add suggestions to error message when can't find binary entrypoint (#16733)
Closes #16731
2022-11-21 09:23:27 -05:00
Bartek Iwańczuk
d232746928
feat(core): Ability to create snapshots from existing snapshots (#16597)
Co-authored-by: crowlkats <crowlkats@toaxl.com>
2022-11-21 14:36:26 +01:00
Bartek Iwańczuk
fedeea6dde
chore: remove stale bot (#16718) 2022-11-20 18:54:35 +01:00
David Sherret
a57134de38
fix(npm): handle directory resolution when resolving declaration files (#16706)
Also fixes resolving specifiers like `./something.generated` in
declaration files.

Closes #16695
2022-11-19 10:40:01 -05:00
Yoshiya Hinosawa
7ab08130a0
fix(ext/node): handle URL in createRequire (#16682) 2022-11-19 20:32:39 +09:00
David Sherret
763d492ed6
fix(npm): use an http client with connection pool (#16705)
Should make downloading npm packages faster and more reliable.
2022-11-18 17:28:14 -05:00
David Sherret
6962808f4b
chore: fix windows-only clippy errors (#16703) 2022-11-18 12:54:01 -05:00
David Sherret
1e512d10b3
fix(npm): ancestor that resolves peer dependency should not include self in id (#16693)
Closes #16683
2022-11-18 09:41:06 -05:00
Jesse Jackson
221d1916c1
fix(types/unstable): change interface base for CommandOutput (#16696)
extend from `CommandStatus` instead of `ChildStatus`. Resolves #16680.
2022-11-18 09:20:07 -05:00
David Sherret
5867a12920
perf(npm): make dependency resolution faster (#16694) 2022-11-17 21:50:43 -05:00
David Sherret
409e6c8402
fix(info): handle circular npm dependencies (#16692) 2022-11-17 21:22:28 -05:00
Aaron O'Mullan
238590aa9f
chore: use Rust 1.65.0 (#16688) 2022-11-18 02:59:10 +01:00
denobot
483c10c94b
chore: forward v1.28.1 release commit to main (#16678)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2022-11-17 02:17:19 +01:00
Bartek Iwańczuk
1416713cb3
fix(npm): using types for packages with subpath (#16656)
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-16 20:41:27 +01:00
Bartek Iwańczuk
bd159b8bad
fix(lock): ensure npm dependencies are written with --lock-write (#16668)
If "--lock-write" flag was present we never passed instance of the lockfile to 
the npm resolver, which made it skip adding discovered npm packages to
the lockfile. This commit fixes that, by always passing lockfile to the npm
resolver and only regenerating resolver snapshot is "--lock-write" is not
present.

Closes https://github.com/denoland/deno/issues/16666
2022-11-16 19:59:26 +01:00
David Sherret
40a72f3555
fix(npm): support non-all lowercase package names (#16669)
Supports package names that aren't all lowercase.

This stores the package with a leading underscore (since that's not
allowed in npm's registry and no package exists with a leading
underscore) then base32 encoded (A-Z0-9) so it can be lowercased and
avoid collisions.

Global cache dir:

```
$DENO_DIR/npm/registry.npmjs.org/_{base32_encode(package_name).to_lowercase()}/{version}
```

node_modules dir `.deno` folder:

```
node_modules/.deno/_{base32_encode(package_name).to_lowercase()}@{version}/node_modules/<package-name>
```

Within node_modules folder:

```
node_modules/<package-name>
```

So, direct childs of the node_modules folder can have collisions between
packages like `JSON` vs `json`, but this is already something npm itself
doesn't handle well. Plus, Deno doesn't actually ever resolve to the
`node_modules/<package-name>` folder, but just has that for
compatibility. Additionally, packages in the `.deno` dir could have
collissions if they have multiple dependencies that only differ in
casing or a dependency that has different casing, but if someone is
doing that then they're already going to have trouble with npm and they
are asking for trouble in general.
2022-11-16 18:44:31 +00:00
Yoshiya Hinosawa
1d85c25205
fix(ext/webstorage): make web storages re-assignable (#16661) 2022-11-17 02:12:58 +09:00
David Sherret
38542e849d
fix(npm): properly handle getting @types package for scoped packages (#16655) 2022-11-15 21:48:29 -05:00
David Sherret
6da6ed8985
fix(npm): support dist tags specified in npm package dependencies (#16652)
Closes #16321
2022-11-15 20:52:27 -05:00
Bartek Iwańczuk
300fd07fad
fix(npm): don't fail if conditional exports don't contains types (#16651)
If resolving types for an npm package, we didn't find "types" entry in 
the conditional exports declaration we were falling-through to regular 
resolution, instead of short-circuiting and giving up on resolving
types, which might lead to unwarranted errors.

Closes https://github.com/denoland/deno/issues/16649
2022-11-16 01:40:03 +01:00
Bartek Iwańczuk
7aa8e9c035
test: don't use remote std for tests (#16631) 2022-11-15 17:21:25 +01:00