{"_id":"@stainless-api/tsc-multi","_rev":"3-40dee595c1c05f301d5f97700b093af2","name":"@stainless-api/tsc-multi","dist-tags":{"latest":"1.1.12"},"versions":{"1.1.10":{"name":"@stainless-api/tsc-multi","version":"1.1.10","keywords":["typescript","tsc","ts","compiler"],"author":{"name":"Tommy Chen","email":"tommy351@gmail.com"},"license":"MIT","_id":"@stainless-api/tsc-multi@1.1.10","maintainers":[{"name":"stainless-api","email":"dev@stainlessapi.com"}],"homepage":"https://github.com/tommy351/tsc-multi#readme","bugs":{"url":"https://github.com/tommy351/tsc-multi/issues"},"bin":{"tsc-multi":"bin/tsc-multi.js"},"dist":{"shasum":"167f0b1421fade5e39ee6267ad5a8570732f2c7c","tarball":"https://registry.npmjs.org/@stainless-api/tsc-multi/-/tsc-multi-1.1.10.tgz","fileCount":4,"integrity":"sha512-YfgUj22BZzT5IG/rG2GBE0e1fiqKIswjvkN0z5SYsj+aL0AZlbgkRMi2VEXfhi6xIuehlfwkdW+MXVzkpbEhbA==","signatures":[{"sig":"MEUCIBjCSRM8FV5YHNQp+JV8tMb1f96skIa7k8Bbn+HjUqziAiEA9RGD50wvePwz5pRJjyzazeHWZZ6XlOJLc/QoSORD650=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7614},"main":"dist/index.js","type":"commonjs","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"dist/index.d.ts","engines":{"node":">=14"},"gitHead":"fa2b6da2ccb2b43325ce25cb253ce9cc042a296d","scripts":{"lint":"eslint . --ext .js,.ts,.jsx,.tsx","test":"npm-run-all test:*","build":"node scripts/tslib.cjs && tsc -P tsconfig.build.json","clean":"rm -rf dist","watch":"npm run build -- --watch","test:integration":"jest --config integration/jest.config.js"},"_npmUser":{"name":"stainless-api","email":"dev@stainlessapi.com"},"repository":{"url":"git+https://github.com/tommy351/tsc-multi.git","type":"git"},"_npmVersion":"11.5.1","description":"Compile multiple TypeScript projects into multiple targets.","directories":{},"lint-staged":{"*.{js,ts,jsx,tsx}":"eslint --fix"},"_nodeVersion":"24.5.0","dependencies":{"debug":"^4.3.7","p-all":"^3.0.0","tslib":"^2.8.1","yargs":"^17.7.2","fast-glob":"^3.3.2","get-stdin":"^8.0.0","picocolors":"^1.1.1","signal-exit":"^3.0.7","superstruct":"^1.0.4","string-to-stream":"^3.0.1"},"_hasShrinkwrap":false,"packageManager":"pnpm@9.12.3+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee","devDependencies":{"jest":"^29.7.0","ttsc":"^0.3.1","execa":"^5.1.1","husky":"^4.3.8","eslint":"^8.57.1","esbuild":"^0.10.0","ts-jest":"^29.2.5","ts-node":"^10.9.2","fs-extra":"^11.2.0","prettier":"^2.8.8","@types/tmp":"^0.2.6","typescript":"^5.6.3","@types/jest":"^29.5.14","@types/node":"^18.19.64","lint-staged":"^10.5.4","npm-run-all":"^4.1.5","tmp-promise":"^3.0.3","@types/debug":"^4.1.12","@types/yargs":"^17.0.33","jest-extended":"^3.2.4","@types/fs-extra":"^11.0.4","@tsconfig/node10":"^1.0.11","@tsconfig/node14":"^1.0.3","@types/signal-exit":"^3.0.4","eslint-plugin-jest":"^27.9.0","eslint-plugin-node":"^11.1.0","jest-file-snapshot":"^0.5.0","eslint-plugin-react":"^7.37.2","ts-transformer-keys":"^0.4.4","eslint-config-prettier":"^8.10.0","eslint-plugin-prettier":"^4.2.1","@typescript-eslint/parser":"^5.62.0","@typescript-eslint/eslint-plugin":"^5.62.0"},"peerDependencies":{"typescript":">=4.3.0"},"_npmOperationalInternal":{"tmp":"tmp/tsc-multi_1.1.10_1782488507942_0.4905235321989474","host":"s3://npm-registry-packages-npm-production"}},"1.1.11":{"name":"@stainless-api/tsc-multi","version":"1.1.11","keywords":["typescript","tsc","ts","compiler"],"author":{"name":"Tommy Chen","email":"tommy351@gmail.com"},"license":"MIT","_id":"@stainless-api/tsc-multi@1.1.11","maintainers":[{"name":"stainless-api","email":"dev@stainlessapi.com"}],"homepage":"https://github.com/stainless-api/tsc-multi#readme","bugs":{"url":"https://github.com/stainless-api/tsc-multi/issues"},"bin":{"tsc-multi":"bin/tsc-multi.js"},"dist":{"shasum":"0a08848f82bac35d5cb3ef3e2a117fa7a1b51a16","tarball":"https://registry.npmjs.org/@stainless-api/tsc-multi/-/tsc-multi-1.1.11.tgz","fileCount":4,"integrity":"sha512-uiP4ttro0tQeITJNJvQ9+GZ90GoGpL8GmdVmoWhfg0DGF3o243jRYy0/Z6ATtG0NQYSA6TwwiXWCHEzLSNGG4g==","signatures":[{"sig":"MEQCICgU/UkwwGIRjeG3JgIXGilxSPVsUzSPtFPzEpikhGzJAiAIVJ/g6FABGH4+Bp6yANIX2oJCn4cd/OJx3ABGjPotcw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7634},"main":"dist/index.js","type":"commonjs","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"dist/index.d.ts","engines":{"node":">=14"},"gitHead":"fa2b6da2ccb2b43325ce25cb253ce9cc042a296d","scripts":{"lint":"eslint . --ext .js,.ts,.jsx,.tsx","test":"npm-run-all test:*","build":"node scripts/tslib.cjs && tsc -P tsconfig.build.json","clean":"rm -rf dist","watch":"npm run build -- --watch","test:integration":"jest --config integration/jest.config.js"},"_npmUser":{"name":"stainless-api","email":"dev@stainlessapi.com"},"repository":{"url":"git+https://github.com/stainless-api/tsc-multi.git","type":"git"},"_npmVersion":"11.5.1","description":"Compile multiple TypeScript projects into multiple targets.","directories":{},"lint-staged":{"*.{js,ts,jsx,tsx}":"eslint --fix"},"_nodeVersion":"24.5.0","dependencies":{"debug":"^4.3.7","p-all":"^3.0.0","tslib":"^2.8.1","yargs":"^17.7.2","fast-glob":"^3.3.2","get-stdin":"^8.0.0","picocolors":"^1.1.1","signal-exit":"^3.0.7","superstruct":"^1.0.4","string-to-stream":"^3.0.1"},"_hasShrinkwrap":false,"packageManager":"pnpm@9.12.3+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee","devDependencies":{"jest":"^29.7.0","ttsc":"^0.3.1","execa":"^5.1.1","husky":"^4.3.8","eslint":"^8.57.1","esbuild":"^0.10.0","ts-jest":"^29.2.5","ts-node":"^10.9.2","fs-extra":"^11.2.0","prettier":"^2.8.8","@types/tmp":"^0.2.6","typescript":"^5.6.3","@types/jest":"^29.5.14","@types/node":"^18.19.64","lint-staged":"^10.5.4","npm-run-all":"^4.1.5","tmp-promise":"^3.0.3","@types/debug":"^4.1.12","@types/yargs":"^17.0.33","jest-extended":"^3.2.4","@types/fs-extra":"^11.0.4","@tsconfig/node10":"^1.0.11","@tsconfig/node14":"^1.0.3","@types/signal-exit":"^3.0.4","eslint-plugin-jest":"^27.9.0","eslint-plugin-node":"^11.1.0","jest-file-snapshot":"^0.5.0","eslint-plugin-react":"^7.37.2","ts-transformer-keys":"^0.4.4","eslint-config-prettier":"^8.10.0","eslint-plugin-prettier":"^4.2.1","@typescript-eslint/parser":"^5.62.0","@typescript-eslint/eslint-plugin":"^5.62.0"},"peerDependencies":{"typescript":">=4.3.0"},"_npmOperationalInternal":{"tmp":"tmp/tsc-multi_1.1.11_1782488698951_0.1217437421008194","host":"s3://npm-registry-packages-npm-production"}},"1.1.12":{"name":"@stainless-api/tsc-multi","version":"1.1.12","description":"Compile multiple TypeScript projects into multiple targets.","keywords":["typescript","tsc","ts","compiler"],"homepage":"https://github.com/stainless-api/tsc-multi#readme","bugs":{"url":"https://github.com/stainless-api/tsc-multi/issues"},"repository":{"type":"git","url":"git+https://github.com/stainless-api/tsc-multi.git"},"license":"MIT","author":{"name":"Tommy Chen","email":"tommy351@gmail.com"},"type":"commonjs","main":"dist/index.js","types":"dist/index.d.ts","bin":{"tsc-multi":"bin/tsc-multi.js"},"scripts":{"build":"node scripts/tslib.cjs && tsc -P tsconfig.build.json","watch":"npm run build -- --watch","lint":"eslint . --ext .js,.ts,.jsx,.tsx","clean":"rm -rf dist","test":"npm-run-all test:*","test:integration":"jest --config integration/jest.config.js"},"dependencies":{"debug":"^4.3.7","fast-glob":"^3.3.2","get-stdin":"^8.0.0","p-all":"^3.0.0","picocolors":"^1.1.1","signal-exit":"^3.0.7","string-to-stream":"^3.0.1","superstruct":"^1.0.4","tslib":"^2.8.1","yargs":"^17.7.2"},"devDependencies":{"@tsconfig/node10":"^1.0.11","@tsconfig/node14":"^1.0.3","@types/debug":"^4.1.12","@types/fs-extra":"^11.0.4","@types/jest":"^29.5.14","@types/node":"^18.19.64","@types/signal-exit":"^3.0.4","@types/tmp":"^0.2.6","@types/yargs":"^17.0.33","@typescript-eslint/eslint-plugin":"^5.62.0","@typescript-eslint/parser":"^5.62.0","esbuild":"0.10.0","eslint":"^8.57.1","eslint-config-prettier":"^8.10.0","eslint-plugin-jest":"^27.9.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^4.2.1","eslint-plugin-react":"^7.37.2","execa":"^5.1.1","fs-extra":"^11.2.0","husky":"^4.3.8","jest":"^29.7.0","jest-extended":"^3.2.4","jest-file-snapshot":"^0.5.0","lint-staged":"^10.5.4","npm-run-all":"^4.1.5","prettier":"^2.8.8","tmp-promise":"^3.0.3","ts-jest":"^29.2.5","ts-node":"^10.9.2","ts-transformer-keys":"^0.4.4","ttsc":"^0.3.1","typescript":"^5.6.3"},"peerDependencies":{"typescript":">=4.3.0"},"engines":{"node":">=14"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,ts,jsx,tsx}":"eslint --fix"},"packageManager":"pnpm@9.12.3+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee","_id":"@stainless-api/tsc-multi@1.1.12","gitHead":"fa2b6da2ccb2b43325ce25cb253ce9cc042a296d","_nodeVersion":"24.5.0","_npmVersion":"11.5.1","dist":{"integrity":"sha512-w5Q/9W9mVxKMEiC9rECktw/Aax8W/1/wMgmO6241lPmrWrmLx0N5wmnJTZoE3CoRNFgPai+rl4n4yUf/Z7wItw==","shasum":"da186cf88afeb688bc221a8a7dd288ba8589cc5a","tarball":"https://registry.npmjs.org/@stainless-api/tsc-multi/-/tsc-multi-1.1.12.tgz","fileCount":43,"unpackedSize":107655,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEW2Pibh/jMe0viYAdVeSh3pt5vWEF541ZOmyorzyrDlAiEAyBTz/KVQv3zvGNK01WqTgZK/K/tyHL9ZP445vFTZVtY="}]},"_npmUser":{"name":"stainless-api","email":"dev@stainlessapi.com"},"directories":{},"maintainers":[{"name":"stainless-api","email":"dev@stainlessapi.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tsc-multi_1.1.12_1782503655673_0.712134752880724"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-26T15:41:47.753Z","modified":"2026-06-26T19:54:15.934Z","1.1.10":"2026-06-26T15:41:48.110Z","1.1.11":"2026-06-26T15:44:59.080Z","1.1.12":"2026-06-26T19:54:15.812Z"},"bugs":{"url":"https://github.com/stainless-api/tsc-multi/issues"},"author":{"name":"Tommy Chen","email":"tommy351@gmail.com"},"license":"MIT","homepage":"https://github.com/stainless-api/tsc-multi#readme","keywords":["typescript","tsc","ts","compiler"],"repository":{"type":"git","url":"git+https://github.com/stainless-api/tsc-multi.git"},"description":"Compile multiple TypeScript projects into multiple targets.","maintainers":[{"name":"stainless-api","email":"dev@stainlessapi.com"}],"readme":"# tsc-multi\n\n[![](https://img.shields.io/npm/v/tsc-multi.svg)](https://www.npmjs.com/package/tsc-multi) ![Test](https://github.com/stainless-api/tsc-multi/workflows/Test/badge.svg)\n\nCompile multiple TypeScript projects into multiple targets.\n\n## Features\n\n### Multiple targets\n\ntsc-multi can compile your TypeScript projects into multiple modules (e.g. CommonJS, ESM) or targets (e.g. ES6, ES2018) in parallel.\n\n### Project references\n\ntsc-multi supports [project references](https://www.typescriptlang.org/docs/handbook/project-references.html), which are very useful for monorepo. It works just like `tsc --build`. File watching is also supported.\n\n### Rewrite import paths\n\ntsc-multi rewrites all import paths in output files to maximize the compatibility across different platforms such as Node.js, web browser and Deno, because import paths are more strict in ESM.\n\nExample:\n\n```ts\n// Input\nimport dir from \"./dir\";\nimport file from \"./file\";\n\n// Output\nimport dir from \"./dir/index.js\";\nimport file from \"./file.js\";\n```\n\n## Installation\n\n```sh\nnpm install tsc-multi --save-dev\n```\n\n## Usage\n\nCreate a `tsc-multi.json` in the folder.\n\n```json\n{\n  \"targets\": [\n    { \"extname\": \".cjs\", \"module\": \"commonjs\" },\n    { \"extname\": \".mjs\", \"module\": \"esnext\" }\n  ],\n  \"projects\": [\"packages/*/tsconfig.json\"]\n}\n```\n\nBuild TypeScript files.\n\n```sh\ntsc-multi\n```\n\nWatch changes and rebuild TypeScript files.\n\n```sh\ntsc-multi --watch\n```\n\nDelete built files.\n\n```sh\ntsc-multi --clean\n```\n\n## Configuration\n\n### `targets`\n\nBuild targets. All options except `extname`, `shareHelpers`, and `pureClassAssignment` will override `compilerOptions` in `tsconfig.json`.\n\n```js\n{\n  // Rename the extension of output files\n  extname: \".js\",\n  // Emit all helpers to one file\n  shareHelpers: \"helpers.js\",\n  // Wrap static assignments to a class in @__PURE__ comments\n  pureClassAssignment: true,\n  // Skip type-checking (Experimental)\n  transpileOnly: false,\n  // Compiler options\n  module: \"esnext\",\n  target: \"es2018\",\n}\n```\n\n### `projects`\n\nPath to TypeScript projects. It can be either a folder which contains `tsconfig.json`, or the path to `tsconfig.json`. This option can be set in either config file or CLI.\n\n```js\n[\n  // CWD\n  \".\",\n  // Folder\n  \"pkg-a\",\n  // tsconfig.json path\n  \"tsconfig.custom.json\",\n  // Glob\n  \"packages/*/tsconfig.json\",\n];\n```\n\n### `compiler`\n\nSpecify a custom TypeScript compiler (e.g. [ttypescript]).\n\n### `maxWorkers`\n\nSpecify the maximum number of concurrent workers.\n\n## CLI Options\n\n### `--watch`\n\nWatch input files and rebuild when they are changed.\n\n### `--clean`\n\nDelete built files. Only available when `compilerOptions.rootDir` is specified in `tsconfig.json`.\n\n### `--verbose`\n\nPrint debug logs.\n\n### `--cwd`\n\nSpecify the current working directory (CWD).\n\n### `--config`\n\nSpecify the path of the config file. The path can be either a relative path or an absolute path. Default to `$CWD/tsc-multi.json`.\n\n### `--compiler`\n\nSpecify a custom TypeScript compiler.\n\n### `--dry`\n\nShow what would be done but doesn't actually build anything.\n\n### `--force`\n\nRebuild all projects.\n\n### `--maxWorkers`\n\nSpecify the maximum number of concurrent workers.\n\n## Caveats\n\n- Only file extension can be renamed currently.\n- Only CommonJS and ESM are tested currently, AMD, UMD or SystemJS modules may have issues.\n- When workers read/write type declaration files (`.d.ts`), there are few chances that TypeScript compiler might read files that is writing by other workers. This usually only happens on machines with poor IO performance. Set `maxWorkers` to `1` may help.\n\n## License\n\nMIT\n\n[ttypescript]: https://github.com/cevek/ttypescript\n","readmeFilename":"README.md"}