summaryrefslogtreecommitdiff
path: root/cli/js
AgeCommit message (Collapse)Author
2020-02-24Add missing node os.release() implementation (#4065)ecyrbe
2020-02-23fetch: proper error for unsupported protocol (#4085)Kevin (Kun) "Kassimo" Qian
2020-02-23Move WebAsssembly namespace to shared_globals (#4084)Kevin (Kun) "Kassimo" Qian
2020-02-22feat(std/node): add os.loadavg() (#4075)ecyrbe
2020-02-21feat: Deno.fsEvents() (#3452)Bartek Iwańczuk
2020-02-21feat: support UDP sockets (#3946)hazæ41
2020-02-21refactor: remove unneeded ErrorKinds (#3936)Bartek Iwańczuk
2020-02-21fix: add io ops to worker to fix fetch (#4054)Bartek Iwańczuk
2020-02-19fix: mis-detecting imports on JavaScript when there is no checkJs (#4040)Kitson Kelly
This PR fixes an issue where we recursively analysed imports on plain JS files in the compiler irrespective of "checkJs" being true. This caused problems where when analysing the imports of those files, we would mistake some import like structures (AMD/CommonJS) as dependencies and try to resolve the "modules" even though the compiler would not actually look at those files.
2020-02-19fix: emit when bundle contains single module (#4042)Kitson Kelly
Fixes #4031 When a bundle contains a single module, we were incorrectly determining the module name, resulting in a non-functional bundle. This PR corrects that determination.
2020-02-19Enable TS strict mode by default (#3899)Maximilien Mellen
Fixes #3324 Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2020-02-19Support loading additional TS lib files (#3863)Kitson Kelly
Fixes #3726 This PR provides support for referencing other lib files (like lib.dom.d.ts that are not used by default in Deno.
2020-02-18feat: Deno.makeTempFile (#4024)Kevin (Kun) "Kassimo" Qian
2020-02-16Fix issue with detecting AMD like imports (#4009)Kitson Kelly
2020-02-12Improvements to bundling. (#3965)Kitson Kelly
Moves to using a minimal System loader for bundles generated by Deno. TypeScript in 3.8 will be able to output TLA for modules, and the loader is written to take advantage of that as soon as we update Deno to TS 3.8. System also allows us to support `import.meta` and provide more ESM aligned assignment of exports, as well as there is better handling of circular imports. The loader is also very terse versus to try to save overhead. Also, fixed an issue where abstract classes were not being re-exported. Fixes #2553 Fixes #3559 Fixes #3751 Fixes #3825 Refs #3301
2020-02-11refactor: rewrite deno test, add Deno.test() (#3865)Bartek Iwańczuk
* rewrite test runner in Rust * migrate "test" and "runTests" functions from std to "Deno" namespace * use "Deno.test()" to run internal JS unit tests * remove std downloads for Deno subcommands
2020-02-11workers: basic event loop (#3828)Bartek Iwańczuk
* establish basic event loop for workers * make "self.close()" inside worker * remove "runWorkerMessageLoop() - instead manually call global function in Rust when message arrives. This is done in preparation for structured clone * refactor "WorkerChannel" and use distinct structs for internal and external channels; "WorkerChannelsInternal" and "WorkerHandle" * move "State.worker_channels_internal" to "Worker.internal_channels" * add "WorkerEvent" enum for child->host communication; currently "Message(Buf)" and "Error(ErrBox)" variants are supported * add tests for nested workers * add tests for worker throwing error on startup
2020-02-07toAsyncIterable: Remove unnecessary EOF check (#3914)Brad Dunbar
In denoland/deno#2335 a conditional was added to make sure toAsyncIterator didn't skip chunks because the reader returned data and EOF in a single call, fixing #2330. Later, in denoland/deno#2591, the `Reader` interface changed to `Promise<number | EOF>`. Since the reader no longer returns data and EOF in a single call, this conditional is not necessary. We can just return `{ done: true }` when we get `EOF`. Co-authored-by: Arun Srinivasan <rulfzid@gmail.com> Co-authored-by: Arun Srinivasan <rulfzid@gmail.com>
2020-02-07Improve support for diagnostics from runtime compiler APIs (#3911)Kitson Kelly
- Exports diagnostic items from `diagnostics.ts` which are missing at runtime. - Returns an array of diagnostics, instead of an object with a property of `items`. This is because of the way Rust deals with certain structures, and shouldn't be exposed in the APIs.
2020-02-07feat: add std/signal/mod.ts (#3913)Yoshiya Hinosawa
2020-02-05fix: basic web worker message passing (#3893)Ryan Dahl
Removes OP_HOST_GET_WORKER_LOADED, OP_HOST_POLL_WORKER, OP_HOST_RESUME_WORKER and ready/messageBuffer in cli/js/workers.ts.
2020-02-05Fix: jsDoc for Deno.dir() (#3888)Chris Knight
2020-02-05fix: Validate all tests included in unit_tests.ts (#3879)Chris Knight
2020-02-04refactor: CLI subcommands and argv (#3886)Bartek Iwańczuk
2020-02-03Make fetch API more standards compliant (#3667)serverhiccups
2020-02-03fix: Deno.remove() to properly remove dangling symlinks (#3860)Rafael Vargas
For some reason, the unit tests for Deno.remove() were not being imported to unit_tests.ts and, consequently, not being executed. Thus, I imported them, refactored some existent ones and wrote new ones for the symlink removal case. Since the creation of a symlink is not implemented for Windows yet, assertions that consider this state were added when the tests are executed in this OS.
2020-02-02Remove //tests symlink (#3849)Luka Hartwig
2020-01-29workers: proper TS libs, more spec-compliant APIs (#3812)Bartek Iwańczuk
* split lib.deno_main.d.ts into: - lib.deno.shared_globals.d.ts - lib.deno.window.d.ts - lib.deno.worker.d.ts * remove no longer used libs: - lib.deno_main.d.ts - lib.deno_worker.d.ts * change module loading to use proper TS library for compilation * align to Worker API spec: - Worker.terminate() - self.close() - self.name
2020-01-27refactor: isomorphic snapshot for CLI (#3728)Bartek Iwańczuk
2020-01-24Break out runtime lib to main and worker (#3771)Kitson Kelly
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-01-24Mark signal APIs as unstable (#3779)Ryan Dahl
2020-01-24Add signal handlers (#3757)Yoshiya Hinosawa
2020-01-23update readmes (#3765)Ryan Dahl
2020-01-22refactor: snapshotting (#3753)Bartek Iwańczuk
2020-01-22Reland "Create an old program to be used in snapshot." (#3747)Bartek Iwańczuk
* read CLI assets from disk during snapshotting
2020-01-21Revert "Create an old program to be used in snapshot. (#3644)"Ry Dahl
Ref #3712. This change allowed the deno_typescript crate to reference cli/js/lib.deno_runtime.d.ts which breaks "cargo package". We intend to reintroduce a revised version of this patch later once "cargo package" is working and tested. This reverts commit 737ab94ea1bdf65eeef323ea37e84bcf430fb92c.
2020-01-21change copyrights from 2019 to 2020 (#3733)Takashi Idobe
2020-01-21refactor: Rename JS entry functions (#3732)Bartek Iwańczuk
2020-01-21Implemented alternative open mode in files (#3119)Michał Sabiniarz
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-01-21refactor: split worker and worker host logic (#3722)Bartek Iwańczuk
* split ops/worker.rs into ops/worker_host.rs and ops/web_worker.rs * refactor js/workers.ts and factor out js/worker_main.ts - entry point for WebWorker runtime * BREAKING CHANGE: remove support for blob: URL in Worker * BREAKING CHANGE: remove Deno namespace support and noDenoNamespace option in Worker constructor * introduce WebWorker struct which is a stripped down version of cli::Worker
2020-01-20refactor: reduce number of ErrorKind variants (#3662)Bartek Iwańczuk
2020-01-20Use globalThis to reference global scope (#3719)Kitson Kelly
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-01-18stabilize net Addr (#3709)Bartek Iwańczuk
Co-authored-by: xiaoxintang <15707971810@163.com>
2020-01-18rename dial to connect and dialTLS to connectTLS (#3710)Bartek Iwańczuk
2020-01-17Mark various APIs in window.Deno as unstable (#3701)Ry Dahl
2020-01-17workers: minimal error handling and async module loading (#3665)Bartek Iwańczuk
2020-01-17Fix compile and bundle api types (#3703)Klaus Hvam
2020-01-17feat: support individual async handler for each op (#3690)Andy Finch
2020-01-16Add Deno.symbols and move internal fields for test (#3693)Kevin (Kun) "Kassimo" Qian
2020-01-16feat(fs): add more unix-only fields to FileInfo (#3680)Kevin (Kun) "Kassimo" Qian