{"name":"cosmiconfig-typescript-loader","version":"5.1.0","keywords":["cosmiconfig","typescript"],"author":{"name":"Alex Miller","email":"codex.nz@gmail.com"},"license":"MIT","_id":"cosmiconfig-typescript-loader@5.1.0","homepage":"https://github.com/Codex-/cosmiconfig-typescript-loader#readme","bugs":{"url":"https://github.com/Codex-/cosmiconfig-typescript-loader/issues"},"dist":{"shasum":"d8d02bff04e63faa2dc794d618168bd764c704be","tarball":"http://registry-npm.ywwl.com/cosmiconfig-typescript-loader/download/cosmiconfig-typescript-loader-5.1.0.tgz","fileCount":12,"integrity":"sha512-7PtBB+6FdsOvZyJtlF3hEPpACq7RQX6BVGsgC7/lfVXnKMvNCu/XY3ykreqG5w/rBNdu2z8LCIKoF3kpHHdHlA==","signatures":[{"sig":"MEUCIGL6p8bkTxB/OFh6dLEZFyAtKmqEhi1iHJKcyDc5zLx2AiEAvUbhBtC3kmxilPpPN2Itb7KlXZS4M7RtYbaiVjPeUWg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12550,"size":4012,"noattachment":false,"key":"/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-5.1.0.tgz"},"main":"dist/cjs/index.cjs","types":"dist/types/index.d.ts","module":"dist/esm/index.mjs","engines":{"node":">=v16"},"exports":{".":{"import":{"types":"./dist/types/index.d.ts","default":"./dist/esm/index.mjs"},"require":{"types":"./dist/types/index.d.ts","default":"./dist/cjs/index.cjs"}}},"gitHead":"4305d60b59b1f0324ec5b1d2b6430741ff096e6e","scripts":{"lint":"eslint --ext \".js,.cjs,.mjs,.ts\" .","test":"jest","build":"npm run build:types && npm run build:sources","format":"npm run format:check -- --write","release":"release-it","lint:fix":"npm run lint -- --fix","build:types":"tsc -p tsconfig.build.json","check:types":"tsc -p tsconfig.json","format:check":"prettier --check \"{**/*,*}.{js,cjs,mjs,ts}\"","build:sources":"node ./scripts/esbuild.config.mjs","test:coverage":"jest --coverage"},"_npmUser":{"name":"codex-","email":"codex.nz@gmail.com"},"repository":{"url":"git+https://github.com/Codex-/cosmiconfig-typescript-loader.git","type":"git"},"_npmVersion":"10.8.2","description":"TypeScript loader for cosmiconfig","directories":{},"_nodeVersion":"20.18.0","dependencies":{"jiti":"^1.21.6"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","chalk":"^5.3.0","eslint":"^8.57.1","esbuild":"^0.24.0","prettier":"^3.3.3","@swc/core":"^1.7.26","@swc/jest":"^0.2.36","release-it":"^17.6.0","typescript":"^5.6.2","@types/jest":"^29.5.13","cosmiconfig":"^9.0.0","eslint-plugin-import":"^2.30.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.2.1","eslint-config-airbnb-typescript":"^18.0.0","@typescript-eslint/eslint-plugin":"^7.18.0"},"peerDependencies":{"typescript":">=4","@types/node":"*","cosmiconfig":">=8.2"},"_npmOperationalInternal":{"tmp":"tmp/cosmiconfig-typescript-loader_5.1.0_1729297141956_0.5873543069961575","host":"s3://npm-registry-packages"},"readme":"# cosmiconfig-typescript-loader\n\n> ⚙️🚀 TypeScript config file support for cosmiconfig\n\n[![build](https://github.com/Codex-/cosmiconfig-typescript-loader/actions/workflows/build.yml/badge.svg)](https://github.com/Codex-/cosmiconfig-typescript-loader/actions/workflows/build.yml)\n[![codecov](https://codecov.io/gh/Codex-/cosmiconfig-typescript-loader/branch/main/graph/badge.svg?token=WWGNIPC249)](https://codecov.io/gh/Codex-/cosmiconfig-typescript-loader)\n[![npm](https://img.shields.io/npm/v/cosmiconfig-typescript-loader.svg)](https://www.npmjs.com/package/cosmiconfig-typescript-loader)\n\n## Usage\n\nSimply add `TypeScriptLoader` to the list of loaders for the `.ts` file type, and `await` loading:\n\n```ts\nimport { cosmiconfig } from \"cosmiconfig\";\nimport { TypeScriptLoader } from \"cosmiconfig-typescript-loader\";\n\nconst moduleName = \"module\";\nconst explorer = cosmiconfig(\"test\", {\n  searchPlaces: [\n    \"package.json\",\n    `.${moduleName}rc`,\n    `.${moduleName}rc.json`,\n    `.${moduleName}rc.yaml`,\n    `.${moduleName}rc.yml`,\n    `.${moduleName}rc.js`,\n    `.${moduleName}rc.ts`,\n    `.${moduleName}rc.cjs`,\n    `${moduleName}.config.js`,\n    `${moduleName}.config.ts`,\n    `${moduleName}.config.cjs`,\n  ],\n  loaders: {\n    \".ts\": TypeScriptLoader(),\n  },\n});\n\nconst cfg = await explorer.load(\"./\");\n```\n\nOr more simply if you only support loading of a TypeScript based configuration file:\n\n```ts\nimport { cosmiconfig } from \"cosmiconfig\";\nimport { TypeScriptLoader } from \"cosmiconfig-typescript-loader\";\n\nconst moduleName = \"module\";\nconst explorer = cosmiconfig(\"test\", {\n  loaders: {\n    \".ts\": TypeScriptLoader(),\n  },\n});\n\nconst cfg = await explorer.load(\"./amazing.config.ts\");\n```\n\n### Synchronously loading\n\nWith the release of Jiti 2, the synchronous loader has now been deprecated. It can still be used by using the `TypeScriptLoaderSync` export:\n\n```ts\nimport { cosmiconfig } from \"cosmiconfig\";\nimport { TypeScriptLoaderSync } from \"cosmiconfig-typescript-loader\";\n\nconst moduleName = \"module\";\nconst explorer = cosmiconfig(\"test\", {\n  loaders: {\n    \".ts\": TypeScriptLoaderSync(),\n  },\n});\n\nconst cfg = explorer.load(\"./amazing.config.ts\");\n```\n\n## `@endemolshinegroup/cosmiconfig-typescript-loader`\n\nThis package serves as a drop in replacement for `@endemolshinegroup/cosmiconfig-typescript-loader`. At the time of publishing this, `endemolshinegroup` is not maintaining the original package. I can only assume this is to do with the fact that Endemol Shine Group [was purchased and absorbed by another business](https://en.wikipedia.org/wiki/Endemol_Shine_Group#Sale_to_Banijay). This discontinuation of development efforts towards the original package left any open issues and pull requests unresolved.\n\nThis new package resolves the following original issues:\n\n- [`#134`](https://github.com/EndemolShineGroup/cosmiconfig-typescript-loader/issues/134): \"Doesn't work with Cosmiconfig sync API\"\n- [`#147`](https://github.com/EndemolShineGroup/cosmiconfig-typescript-loader/issues/147): \"doesn't provide typescript, requested by ts-node\"\n- [`#155`](https://github.com/EndemolShineGroup/cosmiconfig-typescript-loader/issues/155): \"Misleading TypeScriptCompileError when user's tsconfig.json \"module\" is set to \"es2015\"\"\n","publish_time":1729297142141,"maintainers":[{"name":"codex-","email":"codex.nz@gmail.com"}],"_cnpm_publish_time":1729297142141,"dist-tags":{"latest":"6.3.0"}}