1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-04 08:54:20 -05:00
Commit graph

414 commits

Author SHA1 Message Date
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
David Sherret
0c0af67f89
refactor: DenoDir - move to cache folder and make root_dir private (#16823) 2022-11-26 00:04:30 +00:00
David Sherret
6de3d7f184
refactor: move cdp.rs to tools/repl (#16821) 2022-11-25 18:38:08 -05:00
David Sherret
dcb4ffb93a
refactor: move dts files, diagnostics.rs, and tsc.rs to tsc folder (#16820) 2022-11-25 18:29:48 -05:00
Bartek Iwańczuk
433f38084b
fix(repl): more reliable history handling (#16797)
This commit changes history handling of the REPL.

There were some situations were history wasn't properly saved and flushed to a
file, making history very spotty. This commit changes it to save every line into
the history file and flush it to disk before being evaluated.

Thanks to this all lines, including "close()" will be stored in the history
file.

If for any reason we're not able to save history file, a single warning will be
printed to the REPL and it will continue to work, even if subsequent tries will
fail to save to disk.
2022-11-25 02:56:47 +01:00
David Sherret
4b07c7b159
fix(install): deno install -f should overwrite lockfile from previous installation (#16744) 2022-11-21 14:24:51 -05:00
Bartek Iwańczuk
d232746928
feat(core): Ability to create snapshots from existing snapshots (#16597)
Co-authored-by: crowlkats <crowlkats@toaxl.com>
2022-11-21 14:36:26 +01:00
David Sherret
409e6c8402
fix(info): handle circular npm dependencies (#16692) 2022-11-17 21:22:28 -05:00
Aaron O'Mullan
238590aa9f
chore: use Rust 1.65.0 (#16688) 2022-11-18 02:59:10 +01:00
David Sherret
d6fd171394
fix(install): support npm specifiers (#16634)
Supports npm specifiers for `deno install`. This will by default always
use a lockfile (which is generated on first run) unless `--no-lock` is
specified.
2022-11-14 22:40:05 -05:00
Bartek Iwańczuk
5be8c96ae8
feat: Stabilize Deno.bench() and 'deno bench' subcommand (#16485) 2022-11-11 00:22:14 +01:00
David Sherret
cbb3f85433
feat(unstable/npm): support peer dependencies (#16561)
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-08 14:17:24 -05:00
sigmaSd
384e53308a
fix(upgrade): don't prompt if current version has changed (#16542)
fix https://github.com/denoland/deno/issues/16539
fix https://github.com/denoland/deno/issues/16537
2022-11-05 19:06:58 -04:00
Bartek Iwańczuk
dae3940519
fix(lock): add --no-lock flag to disable auto discovery of lock file (#16526) 2022-11-03 16:42:56 +01:00
Bartek Iwańczuk
630abb58b0
refactor: Combine ImportMapResolver and JsxResolver (#16508)
These resolvers are used in `deno_graph` APIs. Combining them removes a
lot of code and
unblocks me on https://github.com/denoland/deno/pull/16157
2022-11-02 15:47:02 +01:00
David Sherret
cb08b4683f
feat(unstable/npm): deno info --json support for npm specifiers (#16472) 2022-10-31 10:25:46 -04:00
sigmaSd
b07a753756
fix(tools): show correct upgrade command for upgrading canary (#16486) 2022-10-31 11:48:28 +01:00
David Sherret
edaceecec7
feat: support npm specifiers in deno info for display text output only (#16470) 2022-10-28 16:19:55 -04:00
Bartek Iwańczuk
d1d42e6ba7
fix(upgrade): don't prompt if latest version is older than current binary (#16464) 2022-10-28 18:43:49 +02:00