summaryrefslogtreecommitdiff
path: root/cli/tsc/mod.rs
AgeCommit message (Collapse)Author
2024-11-19refactor: update deno_doc, use prismjs, remove internal reference html ↵Leo Kettmeir
generation logic (#26885)
2024-11-15perf: use available system memory for v8 isolate memory limit (#26868)Bartek Iwańczuk
Instead of using the default 1.4Gb limit (which was meant for browser tabs) configure V8 to set the heap limit to the amount of memory available in the system. Closes https://github.com/denoland/deno/issues/23424 Closes https://github.com/denoland/deno/issues/26435 Closes https://github.com/denoland/deno/issues/21226
2024-11-14refactor(resolver): move more resolution code into deno_resolver (#26873)David Sherret
Follow-up to cjs refactor. This moves most of the resolution code into the deno_resolver crate. Still pending is the npm resolution code.
2024-11-13feat(node): stabilize detecting if CJS via `"type": "commonjs"` in a ↵David Sherret
package.json (#26439) This will respect `"type": "commonjs"` in a package.json to determine if `.js`/`.jsx`/`.ts`/.tsx` files are CJS or ESM. If the file is found to be ESM it will be loaded as ESM though.
2024-11-01fix: improved support for cjs and cts modules (#26558)David Sherret
* cts support * better cjs/cts type checking * deno compile cjs/cts support * More efficient detect cjs (going towards stabilization) * Determination of whether .js, .ts, .jsx, or .tsx is cjs or esm is only done after loading * Support `import x = require(...);` Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-25fix(check): ignore resolving `jsxImportSource` when jsx is not used in graph ↵David Sherret
(#26548)
2024-09-14feat: TypeScript 5.6 and `npm:@types/node@22` (#25614)David Sherret
2024-09-13fix(check): move is cjs check from resolving to loading (#25597)David Sherret
This is required to do when loading because TypeScript handles and resolves `/// <reference path="..." />` internally.
2024-09-04fix(byonm): resolve npm deps of jsr deps (#25399)David Sherret
This allows using npm deps of jsr deps without having to add them to the root package.json. Works by taking the package requirement and scanning the `node_modules/.deno` directory for the best matching package, so it relies on deno's node_modules structure. Additionally to make the transition from package.json to deno.json easier, Deno now: 1. Installs npm deps in a deno.json at the same time as installing npm deps from a package.json. 2. Uses the alias in the import map for `node_modules/<alias>` for better package.json compatiblity.
2024-08-24refactor(lsp): changes for lsp_types 0.97.0 (#25169)Nayeem Rahman
2024-07-25refactor: decouple node resolution from deno_core (#24724)David Sherret
2024-07-24fix(node): better detection for when to surface node resolution errors (#24653)David Sherret
2024-07-10fix(check): CJS types importing dual ESM/CJS package should prefer CJS types ↵David Sherret
(#24492) Closes #16370
2024-07-09refactor: use concrete error types for node resolution (#24470)David Sherret
This will help clean up some of the code in the CLI because we'll be able to tell how the resolution failed (not part of this PR).
2024-06-06refactor: remove `PermissionsContainer` in deno_runtime (#24119)David Sherret
Also removes permissions being passed in for node resolution. It was completely useless because we only checked it for reading package.json files, but Deno reading package.json files for resolution is perfectly fine. My guess is this is also a perf improvement because Deno is doing less work.
2024-05-29fix: bump cache sqlite dbs to v2 for WAL journal mode change (#24030)David Sherret
In https://github.com/denoland/deno/pull/23955 we changed the sqlite db journal mode to WAL. This causes issues when someone is running an old version of Deno using TRUNCATE and a new version because the two fight against each other.
2024-04-19perf(lsp): Avoid passing struct into op_resolve (#23452)Nathan Whitaker
Going through serde_v8 is slow, so just pass the args separately. `op_resolve` is especially hot, so any speedups are good.
2024-04-19perf(lsp): cleanup document dependencies (#23426)Nayeem Rahman
2024-04-16feat(check): allow using side effect imports with unknown module kinds (ex. ↵David Sherret
css modules) (#23392) This allows people to use imports like: ```ts import "./app.css"; ``` ...with `deno check` in systems where there's a bundle step (ex. Vite). This will still error when using it with `deno run` or if the referenced file does not exist. See test cases for behaviour.
2024-04-12chore: upgrade deno_core to 0.274.0 (#23344)Divy Srivastava
Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-04-12chore: remove repetitive words (#23341)youngwendy
Signed-off-by: youngwendy <clonefetch@outlook.com>
2024-04-11perf(lsp): use a stub module in tsc for failed resolutions (#23313)Nayeem Rahman
2024-03-05chore: upgrade deno_core (#22699)Bartek Iwańczuk
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-02-27chore: bump deno_core (#22596)Matt Mastracci
Migrations: - snapshot code updated - runtime stats API tweaks
2024-02-19chore: move `test_util` to `tests/util/server` (#22444)Asher Gomez
As discussed with @mmastrac. --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com> Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-02-15feat(unstable): single checksum per JSR package in the lockfile (#22421)David Sherret
This changes the lockfile to not store JSR specifiers in the "remote" section. Instead a single JSR integrity is stored per package in the lockfile, which is a hash of the version's `x.x.x_meta.json` file, which contains hashes for every file in the package. The hashes in this file are then compared against when loading. Additionally, when using `{ "vendor": true }` in a deno.json, the files can be modified without causing lockfile errors—the checksum is only checked when copying into the vendor folder and not afterwards (eventually we should add this behaviour for non-jsr specifiers as well). As part of this change, the `vendor` folder creation is not always automatic in the LSP and running an explicit cache command is necessary. The code required to track checksums in the LSP would have been too complex for this PR, so that all goes through deno_graph now. The vendoring is still automatic when running from the CLI.
2024-02-01refactor: load bytes in deno_graph (#22212)David Sherret
Upgrades deno_graph to 0.64 where deno_graph is now responsible for turning bytes into a string. This is in preparation for Wasm modules.
2024-01-23chore: upgrade deno_core to 0.249.0 (#22058)Bartek Iwańczuk
2024-01-22feat(web): ImageBitmap (#21898)Leo Kettmeir
2024-01-14feat: remove conditional unstable type-checking (#21825)Bartek Iwańczuk
This commit removes conditional type-checking of unstable APIs. Before this commit `deno check` (or any other type-checking command and the LSP) would error out if there was an unstable API in the code, but not `--unstable` flag provided. This situation hinders DX and makes it harder to configure Deno. Failing during runtime unless `--unstable` flag is provided is enough in this case.
2024-01-10feat(unstable): fast subset type checking of JSR dependencies (#21873)David Sherret
2024-01-01chore: update to Rust 1.75 (#21731)林炳权
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-12-12perf(lsp): use null types instead of stub modules (#21541)Nayeem Rahman
2023-12-11perf(lsp): simplify some of the startup code (#21538)Bartek Iwańczuk
Remove some dead code in "99_main_compiler.js". Eagerly start the LSP TSC host, it was adding some not needed complexity around the TSC thread code.
2023-12-09feat: bring back WebGPU (#20812)Leo Kettmeir
Signed-off-by: Leo Kettmeir <crowlkats@toaxl.com> Co-authored-by: Kenta Moriuchi <moriken@kimamass.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-12-03refactor: faster args for op_load in TSC (#21438)Bartek Iwańczuk
This commit changes the argument that "op_load" accepts, from a serde struct to "&str". This should equal to a slightly better performance.
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-10-12refactor: FeatureChecker integration in ext/ crates (#20797)Bartek Iwańczuk
Towards https://github.com/denoland/deno/issues/20779.
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-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-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-21refactor: rewrite some ops to op2 macro (#20603)Bartek Iwańczuk
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-07feat: support import attributes (#20342)David Sherret
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-10refactor(lsp): move config file related code to config.rs (#19790)David Sherret
Will make #19788 easier.