Repository navigation
typescript(deno): what a stress test against deno info found: lockfile redirects, ^ in URLs, npm ranges, package.json deps, @types twins - #1986
Merged
Conversation
…er node_modules/.deno Found by checking six public Deno projects import by import against deno info. - A remote redirect Deno 2 recorded only in deno.lock (`<cdn>/[email protected]` to `[email protected]`) is followed; it often has no cache entry of its own. - A URL with `^` in its path finds the cache entry: Deno hashes the path as written, the WHATWG parser here escapes `^` to `%5E`. - An npm: range the hoisted node_modules copy does not satisfy resolves into the matching node_modules/.deno/<name>@<version> copy (`npm:pkg@^3` beside a hoisted 4). A package typed by its @types twin keeps the twin. - `--library auto` says how many Deno dependency imports resolve to nothing and to run `deno install`, instead of staging nothing silently. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…, and @types twins - Under `"nodeModulesDir": "none"` (or `auto`), a bare specifier that no import map or member claims, but that the nearest package.json declares, resolves into Deno's npm cache, as Deno serves it. Under `manual`, Deno's default beside a package.json, Deno demands node_modules and refuses otherwise, so nothing is answered and the compiler's own resolution stands. - A package in Deno's npm cache that ships only JavaScript resolves to its cached @types twin, the file Deno type-checks against. On a 46-config Deno workspace whose Node-style members declare their dependencies in package.json, this is most of what was left unresolved. Co-Authored-By: Claude Opus 5.5 <[email protected]>
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
October 25, 2026 00:58
Contributor
Author
|
The largest project end to end: the 46-config workspace (~950 TypeScript files).
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1984 / #1985.
Why
I checked six public Deno projects import by import against
deno info --json, run from each file's own config directory (Deno finds its config from the working directory). The projects: two Hono apps (one on edge functions), a 14-config framework workspace, a 46-config workspace with Node-style members, an app with URL imports, and a Deno backend with a Vue front end. The checks found five gaps.What changes
<cdn>/[email protected]to[email protected]) only indeno.lock'sredirects, with no cache entry of its ownlocation^in its path (pkg@^4.11.1)^to%5E, while Deno hashes the path as writtennpm:pkg@^3in a member's import map, with a hoistednode_modules/pkgat 4node_modules/.deno/[email protected]/node_modules/pkg(a package typed by its@typestwin keeps the twin)package.json, nothing installed,"nodeModulesDir": "none"manual(Deno's default beside apackage.json), Deno refuses withoutnode_modules, so we answer nothing too.jsentry@typestwinAlso,
--library autonow printsN Deno dependency import(s) resolve to nothing; ... run deno installinstead of staging nothing silently. I hit this during the run: macOS purged Deno's cache in~/Library/Cachesunder disk pressure, and discovery then reported 0 mirrors with no reason given.Parser and plugin only.
Measured against
deno info.vuefiles with a JavaScript<script>, which the JS front end reads, so not this change)manual)none)@typesdeclarations wheredeno infonames the JS moduleWhat's left on the large workspace: 132 imports of generated files that don't exist in a checkout, platform schemes Deno rejects as well (
bun:,astro:,cloudflare:),#start/*subpath imports in one Node example app, and extensionless relative imports inside Node example apps (bundler semantics, not Deno's).Controls, full IR diffed old parser against new:
package.jsonrule changed 12 of its rows (its front end ismanual), and that is why the rule is gated onnodeModulesDir.End to end (
axiomcode index . --library auto, then one edit and a rebuild):No library is recompiled on rebuild, and
build.logshows no warnings.Tests
parser/src/test/deno-tests.ts: 12 checks (was 9). New:^cache keynode_modules/.deno, keeping an@typestwinpackage.jsondependencies undernone, nothing undermanual, and the@typestwin from the npm cachebin/axiomcode test parser: every suite passes (TypeScript 49/49, Deno 12/12, JavaScript 49/49, discovery, gradle, services).tests/manifests.py: ok. OSS scrub gate: 0 hits on the changed files.