0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-16 02:26:08 -05:00
Commit graph

10943 commits

Author SHA1 Message Date
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
cui fliter
6b7f5263c4 chore: fix typos (#22677) 2024-03-08 12:38:20 +05:30
Divy Srivastava
fcfd68b7d8 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-08 12:38:20 +05:30
David Sherret
0960254797 fix(lsp): output more information on error (#22665) 2024-03-08 12:38:20 +05:30
David Sherret
f1e50cd08a 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-08 12:38:20 +05:30
Nayeem Rahman
b1730682c5 feat(unstable/pm): support version contraints in 'deno add' (#22646) 2024-03-08 12:38:20 +05:30
Matt Mastracci
95cbc0b55c fix(cli): force flush output after test unloads (#22660)
Fixes flake in load_unload test
2024-03-08 12:38:20 +05:30
Matt Mastracci
749da3b9e5 chore(core): fix zlib_test sanitizer failures (#22659) 2024-03-08 12:38:20 +05:30
Matt Mastracci
a0a1e00409 perf(cli): use new deno_core timers (#22569)
Improves #19100 

Fixes #20356

Replaces #20428



Changes made in deno_core to support this:

 - [x] Errors must be handled in setTimeout callbacks
 - [x] Microtask ordering is not-quite-right
 - [x] Timer cancellation must be checked right before dispatch
 - [x] Timer sanitizer
 - [x] Move high-res timer to deno_core
 - [x] Timers need opcall tracing
2024-03-08 12:38:19 +05:30
David Sherret
cc60a3481f ci: actually fix workflow permissions (#22644)
Also adds a lint to ensure this file is kept up to date.
2024-03-08 12:38:19 +05:30
David Sherret
99cd918902 fix(unstable/publish): repect --no-check in no-slow-types (#22653) 2024-03-08 12:38:19 +05:30
denobot
8ccb9e9545
1.41.1 (#22642)
Co-authored-by: dsherret <dsherret@users.noreply.github.com>
2024-02-29 19:25:44 -05:00
Igor Zinkovsky
dc16c996dd
fix(ext/node) add node http methods (#22630)
fixes #22627

This PR fixes a node compat issue that is preventing `serverless-http`
and `serverless-express` npm modules from working with Deno. These
modules are useful for running apps on AWS Lambda (and other serverless
infra).

---------

Signed-off-by: Igor Zinkovsky <igor@deno.com>
2024-02-29 17:56:04 -05:00
David Sherret
627c49c9d8
ci: fix workflow permissions (#22640) 2024-02-29 22:04:29 +00:00
Bartek Iwańczuk
ea3651a1ac
fix(publish): disable provenance if not in GHA (#22638)
The condition was wrong
2024-02-29 21:19:30 +00:00