
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.
This library provides utilities for managing vendor files, hooks, and dependencies.
This library provides utilities for managing vendor files, hooks, and dependencies.
getThis function is responsible for setting up the source based on a given configuration.
config: The configuration object.
get: The source configuration.
url (optional): The URL from which files should be downloaded.path: The directory to which files should be extracted.hooks (optional): Hooks to run before and after the main process.
before (optional): A command to run before the main process.after (optional): A command to run after the main process.await get({
get: {
url: "https://example.com/source.zip",
path: "./path/to/extract",
hooks: {
before: "echo Setting up source...",
after: "echo Source setup complete.",
},
},
});
setThis function sets up the target based on the provided configuration.
config: The configuration object.
set: The target configuration.
path: The path for the target.head (optional): The header content to prepend to target files. Uses a default if not provided.hooks (optional): Hooks to be executed before and after target processing.
before (optional): Command to be executed before target processing.after (optional): Command to be executed after target processing.transforms (optional): An array of transform functions that can modify content and file paths. Each transform function takes the current file path and content as parameters and returns an object with potentially modified path and content.await set({
set: {
path: "./path/to/target",
head: "/* Custom Header */",
hooks: {
before: "echo Setting up target...",
after: "echo Target setup complete.",
},
transforms: [
(path, content) => {
return {
path: path.replaceAll(
"dependency.js",
"transformed-dependency.js"
),
content: content.replaceAll(
"./dependency",
"./transformed-dependency"
),
};
},
],
},
});
Using transforms, you can modify file content:
const localConfig = {
set: {
// ... other config options
transforms: [
(path, content) => {
return { path, content: content.replace("Hello", "Goodbye") };
},
(path, content) => {
return { path, content: content.replace("World", "Someone") };
},
],
},
};
Similarly, you can also modify file paths:
const localConfig = {
set: {
// ... other config options
transforms: [
(path, content) => {
return {
path: path.replaceAll(
"dependency.js",
"transformed-dependency.js"
),
content: content.replaceAll(
"./dependency",
"./transformed-dependency"
),
};
},
],
},
};
ejectThis function allows you to eject a file from being managed by the system. Ejecting involves removing a specific header from a file.
file: The path to the file that should be ejected.config (optional): The configuration object.
set: The target configuration.
head (optional): The header content that should be removed from the target file. Uses a default if not provided.await eject("./path/to/target/file.js", {
set: {
head: "/* Custom Header */",
},
});
This will remove the custom header (or the default header if not provided) from the specified file.
FAQs
This library provides utilities for managing vendor files, hooks, and dependencies.
We found that vendorism 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.