summaryrefslogtreecommitdiff
path: root/cli/tsc
AgeCommit message (Collapse)Author
2023-11-08fix small Deno.createHttpClient typo in lib.deno.unstable.d.ts (#21115)btoo
2023-11-07docs: improve some JSDoc (#20841)Luca Casonato
Minor improvements to the documentation for https://deno.com/api
2023-11-05fix(core/types): `Promise.withResolvers`: Unmark callback param as optional ↵Jesse Jackson
(#21085) See discussion on merged commit: https://github.com/denoland/deno/commit/1d19b1011bd7df50598f5981408c2d78c35b76d2#r131604700 Signed-off-by: Jesse Jackson <jsejcksn@users.noreply.github.com>
2023-11-05chore: migrate to new deno_core and metrics (#21057)Matt Mastracci
- Uses the new OpMetrics system for sync and async calls - Partial revert of #21048 as we moved Array.fromAsync upstream to deno_core
2023-11-04fix(cron): update Deno.cron doc example (#21078)Igor Zinkovsky
Signed-off-by: Igor Zinkovsky <igor@deno.com>
2023-11-02chore: Add 'jupyter' category for Deno.jupyter APIs (#21061)Bartek Iwańczuk
2023-11-01fix: add missing `Object.groupBy()` and `Map.groupBy()` types (#21050)Asher Gomez
2023-11-01feat: enable Array.fromAsync (#21048)Bartek Iwańczuk
2023-11-01feat: precompile JSX (#20962)Bartek Iwańczuk
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
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-11-01chore: upgrade deno_core (#21036)Bartek Iwańczuk
Updated to deno_core 0.224.0 and V8 12.0. --------- Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
2023-11-01feat(cron) implement Deno.cron() (#21019)Igor Zinkovsky
This PR adds unstable `Deno.cron` API to trigger execution of cron jobs. * State: All cron state is in memory. Cron jobs are scheduled according to the cron schedule expression and the current time. No state is persisted to disk. * Time zone: Cron expressions specify time in UTC. * Overlapping executions: not permitted. If the next scheduled execution time occurs while the same cron job is still executing, the scheduled execution is skipped. * Retries: failed jobs are automatically retried until they succeed or until retry threshold is reached. Retry policy can be optionally specified using `options.backoffSchedule`.
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-23docs(event): fixlets to code comments (#20944)Jérôme Benoit
2023-10-12feat(unstable): add Deno.jupyter.display API (#20819)Kyle Kelley
This brings in [`display`](https://github.com/rgbkrk/display.js) as part of the `Deno.jupyter` namespace. Additionally these APIs were added: - "Deno.jupyter.md" - "Deno.jupyter.html" - "Deno.jupyter.svg" - "Deno.jupyter.format" These APIs greatly extend capabilities of rendering output in Jupyter notebooks. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-10-12refactor: FeatureChecker integration in ext/ crates (#20797)Bartek Iwańczuk
Towards https://github.com/denoland/deno/issues/20779.
2023-10-11feat(WebSocketStream): rename connection to opened (#20878)Leo Kettmeir
2023-10-08fix: define window.name (#20804)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/20750 This matches what browsers do: https://developer.mozilla.org/en-US/docs/Web/API/Window/name In the future we might want to change the behavior to actually update the process name, but that needs a bit of discussion regarding if it needs a permission flag (that would make polyfiling `process.title` setter really easy too).
2023-10-08refactor: migrate last tsc op to op2 macro (#20816)Bartek Iwańczuk
2023-10-05refactor(npm): add referrer when resolving npm package sub path from deno ↵David Sherret
module (#20800) Adds a `referrer` parameter to this function instead of using a fake one.
2023-10-05docs: update alternative APIs for `write()`, `writeSync()`, `read()` and ↵Asher Gomez
`readSync()` (#20792) Closes #20701
2023-10-04feat(jupyter): send binary data with `Deno.jupyter.broadcast` (#20755)Trevor Manz
Adds `buffers` to the `Deno.jupyter.broadcast` API to send binary data via comms. This affords the ability to send binary data via websockets to the jupyter widget frontend.
2023-10-04feat(unstable): add unix domain socket support to Deno.serve (#20759)Yoshiya Hinosawa
2023-10-03refactor(npm): break up `NpmModuleLoader` and move more methods into the ↵David Sherret
managed `CliNpmResolver` (#20777) Part of https://github.com/denoland/deno/issues/18967
2023-10-02refactor(lsp): clean up tsc requests (#20743)Nayeem Rahman
2023-09-30feat(jupyter): send Jupyter messaging metadata with `Deno.jupyter.broadcast` ↵Trevor Manz
(#20714) Exposes [`metadata`](https://jupyter-client.readthedocs.io/en/latest/messaging.html#metadata) to the `Deno.jupyter.broadcast` API. ```js await Deno.jupyter.broadcast(msgType, content, metadata); ``` The metadata is required for [`"comm_open"`](https://github.com/jupyter-widgets/ipywidgets/blob/main/packages/schema/messages.md#instantiating-a-widget-object-1) for with `jupyter.widget` target.
2023-09-29refactor(cli): make `CliNpmResolver` a trait (#20732)David Sherret
This makes `CliNpmResolver` a trait. The terminology used is: - **managed** - Deno manages the node_modules folder and does an auto-install (ex. `ManagedCliNpmResolver`) - **byonm** - "Bring your own node_modules" (ex. `ByonmCliNpmResolver`, which is in this PR, but unimplemented at the moment) Part of #18967
2023-09-28refactor(ext/node): remove dependency on deno_npm and deno_semver (#20718)David Sherret
This is required from BYONM (bring your own node_modules). Part of #18967
2023-09-27feat(unstable): add `Deno.jupyter.broadcast` API (#20656)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/20591 --------- Co-authored-by: Kyle Kelley <rgbkrk@gmail.com>
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-21refactor: rewrite some ops to op2 macro (#20603)Bartek Iwańczuk
2023-09-18fix(lsp): pass quote preference to tsc (#20547)Nayeem Rahman
2023-09-12refactor: rewrite cli/ ops to op2 (#20462)Bartek Iwańczuk
2023-09-12refactor: strongly typed TSC ops (#20466)Bartek Iwańczuk
Removes usage of `serde_json::Value` in several ops used in TSC, in favor of using strongly typed structs. This will unblock more changes in https://github.com/denoland/deno/pull/20462.
2023-09-12fix(ext/http): create a graceful shutdown API (#20387)Matt Mastracci
This PR implements a graceful shutdown API for Deno.serve, allowing all current connections to drain from the server before shutting down, while preventing new connections from being started or new transactions on existing connections from being created. We split the cancellation handle into two parts: a listener handle, and a connection handle. A graceful shutdown cancels the listener only, while allowing the connections to drain. The connection handle aborts all futures. If the listener handle is cancelled, we put the connections into graceful shutdown mode, which disables keep-alive on http/1.1 and uses http/2 mechanisms for http/2 connections. In addition, we now guarantee that all connections are complete or cancelled, and all resources are cleaned up when the server `finished` promise resolves -- we use a Rust-side server refcount for this. Performance impact: does not appear to affect basic serving performance by more than 1% (~126k -> ~125k) --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-09-09feat: TypeScript 5.2 (#20425)David Sherret
Without `using` declarations or decorator metadata (waiting for that in v8).
2023-09-07feat: support import attributes (#20342)David Sherret
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-26feat(lsp): update imports on file rename (#20245)Nayeem Rahman
Closes https://github.com/denoland/vscode_deno/issues/410.
2023-08-23fix: add missing `URL.canParse()` types (#20244)Asher Gomez
Reference: https://developer.mozilla.org/en-US/docs/Web/API/URL/canParse_static
2023-08-21feat(unstable): Improve FFI types (#20215)Aapo Alasuutari
Few improvements to FFI types: 1. Export `PointerObject` for convenience. It's fairly commonly used in library code and thus should be exported. 2. Fix various comments around `PointerValue` and `UnsafePointer` and expand upon them to better reflect reality. 3. Instead of using a `Record<"value", type>[T]` for determining the type of an FFI symbol parameter use direct `T extends "value" ? type : never` comparison. The last part enables smuggling extra information into the parameter and return value string declarations at the type level. eg. Instead of just `"u8"` the parameter can be `"u8" & { [brand]: T }` for some `T extends number`. That `T` can then be extracted from the parameter to form the TypeScript function's parameter or return value type. Essentially, this enables type-safe FFI! The foremost use-cases for this are enums and pointer safety. These are implemented in the second commit which should enable, in a backwards compatible way, for pointer parameters to declare what sort of pointer they mean, functions to declare what the API definition of the native function is, and for numbers to declare what Enum they stand for (if any).
2023-08-18feat(ext/kv): key expiration (#20091)Heyang Zhou
Co-authored-by: Luca Casonato <hello@lcas.dev>
2023-08-17fix(lsp): pass fmt options to completion requests (#20184)Nayeem Rahman
Fixes https://github.com/denoland/vscode_deno/issues/856.
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-08-01fix: deno diagnostic - clarify where to put triple-slash directive (#20009)David Sherret
Some people might not know what "entrypoint" means or where to put the triple-slash directive.
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 }); ```