1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-01 16:51:13 -05:00
Commit graph

10550 commits

Author SHA1 Message Date
denobot
aa23ccd1ae
1.39.3 (#21913)
Bumped versions for 1.39.3

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-01-12 15:58:36 +01:00
Leo Kettmeir
991adb70f3
fix: add EventSource typings (#21908)
Fixes #21691
2024-01-12 14:32:06 +01:00
Bartek Iwańczuk
a7c46a5f11
chore(publish): add --dry-run flag (#21895) 2024-01-12 13:22:10 +01:00
Divy Srivastava
87e954f54c
fix(web): use rustyline for prompt (#21893)
Workaround until https://github.com/kkawakam/rustyline/pull/759
2024-01-12 13:22:10 +01:00
Nayeem Rahman
140ef53b26
refactor(lsp): store project version on documents (#21892) 2024-01-12 13:22:10 +01:00
David Sherret
d47ee46ebb
fix(fast_check): analyze identifiers in type assertions/as exprs (#21899)
Closes #21894
2024-01-12 13:22:10 +01:00
David Sherret
b5e70c5ed7
feat(unstable): fast subset type checking of JSR dependencies (#21873) 2024-01-12 13:22:09 +01:00
Kenta Moriuchi
eaa73d0607
refactor: use core.ensureFastOps() (#21888) 2024-01-12 13:22:09 +01:00
Bartek Iwańczuk
467cdd9aa4
refactor: remove snapshotting from deno_runtime (#21794)
Closes https://github.com/denoland/deno/issues/21137
2024-01-12 13:22:09 +01:00
Nayeem Rahman
adfbdaac33
fix(lsp): implement host.getGlobalTypingsCacheLocation() (#21882) 2024-01-12 13:22:09 +01:00
cions
322b90fe87
fix: android support (#19437)
<!--
Before submitting a PR, please read https://deno.com/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.
7. Open as a draft PR if your work is still in progress. The CI won't
run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench'
label.
-->

---------

Signed-off-by: Matt Mastracci <matthew@mastracci.com>
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-01-12 13:22:09 +01:00
Marvin Hagemeister
282a25851d
chore: fix issue template discord link (#21885)
<!--
Before submitting a PR, please read https://deno.com/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.
7. Open as a draft PR if your work is still in progress. The CI won't
run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench'
label.
-->
Fixes https://github.com/denoland/deno/issues/21880
2024-01-12 13:22:09 +01:00
Matt Mastracci
2022650db7
chore: bump deno_core (#21832) 2024-01-12 13:22:08 +01:00
Bartek Iwańczuk
94bf4ab24e
fix: update deno_lint and swc (#21718)
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-01-12 13:22:08 +01:00
David Sherret
9ae2fe38f0
fix(lsp): use a dedicated thread for the parent process checker (#21869)
Ensures the Deno process is brought down even when the runtime gets hung
up on something.

Marvin found that the lsp was running without a parent vscode around so
this is maybe/probably related.
2024-01-12 13:22:08 +01:00
Bartek Iwańczuk
a840937403
chore: upgrade deno_core to 0.244.0 (#21859) 2024-01-12 13:22:08 +01:00
Divy Srivastava
289fe7b1b7
fix(ext/websocket): pass on uncaught errors in idleTimeout (#21846)
Fixes https://github.com/denoland/deno/issues/21840

The problem was hard to reproduce as its a race condition. I've added a
test that reproduces the problem 1/10 tries. We should move the
idleTimeout handling to Rust (maybe even built into fastwebsocket).
2024-01-12 13:22:08 +01:00
Asher Gomez
862dfd7cbe
chore: cleanup readAll() logic (#21862) 2024-01-12 13:22:07 +01:00
David Sherret
c983588dde
fix(task): do not eagerly auto-install packages in package.json when "nodeModulesDir": false (#21858)
There's no need to auto-install the package.json if the user is not
using a node_modules directory.

Closes #21850
2024-01-12 13:22:07 +01:00
David Sherret
0d37f40248
fix(unstable/tar): skip node_modules, .git, and config "exclude" (#21816) 2024-01-12 13:22:07 +01:00
Ryan Dahl
4d83471e58
chore: rename do-not-use-publish (#21854) 2024-01-12 13:22:07 +01:00
Marvin Hagemeister
fb651776e4
fix: cjs export rewritten to invalid identifier (#21853)
<!--
Before submitting a PR, please read https://deno.com/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.
7. Open as a draft PR if your work is still in progress. The CI won't
run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench'
label.
-->

Fixes https://github.com/denoland/deno/issues/21836
2024-01-12 13:22:07 +01:00
David Sherret
972b3e8e65
perf: skip expanding exclude globs (#21817)
We were calling `expand_glob` on our excludes, which is very expensive
and unnecessary because we can pattern match while traversing instead.

1. Doesn't expand "exclude" globs. Instead pattern matches while walking
the directory.
2. Splits up the "include" into base paths and applicable file patterns.
This causes less pattern matching to occur because we're only pattern
matching on patterns that might match and not ones in completely
unrelated directories.
2024-01-12 13:22:06 +01:00
Nayeem Rahman
8a25d21380
perf(lsp): use host-owned cache for auto-import completions (#21852) 2024-01-12 13:22:06 +01:00
Bartek Iwańczuk
5ef16d0a08
fix(registry): wait for already pending publish (#21663)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2024-01-12 13:22:06 +01:00
Asher Gomez
e667497b6b
chore(ext/io): cleanup unused functions (#21844)
These functions don't appear to be used anywhere.
2024-01-12 13:22:06 +01:00
Kenta Moriuchi
51afa70236
fix(ext): enable prefer-primordials for internal TypeScript (#21813)
Enabled prefer-primordials lint for ext/cron and ext/kv.
2024-01-12 13:22:06 +01:00
David Sherret
5b4418b628
chore: update LICENSE.md to 2024 (#21833) 2024-01-12 13:22:06 +01:00
Asher Gomez
f6fdb38d50
chore: define removal version in deprecated IO APIs (#21702)
This defines the removal version of v2 for the following APIs that
favour the Streams API:
* `Deno.copy()`
* `Deno.File`
* `Deno.iter()`
* `Deno.Buffer`
* `Deno.readAll()`
* `Deno.readAllSync()`
* `Deno.writeAll()`
* `Deno.writeAllSync()`
* `Deno.FsWatcher.return()`
2024-01-12 13:22:05 +01:00
Bartek Iwańczuk
f5c1a8f914
fix(compile): preserve granular unstable features (#21827)
Fix https://github.com/denoland/deno/issues/21814
2024-01-12 13:22:05 +01:00
Kitson Kelly
28e4f3d511
fix(kv): improve .listenQueue types (#21781)
Fixes: #21780
2024-01-12 13:22:05 +01:00
Bartek Iwańczuk
777d8f5261
refactor: split runtime/98_global_scope.js (#21785) 2024-01-12 13:22:05 +01:00
Divy Srivastava
6e017dbba7
feat(ext/crypto): initial support for p521 in generateKey and importKey (#21815)
Part 1 of a potential 3 part series. Ref #13449 

The current implementation passes key material back and forth RustCrypto
group of crates and ring. ring does not implement p521 yet.

This PR adds support for P521 named curve in `generateKey` and
`importKey` where we use RustCrypto. Other parts should be moved over to
the RustGroup group of crates for consistency.
2024-01-12 13:22:05 +01:00
Divy Srivastava
a32792d1b1
chore(build): document faster rebuilds with cargo plonk (#21823) 2024-01-12 13:22:04 +01:00
Jovi De Croock
8af30f9937
fix(cli): update import map url (#21824)
Fixes https://github.com/denoland/deno/issues/21822

This updates the import-maps help URL to the one mentioned in the issue
2024-01-12 13:22:04 +01:00
Divy Srivastava
1748033b59
fix(ext/node): add WriteStream.isTTY (#21801) 2024-01-12 13:22:04 +01:00
David Sherret
0a40c3c003
chore: update format script (#21811)
The PR referenced has been released so we can update this now.
2024-01-12 13:22:04 +01:00
Bartek Iwańczuk
d3e1387ebb
refactor(tools/repl): reorganize code (#21810)
Some drive-by cleanup as I'm working through
https://github.com/denoland/deno_core/pull/415.
2024-01-12 13:22:04 +01:00
Kenta Moriuchi
4c2a00b034
chore: update deno_lint for CI (#21802) 2024-01-12 13:22:03 +01:00
Divy Srivastava
6d55d87be4
chore(ext/webgpu): include GPUCanvasContext in snapshot (#21773)
Part 1 of #21713 

Changes:

- Remove `.present()` and add a `presentGPUCanvasContext` (not exposed
yet to users)
- Move lazy load logic to `00_init.js`. This can be used to use webgpu
on-demand from future code (OffScreenCanvas)
2024-01-12 13:22:03 +01:00
Divy Srivastava
b938ea40fa
fix(ci): update copright year for _fs_cp.js (#21803) 2024-01-12 13:22:03 +01:00
Divy Srivastava
1fcace13b9
fix(ext/node): add fs.cp, fs.cpSync, promises.cp (#21745)
Fixes https://github.com/denoland/deno/issues/20803
Fixes https://github.com/denoland/deno/issues/21723

Performance: copying a 48GiB rust `target` folder (recursive)
| Platform  | `deno` | `node v21.5` | Improvement |
| -------- | ------- | ------- | ------- |
| macOS (APFS) |   3.1secs  |  127.99 secs |  **42x** |
| Windows | 18.3secs | 67.2secs |  **3.8x** |

Copying files with varying sizes:


![image](https://github.com/denoland/deno/assets/34997667/58932652-6f7a-47f5-8504-896dc9ab4ddc)
2024-01-12 13:22:03 +01:00
Nayeem Rahman
7f68ea0e14
fix(lsp): show test code lens for template literal names (#21798) 2024-01-12 13:22:03 +01:00
denobot
6af25c0592
1.39.2 (#21791)
Bumped versions for 1.39.2

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-01-04 21:40:03 +01:00
Matt Mastracci
6704a8e6fd
chore(cli): bump deno_core (#21790) 2024-01-04 20:34:55 +01:00
David Sherret
50d5a93c28
perf(coverage): faster source mapping (#21783)
I did not measure this change (O(n) to O(log n)), but mainly this should
be slightly more accurate at getting the line number.
2024-01-04 20:34:55 +01:00
Divy Srivastava
ed90e2baee
fix(ci): copyright year for console_test.ts (#21787)
Missed in
b2cd254c35 (diff-0c2dcdd1ce20382e6ddefe52956cf2f570f18063cf09067f8a7ca44abaf33122)
2024-01-04 20:34:55 +01:00
Kenta Moriuchi
ab60d9e6a3
fix: strict type check for cross realms (#21669)
Deno v1.39 introduces `vm.runInNewContext`. This may cause problems when
using `Object.prototype.isPrototypeOf` to check built-in types.

```js
import vm from "node:vm";

const err = new Error();
const crossErr = vm.runInNewContext(`new Error()`);

console.assert( !(crossErr instanceof Error) );
console.assert( Object.getPrototypeOf(err) !== Object.getPrototypeOf(crossErr) );
```

This PR changes to check using internal slots solves them.

---

current: 

```
> import vm from "node:vm";
undefined
> vm.runInNewContext(`new Error("message")`)
Error {}
> vm.runInNewContext(`new Date("2018-12-10T02:26:59.002Z")`)
Date {}
```

this PR:

```
> import vm from "node:vm";
undefined
> vm.runInNewContext(`new Error("message")`)
Error: message
    at <anonymous>:1:1
> vm.runInNewContext(`new Date("2018-12-10T02:26:59.002Z")`)
2018-12-10T02:26:59.002Z
```

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-01-04 20:34:55 +01:00
David Sherret
f45cf71fde
fix(unstable/byonm): support using an import map with byonm (#21786)
Supports mixing an import map with byonm.
2024-01-04 20:34:55 +01:00
Divy Srivastava
9c4431758d
fix(ext/node): UdpSocket ref and unref (#21777) 2024-01-04 20:34:55 +01:00