{"_id":"@bestcodetools/jest-tsconfig-paths-mapper","_rev":"2-164bcc6cfd37c72a52e4fea184f74675","name":"@bestcodetools/jest-tsconfig-paths-mapper","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@bestcodetools/jest-tsconfig-paths-mapper","version":"1.0.0","description":"A utility library for generating Jest's moduleNameMapper based on TypeScript's tsconfig.json path mappings.","keywords":["Jest","TypeScript","tsconfig","moduleNameMapper","utility","mapping","path","mapper"],"main":"index.js","types":"index.d.ts","author":{"name":"Douglas Alves Domingues","email":"douglasad.job@gmail.com","url":"https://www.linkedin.com/in/douglas-alves-domingues-6b389372/"},"repository":{"type":"git","url":"git+https://gitlab.com/bestcodetools/nodejs/jest-tsconfig-paths-mapper.git"},"bugs":{"url":"https://gitlab.com/bestcodetools/nodejs/jest-tsconfig-paths-mapper/issues"},"homepage":"https://gitlab.com/bestcodetools/nodejs/jest-tsconfig-paths-mapper#readme","license":"MIT","publishConfig":{"access":"public"},"gitHead":"33470f6ac0e5825e0c4dcfab51556c013a196fc2","_id":"@bestcodetools/jest-tsconfig-paths-mapper@1.0.0","_nodeVersion":"14.20.0","_npmVersion":"6.14.17","dist":{"integrity":"sha512-AlWjPpmDQR1snWTgpZfHYuk//nVdopbxSEx37bWTekZ5G81AA9sJoBrSA+Jh1jhuw8axWmYUbxNWBII2h3xPoA==","shasum":"7e5de6501c50bf3a36ca86b425cd44f10c3f9663","tarball":"https://registry.npmjs.org/@bestcodetools/jest-tsconfig-paths-mapper/-/jest-tsconfig-paths-mapper-1.0.0.tgz","fileCount":5,"unpackedSize":5361,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCaYbr15f/MuVidBRwilRL8F73Q94PEhIMVqxwPtS1MkwIhAN9+prZxvSOu36hVC4gT6KrWdw6t/FRywOyesK57EVug"}]},"_npmUser":{"name":"kamikai","email":"kamikai@gmail.com"},"directories":{},"maintainers":[{"name":"kamikai","email":"kamikai@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-tsconfig-paths-mapper_1.0.0_1683930894589_0.5586379655186033"},"_hasShrinkwrap":false},"1.0.1":{"name":"@bestcodetools/jest-tsconfig-paths-mapper","version":"1.0.1","description":"A utility library for generating Jest's moduleNameMapper based on TypeScript's tsconfig.json path mappings.","keywords":["Jest","TypeScript","tsconfig","moduleNameMapper","utility","mapping","path","mapper"],"main":"index.js","types":"index.d.ts","author":{"name":"Douglas Alves Domingues","email":"douglasad.job@gmail.com","url":"https://www.linkedin.com/in/douglas-alves-domingues-6b389372/"},"repository":{"type":"git","url":"git+https://gitlab.com/bestcodetools/nodejs/jest-tsconfig-paths-mapper.git"},"bugs":{"url":"https://gitlab.com/bestcodetools/nodejs/jest-tsconfig-paths-mapper/issues"},"homepage":"https://gitlab.com/bestcodetools/nodejs/jest-tsconfig-paths-mapper#readme","license":"MIT","publishConfig":{"access":"public"},"gitHead":"ead9c8953872e28dbd93d7e9d0a62b73f44a4d20","_id":"@bestcodetools/jest-tsconfig-paths-mapper@1.0.1","_nodeVersion":"14.20.0","_npmVersion":"6.14.17","dist":{"integrity":"sha512-MmlEZzimsVSfB2VcjzYVC7Kq5GFnpEWzrg8TBgHiuGTeUvJkeT+UyDqRVxNRA6S5xzLlOOy5QLomfgnHmsBwZA==","shasum":"7d4fd3d34e560a3c78b73e4d77714232ea53a1b8","tarball":"https://registry.npmjs.org/@bestcodetools/jest-tsconfig-paths-mapper/-/jest-tsconfig-paths-mapper-1.0.1.tgz","fileCount":5,"unpackedSize":5363,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGOjM+58dsJZoGAizwBAj6FzZKXh9DFDblPxPPjg6XYOAiAbmpzj/ZTdX1R5NIJDHLePjJmWcD/g7TU9eE7o+QmmxQ=="}]},"_npmUser":{"name":"kamikai","email":"kamikai@gmail.com"},"directories":{},"maintainers":[{"name":"kamikai","email":"kamikai@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-tsconfig-paths-mapper_1.0.1_1683947298152_0.5679876364946348"},"_hasShrinkwrap":false},"1.0.2":{"name":"@bestcodetools/jest-tsconfig-paths-mapper","version":"1.0.2","description":"A utility library for generating Jest's moduleNameMapper based on TypeScript's tsconfig.json path mappings.","keywords":["Jest","TypeScript","tsconfig","moduleNameMapper","utility","mapping","path","mapper"],"main":"index.js","types":"index.d.ts","author":{"name":"Douglas Alves Domingues","email":"douglasad.job@gmail.com","url":"https://www.linkedin.com/in/douglas-alves-domingues-6b389372/"},"repository":{"type":"git","url":"git+https://gitlab.com/bestcodetools/nodejs/jest-tsconfig-paths-mapper.git"},"bugs":{"url":"https://gitlab.com/bestcodetools/nodejs/jest-tsconfig-paths-mapper/issues"},"homepage":"https://gitlab.com/bestcodetools/nodejs/jest-tsconfig-paths-mapper#readme","license":"MIT","publishConfig":{"access":"public"},"gitHead":"80137ed46f310856a1cff2b468fe872388a7b17b","_id":"@bestcodetools/jest-tsconfig-paths-mapper@1.0.2","_nodeVersion":"14.20.0","_npmVersion":"6.14.17","dist":{"integrity":"sha512-EU3w36VFsxIcJkfPZKdfZ+qWlJtPmiI0nlf6pZVAG42KQp1dHfF7Z8uF3PcCJjNHVeZPpV9917nMwDyY8mrGCA==","shasum":"4d83d15bf53a29f5dda0617f4fe969ab55863110","tarball":"https://registry.npmjs.org/@bestcodetools/jest-tsconfig-paths-mapper/-/jest-tsconfig-paths-mapper-1.0.2.tgz","fileCount":5,"unpackedSize":5429,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVLePSRa30zCYqnYl9Y4gWmtefOFqNJyiG7y4/aWEM/gIgQtyj1ZZisIBVkMUUuX5eSPg3S3AH/qK409g0nwkklNE="}]},"_npmUser":{"name":"kamikai","email":"kamikai@gmail.com"},"directories":{},"maintainers":[{"name":"kamikai","email":"kamikai@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-tsconfig-paths-mapper_1.0.2_1684355965568_0.8638344332488193"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-12T22:34:54.530Z","1.0.0":"2023-05-12T22:34:54.738Z","modified":"2023-05-17T20:39:25.869Z","1.0.1":"2023-05-13T03:08:18.357Z","1.0.2":"2023-05-17T20:39:25.743Z"},"maintainers":[{"name":"kamikai","email":"kamikai@gmail.com"}],"description":"A utility library for generating Jest's moduleNameMapper based on TypeScript's tsconfig.json path mappings.","homepage":"https://gitlab.com/bestcodetools/nodejs/jest-tsconfig-paths-mapper#readme","keywords":["Jest","TypeScript","tsconfig","moduleNameMapper","utility","mapping","path","mapper"],"repository":{"type":"git","url":"git+https://gitlab.com/bestcodetools/nodejs/jest-tsconfig-paths-mapper.git"},"author":{"name":"Douglas Alves Domingues","email":"douglasad.job@gmail.com","url":"https://www.linkedin.com/in/douglas-alves-domingues-6b389372/"},"bugs":{"url":"https://gitlab.com/bestcodetools/nodejs/jest-tsconfig-paths-mapper/issues"},"license":"MIT","readme":"# @bestcodetools/jest-tsconfig-paths-mapper\n\nA utility library for generating Jest's `moduleNameMapper` based on TypeScript's `tsconfig.json` path mappings.\n\n## Installation\n\nInstall the package using npm:\n\n```shell\nnpm install @bestcodetools/jest-tsconfig-paths-mapper\n```\n\n## Usage\n\n1. Create a `jest.config.js` file in the root of your project if you don't have one already.\n\n2. Import the `generateModuleNameMapper` function from the `@bestcodetools/jest-tsconfig-paths-mapper` package at the top of your `jest.config.js` file:\n\n```javascript\nconst { generateModuleNameMapper } = require('@bestcodetools/jest-tsconfig-paths-mapper');\n```\n\n3. Define the `moduleNameMapper` property in the `module.exports` object of your `jest.config.js` file:\n\n```javascript\nmodule.exports = {\n  // Other Jest configuration options...\n\n  moduleNameMapper: generateModuleNameMapper(),\n};\n```\n\n4. Save the changes to the `jest.config.js` file.\n\n\nThe `generateModuleNameMapper` function automatically reads the `tsconfig.json` file located in the root of your project and generates the `moduleNameMapper` object based on the path mappings defined in the `compilerOptions` section.\n\nNow, when you run your Jest tests, the module name mappings will be resolved correctly based on the `tsconfig.json` paths.\n\n## Custom tsconfig.json Path\n\nIf your `tsconfig.json` file is located in a different directory or has a different name, you can provide the path as an argument to the `generateModuleNameMapper` function:\n\n```javascript\nmodule.exports = {\n  // Other Jest configuration options...\n\n  moduleNameMapper: generateModuleNameMapper('/path/to/custom/tsconfig.json'),\n};\n```\n\nMake sure to replace `/path/to/custom/tsconfig.json` with the actual path to your custom `tsconfig.json` file.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n\nFeel free to customize the README.md file further to include additional sections or provide more detailed instructions as needed.\n","readmeFilename":"readme.md"}