@benefex/icons 0.7.1 → 0.8.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 +18 -16
- package/package.json +16 -2
package/README.md
CHANGED
|
@@ -8,29 +8,31 @@ SVGs are automatically converted to TSX using [svgr](https://react-svgr.com/)
|
|
|
8
8
|
- Make sure it has `fill="currentColor` or `stroke="currentColor"`
|
|
9
9
|
- Make sure it has a viewBox (width, height will be removed)
|
|
10
10
|
|
|
11
|
-
###
|
|
12
|
-
|
|
13
|
-
All version deployments are handled by circleCI. To begin developing a new version you will need to create a branch.
|
|
14
|
-
|
|
15
|
-
Use [`npm version`](https://docs.npmjs.com/cli/version) with the feature branch checked out to create a new version commit. This will automatically update the version number in `package.json` and other relevant files. Code is linted and tested before a version is created.
|
|
16
|
-
|
|
17
|
-
Use [semantic versioning](https://semver.org) where possible:
|
|
18
|
-
|
|
11
|
+
### Versioning
|
|
12
|
+
Use [semantic versioning](https://semver.org):
|
|
19
13
|
- `major` version when you make incompatible API changes
|
|
20
14
|
- `minor` version when you add functionality in a backwards-compatible manner
|
|
21
15
|
- `patch` version when you make backwards-compatible bug fixes
|
|
22
16
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
All latest version deployments are handled by [semantic-release](https://github.com/semantic-release/semantic-release) which is triggered in CircleCI's `main` pipeline. _semantic-release_ will look at your commit message and determine how to increment the version based on its format. See [here](https://github.com/TrigenSoftware/simple-release/blob/main/GUIDE.md) for more details on how this works. [commitlint](https://commitlint.js.org/) hook is used to ensure your commit message is correct before pushing.
|
|
18
|
+
|
|
19
|
+
To summarise:
|
|
20
|
+
- `feat` is a minor version bump
|
|
21
|
+
- `fix` is a patch version bump
|
|
22
|
+
- `perf` is a patch version bump
|
|
23
|
+
- commit with `!` after the type (or scope) is a major version bump. Eg: `feat!: add image` or `feat(new)!: add image`
|
|
24
|
+
- all other types do not cause any version bump
|
|
25
|
+
|
|
26
|
+
_*This is fully customizable so can be updated to better suit our needs if required_
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
When the pull request is merged to main, the CircleCI main workflow runs which will perform all of the necessary npm publishing and git tagging, along with creating a Github release containing release notes.
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
#### Beta deployments
|
|
31
|
+
All pull requests will deploy a beta version as part of the PR pipeline. This allows for easy testing without having to merge your PR. The version deployed will be `{CURRENT_MAJOR_VERSION}.0.0-PR${PULL_REQUEST_NUMBER}-BN${BUILD_NUM}`. For example: `7.0.0-PR100-BN150`
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
#### Check the version your branch is using
|
|
34
|
+
We do not keep track of the current version in package.json due to it not being necessary ([Why isn't it necessary?](https://semantic-release.gitbook.io/semantic-release/support/faq#it-is-not-needed-for-semantic-release-to-do-its-job)).
|
|
35
|
+
However, to print out the package version your branch is using, run `npm run check-version`
|
|
34
36
|
|
|
35
37
|
## Usage
|
|
36
38
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@benefex/icons",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Benefex icon package",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
12
|
"test": "npx jest --coverage",
|
|
13
|
+
"ci-test": "CI=true npm test -- --coverage --ci --runInBand",
|
|
13
14
|
"lint": "echo 'No linting'",
|
|
14
15
|
"clean": "rm -rf ./generated && rm -rf ./dist",
|
|
15
16
|
"build:icons": "npx @svgr/cli --out-dir generated ./src/svgs/ && cp src/svgr.ts generated",
|
|
@@ -17,7 +18,14 @@
|
|
|
17
18
|
"build": "npm run clean && npm run build:icons && npm run build:tsc",
|
|
18
19
|
"prepublishOnly": "npm run build",
|
|
19
20
|
"storybook": "npm run build && storybook dev -p 6006",
|
|
20
|
-
"build-storybook": "npm run build && storybook build"
|
|
21
|
+
"build-storybook": "npm run build && storybook build",
|
|
22
|
+
"prepare": "husky",
|
|
23
|
+
"check-version": "git fetch --tags && git describe --tags --abbrev=0"
|
|
24
|
+
},
|
|
25
|
+
"commitlint": {
|
|
26
|
+
"extends": [
|
|
27
|
+
"@commitlint/config-conventional"
|
|
28
|
+
]
|
|
21
29
|
},
|
|
22
30
|
"repository": {
|
|
23
31
|
"type": "git",
|
|
@@ -34,6 +42,8 @@
|
|
|
34
42
|
},
|
|
35
43
|
"homepage": "https://github.com/BenefexLtd/onehub-icons#readme",
|
|
36
44
|
"devDependencies": {
|
|
45
|
+
"@commitlint/cli": "^19.8.1",
|
|
46
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
37
47
|
"@storybook/addon-essentials": "^8.1.10",
|
|
38
48
|
"@storybook/addon-links": "^8.1.10",
|
|
39
49
|
"@storybook/blocks": "^8.1.10",
|
|
@@ -43,6 +53,7 @@
|
|
|
43
53
|
"@types/react": "^18.3.3",
|
|
44
54
|
"@types/react-dom": "^18.3.0",
|
|
45
55
|
"camelcase": "^8.0.0",
|
|
56
|
+
"husky": "^9.1.6",
|
|
46
57
|
"jest": "^29.7.0",
|
|
47
58
|
"react": "^18.3.1",
|
|
48
59
|
"react-dom": "^18.3.1",
|
|
@@ -51,5 +62,8 @@
|
|
|
51
62
|
},
|
|
52
63
|
"peerDependencies": {
|
|
53
64
|
"react": "16 - 18"
|
|
65
|
+
},
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"conventional-changelog-conventionalcommits": "^9.1.0"
|
|
54
68
|
}
|
|
55
69
|
}
|