summaryrefslogtreecommitdiff
path: root/cli
AgeCommit message (Collapse)Author
2023-01-23refactor: Move lockfile to a separate crate (#17503)Bartek Iwańczuk
Moves the lockfile implementation to a separate crate so other projects like Deploy can use it as well.
2023-01-23fix(napi): improve napi_adjust_external_memory (#17501)Divy Srivastava
<!-- Before submitting a PR, please read http://deno.land/manual/contributing 1. Give the PR a descriptive title. Examples of good title: - fix(std/http): Fix race condition in server - docs(console): Update docstrings - feat(doc): Handle nested reexports Examples of bad title: - fix #7123 - update docs - fix bugs 2. Ensure there is a related issue and it is referenced in the PR text. 3. Ensure there are tests that cover the changes. 4. Ensure `cargo test` passes. 5. Ensure `./tools/format.js` passes without changing files. 6. Ensure `./tools/lint.js` passes. 7. Open as a draft PR if your work is still in progress. The CI won't run all steps, but you can add '[ci]' to a commit message to force it to. 8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label. -->
2023-01-23fix(napi): improve napi_is_detached_arraybuffer (#17498)Divy Srivastava
2023-01-23fix(napi): improve napi_detach_arraybuffer (#17499)Divy Srivastava
2023-01-22fix(napi): correctly handle name in napi_create_function (#17489)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/17472
2023-01-20feat: Stabilize Deno.Listener.ref/unref (#17477)Bartek Iwańczuk
2023-01-19feat(runtime): add bigint to seek typings (#17314)Leo Kettmeir
2023-01-18refactor(cli): Integrate standalone mode cert handling into `Flags` (#17419)Andreu Botella
The way the standalone mode handles the `--cert` flag is different to all other modes. This is because `--cert` takes a path to the certificate file, which is directly added to the root cert store; except for compile mode, where its byte contents are stored in the standalone metadata, and they are added to the root cert store after the `ProcState` is created. This change instead changes `Flags::ca_file` (an `Option<String>`) into `Flags::ca_data`, which can represent a `String` file path or a `Vec<u8>` with the certificate contents. That way, standalone mode can create a `ProcState` whose root cert store alreay contains the certificate. This change also adds a tests for certificates in standalone mode, since there weren't any before. This refactor will help with implementing web workers in standalone mode in the future.
2023-01-17chore: forward v1.29.4 release commit to main (#17453)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-16refactor(cli): fewer clones (#17450)Geert-Jan Zwiers
2023-01-16refactor(npm): avoid cloning snapshot for lockfile (#17451)David Sherret
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-16fix(repl): improve validator to mark more code as incomplete (#17443)David Sherret
Closes #17442
2023-01-16fix(cli/fmt): show filepath for InvalidData error (#17361)Leo Kettmeir
2023-01-15chore: update std submodule and its imports (#17408)Asher Gomez
2023-01-14chore: use rustfmt imports_granularity option (#17421)Divy Srivastava
Closes https://github.com/denoland/deno/issues/2699 Closes https://github.com/denoland/deno/issues/2347 Uses unstable rustfmt features. Since dprint invokes `rustfmt` we do not need to switch the cargo toolchain to nightly. Do we care about formatting stability of our codebase across Rust versions? (I don't)
2023-01-15fix(ext/fetch) Fix request clone error in flash server (#16174)Isaiah Gamble
2023-01-15refactor: clean up `unwrap` and `clone` (#17282)Yiyu Lin
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-01-15fix(napi): functions related to errors (#17370)Bartek Iwańczuk
This commits fixes various NAPI functions related to creation and throwing of errors.
2023-01-14fix(npm): handle an npm package that has itself as a dependency (#17425)David Sherret
I'm not sure this properly handles scenarios where an npm package uses an alias that resolves to itself, we can fix that if we find a package that actually depends on that behavior. Closes #17420
2023-01-14refactor: create enum for `--builtin` doc flag (#17423)David Sherret
2023-01-14refactor(tsc): do not store some typescript declaration file text in ↵David Sherret
multiple places (#17410)
2023-01-14fix(ext/flash): Correctly handle errors for chunked responses (#17303)Kamil Ogórek
The leading cause of the problem was that `handleResponse` has `tryRespondChunked` passed as an argument, which in turn is implemented as a call to `core.ops.op_try_flash_respond_chuncked`, that throws in the repro code. `handleResponse` was not handled correctly, as it not returned any value, and had no `catch` attached to it. It also effectively was never correctly handled inside two other blocks with `resp.then` and `PromisePrototypeCatch(PromisePrototypeThen(resp, "..."))` as well, as it just short-circuited the promise with an empty resolve, instead of relying on the last `(async () => {})` block. This change makes `handleResponse` return a correct value and attach `onError` handler to the "non-thenable" variant of response handling code.
2023-01-14fix(runtime/fs): preserve permissions in copyFileSync for macOS (#17412)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/16921
2023-01-14chore(napi): Remove unstable libuv methods (#17416)Divy Srivastava
This commit removes the libuv pollyfills introduced with Node-API support. It is too much Node-specific. Most Node-API modules that depend on libuv are already giving up the benefits of Node-API. We should rather encourage modules to use `ThreadSafeFunction` or `AsyncWork` to interface with the event loop. Relevant discussion a few months ago: https://github.com/denoland/deno/pull/13633#discussion_r904916178 cc @bartlomieju
2023-01-14fix(napi): correct arguments for napi_get_typedarray_info (#17306)Bartek Iwańczuk
2023-01-14fix(npm): use original node regex in npm resolution (#17404)Kiryl Dziamura
Fixes regex for matching conditional exports in a package. Updated to the same regex Node.js uses.
2023-01-14refactor(bench/http): Use optional chaining instead of `||` fallthrough (#17317)Max Coplan
2023-01-13refactor(coverage): use FileFlags struct (#17388)Geert-Jan Zwiers
2023-01-13refactor(cli/tools): reduce cloning (#17309)Geert-Jan Zwiers
2023-01-13fix(napi): update node version to lts (#17399)Lino Le Van
2023-01-13chore: forward 1.29.3 release back to main (#17401)David Sherret
2023-01-13fix(permissions): lock stdio streams when prompt is shown (#17392)Bartek Iwańczuk
This commit changes permission prompt to lock stdio streams when prompt is shown.
2023-01-13tests: Disable flaky flash_shutdown test (#17390)Bartek Iwańczuk
2023-01-13fix(napi): date and unwrap handling (#17369)Bartek Iwańczuk
2023-01-13chore: add `copyright_checker` tool and add the missing copyright (#17285)Yiyu Lin
2023-01-13tests: move integration tests to a single module (#17380)Bartek Iwańczuk
Effectively reverts changes done in https://github.com/denoland/deno/pull/16816
2023-01-12Revert "test: fix flaky deno_land_unsafe_ssl test (#17357)" (#17368)Bartek Iwańczuk
This reverts commit ee2c6cb04af232be672b31b81f7c377b2f571267. Closes https://github.com/denoland/deno/issues/17359
2023-01-12fix(napi): Implement `napi_threadsafe_function` ref and unref (#17304)Divy Srivastava
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-12fix: check if BroadcastChannel is open before sending (#17366)Leo Kettmeir
Fixes #16978
2023-01-12feat: allow passing a ReadableStream to Deno.writeFile/Deno.writeTextFile ↵Leo Kettmeir
(#17329) Closes #13229
2023-01-12fix: don't unwrap in test pipe handling logic (#17341)Leo Kettmeir
Fixes #14746
2023-01-12test: fix flaky deno_land_unsafe_ssl test (#17357)Bartek Iwańczuk
2023-01-11fix: don't panic on resolveDns if unsupported record type is specified (#17336)Leo Kettmeir
Fixes #14373
2023-01-11fix(fmt): better handling of link reference definitions when formatting ↵David Sherret
markdown (#17352) Two fixes: - https://github.com/dprint/dprint-plugin-markdown/pull/75 - https://github.com/dprint/dprint-plugin-markdown/pull/73
2023-01-10fix(napi): support for env cleanup hooks (#17324)Bartek Iwańczuk
This commit adds support for "napi_add_env_cleanup_hook" and "napi_remove_env_cleanup_hook" function for Node-API.
2023-01-10fix(watch): preserve `ProcState::file_fetcher` between restarts (#15466)Nayeem Rahman
This commit changes "ProcState" to store "file_fetcher" field in an "Arc", allowing it to be preserved between restarts and thus keeping the state alive between the restarts. File watchers for "deno test" and "deno bench" now reset "ProcState" between restarts.
2023-01-10fix(napi): handle static properties in classes (#17320)Bartek Iwańczuk
Adds support for static properties when using "napi_define_class".
2023-01-10fix(npm): allow to read package.json if permissions are granted (#17209)Bartek Iwańczuk
This commit changes signature of "deno_core::ModuleLoader::resolve" to pass an enum indicating whether or not we're resolving a specifier for dynamic import. Additionally "CliModuleLoader" was changes to store both "parent permissions" (or "root permissions") as well as "dynamic permissions" that allow to check for permissions in top-level module load an dynamic imports. Then all code paths that have anything to do with Node/npm compat are now checking for permissions which are passed from module loader instance associated with given worker.
2023-01-09feat(runtime/os): add `Deno.env.has()` (#17315)Leo Kettmeir