Files
motia/.npm-cache/_cacache/content-v2/sha512/eb/0e/99321a9a089f205273738747c558c691d881ff64d572994b62fac38e2e885161688d544401d48c941180d04bf9838190e9293c1346e08168b6d07e714acd
2025-10-19 14:57:07 +00:00

1 line
9.3 KiB
Plaintext

{"_id":"@humanwhocodes/module-importer","_rev":"2-3775cd05133408b4f7eee4539167a0d3","name":"@humanwhocodes/module-importer","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@humanwhocodes/module-importer","version":"1.0.0","description":"Universal module importer for Node.js","main":"dist/module-importer.cjs","module":"dist/module-importer.js","type":"module","types":"dist/module-importer.d.ts","exports":{"require":"./dist/module-importer.cjs","import":"./dist/module-importer.js"},"publishConfig":{"access":"public"},"gitHooks":{"pre-commit":"lint-staged"},"lint-staged":{"*.js":["eslint --fix"]},"funding":{"type":"github","url":"https://github.com/sponsors/nzakas"},"scripts":{"build":"rollup -c && tsc","prepare":"npm run build","lint":"eslint src/ tests/","test:unit":"c8 mocha tests/module-importer.test.js","test:build":"node tests/pkg.test.cjs && node tests/pkg.test.mjs","test":"npm run test:unit && npm run test:build"},"repository":{"type":"git","url":"git+https://github.com/humanwhocodes/module-importer.git"},"keywords":["modules","esm","commonjs"],"engines":{"node":">=12.22"},"author":{"name":"Nicholas C. Zaks"},"license":"Apache-2.0","devDependencies":{"@types/node":"^18.7.6","c8":"7.12.0","chai":"4.3.6","eslint":"8.21.0","lint-staged":"13.0.3","mocha":"9.2.2","rollup":"2.77.2","typescript":"4.7.4","yorkie":"2.0.0"},"gitHead":"91f5618add91a50cb7be18d1c83737a625194178","bugs":{"url":"https://github.com/humanwhocodes/module-importer/issues"},"homepage":"https://github.com/humanwhocodes/module-importer#readme","_id":"@humanwhocodes/module-importer@1.0.0","_nodeVersion":"12.22.12","_npmVersion":"6.14.16","dist":{"integrity":"sha512-LXSM+yMY+nTKUTM7Wws2mYXeob5T0oM4SVarpuLvIsYN0mGg86rM+Rwky900Ug9BfGLkjhRuPL22x+h51tHTZQ==","shasum":"6ef4759409cad2de4c9c183d6265e177bf0b41a5","tarball":"https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.0.tgz","fileCount":7,"unpackedSize":21289,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtTE5/bcI94sar7HCXuK4alDrTVx9sQeBJdQIzoi0blAIhAIAxVzEGpNSMiW0V5xXiVDjBDQgpNpiaCWkNsHlNKqqA"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/UBiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoNuBAApP9+AdsrCs+792S/NKRiBrQ6RZPXiuiZGYTCLiE/I6/f74vU\r\nnwqkJXQSXI8G38mSAJjetyQjcNLuUIEmNEOuOVCLT18YfMB9McCxWR6+ogKX\r\nFIegCK8UDdtK6Y8jcoGVNPf3cgp6dBo48FcF382JHyEfHlMxhWeBeA3067wt\r\nKWC2KK/xVljzicKbG3Cr/ZQKoGVV00R9MWAJjHrrcVtTmQPfm+piV0i5jjVp\r\nk8OG3PRAooc8Y7hGlPHNtBmcY8zwXK/9tv+84/89fjBGa3CXLyuItLLvmMv1\r\n0+vlpUN/mvLwe+qwbASawiH0DTfzwEGf5xmPRjoXQEXZYvbtrJUrW5Fv+R6Y\r\n7fSBf0k59jGYpoOlynr2gu8awmQOmOF1iddtYQUFnkOISCbkoVFb3dPoenPx\r\ns/I+C3/gVBCEdMtTTUqahrKkklKSIWcsai1MMpRS9FncKdh85I4ua3TpFeBS\r\nakLHAbg4ZpuCZyCfEiN+dOCvK9NVdgR/4hjL11KG/+8O2vZJZfCgAnF8jTRd\r\nb0Sgk043PYdpYiWBKjDbqOEy4DNMq6v861mHR3rSneUVC4mP8mFPQpZxCz+Y\r\nkcDUCqfjO8AFxLmJb8cdBXQ28CW2auxmcmflRx5JjlFMzxAL8/hz3HDMrV9/\r\nutaIITRH/Sw5TYWWWiHDzDH9pYe3OjNDt5w=\r\n=z+XP\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"nzakas","email":"nicholas@nczconsulting.com"},"directories":{},"maintainers":[{"name":"nzakas","email":"nicholas@nczconsulting.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/module-importer_1.0.0_1660764258334_0.17120274713911354"},"_hasShrinkwrap":false},"1.0.1":{"name":"@humanwhocodes/module-importer","version":"1.0.1","description":"Universal module importer for Node.js","main":"src/module-importer.cjs","module":"src/module-importer.js","type":"module","types":"dist/module-importer.d.ts","exports":{"require":"./src/module-importer.cjs","import":"./src/module-importer.js"},"publishConfig":{"access":"public"},"gitHooks":{"pre-commit":"lint-staged"},"lint-staged":{"*.js":["eslint --fix"]},"funding":{"type":"github","url":"https://github.com/sponsors/nzakas"},"scripts":{"build":"rollup -c && tsc","prepare":"npm run build","lint":"eslint src/ tests/","test:unit":"c8 mocha tests/module-importer.test.js","test:build":"node tests/pkg.test.cjs && node tests/pkg.test.mjs","test":"npm run test:unit && npm run test:build"},"repository":{"type":"git","url":"git+https://github.com/humanwhocodes/module-importer.git"},"keywords":["modules","esm","commonjs"],"engines":{"node":">=12.22"},"author":{"name":"Nicholas C. Zaks"},"license":"Apache-2.0","devDependencies":{"@types/node":"^18.7.6","c8":"7.12.0","chai":"4.3.6","eslint":"8.22.0","lint-staged":"13.0.3","mocha":"9.2.2","rollup":"2.78.0","typescript":"4.7.4","yorkie":"2.0.0"},"gitHead":"3cffc3ea6238f08be710a406908b1eeb1d230c9f","bugs":{"url":"https://github.com/humanwhocodes/module-importer/issues"},"homepage":"https://github.com/humanwhocodes/module-importer#readme","_id":"@humanwhocodes/module-importer@1.0.1","_nodeVersion":"12.22.12","_npmVersion":"6.14.16","dist":{"integrity":"sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==","shasum":"af5b2691a22b44be847b0ca81641c5fb6ad0172c","tarball":"https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz","fileCount":10,"unpackedSize":21177,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAwEl7WYJX3Nf8MCSAGIsWc7dmTYhXbUbFMj+7gt82dVAiAH2f6o/LCDJ1RKpoHNaY6KdMNRscLLX4fNckGCLO/zow=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/n0nACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp0Bw//TMMh4MKPGZsdB9qsox+zBU4F/23x4OR7Nk8ms16Pf7rmo3Jp\r\nmFCWE+2AQQEMowkrG1LcgJZCYxO0qgbd0szro/9sJHOXRP8dWXCd8/Ken5EC\r\nKK4Z2hAaTz017pjmWAxRCxWs3OdRSH3QmXOuS7s3SbwBv5mEWXUHwdFVlkMU\r\nK1/oTvIdjPSp9ETvL6ACCb7/U/wowjSyDClTqA26Hoa8ClHUy8IpcGQSRkNP\r\ntnbWArgGch4ko/uw+B67FZIHaGhykqIQhE7stkrNDexPSlIl/Zf6iy7UF+Fo\r\nThsCnIG153/A0fQcaYTiyknM5JdSr8bjuDDhFzwP8boLO+XTL3v1Ofuaib0l\r\noKc5uC2vSklWNffyMVFUQJScvD5dndU9w5OXs/79yDOj36bfeJiLyfpBLoA2\r\n2407ayxENXDdxzXjPY6gUoVsN4EOERO+H0R3TspG91ESanXyIus63ASYD2Yr\r\n37h/hS+jZy41jRPTNzYKUgYLJoyoShQSLsx7HsRG/AP/qmDLz1xLhVlfMsuU\r\nq+oMsxgweuBGu56FELCOUkBj10WA+5z7LvfBc95v7Zv4L/QFeFXwe7fZ3D9X\r\nW2PhYmW6xaUTrpYS+UFfPt34ux9MWdFgs/gerFwIX5kd8AElMwaMJEw3Qn6h\r\n/l9IShNEAZxgO93N0kseJGP+QHPVVYCmkoo=\r\n=YWcW\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"nzakas","email":"nicholas@nczconsulting.com"},"directories":{},"maintainers":[{"name":"nzakas","email":"nicholas@nczconsulting.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/module-importer_1.0.1_1660845350879_0.0746999354770519"},"_hasShrinkwrap":false}},"time":{"created":"2022-08-17T19:24:18.260Z","1.0.0":"2022-08-17T19:24:18.503Z","modified":"2023-06-22T16:31:11.465Z","1.0.1":"2022-08-18T17:55:51.038Z"},"maintainers":[{"name":"nzakas","email":"nicholas@nczconsulting.com"}],"description":"Universal module importer for Node.js","homepage":"https://github.com/humanwhocodes/module-importer#readme","keywords":["modules","esm","commonjs"],"repository":{"type":"git","url":"git+https://github.com/humanwhocodes/module-importer.git"},"author":{"name":"Nicholas C. Zaks"},"bugs":{"url":"https://github.com/humanwhocodes/module-importer/issues"},"license":"Apache-2.0","readme":"# ModuleImporter\n\nby [Nicholas C. Zakas](https://humanwhocodes.com)\n\nIf you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate).\n\n## Description\n\nA utility for seamlessly importing modules in Node.js regardless if they are CommonJS or ESM format. Under the hood, this uses `import()` and relies on Node.js's CommonJS compatibility to work correctly. This ensures that the correct locations and formats are used for CommonJS so you can call one method and not worry about any compatibility issues.\n\nThe problem with the default `import()` is that it always resolves relative to the file location in which it is called. If you want to resolve from a different location, you need to jump through a few hoops to achieve that. This package makes it easy to both resolve and import modules from any directory.\n\n## Usage\n\n### Node.js\n\nInstall using [npm][npm] or [yarn][yarn]:\n\n```\nnpm install @humanwhocodes/module-importer\n\n# or\n\nyarn add @humanwhocodes/module-importer\n```\n\nImport into your Node.js project:\n\n```js\n// CommonJS\nconst { ModuleImporter } = require(\"@humanwhocodes/module-importer\");\n\n// ESM\nimport { ModuleImporter } from \"@humanwhocodes/module-importer\";\n```\n\n### Bun\n\nInstall using this command:\n\n```\nbun add @humanwhocodes/module-importer\n```\n\nImport into your Bun project:\n\n```js\nimport { ModuleImporter } from \"@humanwhocodes/module-importer\";\n```\n\n## API\n\nAfter importing, create a new instance of `ModuleImporter` to start emitting events:\n\n```js\n// cwd can be omitted to use process.cwd()\nconst importer = new ModuleImporter(cwd);\n\n// you can resolve the location of any package\nconst location = importer.resolve(\"./some-file.cjs\");\n\n// you can also import directly\nconst module = importer.import(\"./some-file.cjs\");\n```\n\nFor both `resolve()` and `import()`, you can pass in package names and filenames.\n\n## Developer Setup\n\n1. Fork the repository\n2. Clone your fork\n3. Run `npm install` to setup dependencies\n4. Run `npm test` to run tests\n\n## License\n\nApache 2.0\n\n[npm]: https://npmjs.com/\n[yarn]: https://yarnpkg.com/\n","readmeFilename":"README.md","users":{"flumpus-dev":true}}