summaryrefslogtreecommitdiff
path: root/cli
AgeCommit message (Collapse)Author
2024-03-21refactor(lsp): factor out workspace walk from resolver update (#22937)Nayeem Rahman
2024-03-21chore: make DENO_FUTURE a singleton (#23009)Bartek Iwańczuk
Just making sure we read this env var once per process.
2024-03-20chore(ext/io): remove use of deprecated `Deno.writeSync()` (#22872)Asher Gomez
2024-03-15fix(coverage): Error if no files are included in the report (#22952)Nathan Whitaker
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-15fix(ext/node): worker_threads doesn't exit if there are message listeners ↵Bartek Iwańczuk
(#22944) Closes https://github.com/denoland/deno/issues/22934
2024-03-15fix: handle cache body file not existing when using etag (#22931)David Sherret
2024-03-14fix(cli): sanitizer should ignore count of ops started before tests begin ↵Matt Mastracci
(#22932)
2024-03-14chore(cli): move away from PathBuf in clap (#22036)Łukasz Czerniawski
2024-03-14chore: Forward 1.41.3 release commit (#22930)Nathan Whitaker
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-13fix(cli): show asserts before leaks (#22904)Matt Mastracci
Fixes #22837
2024-03-13fix: stop type checking during runtime (#22854)David Sherret
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-13perf(permissions): Fast exit from checks when permission is in ↵Matt Mastracci
"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-13chore(lsp): remove enablePaths compat path (#22895)Nayeem Rahman
2024-03-13fix(ext/node): allow automatic worker_thread termination (#22647)Satya Rohith
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-03-13chore: rough first pass on spec tests (#22877)David Sherret
2024-03-13chore(permissions): add allow_all flag (#22890)Matt Mastracci
Unlocking a potential perf optimization at a later date -- carry the `allow_all` flag into the permission container.
2024-03-12fix(slow-types): improved exports tracing and infer type literals in as ↵David Sherret
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-12refactor: add `deno_permissions` crate (#22236)Divy Srivastava
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-11chore: enable clippy unused_async rule (#22834)David Sherret
2024-03-11fix(cli): use Instant for test times (#22853)Matt Mastracci
Fixes https://github.com/denoland/deno_std/issues/4473
2024-03-11fix(ext/node): make worker setup synchronous (#22815)Bartek Iwańczuk
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-11chore: hidden tool for overwriting files with fast check output (#22822)David Sherret
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-09fix(publish): regression - publishing with vendor folder (#22830)David Sherret
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-09fix(ext/node): support junction symlinks on Windows (#22762)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/20609 Vitepress support! `vitepress dev` and `vitepress build` via BYONM
2024-03-08fix(config): remove pkg name example and add pattern to schema (#22813)David Sherret
2024-03-08fix(config): add unstable features as examples to config schema (#22814)David Sherret
2024-03-08fix(publish): suggest using `--allow-dirty` on uncommitted changes (#22810)David Sherret
2024-03-08fix(cli): occasional panics on progress bar (#22809)tuhana
Uses `Instant` instead of `SystemTime` for `cli/util/progress_bar/mod.rs`. Fixes #22558
2024-03-08fix(publish): ability to un-exclude when .gitignore ignores everything (#22805)David Sherret
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-08fix(publish): typo in `--allow-dirty` help text (#22799)mimikun
2024-03-08fix: support sloppy resolution to file where directory exists (#22800)Luca Casonato
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-08chore: forward v1.41.2 release commit to main (#22793)denobot
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-08fix(publish): include explicitly specified .gitignored files and directories ↵David Sherret
(#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-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-08fix: respect unstable "temporal" configuration in config file (#22134)Bartek Iwańczuk
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-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-07perf: hard link npm cache (#22773)Divy Srivastava
2024-03-07fix(lsp): don't apply renames to remote modules (#22765)Nayeem Rahman
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-07fix(publish): silence warnings for sloppy imports and node builtins with env ↵Bartek Iwańczuk
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-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-06chore: Reuse linux symbols list on openbsd and freebsd (#22706)Divy Srivastava
2024-03-05chore(cli): remove problematic snapshot test (#22722)Matt Mastracci
This test crashes often on windows.
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-05perf(cli): faster standalone executable determination (#22717)Matt Mastracci
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] ```