{"name":"detective-typescript","version":"14.0.0","author":{"name":"Patrik Henningsson","email":"patrik.henningsson@gmail.com"},"description":"Get the dependencies of a TypeScript module","main":"index.js","scripts":{"lint":"xo","fix":"xo --fix","mocha":"mocha","test":"npm run lint && npm run mocha","test:ci":"c8 npm run mocha","watch":"npm run mocha -- -w"},"repository":{"type":"git","url":"git+https://github.com/dependents/detective-typescript.git"},"keywords":["detective","typescript","dependencies","module","ast","import"],"engines":{"node":">=18"},"license":"MIT","homepage":"https://github.com/dependents/detective-typescript","peerDependencies":{"typescript":"^5.4.4"},"dependencies":{"@typescript-eslint/typescript-estree":"^8.23.0","ast-module-types":"^6.0.1","node-source-walk":"^7.0.1"},"devDependencies":{"c8":"^10.1.3","mocha":"^11.1.0","typescript":"^5.7.3","xo":"^0.60.0"},"xo":{"space":true,"ignores":["index.d.ts","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"],"prefer-template":"error","space-before-function-paren":["error","never"],"unicorn/no-anonymous-default-export":"off","unicorn/prefer-module":"off","unicorn/prefer-node-protocol":"off","unicorn/prefer-top-level-await":"off","unicorn/prevent-abbreviations":"off"}},"_id":"detective-typescript@14.0.0","gitHead":"fb6654290929ceb33c2368105a6698bb15121754","bugs":{"url":"https://github.com/dependents/detective-typescript/issues"},"_nodeVersion":"20.18.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-pgN43/80MmWVSEi5LUuiVvO/0a9ss5V7fwVfrJ4QzAQRd3cwqU1SfWGXJFcNKUqoD5cS+uIovhw5t/0rSeC5Mw==","shasum":"3cf429652eb7d7d2be2c050ac47af957a559527d","tarball":"http://registry-npm.ywwl.com/detective-typescript/download/detective-typescript-14.0.0.tgz","fileCount":3,"unpackedSize":7975,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCtVdFOL5nrGnliNac9Xrx1L7mVmJcDkRDpkZWb4IuIGQIgKxWp23xhCb7b0t0ADLRZyRJSjyCyfnGEC4ZZIwFr0bg="}],"size":2748,"noattachment":false,"key":"/detective-typescript/-/detective-typescript-14.0.0.tgz"},"_npmUser":{"name":"xhmikosr","email":"xhmikosr@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/detective-typescript_14.0.0_1738859051329_0.007558602648093382"},"_hasShrinkwrap":false,"readme":"# detective-typescript\n\n[![CI](https://img.shields.io/github/actions/workflow/status/dependents/detective-typescript/ci.yml?branch=main&label=CI&logo=github)](https://github.com/dependents/detective-typescript/actions/workflows/ci.yml?query=branch%3Amain)\n[![npm version](https://img.shields.io/npm/v/detective-typescript?logo=npm&logoColor=fff)](https://www.npmjs.com/package/detective-typescript)\n[![npm downloads](https://img.shields.io/npm/dm/detective-typescript)](https://www.npmjs.com/package/detective-typescript)\n\n> Get the dependencies of TypeScript module\n\n```sh\nnpm install detective-typescript typescript\n```\n\n## Usage\n\n```js\nconst fs = require('fs');\nconst detective = require('detective-typescript');\n\nconst mySourceCode = fs.readFileSync('myfile.ts', 'utf8');\n\n// Pass in a file's content or an AST\nconst dependencies = detective(mySourceCode);\n```\n\n## Options\n\n- `skipTypeImports` (default: `false`) Skips imports that only imports types\n- `mixedImports`: (default: `false`) Include CJS imports in dependency list\n- `skipAsyncImports`: (default: `false`) Whether or not to omit async imports (import('foo'))\n- `jsx`: (default: `false`) Enable parsing of JSX\n- `onFile`: A callback that will be called before the file is processed. Intended for use with [`dependency-tree`](https://github.com/dependents/node-dependency-tree). Passed an object argument with properties `options` (echoing any options passed in, e.g., by [`precinct`](https://github.com/dependents/node-precinct)), `src` (source code for file as string), `ast` (parsed AST object for the file source), and `walker` (a `Walker` instance from [`node-source-walk`](https://github.com/dependents/node-source-walk) configured for TypeScript to which you can pass the `ast` or `src`).\n- `onAfterFile`: Similar to `onFile`, but the callback is also passed an object property `dependencies`, a string array with the extracted dependencies.\n\n## License\n\nMIT\n","publish_time":1738859051496,"maintainers":[{"name":"pahen","email":"patrik.henningsson@gmail.com"},{"name":"mrjoelkemp","email":"mrjoelkemp@gmail.com"},{"name":"xhmikosr","email":"xhmikosr@gmail.com"},{"name":"davidfirst","email":"davidnet@gmail.com"}],"_cnpm_publish_time":1738859051496,"dist-tags":{"latest":"15.0.1"}}