summaryrefslogtreecommitdiff
path: root/cli/tests
AgeCommit message (Collapse)Author
2023-11-27feat(fmt): support formatting code blocks in Jupyter notebooks (#21310)scarf
2023-11-25feat(unstable): --unstable-unsafe-proto (#21313)David Sherret
Closes https://github.com/denoland/deno/issues/21276
2023-11-25chore(ext/node): remove unnecessary test case (#21337)Yoshiya Hinosawa
This test case is covered by the last case in https://github.com/denoland/deno/blob/5710fffb120eba88e1b261e3ef379cb02575de42/cli/tests/node_compat/test/parallel/test-stream2-transform.js and not necessary anymore.
2023-11-25chore: update node_compat test suites to v18.18.2 (#21328)Yoshiya Hinosawa
2023-11-24fix(lsp): handle byonm specifiers in jupyter notebooks (#21332)David Sherret
Part of https://github.com/denoland/deno/issues/21308
2023-11-24chore: deflake unit_node/crypto/crypto_key_test.ts (#21331)Bartek Iwańczuk
Ref https://github.com/denoland/deno/issues/21187 On CI we are going to run only fast tests, with an option to pass `SLOW_TESTS=1` env var to enable more comprehensive tests.
2023-11-23chore: fix upgrade_prompt test on main (#21314)David Sherret
Issue was main does canary builds, which broke this test because it didn't handle searching for a canary release. Tested by building as canary locally.
2023-11-23chore: add upgrade prompt integration test (#21273)David Sherret
1. Adds an upgrade prompt integration test. 1. Adds a test for when the upgrade check takes a long time in the repl.
2023-11-23fix(ext/node): fix node:stream.Writable (#21297)Yoshiya Hinosawa
This change applies the same fix as https://github.com/nodejs/node/pull/46818, and the original example given in #20456 works as expected. closes #20456
2023-11-22refactor: replace `deferred()` from `std/async` with ↵Asher Gomez
`Promise.withResolvers()` (#21234) Closes #21041 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-11-22Revert "chore: update to `std@0.207.0` (#21284)" (#21295)Bartek Iwańczuk
This reverts commit 20aa0796e6ff7651cdfce4d0292bdb11da5dfe2e. `main` has been failing consistenly on `kv_undelivered_test` and `serve_test` after this upgrade.
2023-11-22fix: 'Promise was collected' error in REPL/jupyter (#21272)Bartek Iwańczuk
Fixes #20528
2023-11-22chore: update to `std@0.207.0` (#21284)Asher Gomez
Closes #21002
2023-11-20fix: Deno.noColor should not be true when NO_COLOR is empty string (#21275)David Sherret
Closes https://github.com/denoland/deno/issues/21274
2023-11-20fix(ext/node): handle closing process.stdin more than once (#21267)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/21112 Aligns more towards what Node.js does. Closing stdin more than once is a nop.
2023-11-19fix(ext,runtime): add missing custom inspections (#21219)Kenta Moriuchi
2023-11-18fix(ext/http): fix crash in dropped Deno.serve requests (#21252)Matt Mastracci
Fixes #21250 We were attempting to recycle dropped resource responses too early.
2023-11-17chore: combine `TestCommandBuilder` with `DenoCmd` (#21248)David Sherret
2023-11-18chore: disable curl --http2 tests (#21247)Matt Mastracci
2023-11-17test(cli): http test reliability fixes (#21246)Matt Mastracci
2023-11-17chore(cli): Fix rename test for XFS (#21215)Florian Schwalm
Renaming a directory to a path where a non-empty directory already exists was asserted to always fail with `ENOTEMPTY` According to glibc manual the function may also fail with `EEXIST` on "some other systems". One such case is using XFS [^1]. This commit handles the EEXIST case. [^1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/xfs/xfs_inode.c?h=v4.18&id=94710cac0ef4ee177a63b5227664b38c95bbf703#n3082
2023-11-17ci: fix flaky stdio_streams_are_locked_in_permission_prompt (#21238)David Sherret
Part of #21187
2023-11-17chore: various improvements to tests (#21222)David Sherret
2023-11-17feat(unstable): Workspaces support (#20410)Bartek Iwańczuk
This commit adds unstable workspace support. This is extremely bare-bones and minimal first-pass at this. With this change `deno.json` supports specifying `workspaces` key, that accepts a list of subdirectories. Each workspace can have its own import map. It's required to specify a `"name"` and `"version"` properties in the configuration file for the workspace: ```jsonc // deno.json { "workspaces": [ "a", "b" }, "imports": { "express": "npm:express@5" } } ``` ``` jsonc // a/deno.json { "name": "a", "version": "1.0.2", "imports": { "kleur": "npm:kleur" } } ``` ```jsonc // b/deno.json { "name": "b", "version": "0.51.0", "imports": { "chalk": "npm:chalk" } } ``` `--unstable-workspaces` flag is required to use this feature: ``` $ deno run --unstable-workspaces mod.ts ``` --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2023-11-16fix(npm): support cjs entrypoint in node_modules folder (#21224)David Sherret
Closes #21109
2023-11-16feat(ext/cron) modify Deno.cron API to make handler arg last (#21225)Igor Zinkovsky
This PR changes the `Deno.cron` API: * Marks the existing function as deprecated * Introduces 2 new overloads, where the handler arg is always last: ```ts Deno.cron( name: string, schedule: string, handler: () => Promise<void> | void, ) Deno.cron( name: string, schedule: string, options?: { backoffSchedule?: number[]; signal?: AbortSignal }, handler: () => Promise<void> | void, ) ``` This PR also fixes a bug, when other crons continue execution after one of the crons was closed using `signal`.
2023-11-15feat(ext/net): use rustls_tokio_stream (#21205)Matt Mastracci
Fixes #21121 and #19498 Migrates fully to rustls_tokio_stream. We no longer need to maintain our own TlsStream implementation to properly support duplex. This should fix a number of errors with TLS and websockets, HTTP and "other" places where it's failing.
2023-11-15fix(runtime): fix Deno.noColor when stdout is not tty (#21208)Yoshiya Hinosawa
2023-11-14chore: switch compile tests over to the TestBuilder (#21180)David Sherret
2023-11-14fix(ext/node): add APIs perf_hook.performance (#21192)Bartek Iwańczuk
Required for Next.js.
2023-11-14fix(ext/web): webstorage has trap for symbol (#21090)Kenta Moriuchi
2023-11-13chore(cli): unflake signal test (#21185)Matt Mastracci
If these tests do eventually break, they'll time out.
2023-11-13chore(ext/web): use a non-resource stream for ↵Matt Mastracci
textDecoderStreamCleansUpOnCancel (#21181) Follow-up fix to #21074
2023-11-13fix(install): should work with non-existent relative root (#21161)David Sherret
Closes #21160
2023-11-12fix(lsp): update tsconfig after refreshing settings on init (#21170)Nayeem Rahman
2023-11-12fix(ext/web): Prevent TextDecoderStream resource leak on stream cancellation ↵Florian Schwalm
(#21074) This PR uses the new `cancel` method of `TransformStream` to properly clean up the internal `TextDecoder` used in `TextDecoderStream` if the stream is cancelled. Fixes #13142 Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-11-11fix(ext/node): Re-enable alloc max size test (#21059)Kenta Moriuchi
Ref #21036
2023-11-11fix(node/http): export globalAgent (#21081)Jacob Hummer
Fixes #21080 Fixes #18312 --------- Signed-off-by: Jacob Hummer <jcbhmr@outlook.com>
2023-11-10chore(cli): Migrate some unit tests to "Promise.withResolvers()" (#21128)Tareque Md Hanif
Migrate to use `Promise.withResolvers()` instead of `deferred` in some of the tests in `cli/tests/unit/`. Issue: #21041
2023-11-10fix(ext/node): implement process.geteuid (#21151)Divy Srivastava
Fixes #21097
2023-11-10fix: improve `deno doc --lint` error messages (#21156)David Sherret
This also updates deno_graph, which has the JSR change to use "exports". It's not yet useful atm, so I've made this PR a fix about the deno doc --lint error message improvements. I'll do a follow-up PR that adds exports to the deno.json
2023-11-10chore: use internal namespace in 40_testing.js (#21141)Divy Srivastava
Towards #21136 - [x] assign serializePermissions, setTimeout and setExitHandler APIs to internal namespace - [x] remove usage of assert
2023-11-10fix(test) reduce queue persistence test time from 60 secs to 6 secs (#21142)Igor Zinkovsky
This PR reduces the time to run `queue persistence with inflight messages` test from 60 seconds down to about 6 seconds. The test simulates a crash to ensure that inflight messages are cleaned up and re-queued when the new process starts. Since messages are considered dead after 5 seconds of being queued, reopening the db within 5 seconds does not re-queue the messages on startup (they do get re-queued after 60 seconds, which is the cleanup frequency). By waiting for 5 seconds before reopening the db, the test ensures that the cleanup happens quickly when the db is opened.
2023-11-10fix(node/child_process): properly normalize stdio for 'spawnSync' (#21103)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/20782
2023-11-09perf: remove knowledge of promise IDs from deno (#21132)Matt Mastracci
We can move all promise ID knowledge to deno_core, allowing us to better experiment with promise implementation in deno_core. `{un,}refOpPromise(promise)` is equivalent to `{un,}refOp(promise[promiseIdSymbol])`
2023-11-09fix(node): implement createPrivateKey (#20981)Divy Srivastava
Towards #18455
2023-11-08chore: refactor test_server and move to rustls-tokio-stream (#21117)Matt Mastracci
Remove tokio-rustls as a direct dependency of Deno and refactor test_server to reduce code duplication. All tcp and tls listener paths go through the same streams now, with the exception of the simpler Hyper http-only handlers (those can be done in a later follow-up). Minor bugs fixed: - gRPC server should only serve h2 - WebSocket over http/2 had a port overlap - Restored missing eye-catchers for some servers (still missing on Hyper ones)
2023-11-07fix(ext/http): Throwing Error if the return value of Deno.serve handler is ↵Aravind
not a Response class (#21099) --------- Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-11-07fix(node): cjs export analysis should probe for json files (#21113)David Sherret
Closes #21064
2023-11-07fix(node): inspect ancestor directories when resolving cjs re-exports during ↵David Sherret
analysis (#21104) If a CJS re-export can't be resolved, it will check the ancestor directories, which is more similar to what `require` does at runtime.