{"_id":"fix-tsup-cjs","_rev":"3-b0a523fcaa9d872b3eb95acb8ab4139c","name":"fix-tsup-cjs","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"fix-tsup-cjs","version":"1.0.0","description":"Fix the commonjs default export statement and type definition of tsup output","keywords":["tsup","cjs","postbuild","commonjs","commonjs dts","commonjs types","module.exports","export default"],"repository":{"url":"git+https://github.com/u3u/fix-tsup-cjs.git"},"license":"MIT","author":{"name":"u3u","email":"qwq@qwq.cat","url":"https://github.com/u3u"},"sideEffects":false,"type":"module","exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.js"}},"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","typesVersions":{"*":{"*":["./dist/*","./dist/index.d.ts"]}},"bin":{"fix-tsup-cjs":"dist/cli.js"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"lint-staged":{"*.{js,ts,md,json}":["prettier --write"]},"dependencies":{"cac":"^6.7.14","fast-glob":"^3.2.12","kolorist":"^1.8.0","read-pkg":"^8.0.0"},"devDependencies":{"@tsconfig/node18":"^2.0.0","@types/node":"^18.16.3","@u3u/prettier-config":"^1.0.2","fix-tsup-cjs":"link:","lint-staged":"^13.2.2","prettier":"^2.8.8","simple-git-hooks":"^2.8.1","tsup":"^6.7.0","typescript":"^5.0.4"},"packageManager":"pnpm@8.3.1","publishConfig":{"access":"public"},"scripts":{"build":"tsup","format":"prettier --write .","preinstall":"npx only-allow pnpm"},"bugs":{"url":"https://github.com/u3u/fix-tsup-cjs/issues"},"homepage":"https://github.com/u3u/fix-tsup-cjs#readme","_id":"fix-tsup-cjs@1.0.0","_integrity":"sha512-AGBEPJiGrO4RXUZV63V0pQ4FWgcKQvwfTT9a8e/K84Xg3WBmY7GLhU2ugo3QN92GLvbxPG0eNfSu2fWL2psjKQ==","_resolved":"/tmp/e2d47de0d75373246ed47d5d03a467c8/fix-tsup-cjs-1.0.0.tgz","_from":"file:fix-tsup-cjs-1.0.0.tgz","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-AGBEPJiGrO4RXUZV63V0pQ4FWgcKQvwfTT9a8e/K84Xg3WBmY7GLhU2ugo3QN92GLvbxPG0eNfSu2fWL2psjKQ==","shasum":"1899d09e9988bf5b8963f77925931bd41263bec1","tarball":"https://registry.npmjs.org/fix-tsup-cjs/-/fix-tsup-cjs-1.0.0.tgz","fileCount":11,"unpackedSize":20050,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCIkcYVUoiwr4GXqWsUokyH3jLHdW6CiE4jEUwYREA2iwIgQO3xPXZpWlE5bIyNXDeLWHNfWcG6hocVHZe4M4XzFb8="}]},"_npmUser":{"name":"u3u","email":"qwq@qwq.cat"},"directories":{},"maintainers":[{"name":"u3u","email":"qwq@qwq.cat"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fix-tsup-cjs_1.0.0_1683031787938_0.2819137172329891"},"_hasShrinkwrap":false},"1.1.0":{"name":"fix-tsup-cjs","version":"1.1.0","description":"Fix the commonjs default export statement and type definition of tsup output","keywords":["tsup","cjs","postbuild","commonjs","commonjs dts","commonjs types","module.exports","export default"],"repository":{"url":"git+https://github.com/u3u/fix-tsup-cjs.git"},"license":"MIT","author":{"name":"u3u","email":"qwq@qwq.cat","url":"https://github.com/u3u"},"sideEffects":false,"type":"module","exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.js"}},"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","typesVersions":{"*":{"*":["./dist/*","./dist/index.d.ts"]}},"bin":{"fix-tsup-cjs":"dist/cli.js"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"lint-staged":{"*.{js,ts,md,json}":["prettier --write"]},"dependencies":{"cac":"^6.7.14","fast-glob":"^3.2.12","kolorist":"^1.8.0","read-pkg":"^8.0.0"},"devDependencies":{"@tsconfig/node18":"^2.0.0","@types/node":"^18.16.3","@u3u/prettier-config":"^1.0.2","fix-tsup-cjs":"link:","lint-staged":"^13.2.2","prettier":"^2.8.8","simple-git-hooks":"^2.8.1","tsup":"^6.7.0","typescript":"^5.0.4"},"packageManager":"pnpm@8.4.0","publishConfig":{"access":"public"},"scripts":{"build":"tsup","format":"prettier --write .","preinstall":"npx only-allow pnpm"},"bugs":{"url":"https://github.com/u3u/fix-tsup-cjs/issues"},"homepage":"https://github.com/u3u/fix-tsup-cjs#readme","_id":"fix-tsup-cjs@1.1.0","_integrity":"sha512-mhciaaeK74GC+5QeCddSBmN220/WcTbqVsk+8NmzDB1ex/rJMsWx4wX1AjyxvQQ6t/Lo2QDFhqu3lr5qsjvPtg==","_resolved":"/tmp/8ff04814b6fe41f24fe4c08d6cc01083/fix-tsup-cjs-1.1.0.tgz","_from":"file:fix-tsup-cjs-1.1.0.tgz","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-mhciaaeK74GC+5QeCddSBmN220/WcTbqVsk+8NmzDB1ex/rJMsWx4wX1AjyxvQQ6t/Lo2QDFhqu3lr5qsjvPtg==","shasum":"772e80e8ac96ee6e9c7877eb6e0dec3446283481","tarball":"https://registry.npmjs.org/fix-tsup-cjs/-/fix-tsup-cjs-1.1.0.tgz","fileCount":11,"unpackedSize":21488,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7f/fFi9KOdpIfPPBaRWTPhVmKI3U/RoBdWlhdgX9beQIgcW+ViK5dwpB9cTA80nm+jpl8s4PshLikPZcQyHq6CUg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkUezHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpesw/+Nqs3iOEpq9+CSGiU4ROk12+3RU5ht6mcb9sah7WkG+m0CgVJ\r\nh0fjKeNvYCa8mJohHdkLq85+sQUC1bi6yWI6J96c09eaikiJkVlYH0ym8xvY\r\n4i0C4xfFu8jO3rDeUKCWmaRtybevUyGxfFqBEtVY0BPh0JzlnsdvUT7KgbIO\r\nxeqX/OXDlI41yWtZrJOjRC2SHk5Vn1xAo4I2Kvxv/mm7ld977/gDDp4j42jV\r\nNpWvbsiufKU3+0/0yBQaA5jncH7tuvxFnokh7OMjaPCiavDt5A5oxfmviQ+u\r\nFhTqMjNN9vjaWyLp50nPs0gu6egKuPMU8uClMvUKCxm8qcQZjgyxscqyy2Ka\r\npF9vyC3rKM91FpK0Udpx3ccmU7JgGZzgUmWdE9QOb/pa+VR1rG/Bv7c0Ci7B\r\nSSGN1iZgeaguOPNzYXPNqzjgmMgmsm+/s6GN18BhDUvN4Z18B+6ddryn3w7X\r\nLIr2SM5mOUUOwjwtvyN4rYCKUailn5Hrg1P5Ar0lqjRrLGjDNQ1mHsPwXqNW\r\nggHI1ThX1y6bMntsRNuRj340s7Ry/q7kN6IRAofBOSowuw/Rs9Ua5D9ORxcf\r\nKtZWoeyPsOspy1Vdb4eFNCOgL/t9hL2NKRvrofAVuHfW1L4geA0K+IVxlHDS\r\n8rpnB1S73Ft9QI7G24G06xiD9xZEhDfWU5I=\r\n=U2BI\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"u3u","email":"qwq@qwq.cat"},"directories":{},"maintainers":[{"name":"u3u","email":"qwq@qwq.cat"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fix-tsup-cjs_1.1.0_1683090631620_0.6862647444243806"},"_hasShrinkwrap":false},"1.1.1":{"name":"fix-tsup-cjs","version":"1.1.1","description":"Fix the commonjs default export statement and type definition of tsup output","keywords":["tsup","cjs","postbuild","commonjs","commonjs dts","commonjs types","module.exports","export default"],"repository":{"url":"git+https://github.com/u3u/fix-tsup-cjs.git"},"license":"MIT","author":{"name":"u3u","email":"qwq@qwq.cat","url":"https://github.com/u3u"},"sideEffects":false,"type":"module","exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.js"}},"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","typesVersions":{"*":{"*":["./dist/*","./dist/index.d.ts"]}},"bin":{"fix-tsup-cjs":"dist/cli.js"},"simple-git-hooks":{"pre-commit":"npx lint-staged --concurrent false"},"lint-staged":{"*.{js,cjs,ts}":["eslint --fix"],"*":["prettier --write --ignore-unknown"]},"dependencies":{"cac":"^6.7.14","fast-glob":"^3.2.12","kolorist":"^1.8.0","read-pkg":"^8.0.0"},"devDependencies":{"@tsconfig/node18":"^2.0.0","@types/node":"^18.16.3","@u3u/eslint-config":"^1.1.0","@u3u/prettier-config":"^1.0.3","eslint":"^8.39.0","fix-tsup-cjs":"link:","lint-staged":"^13.2.2","prettier":"^2.8.8","simple-git-hooks":"^2.8.1","tsup":"^6.7.0","typescript":"^5.0.4"},"packageManager":"pnpm@8.4.0","publishConfig":{"access":"public"},"scripts":{"build":"tsup","format":"prettier --write .","lint":"eslint --fix ."},"bugs":{"url":"https://github.com/u3u/fix-tsup-cjs/issues"},"homepage":"https://github.com/u3u/fix-tsup-cjs#readme","_id":"fix-tsup-cjs@1.1.1","_integrity":"sha512-kBtiI64blknnXkVfNym45rA81fxaHPEU2A0gWpM5fW5iZ50+k3LjoBVwkwVL/z+AkqCIBCJ653nqXAMGesFWPg==","_resolved":"/tmp/142bc7ab1d20a779092c4a0c43eafdbe/fix-tsup-cjs-1.1.1.tgz","_from":"file:fix-tsup-cjs-1.1.1.tgz","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-kBtiI64blknnXkVfNym45rA81fxaHPEU2A0gWpM5fW5iZ50+k3LjoBVwkwVL/z+AkqCIBCJ653nqXAMGesFWPg==","shasum":"84f36e0721d8abb343d9c27375ad1e76b5ddf8a3","tarball":"https://registry.npmjs.org/fix-tsup-cjs/-/fix-tsup-cjs-1.1.1.tgz","fileCount":11,"unpackedSize":21609,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB0PXOTKmO82uLATi39f3+ZqCNORXMgpCpH3KhB+M/HwAiEA4i0/qjc4s7qZRPDrBCDoxtPn33KjhXoMoAOXObkfgik="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkU1jbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqPZA/9G9AgIQwJvtYXPgHb1Yzp+/xdt2p/+YsTBRmZ62TWzxjuEj2H\r\nezGdRIlZ2a4Ybb0nH3dWTrgkeRTVHu7FghIi075FAbCsOStI15BxTbkgivHV\r\nHso6An5f8ceOS877HCmZQ3OVkjCG4NcUW2Q82TKDBOPg4B4qWKN06UYx0OMU\r\nQN5hX9CwgHbQa8G4sVQJmJKPzFsUg3FhkQphyYEY2NCJg4AS0Ln9+/TZcJHG\r\nFXiMKuyh441N2eNFcrEPVGHtwKNXYNjCG/F43HqzlN/lF/wsFqD3DZamFjAV\r\nArOfJjOd9W1MVpF7fIOp9F5bxc0mCFYTYFj8W8f0F8C84wmeTJNyAiG97sLU\r\nL+hohoWmgSxO1ixN7DCAQ9fQmB9CpdZgXliZG2KshvepCd20VhW6qG2rmFg1\r\np5ZsDwyRaD3vE0ExliLPZ1XTDcfbSwMQKBt1mSzHuiBGtaReoAyA5kMJp0DD\r\nINzh1q1AebtohBiq8UguxAXkxiIvbZBsdymq1dURGEc86ogVss12l4DAw+yq\r\n3aT2QphwPTc2X1O+O5B72M3omXaSKa0W6/4zeZK4tj81W5Jp5/SNCtmY+wme\r\nU6ZGNGWl0ZhnHiFo3FsuglwZ+WXxCtogD/UZtaOdvwUz4Wfft8FX9Sz/m9up\r\nUoAkhcT2iYwS65L271PNExpaQis8omjWMr8=\r\n=jVrN\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"u3u","email":"qwq@qwq.cat"},"directories":{},"maintainers":[{"name":"u3u","email":"qwq@qwq.cat"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fix-tsup-cjs_1.1.1_1683183835001_0.8530253401127943"},"_hasShrinkwrap":false},"1.2.0":{"name":"fix-tsup-cjs","version":"1.2.0","description":"Fix the commonjs default export statement and type definition of tsup output","keywords":["tsup","cjs","postbuild","commonjs","commonjs dts","commonjs types","module.exports","export default"],"repository":{"url":"git+https://github.com/u3u/fix-tsup-cjs.git"},"license":"MIT","author":{"name":"u3u","email":"qwq@qwq.cat","url":"https://github.com/u3u"},"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.js","import":"./dist/index.mjs"}},"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","typesVersions":{"*":{"*":["./dist/*","./dist/index.d.ts"]}},"bin":{"fix-tsup-cjs":"dist/cli.js"},"simple-git-hooks":{"pre-commit":"npx lint-staged --concurrent false"},"lint-staged":{"*.{js,cjs,ts}":["eslint --fix"],"*":["prettier --write --ignore-unknown"]},"dependencies":{"cac":"^6.7.14","fast-glob":"^3.3.1","kolorist":"^1.8.0","read-pkg":"^8.0.0"},"devDependencies":{"@tsconfig/node18":"^18.2.0","@types/node":"^18.17.4","@u3u/eslint-config":"^2.9.1","@u3u/prettier-config":"^3.0.1","@vitest/coverage-v8":"^0.34.1","@vitest/ui":"^0.34.1","eslint":"^8.46.0","execa":"^7.2.0","fix-tsup-cjs":"link:","lint-staged":"^13.2.3","prettier":"^2.8.8","simple-git-hooks":"^2.9.0","tsup":"^7.2.0","typescript":"^5.1.6","vitest":"^0.34.1"},"packageManager":"pnpm@8.6.12","publishConfig":{"access":"public"},"scripts":{"build":"tsup","format":"prettier --write .","lint":"eslint --fix .","test":"vitest --ui --coverage"},"bugs":{"url":"https://github.com/u3u/fix-tsup-cjs/issues"},"homepage":"https://github.com/u3u/fix-tsup-cjs#readme","_id":"fix-tsup-cjs@1.2.0","_integrity":"sha512-5z2nZxrnKxk+jLq5TyD0xbPXI2I18FF+knIZVG55e0CXWgXF/F4SpCBsiW7JTBPwghqXsC66T2yctnVT/sMO0g==","_resolved":"/tmp/feb7e4ae48a0df6e00747cd78edfe590/fix-tsup-cjs-1.2.0.tgz","_from":"file:fix-tsup-cjs-1.2.0.tgz","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-5z2nZxrnKxk+jLq5TyD0xbPXI2I18FF+knIZVG55e0CXWgXF/F4SpCBsiW7JTBPwghqXsC66T2yctnVT/sMO0g==","shasum":"cd0926f65e7c48e3feeeb8602998fafd902c8efc","tarball":"https://registry.npmjs.org/fix-tsup-cjs/-/fix-tsup-cjs-1.2.0.tgz","fileCount":13,"unpackedSize":23233,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDy+vr3O1CYCNXozL/r/+BIFS10fCfUmgcpcoOcJ3yTugIgAzrZVBjrvLGb0hogLZlw89Dxh9LnioTPG1bXh0eu2F0="}]},"_npmUser":{"name":"u3u","email":"qwq@qwq.cat"},"directories":{},"maintainers":[{"name":"u3u","email":"qwq@qwq.cat"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fix-tsup-cjs_1.2.0_1691566546792_0.44522597427887467"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-02T12:49:47.871Z","1.0.0":"2023-05-02T12:49:48.122Z","modified":"2023-08-09T07:35:47.202Z","1.1.0":"2023-05-03T05:10:31.849Z","1.1.1":"2023-05-04T07:03:55.164Z","1.2.0":"2023-08-09T07:35:47.022Z"},"maintainers":[{"name":"u3u","email":"qwq@qwq.cat"}],"description":"Fix the commonjs default export statement and type definition of tsup output","homepage":"https://github.com/u3u/fix-tsup-cjs#readme","keywords":["tsup","cjs","postbuild","commonjs","commonjs dts","commonjs types","module.exports","export default"],"repository":{"url":"git+https://github.com/u3u/fix-tsup-cjs.git"},"author":{"name":"u3u","email":"qwq@qwq.cat","url":"https://github.com/u3u"},"bugs":{"url":"https://github.com/u3u/fix-tsup-cjs/issues"},"license":"MIT","readme":"# fix-tsup-cjs\n\n> Fix the `commonjs` default export statement and type definition of [tsup](https://github.com/egoist/tsup) output\n\n[![npm version](https://badgen.net/npm/v/fix-tsup-cjs)](https://npm.im/fix-tsup-cjs) [![npm downloads](https://badgen.net/npm/dm/fix-tsup-cjs)](https://npm.im/fix-tsup-cjs) [![codecov](https://codecov.io/gh/u3u/fix-tsup-cjs/graph/badge.svg)](https://codecov.io/gh/u3u/fix-tsup-cjs)\n\n## Motivation\n\nThe default export statement in the `commonjs` format output by [tsup](https://github.com/egoist/tsup) is `module.exports.default`, which means that you actually need to import it through `require().default`. This cannot be directly used for configuration files such as [Prettier](https://prettier.io/docs/en/configuration.html#basic-configuration) and [ESLint](https://eslint.org/docs/latest/extend/shareable-configs), because they only read `require()`.\n\n## Usage\n\n```sh\ntsup && npx fix-tsup-cjs\n```\n\n> _Note: By default, `dist/**/*.js` will be fixed. If the `type` in your `package.json` is set to `module`, then `dist/**/*.cjs` will be fixed._\n\n## CLI Options\n\n```\nUsage:\n  $ fix-tsup-cjs [...files]\n\nCommands:\n  [...files]  Custom matching files glob\n\nFor more info, run any command with the `--help` flag:\n  $ fix-tsup-cjs --help\n\nOptions:\n  --cwd [path]             Set fix directory (default: dist)\n  --dts                    Fix commonjs d.ts and d.cts files (default: true)\n  -i, --ignore [...files]  Ignore files\n  --silent                 Suppress logs\n  -v, --version            Display version number\n  -h, --help               Display this message\n```\n\n## License\n\n[MIT](./LICENSE) License © 2023 [u3u](https://github.com/u3u)\n","readmeFilename":"README.md"}