
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@foo-software/node-modules-compare
Advanced tools
A tool to compare imported `node_modules` existence and size from one build to another
@foo-software/node-modules-compareA tool to compare imported node_modules existence and size from one build to another.
source-map-explorer is required to provide bundle data being compared. The input of this tool is the output of source-map-explorer.npm install @foo-software/node-modules-compare
Or install globally for CLI usage:
npm install -g @foo-software/node-modules-compare
import { nodeModulesCompare } from '@foo-software/node-modules-compare';
const logNodeModulesCompareResult = async () => {
const result = await nodeModulesCompare({
inputFile: '/path/to/input/input-file.json',
inputFileWithChanges: '/path/to/input/input-file-with-changes.json',
shouldOmitNodeModuleData: true,
});
console.log('result', result);
};
node-modules-compare \
--inputFile '/path/to/input/input-file.json' \
--inputFileWithChanges '/path/to/input/input-file-with-changes.json' \
--outputDirectory '/path/to/output'
Either input or inputFile must be provided.
Option Interfaces
The interfaces below are used in various options.
interface NodeModulesCompareInputPayload {
bundleName: string;
files: Record<string, { size: number }>;
}
options.input
Only available in Node module
The input payload (if not using inputFile).
type input = NodeModulesCompareInputPayload[] | undefined;
options.inputFile
The input file path relative to current working directory (if not using input param).
type inputFile = string | undefined;
options.inputFileWithChanges
The input file with changes path relative to current working directory (if not using inputWithChanges param)
type inputFileWithChanges = string | undefined;
options.inputWithChanges
Only available in Node module
The input with changes payload (if not using inputFileWithChanges)
type inputWithChanges = NodeModulesCompareInputPayload[] | undefined;
options.outputDirectory
The output directory path relative to current working directory. If undefined, file will not be output.
type outputDirectory = string | undefined;
options.shouldOmitNodeModuleData
If true node module data will be ommitted from the resulting dataset.
type shouldOmitNodeModuleData = boolean | undefined;
Below is an example of generating a source map output from a Next.js app using source-map-explorer.
source-map-explorer ./my-nextjs-app/.next/static/**/*.js \
--json output/result.json \
--replace 'webpack://_N_E/' --with ''
npmThe npm script runs ts-node under the hood.
npm run node-modules-compare -- \
--inputFile '/path/to/input/input-file.json' \
--inputFileWithChanges '/path/to/input/input-file-with-changes.json' \
--outputDirectory '/path/to/output'
FAQs
A tool to compare imported `node_modules` existence and size from one build to another
We found that @foo-software/node-modules-compare 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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.