summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-02-24chore: fix cargo publish (#17907)David Sherret
2023-02-241.31.0 (#17906)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-02-23fix(npm): allow resolving from package.json when an import map exists (#17905)David Sherret
2023-02-23fix(core): remove async op inlining optimization (#17899)Divy Srivastava
Runtime generation of async op wrappers contributed to increased startup time and core became unusable with `--disallow-code-generation-from-strings` flag. The optimization only affects very small microbenchmarks so this revert will not cause any regressions.
2023-02-23feat(task): adjust warning (#17904)Bartek Iwańczuk
Put it on a single line and remove coloring.
2023-02-23fix(webgpu): don't default to 0 for setVertexBuffer.size & properly use ↵Leo Kettmeir
webidl.setlike (#17800)
2023-02-23fix(npm): support bare specifiers in package.json having a path (#17903)David Sherret
For example `import * as test from "package/path.js"`
2023-02-23feat(npm): support bare specifiers from package.json in more subcommands and ↵David Sherret
language server (#17891)
2023-02-23feat(task): add warning about package.json scripts support (#17900)Bartek Iwańczuk
2023-02-23feat(npm): support npm specifiers in remote modules without `--unstable` ↵David Sherret
(#17889) Closes #17455
2023-02-23fix(ext/node): fix npm module resolution when --node-modules-dir specified ↵Yoshiya Hinosawa
(#17896)
2023-02-23fix(ext/flash): wrong order of arguments passed to `http1Response` (#17893)Kenta Moriuchi
2023-02-23feat(bench): change --json output format (#17888)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/17775
2023-02-22feat(task): support scripts in package.json (#17887)David Sherret
This is a super basic initial implementation. We don't create a `node_modules/.bin` folder at the moment and add it to the PATH like we should which is necessary to make command name resolution in the subprocess work properly (ex. you run a script that launches another script that then tries to launch an "npx command"... this won't work atm). Closes #17492
2023-02-23test(ext/node): add tty_test and util_test (#17868)Yoshiya Hinosawa
2023-02-23test(ext/node): add tls_test (#17871)Yoshiya Hinosawa
2023-02-23Revert "test(wpt): implement process timeout (#17872)" (#17886)Bartek Iwańczuk
This reverts commit 5fcbdd62285140353edbb28e67f7d72e3317e96e.
2023-02-22fix(npm): resolve node_modules dir relative to package.json instead of cwd ↵David Sherret
(#17885)
2023-02-22perf: remove `current_dir()` call in `Deno.mainModule` (#17883)David Sherret
2023-02-22feat: support bare specifier resolution with package.json (#17864)Bartek Iwańczuk
This commit enables resolution of "bare specifiers" (eg. "import express from 'express';") if a "package.json" file is discovered. It's a step towards being able to run projects authored for Node.js without any changes. With this commit we are able to successfully run Vite projects without any changes to the user code. --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2023-02-22feat(permissions): grant all permission for a group in permission prompt ↵Asher Gomez
(#17140) This commit adds new "A" option to the interactive permission prompt, that will allow all subsequent permissions for given group (domain). Ie. when querying for permissions to access eg. env variables responding with "A" will allow access to all environmental variables. This works for all permission domains and should make permission prompts more ergonomic for users.
2023-02-22test(wpt): implement process timeout (#17872)Filip Skokan
``` response-consume-stream.any.js Blob-stream.any.js ``` These tests just hang whenever they get to use byob mode. This PR adds a timeout to the spawned process so that the WPTs finish running. This first broke the daily run due to https://github.com/web-platform-tests/wpt/commit/7b49c547d4b7bcc17e6308f741b080f4207d1e8a Also fixes "Untitled" test names in https://wpt.fyi/results/dom/events/Event-constructors.any.html?label=experimental&label=master&product=deno&product=chrome&aligned&view=subtest
2023-02-22refactor: use deno_graph for npm specifiers (#17858)David Sherret
This changes npm specifiers to be handled by deno_graph and resolved to an npm package name and version when the specifier is encountered. It also slightly changes how npm specifier resolution occurs—previously it would collect all the npm specifiers and resolve them all at once, but now it resolves them on the fly as they are encountered in the module graph. https://github.com/denoland/deno_graph/pull/232 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-02-22fix(ext/ffi): Fix re-ref'ing UnsafeCallback (#17704)Aapo Alasuutari
2023-02-22feat: start caching npm package version's "bin" entry from npm registry (#17881)David Sherret
2023-02-22feat(ext/ffi): Replace pointer integers with v8::External objects (#16889)Aapo Alasuutari
2023-02-22fix(core): rebuild when JS sources for snapshotting change (#17876)Bartek Iwańczuk
2023-02-22fix(lint): revert no-deprecated-api for Deno.run (#17880)David Sherret
2023-02-22fix(ext/node): fix node stream (#17874)Yoshiya Hinosawa
2023-02-22Revert "feat: Deprecate Deno.run API in favor of Deno.Command (#17630)" (#17875)Ryan Dahl
Deno.Command needs to be stabilized first and allow people to upgrade to it before we can deprecate Deno.run. Otherwise lint will suddenly fail with deprecated errors without giving people a chance to update.
2023-02-21chore: remove base64 encoding code from typescript snapshot (#17862)David Sherret
This code is no longer used because we use swc for this now.
2023-02-22fix(ext/node): fix webcrypto export (#17838)Yoshiya Hinosawa
2023-02-22perf(core, runtime): Further improve startup time (#17860)Bartek Iwańczuk
This commit further improves startup time by: - no relying on "JsRuntime::execute_script" for runtime bootstrapping, this is instead done using V8 APIs directly - registering error classes during the snapshot time, instead of on startup Further improvements can be made, mainly around removing "core.initializeAsyncOps()" which takes around 2ms. This commit should result in ~1ms startup time improvement.
2023-02-21fix(npm): filter out duplicate packages names in resolution (#17857)David Sherret
2023-02-21refactor(core): More efficient serde for ES modules in snapshot (#17856)Bartek Iwańczuk
Instead of relying on "serde_v8" which is very inefficient in serializing enums, I'm hand rolling serde for "ModuleMap" data that is stored in the V8 snapshot to make ES modules snapshottable. ``` // this branch Benchmark #2: ./target/release/deno run empty.js Time (mean ± σ): 21.4 ms ± 0.9 ms [User: 15.6 ms, System: 6.4 ms] Range (min … max): 20.2 ms … 24.4 ms // main branch Benchmark #2: ./target/release/deno run empty.js Time (mean ± σ): 23.1 ms ± 1.2 ms [User: 17.0 ms, System: 6.2 ms] Range (min … max): 21.0 ms … 26.0 ms ```
2023-02-21fix(npm): improve peer dependency resolution (#17835)David Sherret
This PR fixes peer dependency resolution to only resolve peers based on the current graph traversal path. Previously, it would resolve a peers by looking at a graph node's ancestors, which is not correct because graph nodes are shared by different resolutions. It also stores more information about peer dependency resolution in the lockfile.
2023-02-22fix(ext/node): fix process.uptime (#17839)Yoshiya Hinosawa
2023-02-20build: add "include_js_files_for_snapshotting" Cargo feature (#17826)Bartek Iwańczuk
This allows to not include source code into the binary (because it will already be included in the V8 snapshot). Nothing changes for the embedders - everything should still build the same. This commit brings the binary size from 87Mb to 82Mb on M1. Alternative to https://github.com/denoland/deno/pull/17820 and https://github.com/denoland/deno/pull/17653 --------- Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
2023-02-20feat: auto-discover package.json for npm dependencies (#17272)Bartek Iwańczuk
This commits adds auto-discovery of "package.json" file when running "deno run" and "deno task" subcommands. In case of "deno run" the "package.json" is being looked up starting from the directory of the script that is being run, stopping early if "deno.json(c)" file is found (ie. FS tree won't be traversed "up" from "deno.json"). When "package.json" is discovered the "--node-modules-dir" flag is implied, leading to creation of local "node_modules/" directory - we did that, because most tools relying on "package.json" will expect "node_modules/" directory to be present (eg. Vite). Additionally "dependencies" and "devDependencies" specified in the "package.json" are downloaded on startup. This is a stepping stone to supporting bare specifier imports, but the actual integration will be done in a follow up commit. --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2023-02-20refactor: use ops for idna & punycode (#17817)Leo Kettmeir
Towards https://github.com/denoland/deno/issues/17809
2023-02-20perf: use ops for node:crypto ciphers (#17819)Divy Srivastava
Towards #17809
2023-02-20refactor: move webgpu files to ext root (#17832)Leo Kettmeir
Required for #17826
2023-02-20test(ext/node): more node compat tests (#17827)Yoshiya Hinosawa
This PR adds the remaining ~650 Node.js compat test cases from std/node. Among these 650 cases, about 130 cases are now failing. These failing cases are prefixed with `TODO:` in `tests/node_compat/config.json`. These will be addressed in later PRs.
2023-02-20refactor(core): definition of "ExtensionFileSource" (#17823)Bartek Iwańczuk
This commit changes definition of "ExtensionFileSource", by changing "code" field to being "ExtensionFileSourceCode" enum. Currently the enum has only a single variant "IncludedInBinary". It is done in preparation to allow embedders to decide if they want to include the source code in the binary when snapshotting (in most cases they shouldn't do that). In the follow up commit we'll add more variants to "ExtensionFileSourceCode". "include_js_files_dir!" macro was removed in favor "include_js_files!" macro which can now accept "dir" option.
2023-02-17test: add node compat tests (#17805)Yoshiya Hinosawa
2023-02-17chore: remove unneeded files from ext/node (#17810)Bartek Iwańczuk
2023-02-17refactor: add `NpmPackageId` back from deno_graph as `NpmPackageNodeId` (#17804)David Sherret
The `NpmPackageId` struct is being renamed to `NpmPackageNodeId`. In a future PR it will be moved down into only npm dependency resolution and a `NpmPackageId` struct will be introduced in `deno_graph` that only has the name and version of the package (no peer dependency identifier information). So a `NpmPackageReq` will map to an `NpmPackageId`, which will map to an `NpmPackageNodeId` in the npm resolution.
2023-02-17feat(ext/node): implement `node:v8` (#17806)Divy Srivastava
Closes https://github.com/denoland/deno/issues/17115 Implements `cachedDataVersionTag` and `getHeapStatistics`.
2023-02-17fix(ext/node): add support for BYOB streams (#17803)AntonioFCG
2023-02-17chore: upgrade tokio to 1.25.0 (#17590)Bartek Iwańczuk
Upgrades "tokio" dependency to version 1.25.0.