</>PackageGraphPackageGraph

import-local

npmv3.2.0TypeScript

Let 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.

2
Direct dependencies

Runtime packages this one declares itself.

4
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

27 KB
Install size

Unpacked size of this package plus its entire runtime tree.

2
Tree depth

Longest resolved dependency chain below this package.

Licenses in the dependency tree

MIT

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.

PackageWeekly downloadsDependentsLicenseLast release
import-localthis page02MIT2 years ago
resolve-from08MIT1 day ago
resolve-cwd01MIT1 day ago
esm6.2M5MIT1 day ago
import-fresh02MIT1 day ago
resolve02MIT1 day ago

Dependencies

Declared by import-local v3.2.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (5)

ava 2.1.0cpy ^7.0.1del ^4.1.1execa ^2.0.1xo ^0.24.0

Used by

Popular packages that depend on import-local.

Relationship graph

Dependencies (left) and dependents (right) of import-local.

pkg-dirresolve-cwdjestjest-cliimport-local
import-local dependencies dependents

Frequently installed together

Release history

No releases in the last two years, typically about 223 days apart.

Recent versions of import-local
VersionPublishedSizeLicense
3.2.0latest2 years ago4.6 KBMIT
3.1.04 years ago4.5 KBMIT
3.0.35 years ago4.2 KBMIT
3.0.27 years ago4.1 KBMIT
3.0.17 years ago3.8 KBMIT
3.0.07 years ago3.8 KBMIT
2.0.08 years ago3.5 KBMIT
1.0.08 years agoMIT
0.1.19 years agoMIT
0.1.09 years agoMIT

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

Keywords

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.