summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-09-20test: make specs::test::doc_success less flaky (#25765)Bartek Iwańczuk
Missed this line in https://github.com/denoland/deno/pull/25726
2024-09-20fix(ext/crypto): reject empty usages in SubtleCrypto#importKey (#25759)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/19051
2024-09-20chore: update tools allow-run list (#25756)Divy Srivastava
2024-09-20chore: update sui to 0.3.1 (#25758)Divy Srivastava
2024-09-20fix(coverage): ignore urls from doc testing (#25736)Yoshiya Hinosawa
2024-09-19fix: cjs resolution cases (#25739)snek
Fixes cjs modules being loaded as esm.
2024-09-19fix(node): Don't error out if we fail to statically analyze CJS re-export ↵Nathan Whitaker
(#25748) Fixes rsbuild running in deno. You can look at the test to see what was failing, the gist is that we were trying to statically analyze the re-exports of a CJS script, and if we couldn't find the source for the re-exported file we would fail. Instead, we should just treat these as if they were too dynamic to analyze, and let it fail (or succeed) at runtime. This aligns with node's behavior.
2024-09-20ci: increase timeout to 180 minutes (#25750)Bartek Iwańczuk
Mac aarch64 is failing with timeout after 150 minutes :( we'll address it after Deno 2 is released but for now just increase the timeout.
2024-09-19fix(cli): Only set allow net flag for deno serve if not already allowed all ↵Nathan Whitaker
(#25743) Fixes #25740
2024-09-19v2.0.0-rc.4 (#25728)Bartek Iwańczuk
2024-09-19ci: revert changed to canary uploads (#25733)Bartek Iwańczuk
All these changes made CI fail consistently with random exit code 1 after successful upload.
2024-09-19fix(ext/node): support x509 certificates in `createPublicKey` (#25731)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/25681
2024-09-19fix(ext/console): more precision in console.time (#25723)Luca Casonato
2024-09-19ci: fix 'promote_to_release' script (#25727)Bartek Iwańczuk
This CI action was using wrong variable to create release directory.
2024-09-19test: make specs::test::doc_success less flaky (#25726)Bartek Iwańczuk
On Windows some of these steps were taking more than 1s
2024-09-19ci: Fix uploading latest canary version (#25725)Bartek Iwańczuk
2024-09-19fix: don't include extensionless files in file collection for lint & fmt by ↵Leo Kettmeir
default (#25721) When using the `ext` flag, it will still attempt formatting them with the provided extension
2024-09-19fix(ext/fetch): fix lowercase http_proxy classified as https (#25686)Sean McArthur
While investigating something else, I noticed this typo which treated `http_proxy` as `Filter::Https`.
2024-09-19refactor(ext/kv): align error messages (#25500)Ian Bull
Towards https://github.com/denoland/deno/issues/25269
2024-09-19refactor(ext/webidl): align error messages (#25625)Ian Bull
Towards https://github.com/denoland/deno/issues/25269
2024-09-19fix(cli): handle edge cases around `export`s in doc tests and default export ↵Yusuke Tanaka
(#25720) This commit fixes issues with the pseudo test file generation logic, namely: - `export`s declared in snippets - auto import insertion for `default export` ## Case 1: `export`s declared in snippets In the previous implementation, `export`s declared in snippets were moved to the top level of the module in the generated pseudo test file. This is required because `export` must be at the top level. This becomes a problem if such a `export` has a body, containing a reference to a local variable. Suppose we extract this snippet from JSDoc: ```ts const logger = createLogger("my-awesome-module"); export function sum(a: number, b: number): number { logger.debug("sum called"); return a + b; } ``` This gets converted into the following invalid code (note that `export function sum` is moved to the top level, but its body references `logger` variable which can't be referenced from here): ```ts export function sum(a: number, b: number): number { logger.debug("sum called"); return a + b; } Deno.test("./base.ts$1-7.ts", async () => { const logger = createLogger("my-awesome-module"); }); ``` To resolve this issue, this commit adds a logic to remove the `export` keyword, allowing the exported items to stay in the `Deno.test` block scope, like so: ```ts Deno.test("./base.ts$1-7.ts", async () => { const logger = createLogger("my-awesome-module"); function sum(a: number, b: number): number { logger.debug("sum called"); return a + b; } }); ``` ## Case 2: default export Previously `default export foo` was not captured by the export collector, so auto import insertion didn't work for this case. To put it concretely, the following code snippet didn't work when run with `deno test --doc` because `import foo from "file:///path/to/mod.ts"` didn't get inserted automatically: ```ts /** * ```ts * console.log(foo); * ``` * * @module */ const foo = 42; export default foo; ``` This commit fixes this issue and the above example works fine. --- Fixes #25718
2024-09-19refactor(ext/webgpu): align error messages (#25719)Ian Bull
Aligns the error messages in the ext/webgpu folder to be in-line with the Deno style guide. https://github.com/denoland/deno/issues/25269
2024-09-19fix(ext/node): don't throw error for unsupported signal binding on windows ↵Yoshiya Hinosawa
(#25699)
2024-09-18refactor(ext): align error messages (#25496)Ian Bull
Aligns the error messages in the ext/http and a few messages in the ext/fetch folder to be in-line with the Deno style guide. This change-set also removes some unnecessary checks in the 00_serve.ts. These options were recently removed, so it doesn't make sense to check for them anymore. https://github.com/denoland/deno/issues/25269
2024-09-19ci: bump fetch depth to unblock canary uploads (#25716)Bartek Iwańczuk
Current mac arm canaries are failing to upload because the existing latest commit hash is more that 5 commits behind and it's not in the git history.
2024-09-18v2.0.0-rc.3 (#25704)Bartek Iwańczuk
2024-09-18fix: update nodeModulesDir config JSON schema (#25653)Marvin Hagemeister
Ref https://github.com/denoland/deno/issues/25380
2024-09-18ci: fix uploading canary (#25715)Bartek Iwańczuk
If a newer version was available the script was exiting with code 1.
2024-09-18feat: suggest `deno install --entrypoint` instead of `deno cache` (#25228)Asher Gomez
Hides `deno cache` from `--help` output. --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-09-18feat: default to TS for file extension and support ext flag in more ↵Leo Kettmeir
scenarios (#25472) Closes #11220 Currently does lint, fmt, and repl
2024-09-18fix(ext/http): gracefully handle Response.error responses (#25712)Luca Casonato
Fixes #14371
2024-09-18feat(ext/node): add rootCertificates to node:tls (#25707)Luca Casonato
Closes https://github.com/denoland/deno/issues/25604 Signed-off-by: Satya Rohith <me@satyarohith.com> Co-authored-by: Satya Rohith <me@satyarohith.com>
2024-09-18feat: improve warnings for deprecations and lifecycle script for npm ↵Bartek Iwańczuk
packages (#25694) This commit improves warning messages for deprecated npm packages and packages that rely on lifecycle script.
2024-09-18feat(lint): add `no-process-global` lint rule (#25709)Divy Srivastava
Closes https://github.com/denoland/deno/issues/25679
2024-09-18fix: error on unsupported compiler options (#25714)Marvin Hagemeister
Update the config schema to error when adding unsupported `compilerOptions`. Fixes https://github.com/denoland/deno/issues/25696
2024-09-18feat: require jsr prefix for `deno install` and `deno add` (#25698)Leo Kettmeir
2024-09-18fix(flags): don't treat empty run command as task subcommand (#25708)Leo Kettmeir
2024-09-18fix: remove --allow-run warning when using deno without args or subcommand ↵HasanAlrimawi
(#25684) Closes #25676 --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2024-09-18Revert "feat(fmt): sort type-only named import/exports last" (#25705)David Sherret
Reverts #25690 This was not an issue with the ts compiler anymore. Discussion here: https://github.com/dprint/dprint-plugin-typescript/pull/664#issuecomment-2357000053
2024-09-18fix: do not panic running invalid file specifier (#25530)Yazan AbdAl-Rahman
Co-authored-by: Bedis Nbiba <bedisnbiba@gmail.com>
2024-09-18feat(check): turn on noImplicitOverride (#25695)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/11836 Ref https://github.com/denoland/deno/issues/25162
2024-09-18tests: fix upgrade canary test (#25706)Luca Casonato
2024-09-18tests: re-enable upgrade tests (#25680)Luca Casonato
2024-09-18tests: re-enable WebGPU tests on macOS aarch64 (#25702)Luca Casonato
2024-09-17fix(dts): stabilize `fetch` declaration for use with `Deno.HttpClient` (#25683)Yusuke Tanaka
This commit stabilizes the `fetch` function declaration for use with `Deno.HttpClient` and moves it from `lib.deno.unstable.d.ts` to `lib.deno.shared_globals.d.ts`. `Deno.HttpClient` was stabilized in #25569, but the associated override declaration for `fetch` is still marked as experimental. This should also be stabilized now and moved to a different d.ts file.
2024-09-17feat(cli): evaluate code snippets in JSDoc and markdown (#25220)Yusuke Tanaka
This commit lets `deno test --doc` command actually evaluate code snippets in JSDoc and markdown files. ## How it works 1. Extract code snippets from JSDoc or code fences 2. Convert them into pseudo files by wrapping them in `Deno.test(...)` 3. Register the pseudo files as in-memory files 4. Run type-check and evaluation We apply some magic at the step 2 - let's say we have the following file named `mod.ts` as an input: ````ts /** * ```ts * import { assertEquals } from "jsr:@std/assert/equals"; * * assertEquals(add(1, 2), 3); * ``` */ export function add(a: number, b: number) { return a + b; } ```` This is virtually transformed into: ```ts import { assertEquals } from "jsr:@std/assert/equals"; import { add } from "files:///path/to/mod.ts"; Deno.test("mod.ts$2-7.ts", async () => { assertEquals(add(1, 2), 3); }); ``` Note that a new import statement is inserted here to make `add` function available. In a nutshell, all items exported from `mod.ts` become available in the generated pseudo file with this automatic import insertion. The intention behind this design is that, from library user's standpoint, it should be very obvious that this `add` function is what this example code is attached to. Also, if there is an explicit import statement like `import { add } from "./mod.ts"`, this import path `./mod.ts` is not helpful for doc readers because they will need to import it in a different way. The automatic import insertion has some edge cases, in particular where there is a local variable in a snippet with the same name as one of the exported items. This case is addressed by employing swc's scope analysis (see test cases for more details). ## "type-checking only" mode stays around This change will likely impact a lot of existing doc tests in the ecosystem because some doc tests rely on the fact that they are not evaluated - some cause side effects if executed, some throw errors at runtime although they do pass the type check, etc. To help those tests gradually transition to the ones runnable with the new `deno test --doc`, we will keep providing the ability to run type-checking only via `deno check --doc`. Additionally there is a `--doc-only` option added to the `check` subcommand too, which is useful when you want to type-check on code snippets in markdown files, as normal `deno check` command doesn't accept markdown. ## Demo https://github.com/user-attachments/assets/47e9af73-d16e-472d-b09e-1853b9e8f5ce --- Closes #4716
2024-09-18chore: bump `deno_lint` to 0.66.0 (#25697)Asher Gomez
2024-09-18feat: update warning message for --allow-run with no list (#25693)Bartek Iwańczuk
Ref https://github.com/denoland/deno/pull/25215#discussion_r1762064605
2024-09-17refactor(ext/websocket): align error messages (#25622)Ian Bull
Aligns the error messages in the ext/websocket folder to be in-line with the Deno style guide. https://github.com/denoland/deno/issues/25269
2024-09-17fix(lsp): properly resolve jsxImportSource for caching (#25688)Nayeem Rahman