summaryrefslogtreecommitdiff
path: root/cli/js
AgeCommit message (Collapse)Author
2023-08-02fix(node): node:test reports correct location (#20025)Bartek Iwańczuk
Also removed some noisy output that caused test flakiness.
2023-07-31feat(bench): add BenchContext::start() and BenchContext::end() (#18734)Nayeem Rahman
Closes #17589. ```ts Deno.bench("foo", async (t) => { const resource = setup(); // not included in measurement t.start(); measuredOperation(resource); t.end(); resource.close(); // not included in measurement }); ```
2023-07-17fix(bench): run warmup benchmark to break JIT bias (#19844)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/15277 This commit adds a single "warmup" run of empty function when running `deno bench`. This change will break so-called "JIT bias" which makes V8 optimize the first function and then bail out of optimization on second function. In essence the "warmup" function is getting optimized and then all user benches are bailed out of optimization.
2023-06-15refactor(ext/fetch): simplify fetch ops (#19494)Bartek Iwańczuk
Addresses feedback from https://github.com/denoland/deno/pull/19412#discussion_r1227912676
2023-05-22fix(ext/web): improve timers resolution for 0ms timeouts (#19212)Bartek Iwańczuk
This commit changes the implementation of `ext/web` timers, by using "op_void_async_deferred" for timeouts of 0ms. 0ms timeout is meant to be run at the end of the event loop tick and currently Tokio timers that we use to back timeouts have at least 1ms resolution. That means that 0ms timeout actually take >1ms. This commit changes that and runs 0ms timeout at the end of the event loop tick. One consequence is that "unrefing" a 0ms timer will actually keep the event loop alive (which I believe actually makes sense, the test we had only worked because the timeout took more than 1ms). Ref https://github.com/denoland/deno/issues/19034
2023-05-09fix(core): let V8 drive extension ESM loads (#18997)Luca Casonato
This now allows circular imports across extensions. Instead of load + eval of all ESM files in declaration order, all files are only loaded. Eval is done recursively by V8, only evaluating files that are listed in `Extension::esm_entry_point` fields. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-02refactor(core): Use `ObjectHasOwn` instead of ↵Kenta Moriuchi
`ObjectPrototypeHasOwnProperty` (#18952) ES2022 `Object.hasOwn` can be used in snapshot, so I migrate to use it.
2023-04-30refactor: remove ext/console/01_colors.js (#18927)Leo Kettmeir
2023-04-28fix(ext/websocket): restore op_ws_send_ping (#18891)Bartek Iwańczuk
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-04-25refactor(ext/websocket): use specialized ops (#18819)Bartek Iwańczuk
Instead of relying on `op_ws_send` to send different kinds of messages, use specialized ops everywhere.
2023-04-13refactor(cli): move runTests() and runBenchmarks() to rust (#18563)Nayeem Rahman
Stores the test/bench functions in rust op state during registration. The functions are wrapped in JS first so that they return a directly convertible `TestResult`/`BenchResult`. Test steps are still mostly handled in JS since they are pretty much invoked by the user. Allows removing a bunch of infrastructure for communicating between JS and rust. Allows using rust utilities for things like shuffling tests (`Vec::shuffle`). We can progressively move op and resource sanitization to rust as well. Fixes #17122. Fixes #17312.
2023-04-01fix(test): don't swallow sanitizer errors with permissions (#18550)Nayeem Rahman
Missing `return` from #18246.
2023-03-25feat(test): print pending tests on sigint (#18246)Nayeem Rahman
2023-03-17BREAKING(unstable): remove WebGPU (#18094)Leo Kettmeir
This PR _**temporarily**_ removes WebGPU (which has behind the `--unstable` flag in Deno), due to performance complications due to its presence. It will be brought back in the future; as a point of reference, Chrome will ship WebGPU to stable on 26/04/2023. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-08refactor: rename InternalModuleLoader to ExtModuleLoader, use ext: scheme ↵Bartek Iwańczuk
for snapshotted modules (#18041) This commit renames "deno_core::InternalModuleLoader" to "ExtModuleLoader" and changes the specifiers used by the modules loaded from this loader to "ext:". "internal:" scheme was really ambiguous and it's more characters than "ext:", which should result in slightly smaller snapshot size. Closes https://github.com/denoland/deno/issues/18020
2023-03-05refactor(core): include_js_files! 'dir' option doesn't change specifiers ↵Bartek Iwańczuk
(#18019) This commit changes "include_js_files!" macro from "deno_core" in a way that "dir" option doesn't cause specifiers to be rewritten to include it. Example: ``` include_js_files! { dir "js", "hello.js", } ``` The above definition required embedders to use: `import ... from "internal:<ext_name>/js/hello.js"`. But with this change, the "js" directory in which the files are stored is an implementation detail, which for embedders results in: `import ... from "internal:<ext_name>/hello.js"`. The directory the files are stored in, is an implementation detail and in some cases might result in a significant size difference for the snapshot. As an example, in "deno_node" extension, we store the source code in "polyfills" directory; which resulted in each specifier to look like "internal:deno_node/polyfills/<module_name>", but with this change it's "internal:deno_node/<module_name>". Given that "deno_node" has over 100 files, many of them having several import specifiers to the same extension, this change removes 10 characters from each import specifier.
2023-02-07 refactor: remove prefix from include_js_files & use extension name (#17683)Leo Kettmeir
2023-02-07refactor: Use ES modules for internal runtime code (#17648)Leo Kettmeir
This PR refactors all internal js files (except core) to be written as ES modules. `__bootstrap`has been mostly replaced with static imports in form in `internal:[path to file from repo root]`. To specify if files are ESM, an `esm` method has been added to `Extension`, similar to the `js` method. A new ModuleLoader called `InternalModuleLoader` has been added to enable the loading of internal specifiers, which is used in all situations except when a snapshot is only loaded, and not a new one is created from it. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-24feat: allow first arg in test step to be a function (#17096)Leo Kettmeir
2023-01-16chore: update dlint to v0.37.0 for GitHub Actions (#17295)Kenta Moriuchi
Updated third_party dlint to v0.37.0 for GitHub Actions. This PR includes following changes: * fix(prefer-primordials): Stop using array pattern assignments * fix(prefer-primordials): Stop using global intrinsics except for `SharedArrayBuffer` * feat(guard-for-in): Apply new guard-for-in rule
2023-01-04fix: upgrade deno_ast to 0.23 (#17269)David Sherret
Closes #17172 Closes #15669 Closes #8529
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-05fix(test): improve how `--fail-fast` shuts down when hitting limit (#16956)David Sherret
Closes #15650
2022-12-05refactor: remove references to Deno.core in bootstrap code (#16937)Bartek Iwańczuk
Prerequisite for https://github.com/denoland/deno/pull/16881
2022-11-25fix(cli/js): improve resource sanitizer messages (#16798)Luca Casonato
This commit improves the guidance for how to close a child process stdout / stderr to also include guidance for when using `new Deno.Command()`.
2022-11-21feat(core): Ability to create snapshots from existing snapshots (#16597)Bartek Iwańczuk
Co-authored-by: crowlkats <crowlkats@toaxl.com>
2020-07-19Port internal TS code to JS (#6793)Bartek Iwańczuk
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-07-16fix(cli/js/web): IPv6 hostname should be compressed (#6772)JohannLai
2020-07-14Use dprint for internal formatting (#6682)David Sherret
2020-07-13Revert "feat: move unstable Deno.permissions to navigator.permissions… (#6729)Bartek Iwańczuk
* Revert "feat: move unstable Deno.permissions to navigator.permissions (#6244)" This reverts commit 202e7fa6ad366ee56a6d070e94eaecb6dbc745bf.
2020-07-13fix(Deno.ppid): improve error message when --unstable is missing (#6717)uki00a
2020-07-13feat(cli): add copy argument to Buffer.bytes (#6697)Marcos Casagrande
2020-07-13fix(cli/js/web/url): Implement IPv4 hostname parsing (#6707)Nayeem Rahman
2020-07-13fix(cli/fetch): fix relative redirect (#6715)Marcos Casagrande
2020-07-11feat(Deno.inspect): Add sorted, trailingComma, compact and iterableLimit to ↵Nayeem Rahman
InspectOptions (#6591)
2020-07-10feat: add performance user timing APIs (#6421)Kitson Kelly
2020-07-10fix(URL): Implement spec-compliant host parsing (#6689)Nayeem Rahman
2020-07-10fix(cli/buffer): allow Buffer to store MAX_SIZE bytes (#6570)Marcos Casagrande
2020-07-10feat(unstable): add Deno.consoleSize (#6520)Sebastien Filion
2020-07-09feat: move unstable Deno.permissions to navigator.permissions (#6244)Kitson Kelly
2020-07-08BREAKING(core): Remove control slice from ops (#6048)Valentin Anger
2020-07-08feat(unstable): Deno.ppid (#6539)uki00a
2020-07-08feat(cli): Add WriteFileOptions to writeTextFile & writeTextFileSync (#6280)Marcos Casagrande
2020-07-08feat: add --no-check option (#6456)Kitson Kelly
This commit adds a "--no-check" option to following subcommands: - "deno cache" - "deno info" - "deno run" - "deno test" The "--no-check" options allows to skip type checking step and instead directly transpiles TS sources to JS sources. This solution uses `ts.transpileModule()` API and is just an interim solution before implementing it fully in Rust.
2020-07-07perf(cli/body): improve .arrayBuffer() speed (#6669)Marcos Casagrande
2020-07-07feat(test): Add support for regex in filter flag (#6343)Sebastien Filion
Currently, the documentation makes it sound like the test subcommand's filter flag could accept some kind of pattern matching value like a glob or a regex, although the function "createFilterFn" accepts a regex as an argument, there's no way to pass an actual regex value from the CLI. This commit makes it possible to pass a string that could be cast as regex when string matches "^/.*/$". With this change, a user can use the filter flag as follow: deno test --filter "/test-.+/" Also tested that `\` get escaped properly, on MacOS at least, and this is also a valid flag: deno test --filter "/test-\d+/"
2020-07-07fix(cli/js/process): Fix process socket types (#6676)Nayeem Rahman
2020-07-06clean up code in cli/js (#6611)Stanislav
2020-07-06Fix definition of URL constructor (#6653)Ryan Dahl
2020-07-06feat: Deno.chown() make uid, gid args optional (#4612)dubiousjim