1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-22 23:19:55 -05:00
Commit graph

1392 commits

Author SHA1 Message Date
Nathan Whitaker
d373e2fb93 fix(outdated): support updating dependencies in external import maps (#27339)
Fixes #27331.

The support for it was already in `outdated`, but forgot to wire up the
updating part

Needs #27337
2025-01-09 15:19:08 -05:00
Nathan Whitaker
457f64a6c6 fix(lockfile): include dependencies listed in external import map in lockfile (#27337) 2025-01-09 15:19:08 -05:00
Nayeem Rahman
cb36d8a606 fix(lsp): sql and component file formatting (#27350) 2025-01-09 15:19:08 -05:00
Kenta Moriuchi
a9748b2228 feat(ext/web): add [[ErrorData]] slot to DOMException (#27342) 2025-01-09 15:19:07 -05:00
Satya Rohith
793869173e fix(ext/node): support createConnection option in node:http.request() (#25470)
This commit changes "node:http" module to add support
for the "createConnection" option when the "request()"
API is called.


Closes https://github.com/denoland/deno/issues/19507

---------

Signed-off-by: Yoshiya Hinosawa <stibium121@gmail.com>
Signed-off-by: Satya Rohith <me@satyarohith.com>
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: crowlkats <crowlkats@toaxl.com>
2025-01-09 15:19:07 -05:00
David Sherret
40866e3aa4 fix(npm): search node_modules folder for package matching npm specifier (#27345) 2025-01-09 15:19:07 -05:00
David Sherret
8381d4a950 fix(compile): analyze modules in directory specified in --include (#27296)
I ended up changing the file system implementation to determine
its root directory as the last step of building it instead of being the
first step which makes it much more reliable.
2025-01-09 15:19:06 -05:00
snek
26266045d4 refactor(unstable): otel configuration (#27333)
split up otel config into user configurable and runtime configurable
parts. user configurable part is now set via env vars parsed according
to the otel spec. otel is now enabled via `OTEL_DENO=true`, and
`--unstable-otel` only acts as a guard.

Fixes: https://github.com/denoland/deno/issues/27273
2025-01-09 15:19:06 -05:00
David Sherret
f2034e8daa fix(compile): output contents of embedded file system (#27302) 2025-01-09 15:19:06 -05:00
Nathan Whitaker
5279eac4f4
feat(unstable): support caching npm dependencies only as they're needed (#27300)
Currently deno eagerly caches all npm packages in the workspace's npm
resolution. So, for instance, running a file `foo.ts` that imports
`npm:chalk` will also install all dependencies listed in `package.json`
and all `npm` dependencies listed in the lockfile.

This PR refactors things to give more control over when and what npm
packages are automatically cached while building the module graph.

After this PR, by default the current behavior is unchanged _except_ for
`deno install --entrypoint`, which will only cache npm packages used by
the given entrypoint. For the other subcommands, this behavior can be
enabled with `--unstable-npm-lazy-caching`


Fixes #25782.

---------

Signed-off-by: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
2024-12-11 03:37:34 +01:00
Bartek Iwańczuk
340bcb1ba5
fix(outdated): error when there are no config files (#27306)
This commit changes "deno outdated" subcommand to
error out if run in a directory that has no config file 
(including parent directories). This matches
"pnpm" behavior.

Also added tests for filtering that yields no results,
to ensure that it exists cleanly, that also matches "pnpm"
behavior.

Closes https://github.com/denoland/deno/issues/27287

---------

Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-12-11 03:37:34 +01:00
ingalless
1e7babaeca
chore(tests): Deprecate remaining usages of itest in check tests (#26962)
This PR progresses #22907 by deprecating the usage of `itest` in
`tests/integration/check_tests.rs`
2024-12-11 03:37:34 +01:00
Bartek Iwańczuk
16c2fd8317
fix(outdated): respect --quiet flag for hints (#27317) 2024-12-11 03:37:34 +01:00
Mohammad Sulaiman
e24d9531c1
fix: replace the @deno-types with @ts-types (#27310) 2024-12-11 03:37:33 +01:00
Bartek Iwańczuk
da81fb4a5b
fix(outdated): show a suggestion for updating (#27304)
Show command to update dependencies based on the output
of "deno outdated" command.

Closes https://github.com/denoland/deno/issues/27256
2024-12-11 03:37:33 +01:00
David Sherret
71ee3d7f38
fix: do not error when subpath has an @ symbol (#27290)
Closes https://github.com/denoland/deno/issues/27243
2024-12-11 03:37:32 +01:00
Yoshiya Hinosawa
b48022130c
test(ext/node): remove flaky node:dgram compat test case (#27249) 2024-12-11 03:37:32 +01:00
Yoshiya Hinosawa
c4166b5ddf
fix(ext/node): accept file descriptor in fs.readFile(Sync) (#27252)
closes #27123
2024-12-11 03:37:31 +01:00
Yoshiya Hinosawa
8534e76495
chore: add script to check remaining node compat cases (#27122) 2024-12-11 03:37:31 +01:00
Nathan Whitaker
79aca5c2ca
fix(install): use locked version of jsr package when fetching exports (#27237)
Fixes #27193.
2024-12-05 23:03:56 +01:00
Marvin Hagemeister
5e809f9720
fix(task): --recursive option not working (#27183)
We didn't handle the `--recursive` option properly in `deno task`. This
PR addresses that.

Fixes https://github.com/denoland/deno/issues/27174
2024-12-05 23:03:55 +01:00
Yoshiya Hinosawa
327f11f329
test(ext/node): fix flaky node/http2.createServer() test (#27208) 2024-12-05 23:03:55 +01:00
Luca Casonato
b732750041
chore: update hickory dns crates (#27137) 2024-12-05 23:03:55 +01:00
ud2
e41bd026bc
fix(unstable/temporal): respect locale in Duration.prototype.toLocaleString (#27000)
Adds a temporary polyfill for `Duration.prototype.toLocaleString()`
that will be removed once native support in V8 lands.
2024-12-05 23:03:55 +01:00
Marvin Hagemeister
2a0658ad20
fix(node/worker_threads): data url not encoded properly with eval (#27184)
When using the `eval` option on Node's `worker_threads` the code is
passed as a `data:` URL. But we didn't encode the actual code for that,
which lead to syntax errors when including characters not allowed in an
URL.

Fixes a part of https://github.com/denoland/deno/issues/27167
2024-12-05 23:03:55 +01:00
David Sherret
a901bbcd10
fix(task): kill descendants when killing task process on Windows (#27163) 2024-12-05 23:03:54 +01:00
David Sherret
a34839e9d0
fix: improve auto-imports for npm packages (#27224)
Improves auto-imports when using `"nodeModulesDir": "auto"`
2024-12-05 23:03:54 +01:00
snek
f32c836520
fix(unstable): otel context with multiple keys (#27230)
`SafeMap` treats its argument as an object with a "length" and index
properties, rather than a generic iterator, so every time we cloned it,
it was dropping all the data.
2024-12-05 23:03:54 +01:00
Marvin Hagemeister
36d8d739f5
fix(task): don't panic with filter on missing task argument (#27180)
We were panicing when running `deno task --filter foo` without a task
argument.

Fixes https://github.com/denoland/deno/issues/27177
2024-12-05 23:03:54 +01:00
Yoshiya Hinosawa
e05a305e4c
test: add node compat test cases (#27134)
This PR enables node compat test cases found passing by using the tool
added in #27122

The percentage of passing test case increases from 16.16% to 30.43% by
this change.
2024-12-05 23:03:53 +01:00
Yoshiya Hinosawa
feba98ab4b
test(ext/node): reduce race condition in test case (#27207) 2024-12-05 23:03:53 +01:00
David Sherret
66f5d4b7e6
refactor: remove CliNpmRegistryApi (#27222)
Extracts more code out of the CLI.
2024-12-05 23:03:53 +01:00
Marvin Hagemeister
1bf665ddcf
fix(task): only pass args to root task (#27213)
When we run `deno task` with args like `deno task foo arg` the argument
should only be passed to the root task, not to its dependencies.

Fixes https://github.com/denoland/deno/issues/27206
2024-12-05 23:03:53 +01:00
Marvin Hagemeister
91d61df296
fix(node/fs): support recursive option in readdir (#27179)
We didn't support the `recursive` option of
`fs.readdir()/fs.readdirSync()`.

Fixes https://github.com/denoland/deno/issues/27175
2024-12-05 23:03:53 +01:00
Ian Bull
770af2dc73
refactor(ext/web): align error messages (#25871)
Aligns the error messages in the ext/web folder to be in-line with the
Deno style guide.
2024-12-05 23:03:53 +01:00
David Sherret
a3a8cc4129
chore: fix cjs_with_deps test to use a temp dir (#27199)
It was creating a node_modules directory.
2024-12-05 23:03:52 +01:00
Bartek Iwańczuk
b86c68dbdd
fix(fmt): stable formatting of HTML files with JS (#27164)
Closes https://github.com/denoland/deno/issues/26407
Closes https://github.com/denoland/deno/issues/26763
Closes https://github.com/denoland/deno/issues/26560
Closes https://github.com/denoland/deno/issues/26744
Closes https://github.com/denoland/deno/issues/27030
2024-12-05 23:03:52 +01:00
snek
dac0226882
feat(unstable): add metrics to otel (#27143)
Refs: https://github.com/denoland/deno/issues/26852

Initial support for exporting metrics.

Co-authored-by: Luca Casonato <hello@lcas.dev>
2024-12-05 23:03:52 +01:00
Mathias Lykkegaard Lorenzen
7513e661bc
chore: export variables from node compat tools script (#27189) 2024-12-05 23:03:51 +01:00
Bartek Iwańczuk
6cac2ab63f
fix: support workspace:^ and workspace:~ version constraints (#27096)
This commit adds support for understanding "workpace:^"
and "workspace:~" version constraints in npm/pnpm workspaces.

This is done by upgrading various crates to their latest versions.

Closes https://github.com/denoland/deno/issues/26726

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
2024-12-05 23:03:51 +01:00
David Sherret
3678eff0cb
fix(task): forward signals to spawned sub-processes on unix (#27141)
Closes https://github.com/denoland/deno/issues/18445
2024-12-05 23:03:51 +01:00
Ian Bull
aa100070a4
refactor(ext/fs): align error messages (#25414)
Aligns the error messages in the ext/fs folder to be in-line with the
Deno style guide.
2024-12-05 23:03:51 +01:00
Marvin Hagemeister
da64aa9e6d
fix(node/timers): error when passing id to clearTimeout/clearInterval (#27130)
As pointed out in https://github.com/denoland/deno/issues/27126 we used
a variable which could potentially be of type `number` instead of the
`Timeout` class instance. Ensure that we're always setting `_destroyed`
on the class instead instead.

Fixes https://github.com/denoland/deno/issues/27126
2024-11-28 15:47:29 +01:00
Luca Casonato
4a0bbd0a71
fix: support bun specifiers in JSR publish (#24588)
Fixes https://github.com/denoland/deno/issues/26989

---------

Co-authored-by: Nathan Whitaker <nathan@deno.com>
2024-11-28 15:47:29 +01:00
Divy Srivastava
52bcd35d9d
fix(ext/node): tls.connect socket upgrades (#27125)
Fixes https://github.com/denoland/deno/issues/27087
Fixes https://github.com/denoland/deno/issues/26685
Fixes https://github.com/denoland/deno/issues/26660
2024-11-28 15:47:29 +01:00
Nathan Whitaker
27757e83e0
fix(info): resolve bare specifier pointing to workspace member (#27020)
Fixes https://github.com/denoland/deno/issues/26721

Previously, we were applying only the import map, which would result in
`@scope/foo` expanding to (e.g.) `jsr:@scope/foo@1.0.0`. Since that
didn't exist it would error and fail to resolve.
2024-11-28 15:47:29 +01:00
David Sherret
cfd13b0f87
chore: fix lint step due to node compat test changes (#27111)
Seems due to merging this:
https://github.com/denoland/deno/actions/runs/12052779514/job/33606893423
2024-11-28 15:47:28 +01:00
Marvin Hagemeister
9edce4db77
fix(node/http): casing ignored in ServerResponse.hasHeader() (#27105)
We didn't respect casing when checking if a HTTP header is present in
Node's `ServerResponse.hasHeader()`. This lead to us returning incorrect
results when the header was present. Koa assumed that the `Content-Type`
header wasn't present when it actually was and defaulted to a different
`Content-Type` value.

Fixes https://github.com/denoland/deno/issues/27101
2024-11-28 15:47:28 +01:00
Bartek Iwańczuk
a24ce0ec93
fix(task): strip ansi codes and control chars when printing tasks (#27100) 2024-11-28 15:47:28 +01:00
Yoshiya Hinosawa
f64e176d69
test(ext/node): enable parallel/test-fs-promises-file-handle-stat.js (#27074) 2024-11-28 15:47:28 +01:00