summaryrefslogtreecommitdiff
path: root/cli/tests
AgeCommit message (Collapse)Author
2023-12-15refactor: check if scope and package exist before publish (#21575)Bartek Iwańczuk
Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2023-12-14fix(node): support resolving a package.json import to a builtin node module ↵David Sherret
(#21576) Closes https://github.com/denoland/deno/issues/21501
2023-12-14fix(node): return false from vm.isContext (#21568)Divy Srivastava
https://github.com/denoland/deno/issues/20851#issuecomment-1779226106 for `jsdom`
2023-12-13fix(zlib): handle no flush flag in handle_.write (#21432)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/21096
2023-12-14feat(unstable): append commit versionstamp to key (#21556)Heyang Zhou
2023-12-13refactor(cli): update to new deno_core promise/call methods (#21519)Matt Mastracci
2023-12-13fix(websockets): server socket field initialization (#21433)Divy Srivastava
2023-12-13fix(runtime): Make native modal keyboard interaction consistent with ↵lionel-rowe
browsers (#18453) Fixes https://github.com/denoland/deno/issues/18223. Fixes https://github.com/denoland/deno/issues/21477 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: David Sherret <dsherret@gmail.com>
2023-12-13fix: implement child_process IPC (#21490)Divy Srivastava
This PR implements the Node child_process IPC functionality in Deno on Unix systems. For `fd > 2` a duplex unix pipe is set up between the parent and child processes. Currently implements data passing via the channel in the JSON serialization format.
2023-12-13test: integration tests for tarring/unfurling (#21544)Bartek Iwańczuk
2023-12-12feat(ext/kv) add backoffSchedule to enqueue (#21474)Igor Zinkovsky
Also reduces the time to run `kv_queue_undelivered_test.ts` test from 100 seconds down to 3 seconds. closes #21437
2023-12-12fix(coverage): rename --pretty to --detailed (#21543)Yoshiya Hinosawa
2023-12-12perf(lsp): use null types instead of stub modules (#21541)Nayeem Rahman
2023-12-12feat(coverage): add summary reporter (#21535)Yoshiya Hinosawa
2023-12-12perf(ext/ffi): switch from middleware to tasks (#21239)Matt Mastracci
Deno-side changes for https://github.com/denoland/deno_core/pull/350 --------- Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
2023-12-11perf(lsp): instrument all ops with performance marks (#21536)Bartek Iwańczuk
Adds performance measurements for all ops used by the LSP. Also changes output of "Language server status" page to include more precise information. Current suspicion is that computing "script version" takes a long time for some users.
2023-12-11fix: allow reserved word 'mod' in exports (#21537)Ryan Dahl
This problem occurred trying to load tensorflow.js ``` > import * as tf from 'npm:@tensorflow/tfjs'; Uncaught SyntaxError: Identifier 'mod' has already been declared at file:///Users/ry/Library/Caches/deno/npm/registry.npmjs.org/@tensorflow/tfjs/4.14.0/dist/tf.node.js:167:14 at async <anonymous>:1:33 ```
2023-12-11fix(coverage): escape source code in html coverage report (#21531)Yoshiya Hinosawa
2023-12-11test(ext/node): enable some compat test cases (#21532)Yoshiya Hinosawa
This change uncomments Node.js compat test cases which was enabled by the addition of `vm.runInNewContext` https://github.com/denoland/deno/pull/21527
2023-12-11fix(ext/node): basic vm.runInNewContext implementation (#21527)Divy Srivastava
Simple implementation to support webpack (& Next.js): https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/javascript/JavascriptParser.js#L4329
2023-12-11fix(ext/node): ServerResponse getHeader() return undefined (#21525)Divy Srivastava
Matches Node's return type. Next.js check for `if (header === undefined)`: https://github.com/vercel/next.js/blob/e02fe314dcd0ae614c65b505c6daafbdeebb920e/packages/next/src/server/base-http/node.ts#L93
2023-12-11fix(ext/node): stub ServerResponse#flushHeaders (#21526)Divy Srivastava
This commit adds a no-op flushHeaders method to the ServerResponse object. It is a nop because the ServerResponse implementation is based on top of the Deno server API instead of the Node `OutgoingMessage` base. Fixes #21509
2023-12-09feat: bring back WebGPU (#20812)Leo Kettmeir
Signed-off-by: Leo Kettmeir <crowlkats@toaxl.com> Co-authored-by: Kenta Moriuchi <moriken@kimamass.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-12-08feat(lsp): provide quick fixes for specifiers that could be resolved ↵David Sherret
sloppily (#21506)
2023-12-08fix(unstable): Honor granular unstable flags in js runtime (#21466)Julien Cayzac
This fixes #21434 for `BroadcastChannel` and `WebSocketStream`. `--unstable` still enable both, but granular unstable flags now also work: * `--unstable-net` now enables `WebSocketStream`. * `--unstable-broadcast-channel` now enables `BroadcastChannel`. * Additionally, there are now tests for all granular unstable flags. Since `unsafe-proto` already had tests, so I didn't add any for this one. It also introduces a map to keep track of granular unstable ids without having to sync multiple places.
2023-12-08fix(ext/node): allow null value for req.setHeader (#21391)Yoshiya Hinosawa
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-12-08feat(coverage): add html reporter (#21495)Yoshiya Hinosawa
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-12-07fix: add more warnings when using sloppy imports (#21503)David Sherret
One warning for when using it with `deno compile` and another when using it with `deno run`.
2023-12-07feat: add suggestions to module not found error messages for file urls (#21498)David Sherret
2023-12-07fix(ext/node): include non-enumerable keys in `Reflect.ownKeys(globalThis)` ↵ud2
(#21485) Closes #21484.
2023-12-07feat(unstable): ability to resolve specifiers with no extension, specifiers ↵David Sherret
for a directory, and TS files from JS extensions (#21464) Adds an `--unstable-sloppy-imports` flag which supports the following for `file:` specifiers: * Allows writing `./mod` in a specifier to do extension probing. - ex. `import { Example } from "./example"` instead of `import { Example } from "./example.ts"` * Allows writing `./routes` to do directory extension probing for files like `./routes/index.ts` * Allows writing `./mod.js` for *mod.ts* files. This functionality is **NOT RECOMMENDED** for general use with Deno: 1. It's not as optimal for perf: https://marvinh.dev/blog/speeding-up-javascript-ecosystem-part-2/ 1. It makes tooling in the ecosystem more complex in order to have to understand this. 1. The "Deno way" is to be explicit about what you're doing. It's better in the long run. 1. It doesn't work if published to the Deno registry because doing stuff like extension probing with remote specifiers would be incredibly slow. This is instead only recommended to help with migrating existing projects to Deno. For example, it's very useful for getting CJS projects written with import/export declaration working in Deno without modifying module specifiers and for supporting TS ESM projects written with `./mod.js` specifiers. This feature will output warnings to guide the user towards correcting their specifiers. Additionally, quick fixes are provided in the LSP to update these specifiers:
2023-12-06chore: bump deno_core and update tests (#21467)Matt Mastracci
Landing changes required for https://github.com/denoland/deno_core/pull/359 We needed to update 99_main.js and a whole load of tests. API changes: - setPromiseRejectCallback becomes setUnhandledPromiseRejectionHandler. The function is now called from eventLoopTick. - The promiseRejectMacrotaskCallback no longer exists, as this is automatically handled in eventLoopTick. - ops.op_dispatch_exception now takes a second parameter: in_promise. The preferred way to call this op is now reportUnhandledException or reportUnhandledPromiseRejection.
2023-12-06feat: TypeScript 5.3 (#21480)David Sherret
https://github.com/denoland/TypeScript/pull/9
2023-12-06fix(task): handle node_modules/.bin directory with byonm (#21386)David Sherret
A bit hacky, but it works. Essentially, this will check for all the scripts in the node_modules/.bin directory then force them to run with Deno via deno_task_shell.
2023-12-06fix(compile/npm): ignore symlinks to non-existent paths in node_modules ↵David Sherret
directory (#21479) Part of https://github.com/denoland/deno/issues/21476
2023-12-06fix(npm): do not create symlink for non-system optional dep in node_modules ↵David Sherret
directory (#21478) Closes https://github.com/denoland/deno/issues/21476
2023-12-07test(ext/node): compare free memory in log scale (#21475)Yoshiya Hinosawa
2023-12-06feat(ext/web): add ImageData Web API (#21183)Jamie
Fixes #19288 Adds the `ImageData` Web API. This would be beneficial to projects using `ImageData` as a convenient transport layer for pixel data. This is common in Web Assembly projects that manipulate images. Having this global available in Deno would improve compatibility of existing JS libraries. **References** - [MDN ImageData Web API](https://developer.mozilla.org/en-US/docs/Web/API/ImageData) - [whatwg HTML Standard Canvas Spec](https://html.spec.whatwg.org/multipage/canvas.html#pixel-manipulation)
2023-12-06feat(ext/fetch): allow `Deno.HttpClient` to be declared with `using` (#21453)Yusuke Tanaka
This commit adds a method of `Symbol.dispose` to the object returned from `Deno.createHttpClient`, so we can make use of [explicit resource management](https://github.com/tc39/proposal-explicit-resource-management) by declaring it with `using`.
2023-12-06chore: forward v1.38.5 release commit to main (#21472)Bartek Iwańczuk
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
2023-12-05fix(ext/kv): throw error if already closed (#21459)Raashid Anwar
If KV is closed and tries to listen queue should throw an error closes #20991
2023-12-05refactor(cli): refactor bench/test for future module changes (#21460)Matt Mastracci
Extracting some refactorings for the module work that will land in https://github.com/denoland/deno_core/pull/359/
2023-12-05feat(unstable): kv.watch() (#21147)Luca Casonato
This commit adds support for a new `kv.watch()` method that allows watching for changes to a key-value pair. This is useful for cases where you want to be notified when a key-value pair changes, but don't want to have to poll for changes. --------- Co-authored-by: losfair <zhy20000919@hotmail.com>
2023-12-04perf(node/fs): faster `existsSync` when not exists (#21458)David Sherret
2023-12-03fix(ext/node): sign with PEM private keys (#21287)Divy Srivastava
Add support for signing with a RSA PEM private key: `pkcs8` and `pkcs1`. Fixes https://github.com/denoland/deno/issues/18972 Ref #21124 Verified fix with `npm:sshpk`. Unverfied but fixes `npm:google-auth-library`, `npm:web-push` & `oracle/oci-typescript-sdk` --------- Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-12-02fix(node): setting process.exitCode should change exit code of process (#21429)David Sherret
2023-12-02chore: update std to 0.208.0 (#21318)Asher Gomez
Re-attempt at #21284. I was more thorough this time. --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-12-01feat(compile): support discovering modules for more dynamic arguments (#21381)David Sherret
This PR causes Deno to include more files in the graph based on how a template literal looks that's provided to a dynamic import: ```ts const file = await import(`./dir/${expr}`); ``` In this case, it will search the `dir` directory and descendant directories for any .js/jsx/etc modules and include them in the graph. To opt out of this behaviour, move the template literal to a separate line: ```ts const specifier = `./dir/${expr}` const file = await import(specifier); ```
2023-12-01fix(permissions): fix panics when revoking net permission (#21388)liruifengv
fix #21385
2023-12-01refactor: use resourceForReadableStream for fetch (#20217)Matt Mastracci
Switch `ext/fetch` over to `resourceForReadableStream` to simplify and unify implementation with `ext/serve`. This allows us to work in Rust with resources only. Two additional changes made to `resourceForReadableStream` were required: - Add an optional length to `resourceForReadableStream` which translates to `size_hint` - Fix a bug where writing to a closed stream that was full would panic