summaryrefslogtreecommitdiff
path: root/cli/tests
AgeCommit message (Collapse)Author
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
2022-12-03test: reenable inspector_break_on_first_line_in_test test (#16908)Bartek Iwańczuk
2022-12-02fix(inspector): allow to poll session with reentry (#16863)Bartek Iwańczuk
This commit completely rewrites inspector session polling. Until now, there was a single function responsible for polling inspector sessions which could have been called when polling the "JsRuntime" as well as from internal inspector functions. There are some cases where it's required to have reentrant polling of sessions (eg. when "debugger" statement is run) which should be blocking until inspector sends appropriate message to continue execution. This was not possible before, because polling of sessions didn't have reentry ability. As a consequence, session polling was split into two separate functions: a) one to be used when polling from async context (on each tick of event loop in "JsRuntime") b) one to be used when polling synchronously and potentially blocking (used by various inspector methods). There are further cleanups and simplifications to be made in inspector code, but this rewrite solves the problem at hand (being able to evaluate "debugger" JS statement and continue inspector functionality). Co-authored-by: Bert Belder <bertbelder@gmail.com>
2022-12-02chore(windows): fix flaky pty_complete_imports (#16905)David Sherret
2022-12-02chore: fix flaky netListenUnrefAndRef (#16892)David Sherret
Closes #16890
2022-12-02chore: rewrite tests and utils to use Deno.Command API (#16895)Bartek Iwańczuk
Since "Deno.spawn()", "Deno.spawnSync()" and "Deno.spawnChild" are getting deprecated, this commits rewrites all tests and utilities to use "Deno.Command" API instead.
2022-12-01chore(npm): fix types tests (#16882)David Sherret
2022-11-30fix(npm): improve package.json exports support for types (#16880)David Sherret
2022-11-30fix(repl): respect --quiet flag (#16875)Bartek Iwańczuk
This commit changes REPL behavior to respect --quiet flag. Once this flag is present REPL will not print a banner at the start.
2022-11-30fix(lsp): analyze fs dependencies of dependencies to find npm package ↵David Sherret
requirements (#16866) Closes #16867
2022-11-29fix(coverage): Error if the emit cache is invalid (#16850)sigmaSd
2022-11-29fix(ext/node): allow absolute path in createRequire (#16853)Yoshiya Hinosawa
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-11-28fix(npm): don't resolve JS files when resolving types (#16854)David Sherret
Closes #16851
2022-11-28feat(core): show unresolved promise origin (#16650)Bartek Iwańczuk
This commit updates unhelpful messages that are raised when event loop stalls on unresolved top-level promises. Instead of "Module evaluation is still pending but there are no pending ops or dynamic imports. This situation is often caused by unresolved promises." and "Dynamically imported module evaluation is still pending but there are no pending ops. This situation is often caused by unresolved promises." we are now printing a message like: error: Top-level await promise never resolved [SOURCE LINE] ^ at [FUNCTION NAME] ([FILENAME]) eg: error: Top-level await promise never resolved await new Promise((_resolve, _reject) => {}); ^ at <anonymous> (file:///Users/ib/dev/deno/cli/tests/testdata/test/unresolved_promise.ts:1:1) Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2022-11-28fix(npm): allow to inspect npm modules with --inspect-brk (#16841)Bartek Iwańczuk
2022-11-28feat(unstable): rework Deno.Command (#16812)Leo Kettmeir
Refactors the `Deno.Command` class to not handle any state, but only being an intermediary to calling its methods, and as such any methods and properties besides `output`, `outputSync` & `spawn` have been removed. Interracting with a `spawn`ed subprocess now works by using the methods and properties on the returned class of the `spawn` method.
2022-11-27fix(npm): ensure npm package downloaded once per run when using `--reload` ↵David Sherret
(#16842)
2022-11-27Revert "fix(ext/flash): graceful server startup/shutdown with unsettl… ↵Bartek Iwańczuk
(#16839) …ed promises in mind (#16616)" This reverts commit fd023cf7937e67dfde5482d34ebc60839eb7397c. There are reports saying that Vite is often hanging in 1.28.2 and this is the only PR that changed something with HTTP server. I think we should hold off on trying to fix this and instead focus on #16787 CC @magurotuna
2022-11-27feat(core): send "executionContextDestroyed" notification on program end ↵Bartek Iwańczuk
(#16831) This commit changes "JsRuntime" to send "executionContextDestroyed" notification when the program finishes and shows a prompt informing that runtime is waiting for inspector to disconnect.
2022-11-26tests: move integration tests to separate modules (#16816)Bartek Iwańczuk
2022-11-25refactor: move dts files, diagnostics.rs, and tsc.rs to tsc folder (#16820)David Sherret
2022-11-25fix(npm): better error message when attempting to use typescript in npm ↵David Sherret
packages (#16813)
2022-11-24fix(task): output encoding issues on windows (#16794)David Sherret
Closes #16792
2022-11-24fix(npm/types): resolve main entrypoint declaration file when no types entry ↵David Sherret
(#16791) Closes #16782
2022-11-24fix(ext/flash): graceful server startup/shutdown with unsettled promises in ↵Yusuke Tanaka
mind (#16616) This PR resets the revert commit made by #16610, bringing back #16383 which attempts to fix the issue happening when we use the flash server with `--watch` option enabled. Also, some code changes are made to pass the regression test added in #16610.