{"name":"module-lookup-amd","version":"8.0.3","keywords":["amd","module","lookup","alias"],"author":{"name":"Joel Kemp","email":"joel@mrjoelkemp.com"},"license":"MIT","_id":"module-lookup-amd@8.0.3","maintainers":[{"name":"pahen","email":"patrik.henningsson@gmail.com"},{"name":"xhmikosr","email":"xhmikosr@gmail.com"},{"name":"mrjoelkemp","email":"mrjoelkemp@gmail.com"}],"homepage":"https://github.com/dependents/node-module-lookup-amd","bugs":{"url":"https://github.com/dependents/node-module-lookup-amd/issues"},"xo":{"rules":{"curly":["error","multi-line"],"comma-dangle":["error","never"],"prefer-template":"error","arrow-body-style":"off","operator-linebreak":["error","after"],"capitalized-comments":"off","max-nested-callbacks":["error",6],"object-curly-spacing":["error","always"],"unicorn/prefer-module":"off","space-before-function-paren":["error","never"],"unicorn/prefer-string-slice":"off","unicorn/prefer-node-protocol":"off","unicorn/prevent-abbreviations":"off","unicorn/prefer-top-level-await":"off"},"space":true,"ignores":["test/fixtures/*"],"overrides":[{"envs":["mocha"],"files":"test/**"}]},"bin":{"lookup-amd":"bin/cli.js"},"dist":{"shasum":"be3c2b15e5aff49aea019d51426d1748034d2a4e","tarball":"http://registry-npm.ywwl.com/module-lookup-amd/download/module-lookup-amd-8.0.3.tgz","fileCount":5,"integrity":"sha512-QnkBhwg24SaixMLK1BYyk44MvtpxiHcCNpHXNlbU0tLyjidvdkud8Al2SSjLLyFGw4ldQr3LJ95Uv/o8QLWyCw==","signatures":[{"sig":"MEQCIGEJTzkL0wjY7IU45mafeybzcZUHDn6sLv6sZmgh5LzVAiAFM8RTkBMthPgi7rgPtSCpurl1OjZLDRCkm3Fy8RzTQA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11403,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkVAUiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVQA/9GyyEkOjckaFhTpk9jgrUoGl8Z7sBfUQ+CllZqpucpmpJesf5\r\nUsOn8O6/tTaBU+m/qPboRzbTYp7Cpp11ghj/1YIWV8ZJH9+R5x4VmadeHf24\r\nA57nOkdpV4b5IwkiKk5CEe2XKwgPuNYIflgNGTTijPJ6RBShaIxqCbv7LlRy\r\nRcT8fEnjX8uqudMeKN7uheVvOOjdQyM6RV0D5jJ7ekTglQOvFa+sVp5FSChv\r\n6aq+wjqPN8f/4P2ZZdt5lZCsNova6nr6+i6ZT6o8hT1X4sOt4pOVJ7sfiVYZ\r\n1+oueNQ3Hz2b5Uz1NQNfy0nti6Jzs6XHEhU7ZD2mXL3P0jAiFpsTty48ZLPV\r\nFAvtTClNl1PVhxdGJQibW3QwMHvIK5Ij/6KGoZyduX1HDzzD43FuzzY2SB5h\r\nzJ3n7fSvQ+W9RQq1QvnEJPaJtHslFbEfTer+VnMaKmnW3fm/RY+EqgbcRPhJ\r\n2m7o6NENXRX/EC8P1NFufHd3Xz1JThGH341qjurYq1ZvITOLWdFKAJHBfi+S\r\nKXXkJg1FLyD5U3QzzLUmsu1kd46EwFPe0dlIGbBm3j0cW4My+QQQOpfS9E4B\r\n4/2d1VQK0K8z5rmPDqM1IemFscEncFV9APQUDI+BKDtUWoHxT6S0bXdUb7WM\r\nc+OECpX7e8r0yiMadkh37LiF7PMdclfAsb8=\r\n=6SFr\r\n-----END PGP SIGNATURE-----\r\n","size":4387,"noattachment":false,"key":"/module-lookup-amd/-/module-lookup-amd-8.0.3.tgz"},"main":"index.js","engines":{"node":">=14"},"gitHead":"bb21f3598dfa6fafc551d5e40c1620fc89ab0875","scripts":{"fix":"xo --fix","lint":"xo","test":"npm run lint && npm run mocha","mocha":"mocha","test:ci":"c8 npm run mocha"},"_npmUser":{"name":"xhmikosr","email":"xhmikosr@gmail.com"},"repository":{"url":"git+https://github.com/dependents/node-module-lookup-amd.git","type":"git"},"_npmVersion":"9.5.1","description":"Resolve aliased dependency paths using a RequireJS config","directories":{},"_nodeVersion":"18.16.0","dependencies":{"glob":"^7.2.3","commander":"^10.0.1","requirejs":"^2.3.6","requirejs-config-file":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^7.13.0","xo":"^0.54.2","mocha":"^10.2.0","sinon":"^15.0.4"},"_npmOperationalInternal":{"tmp":"tmp/module-lookup-amd_8.0.3_1683227938609_0.8849530053623995","host":"s3://npm-registry-packages"},"readme":"# module-lookup-amd\n\n[![CI](https://img.shields.io/github/actions/workflow/status/dependents/node-module-lookup-amd/ci.yml?branch=main&label=CI&logo=github)](https://github.com/dependents/node-module-lookup-amd/actions/workflows/ci.yml?query=branch%3Amain)\n[![npm version](https://img.shields.io/npm/v/module-lookup-amd?logo=npm&logoColor=fff)](https://www.npmjs.com/package/module-lookup-amd)\n[![npm downloads](https://img.shields.io/npm/dm/module-lookup-amd)](https://www.npmjs.com/package/module-lookup-amd)\n\n> Resolve AMD dependency paths to an absolute path on the filesystem\n\nThis module takes in a partial and *synchronously* gives back its absolute path on the filesystem.\n\nI built this for [Dependents'](https://packagecontrol.io/packages/Dependents) [jump to dependency](https://github.com/dependents/Dependents) feature that lets you click on a module name\nand open the relevant file.\n\n```sh\nnpm install module-lookup-amd\n```\n\n## Usage\n\n### ESM\n\n```js\nimport lookup from 'module-lookup-amd';\n\nconst realPath = lookup({\n  partial: 'someModule',\n  filename: 'file/containing/partial',\n  directory: 'path/to/all/js/files', // optional\n  config: 'path/to/my/requirejs/config', // optional\n  configPath: 'path/to/config/directory', // optional\n  fileSystem: {} // optional\n});\n```\n\n### CommonJS\n\n```js\nconst { default: lookup } = require('module-lookup-amd');\n```\n\n* `partial`: the dependency that you want to lookup\n* `filename`: the path of the file that contains the dependency (i.e., parent module)\n* `directory`: Used to resolve files if you're not using a requirejs config\n* `config`: the path to your RequireJS configuration file\n  * As an optimization, you can provide a pre-parsed config object (the contents of the RequireJS config in object form)\n  as `config`. You are then required to provide a `configPath` or `directory` argument which is assumed to be the location where your config would have been.\n* `configPath`: path to the config file (or its directory) used to determine the module resolution directory; inferred automatically when `config` is a string path\n* `fileSystem`: An alternative `fs` implementation to use for filesystem interactions. Defaults to Node.js's `fs` implementation if not supplied.\n\n## CLI\n\nAssumes a global `-g` installation\n\n```sh\nlookup-amd -c path/to/my/config.js -f path/to/file/containing/dependency -d path/containing/all/files my/dependency/name\n```\n\n## License\n\n[MIT](LICENSE)\n","publish_time":1683227938789,"_cnpm_publish_time":1683227938789,"dist-tags":{"latest":"10.0.1"}}