@proprioo/salatim 36.3.5 → 36.3.6
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/CHANGELOG.md +8 -0
- package/README.md +39 -55
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
**36.3.6**
|
|
2
|
+
|
|
3
|
+
* chore: move to GitHub actions
|
|
4
|
+
* ci: add release workflow
|
|
5
|
+
* ci: add lint and test workflow for PR
|
|
6
|
+
* chore: remove .npmrc file from repository
|
|
7
|
+
* doc: update readme with basic info about new workflows in GitHub
|
|
8
|
+
|
|
1
9
|
**36.3.5**
|
|
2
10
|
|
|
3
11
|
* fix adding Indonesia phone
|
package/README.md
CHANGED
|
@@ -4,85 +4,69 @@ Salatim is our component library, made with 🥑 and ❤️.
|
|
|
4
4
|
|
|
5
5
|
Please have a look on its storybook for each components.
|
|
6
6
|
|
|
7
|
-
## Before
|
|
8
|
-
|
|
9
|
-
Don't forget to add an empty NPM_TOKEN in your bash_profile, zsh, etc.. and reload it.
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
export NPM_TOKEN=''
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Status
|
|
16
|
-
|
|
17
|
-

|
|
18
|
-
|
|
19
|
-
| Branches | Functions | Lines | Statements |
|
|
20
|
-
| :-------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------ |
|
|
21
|
-
|  |  |  |  |
|
|
22
|
-
|
|
23
|
-
## Pages
|
|
24
|
-
|
|
25
|
-
[Source Map Explorer](https://proprioo.gitlab.io/frontend/salatim/explorer/)
|
|
26
|
-
|
|
27
|
-
[Storybook](https://proprioo.gitlab.io/frontend/salatim/storybook/)
|
|
28
|
-
|
|
29
7
|
## How to dev ?
|
|
30
8
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Use `yarn build`
|
|
36
|
-
|
|
37
|
-
## Update version
|
|
38
|
-
|
|
39
|
-
Before each change, please update `CHANGELOG.md` with a new version using the following template:
|
|
9
|
+
- create a branch from `main`
|
|
10
|
+
- make changes and sane commits (atomic, descriptive)
|
|
11
|
+
- push changes and create a PR on GitHub
|
|
12
|
+
- once complete, merge it to `main` using "Rebase and merge" strategy
|
|
40
13
|
|
|
41
|
-
|
|
42
|
-
**major.minor.patch**
|
|
14
|
+
**WARNING**: some checks are not yet executed on PR, make sure to run locally:
|
|
43
15
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
**BREAKING CHANGE** Commit message
|
|
16
|
+
```
|
|
17
|
+
$ yarn lint
|
|
18
|
+
$ yarn storybook:build
|
|
19
|
+
...
|
|
49
20
|
```
|
|
50
21
|
|
|
51
|
-
|
|
52
|
-
- Component / Feature: **minor**
|
|
53
|
-
- Everything which can bring changes in the different projects: **major**
|
|
22
|
+
## How to release a new version?
|
|
54
23
|
|
|
55
|
-
|
|
24
|
+
Final "production" release of salatim are managed through npmjs.com -- https://www.npmjs.com/package/@proprioo/salatim
|
|
56
25
|
|
|
57
|
-
|
|
58
|
-
$ yarn version --major | --minor | --patch
|
|
59
|
-
```
|
|
26
|
+
To publish a new version of salatim, you need to:
|
|
60
27
|
|
|
61
|
-
|
|
28
|
+
- checkout the `main` branch
|
|
29
|
+
- make sure everything is up to date with `git pull origin main`
|
|
30
|
+
- [optional by now] update the `CHANGELOG.md` file according to the changes you made since the last release
|
|
31
|
+
- create either a **patch**, **minor** or **major** release depending on the changes you made using yarn
|
|
32
|
+
- i.e. `yarn version --patch` for a patch release
|
|
33
|
+
- i.e. `yarn version --minor` for a minor release
|
|
34
|
+
- i.e. `yarn version --major` for a major release
|
|
35
|
+
- push the commit and the tag created by the previous command using `git push origin main --tags`
|
|
36
|
+
- go to GitHub and create a new release from the tag you just pushed
|
|
62
37
|
|
|
63
|
-
|
|
38
|
+
**WARNING**: the GitHub workflow to push the package to npmjs.com is currently untested, make sure to verify the
|
|
39
|
+
package is correctly published on npmjs.com after the release.
|
|
64
40
|
|
|
65
|
-
## Backport a fix
|
|
41
|
+
## **OUTDATED, TO BE CHECKED** Backport a fix
|
|
66
42
|
|
|
67
43
|
If you have to backport something to an old version of salatim :
|
|
68
44
|
|
|
69
45
|
1. go to the old version's branch (for example: `v15` before the rebranding)
|
|
70
|
-
2. add your commit(s), and don't forget to bump the version in `package.json` and `CHANGELOG.md` (if you fix something
|
|
46
|
+
2. add your commit(s), and don't forget to bump the version in `package.json` and `CHANGELOG.md` (if you fix something
|
|
47
|
+
and the previous version was `15.2.3`, bump to `15.2.4`)
|
|
71
48
|
3. push the branch, don't forget it!
|
|
72
49
|
4. run `yarn clean && yarn build` locally to make the package ready to be published
|
|
73
|
-
5. run `yarn publish --access=public --non-interactive --tag 15.2.4` locally. **Don't forget the `--tag` argument to
|
|
50
|
+
5. run `yarn publish --access=public --non-interactive --tag 15.2.4` locally. **Don't forget the `--tag` argument to
|
|
51
|
+
prevent overriding the latest version.**
|
|
74
52
|
|
|
75
53
|
You can then bump your project with this new version of salatim. ;)
|
|
76
54
|
|
|
77
55
|
## Update phone metadata
|
|
78
56
|
|
|
79
57
|
We cannot accept every phone numbers in the application, mainly due to some optimization (Metadata JSON is a big file).
|
|
80
|
-
When an error is triggered on AppSales (`Failed to parse phone number +XXXX`), we need to update the phone Metadata to
|
|
58
|
+
When an error is triggered on AppSales (`Failed to parse phone number +XXXX`), we need to update the phone Metadata to
|
|
59
|
+
accept it.
|
|
81
60
|
|
|
82
61
|
1. Find the country calling code, to do so:
|
|
83
|
-
1. Go to [Phone.tsx](./packages/phone//src/phoneInput/PhoneInput.tsx), change `PhoneInput` import to
|
|
62
|
+
1. Go to [Phone.tsx](./packages/phone//src/phoneInput/PhoneInput.tsx), change `PhoneInput` import to
|
|
63
|
+
`'react-phone-number-input'` and remove metadata attribute in JSX (like this we're accepting every possible phone
|
|
64
|
+
numbers)
|
|
84
65
|
2. Start locally Storybook and copy / paste your troublesome phone number to find the country calling code.
|
|
85
66
|
2. Go to [CountryCode.org](https://countrycode.org/) and find your country calling code.
|
|
86
|
-
3. Use the 2 digit ISO found to update the script [generate-phone-metadata](./package.json), then run this script (
|
|
87
|
-
|
|
88
|
-
|
|
67
|
+
3. Use the 2 digit ISO found to update the script [generate-phone-metadata](./package.json), then run this script (
|
|
68
|
+
Metadata will be automatically generated).
|
|
69
|
+
4. We also need to update the Phone component to accept this new option, go
|
|
70
|
+
to [constants](./packages/phone/src/phoneInput/constants.ts) and add this 2 digit ISO in both constants.
|
|
71
|
+
5. Do not forget to rollback your changes in `PhoneInput.tsx`, then update Changelog.md and package.json version and
|
|
72
|
+
you're up to go.
|