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.
ez-publish
Advanced tools
Opinionated command line tool for publishing javascript libraries
Publishing javascript libraries to bower can be very difficult. Bower expects that distribution files (babelified, uglified, webpackyfied, blubberyfied, ..) are present in the tagged commits. At least our users expect that. Having distribution files in the commit history sucks. This is why some projects (e.g. quill) don't even publish distribution files in the tagged commits. This sucks for the user (not everyone wants to use 99 transpilation tools). Other projects (e.g. ace) have a dedicated project for publishing distribution files. This sucks for the developer. I think this approach sucks less.
We use a nifty trick to tag distribution files without fucking up our commit history:
git checkout --detach
We detach the head. This means we no longer track any branchgit add -f ./dist project-name*
We force to add all distribution filesgit commit -am 'Publish vX.Y.Z -- with dist files'
Commit dist filesgit tag vX.Y.Z
Tag release with dist filesgit push origin vX.Y.Z
Push taggit checkout master
Revert to tracking master branch (dist files are no longer tracked / in the git history)./CHANGELOG.md
, and to the tag description./.releaseMessage
before you publish using ez-publish
This tool is for you if.. (all of the following must be true)
package.json
../dist
or match ./PROJECTNAME*
.Where PROJECTNAME
is given by require(package.json).name
$ npm i -g ez-publish
$ publish
It is a good idea to write a prepublish
script in your package.json
(overwrites default behavior of npm publish
)
..
"scripts": {
..
"prepublish": "npm run dist && npm run lint",
"postpublish": "publish"
}
Then you can just run npm publish
, and automatically create tags etc..
FAQs
Command line tool for publishing js libraries
The npm package ez-publish receives a total of 1 weekly downloads. As such, ez-publish popularity was classified as not popular.
We found that ez-publish 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.