summaryrefslogtreecommitdiff
path: root/cli/js/lib.deno.ns.d.ts
AgeCommit message (Collapse)Author
2020-03-24doc: improve various API docs and include examples (#4486)Chris Knight
2020-03-23feat: Support Unix Domain Sockets (#4176)João Souto
2020-03-23doc: API improvements to chown, close, compile and connect (#4463)Chris Knight
2020-03-21Remove @url comments from d.ts files (#4449)Ryan Dahl
These have no function and are not tested, probably incorrect in many situations.
2020-03-21BREAKING CHANGE Rename Deno.run's args to cmd (#4444)Akshat Agarwal
This is to avoid confusion with Deno.args which does not include the executable to be run.
2020-03-20chmod should throw on Windows (#4446)dubiousjim
2020-03-20refactor: move code from fs.rs into ops/fs.rs (#4428)dubiousjim
This a complex boring PR that shifts around code (primarily) in cli/fs.rs and cli/ops/fs.rs. The gain of this refactoring is to ease the way for #4188 and #4017, and also to avoid some future development pain. Mostly there is no change in functionality. Except: * squashed bugs where op_utime and op_chown weren't using `resolve_from_cwd` * eliminated the use of the external `remove_dir_all` crate. * op_chmod now only queries metadata to verify file/dir exists on Windows (it will already fail on Unix if it doesn't) * op_chown now verifies the file/dir's existence on Windows like chmod does.
2020-03-19refactor: rename Deno.TestDefinition.skip to ignore (#4400)Bartek Iwańczuk
2020-03-18Chmod API documentation improvements (#4427)Chris Knight
2020-03-18Improve API docs for Deno.bundle and Deno.chdir (#4426)Chris Knight
2020-03-18feat: Deno.test() sanitizes ops and resources (#4399)Bartek Iwańczuk
This PR brings assertOps and assertResources sanitizers to Deno.test() API. assertOps checks that test doesn't leak async ops, ie. there are no unresolved promises originating from Deno APIs. Enabled by default, can be disabled using Deno.TestDefinition.disableOpSanitizer. assertResources checks that test doesn't leak resources, ie. all resources used in test are closed. For example; if a file is opened during a test case it must be explicitly closed before test case finishes. It's most useful for asynchronous generators. Enabled by default, can be disabled using Deno.TestDefinition.disableResourceSanitizer. We've used those sanitizers in internal runtime tests and it proved very useful in surfacing incorrect tests which resulted in interference between the tests. All tests have been sanitized. Closes #4208
2020-03-16Add mode option to open/create (#4289)dubiousjim
2020-03-15refactor: change test reporter output (#4371)Bartek Iwańczuk
This commit changes output of default test reporter to resemble output from Rust test runner; first the name of running test is printed with "...", then after test has run result is printed on the same line. * Split "Deno.TestEvent.Result" into "TestStart" and "TestEnd"; * changes TestReporter interface to support both events; Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-03-15feat(cli/js/testing): Add TestDefinition::skip (#4351)Nayeem Rahman
2020-03-14BREAKING CHANGE FileInfo.len renamed to FileName.size (#4338)dubiousjim
2020-03-13refactor: unit test runner communicates using TCP socket (#4336)Bartek Iwańczuk
Rewrites "cli/js/unit_test_runner.ts" to communicate with spawned subprocesses using TCP socket. * Rewrite "Deno.runTests()" by factoring out testing logic to private "TestApi" class. "TestApi" implements "AsyncIterator" that yields "TestEvent"s, which is an interface for different types of event occuring during running tests. * Add "reporter" argument to "Deno.runTests()" to allow users to provide custom reporting mechanism for tests. It's represented by "TestReporter" interface, that implements hook functions for each type of "TestEvent". If "reporter" is not provided then default console reporting is used (via "ConsoleReporter"). * Change how "unit_test_runner" communicates with spawned suprocesses. Instead of parsing text data from child's stdout, a TCP socket is created and used for communication. "unit_test_runner" can run in either "master" or "worker" mode. Former is responsible for test discovery and establishing needed permission combinations; while latter (that is spawned by "master") executes tests that match given permission set. * Use "SocketReporter" that implements "TestReporter" interface to send output of tests to "master" process. Data is sent as stringified JSON and then parsed by "master" as structured data. "master" applies it's own reporting logic to output tests to console (by reusing default "ConsoleReporter").
2020-03-11support permission mode in mkdir (#4286)dubiousjim
2020-03-10refactor(cli/js/net): Cleanup iterable APIs (#4236)Nayeem Rahman
Listener and UDPConn are AsyncIterables instead of AsyncIterators. The [Symbol.asyncIterator]()s are defined as generators and the next() methods are gone. "Listener/Socket has been closed" errors are now BadResource.
2020-03-10Add Deno.umask (#4290)dubiousjim
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-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-04Remove Deno.errors.Other (#4249)Ryan Dahl
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-02-28Clean up lib.deno.ns.d.ts JSDoc (#4170)Kitson Kelly
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-26tty: Deno.setRaw(rid, mode) to turn on/off raw mode (#3958)Kevin (Kun) "Kassimo" Qian
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-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-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-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-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: jsDoc for Deno.dir() (#3888)Chris Knight
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