![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
typescript-monorepo-toolkit
Advanced tools
## CLI tool to automatically setup typescript project references for yarn workspaces monorepos and other tasks
It can inject the appropriate tsconfig.references for all of the packages in a yarn workspace, and also help you change rootDir
and outDir
across all of the packages
Background / Motivation:
How to use
npx typescript-monorepo-toolkit inject-refs ../path-to/yarn-project-root
For debug info
DEBUG=typescript-monorepo-toolkit npx typescript-monorepo-toolkit inject-refs ../path-to/yarn-project-root
Usage: [options] [command]
Options:
-V, --version output the version number
-p, --tsconfig-path <tsconfigpath> Use alterative config path inside the package. eg: test/tsconfig.json (default: "tsconfig.json")
-h, --help output usage information
Commands:
inject-refs [options] <yarn-project-root> Inject the appropriate tsconfig references based on yarn workspaces dependency graph
set-outDir <yarn-project-root> [newOutDir] Set the compilerOptions.outDir in all of the packages. omit new value to delete
set-rootDir <yarn-project-root> [newRootDir] Set the compilerOptions.rootDir in all of the packages. omit new value to delete
yarn workspaces info
command has all the info we need.
The tsconfig.json
manipulation is done using recast, as tsconfig.json
is not really JSON, so we can keep the comments. Unfortunately recast changes some of the formatting of the file.
This tool might break your tsconfigs Please run this tool on a clean git state, and inspect the diff
tsconfig.test.json
and similar patternsFAQs
## CLI tool to automatically setup typescript project references for yarn workspaces monorepos and other tasks
The npm package typescript-monorepo-toolkit receives a total of 67 weekly downloads. As such, typescript-monorepo-toolkit popularity was classified as not popular.
We found that typescript-monorepo-toolkit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.