summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-11-20reviewHEADmainBartek Iwańczuk
2024-11-19Merge branch 'main' into mainBartek Iwańczuk
2024-11-19feat(compile): ability to embed directory in executable (#26939)David Sherret
2024-11-20Merge branch 'main' into haturatu/mainBartek Iwańczuk
2024-11-20dedup, rename, fix testsBartek Iwańczuk
2024-11-19feat(compile): ability to embed local data files (#26934)David Sherret
``` > deno compile --allow-read=. --include data-file.txt main.js ``` This only applies to files on the filesystem. For remote modules, that's going to have to wait for `import ... from "./data.txt" with { "type": "bytes" }` or whatever it will be.
2024-11-19feat(fmt): support SQL (#26750)João Baptista
This commit adds support for .sql files in "deno fmt" subcommand. Closes: https://github.com/denoland/deno/issues/25024 --------- Signed-off-by: m4rc3l05 <15786310+M4RC3L05@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-11-19refactor: update deno_doc, use prismjs, remove internal reference html ↵Leo Kettmeir
generation logic (#26885)
2024-11-20Merge branch 'denoland:main' into mainhaturau
2024-11-19fix(node): handle resolving ".//<something>" in npm packages (#26920)David Sherret
The issue was this package had an import like: `".//index.js"` and we resolved that as specified, but node normalizes it to `"./index.js"` so we have to copy node.
2024-11-19feat(task): dependencies (#26467)David Sherret
This commit adds support for "dependencies" in `deno task` subcommand: ```jsonc { "tasks": { "build": "deno run -RW build.ts", "generate": "deno run -RW generate.ts", "serve": { "command": "deno run -RN server.ts", "dependencies": ["build", "generate"] } } } ``` Executing `deno task serve` will first execute `build` and `generate` tasks (in parallel) and once both complete the `serve` task will be executed. Number of tasks run in parallel is equal to the no of cores on the machine, and respects `DENO_JOBS` env var if one is specified. Part of https://github.com/denoland/deno/issues/26462 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2024-11-19feat(ext/node): perf_hooks.monitorEventLoopDelay() (#26905)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/20961 Depends on https://github.com/denoland/deno_core/pull/965 and https://github.com/denoland/deno_core/pull/966
2024-11-18feat(ext/fetch): Make fetch client parameters configurable (#26909)Yusuke Tanaka
This commit makes HTTP client parameters used in `fetch` API configurable on the extension initialization via a callback `client_builder_hook` that users can provide. The main motivation behind this change is to allow `deno_fetch` users to tune the HTTP/2 client to suit their needs, although Deno CLI users will not benefit from it as no JavaScript interface is exposed to set these parameters currently. It is up to users whether to provide a hook function. If not provided, the default configuration from hyper crate will be used. Ref #26785
2024-11-18feat(ext/http): Make http server parameters configurable (#26785)Yusuke Tanaka
This commit makes http server parameters configurable on the extension initialization via two callbacks users can provide. The main motivation behind this change is to allow `deno_http` users to tune the HTTP/2 server to suit their needs, although Deno CLI users will not benefit from it as no JavaScript interface is exposed to set these parameters currently. It is up to users whether to provide hook functions. If not provided, the default configuration from hyper crate will be used.
2024-11-19fix(node/crypto): support promisify on generateKeyPair (#26913)Marvin Hagemeister
Calling `promisify(generateKeyPair)` didn't work as expected. It requires a custom promisify implementation. This was easy to fix thanks to the excellent debugging investigation in https://github.com/denoland/deno/issues/26910 Fixes https://github.com/denoland/deno/issues/26910 Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-11-18feat(runtime): remove public OTEL trace API (#26854)Luca Casonato
This PR removes the public Deno.tracing.Span API. We are not confident we can ship an API that is better than the `@opentelemetry/api` API, because V8 CPED does not support us using `using` to manage span context. If this changes, we can revisit this decision. For now, users wanting custom spans can instrument their code using the `@opentelemetry/api` API and `@deno/otel`. This PR also speeds up the OTEL trace generation by a 30% by using Uint8Array instead of strings for the trace ID and span ID.
2024-11-18feat: fmt and lint respect .gitignore file (#26897)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/26573
2024-11-18fix(lsp): ignore editor indent settings if deno.json is present (#26912)Nayeem Rahman
2024-11-18perf(windows): delay load webgpu and some other dlls (#26917)David Sherret
Before: ~100ms, After: ~40ms for a hello world Closes https://github.com/denoland/deno/issues/26914
2024-11-18perf(compile): code cache (#26528)David Sherret
Adds a lazily created code cache to `deno compile` by default. The code cache is created on first run to a single file in the temp directory and is only written once. After it's been written, the code cache becomes read only on subsequent runs. Only the modules loaded during startup are cached (dynamic imports are not code cached). The code cache can be disabled by compiling with `--no-code-cache`.
2024-11-18chore: temporarily disable dns tests for Node compat (#26915)Bartek Iwańczuk
These tests are hitting a remote server which sometimes starts failing randomly on CI. They need to be rewritten to use a local server and have `/etc/hosts` setup that remaps relevants URLs.
2024-11-17feat(cli): support multiple env file argument (#26527)Bhuwan Pandit
Closes #26425 ## Overview This PR adds support for specifying multiple environment files as arguments when using the Deno CLI. Subsequent files override pre-existing variables defined in previous files. If the same variable is defined in the environment and in the file, the value from the environment takes precedence. ## Example Usage ```bash deno run --allow-env --env-file --env-file=".env.one" --env-file=".env.two" script.ts ``` --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-11-17chore: Make ext/net/tcp.rs public (#26891)Benjamin Swerdlow
2024-11-17fix(ext/webgpu): Create GPUQuerySet converter before usage (#26883)reczkok
Converter for `GPUComputePassTimestampWrites` uses converter for `GPUQuerySet` before it is defined making it impossible to use. This PR simply reorders converter creation to resolve this issue. Logging the `GPUQuerySet` still fails (as mentioned in #26769) but it is now usable inside pass descriptors and works when used.
2024-11-16chore: reenable some tests disabled during Deno 1->2 migration (#26898)Bartek Iwańczuk
2024-11-16fix(ext/node): increase tolerance for interval test (#26899)Bartek Iwańczuk
Fixes tests added in https://github.com/denoland/deno/pull/26703 by increasing tolerance due to noisy CI machines.
2024-11-16feat(jupyter): Add `Deno.jupyter.image` API (#26284)Bartek Iwańczuk
This commit adds `Deno.jupyter.image` API to display PNG and JPG images: ``` const data = Deno.readFileSync("./my-image.jpg"); Deno.jupyter.image(data); Deno.jupyter.image("./my-image.jpg"); ```
2024-11-16fix(ext/node): New async setInterval function to improve the nodejs ↵/usr/bin/cat
compatibility (#26703) Closes #26499
2024-11-16feat(watch): log which file changed on HMR or watch change (#25801)HasanAlrimawi
Closes #25504
2024-11-16fix(ext/cache): gracefully error when cache creation failed (#26895)Bartek Iwańczuk
Removes panic reported in https://github.com/denoland/deno/issues/26893
2024-11-16fix(cli): show prefix hint when installing a package globally (#26629)Miguel Rodrigues
Closes #26545 Shows a hint when a package is installed globally, otherwise fallbacks to the existing implementation.
2024-11-16feat(task): support object notation, remove support for JSDocs (#26886)Bartek Iwańczuk
This commit changes three aspects of `deno task`: 1. Tasks can now be written using object notation like so: ```jsonc { "tasks": { "foo": "deno run foo.js", "bar": { "command": "deno run bar.js" } } ``` 2. Support for comments for tasks is now removed. Comments above tasks will no longer be printed when running `deno task`. 3. Tasks written using object notation can have "description" field that replaces support for comments above tasks: ```jsonc { "tasks": { "bar": { "description": "This is a bar task" "command": "deno run bar.js" } } ``` ``` $ deno task Available tasks: - bar // This is a bar task deno run bar.js ``` Pulled most of the changes from https://github.com/denoland/deno/pull/26467 to support "dependencies" in tasks. Additionally some cleanup was performed to make code easier to read. --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2024-11-15refactor: use boxed_error in some places (#26887)David Sherret
2024-11-15fix: update message for unsupported schemes with npm and jsr (#26884)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/26596
2024-11-15feat(fetch): accept async iterables for body (#26882)Luca Casonato
Reland of #24623, but with a fix for `String` objects. Co-authored-by: crowlkats <crowlkats@toaxl.com>
2024-11-15feat(lsp): auto-imports with @deno-types directives (#26821)Nayeem Rahman
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-11-15feat(ext/fetch): allow embedders to use `hickory_dns_resolver` instead of ↵Sahand Akbarzadeh
default `GaiResolver` (#26740) Allows embedders to use `hickory-dns-resolver` instead of threaded "getaddrinfo" resolver in the `fetch()` implementation.
2024-11-15perf: use available system memory for v8 isolate memory limit (#26868)Bartek Iwańczuk
Instead of using the default 1.4Gb limit (which was meant for browser tabs) configure V8 to set the heap limit to the amount of memory available in the system. Closes https://github.com/denoland/deno/issues/23424 Closes https://github.com/denoland/deno/issues/26435 Closes https://github.com/denoland/deno/issues/21226
2024-11-15chore: remove some unused tests (#26878)Bartek Iwańczuk
2024-11-14refactor(resolver): move more resolution code into deno_resolver (#26873)David Sherret
Follow-up to cjs refactor. This moves most of the resolution code into the deno_resolver crate. Still pending is the npm resolution code.
2024-11-14feat(cli): add `--unstable-node-globals` flag (#26617)Marvin Hagemeister
This PR adds a new `--unstable-node-globals` flag to expose Node globals by default. Fixes https://github.com/denoland/deno/issues/26611 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-11-14fix: otel resiliency (#26857)snek
Improving the breadth of collected data, and ensuring that the collected data is more likely to be successfully reported. - Use `log` crate in more places - Hook up `log` crate to otel - Switch to process-wide otel processors - Handle places that use `process::exit` Also adds a more robust testing framework, with a deterministic tracing setting. Refs: https://github.com/denoland/deno/issues/26852
2024-11-14chore: upgrade runtimelib (jupyter) to 0.19 (#26862)Kyle Kelley
Upgrades the `runtimelib` crate. Of utility for users and library authors is the support for binary buffers on messages, especially for comms.
2024-11-13fix(cli): preserve comments in doc tests (#26828)Yusuke Tanaka
This commit makes comments in code snippets in JSDoc or markdown preserved when they are executed as tests. In particular, this is needed to get TypeScript special comments such as `@ts-ignore` or `@ts-expect-error` to work correctly. Fixes #26728
2024-11-13fix(fmt): error instead of panic on unstable format (#26859)David Sherret
2024-11-13feat(node): stabilize detecting if CJS via `"type": "commonjs"` in a ↵David Sherret
package.json (#26439) This will respect `"type": "commonjs"` in a package.json to determine if `.js`/`.jsx`/`.ts`/.tsx` files are CJS or ESM. If the file is found to be ESM it will be loaded as ESM though.
2024-11-13fix(ext/node): zlib.crc32() (#26856)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/26845
2024-11-13fix(ext/node): use ERR_NOT_IMPLEMENTED for notImplemented (#26853)Divy Srivastava
2024-11-13chore: update denokv_* (#26850)Luca Casonato
2024-11-13feat: upgrade V8 to 13.0 (#26851)Bartek Iwańczuk