summaryrefslogtreecommitdiff
path: root/cli/tsc
AgeCommit message (Collapse)Author
2023-04-06refactor(npm): use deno_npm and deno_semver (#18602)David Sherret
2023-04-04refactor(core): Improve ergonomics of managing ASCII strings (#18498)Matt Mastracci
This is a follow-on to the earlier work in reducing string copies, mainly focused on ensuring that ASCII strings are easy to provide to the JS runtime. While we are replacing a 16-byte reference in a number of places with a 24-byte structure (measured via `std::mem::size_of`), the reduction in copies wins out over the additional size of the arguments passed into functions. Benchmarking shows approximately the same if not slightly less wallclock time/instructions retired, but I believe this continues to open up further refactoring opportunities.
2023-04-03feat(ext/ffi): support marking symbols as optional (#18529)Dj
2023-04-01perf(check): faster source hashing (#18534)David Sherret
2023-04-01fix(check): ensure diagnostics caused by changes in other files get ↵David Sherret
invalidated between runs (#18541) Regression caused by the performance improvement in #18329. Figuring this out was hard. It's luckily still fast after this change. Closes #18516
2023-03-31fix: upgrade to TypeScript 5.0.3 (#18532)David Sherret
2023-03-31fix(lsp): better handling of `data:` urls (#18527)David Sherret
1. Log instead of error when the referrer can't be found 2. Fixes typescript to resolve data urls correctly. Properly documented here: https://github.com/denoland/TypeScript/pull/4/files#diff-180da7c288743d11d8590d30f0c07c48e5dcf291aa671bbea0dd520a9a1359d2 Closes #18524
2023-03-30fix(dts): improve types for the Deno.KV API (#18510)Luca Casonato
2023-03-30feat(ext/kv): return versionstamp from set/commit (#18512)Luca Casonato
This commit updates the `Deno.Kv` API to return the new commited versionstamp for the mutated data from `db.set` and `ao.commit`. This is returned in the form of a `Deno.KvCommitResult` object that has a `versionstamp` property.
2023-03-30fix(lsp): `textDocument/references` should respect `includeDeclaration` (#18496)David Sherret
2023-03-30docs: clarify `Deno.consoleSize` returns the window size (#18508)David Sherret
Closes #18477
2023-03-25chore(ext/kv): add limits (#18415)Heyang Zhou
2023-03-24chore(types): fix type checking errors in 99_main_compiler.js (#18403)David Sherret
2023-03-23fix(core): panic at build time if extension code contains anything other ↵Matt Mastracci
than 7-bit ASCII (#18372) This will improve diagnostics and catch any non-ASCII extension code early. This will use `debug_assert!` rather than `assert!` to avoid runtime costs, and ensures (in debug_assert mode only) that all extension source files are ASCII as we load them.
2023-03-22Revert "refactor: rename Deno.openKv() to Deno.kv() (#18349)" (#18362)Ryan Dahl
This reverts commit 50b793c9ed866ee29e8f04b4fa24b485b01a2b74.
2023-03-22refactor: rename Deno.openKv() to Deno.kv() (#18349)Ryan Dahl
2023-03-22chore: upgrade rusty_v8 to 0.66.0 (#18339)Bartek Iwańczuk
2023-03-22feat(ext/kv): key-value store (#18232)Heyang Zhou
This commit adds unstable "Deno.openKv()" API that allows to open a key-value database at a specified path. --------- Co-authored-by: Luca Casonato <hello@lcas.dev> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-21perf(core) Reduce script name and script code copies (#18298)Matt Mastracci
Reduce the number of copies and allocations of script code by carrying around ownership/reference information from creation time. As an advantage, this allows us to maintain the identity of `&'static str`-based scripts and use v8's external 1-byte strings (to avoid incorrectly passing non-ASCII strings, debug `assert!`s gate all string reference paths). Benchmark results: Perf improvements -- ~0.1 - 0.2ms faster, but should reduce garbage w/external strings and reduces data copies overall. May also unlock some more interesting optimizations in the future. This requires adding some generics to functions, but manual monomorphization has been applied (outer/inner function) to avoid code bloat.
2023-03-21perf(check): type check local files only when not using `--all` (#18329)David Sherret
Closes #18171
2023-03-21chore: update formatting configuration (#18331)Bartek Iwańczuk
2023-03-21Revert "perf: disable TSC snapshot compression (#18333)" (#18336)Bartek Iwańczuk
This reverts commit 0d27de943a60f5ca60e2116648719c235163361a.
2023-03-21perf: disable TSC snapshot compression (#18333)Bartek Iwańczuk
This commit disables compression of the TSC snapshot. The compression only decreased the size of snapshot by 0.5Mb and it took about 40s during release build to compress. With recent gains in TS 5.0 upgrade in terms of size and performance it makes sense to remove this compression.
2023-03-21feat: TypeScript 5.0.2 (except decorators) (#18294)David Sherret
This upgrades TypeScript to 5.0.2, but does not have ES decorator support because swc does not support that yet.
2023-03-21docs: fix broken `Deno.FsFile#readable` example code (#18277)ayame113
2023-03-20feat(ext/net): Add multicasting APIs to DatagramConn (#10706) (#17811)Sam Gwilym
2023-03-18Reland "perf(core): preserve ops between snapshots (#18080)" (#18272)Bartek Iwańczuk
Relanding 4b6305f4f25fc76f974bbdcc9cdb139d5ab8f5f4
2023-03-18Revert "perf(core): preserve ops between snapshots (#18080)" (#18267)Bartek Iwańczuk
This reverts commit 4b6305f4f25fc76f974bbdcc9cdb139d5ab8f5f4.
2023-03-18docs(FFI/UnsafePointerView): fix a typo in a docstring (#18034)Andrew
2023-03-18perf(core): preserve ops between snapshots (#18080)Bartek Iwańczuk
This commit changes the build process in a way that preserves already registered ops in the snapshot. This allows us to skip creating hundreds of "v8::String" on each startup, but sadly there is still some op registration going on startup (however we're registering 49 ops instead of >200 ops). This situation could be further improved, by moving some of the ops from "runtime/" to a separate extension crates. --------- Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-03-17perf(core) Reduce copying and cloning in extension initialization (#18252)Matt Mastracci
Follow-up to #18210: * we are passing the generated `cfg` object into the state function rather than passing individual config fields * reduce cloning dramatically by making the state_fn `FnOnce` * `take` for `ExtensionBuilder` to avoid more unnecessary copies * renamed `config` to `options`
2023-03-17feat(core) deno_core::extension! macro to simplify extension registration ↵Matt Mastracci
(#18210) This implements two macros to simplify extension registration and centralize a lot of the boilerplate as a base for future improvements: * `deno_core::ops!` registers a block of `#[op]`s, optionally with type parameters, useful for places where we share lists of ops * `deno_core::extension!` is used to register an extension, and creates two methods that can be used at runtime/snapshot generation time: `init_ops` and `init_ops_and_esm`. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-17BREAKING(unstable): remove WebGPU (#18094)Leo Kettmeir
This PR _**temporarily**_ removes WebGPU (which has behind the `--unstable` flag in Deno), due to performance complications due to its presence. It will be brought back in the future; as a point of reference, Chrome will ship WebGPU to stable on 26/04/2023. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
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-14refactor(core): remove "resolve_url_or_path_deprecated" (#18174)Bartek Iwańczuk
Remove remaining usages of "resolve_url_or_path_deprecated" in favor of "resolve_url_or_path" with explicit calls to "std::env::current_dir()". Towards landing https://github.com/denoland/deno/pull/15454
2023-03-14refactor(core): resolve_url_or_path and resolve_url_or_path_deprecated (#18170)Bartek Iwańczuk
This commit changes current "deno_core::resolve_url_or_path" API to "resolve_url_or_path_deprecated" and adds new "resolve_url_or_path" API that requires to explicitly pass the directory from which paths should be resolved to. Some of the call sites were updated to use the new API, the reminder of them will be updated in a follow up PR. Towards landing https://github.com/denoland/deno/pull/15454
2023-03-13refactor: Remove call sites of "deno_core::resolve_url_or_path" (#18169)Bartek Iwańczuk
These call sites didn't need to use "resolve_url_or_path". Towards landing https://github.com/denoland/deno/pull/15454
2023-03-12refactor(npm): push npm struct creation to a higher level (#18139)David Sherret
This has been bothering me for a while and it became more painful while working on #18136 because injecting the shared progress bar became very verbose. Basically we should move the creation of all these npm structs up to a higher level. This is a stepping stone for a future refactor where we can improve how we create all our structs.
2023-03-11fix(check): regression where config "types" entries caused type checking ↵David Sherret
errors (#18124) Closes #18117 Closes #18121 (this is just over 10ms faster in a directory one up from the root folder) cc @nayeemrmn
2023-03-07refactor(core): don't use Result in ExtensionBuilder::state (#18066)Bartek Iwańczuk
There's no point for this API to expect result. If something fails it should result in a panic during build time to signal to embedder that setup is wrong.
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-03-03feat(ops): reland fast zero copy string arguments (#17996)Divy Srivastava
Reland https://github.com/denoland/deno/pull/16777 The codegen is disabled in async ops and when fallback to slow call is possible (return type is a Result) to avoid hitting this V8 bug: https://github.com/denoland/deno/issues/17159
2023-02-24fix(npm): lazily install package.json dependencies only when necessary (#17931)David Sherret
This lazily does an "npm install" when any package name matches what's found in the package.json or when running a script from package.json with deno task. Part of #17916 Closes #17928
2023-02-24refactor(flash): move remoteAddr to options bag (#17913)Leo Kettmeir
Applies suggestion from #17912
2023-02-23feat(npm): support bare specifiers from package.json in more subcommands and ↵David Sherret
language server (#17891)
2023-02-22refactor: use deno_graph for npm specifiers (#17858)David Sherret
This changes npm specifiers to be handled by deno_graph and resolved to an npm package name and version when the specifier is encountered. It also slightly changes how npm specifier resolution occurs—previously it would collect all the npm specifiers and resolve them all at once, but now it resolves them on the fly as they are encountered in the module graph. https://github.com/denoland/deno_graph/pull/232 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-02-22fix(ext/ffi): Fix re-ref'ing UnsafeCallback (#17704)Aapo Alasuutari