0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-15 01:57:09 -05:00
Commit graph

10957 commits

Author SHA1 Message Date
Bartek Iwańczuk
3bb357ef31
refactor(ext/node): worker_threads.isMainThread setup (#22785)
This commit changes how we figure out if we're running on main
thread in `node:worker_threads` module. Instead of relying on quirky
"magic variable" for a name to check if we're on main thread, we are
now explicitly passing this information during bootstrapping of the
runtime. As a side effect, `WorkerOptions.name` is more useful
and matches what Node.js does more closely (though not fully).

Towards https://github.com/denoland/deno/issues/22783
2024-03-14 10:11:28 -07:00
Satya Rohith
59e23a9c68
refactor(ext/node): use worker ops directly in worker_threads (#22794) 2024-03-14 10:11:28 -07:00
denobot
6d062cf0c7
1.41.2 (#22791)
Bumped versions for 1.41.2

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-03-08 13:02:21 +05:30
David Sherret
630ef77ada fix(publish): include explicitly specified .gitignored files and directories (#22790)
This allows explicitly overriding a .gitignore by specifying files and
directories in "include". This does not apply to globs in an include as
files matching those will still be gitignored. Additionally,
individually gitignored files within an included directory will still be
ignored.
2024-03-08 12:38:25 +05:30
David Sherret
4c51fb0741 fix(publish): do not include .gitignore (#22789)
Regression from https://github.com/denoland/deno/pull/22720
2024-03-08 12:38:25 +05:30
Matt Mastracci
4830f677a6 feat(ext/node): ref/unref on workers (#22778)
Implements ref/unref on worker to fix part of #22629
2024-03-08 12:38:25 +05:30
David Sherret
9ee96caaf0 fix(publish): make include and exclude work (#22720)
1. Stops `deno publish` using some custom include/exclude behaviour from
other sub commands
2. Takes ancestor directories into account when resolving gitignore
3. Backards compatible change that adds ability to unexclude an exclude
by using a negated glob at a more specific level for all sub commands
(see https://github.com/denoland/deno_config/pull/44).
2024-03-08 12:38:24 +05:30
Bartek Iwańczuk
b27d0d1b33 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 12:38:24 +05:30
Bartek Iwańczuk
b03bb16cc9 chore: upgrade deno_core (#22782) 2024-03-08 12:38:24 +05:30
Bartek Iwańczuk
338fe7e5b2 fix(publish): reland error if there are uncommitted changes (#22613) (#22632)
Reverted in https://github.com/denoland/deno/pull/22625
2024-03-08 12:38:24 +05:30
Divy Srivastava
8d2df1d504 perf: hard link npm cache (#22773) 2024-03-08 12:38:24 +05:30
Nayeem Rahman
94cf92a98f fix(lsp): don't apply renames to remote modules (#22765) 2024-03-08 12:38:24 +05:30
Matt Mastracci
8fda1b8a9c fix(cli): limit test parallelism on Windows to avoid pipe error (#22776)
One last attempt to fix the parallelism issue on Windows.
2024-03-08 12:38:24 +05:30
Matt Mastracci
77dee10f3a 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-08 12:38:24 +05:30
David Sherret
5788063efb fix(publish): properly display graph validation errors (#22775)
The graph validation errors were displaying cryptically during publish.
This fixes that.
2024-03-08 12:38:24 +05:30
Luca Casonato
b36458721c 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-08 12:38:24 +05:30
Bartek Iwańczuk
2ac62a9fde 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-08 12:38:24 +05:30
Satya Rohith
2b1e16231b fix(ext/node): http2.createServer (#22708) 2024-03-08 12:38:24 +05:30
Leo Kettmeir
1a217c97fb feat(node/util): styleText (#22758)
Implements https://github.com/nodejs/node/pull/51850
2024-03-08 12:38:24 +05:30
Nathan Whitaker
1064977f8a 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-08 12:38:24 +05:30
Bartek Iwańczuk
02426287a7 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-08 12:38:24 +05:30
Matt Mastracci
394cc989cd chore(tests): fix process_test for sure (#22756) 2024-03-08 12:38:24 +05:30
Divy Srivastava
f2c1edae7d fix(ext/node): add default methods to fs.StatsBase (#22750) 2024-03-08 12:38:24 +05:30
Asher Gomez
cc7d522510 fix: point to correct WPT runner file (#22753)
We were previously pointing to the incorrect runner file.
2024-03-08 12:38:23 +05:30
Divy Srivastava
5b186f532f fix(ext/node): strip --enable-source-maps from argv (#22743)
Fixes https://github.com/denoland/deno/issues/21750
2024-03-08 12:38:23 +05:30
Nayeem Rahman
1d909edc33 feat(unstable/pm): support npm packages in 'deno add' (#22715) 2024-03-08 12:38:23 +05:30
Bartek Iwańczuk
37a804dd33 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-08 12:38:23 +05:30
Divy Srivastava
b66d11a624 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-08 12:38:23 +05:30
Divy Srivastava
5faa115f04 fix(publish): permissionless dry-run in GHA (#22679)
Fixes https://github.com/denoland/deno/issues/22658
2024-03-08 12:38:23 +05:30
Divy Srivastava
bb356216f7 chore: remove debug console table log in node/http2 (#22741) 2024-03-08 12:38:23 +05:30
Divy Srivastava
41b565349b 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-08 12:38:23 +05:30
Matt Mastracci
5edba2aae6 chore(ext/node): ignore non-working process test (#22723)
Filed https://github.com/denoland/deno/issues/22724 for actual issue
2024-03-08 12:38:23 +05:30
Divy Srivastava
3792472223 chore: Reuse linux symbols list on openbsd and freebsd (#22706) 2024-03-08 12:38:23 +05:30
Matt Mastracci
48c37cb381 fix(cli): improve logging on failed named pipe (#22726) 2024-03-08 12:38:22 +05:30
Matt Mastracci
7313fbf34c chore(cli): remove problematic snapshot test (#22722)
This test crashes often on windows.
2024-03-08 12:38:22 +05:30
David Sherret
639eeb1c14 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-08 12:38:22 +05:30
Matt Mastracci
8296217c9c 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-08 12:38:22 +05:30
Aapo Alasuutari
7a2af23d32 chore(tests): Remove vestiges of cli/tests folder (#22712) 2024-03-08 12:38:22 +05:30
David Sherret
931a2b7219 refactor: move deno json functionality to args module (#22710) 2024-03-08 12:38:22 +05:30
Marvin Hagemeister
fcdb431cae 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-08 12:38:21 +05:30
Matt Mastracci
8f359181e6 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-08 12:38:21 +05:30
Matt Mastracci
2b9c879146 chore(ext/node): make process_test more reliable (#22703) 2024-03-08 12:38:21 +05:30
Matt Mastracci
613936c7c7 chore(tests): update flaky timer test (#22701)
This test was flaky after landing the new timer rewrite.
2024-03-08 12:38:21 +05:30
Bartek Iwańczuk
064d9121ff chore: upgrade deno_core (#22699)
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-03-08 12:38:21 +05:30
Asher Gomez
3f1d571218 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-08 12:38:21 +05:30
dependabot[bot]
0e67b10390 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-08 12:38:21 +05:30
David Sherret
107237d8ef 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-08 12:38:21 +05:30
Divy Srivastava
1e8183a8de 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-08 12:38:21 +05:30
David Sherret
8196de3f7a fix(lsp): ignore code errors when type passes for non-@deno-types reolution (#22682) 2024-03-08 12:38:20 +05:30
Nayeem Rahman
6aee866d2b feat(lsp): include registry url in jsr import hover text (#22676) 2024-03-08 12:38:20 +05:30