![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
This is a ultra simple, database agnostic, migrations library based on ES6 Promises.
npm install ngrate --save
To create a new migration simply run
ngrate create migration-name
This will generate a file under 'migrations/' folder with the timestamp and the name.
The file will look like the this code below:
const name = 'create-user-table';
const createdAt = 1476651301760;
exports.createdAt = createdAt;
exports.name = name;
exports.up = () => {
return new Promise((resolve, reject) => {
//TODO: Write migration code
resolve();
});
};
exports.down = () => {
return new Promise((resolve, reject) => {
//TODO: Write migration code
resolve();
});
};
From this, you should require the databases you need and do your operation.
You can run a specific migration by using the command up
or down
.
ngrate up migrations/yourmigrationfile.js
ngrate down migrations/yourmigrationfile.js
To run pending migrations just type
ngrate run
This will get the last migration execution and run the next one forward. Running one by one until all succeed or one fails.
In case one migration fails, the state left will be up to the latest successful migration
ngrate is based on migration strategies which is a interface that can be found here
You can write your own strategy by implementing those methods. By default, this library comes with a local file strategy.
You can customize your strategy by creating a file called .ngrate.js
This file should look like this
module.exports = {
migrationsDir: 'migrations',
strategy: require('./strategies/local-strategy')
};
Where strategy
is a new instance of your AbstractStrategy implementation.
I'm going to write new strategies for the following databases:
If you have any suggestion, just create an issue.
Strategies should not exist within this code base. The implementations should exist as separate modules.
FAQs
A simple and database agnostic migrations system
The npm package ngrate receives a total of 0 weekly downloads. As such, ngrate popularity was classified as not popular.
We found that ngrate 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.