Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
better-migration
Advanced tools
This is a simple tool to migrate data. It features some key features:
npm install --save better-migration
var migration = require('better-migration');
The idea behind this tool is simple:
migration.version('1.0.0', function (cb) {
// Your migration script, call cb() when done.
// cb(err) will abort the migration.
cb();
})
This will run your migration scripts one at a time until it reaches the latest version.
migration.start(function (err) {
// If the error is set, the script failed, and you should probably not continue.
// Your data is updated to the latest semver version (in this case is 1.0.0)
})
When you need to migrate again, just call migration.set with the new version number, and restart.
By default, we save the current version into a file, ./version
. You may change this:
var migration = require('better-migration');
Optionally, you may set your own functions for setting the version/lock:
// Set the function to get the version
migration.get = function (cb) {
cb(null, '1.0.0');
};
// Set the function to set the version
migration.set = function (v, cb) {
cb(); // Call when saved
}
// Set the function to obtain a lock for migration.
migration.lock = function (cb) {
// After you acquire the lock, you must return a release function
// so that we can release the lock after the migration is complete.
cb(err, release)
}
Contributions welcome!
This library was initially made by the awesome team of engineers at Diamond.
If you haven't already, make sure you install Diamond!
FAQs
This is a simple tool to migrate data.
We found that better-migration 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.