1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-28 16:20:57 -05:00
Commit graph

12675 commits

Author SHA1 Message Date
Divy Srivastava
f16980bec6 feat(ext/http): abort event when request is cancelled (#26781)
```js
Deno.serve(async (req) => {
  const { promise, resolve } = Promise.withResolvers<void>();

  req.signal.addEventListener("abort", () => {
    resolve();
  });

  await promise;

  return new Response("Ok");
});
```
2024-11-10 09:24:22 +05:30
Divy Srivastava
1363822048 fix(ext/cache): don't panic when creating cache (#26780) 2024-11-10 09:24:22 +05:30
Nathan Whitaker
f61cf7ece2 chore: make commandWithCwdIsAsync test less flaky (#26770) 2024-11-10 09:24:22 +05:30
Divy Srivastava
12c48f9117 feat(ext/http): abort signal when request is cancelled (#26761)
Closes https://github.com/denoland/deno/issues/21653
2024-11-10 09:24:22 +05:30
Nathan Whitaker
6f73b98c82 chore: serve node headers from a test server to fix flaky node-gyp test (#26749)
Fixes https://github.com/denoland/deno/issues/24749

Runs a server that just returns the header tarball and checksum, and
sets the `NODEJS_ORG_MIRROR` env var so that `node-gyp` uses it instead
of `nodejs.org`
2024-11-10 09:24:22 +05:30
Leo Kettmeir
8441aefc8c refactor: use concrete error type for remaining ops (#26746) 2024-11-10 09:24:22 +05:30
Kaveh
3b37162c46 refactor(ext/net): Use hickory dns instead of unmaintained trust-dns (#26741)
This PR replaces the unmaintained and rebranded `trust-dns` to `hickory`
for resolver in `deno_net`.
2024-11-10 09:24:22 +05:30
Satya Rohith
faed1d8e59 fix(node:zlib): gzip & gzipSync should accept ArrayBuffer (#26762)
Closes https://github.com/denoland/deno/issues/26638
2024-11-10 09:24:22 +05:30
snek
6040d69c15 fix(ext/node): better inspector support (#26471)
implement local inspector

future changes:
- wire up InspectorServer to enable open/close/url
- wire up connectToMainThread

Fixes https://github.com/denoland/deno/issues/25004
2024-11-10 09:24:22 +05:30
Bartek Iwańczuk
6b7493572a fix(fmt): don't use self-closing tags in HTML (#26754)
Closes https://github.com/denoland/deno/issues/26748
2024-11-10 09:24:22 +05:30
Nayeem Rahman
9f6fb5ef95 feat(lsp): auto-import completions from byonm dependencies (#26680) 2024-11-10 09:24:22 +05:30
denobot
78a799b494
2.0.5 (#26753)
Bumped versions for 2.0.5

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-11-06 01:19:05 +01:00
Divy Srivastava
bf92cd03b8
chore: upgrade publish workflow to ubuntu 24 (#26731) 2024-11-06 00:36:27 +01:00
Divy Srivastava
f8e3915406
fix: panic_hook hangs without procfs (#26732)
Fixes https://github.com/denoland/deno/issues/26701

Ref
69e491353f
2024-11-06 00:36:27 +01:00
Mohammad Sulaiman
384306b8ca
chore: deprecate run itests (#26444) 2024-11-06 00:36:27 +01:00
Nathan Whitaker
6565f9f782
fix(install): handle invalid function error, and fallback to junctions regardless of the error (#26730)
Fixes #26116.

Handle the new error and treat is as lacking permission to make
symlinks, but also to make this more robust, just always fall back to
junctions no matter what the actual error is. Instead, warn if the error
isn't one we've handled, but go on to attempt creating the junction
2024-11-06 00:36:27 +01:00
Divy Srivastava
82ee63f78b
fix: op_run_microtasks crash (#26718)
Upgrade deno_core to 0.318.0

Fixes https://github.com/denoland/deno_core/issues/951
Fixes https://github.com/denoland/deno/issues/26468
2024-11-06 00:36:26 +01:00
Nathan Whitaker
09c9649bee
fix(add): better error message when adding package that only has pre-release versions (#26724)
Fixes https://github.com/denoland/deno/issues/26597

A small refactor as well to reduce some code duplication
2024-11-06 00:36:26 +01:00
Nathan Whitaker
062214abf5
chore: fix serve_watch_all test (#26725)
It's been failing a ton lately, it looks like the test is just
incorrectly using TS syntax in a JS file
https://github.com/denoland/deno/actions/runs/11672972415/job/32502710624?pr=26724#step:43:2791

I'm not really sure how this ever passes
2024-11-06 00:36:26 +01:00
Bartek Iwańczuk
0a2d60544b
ci: use self-hosted mac arm runner for building on tags (#26727) 2024-11-06 00:36:26 +01:00
Bartek Iwańczuk
69879d8767
fix(workspace): support wildcard packages (#26568)
This commit adds support for wildcard packages in `workspace`
configuration option in `deno.json`. This is now supported:
```
{
  "workspace": [
    "./packages/*"
  ]
}
```

Closes https://github.com/denoland/deno/issues/25783
2024-11-06 00:36:26 +01:00
Nathan Whitaker
331f101279
fix(ext/node): add findSourceMap to the default export of node:module (#26720)
Next.js 15.0.2 tries to use this and errors out
2024-11-06 00:36:25 +01:00
David Sherret
ee09d24ad2
fix(fmt): do not panic for jsx ignore container followed by jsx text (#26723) 2024-11-06 00:36:25 +01:00
Nayeem Rahman
7fc74b2b23
fix(lsp): scope attribution for lazily loaded assets (#26699) 2024-11-06 00:36:25 +01:00
Scott Twiname
f6a0ba7609
fix(types): missing import permission on PermissionOptionsObject (#26627) 2024-11-06 00:36:25 +01:00
Bartek Iwańczuk
a119ead8a0
fix(fmt): ignore file directive for YAML files (#26717)
Closes https://github.com/denoland/deno/issues/26712

Support `# deno-fmt-ignore-file` directive for YAML files.

Also added tests for single line ignores.
2024-11-06 00:36:25 +01:00
Leo Kettmeir
1bdecc8c73
refactor(runtime/permissions): use concrete error types (#26464) 2024-11-06 00:36:25 +01:00
Kenta Moriuchi
3bded14144
chore: update dlint to v0.68.0 for internal (#26711) 2024-11-06 00:36:24 +01:00
Nayeem Rahman
2be26f8ee3
perf(lsp): don't walk coverage directory (#26715) 2024-11-06 00:36:24 +01:00
Nathan Whitaker
01c4a2e989
fix(add): only add npm deps to package.json if it's at least as close as deno.json (#26683)
Fixes https://github.com/denoland/deno/issues/26653
2024-11-06 00:36:24 +01:00
David Sherret
c5887708a9
fix: improved support for cjs and cts modules (#26558)
* cts support
* better cjs/cts type checking
* deno compile cjs/cts support
* More efficient detect cjs (going towards stabilization)
* Determination of whether .js, .ts, .jsx, or .tsx is cjs or esm is only
done after loading
* Support `import x = require(...);`

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-11-06 00:36:24 +01:00
Divy Srivastava
2e70376451
chore: upgrade to rust 1.82 and LLVM 19 (#26615)
Upgrade to rust 1.82 and LLVM 19 . Removes one webusb test because
`requestAdapter` not working on new ubuntu 24 runners
2024-11-06 00:36:24 +01:00
Nathan Whitaker
124b28ab63
fix(cli): set npm_config_user_agent when running npm packages or tasks (#26639)
Fixes #25342.

Still not sure on the exact user agent to set (should it include
`node`?).

After this PR, here's the state of running some `create-*` packages
(just ones I could think of off the top of my head):

| package                  | prints/runs/suggests deno install | notes |
| ---------------- | ------------- | ------ |
| `create-next-app` |  | falls back to npm, needs a PR
([code](c32e280209/packages/create-next-app/helpers/get-pkg-manager.ts (L3)))
| `sv create` |  | uses `package-manager-detector`, needs a PR
([code](https://github.com/antfu-collective/package-manager-detector/tree/main))
| `create-qwik` |  | runs `deno install` but suggests `deno start`
which doesn't work (should be `deno task start` or `deno run start`)
| `create-astro` |  | runs `deno install` but suggests `npm run dev`
later in output, probably needs a PR
| `nuxi init` |  | deno not an option in dialog, needs a PR
([code](f04e2e8944/src/commands/init.ts (L96-L102)))
| `create-react-app` |  | uses npm
| `ng new` (`@angular/cli`) |  | uses npm
| `create-vite` |  | suggests working deno commands 🎉 
| `create-solid` |   | suggests npm commands, needs PR

It's possible that fixing `package-manager-detector` or other packages
might make some of these just work, but haven't looked too carefully at
each
2024-11-06 00:36:24 +01:00
Nathan Whitaker
8c70b6151a
fix(node): Implement os.userInfo properly, add missing toPrimitive (#24702)
Fixes the implementation of `os.userInfo`, and adds a missing
`toPrimitive` for `tmpdir`. This allows us to enable the corresponding
node_compat test.
2024-11-06 00:36:23 +01:00
Nathan Whitaker
68cee70838
fix(ext/node): resolve exports even if parent module filename isn't present (#26553)
Fixes https://github.com/denoland/deno/issues/26505

I'm not exactly sure how this case comes about (I tried to write tests
for it but couldn't manage to reproduce it), but what happens is the
parent filename ends up null, and we bail out of resolving the specifier
in package exports.

I've checked, and in node the parent filename is also null (so that's
not a bug on our part), but node continues to resolve even in that case.
So this PR should match node's behavior more closely than we currently
do.
2024-11-06 00:36:23 +01:00
Nathan Whitaker
d284d1c6a8
fix(ext/node): convert errors from fs.readFile/fs.readFileSync to node format (#26632)
Fixes the original issue reported in #26404. storybook runs into other
errors after this PR (the new errors will be fixed in other PRs).

Some code used by a dependency of storybook does a [string comparison on
the error
message](ce30b2be34/node-src/lib/getConfiguration.ts (L88-L92))
thrown here to check for a file not found error.
2024-11-06 00:36:23 +01:00
David Sherret
919a96dc37
fix: surface package.json location on dep parse failure (#26665)
Related: https://github.com/denoland/deno/issues/26653
2024-11-06 00:36:23 +01:00
Taku Amano
12c8b80010
fix(coverage): exclude comment lines from coverage reports (#25939) 2024-11-06 00:36:23 +01:00
Pig Fang
8d2012ab95
fix(fmt): fix several HTML and components issues (#26654)
Fix #26245 
Close #26324 
Fix #26508 
Fix #26540 
Fix #26562

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-11-06 00:36:23 +01:00
Nayeem Rahman
e1ddb7a473
fix(lsp): include unstable features from editor settings (#26655) 2024-11-06 00:36:22 +01:00
Divy Srivastava
13612e7112
fix: clamp smi in fast calls by default (#26506)
Fixes https://github.com/denoland/deno/issues/26480

Ref
d2945fb65b
2024-11-06 00:36:22 +01:00
David Sherret
b9cec00c47
fix: remove permission check in op_require_node_module_paths (#26645) 2024-11-06 00:36:22 +01:00
Nathan Whitaker
0e2a7315b7
fix(ext/node): return this from http.Server.ref/unref() (#26647)
Fixes https://github.com/denoland/deno/issues/26642
2024-11-06 00:36:22 +01:00
HasanAlrimawi
2acbe13668
fix(serve): support serve hmr (#26078)
This PR addresses issue #25600 

Changes:
Updated `fn has_hmr` to check `serve` subcommand and return its hmr
value if found, in order to run the worker in serve mode with
hmr_runner. Thus the hmr event can be dispatched upon changes on the
file served.
2024-11-06 00:36:22 +01:00
McSneaky
f51f192345
docs(console): Update docstrings for install and uninstall (#26623)
When running `deno -h` then `install` and `uninstall` scripts had
description since deno 1 times :)
2024-11-06 00:36:21 +01:00
denobot
b7c282d2f8
2.0.4 (#26630)
Bumped versions for 2.0.4

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-10-30 01:15:35 +01:00
HasanAlrimawi
1019184a18
fix: support watch flag to enable watching other files than the main module on serve subcommand (#26622)
Closes #26618
2024-10-30 00:16:13 +01:00
Yoshiya Hinosawa
36b7f9d9ed
Revert "fix(ext/node): fix dns.lookup result ordering (#26264)" (#26621)
This reverts commit d59599fc18.

Closes #26588
2024-10-30 00:16:13 +01:00
Volker Schlecht
6f6879327c
fix(ext/napi): export dynamic symbols list for {Free,Open}BSD (#26605)
The two BSD ports are reusing the Linux code here.
2024-10-30 00:16:13 +01:00
Volker Schlecht
99febad5e2
fix(ext/node): compatibility with {Free,Open}BSD (#26604)
Ports for both BSDs contain patches to the same effect.
See
https://github.com/freebsd/freebsd-ports/blob/main/www/deno/files/patch-ext_node_ops_fs.rs
and
8644910cae/lang/deno/patches/patch-ext_node_ops_fs_rs
2024-10-30 00:16:12 +01:00