Commit graph

6024 commits

Author SHA1 Message Date
Bartek Iwańczuk d043dd86f7
fix: don't panic in test and bench if ops not available (#23055)
Fixes regression introduced in
https://github.com/denoland/deno/pull/22112 that
removed checks if `Deno.test` or `Deno.bench` are not used in respective
subcommands.

Closes https://github.com/denoland/deno/issues/23041
2024-03-24 16:16:45 -07:00
Sol Boucher ae52b49dd6
docs(dts): Update edge case in prompt() docs (#22954)
This has been incorrect since the function adopted its (more intuitive)
current behavior in 9268df5f3. The same behavior change was backported
to v1.39.3 in 87e954f54.
2024-03-24 08:04:57 +01:00
Bartek Iwańczuk c940205353
refactor(bench): align ops to testing ops (#23038)
Internal refactor that changes how we use ops in `deno bench`
subcommand.

This brings it in line to what we do in `deno test` subcommand.
2024-03-24 06:22:37 +01:00
Matt Mastracci 86cdf37033
perf(cli): use args_os (#23039)
Extracted from #22718
2024-03-22 14:03:56 -07:00
Asher Gomez 2d59372e7a
feat(publish): check for uncommitted files in deno publish --dry-run (#22981)
Closes #22936
2024-03-22 12:41:33 -07:00
David Sherret f96f167dc8
feat(unstable/publish): error when a package's module is excluded from publishing (#22948)
Closes #22657
2024-03-21 21:42:23 +00:00
David Sherret ffbcad3800
feat(lint): deno lint --fix and lsp quick fixes (#22615)
Adds a `--fix` option to deno lint. This currently doesn't work for
basically any rules, but we can add them over time to deno lint.
2024-03-21 14:18:59 -07:00
Bartek Iwańczuk 2166aa8fb6
chore: upgrade deno_core to 0.272.0 (#23022) 2024-03-21 13:57:32 -07:00
David Sherret 9abc722cc3
feat(node): load ES modules defined as CJS (#22945)
Changes the behaviour in Deno to just always load ES modules in npm
packages even if they're defined as CJS.

Closes #22818
2024-03-21 11:35:51 -07:00
David Sherret e55777568e
feat: deno_task_shell 0.15 (#23019)
* feat: implement exit status var
(https://github.com/denoland/deno_task_shell/pull/110)
* feat: support input redirects
(https://github.com/denoland/deno_task_shell/pull/106)
* feat: support output fd redirects for stdout and stderr
(https://github.com/denoland/deno_task_shell/pull/111)
* feat: support parsing fd redirects
(https://github.com/denoland/deno_task_shell/pull/107)
* fix: exit error code on arg parse failure
(https://github.com/denoland/deno_task_shell/pull/112)

Closes #22989
2024-03-21 16:43:17 +00:00
Nayeem Rahman 5a716d1d06
refactor(lsp): factor out workspace walk from resolver update (#22937) 2024-03-21 04:29:52 +00:00
Bartek Iwańczuk e45f433a16
chore: make DENO_FUTURE a singleton (#23009)
Just making sure we read this env var once per process.
2024-03-21 07:32:44 +05:30
Asher Gomez 9593cf2852
chore(ext/io): remove use of deprecated Deno.writeSync() (#22872) 2024-03-20 10:39:25 -07:00
Nathan Whitaker ab67b4c645
fix(coverage): Error if no files are included in the report (#22952)
Fixes #22941.

In that case, the only file with coverage was the `test.ts` file. The
coverage reporter filters out test files before compiling its report, so
after filtering we were left with an empty set of files. Later on it's
assumed that there is at least 1 file to be reported on, and we panic.
Instead of panicking, just issue an error after filtering.
2024-03-15 20:58:57 -07:00
Bartek Iwańczuk c342cd36ba
fix(ext/node): worker_threads doesn't exit if there are message listeners (#22944)
Closes https://github.com/denoland/deno/issues/22934
2024-03-15 21:38:16 +01:00
David Sherret 36e6e4a009
fix: handle cache body file not existing when using etag (#22931) 2024-03-15 09:57:24 -04:00
Matt Mastracci dae162f738
fix(cli): sanitizer should ignore count of ops started before tests begin (#22932) 2024-03-14 18:19:07 -06:00
Łukasz Czerniawski 5403e4f06b
chore(cli): move away from PathBuf in clap (#22036) 2024-03-14 23:53:46 +00:00
Nathan Whitaker 85116226b3
chore: Forward 1.41.3 release commit (#22930)
Forward 1.41.3 release commit

Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: nathanwhit <nathanwhit@users.noreply.github.com>
2024-03-14 21:23:24 +00:00
Matt Mastracci 1f3c4c9763
fix(cli): show asserts before leaks (#22904)
Fixes #22837
2024-03-13 20:49:54 -06:00
David Sherret 43d066cb70
fix: stop type checking during runtime (#22854)
In addition to the reasons for this outlined by @nayeemrmn in #14877
(which I think are reasons alone to not do this), this simplifies things
a lot because then we don't need to implement the following:

1. Need to handle a JSR module dynamically importing a module within it.
2. Need to handle importing an export of a JSR dep then another export
dynamically loaded later.

Additionally, people should be running `deno check dynamic_import.ts`
instead of relying on this behaviour.

Landing this as a fix because it's blocking people in some scenarios and
the current behaviour is broken (I didn't even have to change any tests
to remove this, which is bad).

Closes #22852
Closes #14877
Closes #22580
2024-03-13 16:38:01 -04:00
Matt Mastracci c9a9d040a3
perf(permissions): Fast exit from checks when permission is in "fully-granted" state (#22894)
Skips the access check if the specific unary permission is in an
all-granted state. Generally prevents an allocation or two.

Hooks up a quiet "all" permission that is automatically inherited. This
permission will be used in the future to indicate that the user wishes
to accept all side-effects of the permissions they explicitly granted.

The "all" permission is an "ambient flag"-style permission that states
whether "allow-all" was passed on the command-line.
2024-03-13 14:30:48 -06:00
Nayeem Rahman eca7b0cddd
chore(lsp): remove enablePaths compat path (#22895) 2024-03-13 20:22:02 +00:00
Satya Rohith 0fd8f549e2
fix(ext/node): allow automatic worker_thread termination (#22647)
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-03-13 17:22:25 +00:00
David Sherret b3ca3b2f25
chore: rough first pass on spec tests (#22877) 2024-03-13 16:21:13 +00:00
Matt Mastracci eccdb0e99a
chore(permissions): add allow_all flag (#22890)
Unlocking a potential perf optimization at a later date -- carry the
`allow_all` flag into the permission container.
2024-03-13 16:07:24 +00:00
David Sherret c10d96cb21
fix(slow-types): improved exports tracing and infer type literals in as exprs (#22849)
Several fixes in deno_graph:

* https://github.com/denoland/deno_graph/pull/411
* https://github.com/denoland/deno_graph/pull/413
* https://github.com/denoland/deno_graph/pull/414
* https://github.com/denoland/deno_graph/pull/415
* https://github.com/denoland/deno_graph/pull/416
* https://github.com/denoland/deno_graph/pull/417

Also created https://github.com/denoland/publish_smoke_tests to help
prevent regressions in the future.

Closes https://github.com/denoland/deno/issues/22829
Closes https://github.com/denoland/deno/issues/22819
Closes https://github.com/denoland/deno/issues/22802
2024-03-12 17:45:38 +00:00
Divy Srivastava de28e6fc09
refactor: add deno_permissions crate (#22236)
Issue https://github.com/denoland/deno/issues/22222


![image](https://github.com/denoland/deno/assets/34997667/2af8474b-b919-4519-98ce-9d29bc7829f2)

This PR moves `runtime/permissions` code to a upstream crate called
`deno_permissions`. The `deno_permissions::PermissionsContainer` is put
into the OpState and can be used instead of the current trait-based
permissions system.

For this PR, I've migrated `deno_fetch` to the new crate but kept the
rest of the trait-based system as a wrapper of `deno_permissions` crate.
Doing the migration all at once is error prone and hard to review.

Comparing incremental compile times for `ext/fetch` on Mac M1:

| profile | `cargo build --bin deno` | `cargo plonk build --bin deno` |
| --------- | ------------- | ------------------- |
| `debug`   | 20 s          | 0.8s                |
| `release` | 4 mins 12 s   | 1.4s                  |
2024-03-12 10:42:26 -07:00
David Sherret ad6b00a2bf
chore: enable clippy unused_async rule (#22834) 2024-03-11 23:48:00 -04:00
Matt Mastracci 61d86b906f
fix(cli): use Instant for test times (#22853)
Fixes https://github.com/denoland/deno_std/issues/4473
2024-03-11 19:30:15 -06:00
Bartek Iwańczuk d69aab62b0
fix(ext/node): make worker setup synchronous (#22815)
This commit fixes race condition in "node:worker_threads" module were
the first message did a setup of "threadId", "workerData" and
"environmentData".
Now this data is passed explicitly during workers creation and is set up
before any user code is executed.

Closes https://github.com/denoland/deno/issues/22783
Closes https://github.com/denoland/deno/issues/22672

---------

Co-authored-by: Satya Rohith <me@satyarohith.com>
2024-03-11 23:18:03 +01:00
David Sherret 644ac0fe43
chore: hidden tool for overwriting files with fast check output (#22822)
Not sure if we should do this, but it's a nice hidden tool that
overwrites the working tree with the fast check output.
2024-03-11 11:42:12 -04:00
David Sherret f8543a9fd8
fix(publish): regression - publishing with vendor folder (#22830)
In
https://github.com/denoland/deno/pull/22720/files#diff-d62d85de2a7ffb816cd2fdbaa47e588352f521c7c43d058b75649bbb255e0ae1R70
, I copy and pasted from another area of the code and didn't think about
removing how it ignores the vendor folder by default.
2024-03-09 20:40:53 -05:00
Divy Srivastava 0bed4d3e51
fix(ext/node): support junction symlinks on Windows (#22762)
Fixes https://github.com/denoland/deno/issues/20609

Vitepress support! `vitepress dev` and `vitepress build` via BYONM
2024-03-09 09:07:29 +05:30
David Sherret 58c28d9879
fix(config): remove pkg name example and add pattern to schema (#22813) 2024-03-08 23:13:25 +00:00
David Sherret 0146abd9fe
fix(config): add unstable features as examples to config schema (#22814) 2024-03-08 23:11:05 +00:00
David Sherret 119744c285
fix(publish): suggest using --allow-dirty on uncommitted changes (#22810) 2024-03-08 22:49:15 +00:00
tuhana 66d1b155dd
fix(cli): occasional panics on progress bar (#22809)
Uses `Instant` instead of `SystemTime` for
`cli/util/progress_bar/mod.rs`. Fixes #22558
2024-03-08 14:27:58 -07:00
David Sherret 5d85efd595
fix(publish): ability to un-exclude when .gitignore ignores everything (#22805)
This is an unrealistic scenario, but it's still a good thing to fix and
have a test for because it probably fixes some other underlying issues
with how the gitignore was being resolved for the root directory.

From https://github.com/denoland/deno/pull/22720#issuecomment-1986134425
2024-03-08 14:25:22 -05:00
mimikun 8fdc376b4a
fix(publish): typo in --allow-dirty help text (#22799) 2024-03-08 18:03:32 +00:00
Luca Casonato 5d671e079a
fix: support sloppy resolution to file where directory exists (#22800)
Previously the sloppy resolver could not resolve the following:

- foo/bar.ts
- foo.ts
- index.ts

Where `index.ts` contains `import "./foo"`, because it did not consider
`foo.ts` a valid target for this directory import.

This commit fixes this bug.
2024-03-08 17:25:55 +00:00
denobot 44da066359
chore: forward v1.41.2 release commit to main (#22793)
This is the release commit being forwarded back to main for 1.41.2

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-03-08 09:12:36 +00:00
David Sherret 40089b37c0
fix(publish): include explicitly specified .gitignored files and directories (#22790)
This allows explicitly overriding a .gitignore by specifying files and
directories in "include". This does not apply to globs in an include as
files matching those will still be gitignored. Additionally,
individually gitignored files within an included directory will still be
ignored.
2024-03-08 05:46:06 +00:00
David Sherret 2c6e9107b6
fix(publish): do not include .gitignore (#22789)
Regression from https://github.com/denoland/deno/pull/22720
2024-03-08 04:16:19 +00:00
David Sherret 2dfc0aca7c
fix(publish): make include and exclude work (#22720)
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-07 20:16:32 -05:00
Bartek Iwańczuk 2ed984ba3a
fix: respect unstable "temporal" configuration in config file (#22134)
Actual fix happened in https://github.com/denoland/deno/pull/22782, but
this commit adds additional tests and cleans up V8 flags passed on init.

Closes https://github.com/denoland/deno/issues/22123
Closes https://github.com/denoland/deno/issues/22560
Closes https://github.com/denoland/deno/issues/22557
2024-03-08 01:32:11 +01:00
Bartek Iwańczuk 914b7495a8
fix(publish): reland error if there are uncommitted changes (#22613) (#22632)
Reverted in https://github.com/denoland/deno/pull/22625
2024-03-07 22:13:36 +01:00
Divy Srivastava e0c9102b49
perf: hard link npm cache (#22773) 2024-03-07 13:10:19 -05:00
Nayeem Rahman 8df47882c9
fix(lsp): don't apply renames to remote modules (#22765) 2024-03-07 17:27:24 +00:00
Matt Mastracci 0fdb33c3aa
fix(cli): limit test parallelism on Windows to avoid pipe error (#22776)
One last attempt to fix the parallelism issue on Windows.
2024-03-07 10:04:39 -07:00
Matt Mastracci 4791d16a8e
perf(cli): use faster_hex (#22761)
`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-07 10:00:43 -07:00
David Sherret 594d8397ad
fix(publish): properly display graph validation errors (#22775)
The graph validation errors were displaying cryptically during publish.
This fixes that.
2024-03-07 17:30:30 +01:00
Luca Casonato 87a08fc3b2
fix(tools/publish): correctly handle importing from self in unfurling (#22774)
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-07 17:29:17 +01:00
Bartek Iwańczuk f0ec4fe1b8
fix(publish): silence warnings for sloppy imports and node builtins with env var (#22760)
An undocumented "DENO_DISABLE_PEDANTIC_NODE_WARNINGS" env
var can be used to silence warnings for sloppy imports and node builtins
without `node:` prefix.
2024-03-07 14:59:57 +01:00
Nayeem Rahman 01bc2f530e
feat(unstable/pm): support npm packages in 'deno add' (#22715) 2024-03-06 13:24:15 +00:00
Divy Srivastava 156950828e
fix(publish): permissionless dry-run in GHA (#22679)
Fixes https://github.com/denoland/deno/issues/22658
2024-03-06 18:26:20 +05:30
Divy Srivastava adb0226927
chore: Reuse linux symbols list on openbsd and freebsd (#22706) 2024-03-06 08:33:15 +05:30
Matt Mastracci ace25161c7
chore(cli): remove problematic snapshot test (#22722)
This test crashes often on windows.
2024-03-05 19:11:33 -07:00
David Sherret 3eaf174bfc
fix(node): improve cjs tracking (#22673)
We were missing saying that a file is CJS when some Deno code imported
from the node_modules directory at runtime.
2024-03-06 00:23:51 +00:00
Matt Mastracci 3fd4b882a4
perf(cli): faster standalone executable determination (#22717)
This was showing up on the flamegraph.

```
14:54 $ hyperfine -S none --warmup 25 '/tmp/deno run /tmp/empty.js' 'target/release/deno run /tmp/empty.js'
Benchmark 1: /tmp/deno run /tmp/empty.js
  Time (mean ± σ):      17.2 ms ±   4.7 ms    [User: 11.2 ms, System: 4.0 ms]
  Range (min … max):    15.1 ms …  72.9 ms    172 runs
 
  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
 
Benchmark 2: target/release/deno run /tmp/empty.js
  Time (mean ± σ):      16.7 ms ±   1.1 ms    [User: 11.1 ms, System: 4.0 ms]
  Range (min … max):    15.0 ms …  20.1 ms    189 runs
 
Summary
  'target/release/deno run /tmp/empty.js' ran
    1.03 ± 0.29 times faster than '/tmp/deno run /tmp/empty.js'
✔ ~/Documents/github/deno/deno [faster_extract|…5⚑ 23] 
```
2024-03-05 15:14:49 -07:00
David Sherret 942dcbad84
refactor: move deno json functionality to args module (#22710) 2024-03-05 15:45:44 -05:00
Matt Mastracci 72d34a79ac
fix(cli): remove possible deadlock in test channel (#22662)
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-04 20:14:21 -07:00
Bartek Iwańczuk d9fa2dd550
chore: upgrade deno_core (#22699)
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-03-05 01:17:39 +00:00
David Sherret 902a1137ea
fix(lsp): do not warn about local file "redirects" from .js to .d.ts files (#22670)
The diagnostic was incorrect when importing a `.js` file with a
corresponding `.d.ts` file with sloppy imports because it would say to
change the `.js` extension to `.d.ts`, which is incorrect. We might as
well just hide this diagnostic.
2024-03-04 17:34:31 +00:00
David Sherret 6650019935
fix(lsp): ignore code errors when type passes for non-@deno-types reolution (#22682) 2024-03-04 16:10:39 +00:00
Nayeem Rahman 625a9319f6
feat(lsp): include registry url in jsr import hover text (#22676) 2024-03-04 15:48:23 +00:00
cui fliter d4b3b39cc0
chore: fix typos (#22677) 2024-03-04 14:28:57 +00:00
Divy Srivastava 11db68ce96
feat(publish): add npm: suggestion for esm.sh specifiers (#22343)
![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-04 09:55:28 +05:30
David Sherret 942b2aaca5
fix(lsp): output more information on error (#22665) 2024-03-01 21:25:38 -05:00
David Sherret 0973e8e859
fix(lsp): regression - caching in lsp broken when config with imports has comments (#22666)
Caused by https://github.com/denoland/deno/pull/22553

Closes #22664
2024-03-01 21:13:04 -05:00
Nayeem Rahman 15f5f74eb7
feat(unstable/pm): support version contraints in 'deno add' (#22646) 2024-03-01 21:34:13 +00:00
Matt Mastracci 2e4a1fc3e8
fix(cli): force flush output after test unloads (#22660)
Fixes flake in load_unload test
2024-03-01 21:26:57 +00:00
Matt Mastracci 736b91edd0
perf(cli): use new deno_core timers (#22569)
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-01 11:15:18 -07:00
David Sherret 878384aefa
fix(unstable/publish): repect --no-check in no-slow-types (#22653) 2024-03-01 15:54:46 +00:00
denobot 404422519c
chore: forward v1.41.1 release commit to main (#22643)
Co-authored-by: dsherret <dsherret@users.noreply.github.com>
2024-02-29 20:56:08 -05:00
Bartek Iwańczuk ea3651a1ac
fix(publish): disable provenance if not in GHA (#22638)
The condition was wrong
2024-02-29 21:19:30 +00:00
Kenta Moriuchi e4ef6a4b8e
fix(unstable): add Date#toTemporalInstant type (#22637) 2024-02-29 14:47:10 -05:00
Bartek Iwańczuk fb31ae73e4
feat(unstable): deno add subcommand (#22520)
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-29 19:12:04 +00:00
David Sherret 8d9a54ca18
fix(publish): reduce warnings about dynamic imports (#22636) 2024-02-29 11:34:07 -05:00
Divy Srivastava 9ffc34c159
feat(publish): enable package provenance by default on github actions (#22635) 2024-02-29 21:48:47 +05:30
Bartek Iwańczuk 211b3ff244
fix(publish): print a warning when .jsx or .tsx is imported (#22631)
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-29 12:54:57 +01:00
Nayeem Rahman 3a43568481
feat(lsp): jsr specifier completions (#22612) 2024-02-29 03:54:16 +00:00
David Sherret 814eb42060
fix: relative dynamic imports in jsr packages (#22624)
Relative dynamic imports were broken. It now properly allows them and
verifies the checksum.

Fix in https://github.com/denoland/deno_graph/pull/408
2024-02-29 00:06:16 +01:00
Matt Mastracci b6e44f91ad
fix(cli): ensure that pre- and post-test output is flushed at the 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-28 22:12:21 +00:00
Bartek Iwańczuk c9b2139b1e
Revert "fix(publish): error if there are uncommitted changes (#22613)" (#22625)
This reverts commit c2c4e745a5.
2024-02-28 21:35:02 +00:00
David Sherret 918c5e648f
fix(jsr): do not allow importing a non-JSR url via unanalyzable dynamic import from JSR (#22623)
A security feature of JSR is that it is self contained other than npm
dependencies. At publish time, the registry rejects packages that write
code like this:

```ts
const data = await import("https://example.com/evil.js");
```

However, this can be trivially bypassed by writing code that the
registry cannot statically analyze for. This PR prevents Deno from
loading dynamic imports that do this.
2024-02-28 16:30:45 -05:00
Ryan Dahl f54acb53ed
fix(publish): make the already published message look like a warning (#22620) 2024-02-28 21:30:20 +01:00
Matt Mastracci a3f982c1d5
chore(cli): rename --trace-ops to --trace-leaks (#22598)
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-28 09:12:43 -07:00
Bartek Iwańczuk c2c4e745a5
fix(publish): error if there are uncommitted changes (#22613)
Closes https://github.com/denoland/deno/issues/22330
2024-02-28 10:21:12 +01:00
Matt Mastracci 96cfe82664
perf(cli): reduce overhead in test registration (#22552)
- 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-27 20:30:17 -07:00
Divy Srivastava 9b5d2f8c1b
feat(publish): provenance attestation (#22573)
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-28 07:58:02 +05:30
David Sherret e9fe71acb5
fix(unstable): sloppy imports should resolve .d.ts files during types resolution (#22602) 2024-02-27 18:30:21 +00:00
Luca Casonato 8d5c231349
feat(publish): support sloppy imports and bare node built-ins (#22588) 2024-02-27 15:13:16 +00:00
Matt Mastracci 47c2a63d87
chore: bump deno_core (#22596)
Migrations:

 - snapshot code updated
 - runtime stats API tweaks
2024-02-27 08:05:57 -07:00
Bartek Iwańczuk f1a691274e
feat(publish): discover jsr.json and jsr.jsonc files (#22587)
Closes https://github.com/denoland/deno/issues/22491
2024-02-27 08:27:21 +00:00
David Sherret 6567dc94a9
fix(lsp): import map expansion (#22553) 2024-02-24 00:21:09 -05:00
David Sherret 33fa49a100
chore: improve not implemented npm system info message (#22571) 2024-02-23 16:34:24 -05:00
David Sherret 22cd8ebf1f
perf(fmt): reduce memory usage and improve performance (#22570)
Reduces memory usage of the fmt command and fixes a memory leak.

Also improves slightly improves performance.
2024-02-23 16:11:45 -05:00
tuhana bcf2156dbf
fix(compile): add aarch64 linux to CliOptions::npm_system_info (#22567)
Follow-up for #22542.
2024-02-23 19:18:39 +01:00
Matt Mastracci 5193834cf2
refactor(cli): clean up test runner channels (#22422)
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-23 11:11:15 -07:00