0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-04 09:57:11 -05:00
Commit graph

13242 commits

Author SHA1 Message Date
denobot
b2e5efd382
2.2.2 (#28290)
Bumped versions for 2.2.2

Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2025-02-25 12:47:58 +05:30
Leo Kettmeir
9cc181cbe1 fix(http): generate OtelInfo only when otel metrics are enabled (#28286) 2025-02-25 11:03:28 +05:30
Marvin Hagemeister
b696362efc fix(lint): plugins ignored when no rust rule active (#28269)
When all Rust-based rules where filtered out we were bailing out early
instead of checking if there are plugin rules we need to run. This meant
we errored out with a "No lint rules to run" message, even though plugin
rules were active.

Fixes https://github.com/denoland/deno/issues/28267
2025-02-25 11:03:28 +05:30
David Sherret
34e0a65b39 fix(config): allow specifying absolute path for patch and fix panic with exports in package.json (#28279)
Closes #28250
Closes #26031
2025-02-25 11:03:28 +05:30
Marvin Hagemeister
7e07546e4e fix(lint): update deno_lint (#28271)
Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2025-02-25 11:03:28 +05:30
Bartek Iwańczuk
1d0462b0b9 fix(lint): give access to SourceCode in 'deno test' (#28278)
Closes https://github.com/denoland/deno/issues/28273
2025-02-25 11:03:28 +05:30
Leo Kettmeir
ae08ad825f fix: add info suggestion for unsafely-ignore-certificate-errors and add --help=full (#28203)
For #27865
2025-02-25 11:03:28 +05:30
Kenta Moriuchi
ab10cfec22 refactor(cli): update JSON schemas versions (#28252) 2025-02-25 11:03:28 +05:30
Divy Srivastava
1fe76c7c9e fix(ext/node): descriptive sqlite error messages (#28272)
Fixes https://github.com/denoland/deno/issues/28259
2025-02-25 11:03:28 +05:30
Nayeem Rahman
63a7f4bccf fix(fmt): support "--ext vto" and "--ext njk" (#28262) 2025-02-25 11:03:28 +05:30
Luca Casonato
294b13c227 fix(lint): don't recurse infinitely for large ASTs (#28265)
We previously failed to lint `./cli/tsc/00_typescript.js` with plugins,
because every "next" node would cause a new stack frame to be added.
2025-02-25 11:03:28 +05:30
Kenta Moriuchi
ca9a70223a fix(cli): add compilerOptions.lib examples to config-file.v1.json (#28226)
closes #28222
2025-02-25 11:03:28 +05:30
David Sherret
c482eba406 chore: mark worker_large_output as flaky (#28241) 2025-02-25 11:03:28 +05:30
Nathan Whitaker
d5e3d26df8 perf(install): only read initialized file if we care about the tags (#28242)
Speeds up the caching part of this arbitrary `"nodeModulesDir": "auto"`
project by about 22%

We write the tags associated with a given npm package to the
`.initialized` file, so that byonm can correctly resolve tags. When
setting up the node modules dir, we read that file to see if we need to
update the tags.

If we don't have any tags associated with the package though, we can
just check for existence (which is a fair bit faster than trying to
`open` + `read` a file).

```
❯ hyperfine --warmup 3 "deno check src/**/*.ts" "../deno/target/release-lite/deno check src/**/*.ts"
Benchmark 1: deno check src/**/*.ts
  Time (mean ± σ):     369.9 ms ±   5.5 ms    [User: 286.9 ms, System: 128.9 ms]
  Range (min … max):   361.7 ms … 377.7 ms    10 runs

Benchmark 2: ../deno/target/release-lite/deno check src/**/*.ts
  Time (mean ± σ):     303.5 ms ±   5.9 ms    [User: 210.9 ms, System: 124.5 ms]
  Range (min … max):   292.7 ms … 315.0 ms    10 runs

Summary
  ../deno/target/release-lite/deno check src/**/*.ts ran
    1.22 ± 0.03 times faster than deno check src/**/*.ts
```
2025-02-25 11:03:28 +05:30
David Sherret
ffb4a08fd8 chore: mark inspector break tests as flaky (#28239) 2025-02-25 11:03:28 +05:30
David Sherret
ab6b120a61 fix(lsp): create cacheable ExportInfoMap per language service (#28240)
This needs to be created per language service so that it can provide the
current program correctly.
2025-02-25 11:03:28 +05:30
Yoshiya Hinosawa
537ffcefb5 refactor(coverage): simplify CoverageReporter trait (#28219) 2025-02-25 11:03:28 +05:30
David Sherret
8a0403827e refactor(resolver/node): use deno_path_util::is_relative_specifier (#28238)
Should be slightly faster too because it no longer heap allocates.
2025-02-25 11:03:28 +05:30
David Sherret
617f9c659b refactor: separate publish from pm subcommands (#28237) 2025-02-25 11:03:28 +05:30
David Sherret
b3c3c9cbca refactor(cli): extract TypeChecker to separate module (#28235)
Extracts it out of tools/check.rs to type_checker.rs which makes more
sense because this is used across sub commands.
2025-02-25 11:03:28 +05:30
Nathan Whitaker
7e279d9751 fix(install): don't error on unknown media types in install (#28234)
Fixes https://github.com/denoland/deno/issues/28223

This is kind of an ugly fix, but it works, and I think is the easiest
way to handle the fact that when caching the module graph we might
encounter imports that won't actually error at runtime (for instance in
files that will be bundled).
2025-02-25 11:03:28 +05:30
Nayeem Rahman
0d8028cca3 fix(lsp): close server on exit notification (#28232) 2025-02-25 11:03:28 +05:30
David Sherret
8aaf9f8d1a fix(check): regression - implicit jsxImportSource was not resolving (#28228) 2025-02-25 11:03:28 +05:30
Marvin Hagemeister
cca55d3140 fix(unstable): lint plugin :exit called at wrong time (#28229)
The `:exit` selectors were called at the wrong time during visiting.

They need to be called when going upwards and a node and all its
children have been fully visited. Instead we called it when the node +
all its sibling were visited which is wrong.

Fixes https://github.com/denoland/deno/issues/28227
2025-02-25 11:03:28 +05:30
Leo Kettmeir
d3f6d66084 chore: remove unused dependencies (#28204) 2025-02-25 11:03:27 +05:30
Divy Srivastava
9b6fc66486 fix(ext/node): decipherIv() range error on invalid final block length (#28215)
Fixes https://github.com/denoland/deno/issues/28208
2025-02-25 11:03:27 +05:30
denobot
6057bc30da
2.2.1 (#28212)
Bumped versions for 2.2.1

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2025-02-21 00:41:27 +01:00
David Sherret
4523ddd8d7
fix(publish): support jsx/tsx (#28188) 2025-02-20 22:39:51 +00:00
Nathan Whitaker
73c4ce33da
chore: fix more flakey otel tests (#28211)
There are a couple others that flake for the same reason, that I missed
2025-02-20 14:24:48 -08:00
Nathan Whitaker
ce4e788430
fix(outdated): hint to use --latest if new versions are available in outdated --update (#28190) 2025-02-20 23:24:07 +01:00
Nathan Whitaker
e5de22b0b5
fix(coverage): exclude scripts with invalid URLs from raw coverage output (#28210)
Fixes https://github.com/denoland/deno/issues/28206.

Basically if you execute a script with `node:vm`, this produces a
"script" with the file name `evalmachine.<anonymous>`, which ends up
producing coverage like

```json
{
  "scriptId": "319",
  "url": "evalmachine.<anonymous>",
  "functions": [
    {
      "functionName": "",
      "ranges": [{ "startOffset": 0, "endOffset": 18, "count": 1 }],
      "isBlockCoverage": true
    }
  ]
}
```

We assume that the `url` field here (the specifier of the script) is a
valid URL, and so we error out when processing that coverage.

There are two potential fixes: either don't write the coverage files for
those scripts, or ignore the errors when we process the data. I went
with the former here.
2025-02-20 23:23:43 +01:00
Phil Hawksworth
b20f98ccf7
docs: add examples for SubtleCrypto (#28068)
Adds examples for subtleCrypto
(https://docs.deno.com/api/web/~/SubtleCrypto)

- generateKey
- importKey
- exportKey
- sign
- verify
- digest
- encrypt
- decrypt
- deriveBits
- deriveKey
- wrapKey
- unwrapKey

---------

Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-02-20 22:57:54 +01:00
Jo Franchetti
5b24b67a6e
docs(canvas): Add examples to createImageBitmap jsdocs (#28055)
Adding examples to the JSDocs for createImageBitmap and
formatting/linting file

---------

Co-authored-by: Phil Hawksworth <phil@deno.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-02-20 21:24:18 +00:00
Nathan Whitaker
3fdde62ba2
chore: fix otel test flakiness (#28209)
The bucket counts can vary run to run. Also don't hardcode the port
2025-02-20 21:06:42 +00:00
Jo Franchetti
c6c2fa8cec
docs(console): update console documentation (#28196)
Signed-off-by: Jo Franchetti <jofranchetti@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-02-20 21:50:57 +01:00
Jo Franchetti
ae8481a2f7
docs(web): update docs for globalThis.caches (#28061)
Co-authored-by: Phil Hawksworth <phil@deno.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-02-20 20:37:23 +00:00
David Sherret
03e4234962
fix(check): remove instability in loading lib files (#28202)
Also reduces memory usage.

Closes #28201
2025-02-20 12:41:58 -05:00
Divy Srivastava
c1276d8fa0
fix(ext/node): rewrite SQLite named parameter handing (#28197)
Allow bare named params and handle invalid param name. Also adds
`StatementSync#setAllowBareNamedParameters`

Fixes https://github.com/denoland/deno/issues/28183
2025-02-20 18:34:34 +05:30
Divy Srivastava
664d50fab8
fix(ext/node): Fix handling of sqlite large integers (#28193)
Use `v8::Number` instead of `v8::Integer` to handle > i32::MAX.

Fixes https://github.com/denoland/deno/issues/28187
2025-02-20 16:32:46 +05:30
Leo Kettmeir
64abe902e5
fix: don't panic when running with // as a filepath (#28189)
Fixes #28128
2025-02-19 19:29:11 -08:00
Nathan Whitaker
08f5e797b6
fix(check/lsp): fall back to @types/* packages if npm package doesn't have types (#28185)
Fixes https://github.com/denoland/deno/issues/27569.
Fixes https://github.com/denoland/deno/issues/27215.

This PR makes it so type resolution falls back to looking for definitely
typed packages (`@types/foo`) if a given NPM package does not contain
type declarations.

One complication is choosing _which_ version of the `@types/*` package
to use, if the project depends on multiple versions. The heuristic here
is to try to match the major and minor versions, falling back to the
latest version. So if you have
```
@types/foo: 0.1.0, 0.2.0, 3.1.0, 3.1.2, 4.0.0
foo: 3.1.0
```
we would choose `@types/foo@3.1.2` when resolving types for `foo`.

---

Note that this only uses `@types/` packages if you _already_ depend on
them. So a follow up to this PR could be to add a diagnostic and
quickfix to install `@types/foo` if we don't find types for `foo`.
2025-02-19 23:55:06 +00:00
David Sherret
3da3fe8f7b
fix: better jsx workspace config resolution (#28186)
* https://github.com/denoland/deno_config/pull/158
2025-02-19 18:50:44 -05:00
David Sherret
743fc4a261
refactor(publish): create ModuleContentProvider (#28177)
Adds a `ModuleContentProvider`. Will use this in a future PR to do more
than specifier unfurling (JSX support).
2025-02-19 14:58:10 -05:00
Kenta Moriuchi
297f85cbb6
chore: update dlint to 0.73.0 for CI (#28169) 2025-02-19 14:07:01 +00:00
Bartek Iwańczuk
e4b8fa5f4f
fix: move extension file declarations to cli/tsc/dts (#28180)
This commits moves all `.d.ts` files from `ext/*` to `cli/tsc/dts`.

Due to TSC snapshot removal, `cargo publish` is now erroring out,
unable to find the declaration files. These files were moved to
"cli/tsc/dts", because it's much easier than keeping them in 
extension directories, while still providing them compressed 
or uncompressed depending on the build type.
2025-02-19 02:53:21 +01:00
Bartek Iwańczuk
e03c990493
fix(ext/cache): add missing Cargo feature (#28178) 2025-02-19 00:29:01 +00:00
denobot
2968816863
2.2.0 (#28175)
Bumped versions for 2.2.0

---------

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-02-18 23:12:17 +00:00
Leo Kettmeir
bf79971c95
feat(http): add otel metrics (#28034)
Signed-off-by: Leo Kettmeir <crowlkats@toaxl.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
2025-02-18 14:19:52 -08:00
David Sherret
f62fc9e81f
fix(check): npm resolution errors to tsc diagnostics (#28174)
Closes https://github.com/denoland/deno/issues/27188
2025-02-18 21:44:49 +00:00
David Sherret
3747d2759a
feat: support XDG_CACHE_HOME for deno dir on macos (#28173)
* https://github.com/denoland/deno_cache_dir/pull/73
2025-02-18 14:56:07 -05:00