refactor(cli): rename the emigrate package to @emigrate/cli to be more in line with other tools

This commit is contained in:
Joakim Carlstein 2023-11-15 14:41:25 +01:00
parent 9f5abf727d
commit 0b78d5cf32
16 changed files with 34 additions and 11 deletions

View file

@ -1,7 +1,7 @@
--- ---
'@emigrate/plugin-generate-js': patch '@emigrate/plugin-generate-js': patch
'@emigrate/plugin-tools': patch '@emigrate/plugin-tools': patch
'emigrate': patch '@emigrate/cli': patch
--- ---
Specify files to include in published NPM package Specify files to include in published NPM package

View file

@ -0,0 +1,5 @@
---
'@emigrate/cli': minor
---
Rename the "emigrate" package to "@emigrate/cli" to mimic other tools

View file

@ -1,7 +1,7 @@
--- ---
'@emigrate/plugin-generate-js': minor '@emigrate/plugin-generate-js': minor
'@emigrate/plugin-tools': minor '@emigrate/plugin-tools': minor
'emigrate': minor '@emigrate/cli': minor
--- ---
Simplify plugin interfaces by getting rid of the "type" string, in preparation for having packages that contains multiple different plugins Simplify plugin interfaces by getting rid of the "type" string, in preparation for having packages that contains multiple different plugins

View file

@ -21,6 +21,24 @@ It's effectively a successor of [klei-migrate](https://www.npmjs.com/package/kle
- Easy to debug - Easy to debug
- Emigrate will store any errors that occur during migration in the migration history so you can easily debug them - Emigrate will store any errors that occur during migration in the migration history so you can easily debug them
## Installation
Install the Emigrate CLI in your project:
```bash
npm install --save-dev @emigrate/cli
```
## Usage
Create a new migration:
```bash
emigrate new -d migrations -e .js create some fancy table
```
Will create a new empty JavaScript migration file with the name "YYYYMMDDHHmmssuuu_create_some_fancy_table.js" in the `migrations` directory.
## License ## License
Emigrate is licensed under the MIT license. See [LICENSE](LICENSE) for the full license text. Emigrate is licensed under the MIT license. See [LICENSE](LICENSE) for the full license text.

View file

@ -1,13 +1,13 @@
# emigrate # @emigrate/cli
Emigrate is a tool for managing database migrations. It is designed to be simple yet support advanced setups, modular and extensible. Emigrate is a tool for managing database migrations. It is designed to be simple yet support advanced setups, modular and extensible.
## Installation ## Installation
Install Emigrate in your project: Install the Emigrate CLI in your project:
```bash ```bash
npm install --save-dev emigrate npm install --save-dev @emigrate/cli
``` ```
## Usage ## Usage

View file

@ -1,5 +1,5 @@
{ {
"name": "emigrate", "name": "@emigrate/cli",
"version": "0.2.1", "version": "0.2.1",
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
@ -35,8 +35,8 @@
"@emigrate/tsconfig": "workspace:*" "@emigrate/tsconfig": "workspace:*"
}, },
"author": "Aboviq AB <dev@aboviq.com> (https://www.aboviq.com)", "author": "Aboviq AB <dev@aboviq.com> (https://www.aboviq.com)",
"homepage": "https://github.com/aboviq/emigrate/tree/main/packages/emigrate#readme", "homepage": "https://github.com/aboviq/emigrate/tree/main/packages/cli#readme",
"repository": "https://github.com/aboviq/emigrate/tree/main/packages/emigrate", "repository": "https://github.com/aboviq/emigrate/tree/main/packages/cli",
"bugs": "https://github.com/aboviq/emigrate/issues", "bugs": "https://github.com/aboviq/emigrate/issues",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {

2
pnpm-lock.yaml generated
View file

@ -54,7 +54,7 @@ importers:
specifier: 0.56.0 specifier: 0.56.0
version: 0.56.0(webpack@5.89.0) version: 0.56.0(webpack@5.89.0)
packages/emigrate: packages/cli:
dependencies: dependencies:
'@emigrate/plugin-tools': '@emigrate/plugin-tools':
specifier: workspace:* specifier: workspace:*