Repository navigation
build(deps): modernize the TypeScript tree (TS 6.0.3, lockfile) — supersedes #28 - #31
Merged
Merged
Conversation
Dependabot's grouped bump proposed TypeScript 7 with @typescript-eslint 8, which cannot resolve: the published peer range is >=4.8.4 <6.1.0. The tree had no lockfile, so Dependabot resolved an unsatisfiable set at install time. - select TypeScript 6.0.3, the newest release inside the peer range - upgrade eslint to 10, @typescript-eslint to 8.72.2, @types/node to 26, mathjs to 15, plotly.js to 4, jest to 30 with ts-jest ESM transform - replace ts-node with tsx for the ESM dev/demo entry points - commit package-lock.json and use npm ci in run.sh - move tsconfig to NodeNext plus TS6 explicit types; add eslint flat config - fix all 54 pre-existing diagnostics; add src/index.ts entry point - add four agent tests (jest previously matched zero files)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #28.
Why #28 could not land
0_CONTEXT/Computer_Languages/TypeScripthad no lockfile, so Dependabot resolved thegroup at install time. The proposed set pairs TypeScript 7.0.2 with
@typescript-eslint8.72.2, whose published peer range istypescript >=4.8.4 <6.1.0.npm installtherefore failsERESOLVE, and forcingit with
--legacy-peer-depsthen failstsc(TS5108: Option 'moduleResolution=node10' has been removed) and crashests-nodeon TS 7.This PR is the companion migration: the tree is modernised within the ranges the
published plugins actually support. It does not adopt TypeScript 7. No
--legacy-peer-deps,--force, oroverridesentry is used.Version selection (read from npm, 2026-11-12)
8.72.2 is the newest published plugin set. The newest stable TypeScript inside
<6.1.0is 6.0.3, sotypescriptis pinned to~6.0.3.ts-jest29.4.15 was added because it is the published transform that peerstypescript >=4.3 <7andjest ^29 || ^30.ts-node10.9.2 does not run on theselected compiler generation, so the ESM dev/demo entries use
tsx4.23.15.Dependency changes
^5.1.6(resolved 5.9.3)~6.0.3^8.45.0^10.14.0^6.2.0^8.72.2^20.4.5^26.6.6^11.9.1^15.2.0^2.25.2^4.3.0^29.6.1^30.5.2^29.4.15^4.23.15^10.9.1>=16.0.0>=22.13.0(plotly.js 4 / eslint 10 floors)Lockfile and install path
package-lock.json(lockfileVersion 3), resolving the exact published set.run.shnow runsnpm ciand fails if the lockfile is missing; it no longerinstalls a global
tsc.each group entry was resolved independently with no fixed tree to validate.
Compiler / lint configuration
tsconfig.json:moduleandmoduleResolutionare nowNodeNext(the sourcesalready import with explicit
.jsextensions under"type": "module");node10/nodeis gone.typesto[], so"types": ["node", "jest"]is explicit.eslint.config.js, a flat config for ESLint 10 using the installed@typescript-eslintparser/plugin and its recommended rules.npm run lintis noweslint .(the old shell glob missedsrc/root files).src/index.ts, the entry pointpackage.json#mainandnpm startalreadypointed at but which did not exist.
Baseline diagnostics: 54 → 0
At base (
c309595)tsc --noEmitreported 54 errors in 3 files. All werefixed in source; none are suppressed with
@ts-ignore, andskipLibCheckwasalready
trueat base and was not widened.types.ts: removed adeclare module 'mathjs'block that redeclaredMatrix.sizeincompatibly, imported the previously-missing
ActiveInferenceAgenttype, andmade the two mutated
BeliefStatefields non-readonly.ActiveInferenceAgent.ts: narrowedunknowncatch values, guardednoUncheckedIndexedAccesslookups (transition matrix, vector width, best EFE),and converted mathjs scalar results to numbers.
ant-colony-demo.ts: added checked cell accessors instead of rawgrid[y][x]indexing, replacedRecord<string, any>statistics with concreteinterfaces, typed the belief row, and used the same error narrowing.
Evidence (local commands, all exit 0)
npm testpreviously matched zero files. It now runs four tests coveringposterior normalisation, an in-range perception-action step with history,
finite free-energy components, and invalid configuration rejection.
Hosted Actions are billing-locked and were not used as evidence.