Yusuke Tanaka
60e980c781
refactor(cli): Remove unnecessary conversion into BTreeMap ( #8498 )
...
This commit removes unnecessary conversion into BTreeMap. The value
that gets converted into BTreeMap is _originally_ BTreeMap, so this
conversion is just superfluous.
Additionally, a test is added so that we can make sure the keys in the
emitted lockfile are sorted alphabetically.
2020-11-26 13:16:48 +01:00
crowlKats
d40b0711a7
fix(websocket): Fix PermissionDenied error being caught in constructor ( #8402 )
2020-11-25 15:17:46 +01:00
Nayeem Rahman
adbbd85461
BREAKING(cli/tsc_config): Make isolatedModules non-configurable ( #8482 )
2020-11-25 13:06:54 +01:00
Chayim Refael Friedman
f42adf2277
docs: Add missing closing parenthesis ( #8477 )
2020-11-25 12:54:38 +01:00
crowlKats
a08d2eee2b
add canary versioning ( #8480 )
2020-11-25 05:30:14 -05:00
Valentin Anger
605874ee98
feat(test): horizontal separator between disjoint runs of lines ( #8484 )
...
Places a newline between non-consecutive line block in coverage
report to improve readability.
2020-11-24 22:26:38 +01:00
Luca Casonato
501a31fcf3
fix(op_crates/fetch): redirect: "manual"
fetch should return type: "default"
response ( #8353 )
2020-11-24 21:00:35 +01:00
Kitson Kelly
276f529755
feat(cli): update to TypeScript 4.1 ( #7573 )
2020-11-24 09:31:10 +11:00
William Perron
266925d772
fix(cli): add file URL support for Deno.readLink ( #8423 )
2020-11-23 22:11:56 +01:00
Bartek Iwańczuk
bc79d55649
v1.5.4
2020-11-23 15:10:58 +01:00
Bartek Iwańczuk
230a11e8a4
Revert "docs(cli): Fix documentation about usage of deno completions … ( #8468 )
...
This reverts commit 17d4cd9213
.
2020-11-23 13:41:50 +01:00
Kitson Kelly
fec7fdc691
tests(cli): add test for improper unicode encoding ( #8162 )
...
and updates swc_ecma_codegen
Closes #8161
2020-11-23 10:22:13 +11:00
Nayeem Rahman
e7fc7d7151
fix(cli/tsc): allow non-standard extensions on imports ( #8464 )
2020-11-23 10:20:32 +11:00
Yusuke Tanaka
e3f73d3ec0
feat(unstable): Support --watch flag for bundle and fmt subcommands ( #8276 )
...
This commit adds support for "--watch" flag for "bundle"
and "fmt" subcommands.
In addition to this, it refactors "run --watch" command so that
module resolution will occur every time the file watcher detects
file addition/deletion, which allows the watcher to observe a file
that is newly added to the dependency as well.
2020-11-22 21:45:44 +01:00
Mayank Agarwal
17d4cd9213
docs(cli): Fix documentation about usage of deno completions script ( #8369 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-11-22 16:29:22 +01:00
crowlKats
750f179aeb
refactor(cli/tools/upgrade): rework upgrade ( #8331 )
...
This commit does major overhaul of "upgrade" subcommand,
reducing complexity & giving more sensible console output.
Removes gz support for archives.
Uses last part of url instead of scraping to get latest version.
2020-11-22 16:07:05 +01:00
Nayeem Rahman
7405356e23
chore(cli/flags): Rename --failfast to --fail-fast ( #8456 )
2020-11-22 15:40:33 +01:00
Nayeem Rahman
14877f7fe2
feat(unstable): Add deno test --no-run ( #8093 )
...
This commit adds new flag to "deno test" subcommand
called "--no-run" that allows to preload, cache an type
check.
2020-11-22 14:06:51 +01:00
Max Drosdo.www
686a17fc07
fix(cli): support "deno run --v8-flags=--help" without script ( #8110 )
2020-11-21 23:33:42 +01:00
Anonymous
27dd786016
fix: "cloneValue" should return a Set when given a Set ( #7972 )
2020-11-21 17:29:18 +01:00
Bartek Iwańczuk
04f4201f30
refactor(corr): accept get_error_class_fn in RuntimeOptions ( #8444 )
...
This commit adds "get_error_class_fn" field to "RuntimeOptions"
struct in order to unify configuration of "JsRuntime".
2020-11-21 15:56:14 +01:00
Bartek Iwańczuk
cf7949db2f
upgrade: rusty_v8 0.13.0, v8 8.8.278.2 ( #8446 )
2020-11-21 14:45:07 +01:00
Bartek Iwańczuk
b63fe3f35c
upgrade: deno_doc, deno_lint, dprint, swc ( #8443 )
2020-11-21 13:17:42 +01:00
Bartek Iwańczuk
91f293442d
refactor(cli): worker event serialization ( #8438 )
...
This commit simplifies code responsible for serialization
of web worker events. Instead of using "PrettyJsError"
it's enough to downcast to "deno_core::JsError", making
the code less specific to cli/ implementation.
2020-11-20 13:25:18 +01:00
Bartek Iwańczuk
e582796f42
refactor(cli): rename fmt_errors::JsError to PrettyJsError ( #8435 )
...
This commit renames "fmt_errors::JsError" to "PrettyJsError"
to avoid confusion with "deno_core::JsError".
Consequently "CoreJsError" aliases to "deno_core::JsError"
were removed.
Additionally source mapping step has been removed from
"PrettyJsError::create" to better separate domains.
2020-11-19 20:37:22 +01:00
Bartek Iwańczuk
9eaa1fb71d
refactor(cli): move tooling to cli/tools/ ( #8424 )
...
This commit moves following tools into a single "tools"
module located at "cli/tools/mod.rs":
- formatter
- linter
- test runner
- coverage collector
- installer
- binary upgrader
- repl
2020-11-19 19:19:34 +01:00
Mark Tiedemann
f4ac2b1475
fix(cli/tests): printf.exe doesn't exist on windows ( #8404 )
2020-11-19 07:06:19 -05:00
Bartek Iwańczuk
636af2850c
refactor(cli): rename fs module to fs_util ( #8380 )
...
This commit renames "fs" module in "cli/" to "fs_util". This is purely
cosmetic change; there were a few places which aliased "crate::fs"
to "deno_fs" which was very confusing with "fs" module in ops.
2020-11-16 20:48:50 +01:00
Mark Tiedemann
dd9c204884
Improve Deno.version type declaration ( #8391 )
2020-11-16 14:36:00 -05:00
Bartek Iwańczuk
ab7b8ba8d1
v1.5.3
2020-11-16 11:14:00 +01:00
Kitson Kelly
37fbbf8101
fix(cli): local sources are not cached in memory ( #8328 )
...
Fixes #4743
Closes #5253
Fixes #5631
Fixes #6116
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2020-11-16 13:19:31 +11:00
Bartek Iwańczuk
2cbf5c26ac
feat(lint): support --rules --json ( #8384 )
...
This commit adds support for "--json" flag in combination
with "--rules". List of rules is serialized to JSON and printed.
2020-11-14 20:51:30 +01:00
Yusuke Tanaka
9029003046
build: update dlint to v0.2.10 ( #8284 )
...
Update prebuilt "dlint" binary to v0.2.10 and fix diagnostics
for "require-await" rule.
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-11-14 20:27:37 +01:00
Benjamin Gruenbaum
3d65e57d7c
fix: fix various global objects constructor length ( #8373 )
...
This commit changes various Web APIs constructors to
match their signature in the browser.
2020-11-14 13:10:23 +01:00
Yusuke Tanaka
3a0ebff641
fix(fmt, lint): Make sure that target paths are not directory ( #8375 )
...
This commit merges implementations of "collect_files" and "files_in_subtree",
leaving only the former. Additionally it was ensured that directories are not yielded
from this function.
2020-11-14 13:05:26 +01:00
Divy Srivastava
d5661f677e
refactor: deno_crypto op crate ( #7956 )
...
This commit factors out "deno_crypto" op crate.
"rand" crate dependency was consequently moved to
"deno_crypto" crate and reexported.
2020-11-13 22:01:57 +01:00
KNnut
2c8439bc1e
refactor(cli+core): various cleanups in Rust ( #8336 )
2020-11-13 09:17:31 +11:00
Max Drosdo.www
444c2cda4f
refactor(cli): minor cleanup of main.rs ( #8362 )
2020-11-13 08:49:59 +11:00
Akshat Agarwal
c744ee2756
fix(cli): don't walk the subdirectory twice when using the --ignore
flag ( #8040 )
...
This commit reworks "collect_files" utility to accept "ignore" parameter
which allows to filter out files in a single iteration instead of walking
file tree second time to excude "ignored" files.
2020-11-11 20:53:55 +01:00
Benjamin Gruenbaum
a55e689e38
fix(op_crates/web): FileReader event handler order ( #8348 )
2020-11-11 16:59:49 +01:00
Benjamin Gruenbaum
b255a05f18
fix(web/worker) define event handlers in DOM order ( #8334 )
2020-11-10 07:15:42 -05:00
Andrew Mitchell
97a9620a01
test(cli/upgrade): remove test_compose_url_to_exec ( #8329 )
2020-11-10 10:41:33 +01:00
Benjamin Gruenbaum
94b68f9069
fix(cli/rt): dom handler order in websocket ( #8320 )
2020-11-10 14:34:42 +11:00
Kitson Kelly
0982056ff6
tests(cli): check ignores dynamic import errors ( #8323 )
...
Closes #6618
2020-11-10 10:18:43 +11:00
Kitson Kelly
c1fa8fbeba
fix(cli): allow root modules be .mjs/.cjs ( #8310 )
...
Fixes #6176
2020-11-10 10:10:41 +11:00
Kitson Kelly
b402b75c1d
fix(cli): allow setting of importsNotUsedAsValues in Deno.compile() ( #8306 )
...
Fixes #6663
2020-11-10 06:50:33 +11:00
Kitson Kelly
5375bf2e3f
fix(cli): allow declaration emits for Deno.compile() ( #8303 )
...
Fixes #8289
2020-11-10 06:49:15 +11:00
Scott Olson
57c2608e98
fix(cli): Use safe shell escaping in deno install
( #7613 )
2020-11-09 14:08:12 -05:00
KNnut
aaf7166a9d
refactor(cli): remove unnecessary format! calls ( #8315 )
2020-11-09 15:38:29 +01:00
Kitson Kelly
293cae5e1f
fix(cli): do not write tsbuildinfo when diagnostics are emitted ( #8311 )
...
Fixes #8309
2020-11-09 21:21:49 +11:00
Kitson Kelly
71d7482577
v1.5.2 ( #8301 )
2020-11-09 10:58:21 +11:00
Bartek Iwańczuk
a269dffe17
chore: remove dead code ( #8298 )
2020-11-08 23:35:36 +01:00
Bartek Iwańczuk
6743383d2e
upgrade: deno_doc, deno_lint, dprint, swc ( #8292 )
2020-11-08 23:27:36 +01:00
crowlKats
5995c58e63
refactor: auto detect target triples for upgrade ( #8286 )
2020-11-08 11:54:35 +01:00
Mo
ccc95bc9b9
refactor: rewrite permission_test to not depend on Python ( #8291 )
2020-11-08 11:50:27 +01:00
Kitson Kelly
e9edc05bed
fix(cli): ensure that transitory dependencies are emitted ( #8275 )
...
Fixes #8111
2020-11-08 07:00:42 +11:00
Kitson Kelly
88c4d3145b
fix(cli): allow remapping to locals for import map ( #8262 )
...
Fixes #7723
2020-11-07 15:04:22 +11:00
Kitson Kelly
4f67f0cc60
fix(cli): properly handle type checking root modules with type defini… ( #8263 )
2020-11-07 06:53:37 +11:00
Kitson Kelly
5f7c80986f
fix(cli): correct libs sent to tsc for unstable worker ( #8260 )
...
Fixes #8257
2020-11-06 12:10:19 +11:00
Kitson Kelly
96e03e0b93
refactor(cli): refactor file_fetcher ( #8245 )
2020-11-06 11:38:21 +11:00
Bartek Iwańczuk
791119d4af
build: rewrite tools/ scripts to deno ( #8247 )
...
This commit rewrites scripts in "tools/" directory
to use Deno instead of Python. In return it allows
to remove huge number of Python packages in "third_party/".
2020-11-05 15:53:21 +01:00
ali ahmed
e7cfd90b0f
fix(cli/repl): Fixing syntax highlighting ( #8202 )
...
Fixes #8240
2020-11-05 14:08:01 +11:00
Ryan Dahl
ea8a598f7b
Remove dead code ( #8235 )
2020-11-03 13:22:33 -05:00
Bartek Iwańczuk
8e914be742
build: migrate to dlint ( #8176 )
...
This commit migrates repository from using "eslint"
to "dlint" for linting JavaScript code.
2020-11-03 16:19:29 +01:00
Yoshiya Hinosawa
e736d0f60f
fix(prompt): fix display of non-ASCII characters on Windows ( #8199 )
2020-11-03 01:15:29 +01:00
Bartek Iwańczuk
c3dd19c5d3
refactor(cli): remove ProgramState::permissions ( #8228 )
...
This commit removes ProgramState::permissions field.
Having permissions parsed from CLI flags stored on globally
accessible state object made it easy to mistakenly use these
permissions in situations which required "runtime" permissions.
2020-11-02 23:37:55 +01:00
Kitson Kelly
d672e1405d
refactor(cli): cleanup compiler snapshot and tsc/module_graph ( #8220 )
2020-11-03 06:41:20 +11:00
Trivikram Kamat
40cd4db974
feat(cli): bump TypeScript to 4.0.5 ( #8138 )
2020-11-03 06:39:39 +11:00
Yoshiya Hinosawa
397fec63d1
fix(op_crates/web): fix URLSearchParams, malformed url handling ( #8092 )
...
Co-authored-by: Evan <c4t@tuta.io>
2020-11-02 18:58:29 +01:00
Benjamin Gruenbaum
a8ca9fe7bb
test(op_crates/web): add EventTarget tests ( #8205 )
2020-11-02 18:42:22 +01:00
Yoshiya Hinosawa
0e5c8c03ac
add commit hash and target to long_version output ( #8133 )
2020-11-02 12:40:33 -05:00
Kitson Kelly
272e9b82eb
fix(cli): inject helpers when transpiling via swc ( #8221 )
...
Fixes #8212
2020-11-02 22:33:43 +11:00
Kitson Kelly
fdcc78500c
refactor(cli): migrate runtime compile/bundle to new infrastructure ( #8192 )
...
Fixes #8060
2020-11-02 13:51:56 +11:00
Benjamin Gruenbaum
9397cf508e
fix(op_crates/web): make TextEncoder work with forced non-strings ( #8206 )
...
Fixes: #8201
2020-11-02 10:57:18 +11:00
Nayeem Rahman
d9b8778c45
refactor(cli/permissions): Cleanup Flags to Permissions conversion ( #8213 )
2020-10-31 23:44:42 +01:00
Luca Casonato
03769f11b5
v1.5.1
2020-10-31 15:32:43 +01:00
Bartek Iwańczuk
2a36e2f892
upgrade: deno_doc, deno_lint, dprint, swc ( #8197 )
...
- deno_doc 0.1.14
- deno_lint 0.2.7
- dprint-plugin-typescript 0.32.7
- swc_bundler 0.14.1
- swc_ecmascript 0.13.1
2020-10-30 20:39:53 +01:00
Bartek Iwańczuk
ce75101e3e
fix: Deno.fdata(), Deno.fdatasync() ( #8193 )
...
These APIs were stabilized in 1.5.0, but were
never added to the "stable" Deno namespace. This
commit fixes that.
2020-10-30 13:06:09 +01:00
Bartek Iwańczuk
4f57ca0daf
fix: panic in bundler ( #8168 )
...
This commit fixes panic in bundler which was caused
by not setting thread-local slots.
2020-10-30 12:19:49 +01:00
Nayeem Rahman
6be6c517d0
fix(cli/fmt): Strip "\\?\" prefix when displaying Windows paths ( #8135 )
2020-10-30 03:19:03 +01:00
Sander Hahn
1854c6f73b
fix(cli): prompt works with windows eol and eof ( #8149 )
2020-10-29 18:35:58 +01:00
Luca Casonato
8d99adb6c4
refactor: don't spin up V8 for deno cache
( #8186 )
2020-10-29 14:19:55 +01:00
Kitson Kelly
b0482400c9
fix(cli): make hashes of tsconfig deterministic ( #8167 )
...
Fixes #8163
2020-10-29 21:18:18 +11:00
Yusuke Tanaka
bfce376c68
refactor(watch): create single watcher for whole process ( #8083 )
...
This commit rewrites file watcher used with --watch flag.
Instead of creating new watcher after each restart, only a single
watcher is created for whole process. Additionally debouncing
mechanism has been added to prevent infinite restart loops
if multiple files were changed in quick succession.
Co-authored-by: bartossh <lenart.consulting@gmail.com>
2020-10-28 12:41:18 +01:00
Kevin (Kun) "Kassimo" Qian
07359b7957
fix(repl): don't hang on unpaired braces ( #8151 )
...
Previously, entering a single ']' would cause repl to forever accepting
new lines, due to that `ValidationResult::Invalid` would actually be
consumed by the editor itself while continue building the lines. Instead
we should mark it as `Valid` and send the bad input for evaluation to
get the proper error from V8.
Before:
```
> ]
(you can keep entering new line here, and it will never consume input
until you Ctrl-C)
```
After:
```
> ]
Uncaught SyntaxError: Unexpected token ']'
>
```
2020-10-28 06:03:17 -04:00
Kitson Kelly
e01664d0ae
fix(cli): module graph handles redirects properly ( #8159 )
...
Fixes #8154
2020-10-28 20:38:09 +11:00
Kitson Kelly
6844caa9a5
fix(cli): restore tripleslash lib refs support ( #8157 )
...
Fixes #8147
2020-10-28 11:52:20 +11:00
Bartek Iwańczuk
dd01f206da
v1.5.0
...
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-10-27 16:00:23 +01:00
Ross Weir
60cd7695ef
fix(cli): handle URL paths in Deno.mkdir() ( #8140 )
2020-10-27 13:21:32 +01:00
Kitson Kelly
5af1dcfe29
fix(cli): do not throw on empty typescript files ( #8143 )
...
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-10-27 13:19:27 +01:00
Ross Weir
9fb4931a95
fix(op_crates/web): Expose event properties in console output ( #8103 )
...
Fixes #8073
2020-10-27 09:22:03 +11:00
Kitson Kelly
b03f4a4a1c
fix(cli): restore permission check on workers ( #8123 )
...
Fixes #8120
2020-10-27 06:56:00 +11:00
Luca Casonato
acc201625f
chore: add bundle_no_check benchmark ( #8130 )
2020-10-26 19:57:29 +01:00
Ryan Dahl
c4d33e8d77
fix: Use -rw-r--r-- for cache files ( #8132 )
2020-10-26 12:58:58 -04:00
Tim Reichen
ae86cbb551
rename(std/testing): rename assert*Contains to assert*Includes ( #7951 )
...
This commit renames two assertion functions to better align with JS API:
- assertStringContains -> assertStringIncludes
- assertArrayContains -> assertArrayIncludes
2020-10-26 16:03:30 +01:00
Elias Sjögreen
305a9c04ba
feat(unstable): add Deno.systemCpuInfo() ( #7774 )
2020-10-26 10:54:27 -04:00
Kid
4c41ba5ad7
fix(op_crates/fetch): ensure Request.method to be string ( #8100 )
...
Ensure "Request.method" to be the default value ("GET") if
"init.method" is not defined, which follows browser's behavior.
2020-10-26 15:02:08 +01:00
Bartek Iwańczuk
57cad53945
refactor(cli): rewrite Deno.transpileOnly() to use SWC ( #8090 )
...
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2020-10-26 14:03:03 +01:00
Bartek Iwańczuk
aebbdd5cc2
Revert "feat(lint): stabilize "deno lint" subcommand ( #8075 )" ( #8128 )
...
This reverts commit c5c48f845a
.
2020-10-26 13:36:13 +01:00
Nayeem Rahman
822e5b6536
fix(core/runtime): Indicate exceptions in promises ( #8124 )
...
Fixes #4879
2020-10-26 14:34:00 +11:00