![pnpm 10.0.0 Blocks Lifecycle Scripts by Default](https://cdn.sanity.io/images/cgdhsj6q/production/387e09b040c564e324704dac66871c6456fe5ded-1024x1024.png?w=400&fit=max&auto=format)
Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
template-copy
Advanced tools
Tiny scaffolding engine
Like cp, but with Lodash templates
npm i template-copy
const t = require('template-copy');
t('index.html templates/ ~/.config/templates/ava/ test/');
.catch((err) => {
console.log('ERR', err);
})
.then(() => {
console.log('done');
});
File copy is done using Streams, with lodash.template
parsing files if they
have template placeholders {{ ... }}
.
Handlebars template are executed in the context of the following object:
Object.assign({}, env, opts)
// where `env` and `opts` have the following structure
{
env: {
PATH: '...',
...
},
opts: {
debug: true,
name: 'Foobar'
}
}
The templates context is a merged version of various sources, with the following order of precedence:
process.env
variables begining with hcp_
Handlebars templates can have any number of placeholders. Variables are either available in the context object, or automatically prompted for the user to enter a value.
Skipping a prompt is then available with --name Value
.
To enable it, inquirer must be installed and available in node_modules
.
npm i inquirer -D
If not installed, prompts are not generated.
JSON files are merged together with destination, if it already exists.
FAQs
Tiny scaffolding engine
We found that template-copy 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.