Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
@transferwise/files-scaffold
Advanced tools
This package provides a simple utility to speed up the creation of new templated files. It also helps to enforce consistency across ypur codebase by forcing developers to use the templated files that have been specified.
yarn add -D @transferwise/files-scaffold
or
npm install --save-dev @transferwise/files-scaffold
To use the scaffold utils in your project please add the following script to your package.json
"your-script-command-name": "files-scaffold"
In order to use files-scaffold
command you need to specify a .scaffold-templates
directory
In this directory you need to add your templates that files-scaffold is going to use to generate your files.
A template files is a js
file that exports an object. Currently the template object supports the following properties
module.export {
type: 'your',
path: 'packages/components/src',
ext: 'js',
createDir: true,
name: (name) => capitalizeFirstLetter(name),
template: (name) => `import React from "react";
import Types from "prop-types";
...`
}
type | description | |
---|---|---|
type | string | Used mostly for the success message to identify the newly created files |
path | string | Path relative to the package.json that contains your "your-script-command-name" Where your file is going to be created |
ext | string | The extension to be used for your file |
createDir | bool | This determines if the file has to be added as single file or it needs to be created inside a directory with the name decided in the prompt |
name | function | The name of the file. This function accepts the name chosen in the prompt |
template | function | The content of your file. This function accepts the name chosen in the prompt |
When running your-script-command-name
you'll be prompted to a series of questions on your CLI. Once everyhting has been answered your files will be created under following the path you specificed inside your templates.
FAQs
Simple utility to scaffold components
We found that @transferwise/files-scaffold demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 309 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
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
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.