summaryrefslogtreecommitdiff
path: root/cli/tests/integration
AgeCommit message (Collapse)Author
2023-01-23refactor: Move lockfile to a separate crate (#17503)Bartek Iwańczuk
Moves the lockfile implementation to a separate crate so other projects like Deploy can use it as well.
2023-01-18refactor(cli): Integrate standalone mode cert handling into `Flags` (#17419)Andreu Botella
The way the standalone mode handles the `--cert` flag is different to all other modes. This is because `--cert` takes a path to the certificate file, which is directly added to the root cert store; except for compile mode, where its byte contents are stored in the standalone metadata, and they are added to the root cert store after the `ProcState` is created. This change instead changes `Flags::ca_file` (an `Option<String>`) into `Flags::ca_data`, which can represent a `String` file path or a `Vec<u8>` with the certificate contents. That way, standalone mode can create a `ProcState` whose root cert store alreay contains the certificate. This change also adds a tests for certificates in standalone mode, since there weren't any before. This refactor will help with implementing web workers in standalone mode in the future.
2023-01-16fix(cli/fmt): show filepath for InvalidData error (#17361)Leo Kettmeir
2023-01-14chore: use rustfmt imports_granularity option (#17421)Divy Srivastava
Closes https://github.com/denoland/deno/issues/2699 Closes https://github.com/denoland/deno/issues/2347 Uses unstable rustfmt features. Since dprint invokes `rustfmt` we do not need to switch the cargo toolchain to nightly. Do we care about formatting stability of our codebase across Rust versions? (I don't)
2023-01-13fix(permissions): lock stdio streams when prompt is shown (#17392)Bartek Iwańczuk
This commit changes permission prompt to lock stdio streams when prompt is shown.
2023-01-13tests: Disable flaky flash_shutdown test (#17390)Bartek Iwańczuk
2023-01-13tests: move integration tests to a single module (#17380)Bartek Iwańczuk
Effectively reverts changes done in https://github.com/denoland/deno/pull/16816
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
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.
2022-11-24fix(npm/check): prioritize exports over types entry (#16788)David Sherret
2022-11-24feat(cli): add warning for incorrectly ordered flags (#16734)Asher Gomez
This code checks if permission flags are incorrectly defined after the module name (e.g. `deno run mod.ts --allow-read` instead of the correct `deno run --allow-read mod.ts`). If so, a simple warning is displayed.
2022-11-19fix(ext/node): handle URL in createRequire (#16682)Yoshiya Hinosawa
2022-11-18chore: use Rust 1.65.0 (#16688)Aaron O'Mullan
2022-11-16fix(npm): using types for packages with subpath (#16656)Bartek Iwańczuk
For CommonJS packages we were not trying different extensions for files specified as subpath of the package ([package_name]/[subpath]). This commit fixes that.
2022-11-16fix(lock): ensure npm dependencies are written with --lock-write (#16668)Bartek Iwańczuk
If "--lock-write" flag was present we never passed instance of the lockfile to the npm resolver, which made it skip adding discovered npm packages to the lockfile. This commit fixes that, by always passing lockfile to the npm resolver and only regenerating resolver snapshot is "--lock-write" is not present. Closes https://github.com/denoland/deno/issues/16666
2022-11-16fix(npm): support non-all lowercase package names (#16669)David Sherret
Supports package names that aren't all lowercase. This stores the package with a leading underscore (since that's not allowed in npm's registry and no package exists with a leading underscore) then base32 encoded (A-Z0-9) so it can be lowercased and avoid collisions. Global cache dir: ``` $DENO_DIR/npm/registry.npmjs.org/_{base32_encode(package_name).to_lowercase()}/{version} ``` node_modules dir `.deno` folder: ``` node_modules/.deno/_{base32_encode(package_name).to_lowercase()}@{version}/node_modules/<package-name> ``` Within node_modules folder: ``` node_modules/<package-name> ``` So, direct childs of the node_modules folder can have collisions between packages like `JSON` vs `json`, but this is already something npm itself doesn't handle well. Plus, Deno doesn't actually ever resolve to the `node_modules/<package-name>` folder, but just has that for compatibility. Additionally, packages in the `.deno` dir could have collissions if they have multiple dependencies that only differ in casing or a dependency that has different casing, but if someone is doing that then they're already going to have trouble with npm and they are asking for trouble in general.
2022-11-16fix(npm): don't fail if conditional exports don't contains types (#16651)Bartek Iwańczuk
If resolving types for an npm package, we didn't find "types" entry in the conditional exports declaration we were falling-through to regular resolution, instead of short-circuiting and giving up on resolving types, which might lead to unwarranted errors. Closes https://github.com/denoland/deno/issues/16649
2022-11-15test: don't use remote std for tests (#16631)Bartek Iwańczuk
2022-11-15test: don't use lock file in JSX tests (#16639)Bartek Iwańczuk
2022-11-14fix(bundle): explicit error when using an npm specifier with deno bundle ↵David Sherret
(#16637)
2022-11-13feat(npm): require --unstable for npm specifiers in remote modules (#16612)David Sherret
2022-11-13fix(ext/flash): revert #16383 (graceful server startup/shutdown) (#16610)Yoshiya Hinosawa
#16383 made some of Node compat test cases flaky in deno_std (and when it fails it causes segfaults). See https://github.com/denoland/deno_std/issues/2882 for details
2022-11-11fix(npm): remove forgotten unstable check (#16598)Bartek Iwańczuk
2022-11-11fix(ext/flash): graceful server startup/shutdown (#16383)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/16267 Co-authored-by: Yusuke Tanaka <yusuktan@maguro.dev>
2022-11-11feat: Stabilize Deno.bench() and 'deno bench' subcommand (#16485)Bartek Iwańczuk
2022-11-10feat: don't require --unstable flag for npm programs (#16520)Bartek Iwańczuk
This PR adds copies of several unstable APIs that are available in "Deno[Deno.internal].nodeUnstable" namespace. These copies do not perform unstable check (ie. don't require "--unstable" flag to be present). Otherwise they work exactly the same, including permission checks. These APIs are not meant to be used by users directly and can change at any time. Copies of following APIs are available in that namespace: - Deno.spawnChild - Deno.spawn - Deno.spawnSync - Deno.serve - Deno.upgradeHttpRaw - Deno.listenDatagram
2022-11-10feat: remove --unstable flag requirement for npm: specifiers (#16473)Bartek Iwańczuk
This commit makes "npm:" specifiers not require "--unstable" flag. At the moment some APIs used by Node polyfills still require "--unstable" which will be addressed in follow up PRs.
2022-11-10feat(lock): don't require --unstable for auto discovery (#16582)Bartek Iwańczuk
Enables discovery of lock file unconditionally (ie. not requiring "--unstable" flag) as long as there's a config file discovered.
2022-11-08feat(unstable/npm): support peer dependencies (#16561)David Sherret
This adds support for peer dependencies in npm packages. 1. If not found higher in the tree (ancestor and ancestor siblings), peer dependencies are resolved like a dependency similar to npm 7. 2. Optional peer dependencies are only resolved if found higher in the tree. 3. This creates "copy packages" or duplicates of a package when a package has different resolution due to peer dependency resolution—see https://pnpm.io/how-peers-are-resolved. Unlike pnpm though, duplicates of packages will have `_1`, `_2`, etc. added to the end of the package version in the directory in order to minimize the chance of hitting the max file path limit on Windows. This is done for both the local "node_modules" directory and also the global npm cache. The files are hard linked in this case to reduce hard drive space. This is a first pass and the code is definitely more inefficient than it could be. Closes #15823
2022-11-08fix(lock): only store integrities for http: and https: imports (#16558)Bartek Iwańczuk
2022-11-06fix(npm): fix CJS resolution with local node_modules dir (#16547)Bartek Iwańczuk
This commit fixes CJS resolution when there's a local "node_modules/" directory. Before this commit relative imports from CJS files where resolved relative to root directory of the package instead of relative to referrer file.
2022-11-03fix(lock): add --no-lock flag to disable auto discovery of lock file (#16526)Bartek Iwańczuk
2022-11-03fix(lock): require --unstable flag to auto discover lockfile (#16524)Bartek Iwańczuk
2022-11-02fix(lock): autodiscovery of lockfile (#16498)Bartek Iwańczuk
This commit adds autodiscovery of lockfile. This only happens if Deno discovers the configuration file (either "deno.json" or "deno.jsonc"). In such case Deno tries to load "deno.lock" file that sits next to the configuration file, or creates one for user if the lockfile doesn't exist yet. As a consequence, "--lock" and "--lock-write" flags had been updated. "--lock" no longer requires a value, if one is not provided, it defaults to "./deno.lock" resolved from the current working directory. "--lock-write" description was updated to say that it forces to overwrite a lockfile. Autodiscovery is currently not handled by the LSP.
2022-11-02fix(lockfile): error if a referenced package id doesn't exist in list of ↵David Sherret
packages (#16509) Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-10-31feat(unstable/npm): `deno info --json` support for npm specifiers (#16472)David Sherret
2022-10-30test: disable run_watch_external_watch_files on macOS (#16477)Bartek Iwańczuk
This test has hung a lot recently on macOS. I am not sure if this is because of a bug in the test or because of the macOS runner that is extremely slow and flaky in general.
2022-10-28feat: support npm specifiers in `deno info` for display text output only ↵David Sherret
(#16470)
2022-10-27chore(npm): add explicit tests for `module.exports` assignment with type ↵David Sherret
checking (#16435)
2022-10-27fix(typescript): allow synthetic default imports when using ↵David Sherret
`ModuleKind.ESNext` (#16438) Closes #16437
2022-10-26fix(compile): show an error when using npm specifiers (#16430)David Sherret
Closes #16427
2022-10-26chore: improve built-in API documentation (#16158)Kitson Kelly
Co-authored-by: crowlkats <crowlkats@toaxl.com> Co-authored-by: Colin Ihrig <cjihrig@gmail.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-10-26feat(cli): show error cause recursion information (#16384)Cre3per
2022-10-25fix(npm): add support for npm packages in lock files (#15938)Bartek Iwańczuk
This commit adds support for npm packages in the lock file.
2022-10-25feat(lint): add a report lint config setting (#16045)Brenley Dueck
Builds off this PR to add a "report" setting to deno.json which can be "pretty", "compact", or "json".