{"_id":"fastify-tsconfig","_rev":"4-4cdfea77b8f718a9c70781ba6b094968","name":"fastify-tsconfig","dist-tags":{"latest":"3.0.0"},"versions":{"1.0.0":{"name":"fastify-tsconfig","version":"1.0.0","keywords":["tsconfig","typescript","ts","config","configuration","fastify"],"author":{"url":"https://maksim.dev","name":"Maksim Sinik","email":"maksim@sinik.it"},"license":"MIT","_id":"fastify-tsconfig@1.0.0","maintainers":[{"name":"fox1t","email":"maksim@sinik.it"}],"homepage":"https://github.com/fastify/tsconfig#readme","bugs":{"url":"https://github.com/fastify/tsconfig/issues"},"dist":{"shasum":"ebfe3a7931cdcf05c0eb5f0668c461777ac98175","tarball":"https://registry.npmjs.org/fastify-tsconfig/-/fastify-tsconfig-1.0.0.tgz","fileCount":4,"integrity":"sha512-TbTIYZJOUmWKJ7Bxl7qImU3ESJiM96wtyd0r54TwRTIPhWY747vitVcacKKTKfPbZQTou3nZTXOjP/QnWpXDfQ==","signatures":[{"sig":"MEYCIQDyBWpI7mNxVw6w/5cDlOSSn3xEzCCux7wLWCWaT2XQQwIhAIKdgZKBfApNZL9PSBdkMNGiHPi63TCjVcvB9uf2HS9j","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbaPBCRA9TVsSAnZWagAAKckP/R5KOjnnDLqPEmioOcdZ\nkqY6ABQTYW0y8SyQ5rniW75btCSuxKydx2BntB6cL5yaWzNOhJDv1skjxy6K\n5HvmznvmCGX4ilFs8V6uPcdfTH9I87/kGrTT4FJ0+UAIbEbtOyKBWb2+VOHG\nUm7XElNu4Q3y17c3o6eyAvi63DVf0+hAG0ZRHWaYvEgDC+fkpDzVjGN1QCk8\ng4N1cBGTa0BNOdAOLlVvVUgDXR4c2PJ+JDwTi4tvK+IvyCZyvZeVW84adAjb\n5wZk3iNQgmzDHUCJNp2mO5P+NaKAU+jFNtkKyhoT+o+Czr7BvXd5i6NFUBZ8\najrROOYcspm6dCqmd5Chz/yaQz6+7cBa+Iin9tsniuGULy1YldW4D98h9dKl\nY2EySHBEhdU7Rxmuph+oRPe9d5zBvgVTLzRxkY8T+39b5rR3uuui0K/1Opdf\nmgymYin5C5HOsskW3IhTajUip73erEG/1qWXLm0u33VE3Ms1r3nm3XA7tn9e\nZAJYsn/eD7LwDi9rLEuP1sHfh52uZSYYywgtdwuFD0Nodo0EIVvOwS9zxv+4\n/3ph5XixhRYl7Ta9outzddMlX1sNGMKm5LSYaArY5DNFG41OjTyPc0N23x4i\nml5l1nwV5Op/WNdmUS9Af+PoRydr+SMb+IKhR/Vgr06xBRhhLHDdTyA2zvrs\nC0+n\r\n=3kIL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"tsconfig.json","engines":{"node":">=10.4.0"},"gitHead":"1360eab061868865475aa5112240b48eb6540452","_npmUser":{"name":"fox1t","email":"maksim@sinik.it"},"repository":{"url":"git+https://github.com/fastify/tsconfig.git","type":"git"},"_npmVersion":"6.14.5","description":"Shared TypeScript configuration","directories":{},"_nodeVersion":"12.18.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/fastify-tsconfig_1.0.0_1601020864759_0.908574299365714","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"fastify-tsconfig","version":"1.0.1","keywords":["tsconfig","typescript","ts","config","configuration","fastify"],"author":{"url":"https://maksim.dev","name":"Maksim Sinik","email":"maksim@sinik.it"},"license":"MIT","_id":"fastify-tsconfig@1.0.1","maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"delvedor","email":"tommydelved@gmail.com"},{"name":"fox1t","email":"maksim@sinik.it"}],"homepage":"https://github.com/fastify/tsconfig#readme","bugs":{"url":"https://github.com/fastify/tsconfig/issues"},"dist":{"shasum":"ec90e45fa8aa72b81178757bd5940c7875037639","tarball":"https://registry.npmjs.org/fastify-tsconfig/-/fastify-tsconfig-1.0.1.tgz","fileCount":4,"integrity":"sha512-BXkTG3JYcjJb3xX5R5FcE9ciscV/h7YtmnkiSaNAONd1g6ooMSN/4GWfhA8hnS6SRZFYBBxsn8719Mj9lbCOtA==","signatures":[{"sig":"MEQCIHFADzBNV7TpFA5WTjkQFCMDYZfsHy5mG/AKFNnSB0aWAiAQ+z0kOIXVgx2aV91A4xdtQRXxDZVuBAGziHR7ldhHxw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfq/sbCRA9TVsSAnZWagAAcZUP/AuFRiCX014Dewceto4j\npyIrbW7zDrwj/5byGpIPa9CQPS0eNa7iWeeQQLNadQbw+yf7fIrxlTW7Pg1u\n4mJ2UDXjLUhuVmo5Evl0vgYMbi2jPtzIGJe85SKaxsJjAOrfisns5KRn+zPs\n5st0bZdFpuOXUoNAiVMdJHlapqrR6BQp+hJ3y43AMVhSmZ56VY9FHX/2hR9q\nCcisPb5PmO1yC3wCLzaHEc+syReTDLSTlslZkfrNXrVGLvus4u2aiTIKXxzJ\nNVNVZZTeH7dOJajodnK3AGZh0ZasI1K4yxi7nZRIC6qutjNRA471r4FeA0T/\njEONW6r0LV96NjjP73INUQB2bi/8VGrzmr/s7ig4S2PUpcpSkJzGEV35XL/3\n+ai+mObbqOxkoC1aehftI0M5dNySLlh1jhwo15gio7rsyrxPEph/a1Ilak2b\nWKouCx/2PgAEgBNiIiGMcJnIixwtr4ufB5gsp6hgjrHTBFPMpTovvb8yYaTP\ndzfrpqOLD+NfS/GwLnSZE5ywSoS37MsAkxL+cyN5wj4MyI1oZYe7e2MDdS2s\nPiLqL1pDZz8MPhB0P4U6eYS47qcudbjGcIbzCV1t62EuqTIEVYQ79iHiucaO\n/9TIxK/A08M40ddsEpK3czLEO2B2lU/n+wwgBJZUWnFckzPtmmGx6u3oAOcu\nrSb0\r\n=Juof\r\n-----END PGP SIGNATURE-----\r\n"},"main":"tsconfig.json","engines":{"node":">=10.4.0"},"gitHead":"4a9011eaf6e5907045c39bb8377904f7e01c9869","_npmUser":{"name":"fox1t","email":"maksim@sinik.it"},"repository":{"url":"git+https://github.com/fastify/tsconfig.git","type":"git"},"_npmVersion":"6.14.5","description":"Shared TypeScript configuration","directories":{},"_nodeVersion":"12.18.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/fastify-tsconfig_1.0.1_1605106458916_0.20672839430142176","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"fastify-tsconfig","version":"2.0.0","keywords":["tsconfig","typescript","ts","config","configuration","fastify"],"author":{"url":"https://maksim.dev","name":"Maksim Sinik","email":"maksim@sinik.it"},"license":"MIT","_id":"fastify-tsconfig@2.0.0","maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"delvedor","email":"tommydelved@gmail.com"},{"name":"fox1t","email":"maksim@sinik.it"}],"homepage":"https://github.com/fastify/tsconfig#readme","bugs":{"url":"https://github.com/fastify/tsconfig/issues"},"dist":{"shasum":"960367cdb368562948d446dd14f67bed45a92085","tarball":"https://registry.npmjs.org/fastify-tsconfig/-/fastify-tsconfig-2.0.0.tgz","fileCount":4,"integrity":"sha512-pvYwdtbZUJr/aTD7ZE0rGlvtYpx7IThHKVLBoqCKmT3FJpwm23XA2+PDmq8ZzfqqG4ajpyrHd5bkIixcIFjPhQ==","signatures":[{"sig":"MEUCIQD0j4rOJh5BFajrXyluZsGzBornaK90Ac5j/fOq483i7wIgec/jhFiY7WSGenOAJfKAWPah2IfCrWlJbwoazlDfr2k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6082},"main":"tsconfig.json","engines":{"node":">=18.0.0"},"gitHead":"f8bf1f87b794bf110d2c1359264d2d90a0e907db","_npmUser":{"name":"fox1t","email":"maksim@sinik.it"},"repository":{"url":"git+https://github.com/fastify/tsconfig.git","type":"git"},"_npmVersion":"9.8.1","description":"Shared TypeScript configuration","directories":{},"_nodeVersion":"20.6.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/fastify-tsconfig_2.0.0_1695112552238_0.8618698920982324","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"fastify-tsconfig","version":"3.0.0","description":"Shared TypeScript configuration","license":"MIT","repository":{"type":"git","url":"git+https://github.com/fastify/tsconfig.git"},"bugs":{"url":"https://github.com/fastify/tsconfig/issues"},"homepage":"https://github.com/fastify/tsconfig#readme","funding":[{"type":"github","url":"https://github.com/sponsors/fastify"},{"type":"opencollective","url":"https://opencollective.com/fastify"}],"author":{"name":"Maksim Sinik","email":"maksim@sinik.it","url":"https://maksim.dev"},"main":"tsconfig.json","engines":{"node":">=20.0.0"},"keywords":["tsconfig","typescript","ts","config","configuration","fastify"],"_id":"fastify-tsconfig@3.0.0","gitHead":"96c65aef12e9a1239806d5990baadfd31e35024a","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-TxFM9+MUUM2Ub6chZbP5sPNUFaPWA86kHU0VRd4o9OP6PBP92cj9c4/IEsnLoVHcLgrgXf2GUXWUzkJAO9iKFQ==","shasum":"1fd130dc530a8b0a35ecf3cc2480220a97e53d57","tarball":"https://registry.npmjs.org/fastify-tsconfig/-/fastify-tsconfig-3.0.0.tgz","fileCount":4,"unpackedSize":6285,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUNZ3wlQCl+PDEDN3yG7lsukcU9Y0k3pn0F0Z6K4AMVwIhAKtyHbVx+xTviuFs1JhCyrkKkEqKhOyPibNw+yhJ3g9S"}]},"_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"directories":{},"maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"delvedor","email":"tommydelved@gmail.com"},{"name":"fox1t","email":"maksim@sinik.it"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/fastify-tsconfig_3.0.0_1736763737770_0.13221238138012392"},"_hasShrinkwrap":false}},"time":{"created":"2020-09-25T08:01:04.759Z","modified":"2025-01-13T10:22:18.085Z","1.0.0":"2020-09-25T08:01:04.877Z","1.0.1":"2020-11-11T14:54:19.068Z","2.0.0":"2023-09-19T08:35:52.387Z","3.0.0":"2025-01-13T10:22:17.926Z"},"bugs":{"url":"https://github.com/fastify/tsconfig/issues"},"author":{"name":"Maksim Sinik","email":"maksim@sinik.it","url":"https://maksim.dev"},"license":"MIT","homepage":"https://github.com/fastify/tsconfig#readme","keywords":["tsconfig","typescript","ts","config","configuration","fastify"],"repository":{"type":"git","url":"git+https://github.com/fastify/tsconfig.git"},"description":"Shared TypeScript configuration","maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"delvedor","email":"tommydelved@gmail.com"},{"name":"fox1t","email":"maksim@sinik.it"}],"readme":"# tsconfig\n\n> Shared [TypeScript configuration](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) for fastify projects\n\n## Install\n\n```\n$ npm i -D fastify-tsconfig\n```\n\n## Usage\n\nCreate your own `tsconfig.json` in the projects' root folder and extend it from `fastify-tsconfig`, overriding or adding the desired settings. By default, no `outDir` is set (because of [this issue](https://github.com/Microsoft/TypeScript/issues/29172)), so be sure to add one.\n\n### Configuration module and moduleResolution\n\nThis configuration sets `\"module\"` and `\"moduleResolution\"` to [`NodeNext`](https://www.typescriptlang.org/docs/handbook/esm-node.html). This means that TypeScript will read the nearest `package.json` file in the scope and search for the `\"type\"` field or the absence of it.\n\nIf `type` is not set or is `\"type\": \"commonjs\"` the emitted code will be CommonJS, with `.js` extension. Moreover, `tsc` will complain if ESM-only properties/features are used in source files. If you want to emit `.mjs` files, use the `.mts` extension.\nOn the other hand, if `\"type\": \"module\"` is set, the sources will be compiled to the ESM with the `.js` extension. In this case, if you want to emit `.cjs` files, use the `.cts` extension for the source file.\n\nThe \"following the Node.js rules\" goes also for the `package.json` `exports` field. If `type` is set, regardless of the value, TypeScript will check the `exports` field to know where the compiled code and the types are located. If the `type` field is not set, it will check for the `main` and `types` fields.\n\n#### CommonJS example\n`package.json`\n```jsonc\n{\n  \"name\": \"my-package\",\n  \"type\": \"commonjs\",\n  \"main\": \"dist/index.js\", // this is for older Node.js versions\n  \"types\": \"dist/index.d.ts\", // this is optional and can be omitted\n  \"exports\": {\n    \"import\": \"./dist/index.js\",\n    \"require\": \"./dist/index.js\",\n    \"types\": \"./dist/index.d.ts\" // this is optional and can be omitted\n }\n}\n```\n`tsconfig.json`\n```jsonc\n{\n \"extends\": \"fastify-tsconfig\",\n \"compilerOptions\": {\n    \"outDir\": \"dist\",\n    \"sourceMap\": true\n  },\n  \"include\": [\n    \"src/**/*.ts\"\n  ]\n}\n```\n#### ESM example\n`package.json`\n```jsonc\n{\n  \"name\": \"my-package\",\n  \"type\": \"module\",\n  \"main\": \"dist/index.js\", // this is for older Node.js versions\n  \"types\": \"dist/index.d.ts\", // this is optional and can be omitted\n  \"exports\": {\n    \"import\": \"./dist/index.js\",\n    \"require\": \"./dist/index.js\",\n    \"types\": \"./dist/index.d.ts\" // this is optional and can be omitted\n }\n}\n```\n`tsconfig.json`\n```jsonc\n{\n \"extends\": \"fastify-tsconfig\",\n \"compilerOptions\": {\n    \"outDir\": \"dist\",\n    \"sourceMap\": true\n  },\n  \"include\": [\n    \"src/**/*.ts\"\n  ]\n}\n```\n### Extending this configuration\n\nDepending on the type of the project, you should add the following settings.\n\n#### Application\n`tsconfig.json`\n```json\n{\n \"extends\": \"fastify-tsconfig\",\n \"compilerOptions\": {\n    \"outDir\": \"dist\",\n    \"sourceMap\": true\n },\n \"include\": [\n    \"src/**/*.ts\"\n ]\n}\n```\n#### NPM Package\n`tsconfig.json`\n\n```json\n{\n \"extends\": \"fastify-tsconfig\",\n \"compilerOptions\": {\n    \"outDir\": \"dist\",\n    \"declaration\": true\n },\n \"include\": [\n    \"src/**/*.ts\"\n ]\n}\n```\n#### Monorepo Package\n`tsconfig.json`\n\n```json\n{\n \"extends\": \"fastify-tsconfig\",\n \"compilerOptions\": {\n    \"outDir\": \"dist\",\n    \"declarationMap\": true,\n    \"composite\": true\n },\n \"include\": [\n    \"src/**/*.ts\"\n ]\n}\n```\n\nCheck the other settings [here](./tsconfig.json)\n\n## Configuration target\n\nThe configuration targets ES2023, which is supported in Node.js 20 and later. However, using ES2023 as a target makes widely used features not being compiled. To target an older version, override the `target` property.\n\n## License\n\nLicensed under [MIT](./LICENSE).\n\n---\n\nInspired by: [sindresorhus/tsconfig](https://github.com/sindresorhus/tsconfig)\n\n","readmeFilename":"README.md"}