{"name":"cosmiconfig-typescript-loader","version":"6.0.0","keywords":["cosmiconfig","typescript"],"author":{"name":"Alex Miller","email":"codex.nz@gmail.com"},"license":"MIT","_id":"cosmiconfig-typescript-loader@6.0.0","homepage":"https://github.com/Codex-/cosmiconfig-typescript-loader#readme","bugs":{"url":"https://github.com/Codex-/cosmiconfig-typescript-loader/issues"},"dist":{"shasum":"a4aac54a933c97f9d4aadb180d08fc08a568b722","tarball":"http://registry-npm.ywwl.com/cosmiconfig-typescript-loader/download/cosmiconfig-typescript-loader-6.0.0.tgz","fileCount":12,"integrity":"sha512-Pi86SNGpc99r5jRNv94gbFO0rE/eSWwcpMGeLDbhNaPqZBCHtoouNVPqOE4p0/mFeNE9Us/S6qQknntn26uX9Q==","signatures":[{"sig":"MEUCIE27sv2EUHMoaBLJqXp3PD2lnA1sxQu470NZn7JRRVzDAiEAvt4jWak2+m4Z9WKnRjV/qHEKFeDg5KAJcOc+yK+1rXw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13860,"size":4020,"noattachment":false,"key":"/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-6.0.0.tgz"},"main":"dist/cjs/index.cjs","types":"dist/types/index.d.ts","module":"dist/esm/index.mjs","engines":{"node":">=v18"},"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":"3757a12bacf20582fbbb6191a33765e2823e567b","scripts":{"lint":"eslint","test":"jest","build":"pnpm build:types && pnpm build:sources","format":"pnpm format:check --write","release":"release-it","lint:fix":"pnpm 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":"^2.3.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","chalk":"^5.3.0","eslint":"^9.13.0","esbuild":"^0.24.0","prettier":"^3.3.3","@swc/core":"^1.7.36","@swc/jest":"^0.2.36","release-it":"^17.10.0","typescript":"^5.6.3","@types/jest":"^29.5.13","cosmiconfig":"^9.0.0","auto-changelog":"^2.5.0","typescript-eslint":"^8.10.0","eslint-config-prettier":"^9.1.0","eslint-plugin-import-x":"^4.3.1","@typescript-eslint/eslint-plugin":"^8.10.0","eslint-import-resolver-typescript":"^3.6.3"},"peerDependencies":{"typescript":">=5","@types/node":"*","cosmiconfig":">=9"},"_npmOperationalInternal":{"tmp":"tmp/cosmiconfig-typescript-loader_6.0.0_1729311586061_0.7054150372191674","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":1729311586272,"maintainers":[{"name":"codex-","email":"codex.nz@gmail.com"}],"_cnpm_publish_time":1729311586272,"dist-tags":{"latest":"6.3.0"}}