@soltech/fluid-common 1.17.0 → 1.18.0-sc24475.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
@@ -3,18 +3,49 @@
3
3
 
4
4
  ## Contribution
5
5
 
6
- 1. Make a change
7
- 2. Bump the package version according to change severity
8
- 3. Commit
9
- 4. run `npm run pub` - it'll build the package, publish it to npm and push changes to github
10
-
11
- But during the time of development, another version could have been deployed, without your change only available in your Pull Request.
12
- And you need to keep your branch updated with the `main` one.
13
- In that case, follow these steps:
14
-
15
- 1. make sure your commons is up to date with main
16
- 2. create a branch out of main and make your changes or update the branch of the PR
17
- 3. bump the package version according to severity - that’s a bit tricky as that version may already be taken by a parallel work, so it’s worth checking other active branches or the npm itself
18
- 4. commit and push the branch
19
- 5. run `npm run pub` to publish the package
20
- 6. refer to the package in your branch in another repo
6
+ 1. Branch out of an up-to-date `main` (branch name: the Shortcut story number).
7
+ 2. Make your change in `src/`.
8
+ 3. Bump `version` in `package.json` (see [Versions](#versions)), then run `npm i` to update `package-lock.json`.
9
+ 4. Commit `src/`, `package.json` and `package-lock.json`.
10
+ 5. Push: `git push --set-upstream origin HEAD`.
11
+ 6. Publish (see [Publishing](#publishing)).
12
+ 7. In each consumer, install the exact version: `npm install @soltech/fluid-common@<version> --save-exact`.
13
+
14
+ Push before you publish, so npm never holds a package whose commit is missing from GitHub.
15
+ Do not use `npm run pub`: it publishes first and pushes after, and it cannot pass the tag a prerelease needs.
16
+
17
+ ### Versions
18
+
19
+ While a story is in progress, publish a **prerelease** named after it:
20
+
21
+ ```
22
+ <next version>-sc<story>.<n> e.g. 1.17.0-sc24475.0
23
+ ```
24
+
25
+ - `<next version>` must be higher than anything already on npm, including versions from parallel branches
26
+ that are not on `main` yet. Check with `npm view @soltech/fluid-common versions`.
27
+ A prerelease counts as older than the release it is named after, so `1.16.0-sc24475.0` comes before `1.16.0`.
28
+ - `<n>` starts at `0` and goes up each time you publish a change for the same story.
29
+ A published version can never be republished.
30
+ - Once the PR is approved and merged, publish the plain version (`1.17.0`) from `main`
31
+ and point the consumers at it.
32
+
33
+ Consumers pin an exact version (`"1.17.0-sc24475.0"`), never a caret range.
34
+
35
+ ### Publishing
36
+
37
+ A prerelease needs a dist-tag, otherwise npm refuses it
38
+ (`You must specify a tag using --tag when publishing a prerelease version`).
39
+ Use the story number as the tag, so `npm install @soltech/fluid-common` keeps resolving to the latest release:
40
+
41
+ ```
42
+ npm publish --tag sc24475
43
+ ```
44
+
45
+ A release from `main` takes no tag and becomes `latest`:
46
+
47
+ ```
48
+ npm publish
49
+ ```
50
+
51
+ `prepublishOnly` rebuilds `lib/` before every publish, so there is no separate build step.
@@ -48,6 +48,12 @@ export interface PaymentMethod {
48
48
  encryptionSettings?: EncryptionSettings;
49
49
  hostedFields?: HostedFieldsSettings;
50
50
  deviceProtection?: DeviceProtectionSettings;
51
+ highlight?: PaymentMethodHighlight;
52
+ }
53
+ export type PaymentMethodHighlightTone = 'positive' | 'warning';
54
+ export interface PaymentMethodHighlight {
55
+ text: string;
56
+ tone: PaymentMethodHighlightTone;
51
57
  }
52
58
  /** Its presence is also how the client decides the gateway behind this method profiles at all. */
53
59
  export interface DeviceProtectionSettings {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soltech/fluid-common",
3
- "version": "1.17.0",
3
+ "version": "1.18.0-sc24475.0",
4
4
  "type": "module",
5
5
  "description": "Fluid frontend, API and AI common interfaces & enums",
6
6
  "main": "lib/index.js",