@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 +46 -15
- package/lib/payment-methods.d.ts +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,18 +3,49 @@
|
|
|
3
3
|
|
|
4
4
|
## Contribution
|
|
5
5
|
|
|
6
|
-
1.
|
|
7
|
-
2.
|
|
8
|
-
3.
|
|
9
|
-
4.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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.
|
package/lib/payment-methods.d.ts
CHANGED
|
@@ -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 {
|