Repository navigation
ts-loader 10 / TypeScript 7.1 - #1770
Open
johnnyreilly wants to merge 37 commits into
Open
johnnyreilly wants to merge 37 commits into
johnnyreilly wants to merge 37 commits into
Conversation
* feat: add tsgo transpile path
* fix: load tsgo API via ESM import
* Restrict execution-test TS matrix to tsgo version
* chore: explicitly use typescript@7.1.0-dev.20260725.1
* Port build to TypeScript 7 native API
* fix: large
* fix native API execution test defaults
* chore: remove test
* fix: remove unused
* fix: happify ashley
* fix: use TS7 API in comparison test harness
* fix: getProgram
* feat: extra diagnostics
* feat: match existing formatting
* chore: regenerate yarn.lock
* chore: remove happypack
* fix: aliasResolution
* chore: bump version
* fix: colors
* fix: webpack 4
* chore: rename
* chore: remove unused
* fix: rootDir in tests
* fix: outputs
* fix: declarationOutput
* fix: declaration tests
* fix: dependency
* fix: output
* fix: declarationWathc
* chore: upgrade prettier
* fix: reportFiels
* fix: test
* fix: onlyCompileBundledFiles
* fix: style
* fix: otherLoadersWatch
* feat: settings.json
* fix: output
* chore: add setings
* fix: resolveJsonModule
* fix: tsconfileInvalid
* fix: tsconfileInvalidFile
* revert last fix
* Comment out DIAGNOSTIC_CODE_FILE_NOT_FOUND constant
Comment out the DIAGNOSTIC_CODE_FILE_NOT_FOUND constant.
* chore: skip test
* fix: yarn comparison-tests --single-test nodeModulesMeaningfulErrorWhenImportingTs
* fix: output
* chore: temp files better
* feat: virtual file system
* fix: sourceMapsShouldConsiderInputSourceMap
* fix: allow spike rm
* fix: Windows comparison-test failures in the tsgo API backend
program.getSourceFileNames()/getConfigFileNames() and related lookups
return the TypeScript API's forward-slash-normalized paths, but several
call sites handed those straight to Node's OS-native `path` functions or
to webpack's addDependency/addBuildDependency (which reject non-native
absolute paths on Windows). This surfaced as a cluster of Windows-only
comparison-test failures with no macOS/Linux equivalent:
- getDirectResolvedImports/resolveRelativeSpecifier: dependant-recheck
lookups failing (dependencyErrors)
- findTransitiveDependants: multi-hop BFS matching failing
(simpleDependency)
- ensureSyntheticConfigForFile: synthetic project config content keyed
under the wrong path, degrading emit for any file compiled via the
synthetic single-file project fallback (basic, externals)
- registerTypeScriptDependencies: two addDependency/addBuildDependency
call sites passed a forward-slash path straight to webpack (externals)
- createTypeScriptApiInstance: missing fileExists override for purely
synthetic identities like component.vue.ts under appendTsSuffixTo
(appendSuffixTo)
Also: normalizes platform-dependent path depth embedded in TS18003/
TS5055/TS6059 compiler diagnostic messages in the comparison-test
harness (same compiler behaviour on both platforms, just displayed
relative to a different reference point), adds an on-demand
windows-test-probe.yml workflow for fast, targeted Windows CI
iteration, and reduces the test retry count.
Verified against real Windows CI: all 50 comparison-test suites pass.
* docs: edit AGENTS.md / deps for sourceMaps test / time
* refactor: remove unverified Windows-fix leftovers proven unnecessary by testing
Isolated and reverted each individually against real Windows CI (full suite
where the change had broad reach, targeted tests otherwise) - all three
passed without the change, confirming they were never load-bearing:
- bumpMtimes in the comparison-test harness: added chasing a watchpack
mtime-equality theory for dependencyErrors that turned out wrong; the
actual fix was in getDirectResolvedImports (already in place).
- ensureSyntheticConfigForFile's files-array path normalization: added
before the real fix (syntheticConfigContents' store-side key
normalization, which remains); the API evidently normalizes each
files-array entry internally regardless of separator style.
- registerTypeScriptDependencies' getConfigFileNames loop normalization:
added speculatively alongside the confirmed addDependency fix in the
same edit; never independently exercised by any actual failure.
Full local suite (50/50) and full Windows CI suite (50/50) still pass
with all three removed.
* chore: "target": "es2022"
* feat: chalk -> picocolors
* feat: picocolors -> styleText
* fix: test
* fix: eslint -> oxlint
* feat: styleText -> picocolors
* chore: clean unused
* chore: knip / upgrade deps
* fix: execution tests
* chore: remove experimentalWatchApi references
* chore: remove experimentalWatchApi tests
* chore: remove reference to watchapi in tests
* fix: loader options hash
* fix: loader options hash
* fix: loader options hash
* chore: update to latest nightly
* chore: upgrade lint-staged
* feat: transpileApi
* fix: normalize transpileModule/transpileDeclaration fileName for Windows
api.transpileModule/transpileDeclaration build their own virtual
filesystem from `fileName` verbatim rather than resolving it through a
Project, so an OS-native (backslash) path panics on Windows ("mixed
posix and windows paths") and also breaks diagnostic location lookup
(the echoed diagnostic.fileName no longer matches the OS-native
apiFileName used as the lookup key).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix: transpileDeclaration panics on Windows given an absolute fileName
api.transpileDeclaration builds its own throwaway virtual filesystem
from `fileName` verbatim rather than resolving it through a Project,
and panics on Windows ("mixed posix and windows paths") given any
absolute path there - OS-native or forward-slash-normalized alike.
Stripping the OS-native configFilePath from compilerOptions and
falling back a rootDir were both tried first and, per the Windows
test probe workflow, neither stopped the panic.
The actual fix: pass transpileDeclaration a bare basename instead of
any absolute path at all. Unlike transpileModule (which needs
fileName's real directory for e.g. rootDir-containment diagnostics
like TS6059, and keeps its own absolute, forward-slash path),
transpileDeclaration doesn't need real directory context - its own
diagnostics (isolatedDeclarations violations) are purely syntactic,
and any real rootDir violation for the same file is already caught by
transpileModule's own call on it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* docs: reduce comment verbosity - needs another pass
* chore: remove workarounds no longer required since microsoft/TypeScript#64024
* chore: function expressions to function declarations
* feat: knip
* refactor: use API-provided startPosition/endPosition instead of a manual location lookup
DiagnosticResponse already carries precomputed startPosition/endPosition
(zero-based line/character) on every diagnostic - program-based
(getSyntacticDiagnostics etc.) and transpileModule/transpileDeclaration
alike - present exactly when there's a real position. That makes the
manual location-resolution machinery unnecessary: getDiagnosticLocations,
the DiagnosticLocationSource interface, makeSingleFileLocationSource, and
computeLineAndCharacterFromText all existed solely to reconstruct what the
API already returns, via a fileName-keyed lookup that only worked because
callers pre-canonicalized fileName to match the API's internal spelling
(see microsoft/TypeScript#64090). buildTypeScriptError now reads
diagnostic.startPosition/endPosition directly, so no lookup is needed at
all.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix: knip / simplify execution tests
* fix: tests
* fix: dont alias types
* chore: trim comments
* refactor: simplify logger
* refactor: simplify logger
* Change ColorFn type to an interface
* Fix type annotation in ColorFn interface
* chore: onlyCompileBundledFiles/context removed as options
* refactor: naming
* feat: remove fs-extra
* feat: remove rimraf
* feat: remove mkdirp
* chore: remove compilerOptions loader option
The tsgo-backed native API resolves compiler options purely from the
on-disk tsconfig.json, with no per-loader-instance override hook, so
compilerOptions has been inert since the 10.0.0 rewrite. Remove it as
a valid loader option (matching how onlyCompileBundledFiles/context
were removed) instead of leaving it silently accepted but ignored.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* test: regenerate snapshots affected by compilerOptions harness default removal
The comparison-test harness injected compilerOptions: { newLine: 'LF' }
into every test's loader options via its own default options object,
independent of each fixture's own webpack.config.js. Removing
compilerOptions as a valid loader option meant that default had to go
too (test/comparison-tests/create-and-execute-test.js), which shifts
the computed options-hash for every test that doesn't set an explicit
instance name. A number of snapshots embed that hash literally as
ts-loader-default_<hash>; regenerate them via --save-output.
Verified the full diff contains only options-hash changes, dist/index.js
stack-line normalization noise, and the couple-byte bundle size shift
from the shortened validateLoaderOptionNames error message - no actual
compiled-output changes.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* docs: CHANGELOG
* fix: resolve .mts/.cts relative imports for dependency tracking
relativeSpecifierExtensions (used by resolveRelativeSpecifier to match
a relative import specifier against the program's source files for
webpack dependency registration and transitive-dependant rechecking)
only tried .ts/.tsx/.d.ts/.js/.jsx, unlike the neighbouring
toDeclarationFileName which already handles .mts/.cts. A relative
import resolving to a .mts/.cts file was silently treated as
unresolved, so editing it neither registered a webpack dependency on
the importer nor triggered a diagnostics recheck of it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* perf: only force a full snapshot rescan once per build, not per file
updateSnapshot passed { invalidateAll: true } unconditionally on every
single file compiled, forcing the native API to discard its caches and
rescan disk once per file rather than once per build - real watch-mode
wiring (a hook tied to webpack's own build/rebuild boundary) didn't
exist anywhere in the tsgo rewrite.
Add TypeScriptInstance.pendingInvalidation, consumed by the first
updateSnapshot call of a build and re-armed via a compiler.hooks.compile
tap (fires once per build/watch-rebuild in both webpack 4 and 5), so
only that first call forces the rescan; every other file compiled in
the same build reuses the snapshot it already refreshed.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* perf: memoize direct-import resolution across a build's dependant recheck
findTransitiveDependants rebuilt a fresh O(n) Set of every project
file's name inside getDirectResolvedImports on every single call, and
called it once per project file for every file compiled - roughly
O(n^3) for a full build. The currently-compiling file's own imports
were also recomputed a second time (once via
registerResolvedImportDependencies, again inside the BFS).
- comparableSourceFileNames is now built once per file compiled
(passed down to callers) instead of once per candidate file inside
the BFS.
- Each project file's resolved-imports list is memoized in a new
TypeScriptInstance.directImportsCache, reused across every file
compiled in the same build via getCachedDirectResolvedImports. The
currently-compiling file always recomputes fresh (never trusts a
stale entry) and writes its result back, so other files' dependant
searches - and the file's own subsequent BFS lookup - see it too,
incidentally also fixing the double computation.
- The cache is cleared whenever pendingInvalidation forces a real
rescan (see the prior watch-mode fix), keeping it correct across
builds.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix: key directImportsCache by FilePathKey, not raw file name
registerResolvedImportDependencies wrote cache entries keyed by
apiFileName (OS-native, from webpack), while
findTransitiveDependants/getCachedDirectResolvedImports read/wrote
entries keyed by program.getSourceFileNames() (forward-slash-
normalized). On Windows those are different strings for the same
file, so an entry written by one path could never be found by the
other - silently defeating the memoization exactly where it mattered
(the currently-compiled file's own entry).
Key by FilePathKey via each instance's ResolvedPathCache instead,
matching how instance.files/pendingDiagnostics/pendingDeclarationFiles
already canonicalize path spelling and case-sensitivity.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* refactor: naming
* perf: memoize the .d.ts dependency scan across a build
registerTypeScriptDependencies iterated program.getSourceFileNames()
(every file in the program) on every single compiled file just to
find .d.ts files to register as dependencies - O(n) per file, O(n^2)
over a build, even though that set only changes when the program's
file set actually does.
Add getProjectDtsFileNames, memoized per project (primary or a
synthetic one-off project for an orphan file) in a new
TypeScriptInstance.projectDtsFileNamesCache, cleared alongside
directImportsCache whenever pendingInvalidation forces a real rescan.
Keyed by FilePathKey (via ResolvedPathCache) for consistency with
directImportsCache, though project config paths are already stable,
single-sourced strings in this codebase.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* refactor: names
* fix: cap orphan-file synthetic projects with LRU eviction
ensureSyntheticConfigForFile created and permanently tracked one
synthetic tsconfig + open project per distinct orphan file (e.g. every
allowTsInNodeModules file ever compiled), with no eviction - each held
its own ref-counted project open on the API side, so a long watch
session touching many distinct orphan files leaked memory/state
proportional to all of them, unbounded.
Cap it at 20 (maxOrphanFileProjects), evicting the least-recently-used
entry - tracked via Map insertion order, bumped on reuse - once the cap
is hit. The evicted project's closeProjects is threaded through
updateSnapshot to actually release its ref-counted open on the API
side, and removed from openedProjectPaths so revisiting that file later
reopens it fresh rather than treating it as still-open.
Verified with a standalone scratch reproduction (22 distinct orphan
files under allowTsInNodeModules): exactly 2 evictions occurred against
the cap of 20, the build succeeded with no errors, and editing a
previously-evicted file was correctly picked up on the next rebuild.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix: canonicalize configFilePath/syntheticConfig* via FilePath
Two real bugs, same class as the earlier directImportsCache fix:
- syntheticConfigContents's readFile/fileExists lookups used
toComparablePath (slash-only normalization), while the sibling
files Map right next to it already used resolvedPathCache (slash
*and* case normalization) - a case-insensitive-filesystem spelling
mismatch would silently miss.
- syntheticConfigFiles was keyed by raw fileName. Two importers
spelling/casing the same orphan file differently would be treated
as distinct files, each spawning its own redundant synthetic
project - undermining the LRU cap added previously.
configFilePath and openedProjectPaths are converted too for
consistency, though their values were already single-sourced and
stable in practice.
Added TypeScriptInstance.resolvedPathCache so functions that only
receive TypeScriptInstance (not the outer TSInstance) - openPrimaryProject,
prepareSnapshotForFile, ensureSyntheticConfigForFile, updateSnapshot -
can canonicalize a path without threading it through as a separate
parameter.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* refactor: rename
* refactor: names
- Use interface instead of type for the plain object shape
TypeScriptApiModule, matching AGENTS.md's convention.
- Extract reportConfigFileParsingErrors, deduplicating the ~20-line
broken-tsconfig error-reporting block shared by getTypeScriptEmit
and getTranspileOnlyEmit.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* refactor: thread resolvedFilePathCache instead of storing it twice
TypeScriptInstance.resolvedFilePathCache duplicated the exact same
function reference already stored on the owning TSInstance's own
resolvedPathCache field.
Drop the stored field; thread it as an explicit parameter through
prepareSnapshotForFile/ensureSyntheticConfigForFile instead, sourced
from instance.resolvedPathCache at the getTypeScriptEmit call site -
matching the convention already used by getProjectDtsFileNames,
registerResolvedImportDependencies, getCachedDirectResolvedImports,
and findTransitiveDependants.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* refactor: rename
* feat: split diagnostics
* feat: format
* fix: benchmark close issue
* fix: bound benchmark scenario wall-clock time to fit CI's job timeout
The tsgo sync API spawns a native child process per ts-loader instance,
making a "cold build" iteration ~10-20x more expensive than the classic
API's cheap in-process instantiation; touching a widely-imported (hub)
file is similarly ~35x more expensive per incremental rebuild due to
per-dependant recheck round trips over the sync RPC channel. The fixed
iteration counts (tuned for the classic API's cost profile) made the
cold-typeCheck and hub-touch scenarios alone take ~28 minutes combined,
blowing the 20-minute CI job timeout before a single scenario finished.
Cap each scenario's wall-clock time in run-side.mts instead of guessing
a smaller fixed iteration count, so cheap scenarios keep their full
sample size while expensive ones stop once they've collected enough
measured samples. Confirmed locally: full default run (300 files) went
from never finishing to completing in ~4 minutes.
* perf: batch transitive-dependant recheck to once per build, not once per file
Profiling the benchmark's slowness (tsgo branch showing 10-20x worse
numbers than the classic branch, contrary to tsgo's own "faster
compiler" characteristic) traced 83-91% of both cold-build and
hub-touch-rebuild time to recheckTransitiveDependants: it ran once per
file webpack compiled rather than once per build, and each call does
a full O(project size) dependant search plus two diagnostic calls per
dependant found. For a wide-fanout change (a file most of the project
depends on) that's close to O(n²) work in a single build. The raw
tsgo API itself opens a 300-file project and double-diagnoses every
file in ~25ms - it's not the bottleneck.
Batches the recheck into one pass per build instead: getTypeScriptEmit
now just records which files it compiled (changedFilesThisBuild), and
a new recheckAllTransitiveDependants runs once from the existing
postCompile hook, searching dependants of the whole changed-file set
in a single pass.
Getting this right needed two follow-up fixes surfaced by comparison
tests, both around same-build ordering:
- A changed file can itself import another changed file compiled later
in the same build (e.g. an entry file and the dependency it just
changed). Its own diagnostics may have been computed before that
other file's compile updated the shared file cache the API's readFile
override serves from. findTransitiveDependants no longer excludes
changed files from being found as dependants of each other, so this
gets caught and rechecked too.
- The recheck's own snapshot needs a forced full rescan
(pendingInvalidation = true) rather than reusing the arbitrary anchor
file's incremental view, otherwise it can still read a stale copy of
a same-build sibling. Only costs one extra rescan per build (not per
file), so it's affordable now.
Measured on a synthetic 300-file fixture: cold build ~9.1s -> ~1.0s,
hub-touch incremental rebuild ~4.2s -> ~300-380ms. Full comparison-test
suite (including all watch-mode tests) still passes.
* chore: newer TypeScript version
* feat: perf optimisations
* feat: perf tweaks
* fix: format
* chore: optimisations
* fix: improve transpile by applying @andrewbranch's git diff from microsoft/TypeScript#63875 (comment)
* fix: typo
* feat: have one base snapshot per total webpack build rather than one per file
* docs: cleanup unused
* feat: migrate to new snapshot API from microsoft/TypeScript#64204
* fix: resolve two Windows/virtual-file panics in the new snapshot API
Two related "no project found for opened file" Go-side panics surfaced
against a virtual (never-on-disk) identity while migrating to the new
snapshot API:
1. `toApiFacingFileName` aliases a file with an unrecognized extension
(e.g. a Vue SFC's extracted `<script>` block, `App.vue` -> `App.vue.ts`)
for every API-facing call, including `openFiles`. But the `fs.fileExists`/
`readFile` host overrides looked up content keyed only by the real name,
never by that alias, so the API's callback for `App.vue.ts` came up empty
on both the virtual map and real disk - from the host's perspective the
file genuinely didn't exist. Fixed by having those overrides fall back to
the pre-alias name (`toRealFacingFileName`) on a miss.
2. Separately, on Windows only, `appendSuffixTo` (the older
`appendTsSuffixTo` option) hit the same panic for a different reason:
its aliased entry file is the very first file webpack compiles, so the
very first `createSnapshot` call has to open the project and that
not-yet-a-member file together, in one request - a combination the API
panics on regardless of whether create or update does it. Fixed by
catching that failure in `updateSnapshot` and retrying without
`openFiles`, letting the existing synthetic-config fallback in
`prepareSnapshotForFile` take over exactly as it already does for any
later never-before-seen file.
Verified via `yarn comparison-tests` (50/50, both fixes needed for
sourceMapsShouldConsiderInputSourceMap) and via
.github/workflows/windows-test-probe.yml (50/50 on Windows, where the
second bug only reproduces).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* chore: add standalone repro for the "no project found for opened file" panic
A minimal, ts-loader/webpack-free repro of the second panic shape
described in the PR discussion: a fresh API instance's very first
createSnapshot() call opens a project and, in the same request, opens a
file that isn't part of that project (real, inferred, or synthetic) -
which should fall back to the inferred project per
SnapshotRequestChangesParams.openFiles's own doc comment, but instead
panics on Windows. Doesn't reproduce on macOS/Linux.
Also extends windows-test-probe.yml with a repro_script input so this
(or any other standalone script) can be run on the Windows runner
on-demand, for verifying platform-specific upstream issues like this one.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix: canonicalize openFiles/fileNotifications casing to match openProjects
Upgrades to typescript@next 7.1.0-dev.20260922.1 and fixes the "no project
found for opened file" failure that persisted against it on Windows (see
microsoft/TypeScript#64204 (comment)
onwards).
Per microsoft/TypeScript#64204 (comment)
and microsoft/TypeScript#64204 (comment),
the failure traces back to a Windows drive-letter casing mismatch.
ts-loader was itself contributing to that: `openProjects` always carried
`configFilePath`'s resolvedFilePathCache'd (lowercased) form, but
`openFiles` and `fileNotifications.changed`/`deleted` used `fileName`'s
natural, unmodified casing - so a single snapshot request could mix a
lowercase-drive-letter project path with a differently-cased file path.
Canonicalizes every file name sent to the API the same way project paths
already are, at the single point (`updateSnapshot`) where the wire params
are built - doesn't touch how `apiFileName` is used anywhere else
(getSourceFile, getConfiguredProject, dependency tracking, etc.), keeping
this a narrow, wire-boundary-only change.
Confirmed via .github/workflows/windows-test-probe.yml that this fix alone
is sufficient - appendSuffixTo and the full 50-suite comparison run both
pass on Windows without any additional workaround.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix: upgrade typescript nightly and fix fallout on all platforms
Bumped the floating `typescript` dependency to a newer nightly
(7.1.0-dev.20261002.1), which changed the shape of the new unstable
sync API's FileSystemCallbacks (now requires all 8 callbacks instead of
just fileExists/readFile, and undefined no longer means "defer to the
real filesystem" - that's now the explicit serverFS.useOS sentinel).
Updated typeScriptApi.ts's fs override accordingly; everything other
than fileExists/readFile now just defers to the OS via serverFS.useOS.
That nightly bump also changed the compiler's own declaration-map/
source-map emission for two existing fixtures (declarationOutputWithMaps,
tsconfigInvalid) - confirmed via a side-by-side plain `tsc` comparison
against both nightlies, not a ts-loader bug - so those fixtures are
regenerated to match the new (correct, for this compiler version) output.
Also surfaced a third, Windows-only failure in
sourceMapsShouldConsiderInputSourceMap. Root-caused via git history
(bisecting known-good/known-bad CI runs) plus a timing benchmark of
typescript/unstable/sync's out-of-process API on both nightlies/both
platforms: vue-loader's webpack5 pitching mechanism re-requests each SFC
block through the full loader chain, and which of the resulting
"pitching" vs "final" modules webpack visits first (and so which
sourcesContent index each lands at) depends on their relative completion
timing - not stable across machines or even repeated runs on one
machine. The nightly bump measured faster on both OSes but by a
different relative amount each (~30% vs ~15% cold-start, ~0% vs ~5% warm,
Mac vs Windows), a plausible trigger for flipping this pre-existing
race; the race itself predates the bump and isn't ts-loader's to fix
(tried a custom devtoolModuleFilenameTemplate first - doesn't hold,
since the instability is in which modules get created, not how they're
named). Worked around by not byte-comparing that one test's
bundle.js.map - see the comment at its call site in
create-and-execute-test.js. Also pinned *.vue to LF line endings in
.gitattributes, which isn't the cause but is a reasonable consistency
fix regardless.
* fix: format
* chore: execution tests on mac
* chore: lose unstable as mentioned in microsoft/TypeScript#64709
* fix: can do prerelease
* docs: README
* fix: logger not respecting option
* fix: typescript version
* chore: version upgrade
* fix: lockfile churn
* chore: upgrade to 7.1.0-beta
* feat: newImportedFileWatch test
* refactor: use createPrograms for orphan files instead of synthetic tsconfigs
* fix: don't export SyntheticProgram (knip)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor: layer webpack-supplied content into the snapshot instead of fs callbacks
Each compiled file's content is now added as a persistent fileSystem layer
on the instance snapshot (sent in the same request as any openFiles for it),
replacing the readFile/fileExists callbacks and runWithTemporaryFileUpdate.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs: add an example
* docs: README and CHANGELOG fixes for 7.1.0-beta
- install typescript@beta rather than next
- list projectReferences among the accepted-but-inert options
- correct errorFormatter's colors type
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix: detect filesystem case sensitivity and pass it to the API
useCaseSensitiveFileNames now defaults to probing the volume the tsconfig.json
is on (as tsc does, and as v9 did via ts.sys) instead of assuming
case-sensitive on every non-Windows platform, and the resolved value is passed
to the TypeScript API so both agree on which paths are the same file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs: point README at examples/simple and drop links to removed examples
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs: describe project references support accurately for v10
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test: fail watch tests promptly and support deleting files in patches
A failed assertion thrown from webpack's watch callback left the watcher
open, so mocha never exited; the harness now closes it and fails the test.
A patch file named <file>.__deleted__ now deletes <file> when applied.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix: recheck dependants of deleted and re-created files in watch mode
- compare paths canonically (via resolvedFilePathCache) when finding a
changed file's dependants: the API echoes back the casing it was given,
so on a case-insensitive filesystem exact-string comparison found none
- treat a modified file the program didn't previously contain as created:
clear directImportsCache (other files' imports may now resolve) and tell
the API it was created
- merge, rather than overwrite, unconsumed watcher changes, so a rebuild
that compiles nothing (e.g. a pure deletion) doesn't lose them
Adds the deletedFileWatch comparison test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix: send real-cased paths to the TypeScript API
ts-loader passed its canonical (lowercased, when case-insensitive) paths to
the API, which echoes back whatever casing it is given - so on Windows, and on
macOS since case sensitivity is detected, TypeScript's messages showed
lowercased paths. The canonical form is now only used for ts-loader's own
cache keys; openProjects, openFiles and file notifications get real-cased
paths.
The comparison test harness no longer forces useCaseSensitiveFileNames: true,
so the default is tested on every OS; snapshots change only in the
options-derived instance hash.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix: evict synthetic programs in a request of their own
Sending removePrograms in the same snapshot update as createPrograms crashes
tsgo 7.1.0-beta (nil dereference in ProjectCollectionBuilder.HandleAPIRequest),
so any project with more than 20 orphan files killed the compiler process
once the synthetic-program cap started evicting. Adds manyOrphanFiles (25
orphan files) as a regression test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf: share one synthetic program across all orphan files
Files outside the configured project each got their own synthetic program
(capped at 20, least-recently-used evicted), each a near-complete copy of
the project - so a tsconfig whose files list only a .d.ts (every module an
orphan) rebuilt programs constantly: 8.1s vs 0.6s for the same 300-file
fixture with an include glob. They now share one program, as classic
ts-loader's single language service did, whose extra roots are only the
orphan files it doesn't already contain via an import.
Being a superset of the primary project, it also gives the transitive-
dependant recheck the full import graph, so dependants of a changed orphan
file are rechecked again (a regression from classic).
Adds an all-orphan-files variant of the benchmark fixture with cold and
hub-touch typeCheck scenarios: -92% and -95% vs the previous commit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test: add orphanDependantWatch comparison test
Every module is an orphan (the tsconfig lists only a .d.ts); changing an
imported file's type must still be reported in the unchanged importer,
which only the transitive-dependant recheck catches.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Update CHANGELOG with details on unsupported features
Clarified the status of unsupported features in the CHANGELOG.
* Update README to remove v10 upgrade notes
Removed sections on upgrading to v10 and Yarn Plug’n’Play from the README.
* docs: improve README
* chore: prepare 10.0.0-beta.0 release
- set version to 10.0.0-beta.0
- restrict typescript peer dependency to >=7.1.0-beta
- add a files allowlist so only built output is published
- document installing the beta via the next dist-tag
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix: report diagnostics for unbundled project files and drop stale ones
- type-check project files webpack doesn't bundle (all on the first build,
then the ones webpack's watcher reports changed), and watch them so edits
trigger a rebuild - matching v9 without onlyCompileBundledFiles
- drop stored diagnostics and declaration files for files that are no
longer in the program or a webpack module, e.g. deleted files
- comparison-test harness records diagnostics-only rebuilds (same hash)
- update fixture .d.ts files to valid TS 7 syntax
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix: resolve import dependencies with the native module resolver
Dependency tracking and the transitive-dependant recheck only followed
relative specifiers, resolved by hand, so a change reached through a
tsconfig paths alias (or baseUrl, package exports, ...) left stale
diagnostics. Resolve every import via the program's
getResolvedModuleFromModuleSpecifier instead, batched into one round trip
per pass, skipping unresolved and external-library imports.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: John Reilly <johnny_reilly@hotmail.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Trim, deduplicate and correct comments under src/:
- fix comments that referenced a removed fs/readFile override, wrong
files/functions, or stale type names
- keep detailed explanations in one place (function docs) with short
pointers from types.ts
- keep the Windows path / casing gotchas and upstream issue links
Also fix doubled wording in two error messages and an info log
("TypeScript TypeScript mode", "TypeScript typeScript API",
"typescript typeScript API").
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…1716) * chore: remove unused babel devDependencies Remove `babel`, `babel-polyfill` and `babel-preset-es2016`, plus their knip ignore entries. Nothing at the root uses them: the babel execution tests that reference them are skipped and install their own deps. `babel-preset-react` stays because the babel-es6resolveParent comparison test uses the `react` preset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: remove lint-staged lint-staged was configured in package.json, but nothing installs a git hook to run it (no husky or similar), so it never ran. Formatting and linting are already checked in CI by the format and lint workflows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: restore babel-polyfill and babel-preset-es2016 The babel execution tests are not skipped (the isNotBabelTest filter is commented out), and they resolve these from the root install: 2.1.4_babel-es2016 and 2.1.4_babel-react use the es2016 preset, and 2.4.1_importCodeSplitting imports babel-polyfill. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: replace semver with a small version-compare helper semver was only used by the execution test runner to skip tests whose folder name starts with a minimum TypeScript/webpack version. A major.minor.patch comparison covers that, including skipping the `_5.0.0_` tests on webpack 4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: replace glob with a recursive readdir helper The comparison test harness only used glob.sync to list every file under a directory. A small `listFiles` helper built on fs.readdirSync({ recursive: true }) does the same: same results and order, `/`-separated paths on Windows, dotfiles optional, and an empty list for a missing directory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: remove markdown-toc It was only used by the generate-toc script, and the README's TOC is already maintained by hand: Prettier has rewritten its bullets, so re-running the generator would fight Prettier. Also fix the one stale TOC label ("Declarations" -> "Declaration Files"). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: upgrade mocha from 6 to 12 Two changes keep the comparison test runner working with mocha 12: - Pass `--color` instead of `-c`. Mocha 6 restarted itself with the long form in process.argv, which picocolors uses to turn colors on; mocha 12 passes `-c` through as-is, so the colored output snapshots no longer matched. - Pass `--test-to-run=<name>`. Mocha 12 parses arguments with util.parseArgs and treats a separate value as a spec file. The test file now reads its arguments with util.parseArgs too (non-strict, as mocha's own arguments are mixed in), accepts both forms, and fails clearly when the test name is missing. Also point the allowed mocha commands in .claude/settings.json at bin/mocha.js, as mocha 12 removed bin/_mocha. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: remove webpack-cli It was only used by the execution test runner to run `webpack --bail` for the one test without a karma config (5.6.2_5.0.0_optionsCaching). A small run-webpack.js script now does the same through webpack's Node API: it builds once with `bail: true`, prints the stats, and exits with 1 on errors. `--debug` still works via `node --inspect-brk`. The comparison tests README now suggests `npx webpack-cli` for building a test by hand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: remove the Dockerfile and docker scripts The Dockerfile was built on node:18 (ts-loader needs Node 22+) with outdated Chrome install steps, and nothing else used it. The test-probe workflow and CI already cover running the tests on Linux. Also remove .dockerignore (only used by this Dockerfile; the devcontainer builds from its own folder) and their .npmignore entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: remove stale devcontainer * chore: address review feedback on the test helpers - run-webpack.js accepts the same config shapes as webpack-cli: an object, an array, a function (called with webpack-cli's env) or a Promise. - run-tests.js runs it with execFileSync, so no shell quoting or doubled backslashes on Windows. - listFiles skips a broken symlink, or a file deleted mid-listing, instead of crashing the run, and uses the repo's pathExists helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: drop the .devcontainer entry from .npmignore The folder was removed, so the entry no longer does anything. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: respect the config's stats setting in run-webpack.js Like webpack-cli, print stats using each config's own `stats` setting, with colors only when stdout is a terminal unless the config says otherwise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: remove the unused --extra-option test argument Nothing passed it: run-tests.js only sends --test-to-run and --save-output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: var to const * chore: use --test-to-run=<name> in the allowed mocha commands Mocha 12 treats a separate value as a spec file, so match the form the comparison test runner now uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: use arrow functions for callbacks in create-and-execute-test.js Named functions stay as declarations, and the test function createTest returns stays a `function` because it uses mocha's `this.timeout`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: add type-check scripts for the test harnesses `npm run check:comparison-tests` and `npm run check:execution-tests` type-check the harness scripts with tsc. The comparison tests' tsconfig now also covers link-test-lib.js, and the execution tests get a tsconfig covering run-tests.js and run-webpack.js. To pass, run-webpack.js types the webpack callback's stats as Stats or MultiStats, treats missing stats as a failed build, and uses const; and an unused catch binding in the comparison run-tests.js is renamed _err. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: type-check the test harnesses in the lint workflow Run `npm run check:comparison-tests` and `npm run check:execution-tests` after `npm run lint`, so type errors in the harness scripts fail CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: build src with module node20 ts-loader runs in Node, so check imports with Node's resolution rules rather than a bundler's. `module: node20` implies `moduleResolution: node16`, and emits the same CommonJS: the build output (.js, .d.ts and maps) is byte-identical. Also drop `declarationDir`, which matched `outDir`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: share a tsconfig base between the test harness checks The comparison and execution test tsconfigs had identical compiler options, so move them to test/tsconfig.base.json (with lib es2022, to match src). The execution tests check now also covers test/run-tests.js and test/karmaConfig.js, which nothing type-checked before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: type-check the benchmark tests Add `npm run check:benchmark-tests` and run it in the lint workflow, as nothing type-checked the benchmark .mts files. Also drop `esModuleInterop` from their tsconfig, as TypeScript 7 always enables it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: remove @ts-ignore comments from the comparison test harness - Declare the mocha globals the harness uses (describe, it, and the test's `this.timeout` and `done`) in globals.d.ts, as mocha 12 ships no types and this avoids a dependency on @types/mocha. - Check for webpack() returning null (per its types) and fail the test with a clear error. - Type newline.loader.js's `this` as webpack's LoaderContext. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: upgrade deps * fix: harden the comparison test harness after review - Reject an empty --test-to-run, which made the whole comparison-tests folder "the test" (and cleared the .test staging folder), and a value starting with `-`, which means parseArgs took the next flag as the name. - listFiles walks directories itself instead of using readdirSync's recursive mode, which follows symlinked folders: a link back to a parent listed the same files over and over. Symlinked folders aren't followed; symlinked files still count. Dot-folders are skipped without being walked, and only symlinks need a stat call. - Only a missing target (ENOENT) or a link loop (ELOOP) makes a symlink "not a file"; other errors are thrown, so --save-output can't delete the snapshot of a file it couldn't read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: resolve configs in run-webpack.js the way webpack-cli does - Pass `argv.bail: true` to a config function, as `webpack --bail` did. - Call function (or Promise) entries in an exported array. - Start the Promise chain first, so a config function that throws goes through the script's own error handling. - Use arrow functions for callbacks, matching create-and-execute-test.js. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: list the check: scripts in AGENTS.md AGENTS.md said lint had no separate type-check script, which is no longer true. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…mparison tests, Babel 7) (#1718) * test: modernise execution test pack deps; move Babel tests to Babel 7 - Rename execution test folders by feature, dropping the TypeScript version prefixes (ts-loader needs TypeScript 7.1+, so they always passed). Tests that need webpack 5 declare it in a test.json ({ "minWebpack": 5 }), which run-tests.js reads. - Install @types/jasmine once at the root (v4, matching the jasmine-core 4.6 that karma-jasmine loads). Remove the unused per-test jasmine-core 2.x and root jasmine-core 6. 15 tests no longer need their own package.json or lockfile. - Move the execution and comparison tests from Babel 6 to Babel 7 with babel-loader 8 (the last version that supports webpack 4), installed once at the root. Drop babel-polyfill: Babel 7.18+ inlines the regenerator runtime. Regenerate the three Babel comparison snapshots. - Update README, AGENTS.md, knip.json and stale comments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: run execution tests in Node with Jasmine instead of Karma Each test's main.js is now built for Node (target: 'node', inline source map) using the module/resolve/resolveLoader settings from its webpack.config.js, the same parts Karma used, and the bundle is run with Jasmine 7 in-process. A test fails on build errors, failing specs, or no specs running. --watch rebuilds and re-runs specs in a fresh process; --debug still pauses on port 5858, now covering ts-loader and the specs. - Remove karma, karma-chrome-launcher, karma-jasmine, karma-mocha-reporter, karma-sourcemap-loader, karma-webpack, the per-test karma.conf.js files and test/karmaConfig.js. Add jasmine 7 and @types/jasmine 7. - Karma ran tests even when the build had errors, which hid two: - basic: fix `declare module externalLib` (TS1540 on TypeScript 7) to `declare namespace`. - resolveModuleName: the option is inert on the TypeScript 7 API, so skip it alongside loaderOptions until the API supports it. - allowJs-entryFileIsJs gets a main.js like the other tests. - CI no longer installs karma-webpack@4 for the webpack 4 runs. - Update README, AGENTS.md and knip.json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: run the comparison tests with Jasmine; remove mocha The comparison harness used mocha lightly (one describe, two its, a timeout and done callbacks), while the execution tests already use Jasmine. Standardise on Jasmine. - create-and-execute-test.js: the 90s timeout moves from this.timeout to it()'s third argument. Its arguments now follow Jasmine's `--` marker and are parsed strictly. - run-tests.js starts Jasmine with --random=false (keeps the transpileOnly run after the normal one) and --color, which picocolors also reads, so the colored snapshots are unchanged. - run-tests.js skips testLib (the library the npmLink test links to) and _IGNORE_ folders itself. Mocha passed them with zero specs; Jasmine reports that as incomplete. - Replace the hand-written mocha globals with @types/jasmine, remove mocha (16 packages), and update knip.json and .claude/settings.json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: address review of the test pack runners - --single-test now applies the same skips as a full run: test.json's minWebpack and the TypeScript 7 unsupported tests (execution), and testLib / _IGNORE_ folders (comparison, via a shared isRunnableTest). --watch, --debug and the VS Code launch config all use --single-test. - An invalid test.json (bad JSON, or minWebpack not a positive whole number) now fails that test instead of stopping the whole run, or silently never skipping on a string like "5.0.0". - run-specs.js deletes its temp folder from an 'exit' handler, so it is also removed when webpack.config.js or webpack() throws, and on SIGINT/SIGTERM/SIGHUP in watch mode. - README: with --watch, specs run in a fresh process, so breakpoints in the specs aren't hit under --debug (ones in src still are). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: keep execution test skip rules in test.json; tidy watch mode - The TypeScript 7 skips for loaderOptions and resolveModuleName move from a hard-coded map in run-tests.js into those tests' test.json, as `"skip": "<reason>"`. One isRunnableTest reads and validates test.json (minWebpack and skip) for both full and --single-test runs. - run-specs.js --watch stops the previous spec run as soon as webpack sees a change (so a stale run's output can't be mistaken for the new edit's, even if the rebuild fails), and before the temp folder is deleted on exit. - runTests no longer normalises the test name a second time; both callers pass a folder name. - README and AGENTS.md describe the test.json "skip" field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: harden the execution test runners - run-tests.js applies --match-test before reading test.json, so only the selected tests' test.json can skip or fail them. - run-specs.js exits once the specs finish (keeping the exit code), so a spec that leaves a timer or socket open can't hang the run, as Karma's single run couldn't. - The temp folder cleanup on exit no longer throws if the folder can't be removed (e.g. on Windows, when a stopped spec process still has the bundle open). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: don't let glob characters in paths hide the specs Jasmine treats spec paths as glob patterns, so a path containing `[` or `{` matched nothing and every test failed with "No specs found". - run-specs.js passes the bundle with addSpecFile (taken as-is) instead of execute([path]), for temp directories with such characters. - The comparison runner passes create-and-execute-test.js relative to the working directory, for checkouts with such characters (mocha took the path literally). - The comparison runner applies --match-test first, like the execution runner, so skip messages are only logged for the selected tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: upgrade the React execution tests to React 18 react, babel-react and pnpm move from React 15/16 to 18.3.1, the newest React that webpack 4 can still bundle. - React 18 drops the shallow renderer and react-addons-test-utils, so the specs render with react-dom/server's renderToStaticMarkup and compare the HTML, which also runs in plain Node. - App components are plain functions (React.SFC is gone from the types); the unused app entry files use createRoot. - react compiles JSX with "jsx": "react-jsx"; babel-react keeps "preserve" and uses @babel/preset-react's automatic runtime. - pnpm pins React 18.3.1 exactly, as its spec checks the resolved version, and its lockfile is regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: merge overlapping Babel execution tests; add inertLoaderOptions - babel-es2015 merges into babel-es2016: both put ts-loader's output through @babel/preset-env, so one TypeScript target covers them. All 7 specs are kept, in es2015.tests.ts and es2016.tests.ts (Jasmine 7 rejects duplicate top-level suite names, so each is named for what it checks). - babel-importCodeSplitting becomes babel-codeSplitting and takes the old babel-codeSplitting's require.ensure spec, so one test covers both ways webpack splits code. The old test's "a and b" spec duplicated one in app.tests.ts, so it isn't carried over. - New inertLoaderOptions test: a build that sets resolveModuleName, resolveTypeReferenceDirective and getCustomTransformers (accepted but unused on the TypeScript 7 API) still succeeds and runs. This keeps the backwards-compatibility promise covered while the resolveModuleName and loaderOptions tests are skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: share test.json skip rules between both test packs - New test/testConfig.js reads a test's test.json ("skip" reason and "minWebpack"), used by both runners. - The comparison runner's hard-coded skip list (projectReferences*, customTransformer*, nolib, tsconfigInvalidFile) becomes a test.json with the reason in each of those 23 tests, and the reason is printed when skipping. The unused, undocumented _IGNORE_ marker is replaced by "skip". --single-test now applies these skips too, and an invalid test.json fails that test. - Document the skip rules in the comparison README and AGENTS.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: retrigger checks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ode 26 (#1720) * feat: node 26 and README * docs: simple * docs: tweks * docs: tweks
… compiler process (#1726) * fix: report full error messages and option errors, and survive a dead compiler process - Include a diagnostic's message chain (the "Types of parameters ... are incompatible" lines) in the reported error. - Report compiler option errors and global diagnostics when type checking, not only with transpileOnly. - Restart the TypeScript compiler process if it has died, instead of failing every later build of a watch session. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s * fix: report an option error once with transpileOnly, not once per file as well transpileModule returns the project's option errors for every file it transpiles, on top of the single report from the program. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s * perf: don't read global diagnostics at the end of each build getGlobalDiagnostics() checks the whole program, which made a leaf-file rebuild of the 300-file benchmark project about 50% slower. Option errors come from getProgramDiagnostics(), which costs well under a millisecond. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s * docs: add the 10.0.0-beta.1 changelog entry Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s * fix: address review of the option error and restart changes - Keep the changed files owed to the recheck when the compiler process dies during it, so the next build still checks their dependants. - Tell the API about the config files on each rebuild, so a tsconfig.json change is picked up in watch mode when type checking. - With transpileOnly, report option errors on the compilation, once per build, instead of on a module that webpack may keep cached. - Keep the underlying error out of the restart warning's message; it is in the warning's details. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s * fix: recover from a tsconfig.json that was broken when the watch started The config file names were only recorded once a build got past parsing the config, so if the first build failed to parse it the API was never told the file had changed. The root config is now always named. Also keep the underlying error's stack in the restart warning's details. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s --------- Co-authored-by: Claude <noreply@anthropic.com>
* feat: restore the compilerOptions and context loader options v10 removed both because the project the native API opens from tsconfig.json can't take overrides. The API can parse a config from JSON against a chosen base directory, and can build a program from given options, so with either option set every file is compiled in ts-loader's synthetic program, built from the overridden config. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s * test: give the contextOption test a fixed instance name The default instance name is a hash of the loader options, which here hold absolute paths, so the snapshot only matched on the machine that generated it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s * docs: add the 10.0.0-beta.1 changelog entry Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s * fix: recheck unbundled files when context points the config elsewhere With overrides set, the end-of-build recheck took its anchor file from the project opened from tsconfig.json. Under `context` that project can hold no files, so a build that compiled nothing through the loader returned early and dropped the watcher's changes. Also point the 10.0.0-beta.0 changelog lines for both options at beta.1. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s --------- Co-authored-by: Claude <noreply@anthropic.com>
…aned source map options (#1728) * fix: emit declarations once per build, check new files, and drop orphaned source map options - With `declaration` or `composite`, every loader call emitted the declarations of every project file, a few API round trips each. A cold build of 300 files took 16s against 1.2s without `declaration`. They are now emitted in the end-of-build recheck, in one batched request, and only for files that were rechecked or have none yet. - A file created under the config's `include` that webpack doesn't bundle was never added to the project or checked. Each rebuild now tells the API about files the config newly includes, and the recheck covers project files it has not checked before. - When the `compilerOptions` loader option turns a source map option off, the tsconfig.json options that depend on it are dropped too, so the override alone doesn't produce TS5051 or TS5069. Adds a `declaration` scenario to the benchmark. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s * docs: add the changelog entry for #1728 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s * fix: give the API its own spelling of a newly included file On Windows the new-file test still reported nothing. The names came from the API's own config parse and were then passed through path.resolve, which turns them into backslashed paths; they are now sent back as the API spelled them. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s * fix: rescan when the config newly includes a file Naming the new file as created adds it to the project on Linux, but on Windows the program still didn't contain it afterwards, in either path spelling (checked with the test-probe workflow). A rebuild on which the config's file list has a file the program lacks now asks for the full rescan instead, as the first build does. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s * fix: address review of the declaration and new-file changes - Re-emit every declaration when the compiler options change. Only files touched by a rebuild were re-emitted, so a tsconfig.json change left the rest with declarations from the old options. - Don't rescan for a `files` entry that doesn't exist; it forced the full rescan on every rebuild. - Drop options orphaned by a `declaration: false` override as well, and say what the rule really is. - Emit declarations in batches of 1,000 files. - Describe the `declaration` fixtures in the benchmark README. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s * fix: drop options orphaned through an option that was itself dropped `declaration: false` on the loader dropped `declarationMap` but kept a `mapRoot` that then had nothing it needs (TS5069): an entry only fired when the override named one of its needed options. Options dropped along the way now count as turned off too. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s * fix: only chain orphaned options through options that were set An option the loop "dropped" without it ever being set was counted as turned off, so `declaration: false` on the loader hid the error from a tsconfig.json with `mapRoot` alone, which is invalid by itself. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s --------- Co-authored-by: Claude <noreply@anthropic.com>
…hanged (#1729) * perf: only parse the config for new files when a project folder has changed Looking for newly included files parsed the config on every rebuild, which lists every folder: about 2 to 6ms per rebuild on Windows for the 300-file benchmark fixture. Creating a file changes its folder's modified time, so the parse now runs only when one of the project's folders has changed since the last rebuild. The folders are each project file's folder and its parents up to the config's, so a new folder is noticed through its parent. Also builds the set of known file names once per snapshot update, and only on the first update of a rebuild. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s * docs: add the changelog entry for #1729 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s * test: don't name the new folder so that its Windows path contains "\n" The comparison harness turns "\n" in the output into a line break, so `src\nested\created.ts` was reported as two lines on Windows and the snapshot didn't match. The detection itself worked there. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s * fix: watch every folder under the config's, not only those with project files A file created in a folder that held no project file was never detected: `include` matches such folders, and creating a file there changes only that folder's modified time. The folder check now covers every folder under the config file's (skipping node_modules and .git), lists a changed folder again to pick up new subfolders, and answers "may have changed" whenever it can't cover the project: a project file outside the config's folder, a link to a folder, or more than 5,000 folders. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s * perf: leave webpack's output folder out of the folder check, and don't repeat a failed walk - The output folder gains files on rebuilds (hashed file names, new declaration files), and each time that meant a config parse. It is now left out of the walk unless a project file lives in it. - When the tree can't be watched (a link to a folder, or more than 5,000 folders), every change to the file list walked it again up to the same obstacle. The failure is now remembered for the life of the instance. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s --------- Co-authored-by: Claude <noreply@anthropic.com>
Bumps package.json and package-lock.json, and lists the changelog's 10.0.0-beta.1 entries in pull request order. Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s Co-authored-by: Claude <noreply@anthropic.com>
…TypeScript is needed (#1731) * fix: keep type errors with webpack's persistent cache, and say which TypeScript is needed - With `cache: { type: 'filesystem' }`, a build that compiled some files and restored the rest from the cache lost the type errors of the restored files, so it could pass with type errors in it. ts-loader removed every one of its errors from the compilation and added back only those of files it had checked in this process. An error now stays unless there is a newer result for its file, and a restored module that holds errors is checked again, so an error that has since been fixed goes away. - When `<compiler>/sync` can't be loaded, the error says ts-loader needs TypeScript 7.1 or later, names the version found, and points to ts-loader 9. - The comparison tests can build each patch with a new compiler (`"newCompilerPerPatch": true` in test.json), which is what the new `persistentCacheErrors` test needs. - Docs: the README agrees with the changelog on custom resolvers, and the changelog's typos are fixed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7KE1bjzna58YWvRY9X * docs: add the changelog entry for #1731 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7KE1bjzna58YWvRY9X * fix: check every module restored from the cache, and keep the version hint for old TypeScript - A module webpack restored from its persistent cache was only checked again if it held errors. One that was clean when cached could have gained an error through a file it reaches only by type-only imports, which webpack doesn't rebuild it for. Every restored module this instance compiled is now checked again, once per process. The instance is recorded in the module's buildInfo, which the cache keeps. - The "needs TypeScript 7.1 or later" message is now only given when the compiler is older than 7.1 or its version can't be read. A new enough compiler that fails to load gets the load error alone. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7KE1bjzna58YWvRY9X --------- Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q2Jv7Jh6FzBgr2QVLfdhZT Co-authored-by: Claude <noreply@anthropic.com>
* docs: add an example with fork-ts-checker-webpack-plugin Shows ts-loader 10.0.0-beta.1 with transpileOnly and fork-ts-checker-webpack-plugin 10.0.0-alpha.1 doing the type checking, both on TypeScript 7.1. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s * docs: rely on ts-loader detecting the plugin in the example Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Hy1wFAdZGjgdkBM1s --------- Co-authored-by: Claude <noreply@anthropic.com>
… Windows and the minimum Node.js version (#1734) * perf: stop per-file work growing with the project; fix reportFiles on Windows and the minimum Node.js version - The project's source file list is fetched once while it can't have changed, not twice for every compiled file. - A file whose contents the TypeScript API already holds no longer gets a snapshot update of its own. - reportFiles patterns with a folder in them match on Windows: picomatch is told the platform, which it only detects when given options. - typescript/sync is an ES module, which require() loads from Node.js 22.12, so that is the minimum; an older Node.js gets an error saying so. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * docs: changelog for #1734 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: address review - keep compiled files layered, check every program, and smaller fixes - A file whose snapshot update is skipped still has its contents layered, in the next update anything else needs; the end-of-build recheck no longer re-reads it from disk. - The update is only skipped when every program holding the file has the same text, not just one of them. - reportFiles: the path is given forward slashes on Windows, leaving picomatch's options alone, so a pattern can still escape with a backslash. - The Node.js version error is only given on a Node.js older than 22.12. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * docs: changelog - say which reportFiles patterns stop matching on Windows, and where the speed-up doesn't reach Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: show the Node.js version error, and keep deferred file layers if an update fails - typescript/fs was required by a top-level import, so an old Node.js failed with the bare ERR_REQUIRE_ESM before the version check ran. Both TypeScript modules are now loaded together, inside the guarded load. - unsentFileLayers is cleared once the snapshot update carrying it has returned, not while the request is built. - New comparison test: a file changed by another loader, compiled after one that reached ts-loader unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: name the module that failed to load; docs: reportFiles patterns use forward slashes - When <compiler>/fs fails to load, the error names it, not <compiler>/sync. - README and CHANGELOG: reportFiles patterns are written with / on every platform, and * does not cross folders. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: give a restarted compiler process the file contents the old one had Every compiled file's layered contents are kept, and all of them are owed to the new process after a restart. Before, a file changed by another loader, or not on disk, was read from disk by the new process unless it was compiled again. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: after a restart, only resend file contents that aren't on disk, and never a removed file's - fileLayers keeps a file's layer only when it was compiled with contents that aren't on disk; a restarted process reads the rest for itself. - Layers are keyed by canonical path, and a removed file's layers are dropped in every snapshot update, whichever suffix they carry. - The Node.js version message is given on any load failure below 22.12. - New watch test: a loader-changed file is deleted, then the process dies. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * chore: don't export FileLayer, which nothing outside types.ts uses Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: forget a file removed in the rebuild that finds the compiler process dead - A removal still waiting to be passed on when the process is restarted is applied to the file layers first, so the new process isn't handed the file. - On a Node.js older than 22.12, the error also says when TypeScript is too old, so both are learnt at once. - README and CHANGELOG: the compiler option's package must provide <compiler>/fs as well as <compiler>/sync. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: don't hand a restarted process a file that is gone, and keep the layer of a file that isn't the removed one - On a restart, a layer whose file is no longer on disk is dropped. webpack 4 never says which files were removed, so this is its only chance. - A removed name with .ts or .tsx appended only matches a layer whose own name isn't a file on disk, and never the file being compiled. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: ask webpack's file system whether a layered file exists, and smaller fixes - A restart checks a layer's file through webpack's input file system, not the disk, so a file that only exists there keeps its layer; the check now covers layers that were still unsent too. - A file saved with a byte order mark is no longer taken as changed by another loader. - Comments: projectFileNamesCache depends on sourceFileNamesCache being cleared. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: on webpack 4, notice a deleted file that TypeScript had been sent webpack 4 never says which files were removed, so the TypeScript process went on seeing a deleted file once it had been layered: imports of it raised no error. This is also the case on next. Nothing the API offers makes the process see such a file as gone and still notice it coming back (a deleted notification doesn't undo a layer, and a layer's removedPaths hides the file for good). So when a rebuild finds a layered file gone, the process is replaced by a new one, which reads the disk as it is. A process that has been sent nothing yet just isn't sent it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: clearer load errors, and compare a file with webpack's copy of it - On a Node.js older than 22.12, the error also says when the compiler package can't be found. - A compiler package whose /sync or /fs lacks the export ts-loader needs is refused when it is loaded, naming the module, not later with a TypeError. - A file's contents are compared with what webpack's input file system holds, not with the disk, to decide whether a restart has to resend them. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J --------- Co-authored-by: Claude <noreply@anthropic.com>
* perf: stop per-file work growing with the project; fix reportFiles on Windows and the minimum Node.js version - The project's source file list is fetched once while it can't have changed, not twice for every compiled file. - A file whose contents the TypeScript API already holds no longer gets a snapshot update of its own. - reportFiles patterns with a folder in them match on Windows: picomatch is told the platform, which it only detects when given options. - typescript/sync is an ES module, which require() loads from Node.js 22.12, so that is the minimum; an older Node.js gets an error saying so. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * docs: changelog for #1734 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: address review - keep compiled files layered, check every program, and smaller fixes - A file whose snapshot update is skipped still has its contents layered, in the next update anything else needs; the end-of-build recheck no longer re-reads it from disk. - The update is only skipped when every program holding the file has the same text, not just one of them. - reportFiles: the path is given forward slashes on Windows, leaving picomatch's options alone, so a pattern can still escape with a backslash. - The Node.js version error is only given on a Node.js older than 22.12. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * docs: changelog - say which reportFiles patterns stop matching on Windows, and where the speed-up doesn't reach Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: show the Node.js version error, and keep deferred file layers if an update fails - typescript/fs was required by a top-level import, so an old Node.js failed with the bare ERR_REQUIRE_ESM before the version check ran. Both TypeScript modules are now loaded together, inside the guarded load. - unsentFileLayers is cleared once the snapshot update carrying it has returned, not while the request is built. - New comparison test: a file changed by another loader, compiled after one that reached ts-loader unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: name the module that failed to load; docs: reportFiles patterns use forward slashes - When <compiler>/fs fails to load, the error names it, not <compiler>/sync. - README and CHANGELOG: reportFiles patterns are written with / on every platform, and * does not cross folders. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: give a restarted compiler process the file contents the old one had Every compiled file's layered contents are kept, and all of them are owed to the new process after a restart. Before, a file changed by another loader, or not on disk, was read from disk by the new process unless it was compiled again. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: after a restart, only resend file contents that aren't on disk, and never a removed file's - fileLayers keeps a file's layer only when it was compiled with contents that aren't on disk; a restarted process reads the rest for itself. - Layers are keyed by canonical path, and a removed file's layers are dropped in every snapshot update, whichever suffix they carry. - The Node.js version message is given on any load failure below 22.12. - New watch test: a loader-changed file is deleted, then the process dies. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * chore: don't export FileLayer, which nothing outside types.ts uses Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: forget a file removed in the rebuild that finds the compiler process dead - A removal still waiting to be passed on when the process is restarted is applied to the file layers first, so the new process isn't handed the file. - On a Node.js older than 22.12, the error also says when TypeScript is too old, so both are learnt at once. - README and CHANGELOG: the compiler option's package must provide <compiler>/fs as well as <compiler>/sync. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: don't hand a restarted process a file that is gone, and keep the layer of a file that isn't the removed one - On a restart, a layer whose file is no longer on disk is dropped. webpack 4 never says which files were removed, so this is its only chance. - A removed name with .ts or .tsx appended only matches a layer whose own name isn't a file on disk, and never the file being compiled. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: ask webpack's file system whether a layered file exists, and smaller fixes - A restart checks a layer's file through webpack's input file system, not the disk, so a file that only exists there keeps its layer; the check now covers layers that were still unsent too. - A file saved with a byte order mark is no longer taken as changed by another loader. - Comments: projectFileNamesCache depends on sourceFileNamesCache being cleared. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: on webpack 4, notice a deleted file that TypeScript had been sent webpack 4 never says which files were removed, so the TypeScript process went on seeing a deleted file once it had been layered: imports of it raised no error. This is also the case on next. Nothing the API offers makes the process see such a file as gone and still notice it coming back (a deleted notification doesn't undo a layer, and a layer's removedPaths hides the file for good). So when a rebuild finds a layered file gone, the process is replaced by a new one, which reads the disk as it is. A process that has been sent nothing yet just isn't sent it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * fix: clearer load errors, and compare a file with webpack's copy of it - On a Node.js older than 22.12, the error also says when the compiler package can't be found. - A compiler package whose /sync or /fs lacks the export ts-loader needs is refused when it is loaded, naming the module, not later with a TypeError. - A file's contents are compared with what webpack's input file system holds, not with the disk, to decide whether a restart has to resend them. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * chore: tidy stale docs and packaging leftovers - AGENTS.md: drop the Windows test probe section, which described workflows that no longer exist and never closed its code fence; point to the test probe workflow that replaced it. - Remove the SourceMapConsumer capability check: source-map ^0.8.0 always has destroy(). - Publish dist without sourceMappingURL comments (a prepack step): the maps they pointed at were never in the package. - Remove .npmignore: package.json's files list decides what is published. - README: say which tests run on which Node.js, TypeScript and webpack. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * chore: publish source maps in place of the prepack step The published dist files now come with their .js.map files, which carry the TypeScript source (inlineSources), so the sourceMappingURL comments point at real files and nothing has to be rebuilt at publish time. Declaration maps are no longer emitted: they would point at src, which isn't published. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J * chore: go back to not publishing source maps Typical consumers never read them, and they more than doubled the package. package.json and src/tsconfig.json are as they are on next again. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7FZNpjZXugLojvCi1J --------- Co-authored-by: Claude <noreply@anthropic.com>
…ess is replaced (#1741) * fix: type check virtual modules, and builds after the TypeScript process is replaced Fixes the cases left open by #1734. - #1735: a file TypeScript can only get from ts-loader (a virtual module) isn't there for an importer compiled before it. The importer's failed import is now remembered, and the end-of-build recheck checks it again once such a file has been layered. A file webpack's watcher reports as removed while its input file system still has it is no longer treated as removed. - #1736: a layer is only dropped as "missing" when webpack's file system had the file and now says it is absent; a failed stat that isn't ENOENT/ENOTDIR no longer counts. Whether a restarted process must be sent a file again is decided by what is on disk, which is what the process reads, not by webpack's input file system. - #1737: each layer records webpack's own name for its file, so a deleted `x.ts` is noticed with a file `x` beside it. - #1738: the webpack 4 deleted-file check also runs before the end-of-build recheck, which opens the project itself when the process has just been replaced. - #1739: a replaced process keeps the files compiled outside the tsconfig as roots, and their program is made again by the next such file compiled or by the end-of-build recheck. Closes #1735, closes #1736, closes #1737, closes #1738, closes #1739 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * fix: only check an importer again when its import was an error A re-check of every importer whose import had no resolved file also took in imports answered by an ambient declaration (declare module '*.vue'), and swapped the declared type for the layered file's. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * docs: changelog link for #1741 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * fix: keep a Vue file's script and template apart, and watch real files only - vue-loader sends the script and the compiled template of a .vue file through ts-loader as the same file. Both were given to TypeScript under one name, so whichever was compiled last was what an import of the file resolved to, and the template has no default export (TS1192). The script keeps the file's name; any other block gets its own. - A name only TypeScript knows (a suffix added by appendTsSuffixTo or for a file without a TypeScript extension) was handed to webpack to watch. It names no file, so webpack reported it removed after the first build: an extra rebuild, and TypeScript told to forget the file. webpack is now given the file the layer was compiled from. - A module depends on its own file, not on the suffixed name, so it is rebuilt when the file changes. - Removed files are matched to layers by the name webpack compiled them under, since one file can now have several layers. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * fix: address review - Vue blocks of a deleted file, a recheck with no config file, and virtual files - A removed or changed file is passed on to TypeScript under the name of every layer it has, so a deleted .vue file's template goes with its script. A removed layer is no longer a root of the synthetic program, and a name ts-loader made up is hidden from TypeScript, which otherwise finds the layer again when it next lists the directory. - A block of a file gets no declaration file of its own. - The end-of-build recheck picks the file it opens the project with before it takes what changed, and falls back to a file compiled outside the tsconfig, so a project whose tsconfig lists no existing file doesn't lose a recheck it is owed. - A file is known to be virtual from when it was compiled. webpack's file system is no longer asked about files reported removed: that left "no such file" in its cache, and a file put back could not be resolved. Such a file is neither removed nor changed, so it no longer counts as created or has its dependants rechecked on every rebuild, and a rename that only changes case is a removal again. - A file whose text TypeScript already read from disk isn't read from disk a second time. - Test plugin: function declarations for named helpers. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * fix: address re-review - hide only made-up names, forget removed virtual files and roots - Only a layer whose name ts-loader made up is hidden from TypeScript when its file is removed. The check was "not on disk", which is true of any file that was just deleted. - A virtual file the watcher reports removed is passed on once webpack's file system no longer has it. That file system is asked afresh, and a "no such file" answer is not left in its cache. - A root of the synthetic program that the process has no layer for is dropped once it is gone from disk, so a file deleted after a restart doesn't stay a root. - The disk read is only skipped for a file this process was never given a layer for: TypeScript keeps the layer of a file ts-loader has dropped its own record of. - Removed layers are hidden before the end-of-build recheck, which checks their importers again: one compiled earlier in that build saw the layer. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * fix: address third review - Vue blocks that go away, and what is watched while one is removed - A block that no module of the build asks for is forgotten like a removed file's: a .vue file that loses its template no longer keeps the template's layer and errors for the rest of the watch. - A block's errors are reported under the name its compile gave them in the end-of-build recheck too, not under the block's made-up name. - With transpileOnly and isolatedDeclarations, a block's declarations are not emitted: they went to the same asset path as the script's. - The name of a layer whose file was removed is not handed to webpack to watch in the build before the layer is hidden. - The importers of hidden layers stay owed a recheck when the recheck returns early on config errors. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * fix: address fourth review - keep a block whose module only left the build, and smaller fixes - A block that no module asks for is only forgotten in a build that compiled another part of its file. One whose module merely left the build is kept: webpack brings the module back from its cache without running the loaders, and its errors were never reported again. - A forgotten block is also taken out of the files a failed recheck left owed, one of which the next recheck opens the project with. - TS2882, the "cannot find module" of a side-effect import, counts as a missing import that a new layer-only file may satisfy. - Removed layer names are kept by canonical path, so a name the API spells in another case is still recognised on Windows. - webpack's file system is only purged for a virtual file it no longer has: webpack-virtual-modules replaces purge with one that empties the whole cache. - A stat error with no code means the file is missing, as it did before this pull request; only an error with another code is "can't tell". Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * test: a side-effect import of a virtual module, from a file with no other failing import Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * refactor: split the handling of separate Vue blocks out of this pull request Giving a .vue file's template a TypeScript name of its own, and all that follows from it (forgetting a block, hiding removed layers, declarations and error names for blocks), moves to a pull request of its own on top of this one. Four review rounds found problems in each other's fixes there, and none in the rest. Stays: the fixes for #1735 to #1739, virtual modules, watching the real file in place of a name only TypeScript knows, and a module depending on its own file. vueScriptWatch covers those last two with a script block alone; the four tests about blocks go with the code. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * fix: address fifth review - a file outside the tsconfig that is deleted and put back - When such a file's root is dropped because the file is gone, the synthetic program is reconfigured by the end-of-build recheck, with or without config overrides. It kept listing the missing root. - A file compiled again after that is added as a root again. The stale program still held it, so it was taken to be in the program, and then reconfigured out of it: it was compiled, but not found as a dependant when a type it imports changed. - The recheck doesn't open the project with a file of the synthetic program while a new process has no such program yet. - The webpack 4 check for a layered file that has gone leaves no "no such file" answer in webpack's file system cache. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv --------- Co-authored-by: Claude <noreply@anthropic.com>
* fix: type check virtual modules, and builds after the TypeScript process is replaced Fixes the cases left open by #1734. - #1735: a file TypeScript can only get from ts-loader (a virtual module) isn't there for an importer compiled before it. The importer's failed import is now remembered, and the end-of-build recheck checks it again once such a file has been layered. A file webpack's watcher reports as removed while its input file system still has it is no longer treated as removed. - #1736: a layer is only dropped as "missing" when webpack's file system had the file and now says it is absent; a failed stat that isn't ENOENT/ENOTDIR no longer counts. Whether a restarted process must be sent a file again is decided by what is on disk, which is what the process reads, not by webpack's input file system. - #1737: each layer records webpack's own name for its file, so a deleted `x.ts` is noticed with a file `x` beside it. - #1738: the webpack 4 deleted-file check also runs before the end-of-build recheck, which opens the project itself when the process has just been replaced. - #1739: a replaced process keeps the files compiled outside the tsconfig as roots, and their program is made again by the next such file compiled or by the end-of-build recheck. Closes #1735, closes #1736, closes #1737, closes #1738, closes #1739 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * fix: only check an importer again when its import was an error A re-check of every importer whose import had no resolved file also took in imports answered by an ambient declaration (declare module '*.vue'), and swapped the declared type for the layered file's. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * docs: changelog link for #1741 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * fix: keep a Vue file's script and template apart, and watch real files only - vue-loader sends the script and the compiled template of a .vue file through ts-loader as the same file. Both were given to TypeScript under one name, so whichever was compiled last was what an import of the file resolved to, and the template has no default export (TS1192). The script keeps the file's name; any other block gets its own. - A name only TypeScript knows (a suffix added by appendTsSuffixTo or for a file without a TypeScript extension) was handed to webpack to watch. It names no file, so webpack reported it removed after the first build: an extra rebuild, and TypeScript told to forget the file. webpack is now given the file the layer was compiled from. - A module depends on its own file, not on the suffixed name, so it is rebuilt when the file changes. - Removed files are matched to layers by the name webpack compiled them under, since one file can now have several layers. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * fix: address review - Vue blocks of a deleted file, a recheck with no config file, and virtual files - A removed or changed file is passed on to TypeScript under the name of every layer it has, so a deleted .vue file's template goes with its script. A removed layer is no longer a root of the synthetic program, and a name ts-loader made up is hidden from TypeScript, which otherwise finds the layer again when it next lists the directory. - A block of a file gets no declaration file of its own. - The end-of-build recheck picks the file it opens the project with before it takes what changed, and falls back to a file compiled outside the tsconfig, so a project whose tsconfig lists no existing file doesn't lose a recheck it is owed. - A file is known to be virtual from when it was compiled. webpack's file system is no longer asked about files reported removed: that left "no such file" in its cache, and a file put back could not be resolved. Such a file is neither removed nor changed, so it no longer counts as created or has its dependants rechecked on every rebuild, and a rename that only changes case is a removal again. - A file whose text TypeScript already read from disk isn't read from disk a second time. - Test plugin: function declarations for named helpers. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * fix: address re-review - hide only made-up names, forget removed virtual files and roots - Only a layer whose name ts-loader made up is hidden from TypeScript when its file is removed. The check was "not on disk", which is true of any file that was just deleted. - A virtual file the watcher reports removed is passed on once webpack's file system no longer has it. That file system is asked afresh, and a "no such file" answer is not left in its cache. - A root of the synthetic program that the process has no layer for is dropped once it is gone from disk, so a file deleted after a restart doesn't stay a root. - The disk read is only skipped for a file this process was never given a layer for: TypeScript keeps the layer of a file ts-loader has dropped its own record of. - Removed layers are hidden before the end-of-build recheck, which checks their importers again: one compiled earlier in that build saw the layer. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * fix: address third review - Vue blocks that go away, and what is watched while one is removed - A block that no module of the build asks for is forgotten like a removed file's: a .vue file that loses its template no longer keeps the template's layer and errors for the rest of the watch. - A block's errors are reported under the name its compile gave them in the end-of-build recheck too, not under the block's made-up name. - With transpileOnly and isolatedDeclarations, a block's declarations are not emitted: they went to the same asset path as the script's. - The name of a layer whose file was removed is not handed to webpack to watch in the build before the layer is hidden. - The importers of hidden layers stay owed a recheck when the recheck returns early on config errors. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * fix: address fourth review - keep a block whose module only left the build, and smaller fixes - A block that no module asks for is only forgotten in a build that compiled another part of its file. One whose module merely left the build is kept: webpack brings the module back from its cache without running the loaders, and its errors were never reported again. - A forgotten block is also taken out of the files a failed recheck left owed, one of which the next recheck opens the project with. - TS2882, the "cannot find module" of a side-effect import, counts as a missing import that a new layer-only file may satisfy. - Removed layer names are kept by canonical path, so a name the API spells in another case is still recognised on Windows. - webpack's file system is only purged for a virtual file it no longer has: webpack-virtual-modules replaces purge with one that empties the whole cache. - A stat error with no code means the file is missing, as it did before this pull request; only an error with another code is "can't tell". Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * test: a side-effect import of a virtual module, from a file with no other failing import Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * refactor: split the handling of separate Vue blocks out of this pull request Giving a .vue file's template a TypeScript name of its own, and all that follows from it (forgetting a block, hiding removed layers, declarations and error names for blocks), moves to a pull request of its own on top of this one. Four review rounds found problems in each other's fixes there, and none in the rest. Stays: the fixes for #1735 to #1739, virtual modules, watching the real file in place of a name only TypeScript knows, and a module depending on its own file. vueScriptWatch covers those last two with a script block alone; the four tests about blocks go with the code. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * fix: keep a Vue file's script and template apart vue-loader sends the script and the compiled template of a .vue file through ts-loader as the same file. Both were given to TypeScript under one name, so whichever was compiled last was what an import of the file resolved to, and the template has no default export (TS1192). The script keeps the file's name; any other block gets its own. With that come: - a removed or changed file is passed on under the name of every layer it has, and a removed layer whose name ts-loader made up is hidden from TypeScript, which otherwise finds it again; - a block that leaves its file is forgotten, in a build that compiled another part of the file; - no declarations are emitted for a block, and its errors are reported under the script's name. This is the part split out of #1741, as it stood there after four review rounds. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * docs: changelog link for #1743 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * fix: address fifth review - a file outside the tsconfig that is deleted and put back - When such a file's root is dropped because the file is gone, the synthetic program is reconfigured by the end-of-build recheck, with or without config overrides. It kept listing the missing root. - A file compiled again after that is added as a root again. The stale program still held it, so it was taken to be in the program, and then reconfigured out of it: it was compiled, but not found as a dependant when a type it imports changed. - The recheck doesn't open the project with a file of the synthetic program while a new process has no such program yet. - The webpack 4 check for a layered file that has gone leaves no "no such file" answer in webpack's file system cache. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv * fix: address review - keep a block's layer, and only its errors wait for a request - A block that no module of the build asks for is no longer forgotten. Its layer and errors are kept, and the errors are left out of the report while nothing asks for the block. Forgetting it relied on knowing which files a build compiled, which a failed recheck carries over from the build before, and on the block being compiled again, which webpack's cache can skip. - A block's errors go on the compilation only. Without appendTsSuffixTo they share a file name with the script's, and took their place on the module. - A removed layer is only hidden if its made-up name isn't also a real file's, and it is taken out of the files a failed recheck left owed. - A replaced process keeps the list of hidden layers whose importers are still to be checked again. - The recheck reads the primary project from the snapshot that is current after hiding removed layers. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7HXiQsLaoYG7G8eXfv --------- Co-authored-by: Claude <noreply@anthropic.com>
…or less (#1751) * refactor: remove duplication in src, and ask the TypeScript process for less No change in behaviour is intended. Fewer requests to the TypeScript process: - A compiled file's syntactic diagnostics, emit and semantic diagnostics go in one batched request, not three. - The end-of-build recheck asks for its files' diagnostics in batches, not two requests per file. - A program's config parsing diagnostics and config file names are asked for once per program, like its file list. All three are kept by Program object, which is new with every snapshot, so nothing has to be cleared. Less work per compiled file: - The project's declaration files are picked out once, when its files are classified, not on every loader call. - The synthetic program's roots are only sorted and serialized again when its config or its extra roots have changed. - The content hash of a declaration file is kept for as long as the API hands back the same source file. - The `reportFiles` matcher is compiled once per instance. - Loader options are looked up by the options object before anything is hashed. - Dependants are found from a map of importers, in one pass. Less code: - One function turns diagnostics into webpack errors (deduplicated, filtered, built). Six call sites spelled that out. - The path cache is on the TypeScript instance, not passed beside it. - Layers that differ from disk are a flag on the layer, not a fourth collection of them. - One function sends a snapshot update with the layers that are owed. - A project's cached file lists share one key. - Unused: TSInstance.version, the `cacheable()` call, the `EOL` re-export, `removePrograms` and a returned `primaryProjectPath`. isInDirectory no longer takes a directory whose name starts with `..` to be outside its parent. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7G54WY24fPQWbGxWgk * docs: changelog for #1751 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7G54WY24fPQWbGxWgk --------- Co-authored-by: Claude <noreply@anthropic.com>
…batched request (#1752) * perf: classify a program's files from their metadata, and bound every batched request getProjectFiles asked for the source file of every file in the program, default-lib and node_modules files included, to find out which of them are the project's own. Each of those requests sends the file's syntax tree. It now asks for the files' metadata, in batches. The two batches that resolve imports took one argument per file, and one per import of every file, with no upper bound. Node.js can't pass much over 100,000 arguments, which a large project's imports exceed when every file's imports are resolved again (after a full rescan, or when a file is created). Every batched request now goes through batchInChunks. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * perf: resolve a compiled file's imports in the request that compiles it The imports of each compiled file were resolved in two requests of their own, after the one for its diagnostics and output. They are now one more part of that request: resolveImports is a request that asks for the file's syntax tree and then for what each of its imports resolves to, and the API runs it beside the others. The end-of-build recheck resolves the imports of the files no loader call compiled through the same request, one per file. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * test: a project with more imports than Node.js can pass as arguments The manyImports comparison test type checks 420 files that webpack doesn't bundle, with 142,800 imports between them. Before the batches were bounded it failed with "Maximum call stack size exceeded". Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: changelog for #1752 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: how a comparison test can generate its files manyImports is the first test to do so. Also says to stage a new test before running it: the test script's clean step deletes untracked files. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: quote the benchmark workflow's numbers in the changelog The entry quoted timings from the machine the change was written on, which gains more from it than the CI runners do. On Ubuntu, macOS and Windows the benchmark workflow measured a 300-file cold build at 15 to 20% less time, and a rebuild after the hub file changes at 4 to 9% less. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * fix: bound the imports in a batch, not the files; address review From the review of #1752: - batchInChunks bounded how many files' imports went in a batch, and each file's request fanned out into one per import, so the 142,800 imports of the manyImports test still went in one message. The imports of many files are now resolved as one flat list, 1,000 to a message. resolveImports stays for the one file being compiled, and says that it takes that file's imports as arguments. - The end-of-build recheck's diagnostics and the declaration emit are stored a chunk at a time again, as on next. Storing them once every chunk had returned dropped the ones already received if the process died part-way. - manyImports generates 288,000 imports, over twice what Node.js 22 can pass as arguments; 142,800 was 10 to 14% over. - Changelog: a compiled file's imports took one more request, not two (the first of the two old batches found the file's syntax tree cached, and sent nothing); and the cold build figure is "up to about 20%", as one of two macOS runs showed no gain. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * chore: ignore the files the manyImports test generates Building the test in place, as the comparison test guide suggests, writes them beside its webpack.config.js, where they showed up as 600 untracked files. From the review of #1752. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 --------- Co-authored-by: Claude <noreply@anthropic.com>
* perf: classify a program's files from their metadata, and bound every batched request getProjectFiles asked for the source file of every file in the program, default-lib and node_modules files included, to find out which of them are the project's own. Each of those requests sends the file's syntax tree. It now asks for the files' metadata, in batches. The two batches that resolve imports took one argument per file, and one per import of every file, with no upper bound. Node.js can't pass much over 100,000 arguments, which a large project's imports exceed when every file's imports are resolved again (after a full rescan, or when a file is created). Every batched request now goes through batchInChunks. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * perf: resolve a compiled file's imports in the request that compiles it The imports of each compiled file were resolved in two requests of their own, after the one for its diagnostics and output. They are now one more part of that request: resolveImports is a request that asks for the file's syntax tree and then for what each of its imports resolves to, and the API runs it beside the others. The end-of-build recheck resolves the imports of the files no loader call compiled through the same request, one per file. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * test: a project with more imports than Node.js can pass as arguments The manyImports comparison test type checks 420 files that webpack doesn't bundle, with 142,800 imports between them. Before the batches were bounded it failed with "Maximum call stack size exceeded". Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * refactor: remove dead code No change in behaviour. - registerTypeScriptDependencies checked transpileOnly, but is only called once getTypeScriptEmit has returned for transpileOnly. - replaceTypeScriptApi filtered the orphan roots for ones that are gone, which forgetMissingFileLayers has just dropped. - TSFile.fileName was written and never read. - The instance cache had a stand-in key for a loader context with no compiler. getTypeScriptInstance taps that compiler's hooks, so there always is one; it now reads it once. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: changelog for #1752 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: how a comparison test can generate its files manyImports is the first test to do so. Also says to stage a new test before running it: the test script's clean step deletes untracked files. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: quote the benchmark workflow's numbers in the changelog The entry quoted timings from the machine the change was written on, which gains more from it than the CI runners do. On Ubuntu, macOS and Windows the benchmark workflow measured a 300-file cold build at 15 to 20% less time, and a rebuild after the hub file changes at 4 to 9% less. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * fix: bound the imports in a batch, not the files; address review From the review of #1752: - batchInChunks bounded how many files' imports went in a batch, and each file's request fanned out into one per import, so the 142,800 imports of the manyImports test still went in one message. The imports of many files are now resolved as one flat list, 1,000 to a message. resolveImports stays for the one file being compiled, and says that it takes that file's imports as arguments. - The end-of-build recheck's diagnostics and the declaration emit are stored a chunk at a time again, as on next. Storing them once every chunk had returned dropped the ones already received if the process died part-way. - manyImports generates 288,000 imports, over twice what Node.js 22 can pass as arguments; 142,800 was 10 to 14% over. - Changelog: a compiled file's imports took one more request, not two (the first of the two old batches found the file's syntax tree cached, and sent nothing); and the cold build figure is "up to about 20%", as one of two macOS runs showed no gain. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 --------- Co-authored-by: Claude <noreply@anthropic.com>
…ck into steps (#1754) * perf: classify a program's files from their metadata, and bound every batched request getProjectFiles asked for the source file of every file in the program, default-lib and node_modules files included, to find out which of them are the project's own. Each of those requests sends the file's syntax tree. It now asks for the files' metadata, in batches. The two batches that resolve imports took one argument per file, and one per import of every file, with no upper bound. Node.js can't pass much over 100,000 arguments, which a large project's imports exceed when every file's imports are resolved again (after a full rescan, or when a file is created). Every batched request now goes through batchInChunks. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * perf: resolve a compiled file's imports in the request that compiles it The imports of each compiled file were resolved in two requests of their own, after the one for its diagnostics and output. They are now one more part of that request: resolveImports is a request that asks for the file's syntax tree and then for what each of its imports resolves to, and the API runs it beside the others. The end-of-build recheck resolves the imports of the files no loader call compiled through the same request, one per file. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * refactor: name what was spelled out in several places No change in behaviour is intended. - getPrimaryProgram and getOrphanProgram look a snapshot's programs up. - parseProjectConfig is the project's config with the loader options' overrides, if any. transpileOnly now takes the overridden config from the same per-build cache as type checking does. - buildLoaderErrors builds a compiled file's errors for its module. - addConfigDependency, toAssetPath and closeTypeScriptApi each replace a pair of copies; getOrCreate replaces five get-then-set blocks. - The two path cache functions differed in one expression, and are one. - The modules of a build are indexed by file once, not once for the recheck and again for reporting. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * test: a project with more imports than Node.js can pass as arguments The manyImports comparison test type checks 420 files that webpack doesn't bundle, with 142,800 imports between them. Before the batches were bounded it failed with "Maximum call stack size exceeded". Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * refactor: remove dead code No change in behaviour. - registerTypeScriptDependencies checked transpileOnly, but is only called once getTypeScriptEmit has returned for transpileOnly. - replaceTypeScriptApi filtered the orphan roots for ones that are gone, which forgetMissingFileLayers has just dropped. - TSFile.fileName was written and never read. - The instance cache had a stand-in key for a loader context with no compiler. getTypeScriptInstance taps that compiler's hooks, so there always is one; it now reads it once. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * refactor: split the end-of-build recheck into its steps recheckAllTransitiveDependants was 290 lines doing six things in a row. It now reads as those steps: find a file to open the project with, bring the programs up to date, collect the files to check, check them, emit the declarations that may have changed, and forget the files that are gone. The code of each step is as it was. One thing moves: the names of the layers hidden since the last recheck are now taken once the programs are up to date, not just before the orphan program is. Nothing between the two points adds to them, so the files checked are the same; if bringing the orphan program up to date throws, they are now kept for the next recheck. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: changelog for #1752 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: how a comparison test can generate its files manyImports is the first test to do so. Also says to stage a new test before running it: the test script's clean step deletes untracked files. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: quote the benchmark workflow's numbers in the changelog The entry quoted timings from the machine the change was written on, which gains more from it than the CI runners do. On Ubuntu, macOS and Windows the benchmark workflow measured a 300-file cold build at 15 to 20% less time, and a rebuild after the hub file changes at 4 to 9% less. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * fix: bound the imports in a batch, not the files; address review From the review of #1752: - batchInChunks bounded how many files' imports went in a batch, and each file's request fanned out into one per import, so the 142,800 imports of the manyImports test still went in one message. The imports of many files are now resolved as one flat list, 1,000 to a message. resolveImports stays for the one file being compiled, and says that it takes that file's imports as arguments. - The end-of-build recheck's diagnostics and the declaration emit are stored a chunk at a time again, as on next. Storing them once every chunk had returned dropped the ones already received if the process died part-way. - manyImports generates 288,000 imports, over twice what Node.js 22 can pass as arguments; 142,800 was 10 to 14% over. - Changelog: a compiled file's imports took one more request, not two (the first of the two old batches found the file's syntax tree cached, and sent nothing); and the cold build figure is "up to about 20%", as one of two macOS runs showed no gain. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 --------- Co-authored-by: Claude <noreply@anthropic.com>
* perf: classify a program's files from their metadata, and bound every batched request getProjectFiles asked for the source file of every file in the program, default-lib and node_modules files included, to find out which of them are the project's own. Each of those requests sends the file's syntax tree. It now asks for the files' metadata, in batches. The two batches that resolve imports took one argument per file, and one per import of every file, with no upper bound. Node.js can't pass much over 100,000 arguments, which a large project's imports exceed when every file's imports are resolved again (after a full rescan, or when a file is created). Every batched request now goes through batchInChunks. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * perf: resolve a compiled file's imports in the request that compiles it The imports of each compiled file were resolved in two requests of their own, after the one for its diagnostics and output. They are now one more part of that request: resolveImports is a request that asks for the file's syntax tree and then for what each of its imports resolves to, and the API runs it beside the others. The end-of-build recheck resolves the imports of the files no loader call compiled through the same request, one per file. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * refactor: name what was spelled out in several places No change in behaviour is intended. - getPrimaryProgram and getOrphanProgram look a snapshot's programs up. - parseProjectConfig is the project's config with the loader options' overrides, if any. transpileOnly now takes the overridden config from the same per-build cache as type checking does. - buildLoaderErrors builds a compiled file's errors for its module. - addConfigDependency, toAssetPath and closeTypeScriptApi each replace a pair of copies; getOrCreate replaces five get-then-set blocks. - The two path cache functions differed in one expression, and are one. - The modules of a build are indexed by file once, not once for the recheck and again for reporting. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * test: a project with more imports than Node.js can pass as arguments The manyImports comparison test type checks 420 files that webpack doesn't bundle, with 142,800 imports between them. Before the batches were bounded it failed with "Maximum call stack size exceeded". Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * refactor: remove dead code No change in behaviour. - registerTypeScriptDependencies checked transpileOnly, but is only called once getTypeScriptEmit has returned for transpileOnly. - replaceTypeScriptApi filtered the orphan roots for ones that are gone, which forgetMissingFileLayers has just dropped. - TSFile.fileName was written and never read. - The instance cache had a stand-in key for a loader context with no compiler. getTypeScriptInstance taps that compiler's hooks, so there always is one; it now reads it once. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * refactor: split the end-of-build recheck into its steps recheckAllTransitiveDependants was 290 lines doing six things in a row. It now reads as those steps: find a file to open the project with, bring the programs up to date, collect the files to check, check them, emit the declarations that may have changed, and forget the files that are gone. The code of each step is as it was. One thing moves: the names of the layers hidden since the last recheck are now taken once the programs are up to date, not just before the orphan program is. Nothing between the two points adds to them, so the files checked are the same; if bringing the orphan program up to date throws, they are now kept for the next recheck. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: correct and de-duplicate comments in src Comments only; no code changes. Corrected: - The inert loader options are four, not two; the note on them named only resolveModuleName and resolveTypeReferenceDirective, and pointed at a test that covers one of them. - The note on why changed directories are listed again sat in the branch taken when listing them fails. - colors.ts said both variants are built up front; one is built on demand. - The benchmark README named a file and four functions of ts-loader 9. Said once instead of several times: why API and webpack file names are compared through toComparablePath, why a node_modules file has to be a root, the three ways the API is told what changed, and when diagnostics are reported. Each now points at the place that explains it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: changelog for #1752 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: how a comparison test can generate its files manyImports is the first test to do so. Also says to stage a new test before running it: the test script's clean step deletes untracked files. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: quote the benchmark workflow's numbers in the changelog The entry quoted timings from the machine the change was written on, which gains more from it than the CI runners do. On Ubuntu, macOS and Windows the benchmark workflow measured a 300-file cold build at 15 to 20% less time, and a rebuild after the hub file changes at 4 to 9% less. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * fix: bound the imports in a batch, not the files; address review From the review of #1752: - batchInChunks bounded how many files' imports went in a batch, and each file's request fanned out into one per import, so the 142,800 imports of the manyImports test still went in one message. The imports of many files are now resolved as one flat list, 1,000 to a message. resolveImports stays for the one file being compiled, and says that it takes that file's imports as arguments. - The end-of-build recheck's diagnostics and the declaration emit are stored a chunk at a time again, as on next. Storing them once every chunk had returned dropped the ones already received if the process died part-way. - manyImports generates 288,000 imports, over twice what Node.js 22 can pass as arguments; 142,800 was 10 to 14% over. - Changelog: a compiled file's imports took one more request, not two (the first of the two old batches found the file's syntax tree cached, and sent nothing); and the cold build figure is "up to about 20%", as one of two macOS runs showed no gain. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 --------- Co-authored-by: Claude <noreply@anthropic.com>
) The line under the benchmark table named the two sides by their paths on the runner, which are the same on every run, and the base's ended in "-main" whatever branch the pull request targets. On a pull request against `next` that read as a comparison with `main`. It was not: the worktree holds the pull request's base commit. - The line now says what each side is: the head commit and the branch it is merged into, and the base branch and its commit. run-benchmark.mts takes them as --description-a/--description-b and falls back to the paths, which are what a local run wants. - The base's worktree is "$ROOT-base". - The line said "2 warmup + 10 measured iterations per scenario". A cold build scenario measures up to 60 and a rebuild one up to 200; it now gives those. - A run started by hand compared with origin/main, which is not the base of a branch off `next`. It takes a `base` input, a branch, tag or commit, that defaults to this file's own branch. - README: the two new flags, and that a pull request's percentages are against its own base, so those of two pull requests don't compare. Claude-Session: https://claude.ai/code/session_01Q2Jv7KnFavDVeKUKPTjSKZ Co-authored-by: Claude <noreply@anthropic.com>
* perf: stop reading every recompiled file from disk on a rebuild Since #1741, layerFileContents reads each compiled file from disk to tell whether its contents are what the disk holds, which decides what a restarted TypeScript process has to be sent again and which files are virtual. It only skipped the read for a file the API had read itself and had never been given, which covers a cold build. In a rebuild every compiled file has been given to the API before, so each one was read: after a change to a widely imported file, that is every file that imports it. On the 300-file benchmark fixture it was 158 reads per rebuild, where #1734 made none. A file's copy on disk is now only looked at when it can have changed: the first time the file is compiled, when the text webpack hands over differs from the last time, or when webpack's watcher has reported the file since. Otherwise the answers of the last compile are kept. Without the watcher's list (the first build, webpack 4, a second run of the same compiler) nothing is kept, as before. A file compiled under a name ts-loader made up is always looked at: webpack doesn't watch a file of that name. The new comparison test compiles a file as it is on disk, then again after an edit that another loader undoes, so the same text arrives while the disk differs, and then restarts the TypeScript process. It fails if the watcher's report is ignored. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7KnFavDVeKUKPTjSKZ * docs: benchmark figures for #1756 The benchmark workflow's first run on the pull request had the rebuild after the hub file changes at -2.7% (Ubuntu), -18.2% (macOS) and -8.5% (Windows), and with all orphan files at -2.2%, -7.5% and -6.1%. The changelog entry and the comment in layerFileContents now say what the reads cost. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7KnFavDVeKUKPTjSKZ * fix: address review - only a file found on disk is remembered From an independent review of the change for cases where it computes something `next` wouldn't: - A look-up that fails is not remembered. A file that couldn't be read, or that webpack's file system didn't have as a file, was kept as such until the watcher reported it; `next` asks again at the next compile. The set now only holds files that were found on disk, so it is `filesSeenOnDisk`, and a file that isn't on disk (a virtual module) is looked at on every compile, as on `next`. - A layer under a name ts-loader made up takes the name out of the set. A real file of that name, compiled as a module, could have put it there (`schema.graphql.ts` beside `schema.graphql`), and the made-up layer would then have passed for it. - The comments say which files are skipped: those that were on disk under the name webpack watches them by. The review's one case with a visible effect is the limit the pull request already describes: a file the watcher isn't watching, changed on disk in a way another loader undoes, and then a restart of the TypeScript process. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7KnFavDVeKUKPTjSKZ * docs: benchmark figures over three runs Three runs of the benchmark workflow on the pull request had the rebuild after the hub file changes at -1.0% to -2.7% on Ubuntu, -9.0% to -18.2% on macOS and -5.9% to -8.5% on Windows, and with all orphan files at -1.4% to -2.2%, -6.7% to -7.5% and -4.7% to -6.1%. The changelog said 6% to 18% and 2% to 3%, from the first run alone. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7KnFavDVeKUKPTjSKZ --------- Co-authored-by: Claude <noreply@anthropic.com>
…building (#1759) No change in behaviour. - The list of valid loader options repeated the keys of LoaderOptions with nothing between the two. It is now the keys of an object checked against that type, so an option added to one and not the other fails to compile. The order, which the error message shows, is unchanged. - buildTypeScriptError asked three times whether there is a fallback file, and turned a position into a location twice. - makeSourceMapAndFinish set the module's meta on both of its paths; it does so once. The function stays as it is otherwise: its name is a frame of the stack trace that a test pins, which now says so. Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 Co-authored-by: Claude <noreply@anthropic.com>
…es (#1761) * fix: keep TypeScript in step with files it was given that webpack no longer compiles Once TypeScript has been given a file's text by ts-loader, it reads no more of the file itself. For a file that webpack then stops compiling, that left it with the text of the last compile: - A deleted file was found again the next time one of its importers was checked, so their "Cannot find module" error went away. - A change to the file on disk was never seen, so files that import it were checked against its old text. On webpack 5 a removed file is now hidden from TypeScript under its own name too, and watched so that it is noticed when it is put back. The text TypeScript holds for a file that webpack's watcher reports is brought into step with the disk, to stand until the file is next compiled. Fixes #1742 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: changelog for #1761 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 --------- Co-authored-by: Claude <noreply@anthropic.com>
…1762) * fix: check the whole project again after the TypeScript process dies When the TypeScript process dies and is replaced, what ts-loader had worked out with it is lost: which files import which, and what a recheck that failed had left to check. Two things went wrong after that: - The importers of a file removed in the build the process died in were not checked again, so their "Cannot find module" error was missing until they were next edited. The list of removed names carried into the new instance matched nothing, since the new process no longer resolves an import to them. - The recheck could open the project with a file left over from the failed build that had been deleted since, and the build failed with "no project found for opened file". The first recheck after a dead process is replaced now checks every file of the project, and the file it opens the project with is one that is still layered or on disk. Fixes #1747 Fixes #1748 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: changelog for #1762 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 --------- Co-authored-by: Claude <noreply@anthropic.com>
* fix: report a file's errors once, on the module that compiled it ts-loader kept a compiled file's errors under webpack's name for it and looked for its module under the name the errors are shown by. Where those are not the name TypeScript has, two things went wrong: - A file with no TypeScript extension that appendTsSuffixTo doesn't match was taken by the end-of-build recheck as never checked, so its errors were reported a second time under the made-up name, and that copy stayed after the file was fixed. - The errors of a .vue file's template went on the compilation only, and those of a script matched by appendTsSuffixTo on no module either, so they were lost when the module was restored from webpack's persistent cache. The errors are now kept under TypeScript's name, with the resource of the module that compiled the file, and are reported on that module. Fixes #1745 Fixes #1746 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: changelog for #1760 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * test: don't depend on whether webpack trusts a just-changed file's cache entry vueBlocksPersistentCache changed other.js in patch0 and expected it to be restored from the cache in patch1. webpack doesn't trust the cache for a file changed that close to the build, so whether it was restored came down to timing. patch1 now changes the file again. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * fix: know a restored module's file when its stored errors have been dropped A file's stored errors are dropped while the file is in neither the build nor the program, and with them went the only record of which module had compiled it. A .vue file's script is in that position when nothing imports the file and the tsconfig doesn't include it (on Windows, also when it does). When the file was imported again, webpack brought the module back from its cache, and the recheck took the script for a file with no module: its error was reported a second time, on the compilation. The layer now records the module the file was compiled as, so the recheck finds it without stored errors. And errors found by a recheck made while the module was out of the build are given the module when it is back. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * test: keep the unimported script out of the new vue test Whether a .vue file's script stays in the program while nothing imports it differs between platforms, so its error was reported in patch0 on Linux and not on Windows. Only the template has an error now. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 --------- Co-authored-by: Claude <noreply@anthropic.com>
* fix: report a file's errors once, on the module that compiled it ts-loader kept a compiled file's errors under webpack's name for it and looked for its module under the name the errors are shown by. Where those are not the name TypeScript has, two things went wrong: - A file with no TypeScript extension that appendTsSuffixTo doesn't match was taken by the end-of-build recheck as never checked, so its errors were reported a second time under the made-up name, and that copy stayed after the file was fixed. - The errors of a .vue file's template went on the compilation only, and those of a script matched by appendTsSuffixTo on no module either, so they were lost when the module was restored from webpack's persistent cache. The errors are now kept under TypeScript's name, with the resource of the module that compiled the file, and are reported on that module. Fixes #1745 Fixes #1746 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: changelog for #1760 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * test: don't depend on whether webpack trusts a just-changed file's cache entry vueBlocksPersistentCache changed other.js in patch0 and expected it to be restored from the cache in patch1. webpack doesn't trust the cache for a file changed that close to the build, so whether it was restored came down to timing. patch1 now changes the file again. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * fix: forget a block its .vue file no longer has, and treat a file's script and template alike A block other than the script that a .vue file loses (in practice its compiled template) stayed a file of the TypeScript program for the rest of the watch: nothing compiles it again and nothing says it has gone. It is now forgotten, and hidden from TypeScript, in the build that compiles the file without it: the module of the file itself was built and no module asks for the block. A block whose file is merely out of the build is kept as before. While a .vue file is out of the build, the errors of its template were held back and those of its script were still reported. Neither is reported now: both are text that ts-loader gave TypeScript and that nothing keeps up to date. The same goes for any file compiled under a name ts-loader made up. Fixes #1749 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: changelog for #1763 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * fix: know a restored module's file when its stored errors have been dropped A file's stored errors are dropped while the file is in neither the build nor the program, and with them went the only record of which module had compiled it. A .vue file's script is in that position when nothing imports the file and the tsconfig doesn't include it (on Windows, also when it does). When the file was imported again, webpack brought the module back from its cache, and the recheck took the script for a file with no module: its error was reported a second time, on the compilation. The layer now records the module the file was compiled as, so the recheck finds it without stored errors. And errors found by a recheck made while the module was out of the build are given the module when it is back. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * test: a file out of the build keeps its errors to itself in the new vue test Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * test: keep the unimported script out of the new vue test Whether a .vue file's script stays in the program while nothing imports it differs between platforms, so its error was reported in patch0 on Linux and not on Windows. Only the template has an error now. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * test: one error in vueFileNotImportedWatch, so its output is the same on every platform Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 --------- Co-authored-by: Claude <noreply@anthropic.com>
) * fix: report a file's errors once, on the module that compiled it ts-loader kept a compiled file's errors under webpack's name for it and looked for its module under the name the errors are shown by. Where those are not the name TypeScript has, two things went wrong: - A file with no TypeScript extension that appendTsSuffixTo doesn't match was taken by the end-of-build recheck as never checked, so its errors were reported a second time under the made-up name, and that copy stayed after the file was fixed. - The errors of a .vue file's template went on the compilation only, and those of a script matched by appendTsSuffixTo on no module either, so they were lost when the module was restored from webpack's persistent cache. The errors are now kept under TypeScript's name, with the resource of the module that compiled the file, and are reported on that module. Fixes #1745 Fixes #1746 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: changelog for #1760 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * test: don't depend on whether webpack trusts a just-changed file's cache entry vueBlocksPersistentCache changed other.js in patch0 and expected it to be restored from the cache in patch1. webpack doesn't trust the cache for a file changed that close to the build, so whether it was restored came down to timing. patch1 now changes the file again. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * fix: keep a real file apart from a file whose made-up name it has For a file with no TypeScript extension, ts-loader makes up the name it gives TypeScript: schema.graphql.ts for schema.graphql. A real file can have that name. Two things went wrong then: - When schema.graphql changed or was deleted, TypeScript was told that schema.graphql.ts had, whether or not ts-loader compiled schema.graphql. After a deletion the build could fail with "no project found for opened file". A made-up name is now only passed on while a layer has it. - When ts-loader did compile schema.graphql, its text replaced the real file's for TypeScript, so importers of the real file were checked against the wrong text. The compiled file now gets another name (schema.graphql.ts-loader.ts) when a real file has the usual one. Fixes #1750 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * docs: changelog for #1764 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * fix: know a restored module's file when its stored errors have been dropped A file's stored errors are dropped while the file is in neither the build nor the program, and with them went the only record of which module had compiled it. A .vue file's script is in that position when nothing imports the file and the tsconfig doesn't include it (on Windows, also when it does). When the file was imported again, webpack brought the module back from its cache, and the recheck took the script for a file with no module: its error was reported a second time, on the compilation. The layer now records the module the file was compiled as, so the recheck finds it without stored errors. And errors found by a recheck made while the module was out of the build are given the module when it is back. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 * test: keep the unimported script out of the new vue test Whether a .vue file's script stays in the program while nothing imports it differs between platforms, so its error was reported in patch0 on Linux and not on Windows. Only the template has an error now. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 --------- Co-authored-by: Claude <noreply@anthropic.com>
Bumps package.json and package-lock.json, and lists the changelog's 10.0.0-beta.2 entries in pull request order. Claude-Session: https://claude.ai/code/session_01Q2Jv7JZWr3VUxCkXiKB5e5 Co-authored-by: Claude <noreply@anthropic.com>
…diff on failure (#1766) * test: run the comparison tests in parallel, with shorter waits and a diff on failure The pack took about 9 minutes, most of it fixed waits in the harness, with one test running at a time. - run-tests.js runs the tests several at a time (one per core, or --concurrency <n>), names each test with its duration, prints only a failing test's output, and lists tests that only passed on a retry. Retries run alone, 3 attempts in all (was 5). - The waits are named and shorter: 250ms before a patch (was 1000ms) and a 300ms aggregateTimeout (was 1500ms). A new compiler per patch now gets the same wait before watching as the first build; the long aggregateTimeout was hiding that it had none. - A failure shows the lines that differ, not both files in full. - Output is normalised by the checkout's real path, so the tests pass in a folder not named ts-loader. - vue and vue-loader are root devDependencies, so sourceMapsShouldConsiderInputSourceMap no longer runs npm ci twice per run (about 100s on Windows). Its snapshot is regenerated. - npm run comparison-tests no longer runs git clean, which deleted new, unstaged tests; the tests only write to .test/. - CI uploads each test's actualOutput when the comparison tests fail. - Remove a snapshot folder nothing read. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7L49oYfyCs73e9qTNq * test: address review of the comparison test changes - AGGREGATE_TIMEOUT is now WAIT_BEFORE_PATCH + 250ms (500ms, was 300ms), and the comment says why: with only 50ms between them a rebuild could fire before the patch was applied. - A test marked _FLAKY_ still has its output printed when it differs, though it passes. - vue is pinned exactly and Renovate leaves it alone, as a vue upgrade changes the snapshot of sourceMapsShouldConsiderInputSourceMap. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7L49oYfyCs73e9qTNq --------- Co-authored-by: Claude <noreply@anthropic.com>
…g installed per test (#1767) * test: run the execution tests in parallel, in both modes, with nothing installed per test The pack's own work took about 15 seconds, but every run installed dependencies for ten of its tests first. On Windows CI that was most of the test step, and `npm ci` was most of the rest of the job. Dependencies - No test has a package.json any more. react, react-dom, their types and tslib are devDependencies of ts-loader, like jasmine and Babel already were. - date-fns, event-rank and chalk are replaced by small stand-in packages tracked in each test's node_modules. The file: dependencies that were already tracked there are no longer also installed, and test/testPackages is gone. - The pnpm test still runs `pnpm install`, with pnpm as a pinned devDependency instead of `npm install -g pnpm` on every run. Harness - Suites run several at a time, each in its own process, printing only a failing suite's output; a suite still running after 5 minutes is stopped. - Each test with specs also runs with transpileOnly, as the comparison tests do. Four tests needed an outDir and rootDir for that. - The spec files are the build's entry, so main.js is gone, and with it the walk through node_modules that require.context did. The entry and output settings that run-specs.js never read are removed from the configs. - Nothing is written to the test folders (optionsCaching built its bundle there), so the scripts no longer run `git clean -xfd`, which deleted a new test that was not yet staged. `npm run clean` now only removes ignored files. - `npm test` passes its arguments on as they are: a --match-test regex with `(` or `|` used to be a shell syntax error. It also runs the execution tests when the comparison tests fail. CI - One job with the OS in the matrix (same job names), a 15 minute timeout, and no fail-fast. - typescript and webpack 4 are installed in one `npm install`. - The execution tests build in the checkout on Windows, not a copy in C:\source. - On Windows the build action caches node_modules itself. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JfjPgPbdEeruRgEue * chore: group Renovate's upgrades of the test fixture dependencies react, react-dom, their types, tslib and pnpm used to be in the execution tests' own package.json files, which Renovate's config:base preset ignores (anything under a test folder). As root devDependencies they are now upgraded like any other, so without a rule each would get a pull request of its own. - Their minor and patch upgrades come as one pull request (with vue-loader's, the comparison tests' equivalent). - A major upgrade of React and its types comes as one pull request. Nothing is blocked. The React tests pass as they are on React 19. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JfjPgPbdEeruRgEue * chore: upgrade the tests' React to 19 react, react-dom and their types became root devDependencies on ^18.3.1, so Renovate's first pull request for them would have been React 19. The tests need no change for it, so take it now. The pnpm test, which pins its own copy, moves to the same version. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JfjPgPbdEeruRgEue --------- Co-authored-by: Claude <noreply@anthropic.com>
…ile snapshots, readable bundles, one CI workflow) (#1768) * test: move per-test settings to test.json, share transpile snapshots, readable bundles - The harness no longer knows tests by name: test.json says whether a test runs with transpileOnly, links or builds its libs first, or has a source map whose content varies. - A test only keeps expectedOutput-transpile if it differs from expectedOutput; --save-output drops it when the two are the same. - Tests that set no devtool get `devtool: false`, not webpack's `eval` default, so a bundle snapshot is code that can be read and diffed. All snapshots of the tests that run are regenerated. - Remove commented-out code. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7L49oYfyCs73e9qTNq * test: run the execution tests in parallel, in both modes, with nothing installed per test The pack's own work took about 15 seconds, but every run installed dependencies for ten of its tests first. On Windows CI that was most of the test step, and `npm ci` was most of the rest of the job. Dependencies - No test has a package.json any more. react, react-dom, their types and tslib are devDependencies of ts-loader, like jasmine and Babel already were. - date-fns, event-rank and chalk are replaced by small stand-in packages tracked in each test's node_modules. The file: dependencies that were already tracked there are no longer also installed, and test/testPackages is gone. - The pnpm test still runs `pnpm install`, with pnpm as a pinned devDependency instead of `npm install -g pnpm` on every run. Harness - Suites run several at a time, each in its own process, printing only a failing suite's output; a suite still running after 5 minutes is stopped. - Each test with specs also runs with transpileOnly, as the comparison tests do. Four tests needed an outDir and rootDir for that. - The spec files are the build's entry, so main.js is gone, and with it the walk through node_modules that require.context did. The entry and output settings that run-specs.js never read are removed from the configs. - Nothing is written to the test folders (optionsCaching built its bundle there), so the scripts no longer run `git clean -xfd`, which deleted a new test that was not yet staged. `npm run clean` now only removes ignored files. - `npm test` passes its arguments on as they are: a --match-test regex with `(` or `|` used to be a shell syntax error. It also runs the execution tests when the comparison tests fail. CI - One job with the OS in the matrix (same job names), a 15 minute timeout, and no fail-fast. - typescript and webpack 4 are installed in one `npm install`. - The execution tests build in the checkout on Windows, not a copy in C:\source. - On Windows the build action caches node_modules itself. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JfjPgPbdEeruRgEue * ci: run the comparison tests from one workflow, which the test probe calls comparison-tests.yml and test-probe.yml held six near-identical jobs. The first is now one job with an OS matrix that takes the OS and the tests to run as inputs, and the probe calls it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7L49oYfyCs73e9qTNq * TEMPORARY: count normalisation rule hits (to be reverted) * Revert "TEMPORARY: count normalisation rule hits (to be reverted)" This reverts commit e66038c. * test: remove comparison test normalisation rules that never apply A probe run counted how often each rule changed any text on Ubuntu, macOS and Windows. These 14 changed nothing on any of them; most date from webpack 4 or are made redundant by the checkout path being replaced first. The rules for TS6305, TS18003 and .tsbuildinfo files stay, though unused today, as the skipped project references tests need them. Also documents test.json and the transpileOnly snapshot fallback. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7L49oYfyCs73e9qTNq * test: stop a stalled pnpm install after a minute and try it again In CI one Windows job's `pnpm install` for the pnpm execution test stalled at "resolved 1, downloaded 0" until the 5 minute suite timeout stopped it, which failed the job. The install normally takes a few seconds, so it now gets 60 seconds and up to 3 attempts. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7L49oYfyCs73e9qTNq --------- Co-authored-by: Claude <noreply@anthropic.com>
* test: run the execution tests in parallel, in both modes, with nothing installed per test The pack's own work took about 15 seconds, but every run installed dependencies for ten of its tests first. On Windows CI that was most of the test step, and `npm ci` was most of the rest of the job. Dependencies - No test has a package.json any more. react, react-dom, their types and tslib are devDependencies of ts-loader, like jasmine and Babel already were. - date-fns, event-rank and chalk are replaced by small stand-in packages tracked in each test's node_modules. The file: dependencies that were already tracked there are no longer also installed, and test/testPackages is gone. - The pnpm test still runs `pnpm install`, with pnpm as a pinned devDependency instead of `npm install -g pnpm` on every run. Harness - Suites run several at a time, each in its own process, printing only a failing suite's output; a suite still running after 5 minutes is stopped. - Each test with specs also runs with transpileOnly, as the comparison tests do. Four tests needed an outDir and rootDir for that. - The spec files are the build's entry, so main.js is gone, and with it the walk through node_modules that require.context did. The entry and output settings that run-specs.js never read are removed from the configs. - Nothing is written to the test folders (optionsCaching built its bundle there), so the scripts no longer run `git clean -xfd`, which deleted a new test that was not yet staged. `npm run clean` now only removes ignored files. - `npm test` passes its arguments on as they are: a --match-test regex with `(` or `|` used to be a shell syntax error. It also runs the execution tests when the comparison tests fail. CI - One job with the OS in the matrix (same job names), a 15 minute timeout, and no fail-fast. - typescript and webpack 4 are installed in one `npm install`. - The execution tests build in the checkout on Windows, not a copy in C:\source. - On Windows the build action caches node_modules itself. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JfjPgPbdEeruRgEue * chore: group Renovate's upgrades of the test fixture dependencies react, react-dom, their types, tslib and pnpm used to be in the execution tests' own package.json files, which Renovate's config:base preset ignores (anything under a test folder). As root devDependencies they are now upgraded like any other, so without a rule each would get a pull request of its own. - Their minor and patch upgrades come as one pull request (with vue-loader's, the comparison tests' equivalent). - A major upgrade of React and its types comes as one pull request. Nothing is blocked. The React tests pass as they are on React 19. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JfjPgPbdEeruRgEue * chore: upgrade the tests' React to 19 react, react-dom and their types became root devDependencies on ^18.3.1, so Renovate's first pull request for them would have been React 19. The tests need no change for it, so take it now. The pnpm test, which pins its own copy, moves to the same version. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JfjPgPbdEeruRgEue * test: let an execution test say which errors its build reports Every execution test had to build cleanly, so nothing checked that an error is reported. The comparison tests do, but by comparing webpack's printed output, which pins them to one version of webpack and of TypeScript. The execution tests run on every version in the CI matrix. A test with an expectedErrors.json passes if its build reports exactly the errors listed: each by TypeScript error code, file, line and column, or by text its message contains, for the errors of ts-loader and webpack that have no code. Those are the same on webpack 4 and 5, and on TypeScript 7.1.0-beta and next. - "warnings" lists the build's warnings in the same form; without it they are not checked. - The test runs with and without transpileOnly, as tests with specs do. "transpileOnly" lists what that build reports when it differs. - A failing test prints what was listed but not reported, what was reported but not listed, and the build's errors in the file's own form. - An invalid expectedErrors.json, or one beside spec files, fails the test. Eight cases are ported from the comparison tests, under the same names: errors, dependencyErrors, tsconfigInvalid, compilerOptionsErrors, ignoreDiagnostics, reportFiles, nodeModulesMeaningfulErrorWhenImportingTs and validateLoaderOptionNames. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7JfjPgPbdEeruRgEue --------- Co-authored-by: Claude <noreply@anthropic.com>
The one commit on main that next lacks is #1758, the port to main of next's #1757 (what the benchmark compared, and a base for a manual run). Both conflicts are between those two copies of the same change, and both keep next's side: - .github/workflows/benchmark.yml: the `base` input's default stays `next`, this file's own branch. - test/benchmark-tests/README.md: the "Cleaning up" section, which only next has, stays. The merge changes no file on next. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2Jv7Kv5t9W1RPZB1JM6cb
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.
This pull request migrates ts-loader to support TypeScript 7.1 and drop support for lower versions of TypeScript. It will not be merged until TypeScript 7.1 ships.