
Research
/Security News
Shai Hulud Strikes Again (v2)
Another wave of Shai-Hulud campaign hits npm.
@istanbuljs/load-nyc-config
Advanced tools
The utility function which NYC uses to load configuration. This can be used by outside programs to calculate the configuration. Command-line arguments are not considered by this function.
const {loadNycConfig} = require('@istanbuljs/load-nyc-config');
(async () {
console.log(await loadNycConfig());
})();
Type: string
Default: cwd from parent nyc process or process.cwd()
Type: string
Default: undefined
Name of the file containing nyc configuration.
This can be a relative or absolute path.
Relative paths can exist at options.cwd or any parent directory.
If an nycrc is specified but cannot be found an exception is thrown.
If no nycrc option is provided the default priority of config files are:
Configuration is first loaded from package.json if found, this serves as the package
defaults. These options can be overridden by an nycrc if found. Arrays are not merged,
so if package.json sets "require": ["@babel/register"] and .nycrc sets "require": ["esm"]
the effective require setting will only include "esm".
const {isLoading} = require('@istanbuljs/load-nyc-config');
console.log(isLoading());
In some cases source transformation hooks can get installed before the configuration is loaded. This allows hooks to ignore source loads that occur during configuration load.
@istanbuljs/load-nyc-config for enterpriseAvailable as part of the Tidelift Subscription.
The maintainers of @istanbuljs/load-nyc-config and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.
While nyc itself is primarily a command-line tool for capturing code coverage, it inherently deals with loading and applying configuration for its operation. Compared to @istanbuljs/load-nyc-config, nyc offers a broader set of functionalities including instrumentation, reporting, and configuration management as part of its core features.
The 'config' package is used for managing configurations across Node.js applications. It doesn't specifically target nyc configurations but provides a general-purpose solution for loading and merging configurations from various sources. Unlike @istanbuljs/load-nyc-config, it's not tailored to code coverage tools but can be adapted for various configuration needs.
FAQs
Utility function to load nyc configuration
The npm package @istanbuljs/load-nyc-config receives a total of 25,933,058 weekly downloads. As such, @istanbuljs/load-nyc-config popularity was classified as popular.
We found that @istanbuljs/load-nyc-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.

Research
/Security News
Another wave of Shai-Hulud campaign hits npm.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.