
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
does-this-module-install
Advanced tools
npm enables creation of small modules to compose larger systems. One problem that surfaces is that smaller modules have to be tested for deployment.
A common cause of error is when a dependency is listed as a dev-dependency. This causes needless frustration - in ensuring all will work.
This module, provides a unit installation test as a function.
The function is independent of test framework. It throws on error
when installing it's root-parent module. Root parent is defined as
the first subdirectory containing node_modules.
This module, provides a unit installation test, that tests an npm module can be self installed in production mode.
npm install does-this-module-install -D
or
yarn install doed-this-module-install --save-dev
runInstallTest is a simple function that detects the current parent-root module,
uses it's relative path to install the module into a temp directory.
The function is independent of test framework and returns a success message or throws an error.
Use shown below is tied to mocha, should be easy enough to modify as needed.
// somewhere in your tests
import { runInstallTest } from 'does-this-module-install
// demonstrated with mocha, but should be adaptable to
// any test framework of your choice
describe(`regular module tests`, () => {
it(`install test`, async () => {
expect(await runInstallTest()).to.match(/success! installing .*/);
});
});
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Apache-2.0
Bugs, PRs, comments, suggestions welcomed!
FAQs
A starter package for typescript projects
The npm package does-this-module-install receives a total of 2 weekly downloads. As such, does-this-module-install popularity was classified as not popular.
We found that does-this-module-install demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.