import-local lets a globally installed package automatically use a locally installed version of itself when that local copy is present, and fall back to the global version when it is not. It is useful for CLI tools that want to defer to the user’s local install for development workflows, while still working if the package is not installed locally.
Project status
- The repository appears not to be actively maintained, with the last recorded upstream update on 2024-07-22, which is nearly two years ago relative to 2026-08-12.
- Apparent update cadence is low, with updates in 2024-07-22, then next in 2022-01-06, and earlier in 2021-10-04, suggesting an infrequent maintenance pattern rather than regular releases.
AI summary generated
Recent updates
v3.2.0
Release v3.2.0 primarily adds TypeScript type definitions for import-local. The code diff also includes a few packaging and repository metadata changes (notably a new package.json flag), plus CI workflow updates.
Featuresv3.1.0
v3.1.0 adds support for passing `import.meta.url` into `import-local`. The implementation converts `file://` URLs to file paths before performing the existing package resolution and local require logic.
Featuresv3.0.3
v3.0.3 is a small patch release focused on fixing incorrect detection of whether a file is inside the local node_modules directory on Windows when path resolution crosses drive/partition boundaries. The code change updates the logic in index.js to prevent a false positive caused by path.relative() behavior on Windows.
v3.0.2
v3.0.2 is a small patch release focused on fixing a regression impacting how import-local detects whether a package is installed locally. The code change adjusts the local-package detection logic and adds a regression test for requiring packages from a parent directory under node_modules.
v3.0.1
v3.0.1 is a small patch release focused on a regression where import-local did not prefer the locally installed package when invoked via its CLI. The code change replaces the mechanism used to detect whether the target file is inside the caller's local node_modules, and the test suite now includes a CLI-invocation fixture to prevent this regression.
v3.0.0
v3.0.0 introduces support for Yarn aliases. It also includes a breaking requirement to use Node.js 8, which may prevent installation or usage on older Node.js versions.
BreakingFeatures