summaryrefslogtreecommitdiff
path: root/cli/tests
AgeCommit message (Collapse)Author
2023-02-23test(ext/node): add tty_test and util_test (#17868)Yoshiya Hinosawa
2023-02-23test(ext/node): add tls_test (#17871)Yoshiya Hinosawa
2023-02-22fix(npm): resolve node_modules dir relative to package.json instead of cwd ↵David Sherret
(#17885)
2023-02-22feat: support bare specifier resolution with package.json (#17864)Bartek Iwańczuk
This commit enables resolution of "bare specifiers" (eg. "import express from 'express';") if a "package.json" file is discovered. It's a step towards being able to run projects authored for Node.js without any changes. With this commit we are able to successfully run Vite projects without any changes to the user code. --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2023-02-22feat(permissions): grant all permission for a group in permission prompt ↵Asher Gomez
(#17140) This commit adds new "A" option to the interactive permission prompt, that will allow all subsequent permissions for given group (domain). Ie. when querying for permissions to access eg. env variables responding with "A" will allow access to all environmental variables. This works for all permission domains and should make permission prompts more ergonomic for users.
2023-02-22refactor: use deno_graph for npm specifiers (#17858)David Sherret
This changes npm specifiers to be handled by deno_graph and resolved to an npm package name and version when the specifier is encountered. It also slightly changes how npm specifier resolution occurs—previously it would collect all the npm specifiers and resolve them all at once, but now it resolves them on the fly as they are encountered in the module graph. https://github.com/denoland/deno_graph/pull/232 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-02-22feat(ext/ffi): Replace pointer integers with v8::External objects (#16889)Aapo Alasuutari
2023-02-22fix(lint): revert no-deprecated-api for Deno.run (#17880)David Sherret
2023-02-22fix(ext/node): fix node stream (#17874)Yoshiya Hinosawa
2023-02-22fix(ext/node): fix webcrypto export (#17838)Yoshiya Hinosawa
2023-02-22fix(ext/node): fix process.uptime (#17839)Yoshiya Hinosawa
2023-02-20feat: auto-discover package.json for npm dependencies (#17272)Bartek Iwańczuk
This commits adds auto-discovery of "package.json" file when running "deno run" and "deno task" subcommands. In case of "deno run" the "package.json" is being looked up starting from the directory of the script that is being run, stopping early if "deno.json(c)" file is found (ie. FS tree won't be traversed "up" from "deno.json"). When "package.json" is discovered the "--node-modules-dir" flag is implied, leading to creation of local "node_modules/" directory - we did that, because most tools relying on "package.json" will expect "node_modules/" directory to be present (eg. Vite). Additionally "dependencies" and "devDependencies" specified in the "package.json" are downloaded on startup. This is a stepping stone to supporting bare specifier imports, but the actual integration will be done in a follow up commit. --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2023-02-20perf: use ops for node:crypto ciphers (#17819)Divy Srivastava
Towards #17809
2023-02-20test(ext/node): more node compat tests (#17827)Yoshiya Hinosawa
This PR adds the remaining ~650 Node.js compat test cases from std/node. Among these 650 cases, about 130 cases are now failing. These failing cases are prefixed with `TODO:` in `tests/node_compat/config.json`. These will be addressed in later PRs.
2023-02-17test: add node compat tests (#17805)Yoshiya Hinosawa
2023-02-17feat(ext/node): implement `node:v8` (#17806)Divy Srivastava
Closes https://github.com/denoland/deno/issues/17115 Implements `cachedDataVersionTag` and `getHeapStatistics`.
2023-02-16test: add unit tests from std/node (#17794)Bartek Iwańczuk
Adds two test files: "cli/tests/unit_node/process_test.ts" and "cli/tests/unit_node/child_process_test.ts" --------- Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-02-16test: ignore inspector tests for npm integration (#17796)Bartek Iwańczuk
I will revisit and fix the test after we move along with "ext/node" integration. eg. https://github.com/denoland/deno/actions/runs/4189205563/jobs/7261246149
2023-02-15feat: wire up ext/node to the Node compatibility layer (#17785)Bartek Iwańczuk
This PR changes Node.js/npm compatibility layer to use polyfills for built-in Node.js embedded in the snapshot (that are coming from "ext/node" extension). As a result loading `std/node`, either from "https://deno.land/std@<latest>/" or from "DENO_NODE_COMPAT_URL" env variable were removed. All code that is imported via "npm:" specifiers now uses code embedded in the snapshot. Several fixes were applied to various modules in "ext/node" to make tests pass. --------- Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com> Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-02-15refactor: make resolver required (#17783)David Sherret
Makes the resolver required and prints a warning when vendoring and a dynamic import can't be resolved. Closes #16522
2023-02-15feat(flash): add 2nd param to handler to get remote address (#17633)Leo Kettmeir
Closes #17583
2023-02-14fix: loading built-in Node modules embedded in the binary (#17777)Bartek Iwańczuk
Fixes bug introduced in ed3a7ce2f719e64e59cfebb3d131a05a1694523b that caused errors when loading built-in Node modules, when using "deno_graph".
2023-02-14feat: Deprecate 'deno bundle' subcommand (#17695)Bartek Iwańczuk
This commit adds a deprecation warning when using "deno bundle" subcommand and removes it from the output of "deno help".
2023-02-12fix: add WouldBlock error (#17339)Leo Kettmeir
2023-02-12perf(http): remove allocations checking upgrade and connection header values ↵David Sherret
(#17727)
2023-02-12fix(ext/flash): Always send correct number of bytes when handling HEAD ↵Kamil Ogórek
requests (#17740) This was not caught in the previous test case, as the response body was smaller than the size of `HEAD` response. This made `nwritten < responseLen` check in `writeFixedResponse` to fail, and not trigger `op_flash_respond_async` as a result. When the response body is larger than the `HEAD` though, as in the updated test case (`HEAD` i 120 bytes, where our response is 300 bytes), it would think that we still have something to send, and effectively panic, as `op_flash_respond` already removed the request from the pool. This change, makes the `handleResponse` function always calculate the number of bytes to transmit when `HEAD` request is encountered. Effectively ignoring `Content-Length` of the body, but still setting it correctly in the request header itself. Fixes https://github.com/denoland/deno/issues/17737
2023-02-11fix(cli/graph_util): don't append referrer info for root module errors (#17730)Nayeem Rahman
2023-02-11feat: add signal option to Deno.resolveDns (#17384)Leo Kettmeir
Closes #14406
2023-02-11feat: add more variants to Deno.build.os (#17340)Leo Kettmeir
Closes #14799
2023-02-11fix(ops): Always close cancel handles for read_async/write_async (#17736)Kamil Ogórek
Fixes https://github.com/denoland/deno/issues/17734
2023-02-09refactor: deno_graph 0.43 upgrade (#17692)David Sherret
2023-02-08fix: use static Reflect methods in nodeGlobalThis proxy (#17696)Kamil Ogórek
Co-authored-by: David Sherret <dsherret@gmail.com>
2023-02-08fix(ext/console): Only right-align integers in console.table() (#17389)Waldir Pimenta
2023-02-07 refactor: remove prefix from include_js_files & use extension name (#17683)Leo Kettmeir
2023-02-07refactor: Use ES modules for internal runtime code (#17648)Leo Kettmeir
This PR refactors all internal js files (except core) to be written as ES modules. `__bootstrap`has been mostly replaced with static imports in form in `internal:[path to file from repo root]`. To specify if files are ESM, an `esm` method has been added to `Extension`, similar to the `js` method. A new ModuleLoader called `InternalModuleLoader` has been added to enable the loading of internal specifiers, which is used in all situations except when a snapshot is only loaded, and not a new one is created from it. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-02-07chore: upgrade rusty_v8 to 0.62.2 (#17604)Bartek Iwańczuk
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2023-02-07chore: forward v1.30.3 release commit to main (#17677)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-02-06chore: update std submodule to 0.176.0 (#17668)Bartek Iwańczuk
2023-02-06fix: revert lsp related internal specifiers (#17673)Leo Kettmeir
To fix reports of breakage from #17655
2023-02-05 refactor: rename `deno` specifiers to `internal` (#17655)Leo Kettmeir
2023-02-05fix(ext/console): log class for class constructor (#17615)Gasman
Co-authored-by: tannal <tannal.cn@gmail.com>
2023-02-03refactor: reland "preserve ProcState::file_fetcher between restarts" (#17636)Nayeem Rahman
Just some watcher init step that I thought would be "cloned over" but needs to be done again on reset.
2023-02-01fix(repl): handle @types/node not being cached in the repl (#17617)David Sherret
Closes #17599
2023-02-01fix(lockfile): emit trailing newline (#17618)David Sherret
2023-01-30Revert "fix(watch): preserve `ProcState::file_fetcher` between restarts ↵Bartek Iwańczuk
(#15466) (#17591) This reverts commit 3545bff678f20c3fdf17fe6b26f96cf1b74f917c.
2023-01-29fix(ext): internal `structuredClone` for `ArrayBuffer` and `TypedArray` ↵Kenta Moriuchi
subclasses (#17431)
2023-01-28fix(lsp): update document dependencies on configuration change (#17556)David Sherret
2023-01-27fix: ensure "fs" -> "node:fs" error/quick fix works when user has import map ↵David Sherret
(#17566) Closes #17563
2023-01-27chore: upgrade to Rust 1.67 (#17548)David Sherret
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-25fix: support import map specified as data uri (#17531)David Sherret