summaryrefslogtreecommitdiff
path: root/test_util
AgeCommit message (Collapse)Author
2023-05-31refactor: further work on node http client (#19327)Leo Kettmeir
Closes https://github.com/denoland/deno/issues/18300
2023-05-27fix(compile): inline symlinks as files outside node_modules dir and warn for ↵David Sherret
directories (#19285) If a symlink within the `node_modules` directory lies outside that directory, it will now warn and inline the file. For directories, it will just warn for now. Probably fixes #19251 (I'm still unable to reproduce).
2023-05-26fix(compile): implicit read permission to npm vfs (#19281)David Sherret
Closes #19280
2023-05-26chore(lsp/tests): diagnostic synchronization (reland) (#19270)David Sherret
Merge on approval as it fixes the flaky test.
2023-05-26Revert "chore(lsp/tests): diagnostic synchronization (#19264)" (#19268)Bartek Iwańczuk
This reverts commit 89026abe395c22eb2ace4ea5f948189daa1dadf1. This change caused LSP benchmarks to fail on `main`.
2023-05-26chore(lsp/tests): diagnostic synchronization (#19264)David Sherret
Fixes the flaky lsp test by having better synchronization of diagnostics between the client and server for testing purposes.
2023-05-22feat(lsp): support lockfile and node_modules directory (#19203)David Sherret
This adds support for the lockfile and node_modules directory to the lsp. In the case of the node_modules directory, it is only enabled when explicitly opted into via `"nodeModulesDir": true` in the configuration file. This is to reduce the language server automatically modifying the node_modules directory when the user doesn't want it to. Closes #16510 Closes #16373
2023-05-23refactor: further work on node http client (#19211)Leo Kettmeir
2023-05-22chore(cli): One Rust test per JS and Node unit test file (#19199)Matt Mastracci
This runs our `js_unit_tests` and `node_unit_tests` in parallel, one rust test per JS unit test file. Some of our JS tests don't like running in parallel due to port requirements, so this also makes those use a specific port-per-file. This does not attempt to make the node-compat tests work.
2023-05-21feat(unstable): add more options to Deno.createHttpClient (#17385)Leo Kettmeir
2023-05-19feat(vendor): support for npm specifiers (#19186)David Sherret
We never properly added support for this. This fixes vendoring when it has npm or node specifiers. Vendoring occurs by adding a `"nodeModulesDir": true` property to deno.json then it uses a local node_modules directory. This can be opted out by setting `"nodeModulesDir": false` or running with `--node-modules-dir=false`. Closes #18090 Closes #17210 Closes #17619 Closes #16778
2023-05-17fix(npm): improved optional dependency support (#19135)David Sherret
Note: If the package information has already been cached, then this requires running with `--reload` or for the registry information to be fetched some other way (ex. the cache busting). Closes #15544 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-17fix: support "fetch" over HTTPS for IP addresses (#18499)Bartek Iwańczuk
This commit adds support for connecting to IP addresses over HTTPS. This is done by updating "rustls" to "0.21.0" and other related crates. Closes https://github.com/denoland/deno/issues/7660 Closes https://github.com/denoland/deno/issues/17967 --------- Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-05-11feat(lsp): ability to configure document pre-load limit (#19097)David Sherret
Adds a `deno.preloadLimit` option (ex. `"deno.preloadLimit": 2000`) which specifies how many file entries to traverse on the file system when the lsp loads or its configuration changes. Closes #18955
2023-05-10feat(compile): unstable npm and node specifier support (#19005)David Sherret
This is the initial support for npm and node specifiers in `deno compile`. The npm packages are included in the binary and read from it via a virtual file system. This also supports the `--node-modules-dir` flag, dependencies specified in a package.json, and npm binary commands (ex. `deno compile --unstable npm:cowsay`) Closes #16632
2023-04-23chore: remove tokio-tungstenite dependency (#18814)Bartek Iwańczuk
2023-04-22refactor: rewrite tests to "fastwebsockets" crate (#18781)Bartek Iwańczuk
Migrating off of `tokio-tungstenite` crate. --------- Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-04-13refactor(cli,ext,ops): cleanup `regex` with `lazy-regex` (#17296)Yiyu Lin
- bump deps: the newest `lazy-regex` need newer `oncecell` and `regex` - reduce `unwrap` - remove dep `lazy_static` - make more regex cached --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-04-06fix(npm): reload an npm package's dependency's information when version not ↵David Sherret
found (#18622) This reloads an npm package's dependency's information when a version/version req/tag is not found. This PR applies only to dependencies of npm packages. It does NOT yet cause npm specifiers to have their dependency information cache busted. That requires a different solution, but this should help cache bust in more scenarios. Part of #16901, but doesn't close it yet
2023-04-01fix(check): ensure diagnostics caused by changes in other files get ↵David Sherret
invalidated between runs (#18541) Regression caused by the performance improvement in #18329. Figuring this out was hard. It's luckily still fast after this change. Closes #18516
2023-03-30fix(lsp): include all diagnosable documents on initialize (#17979)David Sherret
Closes https://github.com/denoland/vscode_deno/issues/797 Closes https://github.com/denoland/deno/issues/11190 Closes https://github.com/denoland/vscode_deno/issues/811 Closes https://github.com/denoland/vscode_deno/issues/761 Closes https://github.com/denoland/vscode_deno/issues/585 Closes https://github.com/denoland/vscode_deno/issues/561 Closes https://github.com/denoland/vscode_deno/issues/410
2023-03-30fix(repl): improve package.json support (#18497)David Sherret
1. Fixes a cosmetic issue in the repl where it would display lsp warning messages. 2. Lazily loads dependencies from the package.json on use. 3. Supports using bare specifiers from package.json in the REPL. Closes #17929 Closes #18494
2023-03-28chore: restore pty tests and make them run on the Linux CI (#18424)David Sherret
1. Rewrites the tests to be more back and forth rather than getting the output all at once (which I believe was causing the hangs on linux and maybe mac) 2. Runs the pty tests on the linux ci. 3. Fixes a bunch of tests that were just wrong. 4. Adds timeouts on the pty tests.
2023-03-27feat(core): initialize SQLite off-main-thread (#18401)Matt Mastracci
This gets SQLite off the flamegraph and reduces initialization time by somewhere between 0.2ms and 0.5ms. In addition, I took the opportunity to move all the cache management code to a single place and reduce duplication. While the PR has a net gain of lines, much of that is just being a bit more deliberate with how we're recovering from errors. The existing caches had various policies for dealing with cache corruption, so I've unified them and tried to isolate the decisions we make for recovery in a single place (see `open_connection` in `CacheDB`). The policy I chose was: 1. Retry twice to open on-disk caches 2. If that fails, try to delete the file and recreate it on-disk 3. If we fail to delete the file or re-create a new cache, use a fallback strategy that can be chosen per-cache: InMemory (temporary cache for the process run), BlackHole (ignore writes, return empty reads), or Error (fail on every operation). The caches all use the same general code now, and share the cache failure recovery policy. In addition, it cleans up a TODO in the `NodeAnalysisCache`.
2023-03-25chore: update wpt again (#18384)Kenta Moriuchi
This reverts commit 4c2269d64a7dda1397d49bd235e5546470a683ea. > This update introduced more flakiness to the tests on CI, we are going > to investigate and reland this update after Deno 1.32.0 is released.
2023-03-22chore(test_util): replace tempdir code w/tempdir crate (#18340)Matt Mastracci
2023-03-22Revert "chore: update wpt (#18335)" (#18355)Bartek Iwańczuk
This reverts commit 29fb7709ed41b644825f7f9e362314bb37b588e7. This update introduced more flakiness to the tests on CI, we are going to investigate and reland this update after Deno 1.32.0 is released.
2023-03-22chore: update wpt (#18335)Kenta Moriuchi
2023-03-17fix(test_util): parse strace usecs/call in total line if present (#18241)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/18235
2023-03-17BREAKING(unstable): remove WebGPU (#18094)Leo Kettmeir
This PR _**temporarily**_ removes WebGPU (which has behind the `--unstable` flag in Deno), due to performance complications due to its presence. It will be brought back in the future; as a point of reference, Chrome will ship WebGPU to stable on 26/04/2023. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-15chore: add test for ws ping/pong (#18204)Divy Srivastava
This commit adds test for https://github.com/denoland/deno/issues/17761 which was fixed by https://github.com/denoland/deno/pull/17762. Verified that test fails on Deno 1.30.1
2023-03-15fix(lsp): avoid calling client while holding lock (#18197)David Sherret
2023-03-13fix(npm): show a progress bar when initializing the node_modules folder (#18136)David Sherret
Creating the node_modules folder when the packages are already downloaded can take a bit of time and not knowing what is going on can be confusing. It's better to show a progress bar.
2023-03-09refactor(tests/lsp): consolidate more into test LspClient and reduce ↵David Sherret
verbosity (#18100)
2023-03-09chore: update Rust to 1.68.0 (#18102)Bartek Iwańczuk
2023-03-08refactor(lsp): improve test client initialization (#18015)David Sherret
2023-03-06chore(tests): ability to capture stdout and stderr separately (#18035)David Sherret
This is to allow making assertions on stdout and stderr separately.
2023-03-03fix: lazily surface errors in package.json deps parsing (#17974)David Sherret
Closes #17941
2023-03-03chore: update deno_std submodule to 0.178.0 (#18003)Bartek Iwańczuk
2023-02-28chore(test): remove TestCommandOutput macros (#17975)David Sherret
2023-02-27chore: test builders for integration tests (#17965)David Sherret
Start of adding test builders to simplify integration tests. I only updated a few test files. We can complete upgrading over time.
2023-02-24fix: ensure concurrent non-statically analyzable dynamic imports do not ↵David Sherret
sometimes fail (#17923) Closes #17918
2023-02-22feat(task): support scripts in package.json (#17887)David Sherret
This is a super basic initial implementation. We don't create a `node_modules/.bin` folder at the moment and add it to the PATH like we should which is necessary to make command name resolution in the subprocess work properly (ex. you run a script that launches another script that then tries to launch an "npx command"... this won't work atm). Closes #17492
2023-02-22fix(npm): resolve node_modules dir relative to package.json instead of cwd ↵David Sherret
(#17885)
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-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: use deno_graph's semver and npm structs (#17791)David Sherret
2023-02-10feat(install): follow redirects for urls with no path (#17449)Kamil Ogórek
This change makes absolute urls, that contain no path like `deno install https://my-cli.io` to follow redirects and extract the name from it. It allows modifies `test_util` server listener on port `4550` (`REDIRECT_ABSOLUTE_PORT`) to allow for specifying `redirect_to` query param, that fill use that value for it's next redirect. Fixes https://github.com/denoland/deno/issues/17409
2023-02-06chore: update std submodule to 0.176.0 (#17668)Bartek Iwańczuk
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.