summaryrefslogtreecommitdiff
path: root/cli/tsc/dts/lib.deno.ns.d.ts
AgeCommit message (Collapse)Author
2024-01-15chore: define removal version for `Deno.metrics()` (#21872)Asher Gomez
Sets the removal version for `Deno.metrics()` to be v2.
2024-01-14chore: define removal version for `Deno.run()` (#21863)Asher Gomez
This change sets the removal for `Deno.run()` in v2.
2024-01-14feat: Deprecate 'Deno.serveHttp' API (#21874)Bartek Iwańczuk
`Deno.serveHttp` is now deprecated. Users should migrate to `Deno.serve` API.
2024-01-10fix: android support (#19437)cions
<!-- Before submitting a PR, please read https://deno.com/manual/contributing 1. Give the PR a descriptive title. Examples of good title: - fix(std/http): Fix race condition in server - docs(console): Update docstrings - feat(doc): Handle nested reexports Examples of bad title: - fix #7123 - update docs - fix bugs 2. Ensure there is a related issue and it is referenced in the PR text. 3. Ensure there are tests that cover the changes. 4. Ensure `cargo test` passes. 5. Ensure `./tools/format.js` passes without changing files. 6. Ensure `./tools/lint.js` passes. 7. Open as a draft PR if your work is still in progress. The CI won't run all steps, but you can add '[ci]' to a commit message to force it to. 8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label. --> --------- Signed-off-by: Matt Mastracci <matthew@mastracci.com> Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-01-06chore: define removal version in deprecated IO APIs (#21702)Asher Gomez
This defines the removal version of v2 for the following APIs that favour the Streams API: * `Deno.copy()` * `Deno.File` * `Deno.iter()` * `Deno.Buffer` * `Deno.readAll()` * `Deno.readAllSync()` * `Deno.writeAll()` * `Deno.writeAllSync()` * `Deno.FsWatcher.return()`
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-12-13chore: deprecate `Deno.Reader`, `Deno.ReaderSync`, `Deno.Writer`, ↵Asher Gomez
`Deno.WriterSync` and `Deno.Closer` (#21465) This change deprecates `Deno.Reader`, `Deno.ReaderSync`, `Deno.Writer`, `Deno.WriterSync` and `Deno.Closer` in favour of the [Web Streams API](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API). After discussing with Yoshiya, we both thought now might be the right time to deprecate these interfaces with v2 getting closer.
2023-12-06feat: stabilize Deno.HttpServer.shutdown and Unix socket support (#21463)Bartek Iwańczuk
This commit stabilizes "Deno.HttpServer.shutdown" API as well as Unix socket support in "Deno.serve" API. --------- Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-12-05docs: fix description of FileInfo's mode property (#21366)David Sherret
2023-12-02chore: update std to 0.208.0 (#21318)Asher Gomez
Re-attempt at #21284. I was more thorough this time. --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-11-25fix(dts): `Deno.ChildProcess` actually implements `AsyncDisposable` (#21326)Yusuke Tanaka
What `Deno.ChildProcess` actually implements is `AsyncDisposable`, but the type declaration says it's `Disposable`. This PR fixes the type declaration to match the actual implementation.
2023-11-22docs: update `Deno.*` deprecation notices (#21283)Asher Gomez
This PR updates the deprecation notices to point to the same replacement APIs that the Standard Library points to. I've also tweaked the notices to be a little more presentable/navigatable. In particular, a follow-up PR in std will be made that documents the use of `toArrayBuffer()`. Closes #21193 Towards #20976
2023-11-13chore: remove duplicate esnext.dispoable (#21184)David Sherret
2023-11-07docs: improve some JSDoc (#20841)Luca Casonato
Minor improvements to the documentation for https://deno.com/api
2023-11-01feat: disposable Deno resources (#20845)Luca Casonato
This commit implements Symbol.dispose and Symbol.asyncDispose for the relevant resources. Closes #20839 --------- Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-10-28Revert "chore: update deno_std submodule (#20994)" (#21001)Bartek Iwańczuk
This reverts commit 6e2abb2b13af5dff5d631fb1bc0c279c49ebd066.
2023-10-27chore: update deno_std submodule (#20994)Bartek Iwańczuk
2023-10-27feat: rename Deno.Server to Deno.HttpServer (#20842)Luca Casonato
Keeps the old name around for backwards compat. Closes #20840
2023-10-05docs: update alternative APIs for `write()`, `writeSync()`, `read()` and ↵Asher Gomez
`readSync()` (#20792) Closes #20701
2023-09-26chore: deprecate Deno.metrics() API (#20684)Bartek Iwańczuk
This API is providing hoops to jump through with undergoing migration to `#[op2]` macro. The overhead of supporting this API is non-trivial and besides internal use of it in test sanitizers is very rarely used in the wild.
2023-09-06feat(test): Add Deno.test.ignore and Deno.test.only (#20365)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/17106
2023-08-27test(bench): mark explicit timer test as flaky (#20304)Nayeem Rahman
https://github.com/denoland/deno/actions/runs/5990043261/job/16246927846?pr=18642 The test is just `b.start(); b.end()` where the time measured between must be less 10 μs during warmup. Can't improve it. Also fixes doc mistake.
2023-08-26fix(bench): explicit timers don't force high precision measurements (#20272)Nayeem Rahman
Disables `BenchContext::start()` and `BenchContext::end()` for low precision benchmarks (less than 0.01s per iteration). Prints a warning when they are used in such benchmarks, suggesting to remove them. ```ts Deno.bench("noop", { group: "noops" }, () => {}); Deno.bench("noop with start/end", { group: "noops" }, (b) => { b.start(); b.end(); }); ``` Before: ``` cpu: 12th Gen Intel(R) Core(TM) i9-12900K runtime: deno 1.36.2 (x86_64-unknown-linux-gnu) file:///home/nayeem/projects/deno/temp3.ts benchmark time (avg) iter/s (min … max) p75 p99 p995 ----------------------------------------------------------------------------- ----------------------------- noop 2.63 ns/iter 380,674,131.4 (2.45 ns … 27.78 ns) 2.55 ns 4.03 ns 5.33 ns noop with start and end 302.47 ns/iter 3,306,146.0 (200 ns … 151.2 µs) 300 ns 400 ns 400 ns summary noop 115.14x faster than noop with start and end ``` After: ``` cpu: 12th Gen Intel(R) Core(TM) i9-12900K runtime: deno 1.36.1 (x86_64-unknown-linux-gnu) file:///home/nayeem/projects/deno/temp3.ts benchmark time (avg) iter/s (min … max) p75 p99 p995 ----------------------------------------------------------------------------- ----------------------------- noop 3.01 ns/iter 332,565,561.7 (2.73 ns … 29.54 ns) 2.93 ns 5.29 ns 7.45 ns noop with start and end 7.73 ns/iter 129,291,091.5 (6.61 ns … 46.76 ns) 7.87 ns 13.12 ns 15.32 ns Warning start() and end() calls in "noop with start and end" are ignored because it averages less than 0.01s per iteration. Remove them for better results. summary noop 2.57x faster than noop with start and end ```
2023-08-03feat(permissions): add "--deny-*" flags (#19070)Asher Gomez
This commit adds new "--deny-*" permission flags. These are complimentary to "--allow-*" flags. These flags can be used to restrict access to certain resources, even if they were granted using "--allow-*" flags or the "--allow-all" ("-A") flag. Eg. specifying "--allow-read --deny-read" will result in a permission error, while "--allow-read --deny-read=/etc" will allow read access to all FS but the "/etc" directory. Runtime permissions APIs ("Deno.permissions") were adjusted as well, mainly by adding, a new "PermissionStatus.partial" field. This field denotes that while permission might be granted to requested resource, it's only partial (ie. a "--deny-*" flag was specified that excludes some of the requested resources). Eg. specifying "--allow-read=foo/ --deny-read=foo/bar" and then querying for permissions like "Deno.permissions.query({ name: "read", path: "foo/" })" will return "PermissionStatus { state: "granted", onchange: null, partial: true }", denoting that some of the subpaths don't have read access. Closes #18804. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2023-07-31feat(bench): add BenchContext::start() and BenchContext::end() (#18734)Nayeem Rahman
Closes #17589. ```ts Deno.bench("foo", async (t) => { const resource = setup(); // not included in measurement t.start(); measuredOperation(resource); t.end(); resource.close(); // not included in measurement }); ```
2023-07-04feat: Stabilize Deno.serve() API (#19141)Bartek Iwańczuk
This commit stabilizes "Deno.serve()", which becomes the preferred way to create HTTP servers in Deno. Documentation was adjusted for each overload of "Deno.serve()" API and the API always binds to "127.0.0.1:8000" by default.
2023-07-03fix: Update typings for Deno.errors namespace (#19688)Bartek Iwańczuk
Follow up to https://github.com/denoland/deno/pull/19514, where I forgot to update type declarations.
2023-06-16chore: fix typos in HrtimePermissionDescriptor and performance.now docs (#19469)andy
2023-06-05feat: add more options to Deno.inspect (#19337)Leo Kettmeir
For https://github.com/denoland/deno_std/issues/3404 --------- Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-05-24feat(ext/fs): add isBlockDevice, isCharDevice, isFifo, isSocket to FileInfo ↵Hirotaka Tagawa / wafuwafu13
(#19008) `isFile`, `isDirectory`, `isSymlink` are defined in `Deno.FileInfo`, but `isBlockDevice`, `isCharacterDevice`, `isFIFO`, `isSocket` are not defined. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-10fix(dts): align `seekSync` `position` arg with `seek` (#19077)David Sherret
Closes #19060
2023-05-04docs: update Deno.Writer docstring (#18987)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/18985#issuecomment-1534493623
2023-05-03fix(docs): replace "e.g." with "i.e." in `seek()`/`seekSync()` comment (#18964)kang
Clarify calculation of number "9" in `seek()`/`seekSync()` comment of lib.deno.ns.d.ts by replacing "e.g." with "i.e."
2023-05-02docs(lib): document `Deno.Command` requires the `allow-run` permission (#18958)Yarden Shoham
2023-05-01docs: correct example of piping the output of a subprocess to a file (#18933)Michael Lazarev
Fixes #18909
2023-04-27feat: Deprecate Deno.run API in favor of Deno.Command (#17630) (#18866)Bartek Iwańczuk
This commit adds `@deprecated` comments to `Deno.run` API declarations. Since stabilization of `Deno.Command` API in [Deno v1.31](https://deno.com/blog/v1.31#api-stabilizations), `Deno.Command` is the preferred (more reliable) API to interact with subprocesses. This is the preparation for the removal of `Deno.run` API in Deno 2.0.
2023-03-30docs: clarify `Deno.consoleSize` returns the window size (#18508)David Sherret
Closes #18477
2023-03-21chore: update formatting configuration (#18331)Bartek Iwańczuk
2023-03-21docs: fix broken `Deno.FsFile#readable` example code (#18277)ayame113
2023-03-17BREAKING(ext/fs): FileInfo.dev is defined on Windows (#18237)Bartek Iwańczuk
Addresses feedback from https://github.com/denoland/deno/pull/18073#issuecomment-1471480385. Reverts changes to `FileInfo` fields that are not available on Windows making them `null`. Only `FileInfo.dev` is non-null.
2023-03-16feat(fs): support FileInfo.dev on Windows (#18073)Bartek Iwańczuk
This commit adds support for retrieving `dev` information when stating files on Windows. Additionally `Deno.FileInfo` interfaces was changed to always return 0 for fields that we don't retrieve information for on Windows. Closes https://github.com/denoland/deno/issues/18053 --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2023-03-07chore(docs): Fixed manual link (#18060)ayame113
2023-03-05fix(check): include dts files in tsc roots (#18026)Nayeem Rahman
2023-03-04chore(docs): add note about loadavg returning 0 on windows (#18006)Geert-Jan Zwiers
2023-02-22Revert "feat: Deprecate Deno.run API in favor of Deno.Command (#17630)" (#17875)Ryan Dahl
Deno.Command needs to be stabilized first and allow people to upgrade to it before we can deprecate Deno.run. Otherwise lint will suddenly fail with deprecated errors without giving people a chance to update.
2023-02-16feat: Deprecate Deno.run API in favor of Deno.Command (#17630)Bartek Iwańczuk
2023-02-14feat: stabilize Deno.osUptime() (#17554)Bartek Iwańczuk
This commit stabilizes "Deno.osUptime()" API. The "--unstable" flag is no longer required to use this API.
2023-02-13feat: Stabilize Deno.Command API (#17628)Bartek Iwańczuk
This commit stabilizes "Deno.Command" API with all its related APIs. "--unstable" flag is no longer required to use this API.
2023-02-12fix: add WouldBlock error (#17339)Leo Kettmeir
2023-02-11feat: add signal option to Deno.resolveDns (#17384)Leo Kettmeir
Closes #14406