summaryrefslogtreecommitdiff
path: root/tests/unit
AgeCommit message (Collapse)Author
2024-09-05feat(check): turn on useUnknownInCatchVariables (#25465)David Sherret
Part of #25162 Closes #11826
2024-09-05chore(tests): reduce the use of `--unstable` flag in test util (#25443)Yoshiya Hinosawa
2024-09-05refactor(ext/cron): align error messages (#25300)Ian Bull
Aligns the error messages in the cron extension to be in-line with the Deno style guide. https://github.com/denoland/deno/issues/25269
2024-09-05BREAKING(fs): remove `Deno.File` (#25447)Asher Gomez
Towards #22079
2024-09-05fix(ext/http): do not set localhost to hostname unnecessarily (#24777)Yoshiya Hinosawa
This commit changes when to cause the hostname substition of `0.0.0.0` -> `localhost`. Currently we substitute `localhost` to the hostname on windows before calling `options.onListen`, which prevents the users to do more advanced thing using hostname string like https://github.com/denoland/std/issues/5558. This PR changes it not to substitute it when the user provide `onListen` callback. closes #24776 unblocks https://github.com/denoland/std/issues/5558
2024-09-05BREAKING(types): soft-remove `Deno.run()` (#25403)Asher Gomez
Towards #22079
2024-09-04fix(windows): Deno.Command - align binary resolution with linux and mac (#25429)David Sherret
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-04BEAKING(buffer): remove `Deno.readAll[Sync]()` (#25386)Asher Gomez
Towards #22079 Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-04chore(tty): soft-remove `Deno.isatty()` (#25410)Asher Gomez
Towards #22079
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-04BREAKING(buffer): remove `Deno.writeAll[Sync]()` (#25407)Asher Gomez
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-04BREAKING(fs): remove `Deno.fstat[Sync]()` (#25351)Asher Gomez
Towards #22079 Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-03BREAKING(io): remove `Deno.copy()` (#25345)Asher Gomez
Towards #22079 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
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-03BREAKING(unstable): drop support for Deno.run.{clearEnv,gid,uid} (#25371)Bartek Iwańczuk
These are unstable options and the APIs is now deprecated. To limit amount of unstable flags we elected to have these APIs removed.
2024-09-03chore(fs): remove `Deno.flock[Sync]()` (#25350)Asher Gomez
Towards #22079
2024-09-03BREAKING(io): remove `Deno.iter[Sync]()` (#25346)Asher Gomez
Towards #22079
2024-09-03BREAKING: remove `Deno.close()` (#25347)Asher Gomez
Towards #22079
2024-08-31chore(fs): remove `Deno.futime[Sync]()` (#25252)Asher Gomez
2024-08-31chore: remove `Deno.resources()` (#25251)Asher Gomez
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-28fix(permissions): disallow any `LD_` or `DYLD_` prefixed env var without ↵David Sherret
full --allow-run permissions (#25271) Follow up to https://github.com/denoland/deno/pull/25221 I looked into what the list was and it was quite extensive, so I think as suggested in https://github.com/denoland/deno/issues/11964#issuecomment-2314585135 we should disallow this for any `LD_` prefixed env var.
2024-08-27chore: ignore lint warning in test (#25234)Marvin Hagemeister
Noticed this when working on another PR. The test code predates the addition of our `no-console` rule.
2024-08-26Reland "test: run unit tests with DENO_FUTURE=1" (#25212)Bartek Iwańczuk
Reverted in https://github.com/denoland/deno/pull/25060
2024-08-26Revert "feat(fetch): accept async iterables for body" (#25207)Luca Casonato
Unfortunately this caused a regression: https://github.com/denoland/deno/issues/25203. Need to do some more upstream spec work to fix this before this can be re-landed. Reverts denoland/deno#24623
2024-08-23fix(ext/crypto): throw DataError for invalid EC key import (#25181)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/20931
2024-08-22fix(urlpattern): fallback to empty string for undefined group values (#25151)Leo Kettmeir
This change was introduced in #24741, but due to the change in behaviour, we will revert it and re-introduce it in 2.0
2024-08-20fix(ext/net): validate port in Deno.{connect,serve,listen} (#24399)seb
Co-authored-by: Will Leach <4619280+melbourne2991@users.noreply.github.com> Co-authored-by: Luca Casonato <hello@lcas.dev> Co-authored-by: David Sherret <dsherret@gmail.com>
2024-08-20chore: enable no-console dlint rule (#25113)David Sherret
2024-08-19chore: improve accessing special file test (#25099)David Sherret
2024-08-19fix: add permission name when accessing a special file errors (#25085)Bedis Nbiba
2024-08-15Revert "test: run unit tests with DENO_FUTURE=1 (#24400)" (#25060)Bartek Iwańczuk
This reverts commit 22a834ff5b4b312b8f91be8991f2b495d49fad2f. Appears this commit might have broken tests on `main`.
2024-08-14test: run unit tests with DENO_FUTURE=1 (#24400)Bartek Iwańczuk
This commit adds another test suite that runs all Deno unit tests with `DENO_FUTURE=1` flag to ensure all APIs are working as expected, once Deno 2 is released. --------- Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-08-08fix(ext/fetch): include TCP src/dst socket info in error messages (#24939)Yusuke Tanaka
This commit makes `fetch` error messages include source and destination TCP socket info i.e. port number and IP address for better debuggability. Closes #24922
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-07fix: `rename` watch event missing (#24893)Marvin Hagemeister
This PR ensures that we forward a `rename` event in our file watcher. The rust lib we use combines that with the `modify` event. This fixes a compatibility issue with Node too, which sends the `rename` event as well. Fixes https://github.com/denoland/deno/issues/24880
2024-08-06feat(fetch): accept async iterables for body (#24623)Leo Kettmeir
Implements https://github.com/whatwg/webidl/pull/1397 Fixes #21454 Closes #24849
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-08-01fix(ext/console): render properties of Intl.Locale (#24827)Leo Kettmeir
Fixes #21271 --------- Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-08-01fix(ext/http): correctly consume response body in `Deno.serve` (#24811)Luca Casonato
Prior to this commit, you could return a `Response` created from a string or Uint8Array multiple times. Now you can't do that anymore.
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-28fix(http): Adjust hostname display for Windows when using 0.0.0.0 (#24698)Yazan AbdAl-Rahman
Fixes #24687 --------- Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
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-24fix(ext/fetch): respect authority from URL (#24705)Bartek Iwańczuk
This commit fixes handling of "authority" in the URL by properly sending "Authorization Basic..." header in `fetch` API. This is a regression from https://github.com/denoland/deno/pull/24593 Fixes https://github.com/denoland/deno/issues/24697 CC @seanmonstar
2024-07-22fix(ext/console): Error Cause Not Inspect-Formatted when printed (#24526)MujahedSafaa
This pull request addresses an issue where the Error.cause property was not formatted correctly when printed using console.log, leading to confusion. solution: Implemented a fix to ensure that Error.cause is formatted properly when printed by console.log, and the fix done by using JSON.stringify This PR fixes https://github.com/denoland/deno/issues/23416 --------- Signed-off-by: MujahedSafaa <168719085+MujahedSafaa@users.noreply.github.com>
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 ```