
Security News
Critical Security Vulnerability in React Server Components
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.
bem-environ
Advanced tools
Install it with npm
› npm install bem-environ --save
If you plan to distribute your module/library as an npm package, add bem-environ to bundledDependencies section
(see example) in your package.json. This is due to every BEM library need its own copy of bem-environ, but npm
tries to optimise packages installation.
{
"bundledDependencies": ["bem-environ"]
}
Update your project's make.js to extend common build process provided
by bem-tools
// make.js
// Initialize environ with global root path (see API section for more examples)
var environ = require('bem-environ')(__dirname);
function extendMake(registry) {
// Extend common `bem make` build process with `bem-environ`'s nodes (optional)
environ.extendMake(registry);
registry.decl('Arch', {
// ...
});
};
// For compatibility with bem-tools << 1.0.0
if (MAKE) extendMake(MAKE);
// For compatibility with bem-tools >= 1.0.0
if (module && module.exports) module.exports = extendMake;
{String|Object} root | opts — Options to declare or path to the environment root
Set environment root and other options.
Set environment root only:
var environ = require('bem-environ')(__dirname);
Set environment root and other options:
var environ = require('bem-environ')({
root: __dirname,
libDir: 'components', // override default 'libs' directory
confDir: 'conf' // override default 'configs' directory
});
{BEM.Registry} registry — bem-tools registry object
Extend bem-tools registry object with nodes of bem-environ.
{String} lib — Library name
{String} path... — Library internal path
Return absolute path to the library root or its files or directories.
{String} lib — Library name
{String} path... — Library internal path
Return relative to the root path to the library root or its files or directories.
FAQs
bem-environ ===========
The npm package bem-environ receives a total of 12 weekly downloads. As such, bem-environ popularity was classified as not popular.
We found that bem-environ demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.

Security News
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.

Research
/Security News
We spotted a wave of auto-generated “elf-*” npm packages published every two minutes from new accounts, with simple malware variants and early takedowns underway.

Security News
TypeScript 6.0 will be the last JavaScript-based major release, as the project shifts to the TypeScript 7 native toolchain with major build speedups.