{"name":"detective-cjs","version":"5.0.1","description":"Get the dependencies of a CommonJS module by traversing its AST","main":"index.js","scripts":{"lint":"xo","fix":"xo --fix","mocha":"mocha","test":"npm run lint && npm run mocha","test:ci":"c8 npm run mocha"},"repository":{"type":"git","url":"git+https://github.com/dependents/node-detective-cjs.git"},"keywords":["detective","commonjs","dependencies","ast","static analysis","cjs","jsx"],"author":{"name":"Joel Kemp","email":"joel@mrjoelkemp.com"},"license":"MIT","bugs":{"url":"https://github.com/dependents/node-detective-cjs/issues"},"homepage":"https://github.com/dependents/node-detective-cjs","engines":{"node":">=14"},"dependencies":{"ast-module-types":"^5.0.0","node-source-walk":"^6.0.0"},"devDependencies":{"c8":"^7.13.0","mocha":"^10.2.0","xo":"^0.54.2"},"xo":{"space":true,"ignores":["test/fixtures/*"],"rules":{"arrow-body-style":"off","capitalized-comments":"off","comma-dangle":["error","never"],"curly":["error","multi-line"],"operator-linebreak":["error","after"],"object-curly-spacing":["error","always"],"space-before-function-paren":["error","never"],"unicorn/prefer-module":"off","unicorn/prefer-node-protocol":"off","unicorn/prefer-top-level-await":"off","unicorn/prevent-abbreviations":"off"}},"gitHead":"e57cebdcd17cdb72403471f6ff8c99a99759bf30","_id":"detective-cjs@5.0.1","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-6nTvAZtpomyz/2pmEmGX1sXNjaqgMplhQkskq2MLrar0ZAIkHMrDhLXkRiK2mvbu9wSWr0V5/IfiTrZqAQMrmQ==","shasum":"836ad51c6de4863efc7c419ec243694f760ff8b2","tarball":"http://registry-npm.ywwl.com/detective-cjs/download/detective-cjs-5.0.1.tgz","fileCount":4,"unpackedSize":5153,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBpn/dp3t23/dHS0y3hrd2Qjqt/w41rrRHG70uECDXMkAiB9ImFIAyfUBzMaNFPJlpmbA6d2CslUpkMDz1kUcqlMjQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkVKlWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqSkQ/8Dp5onVI/t81jSO/U5lo8OTaikKlw+WOdChp8nB2THCKQkfGk\r\nPijFgaPVlf9tKSJen46pC2Rffkmq8tJu4Rq0crUGl79gAw4YPsLYzoDhjXCz\r\nEED8VeJdrSwxriUXMMg7wQJ2y73Cnhfl4b9GxW4aYDz53VBoOEa07Us7ZL78\r\nck6slkrbB/UqpT+yUv1WpXpARnmdqUO7Jbg1/Cxgc/4PrhD/Jf9V8+I1Dexw\r\nBqsDdEU16G592rrX8DivYNIOs9FeMmlWfJ5kroROx6eaMvy3GqBv/gbpWeDb\r\n2CmK++ZjotLVN0NsYn/nlX6twulEaaJZKHdexGFB0zRXzQRVojX9nmAFKv0U\r\n87li5lRwyXbxQLFSZHu/2QJBEWJHsiS4amkhc05CogpmiYnTHnK48dri59oZ\r\nBRP4Q5gXqX0rjbuBHRNrlfR19eYipg/2uj52lArjtMBbej/FtZybF9g+PdHV\r\nmD43s4y8fyIrWstNDkuEiWyclYNokliI7jdv/bNVEd7TWtmfV/Ndds63jtTY\r\nDnUFvwWq2SGR/4ki0R9bJJajSoF+LWII2Xbp8KBJJqMSYVF71zGOYOLtbzsK\r\neJJrk3u4+KoU76+vhjkLGvqT4AsgvOKE4EK5ZBe1mxTk6q20EGILpPgrS0wW\r\nNnFD9wVNwb3+PJbIVknjDz9yBGrtSUIREzc=\r\n=d+pB\r\n-----END PGP SIGNATURE-----\r\n","size":2360,"noattachment":false,"key":"/detective-cjs/-/detective-cjs-5.0.1.tgz"},"_npmUser":{"name":"xhmikosr","email":"xhmikosr@gmail.com"},"directories":{},"maintainers":[{"name":"pahen","email":"patrik.henningsson@gmail.com"},{"name":"xhmikosr","email":"xhmikosr@gmail.com"},{"name":"mrjoelkemp","email":"mrjoelkemp@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/detective-cjs_5.0.1_1683269974723_0.48056842912910636"},"_hasShrinkwrap":false,"readme":"# detective-cjs\n\n[![CI](https://img.shields.io/github/actions/workflow/status/dependents/node-detective-cjs/ci.yml?branch=main&label=CI&logo=github)](https://github.com/dependents/node-detective-cjs/actions/workflows/ci.yml?query=branch%3Amain)\n[![npm version](https://img.shields.io/npm/v/detective-cjs?logo=npm&logoColor=fff)](https://www.npmjs.com/package/detective-cjs)\n[![npm downloads](https://img.shields.io/npm/dm/detective-cjs)](https://www.npmjs.com/package/detective-cjs)\n\n> Get the dependencies of a CommonJS module by traversing its AST\n\n```sh\nnpm install detective-cjs\n```\n\nBut dude, substack already built this: node-detective. Yes, but I needed the capability to reuse an AST\nand this was unlikely to be merged timely. I can also support jsx and other syntactic constructs faster.\n\n## Usage\n\n```js\nconst fs = require('fs');\nconst detective = require('detective-cjs');\n\nconst mySourceCode = fs.readFileSync('myfile.js', 'utf8');\n\n// Pass in a file's content or an AST\nconst dependencies = detective(mySourceCode);\n```\n\n* Supports JSX, ES7, and any other features that [node-source-walk](https://github.com/dependents/node-source-walk) supports.\n\n## License\n\n[MIT](LICENSE)\n","publish_time":1683269974933,"_cnpm_publish_time":1683269974933,"dist-tags":{"latest":"7.0.0"}}