Migrate development custom condition to unique workspace-specific name
Replace the TypeScript development custom condition with a unique workspace-specific name to avoid conflicts when consuming packages in other workspaces.
Examples
The migration will update the custom condition name in both tsconfig.base.json and all workspace package.json files that use the development custom condition:
1{
2 "compilerOptions": {
3 "customConditions": ["development"]
4 }
5}
6The migration also updates package.json files that use the development condition in their exports field and point to TypeScript files:
1{
2 "name": "@myorg/my-lib",
3 "exports": {
4 ".": {
5 "development": "./src/index.ts",
6 "default": "./dist/index.js"
7 }
8 }
9}
10If the custom condition is not set to ["development"] or the package.json's exports field doesn't point to TypeScript files, the migration will not modify the configuration:
1{
2 "name": "@myorg/my-lib",
3 "exports": {
4 ".": {
5 "development": "./dist/index.js",
6 "default": "./dist/index.js"
7 }
8 }
9}
10