@deviceinsight/ng-ui-api-client 10.57.0 → 10.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -75
- package/dist/index.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -56,13 +56,11 @@ npx yalc link "@deviceinsight/ng-ui-api-client"
|
|
|
56
56
|
|
|
57
57
|
# CI
|
|
58
58
|
|
|
59
|
-
`.gitlab-ci.yml` installs the dependencies and then runs `
|
|
60
|
-
`
|
|
61
|
-
for tags: `-SNAPSHOT` versions are published to the internal Nexus registry under the
|
|
62
|
-
`
|
|
63
|
-
|
|
64
|
-
is not moved backwards. `publish_alpha` is a manual job that always publishes to the
|
|
65
|
-
internal registry under `next`.
|
|
59
|
+
`.gitlab-ci.yml` installs the dependencies and then runs `lint` and `typecheck` on every branch except `main`.
|
|
60
|
+
The `audit` job (`npm run scan`) only runs on `develop`, `feature/*` and `renovate/*` branches, so hotfixes and tags are not blocked by it.
|
|
61
|
+
The `publish` job runs for `develop` and for tags: `-SNAPSHOT` versions are published to the internal Nexus registry under the `next` tag, releases go to the public npm registry.
|
|
62
|
+
A release older than the currently published `latest` is published under a `hotfix-<major>.<minor>` tag so that `latest` is not moved backwards.
|
|
63
|
+
`publish_alpha` is a manual job that always publishes to the internal registry under `next`.
|
|
66
64
|
|
|
67
65
|
# Releasing the library using git flow
|
|
68
66
|
|
|
@@ -80,75 +78,54 @@ If not, execute `git checkout main`.
|
|
|
80
78
|
Run `git flow init` and answer every question with the default (press Enter/Return).
|
|
81
79
|
The script verifies that the branches are named `main` and `develop`.
|
|
82
80
|
|
|
83
|
-
##
|
|
81
|
+
## Releasing the develop branch
|
|
84
82
|
|
|
85
|
-
|
|
83
|
+
Run the release script from the repository root:
|
|
86
84
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
Vulnerabilities can occur at any time.
|
|
90
|
-
To be sure, the pipeline for the branches and the tags created
|
|
91
|
-
in the release process will not fail, the script runs the checks locally before building the
|
|
92
|
-
release:
|
|
93
|
-
|
|
94
|
-
```
|
|
95
|
-
npm install
|
|
96
|
-
npm --registry=https://registry.npmjs.org audit
|
|
85
|
+
```shell
|
|
86
|
+
./release.sh
|
|
97
87
|
```
|
|
98
88
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
5.2. Run `npm install`.
|
|
143
|
-
|
|
144
|
-
5.3. Commit `package.json` and `package-lock.json`. Commit message should be `Starting $NEW_SNAPSHOT_VERSION`, e.g. `Starting 1.2.0`.
|
|
145
|
-
|
|
146
|
-
6. Push the branches and the tag:
|
|
147
|
-
|
|
148
|
-
On branch `develop`:
|
|
149
|
-
|
|
150
|
-
`git push`
|
|
151
|
-
`git checkout main`
|
|
152
|
-
`git push`
|
|
153
|
-
`git push --tags`
|
|
154
|
-
`git checkout develop`
|
|
89
|
+
Before running it, make sure the workarea is clean and all commits on `develop` are pushed; otherwise the script aborts.
|
|
90
|
+
It releases the current version from `package.json` (without `-SNAPSHOT`) and afterwards starts the next minor snapshot version.
|
|
91
|
+
|
|
92
|
+
## Building a hotfix for a specific version of this library
|
|
93
|
+
|
|
94
|
+
When building a hotfix in `ng-ui-scale`, first check which version of this library is used on the `main` branch of `ng-ui-scale`, e.g. with `git show origin/main:package.json | grep ng-ui-api-client`.
|
|
95
|
+
Then build the hotfix on top of exactly that version, so that no unrelated changes from newer releases end up in the `ng-ui-scale` hotfix.
|
|
96
|
+
Do not use `release.sh` or `git flow hotfix` for this: `git flow hotfix finish` merges into `main`, which already contains the newer release.
|
|
97
|
+
|
|
98
|
+
Example: `ng-ui-scale` uses 10.56.0 while 10.57.0 is already released (the version on `main` of this library):
|
|
99
|
+
|
|
100
|
+
1. Create the branch `hotfix/10.56.1` from the tag 10.56.0 and install the dependencies of that version:
|
|
101
|
+
```shell
|
|
102
|
+
git fetch --tags
|
|
103
|
+
git checkout -b hotfix/10.56.1 10.56.0
|
|
104
|
+
npm ci
|
|
105
|
+
```
|
|
106
|
+
2. Set the version in `package.json` and `package-lock.json` to 10.56.1:
|
|
107
|
+
```shell
|
|
108
|
+
npm version 10.56.1 --no-git-tag-version
|
|
109
|
+
```
|
|
110
|
+
If the `audit` job in `.gitlab-ci.yml` still runs on every branch except `main`, copy its `rules` from `develop`, so that the vulnerability audit does not block the hotfix pipeline.
|
|
111
|
+
3. Implement or cherry-pick the changes needed for the hotfix, either directly on the hotfix branch or in a feature branch that is merged into it.
|
|
112
|
+
4. Run `npm run build`, `npm run lint` and `npm run typecheck` to verify there are no errors.
|
|
113
|
+
5. Commit the changes.
|
|
114
|
+
6. Tag the hotfix commit and push the tag:
|
|
115
|
+
```shell
|
|
116
|
+
git tag -a 10.56.1 -m "Hotfix 10.56.1"
|
|
117
|
+
git push origin 10.56.1
|
|
118
|
+
```
|
|
119
|
+
The `publish` CI job builds the tag and publishes it to npm.
|
|
120
|
+
Because 10.56.1 is older than the `latest` version, it is published under the dist-tag `hotfix-10.56` and `latest` stays at 10.57.0.
|
|
121
|
+
7. Merge the hotfix branch into `develop` and push `develop`:
|
|
122
|
+
```shell
|
|
123
|
+
git checkout develop
|
|
124
|
+
git pull
|
|
125
|
+
git merge --no-ff hotfix/10.56.1
|
|
126
|
+
git push
|
|
127
|
+
```
|
|
128
|
+
`package.json` and `package-lock.json` will conflict; keep the `-SNAPSHOT` version of `develop` and run `npm install` before committing the merge.
|
|
129
|
+
Do not merge the hotfix branch into `main`.
|
|
130
|
+
8. Delete the local hotfix branch: `git branch -d hotfix/10.56.1`.
|
|
131
|
+
9. Update `ng-ui-scale` on its hotfix branch to 10.56.1.
|