@wireapp/core-crypto 1.0.1 → 1.1.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 CHANGED
@@ -30,6 +30,12 @@ See [ARCHITECTURE.md](docs/ARCHITECTURE.md)
30
30
  - rust: [https://www.rust-lang.org/tools/install](https://www.rust-lang.org/tools/install)
31
31
  - cargo-make: [https://sagiegurari.github.io/cargo-make/](https://sagiegurari.github.io/cargo-make/)
32
32
 
33
+ If you're using macOS, you'll also need to install GNU sed:
34
+ ```ignore
35
+ brew install gnu-sed
36
+ ```
37
+ and add an alias to your shell configuration file: `alias sed=gsed` (e.g. to `~/.zshenv` if you're using zsh).
38
+
33
39
  ### Android
34
40
 
35
41
  Install Android SDK and Build-Tools for API level 30+
@@ -131,6 +137,24 @@ cargo install cargo-nextest
131
137
  cargo nextest run
132
138
  ```
133
139
 
140
+ #### Run core crypto tests on WASM target
141
+
142
+ If you haven't already, install the target and wasm-pack:
143
+
144
+ ```ignore
145
+ rustup target add wasm32-unknown-unknown
146
+ cargo install wasm-pack
147
+ ```
148
+
149
+ If you want to test for chrome, [get chromedriver](https://getwebdriver.com/chromedriver) or the webdriver for the
150
+ browser you want to test for, respectively.
151
+
152
+ Then, to run tests for a crate in the workspace do
153
+
154
+ ```ignore
155
+ wasm-pack test --headless --chrome ./<crate-folder-to-test>
156
+ ```
157
+
134
158
  #### Addendum: testing all ciphersuites
135
159
 
136
160
  > [!warning]
@@ -180,9 +204,14 @@ The reports generated by criterion will be located in `target/criterion`.
180
204
 
181
205
  ## Git workflow
182
206
 
183
- * The `main` branch is only updated when making a release and should always point to the latest release.
184
- * The `develop` branch is used as the everyday development branch.
185
- * No merge commits. Always rebase on top of `develop`.
207
+ * The `main` branch is used as the everyday development branch.
208
+ * No merge commits. Always rebase on top of `main`.
209
+ * Release branches are named `release/<series>`, e.g. `release/1.x`, `release/2.x`.
210
+ * Release branches contain fixes relevant to their specific release series and are never merged to `main`.
211
+ * Release branches always branch off their first major release tag. For example,
212
+ the output of `git merge-base main release/2.x` must be a commit pointed to by tag `v2.0.0`.
213
+ * Release branches are created lazily, that is, only when the first fix needs to be applied and released
214
+ for a specific release series.
186
215
  * Use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) -- those are picked up by the changelog generator.
187
216
  * If there is a JIRA ticket related to the change, you should mention it in either the PR title or the commit(s),
188
217
  with the following format: `[TICKET_ID]`.
@@ -199,27 +228,35 @@ The versioning scheme used is [SemVer AKA Semantic Versioning](https://semver.or
199
228
 
200
229
  ### Making a new release
201
230
 
202
- 1. Make a release branch started from `develop` (`git checkout -b release/X.Y.Z`)
203
- 1. Run `cargo xtask release bump [major|minor|patch|rc|pre] --dry-run`, check if it's the expected result
204
- 1. If all seems fine, re-run the previous command without the `--dry-run` argument.
205
- This will bump the versions of:
231
+ 1. Make a branch based on `main` to prepare for release (`git checkout -b prepare-release/X.Y.Z`)
232
+ 1. Run `sh scripts/update-versions.sh X.Y.Z` to update the versions of
206
233
  - all workspace member crates
207
234
  - `package.json`
208
235
  - `crypto-ffi/bindings/gradle.properties`
209
- 1. Edit `CHANGELOG.tpl` with the contents of the release.
210
- - Copy the git-conventional block from the previous release to your new release, modify the version tag
211
- - Remove the `unreleased=true` from the previous release
212
- - Try to write some human concise documentation so that client teams understand the changes at a glance
213
- 1. Run `cargo xtask documentation changelog` to generate the corresponding `CHANGELOG.md`
214
- 1. Make sure the changes look reasonable and complete; you can use
215
- [this commit](https://github.com/wireapp/core-crypto/commit/e680590ba6969ca2dc47aa38c7f220ea8974b369)
216
- as a reference.
217
- 1. Push your `release/X.Y.Z` branch and create a PR for it
218
- 1. Get it reviewed, then merge it into `develop` and remove the release branch from the remote.
219
- 1. Now, pull your local develop `git checkout develop && git pull`
220
- 1. Update the `main` branch: `git checkout main && git pull && git merge --ff-only develop`
236
+ Make sure the result of the script run is correct.
237
+ 1. Generate the relevant changelog section:
238
+ ```bash
239
+ git cliff --bump --unreleased
240
+ ```
241
+ and add it to the top of `CHANGELOG.md`.
242
+ Make sure the version number generated by `git cliff` matches the release version.
243
+ 1. If there are any release highlights, add them as the first subsection below release title:
244
+ ```markdown
245
+ ## v1.0.2 - 2024-08-16
246
+
247
+ ### Highlights
248
+
249
+ - foo
250
+ - bar
251
+ - baz
252
+ ```
253
+ 1. Make sure the changes look reasonable and complete; you can use the previous release as a reference
254
+ 1. Push your `prepare-release/X.Y.Z` branch and create a PR for it
255
+ 1. Get it reviewed, then merge it into `main` and remove the `prepare-release/X.Y.Z` branch from the remote
256
+ 1. Now, pull your local `main`: `git checkout main && git pull`
221
257
  1. Create the release tag: `git tag -s vX.Y.Z`
222
- 1. Push the branch and the new tag: `git push origin main && git push --tags`
258
+ 1. Push the new tag: `git push origin tag vX.Y.Z`
259
+ 1. Create a new release on github, copying the relevant section from `CHANGELOG.md`
223
260
  1. Voilà!
224
261
 
225
262
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wireapp/core-crypto",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "CoreCrypto bindings for the Web",
5
5
  "type": "module",
6
6
  "module": "platforms/web/corecrypto.js",
@@ -43,4 +43,4 @@
43
43
  "ts-loader": "^9.5.1",
44
44
  "typescript": "^5.3.3"
45
45
  }
46
- }
46
+ }