
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
A node program for automatically re-publishing and semver incrementing npm packages/modules.
$ npm i autopatch --save-dev
I developed this package alongside another package, keyListener, and it works very well with it. It will of course work without it, but i'd recommend checking it out for cueing the package updates when you want them. The example below will be using the keyListener package.
const patcher = require('autopatch')
Then you may use it like such:
const packageRootPath = 'path/to/your/amazing/npmModule'
// This function is from the `keylistener` package...
gulp.keys((ch, key)=> {
// if you pressed `ctrl-p`
if (key.ctrl && key.name === 'p') {
// Run the patcher...
patcher(packageRootPath)
}
})
The only argument the patcher needs is either a relative or absolute path to your npm module.
-NOTE If the working directory of the package you are trying to update is not clean (There are unstaged and committed changes), the patcher will attempt to autoclean the directory, re-patch then republish. If there is still an error after the autoclean, the patcher will fail.
You may add a patchLimit property to the package you are updating to automatically trigger a minor update bump when the patch limit has been
exceeded. For example, if we ran the patcher for the 200th time on the below package, the version would update from "0.1.199" to "0.2.0".
{
"name": "@ejames9/keylistener",
"version": "0.1.7",
"description": "a node program which can be used for listening for/reacting to keystrokes..",
"main": "index.js",
"patchLimit": 199
}
This package grew out of a very specific need for me. Hopefully you may find it useful too. Happy Coding!!
FAQs
A node program for automatically re-publishing and semver incrementing npm packages/modules.
We found that autopatch 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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.