summaryrefslogtreecommitdiff
path: root/tests/testdata
AgeCommit message (Collapse)Author
2024-09-05feat: Add a hint on error about 'Relative import path ... not prefixed with ↵Bartek Iwańczuk
...' (#25430) Running a file like: ``` import "@std/dotenv/load"; ``` Without a mapping in `imports` field of `deno.json` or `dependencies` of `package.json` will now error out with a hint: ``` error: Relative import path "@std/dotenv/load" not prefixed with / or ./ or ../ hint: Try running `deno add @std/dotenv/load` at [WILDCARD]bare_specifier_without_import/main.ts:1:8 ``` Closes https://github.com/denoland/deno/issues/24699 --------- Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-09-04fix(regression): do not expose resolved path in Deno.Command permission ↵David Sherret
denied error (#25434) Regression from https://github.com/denoland/deno/pull/25370
2024-09-05BREAKING(types): soft-remove `Deno.run()` (#25403)Asher Gomez
Towards #22079
2024-09-04BREAKING(config): make supported compilerOptions an allow list (#25432)David Sherret
Deno has been using a deny list, which doesn't make sense because a lot of these options don't even work. Closes #25363
2024-09-04fix: lock down allow-run permissions more (#25370)David Sherret
`--allow-run` even with an allow list has essentially been `--allow-all`... this locks it down more. 1. Resolves allow list for `--allow-run=` on startup to an absolute path, then uses these paths when evaluating if a command can execute. Also, adds these paths to `--deny-write` 1. Resolves the environment (cwd and env vars) before evaluating permissions and before executing a command. Then uses this environment to evaluate the permissions and then evaluate the command.
2024-09-04feat(cli): give access to `process` global everywhere (#25291)Luca Casonato
2024-09-04refactor(cli/js): align error messages (#25406)Ian Bull
Aligns the error messages in the cli/js folder to be in-line with the Deno style guide.
2024-09-04refactor(ext/fetch): align error messages (#25374)Ian Bull
Aligns the error messages in the ext/fetch folder to be in-line with the Deno style guide. https://github.com/denoland/deno/issues/25269
2024-09-03chore: deprecate eval itests (#25382)HasanAlrimawi
This PR serves as a part of #22907 . --------- Signed-off-by: David Sherret <dsherret@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-09-03test: fix info::info_import_map test (#25389)Bartek Iwańczuk
esm.sh provided a fix for `window` not existing in Deno anymore.
2024-09-03BREAKING(permissions): remove --allow-hrtime (#25367)Luca Casonato
Remove `--allow-hrtime` and `--deny-hrtime`. We are doing this because it is already possible to get access to high resolution timers through workers and SharedArrayBuffer. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-09-03fix: make some warnings more standard (#25324)David Sherret
2024-09-03BREAKING: remove `deno vendor` (#25343)Asher Gomez
2024-09-02BREAKING: remove `--trace-ops` (#25344)Asher Gomez
Towards #22079
2024-09-02BREAKING: remove `deno bundle` (#25339)Asher Gomez
`deno bundle` now produces: ``` error: ⚠️ `deno bundle` was removed in Deno 2. See the Deno 1.x to 2.x Migration Guide for migration instructions: https://docs.deno.com/runtime/manual/advanced/migrate_deprecations ``` `deno bundle --help` now produces: ``` ⚠️ `deno bundle` was removed in Deno 2. See the Deno 1.x to 2.x Migration Guide for migration instructions: https://docs.deno.com/runtime/manual/advanced/migrate_deprecations Usage: deno bundle [OPTIONS] Options: -q, --quiet Suppress diagnostic output --unstable Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable ```
2024-09-02BREAKING: remove `--jobs` flag (#25336)Asher Gomez
2024-08-31chore: cleanup code for unstable tests (#25330)Bartek Iwańczuk
Towards https://github.com/denoland/deno/issues/25241 Removes code for tests of unstable APIs that were stabilized with Deno 2.0.0-rc.0.
2024-08-30fix: upgrade deno_ast 0.42 (#25313)David Sherret
2024-08-30BREAKING: `DENO_FUTURE=1` by default, or welcome to Deno 2.0 (#25213)Bartek Iwańczuk
This commit effectively turns Deno into Deno 2.0. This is done by forcing `DENO_FUTURE=1` env var, that was available in the past few months to try Deno 2 changes. This commit contains several breaking changes scheduled for Deno 2: - all deprecated JavaScript APIs are not available any more, mostly `Deno.*` APIs - `window` global is removed - FFI, WebGPU and FS APIs are now stable and don't require `--unstable-*` flags - import assertions are no longer supported - "bring your own node modules" is enabled by default This is the first commit in a series that are scheduled before the Deno 2 release. Follow up work is tracked in https://github.com/denoland/deno/issues/25241. --------- Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com> Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com> Co-authored-by: Nathan Whitaker <nathan@deno.com>
2024-08-29fix: upgrade deno_core to 0.307.0 (#25287)snek
- fix for https://github.com/denoland/deno/issues/25160 - changes needed to land https://github.com/denoland/deno/pull/25140
2024-08-29feat: deprecate import assertions (#25281)David Sherret
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-08-29test: replace usage of `window` with `globalThis` (#25284)Bartek Iwańczuk
Fixes several tests blocking https://github.com/denoland/deno/pull/25213 by replacing `window` global that is gone in Deno 2 with `globalThis`. Also adjusted a few tests using deprecated `rid` field.
2024-08-28feat: improve lockfile v4 to store normalized version constraints and be ↵David Sherret
more terse (#25247) Stores normalized version constraints in the lockfile, which will improve reproducibility and will fix a bug with duplicate specifiers ending up in the lockfile. Also, gets rid of some duplicate data in the specifiers area of the lockfile.
2024-08-28feat: remove `--lock-write` flag (#25214)Bartek Iwańczuk
This commit remove `--lock-write` that was deprecated in v1.45 release. Closes https://github.com/denoland/deno/issues/24167. --------- Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-08-26feat: lockfile v4 by default (#25165)David Sherret
This won't be fully stabilized until 2.0 is released.
2024-08-26fix(bench): Fix table column alignments and NO_COLOR=1 (#25190)Armaan Salam
Fix table layout for `deno bench` command with and without color (`NO_COLOR=1`). Fixes issue in #25156
2024-08-21fix: warn about import assertions when using typescript (#25135)David Sherret
1. On emit, checks for the prescence of import assertions. 1. Warns and doesn't store the parsed source in the emit cache in this case.
2024-08-20fix(cli): update permission prompt message for compiled binaries (#24081)Yazan AbdAl-Rahman
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-08-16fix(ext/node): improve shelljs compat with managed npm execution (#24912)Yoshiya Hinosawa
This change improves the Node.js compatibility in managed npm resolution mode by disabling the discovery of `node_modules` when the main specifier is inside of `DENO_DIR`. closes #22732 closes #24589
2024-08-14feat(serve): Opt-in parallelism for `deno serve` (#24920)Nathan Whitaker
Adds a `parallel` flag to `deno serve`. When present, we spawn multiple workers to parallelize serving requests. ```bash deno serve --parallel main.ts ``` Currently on linux we use `SO_REUSEPORT` and rely on the fact that the kernel will distribute connections in a round-robin manner. On mac and windows, we sort of emulate this by cloning the underlying file descriptor and passing a handle to each worker. The connections will not be guaranteed to be fairly distributed (and in practice almost certainly won't be), but the distribution is still spread enough to provide a significant performance increase. --- (Run on an Macbook Pro with an M3 Max, serving `deno.com` baseline:: ``` ❯ wrk -d 30s -c 125 --latency http://127.0.0.1:8000 Running 30s test @ http://127.0.0.1:8000 2 threads and 125 connections Thread Stats Avg Stdev Max +/- Stdev Latency 239.78ms 13.56ms 330.54ms 79.12% Req/Sec 258.58 35.56 360.00 70.64% Latency Distribution 50% 236.72ms 75% 248.46ms 90% 256.84ms 99% 268.23ms 15458 requests in 30.02s, 2.47GB read Requests/sec: 514.89 Transfer/sec: 84.33MB ``` this PR (`with --parallel` flag) ``` ❯ wrk -d 30s -c 125 --latency http://127.0.0.1:8000 Running 30s test @ http://127.0.0.1:8000 2 threads and 125 connections Thread Stats Avg Stdev Max +/- Stdev Latency 117.40ms 142.84ms 590.45ms 79.07% Req/Sec 1.33k 175.19 1.77k 69.00% Latency Distribution 50% 22.34ms 75% 223.67ms 90% 357.32ms 99% 460.50ms 79636 requests in 30.07s, 12.74GB read Requests/sec: 2647.96 Transfer/sec: 433.71MB ```
2024-08-14feat(fmt): support HTML, Svelte, Vue, Astro and Angular (#25019)Pig Fang
This commit adds capability to format HTML, Svelte, Vue, Astro and Angular files. "--unstable-html" is required to format HTML files, and "--unstable-component" flag is needed to format other formats. These can also be specified in the config file. Close #25015
2024-08-09feat(fmt): support CSS, SCSS, Sass and Less (#24870)Pig Fang
This PR integrates [Malva](https://github.com/g-plane/malva) into `deno fmt`, which introduces the ability to format CSS, SCSS, Sass and Less files. On Linux x64 6.10, this PR increases about 800KiB: ``` ❯ wc -c target/release/deno 125168728 target/release/deno ❯ wc -c target/release/deno 124349456 target/release/deno ```
2024-08-08feat(cli): Add --env-file as alternative to --env (#24555)Birk Skyum
2024-08-07fix(ext/fetch): include URL and error details on fetch failures (#24910)Yusuke Tanaka
This commit improves error messages that `fetch` generates on failure. Fixes #24835
2024-08-02feat(fmt): support YAML (#24717)Pig Fang
2024-08-01fix(ext/webgpu): assign missing `constants` property of shader about ↵Hajime-san
`GPUDevice.createRenderPipeline[Async]` (#24803) fixes https://github.com/denoland/deno/issues/24287
2024-07-31feat: upgrade V8 to 12.8 (#24693)snek
- upgrade to v8 12.8 - optimizes DataView bigint methods - fixes global interceptors - includes CPED methods for ALS - fix global resolution - makes global resolution consistent using host_defined_options. originally a separate patch but due to the global interceptor bug it needs to be included in this pr for all tests to pass.
2024-07-26fix(publish): workspace included license file had incorrect path (#24747)David Sherret
Also fixes the issue where we say a package was successfully published before it wasn't. Bug in https://github.com/denoland/deno/pull/24714
2024-07-25chore: update to `std@2024.07.19` (#24715)Asher Gomez
2024-07-25chore: use `@std` prefix for internal module specifiers (#24543)Asher Gomez
This change aims to replace all relative import specifiers targeted at `tests/util/std` with mapped ones (using a `deno.json` file). Towards updating the `std` git submodule.
2024-07-24perf: update deno_doc (#24700)Leo Kettmeir
Ref https://github.com/denoland/deno_doc/pull/616
2024-07-24fix(node): better detection for when to surface node resolution errors (#24653)David Sherret
2024-07-23Revert "fix(cli): add NAPI support in standalone mode (#24642)" (#24682)Bartek Iwańczuk
This reverts commit 4e8f5875bc59ddfb84c8b0b26071a547b49823a9. Reverting because, it caused a failure during v1.45.3 publish: https://github.com/denoland/deno/actions/runs/10048730693/job/27773718095 CC @Mutefish0
2024-07-22fix(publish): warn about missing license file (#24677)David Sherret
Part of https://github.com/denoland/deno/issues/24676 , but just a warning for now.
2024-07-21fix(cli): add NAPI support in standalone mode (#24642)Ivancing
Currently, importing Node-Addons modules in a standalone binary results in a `missing symbol called` error (https://github.com/denoland/deno/issues/24614). Because the NAPI symbols are not exported in this mode. This PR should fix the issue.
2024-07-19fix(ext/node): do not expose `self` global in node (#24637)Yoshiya Hinosawa
closes #23727
2024-07-18Reland "refactor(fetch): reimplement fetch with hyper instead of reqwest" ↵Bartek Iwańczuk
(#24593) Originally landed in https://github.com/denoland/deno/commit/f6fd6619e708a515831f707438368d81b0c9aa56. Reverted in https://github.com/denoland/deno/pull/24574. This reland contains a fix that sends "Accept: */*" header for calls made from "FileFetcher". Absence of this header made downloading source code from JSR broken. This is tested by ensuring this header is present in the test server that servers JSR packages. --------- Co-authored-by: Sean McArthur <sean@seanmonstar.com>
2024-07-13Revert "refactor(fetch): reimplement fetch with hyper instead of reqwest ↵Ryan Dahl
(#24237)" (#24574) This reverts commit f6fd6619e708a515831f707438368d81b0c9aa56. I'm seeing a difference between canary and 1.45.2. In `deno-docs/reference_gen` I can't download dax when running `deno task types` ``` ~/src/deno-docs/reference_gen# deno upgrade --canary Looking up latest canary version Found latest version f6fd6619e708a515831f707438368d81b0c9aa56 Downloading https://dl.deno.land/canary/f6fd6619e708a515831f707438368d81b0c9aa56/deno-aarch64-apple-darwin.zip Deno is upgrading to version f6fd6619e708a515831f707438368d81b0c9aa56 Archive: /var/folders/9v/kys6gqns6kl8nksyn4l1f9v40000gn/T/.tmpb5lDnq/deno.zip inflating: deno Upgraded successfully ~/src/deno-docs/reference_gen# deno -v deno 1.45.2+f6fd661 ~/src/deno-docs/reference_gen# rm -rf /Users/ry/Library/Caches/deno ~/src/deno-docs/reference_gen# deno task types Task types deno task types:deno && deno task types:node Task types:deno deno run --allow-read --allow-write --allow-run --allow-env --allow-sys deno-docs.ts error: JSR package manifest for '@david/dax' failed to load. expected value at line 1 column 1 at file:///Users/ry/src/deno-docs/reference_gen/deno-docs.ts:2:15 ~/src/deno-docs/reference_gen# deno upgrade --version 1.45.2 Downloading https://github.com/denoland/deno/releases/download/v1.45.2/deno-aarch64-apple-darwin.zip Deno is upgrading to version 1.45.2 Archive: /var/folders/9v/kys6gqns6kl8nksyn4l1f9v40000gn/T/.tmp3R7uhF/deno.zip inflating: deno Upgraded successfully ~/src/deno-docs/reference_gen# rm -rf /Users/ry/Library/Caches/deno ~/src/deno-docs/reference_gen# deno task types Task types deno task types:deno && deno task types:node Task types:deno deno run --allow-read --allow-write --allow-run --allow-env --allow-sys deno-docs.ts Task types:node deno run --allow-read --allow-write=. --allow-env --allow-sys node-docs.ts ```
2024-07-13refactor(fetch): reimplement fetch with hyper instead of reqwest (#24237)Sean McArthur
This commit re-implements `ext/fetch` and all dependent crates using `hyper` and `hyper-util`, instead of `reqwest`. The reasoning is that we want to have greater control and access to low level `hyper` APIs when implementing `fetch` API as well as `node:http` module. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-07-10feat: deprecate `deno vendor` (#22183)Asher Gomez
This commit deprecates `deno vendor` subcommand in favor of using `--vendor` flag or `"vendor": true` setting in the config file. The subcommand is still available (until Deno 2) but is hidden from the help output. Closes #20584 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>