summaryrefslogtreecommitdiff
path: root/cli/ops
AgeCommit message (Collapse)Author
2020-05-19Implement Deno.symlink() for windows (#5533)Ali Hasani
2020-05-18Make Deno.remove() work with directory symlinks on windows (#5488)Ali Hasani
2020-05-18refactor: rewrite TS dependency analysis in Rust (#5029)Bartek Iwańczuk
This commit completely overhauls how module analysis is performed in TS compiler by moving the logic to Rust. In the current setup module analysis is performed using "ts.preProcessFile" API in a special TS compiler worker running on a separate thread. "ts.preProcessFile" allowed us to build a lot of functionality in CLI including X-TypeScript-Types header support and @deno-types directive support. Unfortunately at the same time complexity of the ops required to perform supporting tasks exploded and caused some hidden permission escapes. This PR introduces "ModuleGraphLoader" which can parse source and load recursively all dependent source files; as well as declaration files. All dependencies used in TS compiler and now fetched and collected upfront in Rust before spinning up TS compiler. To achieve feature parity with existing APIs this commit includes a lot of changes: * add "ModuleGraphLoader" - can fetch local and remote sources - parses source code using SWC and extracts imports, exports, file references, special headers - this struct inherited all of the hidden complexity and cruft from TS version and requires several follow up PRs * rewrite cli/tsc.rs to perform module analysis upfront and send all required source code to TS worker in one message * remove op_resolve_modules and op_fetch_source_files from cli/ops/compiler.rs * run TS worker on the same thread
2020-05-17Return error if more than one listener calls `WorkerHandle::get_event()` (#5461)Yiyu Lin
2020-05-16fix some unwrap() in Rust (#5485)Yiyu Lin
2020-05-15fix some clippy warning (#5462)Yiyu Lin
2020-05-14cli: don't panic on Deno.close invalid argument (#5320)Kevin (Kun) "Kassimo" Qian
2020-05-11Change plugin interface to prevent segfaults when unloading plugin (#5210)Bert Belder
Fixes: #3473 Closes: #5193
2020-05-11refactor: check permissions in SourceFileFetcher (#5011)Bartek Iwańczuk
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-09BREAKING: make Deno.hostname unstable (#5108)Ryan Dahl
2020-05-08refactor: Remove cli::compilers module (#5138)Bartek Iwańczuk
This PR removes "cli/compilers/" directory. "cli/compilers/ts.rs" has been renamed to "cli/tsc.rs"
2020-05-07BREAKING: make Worker.deno unstable (#5128)Bartek Iwańczuk
This commit makes "Worker.deno" option unstable. Added new manual entry "docs/runtime/workers.md". Removed stale workers tests.
2020-05-07BREAKING: Remove support for .wasm imports (#5135)Bartek Iwańczuk
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-06BREAKING: execPath should require allow-read (#5109)Ryan Dahl
2020-05-05refactor(ts): remove op_cache (#5071)Bartek Iwańczuk
This PR removes op_cache and refactors how Deno interacts with TS compiler. Ultimate goal is to completely sandbox TS compiler worker; it should operate on simple request -> response basis. With this commit TS compiler no longer caches compiled sources as they are generated but rather collects all sources and sends them back to Rust when compilation is done. Additionally "Diagnostic" and its children got refactored to use "Deserialize" trait instead of manually implementing JSON deserialization.
2020-05-04stabilize Deno.cwd and require --allow-read (#5068)Ryan Dahl
2020-05-04Rename DenoPermissions, add abs path asserts (#5076)Ryan Dahl
2020-05-02Deno.chdir should require allow-read not allow-write (#5033)Ryan Dahl
2020-05-02BREAKING: disallow static import of local modules from remote modules (#5050)Bartek Iwańczuk
This commit changes module loading logic to disallow statically import local module (file:// scheme) from remote modules (http://, https:// schemes).
2020-05-02BREAKING: remove support for JSON imports (#5037)Bartek Iwańczuk
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-01BREAKING: remove window.location and self.location (#5034)Bartek Iwańczuk
This commit removes "location" global available on "window", "globalThis" and "self".
2020-04-30Unstable methods should not appear in runtime or d.ts (#4957)Luca Casonato
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2020-04-29BREAKING: Include limited metadata in 'DirEntry' objects (#4941)Bert Belder
This change is to prevent needed a separate stat syscall for each file when using readdir. For consistency, this PR also modifies std's `WalkEntry` interface to extend `DirEntry` with an additional `path` field.
2020-04-29Make Deno.isatty stable (#4937)Brayden
2020-04-28refactor: factor out datagram from Deno.listen(), make it unstable (#4968)Bartek Iwańczuk
This commit changes Deno.listen() API by factoring out datagram listeners to Deno.listenDatagram(). New Deno.listenDatagram() is unstable.
2020-04-28BREAKING: address renamed to path in UnixAddr UnixConnectOptions ↵Ali Hasani
UnixListenOptions (#4959)
2020-04-28BREAKING: Use LLVM target triple for Deno.build (#4948)Ryan Dahl
Deno.build.os values have changed to correspond to standard LLVM target triples "win" -> "windows" "mac" -> "darwin"
2020-04-28mark Deno.startTls as unstable (#4965)Bartek Iwańczuk
2020-04-28Make shutdown unstable and async (#4940)Luca Casonato
2020-04-27Make Deno.kill unstable (#4950)Luca Casonato
2020-04-27make utime unstable (#4955)Ali Hasani
2020-04-27loadavg and osRelease made unstable (#4938)Ryan Dahl
2020-04-27Make unix sockets require allow-write (#4939)Luca Casonato
2020-04-27Mark Deno.umask unstable (#4935)Brayden
2020-04-27Rename FileInfo time fields and represent them as Date objects (#4932)Bert Belder
This patch also increases the resolution of reported file times to sub-millisecond precision.
2020-04-27signal APIs should require --unstable (#4926)Ryan Dahl
2020-04-27Make Deno.setRaw and Deno.isatty unstable (#4925)Ryan Dahl
2020-04-27Make Deno.dir unstable (#4924)Ryan Dahl
2020-04-27Make runtime compile ops unstable (#4912)Ryan Dahl
2020-04-25introduce unstable flag, make a few things unstable (#4892)Ryan Dahl
2020-04-24chdir should require --allow-write (#4889)Ryan Dahl
2020-04-25remove bootstrap methods from global scope after bootstrapping (#4869)Bartek Iwańczuk
2020-04-25BREAKING CHANGE: remove Deno.OpenMode (#4884)Bartek Iwańczuk
This commit removes Deno.OpenMode along with overloaded variants of Deno.open() and Deno.openSync() that used OpenMode.
2020-04-23Rename deno_core::Isolate to deno_core::CoreIsolate (#4851)Ryan Dahl
2020-04-21Move resource_table from deno::State to deno_core::Isolate (#4834)Ryan Dahl
2020-04-20Remove core/plugin.rs (#4824)Ryan Dahl
This simplifies the plugin interface in order to deliver op crates with a similar API
2020-04-19Modify op dispatcher to include &mut Isolate argument (#4821)Ryan Dahl
- Removes unnecessary RwLock and Rc around the op registry table - Preparation to move resource_table to deno_core::Isolate. - Towards #3453, #4222
2020-04-18Fix Op definitions (#4814)Ryan Dahl
2020-04-18feat: startTLS (#4773)EnokMan
2020-04-17replace block_on in net interfaces (#4796)Bartek Iwańczuk