summaryrefslogtreecommitdiff
path: root/cli
AgeCommit message (Collapse)Author
2024-01-10refactor: remove snapshotting from deno_runtime (#21794)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/21137
2024-01-10fix(lsp): implement host.getGlobalTypingsCacheLocation() (#21882)Nayeem Rahman
2024-01-10fix: android support (#19437)cions
<!-- 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-10chore: bump deno_core (#21832)Matt Mastracci
2024-01-09fix: update deno_lint and swc (#21718)Bartek Iwańczuk
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-01-09fix(lsp): use a dedicated thread for the parent process checker (#21869)David Sherret
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-09fix(ext/websocket): pass on uncaught errors in idleTimeout (#21846)Divy Srivastava
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-08fix(task): do not eagerly auto-install packages in package.json when ↵David Sherret
`"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-08fix(unstable/tar): skip node_modules, .git, and config "exclude" (#21816)David Sherret
2024-01-08chore: rename do-not-use-publish (#21854)Ryan Dahl
2024-01-08perf: skip expanding exclude globs (#21817)David Sherret
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-08perf(lsp): use host-owned cache for auto-import completions (#21852)Nayeem Rahman
2024-01-08fix(registry): wait for already pending publish (#21663)Bartek Iwańczuk
Co-authored-by: Luca Casonato <hello@lcas.dev>
2024-01-06chore: define removal version in deprecated IO APIs (#21702)Asher Gomez
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-06fix(compile): preserve granular unstable features (#21827)Bartek Iwańczuk
Fix https://github.com/denoland/deno/issues/21814
2024-01-06fix(kv): improve .listenQueue types (#21781)Kitson Kelly
Fixes: #21780
2024-01-06feat(ext/crypto): initial support for p521 in `generateKey` and `importKey` ↵Divy Srivastava
(#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-06fix(cli): update import map url (#21824)Jovi De Croock
Fixes https://github.com/denoland/deno/issues/21822 This updates the import-maps help URL to the one mentioned in the issue
2024-01-05fix(ext/node): add WriteStream.isTTY (#21801)Divy Srivastava
2024-01-05refactor(tools/repl): reorganize code (#21810)Bartek Iwańczuk
Some drive-by cleanup as I'm working through https://github.com/denoland/deno_core/pull/415.
2024-01-05fix(ext/node): add fs.cp, fs.cpSync, promises.cp (#21745)Divy Srivastava
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-05fix(lsp): show test code lens for template literal names (#21798)Nayeem Rahman
2024-01-04chore: forward v1.39.2 release commit to main (#21793)Bartek Iwańczuk
2024-01-04chore(cli): bump deno_core (#21790)Matt Mastracci
2024-01-04perf(coverage): faster source mapping (#21783)David Sherret
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-04fix(ci): copyright year for console_test.ts (#21787)Divy Srivastava
Missed in https://github.com/denoland/deno/commit/b2cd254c35b6b1b128beea0eacdb8e814d91e003#diff-0c2dcdd1ce20382e6ddefe52956cf2f570f18063cf09067f8a7ca44abaf33122
2024-01-04fix: strict type check for cross realms (#21669)Kenta Moriuchi
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-04fix(unstable/byonm): support using an import map with byonm (#21786)David Sherret
Supports mixing an import map with byonm.
2024-01-04fix(ext/node): UdpSocket ref and unref (#21777)Divy Srivastava
2024-01-03fix(cli): respect `exclude` option for `deno check` command (#21779)nokazn
This PR fixes #21658. - `check` subcommand sees `exclude` option in `deno.json`. When some paths passed with `check` command listed in `exclude`, they are ignored. - When some files are listed in `exclude` and imported indirectly among module graph, they are checked.
2024-01-04fix(cli): harden permission stdio check (#21778)Matt Mastracci
Harden the code that does permission checks to protect against re-opening of stdin. Code that runs FFI is vulnerable to an attack where fd 0 is closed during a permission check and re-opened with a file that contains a positive response (ie: `y` or `A`). While FFI code is dangerous in general, we can make it more difficult for FFI-enabled code to bypass additional permission checks. - Checks to see if the underlying file for stdin has changed from the start to the end of the permission check (detects races) - Checks to see if the message is excessively long (lowering the window for races) - Checks to see if stdin and stderr are still terminals at the end of the function (making races more difficult)
2024-01-03fix(lsp): support test code lens for Deno.test.{ignore,only}() (#21775)Nayeem Rahman
2024-01-03fix(jupyter): error message when install fails due to jupyter command not ↵David Sherret
being on PATH (#21767) We were failing silently in this scenario.
2024-01-03fix(cli): make signals tests more reliable (#21772)Matt Mastracci
Delivering POSIX signals too quickly may result in signal coalescing.
2024-01-03fix(node/zlib): accept dataview and buffer in zlib bindings (#21756)Jovi De Croock
Fixes #20516 Follow up to #21747 and #21746 This tackles the last point of #20516 where certain inputs weren't accepted in the other zlib methods This adds the `toU8` conversion of `_brotli` to `_zlib.mjs`, when we create the ZLibBuffer, we'll sanitize the input. I noticed that the async had no handler for `string` input so I added that as well.
2024-01-03chore: ignore hanging lsp jsx test (#21771)Nayeem Rahman
2024-01-03chore: upgrade deno_core to 0.241.0 (#21765)Bartek Iwańczuk
2024-01-02feat(lsp): cache jsxImportSource automatically (#21687)Nayeem Rahman
2024-01-02chore: increase unit test timeout to 3m (#21760)Bartek Iwańczuk
Alternative to #21758 to fix timing out tests on Windows.
2024-01-02fix(ext/node): implement os.machine (#21751)Divy Srivastava
2024-01-02fix(ext/http): use arraybuffer binaryType for server websocket (#21741)Divy Srivastava
Ref https://github.com/denoland/deno/issues/15340#issuecomment-1872353134
2024-01-02fix(ext/node): querystring stringify without encode callback (#21740)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/21734 Changes: - Use default encode when options do not provide a encode callback. - Remove internal TS for `node:querystring`. Its not helping catching bugs like this because of invalid type assumptions and use of `any`, more of a maintenance burden.
2024-01-02Revert "fix(runtime): Make native modal keyboard interaction consistent with ↵Divy Srivastava
browsers" (#21739) Reverts denoland/deno#18453 Fixes https://github.com/denoland/deno/issues/21602 https://github.com/denoland/deno/issues/21631 https://github.com/denoland/deno/issues/21641 Reasons for revert: - alert() and confirm() swallowed ^C with raw mode. - prompt() did not re-raise the interrupt signal from rustyline. - Default 'Y' on confirm() is a bad default and breaking change. cc @lionel-rowe
2024-01-01chore: update to Rust 1.75 (#21731)林炳权
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-12-31fix(http_client): Fix Deno.createHttpClient to accept poolIdleTimeout ↵Raashid Anwar
parameter (#21603) Fixed the bug `Deno.createHttpClient` to accept `poolIdleTimeout` parameter. Fixes https://github.com/denoland/deno/issues/21546
2023-12-31fix(node/zlib): consistently return buffer (#21747)Jovi De Croock
This fixes point 3 of https://github.com/denoland/deno/issues/20516 This PR creates consistency between the sync and async versions of the brotli compress where we will always return a buffer like Node.
2023-12-31fix(node/zlib): cast Dataview and Buffer to uint8 (#21746)Jovi De Croock
This fixes point 2 of #20516 This adds a conversion from Dataview/Buffer by returning `obj.buffer` which can be converted to a `UInt8Array`. Question: Regarding point 4 of the mentioned issue would it be appropriate to copy the toU8 helper to the `zlib.mjs` methods?
2023-12-30chore: update deno_doc to 0.85.0 (#21678)Leo Kettmeir
2023-12-30fix: `Object.groupBy` return type should be a partial (#21680)Joel Walker
Signed-off-by: Joel Walker <joelwalker1995@gmail.com>