1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00
Commit graph

12007 commits

Author SHA1 Message Date
David Sherret
d889573afc feedback 2024-08-20 20:18:22 -04:00
David Sherret
479c50875f
Update cli/tools/upgrade.rs
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Signed-off-by: David Sherret <dsherret@users.noreply.github.com>
2024-08-20 19:59:39 -04:00
David Sherret
f4dfe01562 a few tests 2024-08-20 18:22:50 -04:00
David Sherret
dd96d8fb33 feat(upgrade): support LTS release channel 2024-08-20 18:19:13 -04:00
seb
a3a54bc747
fix(ext/net): validate port in Deno.{connect,serve,listen} (#24399)
Co-authored-by: Will Leach <4619280+melbourne2991@users.noreply.github.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-08-20 21:25:41 +00:00
David Sherret
37279e0b0a
fix(add): error when config file contains importMap field (#25115)
The "imports" field has higher precedence than "importMap", so we should
error when `deno add` goes to add an `"imports"` field.

Closes https://github.com/denoland/deno/issues/24264
Closes https://github.com/denoland/deno/pull/24478
2024-08-20 16:32:01 -04:00
David Sherret
a7c002ae63
chore: enable no-console dlint rule (#25113) 2024-08-20 15:14:37 -04:00
Nathan Whitaker
2f47b4d1fd
chore: Remove stray console.error log in node:child_process (#25111)
Missed removing it before committing
2024-08-20 19:07:11 +00:00
Bartek Iwańczuk
7bfb93135d
chore(release): Release Deno v1.46.0-rc.3 (#25112) 2024-08-20 21:02:26 +02:00
Nayeem Rahman
acba2cd48c
fix(lsp): include scoped import map keys in completions (#25047) 2024-08-20 19:38:47 +01:00
Yazan AbdAl-Rahman
a7c8bb1596
feat: glob and directory support for deno check and deno cache cli arg paths (#25001)
Closes #24668
Closes #20813

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
2024-08-20 18:38:06 +00:00
Bartek Iwańczuk
1f47248143
fix: adjust suggestion for lockfile regeneration (#25107)
Ref https://github.com/denoland/deno/pull/24436#issuecomment-2288568645
2024-08-20 20:13:17 +02:00
HasanAlrimawi
0704454755
feat: Print deprecation message for npm packages (#24992)
This commit adds ability to print deprecation notices
for npm packages that have been marked as deprecated.

Closes #24013
2024-08-20 19:53:53 +02:00
Nathan Whitaker
5168700be6
feat(config): Support frozen lockfile config option in deno.json (#25100)
Closes #24544
2024-08-20 14:55:47 +00:00
David Sherret
f1c58ec041
feat(unstable): ability to use a local copy of jsr packages (#25068) 2024-08-20 14:11:43 +00:00
Hajime-san
19bcb40059
feat(cli/tools): add a subcommand --hide-stacktraces for test (#24095) 2024-08-20 01:27:36 +00:00
Yazan AbdAl-Rahman
4f49f703c1
fix(cli): update permission prompt message for compiled binaries (#24081)
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-08-20 01:20:06 +00:00
melbourne2991
0eba180fdb
fix(repl): Prevent panic on broken pipe (#21945) 2024-08-20 00:21:12 +00:00
Bartek Iwańczuk
1c4db2aca9
chore(release): Release Deno v1.46.0-rc.2 (#25101) 2024-08-19 21:13:04 +00:00
Yazan AbdAl-Rahman
4285cb339d
fix(lint): support linting tsx/jsx from stdin (#24955)
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-08-19 20:42:13 +00:00
Bartek Iwańczuk
b5051e25c2
feat: Deprecate "import assertions" with a warning (#24743)
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-19 22:36:35 +02:00
David Sherret
bf510544ef
chore: improve accessing special file test (#25099) 2024-08-19 16:21:27 -04:00
Bedis Nbiba
ee2b6899a1
fix: add permission name when accessing a special file errors (#25085) 2024-08-19 17:45:10 +00:00
Łukasz Czerniawski
0f2e47dd69
feat(watch): add watch paths to test subcommand (#24771) 2024-08-19 17:09:51 +00:00
David Sherret
c9edb15f15
fix(compile): make output more deterministic (#25092)
Closes https://github.com/denoland/deno/issues/25084
2024-08-19 16:41:11 +00:00
David Sherret
a20418e2e8
fix(fmt): regression with pipe in code blocks in tables (#25098) 2024-08-19 16:35:51 +00:00
Marvin Hagemeister
48701c19f8
fix(node/tty): fix tty.WriteStream.hasColor with different args (#25094)
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-19 17:13:09 +02:00
Bartek Iwańczuk
c94c5cddb1
feat(upgrade): support deno upgrade 1.46.0 (#25096)
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 f042c39180
# after
$ deno upgrade f042c39180
```

Old flags are still supported, but hidden from the help output.
2024-08-19 17:05:10 +02:00
snek
c0aa68a1e2
feat: upgrade deno_core (#25042)
- 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-19 14:51:16 +00:00
David Sherret
526f39fbb9
feat(FUTURE): terse lockfile (v4) (#25059) 2024-08-19 03:01:39 +00:00
David Sherret
28bebce544
chore: Rust 1.80.1 (#25089) 2024-08-18 22:24:56 -04:00
Bartek Iwańczuk
5c69b4861b
fix(upgrade): support RC release with --version flag (#25091)
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-19 00:27:06 +00:00
David Sherret
52681a2a29
fix: correct JSON config schema to show vendor option as stable (#25090)
This has been considered stable for some time now.
2024-08-18 22:54:07 +00:00
Luca Casonato
9bc2dd29ad
fix: clean up flag help output (#24686)
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-18 15:39:53 -07:00
Bartek Iwańczuk
1ec12a8c5d
chore(release): Release Deno v1.46.0-rc.1 (#25088)
Just bumping the version to test out `deno upgrade --rc` some more.
2024-08-19 00:30:45 +02:00
Bartek Iwańczuk
f003d6498c
fix(upgrade): correctly compute latest version based on current release 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-19 00:29:59 +02:00
HasanAlrimawi
2e9d3b688c
fix: log current version when using deno upgrade (#25079)
This PR addresses a suggestion in issue #21417

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-08-18 22:07:54 +00:00
David Sherret
4cd95589ec
fix: make deno add output more deterministic (#25083)
Will fix some flaky tests.
2024-08-18 23:02:32 +02:00
Bartek Iwańczuk
a3bd9fa529
ci: fix 'promote_to_rc' workflow by adding codesigning (#25074) 2024-08-18 22:45:54 +02:00
Marvin Hagemeister
558d2a098b
fix(node/http): wrong req.url value (#25081)
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-18 15:37:39 +00:00
David Sherret
35a17f38f6
fix(fmt): upgrade to dprint-plugin-markdown 0.17.4 (#25075)
Closes https://github.com/denoland/deno/issues/20917
Closes https://github.com/denoland/deno/issues/21285
2024-08-17 12:51:36 +02:00
Yoshiya Hinosawa
b6cdb31c05
fix(ext/node): fix prismjs compatibiliy in Web Worker (#25062)
PrismJS uses `WorkerGlobalScope` and `self` for detecting browser's Web
Worker context:
59e5a34713/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-17 11:16:43 +09:00
Bartek Iwańczuk
2eeea0a1d2
ci: add script to promote to RC release (#25072)
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-16 23:59:10 +02:00
Bartek Iwańczuk
db75462bd6
refactor: show release channel in deno --version (#25061)
Also simplifies handling of various release channels in `deno upgrade`
subcommand.
2024-08-16 22:42:19 +02:00
Nathan Whitaker
ff4226a3cd
fix(node/fs): Use correct offset and length in node:fs.read and write (#25049)
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-16 09:48:57 -07:00
David Sherret
4d1b263e91
feat(publish): suggest importing jsr:@std/ for deno.land/std urls (#25046) 2024-08-16 10:42:11 -04:00
David Sherret
57cd2951f1
feat(config/jsr): add license field (#25056)
1. Adds a new "license" field.
1. Adds this field by default when doing `deno init --lib`
2024-08-16 13:12:52 +00:00
Yoshiya Hinosawa
105d27bc7d
fix(ext/node): improve shelljs compat with managed npm execution (#24912)
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-16 12:48:48 +09:00
Bartek Iwańczuk
b6c74aab24
Revert "test: run unit tests with DENO_FUTURE=1 (#24400)" (#25060)
This reverts commit 22a834ff5b.

Appears this commit might have broken tests on `main`.
2024-08-15 23:30:06 +00:00
Nathan Whitaker
a58494483a
chore: Disable part of parallel serve test on macos (flaky) (#25057)
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-15 21:48:35 +00:00