import-local
npmv3.2.0TypeScriptLet a globally installed package use a locally installed version of itself if available
Adopt with care
import-local is usable, with caveats. Last published 779 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- DMaintenance: grade D, Poor — a real concern.
Last published 779 days ago.
- AWeight: grade A, Excellent.
Pulls in 4 transitive packages, about 27 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-local 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.
Licenses in the dependency tree
Every license you inherit by installing import-local, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >=8
- Module format
- CommonJS only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the import-local README.
import importLocal from 'import-local';
if (importLocal(import.meta.url)) {
console.log('Using local version of this package');
} else {
// Code for both global and local version here…
}import-local 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-localthis page | 0 | 2 | MIT | 2 years ago |
| resolve-from | 0 | 8 | MIT | 1 day ago |
| resolve-cwd | 0 | 1 | MIT | 1 day ago |
| esm | 6.2M | 5 | MIT | 1 day ago |
| import-fresh | 0 | 2 | MIT | 1 day ago |
| resolve | 0 | 2 | MIT | 1 day ago |
Dependencies
Declared by import-local v3.2.0. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (2)
Dev (5)
Used by
Popular packages that depend on import-local.
Relationship graph
Dependencies (left) and dependents (right) of import-local.
Frequently installed together
A Node.js module for sending notifications on native Mac, Windows (post and pre 8) and Linux (or Growl as fallback)
This package contains shared types of Jest's packages.
Delightful JavaScript Testing.
This packages is a collection of utilities and helper functions
Generic configuration validation tool that helps you with warnings, errors and deprecation messages as well as showing users examples of correct configuration.
Delightful JavaScript Testing.
yargs the modern, pirate-themed, successor to optimist.
TypeScript definitions for yargs
No description provided.
A replacement for process.exit that ensures stdio are fully drained before exiting.
No description provided.
Release history
No releases in the last two years, typically about 223 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 3.2.0latest | 2 years ago | 4.6 KB | MIT |
| 3.1.0 | 4 years ago | 4.5 KB | MIT |
| 3.0.3 | 5 years ago | 4.2 KB | MIT |
| 3.0.2 | 7 years ago | 4.1 KB | MIT |
| 3.0.1 | 7 years ago | 3.8 KB | MIT |
| 3.0.0 | 7 years ago | 3.8 KB | MIT |
| 2.0.0 | 8 years ago | 3.5 KB | MIT |
| 1.0.0 | 8 years ago | — | MIT |
| 0.1.1 | 9 years ago | — | MIT |
| 0.1.0 | 9 years ago | — | MIT |
Overview
import-local is an npm package that let a globally installed package use a locally installed version of itself if available. It has 2 known dependents in the graph. The latest version is 3.2.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need let a globally installed package use a locally installed version of itself if available 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-local?
import-local is usable, with caveats. Last published 779 days ago.
How do I install import-local?
Run `npm install import-local` to add import-local to your npm project.
How many dependencies does import-local have?
import-local declares 7 direct dependencies and pulls in 4 packages in total once its runtime tree is resolved totalling about 27 KB on disk.
What license is import-local released under?
import-local is distributed under the MIT license.
How popular is import-local?
npm does not publish download counts. Within PackageGraph's crawl, 2 known packages depend on import-local.
Is import-local still maintained?
The most recent release of import-local (v3.2.0) was published 2 years ago.
Does import-local run install scripts?
No. import-local does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.