summaryrefslogtreecommitdiff
path: root/cli/tools
AgeCommit message (Collapse)Author
2024-03-08fix(publish): suggest using `--allow-dirty` on uncommitted changes (#22810)David Sherret
2024-03-08fix(publish): do not include .gitignore (#22789)David Sherret
Regression from https://github.com/denoland/deno/pull/22720
2024-03-07fix(publish): make include and exclude work (#22720)David Sherret
1. Stops `deno publish` using some custom include/exclude behaviour from other sub commands 2. Takes ancestor directories into account when resolving gitignore 3. Backards compatible change that adds ability to unexclude an exclude by using a negated glob at a more specific level for all sub commands (see https://github.com/denoland/deno_config/pull/44).
2024-03-07fix(publish): reland error if there are uncommitted changes (#22613) (#22632)Bartek Iwańczuk
Reverted in https://github.com/denoland/deno/pull/22625
2024-03-07fix(cli): limit test parallelism on Windows to avoid pipe error (#22776)Matt Mastracci
One last attempt to fix the parallelism issue on Windows.
2024-03-07perf(cli): use faster_hex (#22761)Matt Mastracci
`cli::util::checksum` was showing up on flame graphs because it was concatenating allocated strings. We can use `faster-hex` to improve it.
2024-03-07fix(publish): properly display graph validation errors (#22775)David Sherret
The graph validation errors were displaying cryptically during publish. This fixes that.
2024-03-07fix(tools/publish): correctly handle importing from self in unfurling (#22774)Luca Casonato
We emitted `import "./` rather than `import "./$NAME"`. This is now fixed. Also makes a cosmetic change so that `../` imports are now just imported as `../`, not `./../`.
2024-03-06feat(unstable/pm): support npm packages in 'deno add' (#22715)Nayeem Rahman
2024-03-06fix(publish): permissionless dry-run in GHA (#22679)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/22658
2024-03-06fix(node): improve cjs tracking (#22673)David Sherret
We were missing saying that a file is CJS when some Deno code imported from the node_modules directory at runtime.
2024-03-05refactor: move deno json functionality to args module (#22710)David Sherret
2024-03-04fix(cli): remove possible deadlock in test channel (#22662)Matt Mastracci
The stderr stream could possibly starve the other bits of the output-redirecting event loop. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-03-04chore: fix typos (#22677)cui fliter
2024-03-04feat(publish): add `npm:` suggestion for esm.sh specifiers (#22343)Divy Srivastava
![image](https://github.com/denoland/deno/assets/34997667/f32642ed-c109-4519-84c5-6f78e9452703) Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-03-01feat(unstable/pm): support version contraints in 'deno add' (#22646)Nayeem Rahman
2024-03-01fix(cli): force flush output after test unloads (#22660)Matt Mastracci
Fixes flake in load_unload test
2024-03-01perf(cli): use new deno_core timers (#22569)Matt Mastracci
Improves #19100 Fixes #20356 Replaces #20428 Changes made in deno_core to support this: - [x] Errors must be handled in setTimeout callbacks - [x] Microtask ordering is not-quite-right - [x] Timer cancellation must be checked right before dispatch - [x] Timer sanitizer - [x] Move high-res timer to deno_core - [x] Timers need opcall tracing
2024-03-01fix(unstable/publish): repect `--no-check` in no-slow-types (#22653)David Sherret
2024-02-29fix(publish): disable provenance if not in GHA (#22638)Bartek Iwańczuk
The condition was wrong
2024-02-29feat(unstable): `deno add` subcommand (#22520)Bartek Iwańczuk
This commit adds "deno add" subcommand that has a basic support for adding "jsr:" packages to "deno.json" file. This currently doesn't support "npm:" specifiers and specifying version constraints.
2024-02-29fix(publish): reduce warnings about dynamic imports (#22636)David Sherret
2024-02-29feat(publish): enable package provenance by default on github actions (#22635)Divy Srivastava
2024-02-29fix(publish): print a warning when .jsx or .tsx is imported (#22631)Bartek Iwańczuk
This commit adds a warning when .jsx or .tsx is encountered during publishing. This is a stop-gap solution before we fix it proper.
2024-02-28fix(cli): ensure that pre- and post-test output is flushed at the ↵Matt Mastracci
appropriate times (#22611) Some `deno_std` tests were failing to print output that was resolved after the last test finished. In addition, output printed before tests began would sometimes appear above the "running X tests ..." line, and sometimes below it depending on timing. We now guarantee that all output is flushed before and after tests run, making the output consistent. Pre-test and post-test output are captured in `------ pre-test output ------` and `------ post-test output ------` blocks to differentiate them from the regular output blocks. Here's an example of a test (that is much noisier than normal, but an example of what the output will look like): ``` Check ./load_unload.ts ------- pre-test output ------- load ----- output end ----- running 1 test from ./load_unload.ts test ... ------- output ------- test ----- output end ----- test ... ok ([WILDCARD]) ------- post-test output ------- unload ----- output end ----- ```
2024-02-28Revert "fix(publish): error if there are uncommitted changes (#22613)" (#22625)Bartek Iwańczuk
This reverts commit c2c4e745a5db4f2e53aa70bf22b6c828fa1b4040.
2024-02-28fix(publish): make the already published message look like a warning (#22620)Ryan Dahl
2024-02-28chore(cli): rename `--trace-ops` to `--trace-leaks` (#22598)Matt Mastracci
As we add tracing to more types of runtime activity, `--trace-ops` is less useful of a name. `--trace-leaks` better reflects that this feature traces both ops and timers, and will eventually trace resource opening as well. This keeps `--trace-ops` as an alias for `--trace-leaks`, but prints a warning to the console suggesting migration to `--trace-leaks`. One test continues to use `--trace-ops` to test the deprecation warning. --------- Signed-off-by: Matt Mastracci <matthew@mastracci.com>
2024-02-28fix(publish): error if there are uncommitted changes (#22613)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/22330
2024-02-27perf(cli): reduce overhead in test registration (#22552)Matt Mastracci
- Removes the origin call, since all origins are the same for an isolate (ie: the main module) - Collects the `TestDescription`s and sends them all at the same time inside of an Arc, allowing us to (later on) re-use these instead of cloning. Needs a follow-up pass to remove all the cloning, but that's a thread that is pretty long to pull --------- Signed-off-by: Matt Mastracci <matthew@mastracci.com>
2024-02-28feat(publish): provenance attestation (#22573)Divy Srivastava
Supply chain security for JSR. ``` $ deno publish --provenance Successfully published @divy/test_provenance@0.0.3 Provenance transparency log available at https://search.sigstore.dev/?logIndex=73657418 ``` 0. Package has been published. 1. Fetches the version manifest and verifies it's matching with uploaded files and exports. 2. Builds the attestation SLSA payload using Github actions env. 3. Creates an ephemeral key pair for signing the github token (aud=sigstore) and DSSE pre authentication tag. 4. Requests a X.509 signing certificate from Fulcio using the challenge and ephemeral public key PEM. 5. Prepares a DSSE envelop for Rekor to witness. Posts an intoto entry to Rekor and gets back the transparency log index. 6. Builds the provenance bundle and posts it to JSR.
2024-02-27fix(unstable): sloppy imports should resolve .d.ts files during types ↵David Sherret
resolution (#22602)
2024-02-27feat(publish): support sloppy imports and bare node built-ins (#22588)Luca Casonato
2024-02-27chore: bump deno_core (#22596)Matt Mastracci
Migrations: - snapshot code updated - runtime stats API tweaks
2024-02-27feat(publish): discover jsr.json and jsr.jsonc files (#22587)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/22491
2024-02-24fix(lsp): import map expansion (#22553)David Sherret
2024-02-23refactor(cli): clean up test runner channels (#22422)Matt Mastracci
Gets us closer to solving #20707. Rewrites the `TestEventSender`: - Allow for explicit creation of multiple streams. This will allow for one-std{out,err}-per-worker - All test events are received along with a worker ID, allowing for eventual, proper parallel threading of test events. In theory this should open up proper interleaving of test output, however that is left for a future PR. I had some plans for a better performing synchronization primitive, but the inter-thread communication is tricky. This does, however, speed up the processing of large numbers of tests 15-25% (possibly even more on 100,000+). Before ``` ok | 1000 passed | 0 failed (32ms) ok | 10000 passed | 0 failed (276ms) ``` After ``` ok | 1000 passed | 0 failed (25ms) ok | 10000 passed | 0 failed (230ms) ```
2024-02-23feat: infer dependencies from package.json (#22563)Marvin Hagemeister
<!-- Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing 1. Give the PR a descriptive title. Examples of good title: - fix(std/http): Fix race condition in server - docs(console): Update docstrings - feat(doc): Handle nested reexports Examples of bad title: - fix #7123 - update docs - fix bugs 2. Ensure there is a related issue and it is referenced in the PR text. 3. Ensure there are tests that cover the changes. 4. Ensure `cargo test` passes. 5. Ensure `./tools/format.js` passes without changing files. 6. Ensure `./tools/lint.js` passes. 7. Open as a draft PR if your work is still in progress. The CI won't run all steps, but you can add '[ci]' to a commit message to force it to. 8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label. --> This PR enhances the `deno publish` command to infer dependencies from `package.json` if present.
2024-02-23feat(publish): respect .gitignore during `deno publish` (#22514)Divy Srivastava
Files from `.gitignore`, global git config, `.git/info/exclude` and `deno.json`'s `exclude` are ignored.
2024-02-21fix(compile): respect compiler options for emit (#22521)Bartek Iwańczuk
`deno compile` was ignoring configuration file and thus not applying `compilerOptions` to influence the way files were emitted.
2024-02-21feat(publish): type check on publish (#22506)David Sherret
Supersedes #22501 and also fixes that issue.
2024-02-20perf(jsr): fast check cache and lazy fast check graph (#22485)David Sherret
2024-02-20fix(publish): print files that will be published (#22495)Luca Casonato
2024-02-19fix(publish): ignore .DS_Store while publishing (#22478)Luca Casonato
2024-02-19feat(unstable/lint): no-slow-types for JSR packages (#22430)David Sherret
1. Renames zap/fast-check to instead be a `no-slow-types` lint rule. 1. This lint rule is automatically run when doing `deno lint` for packages (deno.json files with a name, version, and exports field) 1. This lint rules still occurs on publish. It can be skipped by running with `--no-slow-types`
2024-02-19chore(fs): rename `op_fs_file_stat_{async/sync}` ops (#22476)Asher Gomez
Renames `op_fs_fstat_{sync/async}` to `op_fs_file_stat_{async/sync}` in preparation of the upcoming removal of `Deno.fstat()` in v2.
2024-02-19fix: write lockfile in `deno info` (#22272)Luca Casonato
2024-02-16refactor: remove module graph setup from ModuleLoader (#22442)David Sherret
`ModuleLoader` was doing too much duplicate work.
2024-02-16refactor(cli): move op sanitizer to Rust (#22413)Matt Mastracci
The format of the sanitizers will change a little bit: - If multiple async ops leak and traces are on, we repeat the async op header once per stack trace. - All leaks are aggregated under a "Leaks detected:" banner as the new timers are eventually going to be added, and these are neither ops nor resources. - `1 async op` is now `An async op` - If ops and resources leak, we show both (rather than op leaks masking resources) Follow-on to https://github.com/denoland/deno/pull/22226
2024-02-16chore(ext/web): refactor timer ops before landing op sanitizer (#22435)Matt Mastracci
Splitting the sleep and interval ops allows us to detect an interval timer. We also remove the use of the `op_async_void_deferred` call. A future PR will be able to split the op sanitizer messages for timers and intervals.