import-meta-resolve
npmv4.2.0TypeScriptResolve things like Node.js — ponyfill for `import.meta.resolve`
Adopt with care
import-meta-resolve is usable, with caveats. Last published 376 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- CMaintenance: grade C, Fair — worth a look.
Last published 376 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 77 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding import-meta-resolve to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- No constraint declared
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the import-meta-resolve README.
import {resolve} from 'import-meta-resolve'
// A file:
console.log(resolve('./index.js', import.meta.url))
//=> file:///Users/tilde/Projects/oss/import-meta-resolve/index.js
// A CJS package:
console.log(resolve('builtins', import.meta.url))
//=> file:///Users/tilde/Projects/oss/import-meta-resolve/node_modules/builtins/index.js
// A scoped CJS package:
console.log(resolve('@eslint/eslintrc', import.meta.url))
//=> file:///Users/tilde/Projects/oss/import-meta-resolve/node_modules/@eslint/eslintrc/lib/index.js
import-meta-resolve vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| import-meta-resolvethis page | 0 | 3 | MIT | 1 year ago |
| resolve | 0 | 2 | MIT | 1 day ago |
| tsx | 61.9M | 26 | MIT | 1 day ago |
| resolve-cwd | 0 | 1 | MIT | 1 day ago |
| resolve-from | 0 | 8 | MIT | 1 day ago |
| is-core-module | 0 | 1 | MIT | 1 day ago |
Dependencies
Declared by import-meta-resolve v4.2.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (11)
Used by
Popular packages that depend on import-meta-resolve.
Missing ECMAScript module utils for Node.js
A WDIO helper utility to provide several utility functions used across the project.
A helper utility to parse and validate WebdriverIO options
Relationship graph
Dependencies (left) and dependents (right) of import-meta-resolve.
Frequently installed together
Utility package providing type information for a variety of WebdriverIO interfaces
A helper utility for logging of WebdriverIO packages
Runtime typescript and ESM support for Node.js
Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow
Get an available port
Find apps installed on your system. This util will help to find executables of a known app like Chrome, Firefox,... on Windows, Linux, and macOS out of the box.
A WDIO helper utility to provide several utility functions used across the project.
split a Text Stream into a Line Stream, using Stream 3
a glob matcher in javascript
the most correct and second fastest glob implementation in JavaScript
Microsofts' EdgeDriver for Node.js
An NPM wrapper for handling the Safaridriver binary.
Release history
1 release in the last two years, typically about 44 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 4.2.0latest | 1 year ago | 77 KB | MIT |
| 4.1.0 | 2 years ago | 76 KB | MIT |
| 4.0.0 | 2 years ago | 75 KB | MIT |
| 3.1.1 | 2 years ago | 76 KB | MIT |
| 3.1.0 | 2 years ago | 75 KB | MIT |
| 3.0.0 | 3 years ago | 76 KB | MIT |
| 2.2.2 | 3 years ago | 70 KB | MIT |
| 2.2.1 | 3 years ago | 70 KB | MIT |
| 2.2.0 | 3 years ago | 68 KB | MIT |
| 2.1.0 | 4 years ago | 63 KB | MIT |
| 2.0.3 | 4 years ago | 63 KB | MIT |
| 2.0.2 | 4 years ago | 63 KB | MIT |
| 2.0.1 | 4 years ago | 63 KB | MIT |
| 2.0.0 | 4 years ago | 61 KB | MIT |
| 1.1.1 | 5 years ago | 52 KB | MIT |
Overview
import-meta-resolve is an npm package that resolve things like Node.js — ponyfill for `import.meta.resolve`. It has 3 known dependents in the graph. The latest version is 4.2.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need resolve things like Node.js — ponyfill for `import.meta.resolve` and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use import-meta-resolve?
import-meta-resolve is usable, with caveats. Last published 376 days ago.
How do I install import-meta-resolve?
Run `npm install import-meta-resolve` to add import-meta-resolve to your npm project.
What license is import-meta-resolve released under?
import-meta-resolve is distributed under the MIT license.
How popular is import-meta-resolve?
npm does not publish download counts. Within PackageGraph's crawl, 3 known packages depend on import-meta-resolve.
Is import-meta-resolve still maintained?
The most recent release of import-meta-resolve (v4.2.0) was published 1 year ago.
Does import-meta-resolve run install scripts?
No. import-meta-resolve does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.