summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-08-20chore(release): Release Deno v1.46.0-rc.3 (#25112)Bartek Iwańczuk
2024-08-20fix(lsp): include scoped import map keys in completions (#25047)Nayeem Rahman
2024-08-20feat: glob and directory support for `deno check` and `deno cache` cli arg ↵Yazan AbdAl-Rahman
paths (#25001) Closes #24668 Closes #20813 --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2024-08-20fix: adjust suggestion for lockfile regeneration (#25107)Bartek Iwańczuk
Ref https://github.com/denoland/deno/pull/24436#issuecomment-2288568645
2024-08-20feat: Print deprecation message for npm packages (#24992)HasanAlrimawi
This commit adds ability to print deprecation notices for npm packages that have been marked as deprecated. Closes #24013
2024-08-20feat(config): Support frozen lockfile config option in deno.json (#25100)Nathan Whitaker
Closes #24544
2024-08-20feat(unstable): ability to use a local copy of jsr packages (#25068)David Sherret
2024-08-20feat(cli/tools): add a subcommand `--hide-stacktraces` for test (#24095)Hajime-san
2024-08-20fix(cli): update permission prompt message for compiled binaries (#24081)Yazan AbdAl-Rahman
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-08-20fix(repl): Prevent panic on broken pipe (#21945)melbourne2991
2024-08-19chore(release): Release Deno v1.46.0-rc.2 (#25101)Bartek Iwańczuk
2024-08-19fix(lint): support linting tsx/jsx from stdin (#24955)Yazan AbdAl-Rahman
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-08-19feat: Deprecate "import assertions" with a warning (#24743)Bartek Iwańczuk
This commit deprecates "import assertions" proposal that has been replaced with "import attributes". Any time an import assertion is encountered a warning will be printed to the terminal. This warning will be printed for both local and remote files (ie. user code and dependencies). Import assertions support will be removed in Deno 2.
2024-08-19chore: improve accessing special file test (#25099)David Sherret
2024-08-19fix: add permission name when accessing a special file errors (#25085)Bedis Nbiba
2024-08-19feat(watch): add watch paths to test subcommand (#24771)Łukasz Czerniawski
2024-08-19fix(compile): make output more deterministic (#25092)David Sherret
Closes https://github.com/denoland/deno/issues/25084
2024-08-19fix(fmt): regression with pipe in code blocks in tables (#25098)David Sherret
2024-08-19fix(node/tty): fix `tty.WriteStream.hasColor` with different args (#25094)Marvin Hagemeister
The check in `tty.WriteStream.prototype.hasColors()` was incorrect leading to the [`yoctocolors`](https://github.com/sindresorhus/yoctocolors) package not printing any colors. Fixes https://github.com/denoland/deno/issues/24407
2024-08-19feat(upgrade): support `deno upgrade 1.46.0` (#25096)Bartek Iwańczuk
This commit changes `deno upgrade` subcommand to accept a positional argument that can be either a version, release channel name or a git hash, making invocations of `deno upgrade` much more concise: ``` # before $ deno upgrade --version 1.46.0 # after $ deno upgrade 1.46.0 ``` ``` # before $ deno upgrade --canary # after $ deno upgrade canary ``` ``` # specific canary version before $ deno upgrade --canary --version f042c39180c1b345de8e7b5f0dfae5d0a49b161f # after $ deno upgrade f042c39180c1b345de8e7b5f0dfae5d0a49b161f ``` Old flags are still supported, but hidden from the help output.
2024-08-19feat: upgrade deno_core (#25042)snek
- Update ffi turbocall to use revised fast call api - Remove `v8_version` function calls - `*mut OwnedIsolate` is no longer stored in OpCtx gotham store
2024-08-19feat(FUTURE): terse lockfile (v4) (#25059)David Sherret
2024-08-18chore: Rust 1.80.1 (#25089)David Sherret
2024-08-19fix(upgrade): support RC release with --version flag (#25091)Bartek Iwańczuk
This commit fixes scenarios like: ``` $ deno upgrade --version=v1.46.0-rc.0 Downloading https://github.com/denoland/deno/releases/download/v1.46.0-rc.0/deno-aarch64-apple-darwin.zip Download could not be found, aborting ``` Now: ``` $ target/debug/deno upgrade --version=v1.46.0-rc.0 Downloading https://dl.deno.land/release/v1.46.0-rc.0/deno-aarch64-apple-darwin.zip Deno is upgrading to version 1.46.0-rc.0 Upgraded successfully to Deno v1.46.0-rc.0 ``` Also some unneeded code was removed.
2024-08-18fix: correct JSON config schema to show vendor option as stable (#25090)David Sherret
This has been considered stable for some time now.
2024-08-18fix: clean up flag help output (#24686)Luca Casonato
Permission flags are unified in a clearer and concise output. Unstable flags are hidden by default with exception of the `unstable` flag itself. the remaining unstable flags can be seen with a `--help=unstable`. This also cleans up to show unstable flags only for subcommands that actually need them. Also sorts flags alphabetically, and gorups various flags together in a set of categories. --------- Co-authored-by: crowlkats <crowlkats@toaxl.com>
2024-08-19chore(release): Release Deno v1.46.0-rc.1 (#25088)Bartek Iwańczuk
Just bumping the version to test out `deno upgrade --rc` some more.
2024-08-19fix(upgrade): correctly compute latest version based on current release ↵Bartek Iwańczuk
channel (#25087) This commit fixes computation of the latest available version by taking into account which release channel the current binary is on. Before this commit, if user was on "RC" channel, calling `deno upgrade` would not switch back to the "stable" channel.
2024-08-18fix: log current version when using deno upgrade (#25079)HasanAlrimawi
This PR addresses a suggestion in issue #21417 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-08-18fix: make `deno add` output more deterministic (#25083)David Sherret
Will fix some flaky tests.
2024-08-18ci: fix 'promote_to_rc' workflow by adding codesigning (#25074)Bartek Iwańczuk
2024-08-18fix(node/http): wrong `req.url` value (#25081)Marvin Hagemeister
This PR addresses a regression introduced in https://github.com/denoland/deno/pull/25021 that would cause the `req.url` parameter in Node's http server to always be a single character instead of the expected value. The regression was caused by effectively calling `.indexOf()` on an empty string and thus passing the wrong index for slicing. ```js "".indexOf("/") // -> -1 request.url.slice(-1) // effectively only giving us the last character ``` Fixes https://github.com/denoland/deno/issues/25080
2024-08-17fix(fmt): upgrade to dprint-plugin-markdown 0.17.4 (#25075)David Sherret
Closes https://github.com/denoland/deno/issues/20917 Closes https://github.com/denoland/deno/issues/21285
2024-08-17fix(ext/node): fix prismjs compatibiliy in Web Worker (#25062)Yoshiya Hinosawa
PrismJS uses `WorkerGlobalScope` and `self` for detecting browser's Web Worker context: https://github.com/PrismJS/prism/blob/59e5a3471377057de1f401ba38337aca27b80e03/prism.js#L11 Now the detection logic above is broken when it's imported from Deno's Web Worker context because we only hide `self` (Prism assumes when `WorkerGlobalScope` is available, `self` is also available). This change fixes the above by also hiding `WorkerGlobalScope` global in Node compat mode. closes #25008
2024-08-16ci: add script to promote to RC release (#25072)Bartek Iwańczuk
This commits add a CI script that allows to promote a certain canary build to a "Release Candidate" release. This is done using `libsui` and `patchver` utilities.
2024-08-16refactor: show release channel in `deno --version` (#25061)Bartek Iwańczuk
Also simplifies handling of various release channels in `deno upgrade` subcommand.
2024-08-16fix(node/fs): Use correct offset and length in node:fs.read and write (#25049)Nathan Whitaker
My fix in #25030 was buggy, I forgot to pass the `byteOffset` and `byteLength`. Whoops. I also discovered that fs.read was not respecting the `offset` argument, and we were constructing a new `Buffer` for the callback instead of just passing the original one (which is what node does, and the @types/node definitions also indicate the callback should get the same type). Fixes #25028.
2024-08-16feat(publish): suggest importing `jsr:@std/` for `deno.land/std` urls (#25046)David Sherret
2024-08-16feat(config/jsr): add license field (#25056)David Sherret
1. Adds a new "license" field. 1. Adds this field by default when doing `deno init --lib`
2024-08-16fix(ext/node): improve shelljs compat with managed npm execution (#24912)Yoshiya Hinosawa
This change improves the Node.js compatibility in managed npm resolution mode by disabling the discovery of `node_modules` when the main specifier is inside of `DENO_DIR`. closes #22732 closes #24589
2024-08-15Revert "test: run unit tests with DENO_FUTURE=1 (#24400)" (#25060)Bartek Iwańczuk
This reverts commit 22a834ff5b4b312b8f91be8991f2b495d49fad2f. Appears this commit might have broken tests on `main`.
2024-08-15chore: Disable part of parallel serve test on macos (flaky) (#25057)Nathan Whitaker
MacOS tends to not distribute evenly, so just don't assert that requests were served by > 1 worker on mac. Also added a check that all workers start, so we at least check that on macos.
2024-08-15refactor: `version` module exports a single const struct (#25014)Bartek Iwańczuk
This commit rewrites the internal `version` module that exported various information about the current executable. Instead of exporting several consts, we are now exporting a single const structure that contains all the necessary information. This is the first step towards cleaning up how we use this information and should allow us to use SUI to be able to patch this information in already produced binary making it easier to cut new releases. --------- Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-08-15feat(lint): Add lint for usage of node globals (with autofix) (#25048)Nathan Whitaker
From upgrading `deno_lint`. Previously if you had a node project that used a bunch of node globals (`process.env`, etc), you would have to fix the errors by hand. This PR includes a new lint that detects usages of node globals (`process`, `setImmediate`, `Buffer`, etc.) and provides an autofix to import the correct value. For instance: ```ts // main.ts const _foo = process.env.FOO; ``` `deno lint` gives you ```ts error[no-node-globals]: NodeJS globals are not available in Deno --> /home/foo.ts:1:14 | 1 | const _foo = process.env.FOO; | ^^^^^^^ = hint: Add `import process from "node:process";` docs: https://lint.deno.land/rules/no-node-globals Found 1 problem (1 fixable via --fix) Checked 1 file ``` And `deno lint --fix` adds the import for you: ```ts // main.ts import process from "node:process"; const _foo = process.env.FOO; ```
2024-08-15refactor: remove version::is_canary(), use ReleaseChannel instead (#25053)Bartek Iwańczuk
In preparation for https://github.com/denoland/deno/pull/25014, this commit removes public `is_canary()` method and instead uses an enum `ReleaseChannel` to be able to designate more "kinds" of builds.
2024-08-15fix(node): Create additional pipes for child processes (#25016)Nathan Whitaker
Linux/macos only currently. Part of https://github.com/denoland/deno/issues/23524 (fixes it on platforms other than windows). Part of #16899 (fixes it on platforms other than windows). After this PR, playwright is functional on mac/linux.
2024-08-15feat: `deno compile --icon <ico>` (#25039)Divy Srivastava
Add `--icon` flag to set deno compile'd executable icon on Windows. ``` deno compile --icon icon.ico game.tsx ``` Depends on https://github.com/denoland/sui/pull/24 <img width="447" alt="image" src="https://github.com/user-attachments/assets/7f6f3aa0-6872-4975-ae9d-06701b7684b8"> Closes https://github.com/denoland/deno/issues/8912
2024-08-14feat(serve): Opt-in parallelism for `deno serve` (#24920)Nathan Whitaker
Adds a `parallel` flag to `deno serve`. When present, we spawn multiple workers to parallelize serving requests. ```bash deno serve --parallel main.ts ``` Currently on linux we use `SO_REUSEPORT` and rely on the fact that the kernel will distribute connections in a round-robin manner. On mac and windows, we sort of emulate this by cloning the underlying file descriptor and passing a handle to each worker. The connections will not be guaranteed to be fairly distributed (and in practice almost certainly won't be), but the distribution is still spread enough to provide a significant performance increase. --- (Run on an Macbook Pro with an M3 Max, serving `deno.com` baseline:: ``` ❯ wrk -d 30s -c 125 --latency http://127.0.0.1:8000 Running 30s test @ http://127.0.0.1:8000 2 threads and 125 connections Thread Stats Avg Stdev Max +/- Stdev Latency 239.78ms 13.56ms 330.54ms 79.12% Req/Sec 258.58 35.56 360.00 70.64% Latency Distribution 50% 236.72ms 75% 248.46ms 90% 256.84ms 99% 268.23ms 15458 requests in 30.02s, 2.47GB read Requests/sec: 514.89 Transfer/sec: 84.33MB ``` this PR (`with --parallel` flag) ``` ❯ wrk -d 30s -c 125 --latency http://127.0.0.1:8000 Running 30s test @ http://127.0.0.1:8000 2 threads and 125 connections Thread Stats Avg Stdev Max +/- Stdev Latency 117.40ms 142.84ms 590.45ms 79.07% Req/Sec 1.33k 175.19 1.77k 69.00% Latency Distribution 50% 22.34ms 75% 223.67ms 90% 357.32ms 99% 460.50ms 79636 requests in 30.07s, 12.74GB read Requests/sec: 2647.96 Transfer/sec: 433.71MB ```
2024-08-14feat(ext/node): support http2session.socket (#24786)Sean McArthur
Co-authored-by: Satya Rohith <me@satyarohith.com>
2024-08-14fix(lsp): import map lookup for jsr subpath auto import (#25025)Nayeem Rahman