1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-02 09:34:19 -04:00
Commit graph

143 commits

Author SHA1 Message Date
Ryan Dahl
73d8fa74c6
BREAKING: There is no public Rust API for the CLI (#5226) 2020-05-11 17:33:36 -04:00
Ryan Dahl
fb7d7f40ed
Merge std_tests.rs into integration_tests.rs.rs (#5228)
* Remove usage of url_to_filename from integration_tests
* Make test ports not conflict with each other
2020-05-11 14:49:19 -04:00
Bartek Iwańczuk
32aeec9630
refactor: check permissions in SourceFileFetcher (#5011)
This PR hot-fixes permission escapes in dynamic imports, workers
and runtime compiler APIs.

"permissions" parameter was added to public APIs of SourceFileFetcher
and appropriate permission checks are performed during loading of
local and remote files.
2020-05-11 13:13:27 +02:00
Ryan Dahl
eb505f8afc
Add support for X-Deno-Warning header (#5161) 2020-05-09 12:43:24 -04:00
crowlKats
abbf0339cd
feat(upgrade): allow specifying a version (#5156) 2020-05-09 06:31:15 -04:00
Ryan Dahl
4e5e6da348
Add hint on how to exit REPL (#5143)
Removes exit and help commands
2020-05-08 18:58:51 -04:00
Bartek Iwańczuk
aca21dad1b
BREAKING: make Worker.deno unstable (#5128)
This commit makes "Worker.deno" option unstable.

Added new manual entry "docs/runtime/workers.md".

Removed stale workers tests.
2020-05-07 21:15:59 +02:00
Bartek Iwańczuk
2b66b8a03e
BREAKING: Remove support for .wasm imports (#5135)
Importing .wasm files is non-standardized therefore deciding to
support current functionality past 1.0 release is risky.

Besides that .wasm import posed many challenges in our codebase
due to complex interactions with TS compiler which spawned
thread for each encountered .wasm import.

This commit removes:
- cli/compilers/wasm.rs
- cli/compilers/wasm_wrap.js
- two integration tests related to .wasm imports
2020-05-07 20:43:27 +02:00
Bartek Iwańczuk
0ba90c8c11
fix(imports): fix panic on unsupported scheme (#5131) 2020-05-07 15:57:10 +02:00
Ryan Dahl
6666f1d36a
remove target_test.py (#5112) 2020-05-06 16:34:48 -04:00
Ryan Dahl
221221cc97
BREAKING: execPath should require allow-read (#5109) 2020-05-06 15:51:33 -04:00
Bert Belder
e513751ee9
Clean up 'inspector_break_on_first_line' test and fix its flakiness (#5098) 2020-05-06 04:32:14 +02:00
Bert Belder
e574437922
Fix inspector hanging when task budget is exceeded (#5083)
The issue is solved by proxying websocket messages over a pair of
`futures::mpsc::unbounded` channels. As these are are implemented in
the 'futures' crate, they can't participate in Tokio's cooperative
task yielding.
2020-05-05 16:12:45 +02:00
Ryan Dahl
6c02b061ce
stabilize Deno.cwd and require --allow-read (#5068) 2020-05-04 14:23:06 -04:00
Ryan Dahl
92c0591fcb
simplify unit tests: compiler_api, workers (#5073) 2020-05-04 10:40:18 -04:00
Bartek Iwańczuk
a913b7a1ba
BREAKING: remove CLI 'deno script.ts' hack (#5026)
This PR removes the hack in CLI that allows to run scripts with shorthand: deno script.ts.

Removing this functionality because it hacks around short-comings of clap our CLI parser. We agree that this shorthand syntax is desirable, but it needs to be rethinked and reimplemented. For 1.0 we should go with conservative approach that is correct.
2020-05-04 13:03:30 +02:00
Bartek Iwańczuk
2872b362ff
BREAKING: disallow static import of local modules from remote modules (#5050)
This commit changes module loading logic to disallow statically import
local module (file:// scheme) from remote modules (http://, https://
schemes).
2020-05-02 15:51:08 +02:00
Bartek Iwańczuk
de2c042482
BREAKING: remove support for JSON imports (#5037)
This commit removes support for importing JSON files as modules.

This change is dictated by security; browsers rolled back on this
support as well.
2020-05-02 00:32:05 +02:00
Nayeem Rahman
96fd0f4692
BREAKING: feat(cli/installer): Support guessing the executable name (#5036) 2020-05-01 15:33:11 -04:00
Fenzland
25b765c123
fix misaligned error reporting on tab char (#5032) 2020-05-01 13:03:54 -04:00
Luca Casonato
80e2211141
Unstable methods should not appear in runtime or d.ts (#4957)
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2020-04-30 11:23:40 -04:00
Luca Casonato
e6f70c77ee
Make import maps unstable (#4934) 2020-04-28 01:12:38 +02:00
Bartek Iwańczuk
7a94ea08e9
fix(core): fix top-level-await error handling (#4911) 2020-04-27 17:25:26 +02:00
Ryan Dahl
4036be2ab2
Make runtime compile ops unstable (#4912) 2020-04-27 09:59:34 -04:00
Ryan Dahl
0c47cd6785
introduce unstable flag, make a few things unstable (#4892) 2020-04-25 09:31:54 -04:00
Nayeem Rahman
5bfe3eb8f4
feat(cli/installer.rs): Add DENO_INSTALL_ROOT (#4787) 2020-04-16 18:15:42 -04:00
Ryan Dahl
263dc8f5fe
Revert "test(inspector): add coverage test case (#4725)" (#4754)
Flaky and doesn't implement any features.

This reverts commit a7a3a771a0.
2020-04-15 11:26:31 +02:00
Bartek Iwańczuk
a7a3a771a0
test(inspector): add coverage test case (#4725) 2020-04-14 20:09:50 +02:00
Nayeem Rahman
0ea6eb83a9
refactor(core/js_error): Align JSStackFrame with CallSite (#4715)
Renames and adds missing fields to JSStackFrame from CallSite. Fixes #4705.

Cleans up base changes for line and column numbers.
2020-04-13 10:54:16 -04:00
Nayeem Rahman
2b362bef85
refactor(cli/fmt_errors): Format stack frames in prepareStackTrace() (#4706) 2020-04-11 02:08:11 -04:00
Akshat Agarwal
caff550b6c
BREAKING: Rename 'deno fetch' subcommand to 'deno cache' (#4656) 2020-04-07 11:24:47 -04:00
Bartek Iwańczuk
dd3a94933a
feat: add --importmap flag to deno bundle (#4651) 2020-04-07 12:32:09 +02:00
Giorgi Rostomashvili
f82b9ba329
fix: fetch reference types for JS files (#4652)
Fixes #4000 and fixes #4476. Now always tries to fetch reference types
for JS files. Does not throw if it fails, since Typescript compiler will
complain if the file is not there(it will try to fetch it again first)
and people who just use JS should not be bothered by this error.

Not sure about my test, it passes and catches the bug but maybe there is
a better way to express it.
2020-04-06 16:52:25 -04:00
Andres Villegas
2911fcc78d
Enable inspector tests (#4628) 2020-04-04 14:46:09 -04:00
Bert Belder
c0cb198114
Make inspector more robust, add --inspect-brk support (#4552) 2020-04-03 13:40:11 -04:00
Kitson Kelly
2e24385c48
Support dynamic import in bundles. (#4561) 2020-04-01 23:14:30 -04:00
Ryan Dahl
6ae47449ec
Ignore flaky test cafile_info (#4517)
Ref #4512
2020-03-28 22:51:30 +01:00
Kevin (Kun) "Kassimo" Qian
2f7842246e
fix(inspector): proper error message on port collision (#4514) 2020-03-28 17:42:29 -04:00
Ryan Dahl
2874664e91
feat: Support Inspector / Chrome Devtools (#4484)
This is a first pass implementation which is still missing several important
features:
- support for --inspect-brk (#4503)
- support for source maps (#4501)
- support for piping console.log to devtools console (#4502)

Co-authored-by: Bert Belder <bertbelder@gmail.com>
Co-authored-by: Matt Harrison <mt.harrison86@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-03-27 16:09:51 -04:00
Kevin (Kun) "Kassimo" Qian
5d7bcf86fd
feat: window.close() (#4474) 2020-03-24 23:56:40 -04:00
Kevin (Kun) "Kassimo" Qian
3938071e91
errors: replace .lines with explicit .split newline (#4483) 2020-03-24 23:55:54 -04:00
Kevin (Kun) "Kassimo" Qian
3d228f5f9e
hide source line if error message longer than 150 chars (#4487) 2020-03-24 23:53:48 -04:00
bartOssh
ec07386067
feat: first pass at "deno upgrade" (#4328) 2020-03-23 11:37:24 -04:00
Ryan Dahl
0adc86f105
Remove DENO_BUILD_MODE and DENO_BUILD_PATH (#4431)
* Remove DENO_BUILD_MODE and DENO_BUILD_PATH

Also remove outdated docs related to ninja/gn.

* fix

* remove parameter to build_mode()

* remove arg parsing from benchmark.py
2020-03-20 21:48:34 -04:00
Ryan Dahl
a6d8098b35
Clean up installer tests (#4433) 2020-03-19 17:20:46 -04:00
Ryan Dahl
392d2c1118
Fix cafile_install_remote_module test (#4429) 2020-03-19 12:46:56 -04:00
Bartek Iwańczuk
8de4a05f2a
fix: std/testing/runner.ts and deno test (#4392)
After splitting "failFast" and "exitOnFail" arguments, there was a situation where failing tests did not exit with code 1.

* fixed argument value passed to Deno.runTests() in deno test
* fixed argument value passed to Deno.runTests() in std/testing/runner.ts
* added integration tests for deno test to ensure failFast and exitOnFail work as expected
* don't write test file to file system, but keep it in memory
2020-03-19 14:26:47 +01:00
Kitson Kelly
da8cb408c8
Provide compiled JSON to TypeScript compiler. (#4404)
Fixes #4101

Previously, we would just provide the raw JSON to the TypeScript
compiler worker, but TypeScript does not transform JSON.  This caused
a problem when emitting a bundle, that the JSON would just be "inlined"
into the output, instead of being transformed into a module.

This fixes this problem by providing the compiled JSON to the TypeScript
compiler, so TypeScript just sees JSON as a "normal" TypeScript module.
2020-03-18 12:39:53 -04:00
Bartek Iwańczuk
4a4894532e
try to handle ConnectionReset error in windows CI for unit tests (#4407) 2020-03-17 17:35:38 -04:00
Kitson Kelly
2f4be6e944
Remove Object.prototype.__proto__ (#4341) 2020-03-15 11:34:22 +01:00