{"name":"oxc-resolver","version":"1.6.2","license":"MIT","_id":"oxc-resolver@1.6.2","homepage":"https://oxc-project.github.io","bugs":{"url":"https://github.com/oxc-project/oxc-resolver/issues"},"dist":{"shasum":"4371a2de01d5f1b8198f77bd935148dd23c478a2","tarball":"http://registry-npm.ywwl.com/oxc-resolver/download/oxc-resolver-1.6.2.tgz","fileCount":5,"integrity":"sha512-X4i7RfFKPI/b3zi8x8A49g1HDc4t3BlkoSbMLZ/qN/3pqI7VxnskhtVPLSl3gEsNt9fw+gzl51t4sVcIkDeZqw==","signatures":[{"sig":"MEUCIGSreD4vTnaf8qEpZyvfNukHhNmjoBYHL5w1lPEDqk3uAiEAqiD5KgAkchY9JInKIwwnIi0AaupmY6zlND5f+l+A4Yg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/oxc-resolver@1.6.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17511,"size":4454,"noattachment":false,"key":"/oxc-resolver/-/oxc-resolver-1.6.2.tgz"},"main":"index.js","napi":{"targets":["x86_64-pc-windows-msvc","aarch64-pc-windows-msvc","x86_64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-gnu","aarch64-unknown-linux-musl","armv7-unknown-linux-gnueabihf","x86_64-apple-darwin","aarch64-apple-darwin","wasm32-wasi-preview1-threads"],"binaryName":"resolver","packageName":"@oxc-resolver/binding"},"types":"./index.d.ts","browser":"browser.js","funding":{"url":"https://github.com/sponsors/Boshen"},"gitHead":"d78baf70498bc71c5031b44842b8e03743293bc6","_npmUser":{"name":"boshen","email":"boshenc@gmail.com"},"repository":{"url":"git+https://github.com/oxc-project/oxc-resolver.git","type":"git"},"_npmVersion":"10.2.4","description":"Oxc Resolver Node API","directories":{},"_nodeVersion":"20.11.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"optionalDependencies":{"@oxc-resolver/binding-darwin-x64":"1.6.2","@oxc-resolver/binding-wasm32-wasi":"1.6.2","@oxc-resolver/binding-darwin-arm64":"1.6.2","@oxc-resolver/binding-linux-x64-gnu":"1.6.2","@oxc-resolver/binding-linux-x64-musl":"1.6.2","@oxc-resolver/binding-win32-x64-msvc":"1.6.2","@oxc-resolver/binding-linux-arm64-gnu":"1.6.2","@oxc-resolver/binding-linux-arm64-musl":"1.6.2","@oxc-resolver/binding-win32-arm64-msvc":"1.6.2","@oxc-resolver/binding-linux-arm-gnueabihf":"1.6.2"},"_npmOperationalInternal":{"tmp":"tmp/oxc-resolver_1.6.2_1710735588739_0.2696735407879176","host":"s3://npm-registry-packages"},"readme":"# Oxc Resolver Napi Binding\n\nSee\n\n* `index.d.ts` for `resolveSync` and `ResolverFactory` API.\n* [README.md](https://github.com/oxc-project/oxc-resolver?tab=readme-ov-file#oxc-resolver) for options.\n\n## API\n\n`resolve(directory, specifier)` - resolve `specifier` at an absolute path to a `directory`.\n\n### `directory`\n\nAn **absolute** path to a directory where the specifier is resolved against.\n\nFor CommonJS modules, it is the `__dirname` variable that contains the absolute path to the folder containing current module.\n\nFor ECMAScript modules, it is the value of `import.meta.url`.\n\nBehavior is undefined when given a path to a file.\n\n### `specifier`\n\nThe string passed to `require` or `import`, i.e. `require(\"specifier\")` or `import \"specifier\"`\n\n## ESM Example\n\n```javascript\nimport path from 'path';\nimport resolve, { ResolverFactory } from './index.js';\nimport assert from 'assert';\n\n// `resolve`\nassert(resolve.sync(process.cwd(), \"./index.js\").path, path.join(cwd, 'index.js'));\n\n// `ResolverFactory`\nconst resolver = new ResolverFactory();\nassert(resolver.sync(process.cwd(), \"./index.js\").path, path.join(cwd, 'index.js'));\n```\n","publish_time":1710735588894,"maintainers":[{"name":"boshen","email":"boshenc@gmail.com"}],"_cnpm_publish_time":1710735588894,"dist-tags":{"latest":"11.24.2"}}