summaryrefslogtreecommitdiff
path: root/cli/tests
AgeCommit message (Collapse)Author
2023-01-25feat: embed import map in the config file (#17478)Bartek Iwańczuk
This commit changes handling of config file to enable specifying "imports" and "scopes" objects effectively making the configuration file an import map. "imports" and "scopes" take precedence over "importMap" configuration, but have lower priority than "--importmap" CLI flag. Co-authored-by: David Sherret <dsherret@users.noreply.github.com> Co-authored-by: David Sherret <dsherret@gmail.com>
2023-01-25feat(fmt): make semi-colon option a boolean (#17527)David Sherret
2023-01-25fix: remove leftover Deno.spawn references (#17524)David Sherret
2023-01-25Revert "chore: upgrade rusty_v8 to 0.62.0 (#17200)" (#17523)Bartek Iwańczuk
This reverts commit e2d75491d5fc6fbac67da89c7350c4c9ca99d8e9.
2023-01-25chore: upgrade rusty_v8 to 0.62.0 (#17200)Bartek Iwańczuk
2023-01-25feat(cli): add `DENO_V8_FLAGS` env var (#17313)Leo Kettmeir
Closes #5669
2023-01-25feat: Add sync APIs for "Deno.permissions" (#17019)Asher Gomez
This commit adds sync versions of async APIs to "Deno.permissions" namespace. Following APIs were added: - "Deno.permissions.querySync" - "Deno.permissions.requestSync" - "Deno.permissions.revokeSync"
2023-01-24feat: suggest adding a "node:" prefix for bare specifiers that look like ↵David Sherret
built-in Node modules (#17519)
2023-01-24feat(fmt): add ability to configure semicolons (#17292)Bartek Iwańczuk
Allows to change behavior of `deno fmt` to use "ASI" setting for semicolons instead of always prefering them, this is done by "--options-semi=asi" flag or `"semi": "asi"` setting in the config file.
2023-01-24refactor: remove Deno.core (#16881)Bartek Iwańczuk
This commit removes "Deno.core" namespace. It is strictly private API that has no stability guarantees, we were supposed to remove it long time ago. Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-01-24fix: update expected output for config auto-discovery debug log (#17514)Leo Kettmeir
2023-01-24feat: log detection of config file (#17338)Leo Kettmeir
Closes #14578
2023-01-24feat: allow first arg in test step to be a function (#17096)Leo Kettmeir
2023-01-24feat: support node built-in module imports (#17264)Bartek Iwańczuk
Co-authored-by: David Sherret <dsherret@gmail.com>
2023-01-24feat(runtime/command): make stdin default to inherit for spawn() (#17334)Leo Kettmeir
Closes #17230
2023-01-24refactor(deno_graph): remove unused Resolved::Ok#kind usage (#17504)David Sherret
See https://github.com/denoland/deno_graph/pull/205 for more details.
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-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-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(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-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-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-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-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: 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-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-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(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
2023-01-08fix(install): should always include `--no-config` in shim unless `--config` ↵David Sherret
is specified (#17300) Closes #17294
2023-01-07refactor(permissions): add PermissionsContainer struct for internal ↵Bartek Iwańczuk
mutability (#17134) Turns out we were cloning permissions which after prompting were discarded, so the state of permissions was never preserved. To handle that we need to store all permissions behind "Arc<Mutex<>>" (because there are situations where we need to send them to other thread). Testing and benching code still uses "Permissions" in most places - it's undesirable to share the same permission set between various test/bench files - otherwise granting or revoking permissions in one file would influence behavior of other test files.
2023-01-06fix(npm): handle declaration file resolution where packages incorrectly ↵David Sherret
define "types" last in "exports" (#17290) Closes #17279
2023-01-04fix: upgrade deno_ast to 0.23 (#17269)David Sherret
Closes #17172 Closes #15669 Closes #8529
2023-01-03fix(permissions): process `URL` in `Deno.FfiPermissionDescriptor.path` for ↵Asher Gomez
`revoke()` and `request()` (#17094) Previously, `Deno.permissions.[revoke|request]()` wouldn't correctly process the `path: URL` when `name` was `ffi`. This change fixes that behaviour and adds a new function, `formDescriptor()`, to ensure `URL` arguments are consistently handled across `Deno.permissions.[query|revoke|request]()`.
2023-01-03fix(cli): bundle command support shebang file (#17113)Fenix
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-30fix(lsp): less agressive completion triggers (#17225)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/17056 Closes https://github.com/denoland/deno/issues/17055
2022-12-29fix(lsp): completions for private variables (#17220)Bartek Iwańczuk
2022-12-29fix(lsp): "Add all missing imports" uses correct specifiers (#17216)Bartek Iwańczuk
This commit fixes "Add all missing imports" quick fix; before it was replacing all occurrences with the same specifier. Now every line returned from TSC is processed individually.
2022-12-28feat(unstable): Add Deno.Conn.ref()/unref() (#17170)Bartek Iwańczuk
This commit adds "Deno.Conn.ref()" and "Deno.Conn.unref()" methods. These methods can be used to make connection block or not block the event loop from finishing. Refing/unrefing only influences "read" operations - ie. scheduling writes to a connection _do_ keep event loop alive. Required for https://github.com/denoland/deno/issues/16710