summaryrefslogtreecommitdiff
path: root/cli/js
AgeCommit message (Collapse)Author
2020-03-09use Object instead of Map for promise table (#4309)Bartek Iwańczuk
2020-03-10reorg: move js runtime tests to cli/js/tests/ (#4250)Bartek Iwańczuk
All Deno runtime test files were moved to cli/js/tests/ directory. It makes a clear distinction that cli/js/tests/ contains code that is run under Deno runtime as opposed to code in cli/js/ which is used to create bundle and snapshot with "deno_typescript".
2020-03-10reorg: move JS ops implementations to cli/js/ops/, part 3 (#4302)Bartek Iwańczuk
Following JS ops were moved to separate files in cli/js/ops directory: - net - tls - fs
2020-03-09reorg: move JS ops implementations to cli/js/ops/, part 2 (#4283)Bartek Iwańczuk
Following JS ops were moved to separate files in cli/js/ops directory: - io - process - worker_host - web_worker - plugins - timers - signal - permissions
2020-03-08reorg: move JS ops implementations to cli/js/ops/, part 1 (#4264)Bartek Iwańczuk
Following JS ops were moved to separate files in cli/js/ops directory: - compiler - dispatch_json - dispatch_minimal - errors - fetch - fs_events - os - random - repl - resources - runtime_compiler - runtime - tty
2020-03-07Rename perm to mode (#4276)dubiousjim
There's a lot of variation in doc comments and internal code about whether chmod/0o777-style permissions are called `mode` or `perm`. (For example, mkdir and writeFile choose differently.) Had proposed earlier to go consistently with `perm`, but on balance devs prefer to go with `mode`.
2020-03-06Rename name/filename arguments to path (#4227)dubiousjim
There's a lot of variation in doc comments and internal code about whether the first parameter to file system calls is `path` or `name` or `filename`. For consistency, have made it always be `path`.
2020-03-06Rename readDir -> readdir (#4225)dubiousjim
2020-03-05move Web APIs to cli/js/web/Bartek Iwańczuk
2020-03-05fix event target testsBartek Iwańczuk
2020-03-05Support async function and EventListenerObject as listeners (#4240)Ryan Dahl
2020-03-05refactor: preliminary cleanup of Deno.runTests() (#4237)Bartek Iwańczuk
* refactor: preliminary cleanup of Deno.runTests() * Change time measurement to use new Date() instead of performance.now(). Because there is no guarantee that tests are run with "--allow-hr" using new Date() guarantees higher precision of 1ms instead of 2ms. * Support String type filter in "skip" and "only". * Split "exitOnFail" into "exitOnFail" and "failFast". Former tells if "runTests()" should exit with code 1 on test failure, while latter tells if "runTests()" should stop running tests on first failure. * Use "defer" to wait for unhandled promise rejection - this bit is funky and doesn't seem right, but for now it's just a rewrite from using "setTimeout". Intended to be fixed in later commits. * Remove global "__DENO_TEST_REGISTRY", don't expose list of registered tests (to be addressed in follow up commits) * Remove arbitrary slow test threshold; use uniform coloring instead
2020-03-05refactor: cleanup compiler runtimes (#4230)Bartek Iwańczuk
- Cleanup "tsCompilerOnMessage" by factoring out separate methods for each request type: * "compile" * "runtimeCompile" * "runtimeTranspile" - Simplify control flow of compiler workers by a) no longer calling "close()" in worker runtime after a single message; b) explicitly shutting down worker from host after a single message Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-03-04Remove Deno.errors.Other (#4249)Ryan Dahl
2020-03-04refactor: rewrite testPerm into unitTest (#4231)Bartek Iwańczuk
Rewrite "testPerm" helper function used for testing of internal runtime code. It's been renamed to "unitTest" and provides API that is extensible in the future by accepting optional "UnitTestOptions" argument. "test" helper was also removed and replaced by overloaded version of "unitTest" that takes only function argument. "UnitTestOptions" currently supports "perms" and "skip" options, where former works exactly as first argument to "testPerm" did, while the latter allows to conditionally skip tests.
2020-03-04Migrate internal bundles to System (#4233)Kitson Kelly
2020-03-03add assertOps sanitizer in cli/js/ unit tests (#4209)Bartek Iwańczuk
* add "assertOps" test assertion which makes sure test case is not "leaking" ops - ie. after test finishes there are no pending async ops * apply "assertOps" to all tests in "cli/js/" * fix numerous tests leaking ops * document problem with edge case in "clearInterval" and "clearTimeout" implementation where they may leak async ops * move "cli/js/worker_test.ts" to "cli/tests/worker_test.ts" and run as integration test; workers leak ops because of missing "terminate" implementation
2020-03-03misc: reduce unnecesarry output in cli/js tests (#4182)Yusuke Sakurai
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-03-02Do not convert exceptions to JSON and back (#4214)Bert Belder
2020-03-02Fix JavaScript dependencies in bundles. (#4215)Kitson Kelly
Fixes #4602 We turned off `allowJs` by default, to keep the compiler from grabbing a bunch of files that it wouldn't actually do anything useful with. On the other hand, this caused problems with bundles, where the compiler needs to gather all the dependencies, including JavaScript ones. This fixes this so that when we are bundling, we analyse JavaScript imports in the compiler.
2020-03-02Rename Option -> Options (#4226)dubiousjim
* Rename MkdirOption interface to MkdirOptions It was hard to remember which Options interfaces were spelled in the singular and which in the plural (and anyway this one contained two options). Also added MkdirOptions to cli/js/deno.ts. All the analogous interfaces were exported there. * Rename RemoveOption interface to RemoveOptions This was the last remaining Option interface spelled in the singular. Easier to remember if they're all Option**s**; plus we may want to add extra options here later.
2020-03-02feat: update metrics to track different op types (#4221)Bartek Iwańczuk
2020-03-02seek should return cursor position (#4211)bartOssh
2020-03-02Cleanup comments and internal variables (#4205)dubiousjim
2020-03-01feat(std/node): add os.tmpdir() implementation (#4213)ecyrbe
2020-03-01perf: use subarray instead of slice in dispatch minimal (#4180)Ryan Dahl
2020-02-29docs: fix broken Deno.write() example (#4190)Chris Knight
2020-02-29refactor(cli/js): Replace constructError() with getErrorClass() (#4189)Nayeem Rahman
Flattens dispatch error handling to produce one less useless stack frame on op errors.
2020-02-29add assertResources sanitizer to cli/js/ unit tests (#4161)Bartek Iwańczuk
2020-02-28Revert "perf: use subarray instead of slice in dispatch minimal (#4173)" (#4174)Bartek Iwańczuk
This reverts commit 0eb91c5591eb7e5e419aa9dbdaff99f5bd8015da.
2020-02-28perf: use subarray instead of slice in dispatch minimal (#4173)Bartek Iwańczuk
2020-02-28Clean up lib.deno.ns.d.ts JSDoc (#4170)Kitson Kelly
2020-02-28rewrite permission revoke test as integration test (#4164)Bartek Iwańczuk
2020-02-27Merge mod_evaluate() and mod_evaluate_dyn_import() methods (#4167)Bert Belder
2020-02-27feat: Support types compiler option in compiler APIs (#4155)Kitson Kelly
Handles `types` in the compiler APIs to make it easier to supply external type libraries.
2020-02-26stream output of js unit tests (#4146)Bartek Iwańczuk
2020-02-26Bundles can be sync or async based on top level await (#4124)Kitson Kelly
Previously, bundles always utilised top level await, even if the bundled modules didn't require top level await. Now, analysis of the bundle is done and if none of the bundled modules are asynchronously executed, then the bundle as a whole will be synchronously executed. Fixes #4055 Fixes #4123
2020-02-26add window.self read-only property (#4131)Bartek Iwańczuk
2020-02-26tty: Deno.setRaw(rid, mode) to turn on/off raw mode (#3958)Kevin (Kun) "Kassimo" Qian
2020-02-25upgrade: TypeScript 3.8 (#4100)Kitson Kelly
2020-02-25Clean up how we use opIds (#4118)Ryan Dahl
2020-02-25Fix issues with JavaScript importing JavaScript. (#4120)Kitson Kelly
Fixes #3852 Fixes #4117
2020-02-24Add Deno.Err change missing from previous commit (#4113)Ryan Dahl
2020-02-24rename Deno.Err -> Deno.errors (#4093)Bartek Iwańczuk
2020-02-24feat: Add Deno.formatDiagnostics (#4032)Kitson Kelly
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