Commit activity
Last 12 weeks · 0 commits
Community health
4 of 6 standards met
Recent PRs & issues
Fixes #2. Adds to restore normal upward lookup for explicitly listed requested packages, including scoped package subpaths. This lets a locally installed import an allowed ancestor without permitting unrelated ancestor imports. The private option is removed rather than retained as an incompatible alias. Its old values named importers; names the imported packages. The README explains the migration and that an allowed ancestor's dependencies must be listed separately, even when installed inside that ancestor's own . Tests cover the original local-/ancestor- use case, the blocked counterpart, removal of the private alias, and explicit versus implicit access to dependencies inside an allowed ancestor, alongside the existing top-level/transitive/scoped cases. Validation of the updated patch: The private-alias regression fails before its removal and passes afterward. AVA: 10 tests pass on Node.js 6.17.1, 8.17.0, 10.24.1, 12.22.12, and 14.21.3. XO 0.21.1 passes on all five versions. passes. The earlier commits pin the repository-era AVA and XO versions so the declared Node.js 6–14 CI matrix can install and run them; their former ranges resolve incompatible modern releases. This update adds no dependency changes. New CI results will run for the pushed revision; earlier passing runs are not presented as validation of this revision. AI assistance: this update was prepared and validated with OpenAI Codex.
I had the need to allow a specific module to require upwards, so I added a private option in https://github.com/sindresorhus/strict-import/commit/64ac0d0530d5fe0f35bf33665f8e3ad16da6beb5. I made it private because I'm not totally happy with it. It only works for top-level imports. So you can allow to be searched upwards by including in the option, but if imports a module name , there's no way to allow specifically, other than allowing any module from . Context: https://github.com/lukechilds/hyperdex/commit/d54a47c921e053620a76c57c9e3534f4f2dbe42e
Repository: sindresorhus/strict-import. Description: Prevent `require` from searching upwards for required modules Stars: 94, Forks: 3. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Topics: import, node-modules, nodejs, npm-package, require. Open PRs: 1, open issues: 1. Last activity: 5y ago. Community health: 71%. Top contributors: sindresorhus, itaisteinherz, Richienb.