summaryrefslogtreecommitdiff
path: root/cli/tests
AgeCommit message (Collapse)Author
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
2022-12-27feat(unstable): Add "Deno.osUptime()" API (#17179)Kamil Ogórek
This PR adds support for `Deno.osUptime` which reports number of seconds since os was booted. It will allow us to be compatible with Node's `os.uptime` - https://nodejs.org/api/os.html#osuptime Partially based on https://docs.rs/uptime_lib/latest/src/uptime_lib/lib.rs.html
2022-12-23fix(core): run macrotasks and next ticks after polling dynamic imports (#17173)Bartek Iwańczuk
This commit fixes handling of rejected promises in dynamic imports evaluation. Previously we were running callbacks for next ticks and macrotasks _before_ polling dynamic imports and checked for unhandled rejections immediately after. This is wrong, as `unhandledrejection` event is dispatched and its callbacks are run as macrotasks. This commit changes order of actions performed by the event loop to following: - poll async ops - poll dynamic imports - run next tick callbacks - run macrotask callbacks - check for unhandled promise rejections
2022-12-23fix(ext/fetch): Guard against invalid URL before its used by reqwest (#17164)Kamil Ogórek
2022-12-21fix(core): Do not print errors prop for non-AggregateError errors (#17123)Kamil Ogórek
This commit fixes formatting of JSError with "errors" property. Before this commit all instances of "Error" were treated as if they were "AggregateError" if they had "errors" property. After this commit only actual instances of "AggregateError" are formatted in such a way, while instances of "Error" that have "errors" property are formatted without showing details of "errors".
2022-12-20fix(lsp/format): language formatter used should be based on language id (#17148)David Sherret
Closes #11897
2022-12-20fix: ignore local lockfile for deno install and uninstall (#17145)David Sherret
Closes #17116
2022-12-20fix(ext/http): close stream on resp body error (#17126)Luca Casonato
Previously, errored streaming response bodies did not cause the HTTP stream to be aborted. It instead caused the stream to be closed gracefully, which had the result that the client could not detect the difference between a successful response and an errored response. This commit fixes the issue by aborting the stream on error.
2022-12-19fix(cli): allow for specifying `noErrorTruncation` compiler option (#17127)Kamil Ogórek
Fixes https://github.com/denoland/deno/issues/16568
2022-12-19fix: display URL in invalid URL error (#17128)Leo Kettmeir
2022-12-19fix(cli): do not clear screen for non-TTY environments in watch mode (#17129)Kamil Ogórek
2022-12-19fix(npm): conditional exports with --node-modules-dir (#17111)Bartek Iwańczuk
This commit fixes conditional exports in `require()` implementation if `--node-modules-dir` flag is used.
2022-12-19test(ext/fetch): fix test in release mode (#17125)Luca Casonato
2022-12-19fix(ext/fetch): handle errors in req body stream (#17081)Luca Casonato
Right now an error in a request body stream causes an uncatchable global promise rejection. This PR fixes this to instead propagate the error correctly into the promise returned from `fetch`. It additionally fixes errored readable stream bodies being treated as successfully completed bodies by Rust.
2022-12-17fix(runtime): `Deno.memoryUsage().rss` should return correct value (#17088)David Sherret
This commit changes implementation of "Deno.memoryUsage()" to return correct value for "rss" field. To do that we implement a specialized function per os to retrieve this information.
2022-12-17chore: update to Rust 1.66.0 (#17078)linbingquan
2022-12-17fix(lint): column number for pretty reporting was off by 1 (#17107)David Sherret
Closes #17086
2022-12-16fix(repl): errors shouldn't terminate repl (#17082)Bartek Iwańczuk
This commit changes REPL to never surface errors coming from code execution, but instead print them as errors to the REPL itself.
2022-12-15fix(npm): improve exports resolution when type checking (#17071)David Sherret
Closes #17012
2022-12-15fix: re-add Response.json static method (#17061)Leo Kettmeir
Same as #16040
2022-12-14fix: upgrade to TS 4.9.4 (#17048)David Sherret
2022-12-13feat(repl): support npm packages (#16770)Bartek Iwańczuk
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-12-13feat: support `createNew` in `Deno.writeFile` (#17023)Leo Kettmeir
2022-12-13fix: default to `"inherit"` for `Deno.Command#spawn()`'s `stdout` & `stderr` ↵Leo Kettmeir
(#17025)
2022-12-12feat: add `--inspect-wait` flag (#17001)Bartek Iwańczuk
This commit adds new "--inspect-wait" flag which works similarly to "--inspect-brk" in that it waits for inspector session to be established before running code. However it doesn't break on the first statement of user code, but instead runs it as soon as a session is established.
2022-12-10feat(cli): support deno bench in the config file (#16608)Geert-Jan Zwiers
This PR adds the ability to set `include/exclude` fields for `deno bench` in the configuration file.
2022-12-10feat(init): Generate main_bench.ts by default (#16786)sigmaSd
This commit changes "deno init" to generate "main_bench.ts" file which scaffold two example bench cases.
2022-12-09feat(init): Use jsonc for configuration file (#17002)Bartek Iwańczuk
Generate "deno.jsonc" instead of "deno.json" when running "deno init" subcommand.
2022-12-09fix: respect the `--quiet` flag in more cases (#16998)David Sherret
2022-12-09unstable: remove Deno.spawn, Deno.spawnSync, Deno.spawnChild APIs (#16893)Bartek Iwańczuk
This commit removes three unstable Deno APIs: - "Deno.spawn()" - "Deno.spawnSync()" - "Deno.spawnChild()" These APIs were replaced by a unified "Deno.Command" API.
2022-12-08chore: fix pty_complete_imports test (#16992)David Sherret
This test doesn't run on the CI.
2022-12-08fix(compile): ensure import map is used when specified in deno config file ↵David Sherret
(#16990) Closes #14246
2022-12-08feat(init): Generate deno.json by default (#16389)Bartek Iwańczuk
Updates `deno init` subcommand to create a `deno.json` when initializing a new project. Slightly changes the output, to make it more readable.
2022-12-08feat(cli): support configuring the lock file in the config file (#16781)Roj
This allows the user to completely opt out from the lock file or rename it without having to use `--no-lock` and/or `--lock` in all commands. ## Don’t Use Lock File ```json { "lock": false } ``` ## Use Lock File With a Different Name ```json { "lock": "deno2.lock" } ``` The CLI args `--no-lock` and `--lock` will always override what is in the config file. Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2022-12-07feat(repl): run "deno repl" with no permissions (#16795)Bartek Iwańczuk
This commit changes "deno repl" command to run with no permissions by default and accept "--allow-*" flags. This change is dictated by the fact that currently there is no way to run REPL with limited permissions. Technically it's a breaking change in the CLI command, but there's agreement in the team that it has merit and it's a good solution. Running just "deno" command still starts the REPL with full permissions allowed, but now a banner is printed to inform users about that:
2022-12-07feat(flags): add `deno check --all` as new preferred alias for `--remote` ↵David Sherret
(#16702) Closes #16374
2022-12-07feat: upgrade to TypeScript 4.9.3 (#16973)David Sherret
Updated from: https://github.com/denoland/TypeScript/pull/2
2022-12-06fix(test): handle scenario where --trace-ops would cause an unhandled ↵David Sherret
promise rejection (#16970) Closes #16969
2022-12-06tests: Refactor inspector tests (#16967)Bartek Iwańczuk
This commit adds "InspectorTester" struct which is used in inspector tests - it encapsulated various functionalities that we need (like reading/writing to WebSocket), but also adds better error handling which should help with debugging flaky tests.
2022-12-06fix(ext/fetch): new Request should soft clone (#16869)Luca Casonato
Previously the inner request object of the original and the new request were the same, causing the requests to be entangled and mutable changes to one to be visible to the other. This fixes that.
2022-12-05fix(npm): dependency types were sometimes not being resolved when package ↵David Sherret
had no types entry (#16958) Closes #16957
2022-12-06npm: ensure runtime exceptions are surfaced when debugger is attached (#16943)Bartek Iwańczuk
Currently runtime exception are only displayed at the program end in terminal, which makes it only a partial fix, as a full fix requires https://github.com/denoland/rusty_v8/pull/1149 which adds new bindings to the inspector that allows to notify it about thrown exceptions. This will be handled in a follow up commit.
2022-12-04revert: Inspector changes (#16939)Bartek Iwańczuk
Reverts 66dc54a7f and e2a0c3f0 Closes https://github.com/denoland/deno/issues/16926