Automatically updates TypeScript project references in tsconfig.json files based on workspace dependencies from package.json. Version 6.0.0 requires Node.js >=22.13.0. Works with npm, yarn, pnpm, and lerna monorepos. It reads dependencies out of package.json and applies them as references in tsconfig.json, optionally creating tsconfig files and path mappings. A key differentiator is its support for createTsConfig (auto-creates tsconfig for packages with .ts/.tsx main entries) and createPathMappings (generates path mappings for IDE support). Released under active maintenance on GitHub by eBayClassifiedsGroup.
npm install update-ts-referencesNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Scans all packages in the monorepo and updates their tsconfig.json files to match package.json dependencies.
Upgrade Node.js to v22.13.0 or later, or pin to v5.x (last compatible with Node 14+).
Use exit code detection manually or wrap in a script that diffs the output.
Review generated tsconfig files and ensure base config exists at expected path.
Ensure each package's tsconfig has an explicit rootDir.
Manually create tsconfig for packages without .ts/.tsx main entries.
Run 'npx update-ts-references' directly without prior install, or install as devDependency.
Ensure all dependencies are local workspace packages; use npm/yarn/pnpm workspaces correctly.
Restructure packages to avoid circular references or use TypeScript 3.9+ with --strict mode.