David Sherret
9d3483d4eb
fix(repl): improve validator to mark more code as incomplete ( #17443 )
...
Closes #17442
2023-01-16 09:45:06 -05:00
Leo Kettmeir
df4d0c55c0
fix(cli/fmt): show filepath for InvalidData error ( #17361 )
2023-01-16 00:30:52 +00:00
Divy Srivastava
d5634164cb
chore: use rustfmt imports_granularity option ( #17421 )
...
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-14 23:18:58 -05:00
David Sherret
01e02d3123
refactor: create enum for --builtin
doc flag ( #17423 )
2023-01-14 12:39:56 -05:00
Geert-Jan Zwiers
6557642fc8
refactor(coverage): use FileFlags struct ( #17388 )
2023-01-13 16:56:29 -05:00
Geert-Jan Zwiers
052bcc62bb
refactor(cli/tools): reduce cloning ( #17309 )
2023-01-13 22:39:19 +01:00
Yiyu Lin
a00e432297
chore: add copyright_checker
tool and add the missing copyright ( #17285 )
2023-01-13 16:51:32 +09:00
Leo Kettmeir
692f9af14a
fix: don't unwrap in test pipe handling logic ( #17341 )
...
Fixes #14746
2023-01-12 02:30:23 +01:00
Nayeem Rahman
71ea4ef274
fix(watch): preserve ProcState::file_fetcher
between restarts ( #15466 )
...
This commit changes "ProcState" to store "file_fetcher" field in an "Arc",
allowing it to be preserved between restarts and thus keeping the state
alive between the restarts. File watchers for "deno test" and "deno bench"
now reset "ProcState" between restarts.
2023-01-10 16:28:10 +01:00
David Sherret
2be1282be4
fix(install): should always include --no-config
in shim unless --config
is specified ( #17300 )
...
Closes #17294
2023-01-08 09:03:55 -05:00
Geert-Jan Zwiers
84ef26ac9b
refactor(cli/tools): move flag and config logic to CliOptions ( #17008 )
...
Co-authored-by: David Sherret <dsherret@gmail.com>
2023-01-07 15:22:09 -05:00
Bartek Iwańczuk
fac6447815
refactor(permissions): add PermissionsContainer struct for internal mutability ( #17134 )
...
Turns out we were cloning permissions which after prompting were discarded,
so the state of permissions was never preserved. To handle that we need to store
all permissions behind "Arc<Mutex<>>" (because there are situations where we
need to send them to other thread).
Testing and benching code still uses "Permissions" in most places - it's undesirable
to share the same permission set between various test/bench files - otherwise
granting or revoking permissions in one file would influence behavior of other test
files.
2023-01-07 17:25:34 +01:00
Yiyu Lin
896dd56b7a
refactor(cli,core,ext,rt): remove some unnecessary clone
or malloc
( #17274 )
2023-01-05 14:29:50 -05:00
David Sherret
0ee64ad847
fix: upgrade deno_ast to 0.23 ( #17269 )
...
Closes #17172
Closes #15669
Closes #8529
2023-01-04 18:54:54 -05:00
Yiyu Lin
319f607476
chore(cli,ext,rt): remove some unnecessary clone
or malloc
( #17261 )
2023-01-04 13:20:36 +01:00
Fenix
501472f06b
fix(cli): bundle command support shebang file ( #17113 )
2023-01-03 16:19:28 +00:00
David Sherret
10e4b2e140
chore: update copyright year to 2023 ( #17247 )
...
Yearly tradition of creating extra noise in git.
2023-01-02 21:00:42 +00:00
Geert-Jan Zwiers
f729576b2d
refactor: cleanup redundant call ( #17226 )
2022-12-30 20:04:17 -08:00
Pig Fang
59dedf217f
fix(init): update comment style ( #17074 )
...
The output of `init` are commands, so this should be treated as a "Shell
script". In Shell script, comments must start with `#`, not `//`. (This
also makes the commands example easier to be copied to somewhere.)
2022-12-17 23:26:25 +01:00
linbingquan
f46df3e359
chore: update to Rust 1.66.0 ( #17078 )
2022-12-17 23:20:15 +01:00
David Sherret
f2c9cc500c
fix(lint): column number for pretty reporting was off by 1 ( #17107 )
...
Closes #17086
2022-12-17 16:00:33 -05:00
sigmaSd
c39550fe52
fix(repl): doing two history searches exiting with ctrl+c should not exit repl ( #17079 )
...
fix https://github.com/denoland/deno/issues/16147
2022-12-16 18:39:52 -05:00
Bartek Iwańczuk
efcb93f8b9
fix(npm): fix require resolution if using --node-modules-dir ( #17087 )
...
In our `require()` implementation we use a special logic to resolve
"base path" when looking for matching packages, however this logic
is in contradiction to what needs to happen if there's a local
"node_modules"
directory used. This commit changes require implementation to be aware
if we're running off of global node modules cache or a local one.
2022-12-16 23:41:51 +01:00
David Sherret
058610b458
fix(install): use a hidden file for the lockfile and config ( #17084 )
...
Closes #17083
2022-12-16 22:24:06 +01:00
Bartek Iwańczuk
a202e38316
refactor(core): allow to listen for notifications in LocalInspectorSession ( #17040 )
2022-12-16 20:12:06 +01:00
Bartek Iwańczuk
ff71ef8175
fix(repl): errors shouldn't terminate repl ( #17082 )
...
This commit changes REPL to never surface errors coming
from code execution, but instead print them as errors
to the REPL itself.
2022-12-16 17:11:10 +01:00
David Sherret
9f82abb4b4
fix(upgrade/windows): correct command in windows access denied message ( #17049 )
2022-12-14 16:21:43 -05:00
David Sherret
4a64ca8501
chore: fix recent regression with deno upgrade
not handling redirects ( #17045 )
2022-12-14 08:47:18 -05:00
Bartek Iwańczuk
435948e470
feat(repl): support npm packages ( #16770 )
...
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-12-13 13:53:32 +01:00
David Sherret
8972ebc9cc
fix: always derive http client from cli flags ( #17029 )
...
I'm not sure how to test this. It doesn't seem to have an existing test.
Closes #15921
2022-12-12 21:30:44 -05:00
Bartek Iwańczuk
8c026dab92
feat: improve download progress bar ( #16984 )
...
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-12-12 20:52:10 -05:00
Geert-Jan Zwiers
890b065310
feat(cli): support deno bench in the config file ( #16608 )
...
This PR adds the ability to set `include/exclude` fields for `deno
bench` in the configuration file.
2022-12-10 02:30:47 +01:00
sigmaSd
4eb8e875fd
feat(init): Generate main_bench.ts by default ( #16786 )
...
This commit changes "deno init" to generate "main_bench.ts" file
which scaffold two example bench cases.
2022-12-10 00:34:08 +01:00
Bartek Iwańczuk
6794d9fe5d
feat(init): Use jsonc for configuration file ( #17002 )
...
Generate "deno.jsonc" instead of "deno.json" when running "deno init"
subcommand.
2022-12-09 23:55:03 +01:00
David Sherret
653aebfa1a
fix: respect the --quiet
flag in more cases ( #16998 )
2022-12-09 10:54:24 -05:00
David Sherret
6541a0a9fd
refactor: cleanup main.rs ( #16996 )
...
1. Extracts out some code from main.rs
2. Inlines all the `x_command` functions in main.rs
2022-12-09 09:40:48 -05:00
Lino Le Van
a9d2154110
fix(cli/upgrade): properly cleanup after finished ( #16930 )
...
Co-authored-by: kidonng <kidonng@users.noreply.github.com>
2022-12-08 17:48:48 -05:00
David Sherret
91443bbc0b
fix(compile): ensure import map is used when specified in deno config file ( #16990 )
...
Closes #14246
2022-12-08 11:50:09 -05:00
Bartek Iwańczuk
a6b5d05311
feat(init): Generate deno.json by default ( #16389 )
...
Updates `deno init` subcommand to create a `deno.json` when initializing
a new project.
Slightly changes the output, to make it more readable.
2022-12-08 06:34:28 +01:00
Bartek Iwańczuk
1a472ad06b
feat(repl): run "deno repl" with no permissions ( #16795 )
...
This commit changes "deno repl" command to run with no permissions by
default and accept "--allow-*" flags.
This change is dictated by the fact that currently there is no way to
run REPL with limited permissions. Technically it's a breaking
change in the CLI command, but there's agreement in the team
that it has merit and it's a good solution.
Running just "deno" command still starts the REPL with full permissions
allowed, but now a banner is printed to inform users about that:
2022-12-07 20:21:18 +01:00
David Sherret
9c1ab39e19
feat: ignore node_modules
and .git
folders when collecting files everywhere ( #16862 )
...
We currently only do this for fmt. This makes it so they're excluded by
default, but you can still opt into these directories by explicitly
specifying them.
2022-12-07 13:10:10 -05:00
David Sherret
c03e0f3853
refactor: remove deno_graph::Locker
usage ( #16877 )
...
This is just a straight refactor and doesn't make any improvements to
the code that could now be made.
Closes #16493
2022-12-06 14:12:51 -05:00
David Sherret
2fab4583ef
fix(test): improve how --fail-fast
shuts down when hitting limit ( #16956 )
...
Closes #15650
2022-12-05 16:17:49 -05:00
David Sherret
83bc8c473d
fix(upgrade/windows): show informative message on access denied error ( #16887 )
...
Closes #16886
2022-12-02 14:53:10 -05:00
David Sherret
05469fc382
fix(upgrade): respect the --quiet
flag ( #16888 )
...
Also, use `ProgressBar` for upgrading.
2022-12-01 18:05:49 -05:00
David Sherret
fafb3eebaf
fix(vendor): properly handle bare specifiers that start with http ( #16885 )
2022-12-01 11:01:19 -05:00
Bartek Iwańczuk
d1962e07af
fix(repl): respect --quiet flag ( #16875 )
...
This commit changes REPL behavior to respect --quiet flag. Once
this flag is present REPL will not print a banner at the start.
2022-11-30 23:25:20 +01:00
sigmaSd
2656af2544
fix(coverage): Error if the emit cache is invalid ( #16850 )
2022-11-29 18:43:54 +01:00
David Sherret
2d4c46c975
refactor: create util folder, move nap_sym to napi/sym, move http_cache to cache folder ( #16857 )
2022-11-28 17:28:54 -05:00
Bartek Iwańczuk
3a320db270
fix(inspector): send "isDefault" in aux data ( #16836 )
...
With trial and error I found that most debuggers expect "isDefault" to be sent
in "auxData" field of "executionContextCreated" notification. This stems from
the fact that Node.js sends this data and eg. VSCode requires it to close
connection to the debugger when the program finishes execution.
2022-11-26 23:09:48 +01:00