Commit graph

10950 commits

Author SHA1 Message Date
Bartek Iwańczuk
2ed984ba3a
fix: respect unstable "temporal" configuration in config file (#22134)
Actual fix happened in https://github.com/denoland/deno/pull/22782, but
this commit adds additional tests and cleans up V8 flags passed on init.

Closes https://github.com/denoland/deno/issues/22123
Closes https://github.com/denoland/deno/issues/22560
Closes https://github.com/denoland/deno/issues/22557
2024-03-08 01:32:11 +01:00
Bartek Iwańczuk
2d5b19277b
chore: upgrade deno_core (#22782) 2024-03-08 00:06:28 +01:00
Bartek Iwańczuk
914b7495a8
fix(publish): reland error if there are uncommitted changes (#22613) (#22632)
Reverted in https://github.com/denoland/deno/pull/22625
2024-03-07 22:13:36 +01:00
Divy Srivastava
e0c9102b49
perf: hard link npm cache (#22773) 2024-03-07 13:10:19 -05:00
Nayeem Rahman
8df47882c9
fix(lsp): don't apply renames to remote modules (#22765) 2024-03-07 17:27:24 +00:00
Matt Mastracci
0fdb33c3aa
fix(cli): limit test parallelism on Windows to avoid pipe error (#22776)
One last attempt to fix the parallelism issue on Windows.
2024-03-07 10:04:39 -07:00
Matt Mastracci
4791d16a8e
perf(cli): use faster_hex (#22761)
`cli::util::checksum` was showing up on flame graphs because it was
concatenating allocated strings. We can use `faster-hex` to improve it.
2024-03-07 10:00:43 -07:00
David Sherret
594d8397ad
fix(publish): properly display graph validation errors (#22775)
The graph validation errors were displaying cryptically during publish.
This fixes that.
2024-03-07 17:30:30 +01:00
Luca Casonato
87a08fc3b2
fix(tools/publish): correctly handle importing from self in unfurling (#22774)
We emitted `import "./` rather than `import "./$NAME"`. This is now
fixed.

Also makes a cosmetic change so that `../` imports are now just imported
as `../`, not `./../`.
2024-03-07 17:29:17 +01:00
Bartek Iwańczuk
f0ec4fe1b8
fix(publish): silence warnings for sloppy imports and node builtins with env var (#22760)
An undocumented "DENO_DISABLE_PEDANTIC_NODE_WARNINGS" env
var can be used to silence warnings for sloppy imports and node builtins
without `node:` prefix.
2024-03-07 14:59:57 +01:00
Satya Rohith
588dd5e669
fix(ext/node): http2.createServer (#22708) 2024-03-07 19:28:46 +05:30
Leo Kettmeir
0fb67ce43e
feat(node/util): styleText (#22758)
Implements https://github.com/nodejs/node/pull/51850
2024-03-07 00:45:28 +01:00
Nathan Whitaker
9df917c0be
chore: upgrade deno_core (#22725)
<!--
Before submitting a PR, please read
https://docs.deno.com/runtime/manual/references/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.
-->
2024-03-06 15:08:10 -08:00
Bartek Iwańczuk
6b48aff8fb
fix: don't include source maps in release mode (#22751)
Due to bug in `deno_ast` the `source_map` setting is ignored and source
map is always emitted. This is fixed by updating `deno_ast`.
2024-03-06 22:53:02 +00:00
Matt Mastracci
7f3162c57e
chore(tests): fix process_test for sure (#22756) 2024-03-06 22:50:24 +00:00
Divy Srivastava
39d9281bb9
fix(ext/node): add default methods to fs.StatsBase (#22750) 2024-03-06 23:01:20 +01:00
Asher Gomez
fed9dec92a
fix: point to correct WPT runner file (#22753)
We were previously pointing to the incorrect runner file.
2024-03-06 22:59:30 +01:00
Divy Srivastava
7542d1050a
fix(ext/node): strip --enable-source-maps from argv (#22743)
Fixes https://github.com/denoland/deno/issues/21750
2024-03-06 13:40:47 +00:00
Nayeem Rahman
01bc2f530e
feat(unstable/pm): support npm packages in 'deno add' (#22715) 2024-03-06 13:24:15 +00:00
Bartek Iwańczuk
8b1f160bb5
fix: Provide source map for internal extension code (#22716)
This commit adds support for source maps for `ext/` crates that are
authored in TypeScript. As a result any exceptions thrown from eg. `ext/node`
will now have correct stack traces.

This is only enabled in debug mode as it adds about 2Mb to the binary.
2024-03-06 14:17:49 +01:00
Divy Srivastava
6ba0b7952d
fix(node): stat/statSync returns instance of fs.Stats (#22294)
Fixes https://github.com/denoland/deno/issues/22291

---------

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-03-06 13:59:10 +01:00
Divy Srivastava
156950828e
fix(publish): permissionless dry-run in GHA (#22679)
Fixes https://github.com/denoland/deno/issues/22658
2024-03-06 18:26:20 +05:30
Divy Srivastava
89d7bc693a
chore: remove debug console table log in node/http2 (#22741) 2024-03-06 13:43:10 +01:00
Divy Srivastava
d283a53655
fix(node): implement ALS enterWith (#22740)
Fixes https://github.com/denoland/deno/issues/18127
https://github.com/denoland/deno/issues/17248

SvelteKit works now!
```
$ deno run -A npm:create-svelte@latest my-app

create-svelte version 6.0.9

┌  Welcome to SvelteKit!
│
◇  Which Svelte app template?
│  SvelteKit demo app
│
◇  Add type checking with TypeScript?
│  Yes, using JavaScript with JSDoc comments
│
◇  Select additional options (use arrow keys/space bar)
│  none
│
└  Your project is ready!

✔ Type-checked JavaScript
  https://www.typescriptlang.org/tsconfig#checkJs

Install community-maintained integrations:
  https://github.com/svelte-add/svelte-add

Next steps:
  1: cd my-app
  2: npm install
  3: git init && git add -A && git commit -m "Initial commit" (optional)
  4: npm run dev -- --open

To close the dev server, hit Ctrl-C

Stuck? Visit us at https://svelte.dev/chat

$ cd my-app/
$ deno task dev
Task dev vite dev

  VITE v5.1.4  ready in 1632 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
```
2024-03-06 12:05:57 +00:00
Matt Mastracci
fac7068c1e
chore(ext/node): ignore non-working process test (#22723)
Filed https://github.com/denoland/deno/issues/22724 for actual issue
2024-03-05 21:21:28 -07:00
Divy Srivastava
adb0226927
chore: Reuse linux symbols list on openbsd and freebsd (#22706) 2024-03-06 08:33:15 +05:30
Matt Mastracci
bebbb61eea
fix(cli): improve logging on failed named pipe (#22726) 2024-03-06 03:17:46 +01:00
Matt Mastracci
ace25161c7
chore(cli): remove problematic snapshot test (#22722)
This test crashes often on windows.
2024-03-05 19:11:33 -07:00
David Sherret
3eaf174bfc
fix(node): improve cjs tracking (#22673)
We were missing saying that a file is CJS when some Deno code imported
from the node_modules directory at runtime.
2024-03-06 00:23:51 +00:00
Matt Mastracci
3fd4b882a4
perf(cli): faster standalone executable determination (#22717)
This was showing up on the flamegraph.

```
14:54 $ hyperfine -S none --warmup 25 '/tmp/deno run /tmp/empty.js' 'target/release/deno run /tmp/empty.js'
Benchmark 1: /tmp/deno run /tmp/empty.js
  Time (mean ± σ):      17.2 ms ±   4.7 ms    [User: 11.2 ms, System: 4.0 ms]
  Range (min … max):    15.1 ms …  72.9 ms    172 runs
 
  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
 
Benchmark 2: target/release/deno run /tmp/empty.js
  Time (mean ± σ):      16.7 ms ±   1.1 ms    [User: 11.1 ms, System: 4.0 ms]
  Range (min … max):    15.0 ms …  20.1 ms    189 runs
 
Summary
  'target/release/deno run /tmp/empty.js' ran
    1.03 ± 0.29 times faster than '/tmp/deno run /tmp/empty.js'
✔ ~/Documents/github/deno/deno [faster_extract|…5⚑ 23] 
```
2024-03-05 15:14:49 -07:00
Aapo Alasuutari
3333d67335
chore(tests): Remove vestiges of cli/tests folder (#22712) 2024-03-05 13:49:21 -07:00
David Sherret
942dcbad84
refactor: move deno json functionality to args module (#22710) 2024-03-05 15:45:44 -05:00
Marvin Hagemeister
c38f59f657
fix: update node process version to latest node LTS (#22709)
<!--
Before submitting a PR, please read
https://docs.deno.com/runtime/manual/references/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.
-->
The issue seems to be already fixed since we upped to a newer 18.x
version string in [another
PR](https://github.com/denoland/deno/pull/20366). Updating to latest
node LTS version can't hurt though.

Fixes https://github.com/denoland/deno/issues/21515
2024-03-05 17:02:08 +01:00
Matt Mastracci
72d34a79ac
fix(cli): remove possible deadlock in test channel (#22662)
The stderr stream could possibly starve the other bits of the
output-redirecting event loop.

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-03-04 20:14:21 -07:00
Matt Mastracci
10557ff15c
chore(ext/node): make process_test more reliable (#22703) 2024-03-04 19:52:10 -07:00
Matt Mastracci
c99a0492b7
chore(tests): update flaky timer test (#22701)
This test was flaky after landing the new timer rewrite.
2024-03-05 08:15:51 +05:30
Bartek Iwańczuk
d9fa2dd550
chore: upgrade deno_core (#22699)
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-03-05 01:17:39 +00:00
Asher Gomez
0022c35a23
chore: move tools/wpt to tests/wpt/runner (#22545)
Towards #22525

---------

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-03-05 00:41:16 +00:00
dependabot[bot]
c559e813e1
chore(deps): bump mio from 0.8.10 to 0.8.11 (#22696)
Bumps [mio](https://github.com/tokio-rs/mio) from 0.8.10 to 0.8.11.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md">mio's
changelog</a>.</em></p>
<blockquote>
<h1>0.8.11</h1>
<ul>
<li>Fix receiving IOCP events after deregistering a Windows named pipe
(<a
href="https://redirect.github.com/tokio-rs/mio/pull/1760">tokio-rs/mio#1760</a>,
backport pr:
<a
href="https://redirect.github.com/tokio-rs/mio/pull/1761">tokio-rs/mio#1761</a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0328bdef90"><code>0328bde</code></a>
Release v0.8.11</li>
<li><a
href="7084498512"><code>7084498</code></a>
Fix warnings</li>
<li><a
href="90d4fe00df"><code>90d4fe0</code></a>
named-pipes: fix receiving IOCP events after deregister</li>
<li><a
href="c710a307f8"><code>c710a30</code></a>
Add v0.8.x to the CI</li>
<li><a
href="c29e21c244"><code>c29e21c</code></a>
Release v0.8.10</li>
<li>See full diff in <a
href="https://github.com/tokio-rs/mio/compare/v0.8.10...v0.8.11">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=mio&package-manager=cargo&previous-version=0.8.10&new-version=0.8.11)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/denoland/deno/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-04 17:04:14 -07:00
David Sherret
902a1137ea
fix(lsp): do not warn about local file "redirects" from .js to .d.ts files (#22670)
The diagnostic was incorrect when importing a `.js` file with a
corresponding `.d.ts` file with sloppy imports because it would say to
change the `.js` extension to `.d.ts`, which is incorrect. We might as
well just hide this diagnostic.
2024-03-04 17:34:31 +00:00
Divy Srivastava
5a28d70e05
fix(node): errno property when command missing (#22691)
Fixes https://github.com/denoland/deno/issues/22604

`remix dev` with Node adapter works:
```
$ ~/gh/littledivy/deno/target/debug/deno task dev
Task dev remix dev --manual

 💿  remix dev

 info  building...
 info  built (619ms)
[remix-serve] http://localhost:3000 (http://192.168.1.24:3000)

GET / 200 - - 3.090 ms
```
2024-03-04 16:35:44 +00:00
David Sherret
6650019935
fix(lsp): ignore code errors when type passes for non-@deno-types reolution (#22682) 2024-03-04 16:10:39 +00:00
Nayeem Rahman
625a9319f6
feat(lsp): include registry url in jsr import hover text (#22676) 2024-03-04 15:48:23 +00:00
cui fliter
d4b3b39cc0
chore: fix typos (#22677) 2024-03-04 14:28:57 +00:00
Divy Srivastava
11db68ce96
feat(publish): add npm: suggestion for esm.sh specifiers (#22343)
![image](https://github.com/denoland/deno/assets/34997667/f32642ed-c109-4519-84c5-6f78e9452703)

Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-03-04 09:55:28 +05:30
David Sherret
942b2aaca5
fix(lsp): output more information on error (#22665) 2024-03-01 21:25:38 -05:00
David Sherret
0973e8e859
fix(lsp): regression - caching in lsp broken when config with imports has comments (#22666)
Caused by https://github.com/denoland/deno/pull/22553

Closes #22664
2024-03-01 21:13:04 -05:00
Nayeem Rahman
15f5f74eb7
feat(unstable/pm): support version contraints in 'deno add' (#22646) 2024-03-01 21:34:13 +00:00
Matt Mastracci
2e4a1fc3e8
fix(cli): force flush output after test unloads (#22660)
Fixes flake in load_unload test
2024-03-01 21:26:57 +00:00
Matt Mastracci
22a4205a68
chore(core): fix zlib_test sanitizer failures (#22659) 2024-03-01 13:48:09 -07:00