-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: migration CLI by making packages external (#3582)
* fix: migration cli by making packages external * chore: move migration to own package * fix: linting issues * fix: issue with publishing migration library * Update README.md * chore: update package-lock.json * fix: issues from PR * fix: issues from PR * chore: update from main --------- Co-authored-by: Maximilian Franzke <[email protected]>
- Loading branch information
Showing
32 changed files
with
160 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,10 +23,10 @@ We changed some properties for components to align with Figma properties: | |
|
||
## Automate migration via CLI | ||
|
||
We provide a cli tool to auto migrate your source code. Use this command in your repository: | ||
We provide a cli tool to auto migrate your source code (except for `content` to `text` attribute on `Accordion-Item`). Use this command in your repository: | ||
|
||
```shell | ||
npx @db-ui/[email protected] migration --type=v005_v006 --src=./src | ||
npx @db-ui/migration --type=v005_v006 --src=./src | ||
``` | ||
|
||
Please check the changes made in your codebase afterwards, as this is mainly a simple search & replace and there might be unexpected changes of similar wordings to our icon names for any other methods, or further code occurrences that don't even refer to icons. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# @db-ui/migration | ||
|
||
![Apache 2.0 license badge](https://img.shields.io/badge/License-Apache_2.0-blue.svg) | ||
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) | ||
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) | ||
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com) | ||
|
||
## Usage | ||
|
||
We provide a cli tool to auto migrate your source code. Use this command in your repository: | ||
|
||
```shell | ||
npx @db-ui/migration --type=v005_v006 --src=./src | ||
``` | ||
|
||
## Deutsche Bahn brand | ||
|
||
As we'd like to perfectly support our users and customers on their digital journey, the usage of Deutsche Bahn brand and trademarks are bound of clear guidelines and restrictions even when being used with the code that we're provide with this product; Deutsche Bahn fully reserves all rights regarding the Deutsche Bahn brand, even though that we're providing the code of DB UI products free to use and release it under the Apache 2.0 license. | ||
Please have a look at our brand portal at <https://marketingportal.extranet.deutschebahn.com/> for any further questions and whom to contact on any brand issues. | ||
|
||
You must remove or replace any Deutsche Bahn brand and design assets as well as protected characteristics and trademarks. We're even also planning to provide a neutral theme that would make it much easier for you to use our product without the trademarks by Deutsche Bahn. | ||
|
||
## Contributions | ||
|
||
Contributions are very welcome, please refer to the [contribution guide](https://github.com/db-ui/mono/blob/main/CONTRIBUTING.md). | ||
|
||
## Code of conduct | ||
|
||
We as members, contributors, and leaders pledge to make participation in our | ||
community a harassment-free experience for everyone – have a look at our [Contributor Covenant Code of Conduct](https://github.com/db-ui/mono/blob/main/CODE-OF-CONDUCT.md). | ||
|
||
## License | ||
|
||
This project is licensed under [Apache-2.0](LICENSE). |
4 changes: 2 additions & 2 deletions
4
packages/foundations/scripts/esbuild.js → packages/migration/esbuild.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { build } from 'esbuild'; | ||
|
||
await build({ | ||
entryPoints: ['./scripts/cli.ts'], | ||
entryPoints: ['./src/cli.ts'], | ||
bundle: true, | ||
outfile: './build/index.js', | ||
platform: 'node', | ||
format: 'esm', | ||
external: ['chalk'] | ||
packages: 'external' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"name": "@db-ui/migration", | ||
"version": "0.0.0", | ||
"type": "module", | ||
"description": "Migration script for changing your code in between DB UX Design System v3 versions regarding BREAKING CHANGES.", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/db-ui/mono.git" | ||
}, | ||
"license": "Apache-2.0", | ||
"bin": { | ||
"@db-ui/migration": "build/index.js" | ||
}, | ||
"main": "build.js", | ||
"files": [ | ||
"build" | ||
], | ||
"scripts": { | ||
"build": "node esbuild.js", | ||
"copy-build": "npm-run-all copy-build:*", | ||
"copy-build:build": "cpr build ../../build-outputs/migration/build -o", | ||
"copy-build:package.json": "cpr package.json ../../build-outputs/migration/package.json -o", | ||
"copy-build:readme": "cpr README.md ../../build-outputs/migration/README.md -o", | ||
"test": "vitest run --config vitest.config.ts", | ||
"test:migration": "tsx src/cli.ts migration --type v005_v006 --src=./scss --dryRun=true" | ||
}, | ||
"dependencies": { | ||
"commander": "^12.0.0", | ||
"glob": "^11.0.0", | ||
"replace-in-file": "^8.2.0" | ||
}, | ||
"devDependencies": { | ||
"cpr": "3.0.1", | ||
"tsx": "^4.19.2", | ||
"vitest": "^2.1.8" | ||
}, | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.org/", | ||
"access": "public" | ||
} | ||
} |
Oops, something went wrong.