Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
hsu-scripts
Advanced tools
CLI toolbox for common scripts for npm libraries.
$ yarn install hsu-scripts --dev
$ yarn install flow-bin eslint prettier --dev
// package.json
{
"babel": {
"presets": ["./node_modules/hsu-scripts/babel.js"]
},
"eslintConfig": {
"extends": ["./node_modules/hsu-scripts/eslint.js"]
}
}
// .prettierrc.js
const config = require('hsu-scripts/prettier.config');
module.exports = config;
// package.json
{
"scripts": {
"build": "hsu-scripts build src",
"test": "NODE_ENV='test' jest",
"eslint": "eslint ./",
"flow": "flow",
"flow-coverage": "hsu-scripts flow --threshold 85",
"format": "prettier --write '**/*.{js,json,md,css,yaml,yml}' '*.{js,json,md,css,yaml,yml}'"
}
}
$ hsu-scripts build src
$ npm run build
> hsu-scripts build src
> rimraf es lib
> Done
> NODE_ENV='cjs' babel src --no-babelrc --config-file /hsu-scripts/.babelrc --out-dir lib --ignore **tests**,**/\*.test.js,**/\*.example.js
> Successfully compiled 13 files with Babel.
> NODE_ENV='es' babel src --no-babelrc --config-file /hsu-scripts/.babelrc --out-dir es --ignore **tests**,**/\*.test.js,**/\*.example.js
> Successfully compiled 13 files with Babel.
> flow-copy-source -i **tests** -i **/\*.test.js -i **/\*.example.js src lib
> Done
> flow-copy-source -i **tests** -i **/\*.test.js -i **/\*.example.js src es
> Done
$ npm run flow-coverage
hsu-scripts -h
hsu-scripts <command>
Commands:
hsu-scripts build The babel build command.
hsu-scripts flow The flow-coverage-report command.
Options:
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
For more information go to https://github.com/evenchange4/hsu-scripts
hsu-scripts build -h
Usage: hsu-scripts build <pattern> [options]
<pattern> Glob pattern to specify files.
Options:
--es-dir Output es module directory. [string] [default: "es"]
--cjs-dir Output commonjs module directory. [string] [default: "lib"]
--ignore The list of glob paths to **not** compile
[array] [default: ["__tests__","**/*.test.js","**/*.example.js"]]
-h, --help Show help [boolean]
Examples:
hsu-scripts build src Simple example
hsu-scripts build src --es-dir esm Custom es module directory
hsu-scripts build src --cjs-dir 'cjs' Custom commonjs module directory
hsu-scripts build src --ignore '__specs__' '**/*.spec.js'
hsu-scripts flow -h
Usage: hsu-scripts flow [options]
Options:
--concurrent-files [number] [default: 5]
--include-glob [array] [default: ["**/*.js"]]
--exclude-glob [array] [default:
["node_modules/**","public/**",".next/**","coverage/**","storybook-static/**",
"flow-typed/**","lib/**","es/**"]]
--type [array] [default: ["text"]]
--threshold [number] [default: 90]
-h, --help Show help [boolean]
Examples:
hsu-scripts flow Simple example
hsu-scripts flow --threshold 75 Custom threshold value
For more information go to https://github.com/rpl/flow-coverage-report
$ yarn install --pure-lockfile
Use tools to build/flow itself.
$ yarn run build
$ yarn run flow-coverage
$ yarn run test:watch
$ yarn run format
$ yarn run eslint
$ npm version patch
$ npm run changelog
git commit & push
FAQs
CLI toolbox for common scripts for npm libraries.
The npm package hsu-scripts receives a total of 73 weekly downloads. As such, hsu-scripts popularity was classified as not popular.
We found that hsu-scripts 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.