summaryrefslogtreecommitdiff
path: root/cli/tsc
AgeCommit message (Collapse)Author
2023-07-28feat: Deno.createHttpClient allowHost (#19689)Leo Kettmeir
This adds an option to allow using the host header in a fetch call. Closes https://github.com/denoland/deno/issues/16840 Ref https://github.com/denoland/deno/issues/11017
2023-07-26fix(check): should bust check cache when json module or npm resolution ↵David Sherret
changes (#19941) A small part of #19928.
2023-07-13fix(tsc): more informative diagnostic when `Deno` does not exist (#19825)David Sherret
Also improved the diagnostic when using something like `Deno.openKv` and it doesn't exist.
2023-07-10refactor(lsp): move config file related code to config.rs (#19790)David Sherret
Will make #19788 easier.
2023-07-04feat: stabilize 'alpnProtocols' setting (#19704)Bartek Iwańczuk
Ref https://github.com/denoland/deno/issues/19685
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-04feat: upgrade to TypeScript 5.1.6 (#19695)David Sherret
Integrates https://github.com/denoland/TypeScript/pull/7
2023-07-03fix(dts): make globals available on globalThis (#19438)ud2
This PR changes Web IDL interfaces to be declared with `var` instead of `class`, so that accessing them via `globalThis` does not raise type errors. Closes #13390.
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-26Revert "Reland "refactor(core): cleanup feature flags for js source i… ↵Bartek Iwańczuk
(#19611) …nclusion" (#19519)" This reverts commit 28a4f3d0f5383695b1d49ccdc8b0f799a715b2c2. This change causes failures when used outside Deno repo: ``` ============================================================ Deno has panicked. This is a bug in Deno. Please report this at https://github.com/denoland/deno/issues/new. If you can reliably reproduce this panic, include the reproduction steps and re-run with the RUST_BACKTRACE=1 env var set and include the backtrace in your report. Platform: linux x86_64 Version: 1.34.3+b37b286 Args: ["/opt/hostedtoolcache/deno/0.0.0-b37b286f7fa68d5656f7c180f6127bdc38cf2cf5/x64/deno", "test", "--doc", "--unstable", "--allow-all", "--coverage=./cov"] thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Failed to read "/home/runner/work/deno/deno/core/00_primordials.js" Caused by: No such file or directory (os error 2)', core/runtime/jsruntime.rs:699:8 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ```
2023-06-25Reland "refactor(core): cleanup feature flags for js source inclusion" (#19519)Nayeem Rahman
Relands #19463. This time the `ExtensionFileSourceCode` enum is preserved, so this effectively just splits feature `include_js_for_snapshotting` into `exclude_js_sources` and `runtime_js_sources`, adds a `force_include_js_sources` option on `extension!()`, and unifies `ext::Init_ops_and_esm()` and `ext::init_ops()` into `ext::init()`.
2023-06-16chore: fix typos in HrtimePermissionDescriptor and performance.now docs (#19469)andy
2023-06-13feat(kv) queue implementation (#19459)Igor Zinkovsky
Extend the unstable `Deno.Kv` API to support queues.
2023-06-13Revert "refactor(core): cleanup feature flags for js source inclusion… ↵Bartek Iwańczuk
(#19490) … (#19463)" This reverts commit ceb03cfb037cf7024a5048b17b508ddda59cfa05. This is being reverted because it causes 3.5Mb increase in the binary size, due to runtime JS code being included in the binary, even though it's already snapshotted. CC @nayeemrmn
2023-06-13refactor(core): cleanup feature flags for js source inclusion (#19463)Nayeem Rahman
Remove `ExtensionFileSourceCode::LoadedFromFsDuringSnapshot` and feature `include_js_for_snapshotting` since they leak paths that are only applicable in this repo to embedders. Replace with feature `exclude_js_sources`. Additionally the feature `force_include_js_sources` allows negating it, if both features are set. We need both of these because features are additive and there must be a way of force including sources for snapshot creation while still having the `exclude_js_sources` feature. `force_include_js_sources` is only set for build deps, so sources are still excluded from the final binary. You can also specify `force_include_js_sources` on any extension to override the above features for that extension. Towards #19398. But there was still the snapshot-from-snapshot situation where code could be executed twice, I addressed that by making `mod_evaluate()` and scripts like `core/01_core.js` behave idempotently. This allowed unifying `ext::init_ops()` and `ext::init_ops_and_esm()` into `ext::init()`.
2023-06-10chore(tests): test_util - Add `PathRef` (#19450)David Sherret
This adds a new `PathRef` struct to test_util for making it easier to work with paths in test code. I'm going to expand on this more in the future.
2023-06-06perf(cli): conditionally load typescript declaration files (#19392)David Sherret
Closes #18583
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-06-03refactor(core): remove force_op_registration and cleanup ↵Nayeem Rahman
JsRuntimeForSnapshot (#19353) Addresses https://github.com/denoland/deno/pull/19308#discussion_r1212248194. Removes force_op_registration as it is no longer necessary.
2023-05-28refactor(core): remove ext: modules from the module map (#19040)Nayeem Rahman
Rather than disallowing `ext:` resolution, clear the module map after initializing extensions so extension modules are anonymized. This operation is explicitly called in `deno_runtime`. Re-inject `node:` specifiers into the module map after doing this. Fixes #17717.
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-22docs: be explicit in the unit of time of delay in setTimeout (#19207)Connor Burton
2023-05-21fix(ci): simplify test assertion for http version enforcing with ↵Leo Kettmeir
Deno.createHttpClient (#19210)
2023-05-21feat(unstable): add more options to Deno.createHttpClient (#17385)Leo Kettmeir
2023-05-19feat(ext/http): ref/unref for server (#19197)Matt Mastracci
Add `ref` and `unref` to return value from `Deno.serve`. Unblocks #3326.
2023-05-19BREAKING(unstable): change return type of Deno.serve() API (#19189)Bartek Iwańczuk
This commit changes the return type of an unstable `Deno.serve()` API to instead return a `Deno.Server` object that has a `finished` field. This change is done in preparation to be able to ref/unref the HTTP server.
2023-05-17fix(kv): kv.close() interrupts in-flight operations (#19076)Heyang Zhou
Fixes https://github.com/denoland/deno/issues/19049
2023-05-14fix(dts): move BroadcastChannel type to lib.deno.unstable.d.ts (#19108)Yoshiya Hinosawa
2023-05-11fix(cli): upgrade to Typescript 5.0.4 (#19090)David Sherret
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-05-01perf: lazily retrieve ppid (#18940)David Sherret
This is very apparent on Windows. Before: 45.74ms (Hello world) After: 33.92ms Closes #18939
2023-04-30perf(core): async op pseudo-codegen and performance work (#18887)Matt Mastracci
Performance: ``` async_ops.js: 760k -> 1030k (!) async_ops_deferred.js: 730k -> 770k Deno.serve bench: 118k -> 124k WS test w/ third_party/prebuilt/mac/load_test 100 localhost 8000 0 0: unchanged Startup time: approx 0.5ms slower (13.7 -> 14.2ms) ```
2023-04-27feat(kv): return ok bool from atomic commit (#18873)Luca Casonato
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-04-26fix(dts): `URLPatternComponentResult` groups should have possibly undefined ↵David Sherret
key values (#18643) Closes #18640
2023-04-27fix(ext/http): internal upgradeHttpRaw works with "Deno.serve()" API (#18859)Matt Mastracci
Fix internal "upgradeHttpRaw" API restoring capability to upgrade HTTP connection in polyfilles "node:http" API.
2023-04-26feat(ext/kv): add more atomic operation helpers (#18854)Ryan Dahl
Co-authored-by: losfair <zhy20000919@hotmail.com> Co-authored-by: Luca Casonato <hello@lcas.dev>
2023-04-26BREAKING(unstable): remove "Deno.serve(handler, options)" overload (#18759)Bartek Iwańczuk
In preparation to stabilization of the API this overload was decided to be removed.
2023-04-24refactor(ext/node): enforce interior mutable for `NodePermissions` to remove ↵David Sherret
clones (#18831) We can make `NodePermissions` rely on interior mutability (which the `PermissionsContainer` is already doing) in order to not have to clone everything all the time. This also reduces the chance of an accidental `borrow` while `borrrow_mut`.
2023-04-24refactor(ext/node): allow injecting `NodeFs` from CLI (#18829)David Sherret
This allows providing a `NodeFs` as part of the `WorkerOptions`.
2023-04-24docs: add categories to APIs without (#18826)Leo Kettmeir
2023-04-21refactor(node): move most of cli/node to ext/node (#18797)David Sherret
This is just a straight refactor and I didn't do any cleanup in ext/node. After this PR we can start to clean it up and make things private that don't need to be public anymore.
2023-04-17refactor(npm): add CliNodeResolver (#18742)David Sherret
2023-04-15feat(kv): AtomicOperation#sum (#18704)Ryan Dahl
2023-04-14refactor: break up `ProcState` (#18707)David Sherret
1. Breaks up functionality within `ProcState` into several other structs to break out the responsibilities (`ProcState` is only a data struct now). 2. Moves towards being able to inject dependencies more easily and have functionality only require what it needs. 3. Exposes `Arc<T>` around the "service structs" instead of it being embedded within them. The idea behind embedding them was to reduce the verbosity of needing to pass around `Arc<...>`, but I don't think it was exactly working and as we move more of these structs to be more injectable I don't think the extra verbosity will be a big deal.
2023-04-13refactor(cli,ext,ops): cleanup `regex` with `lazy-regex` (#17296)Yiyu Lin
- bump deps: the newest `lazy-regex` need newer `oncecell` and `regex` - reduce `unwrap` - remove dep `lazy_static` - make more regex cached --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>