@doist/react-interpolate 2.2.2 → 2.2.3

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.
Files changed (2) hide show
  1. package/README.md +8 -7
  2. package/package.json +12 -3
package/README.md CHANGED
@@ -215,14 +215,15 @@ import { SYNTAX_I18NEXT } from "react-interpolate"
215
215
 
216
216
  # Releasing
217
217
 
218
- A new version of @doist/react-interpolate is published both on npm and GitHub Package Registry whenever a new release on GitHub is created.
218
+ Releases are fully automated with [semantic-release](https://semantic-release.gitbook.io/). There is no manual version bump: the next version number, the changelog, the git tag, the GitHub release, and the npm/GitHub Package Registry publishes are all derived from the commit history.
219
219
 
220
- To update the version in both `package.json` and `package-lock.json` run:
220
+ Every push to `main` runs the `Release` workflow, which:
221
221
 
222
- ```sh
223
- npm --no-git-tag-version version <major|minor|patch>
224
- ```
222
+ 1. analyses the [Conventional Commits](https://www.conventionalcommits.org/) since the last release to determine the next version (`fix:` → patch, `feat:` → minor, `feat!:`/`BREAKING CHANGE` → major),
223
+ 2. updates `CHANGELOG.md`, `package.json`, and `package-lock.json` and commits them back,
224
+ 3. tags the release and publishes the GitHub release notes, and
225
+ 4. publishes the package to npm with provenance.
225
226
 
226
- Once these changes have been pushed and merged, create a release on GitHub.
227
+ Because the version is inferred from commits, **pull request titles and commits must follow the Conventional Commits format** — this is enforced by the `Semantic Pull Request` check. If a batch of commits contains no releasable changes (e.g. only `chore:`/`docs:`/`ci:`), no release is published.
227
228
 
228
- A GitHub Action will automatically perform all the necessary steps and will release the version number that's specified inside the `package.json`'s `version` field so make sure that the release tag reflects the version you want to publish.
229
+ Pushes to the `next` branch publish a prerelease on the `next` dist-tag without updating the changelog.
package/package.json CHANGED
@@ -1,14 +1,18 @@
1
1
  {
2
2
  "name": "@doist/react-interpolate",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "repository": "https://github.com/Doist/react-interpolate",
5
5
  "license": "MIT",
6
6
  "description": "A string interpolation component that formats and interpolates a template string in a safe way",
7
7
  "main": "dist/react-interpolate.cjs",
8
8
  "module": "dist/react-interpolate.mjs",
9
9
  "types": "dist/react-interpolate.d.ts",
10
+ "publishConfig": {
11
+ "access": "public",
12
+ "provenance": true
13
+ },
10
14
  "engines": {
11
- "node": "^20.0.0 || ^21.0.0 || ^22.0.0",
15
+ "node": "^20.0.0 || ^22.0.0 || ^24.0.0 || ^26.0.0",
12
16
  "npm": "^10.0.0 || ^11.0.0"
13
17
  },
14
18
  "files": [
@@ -21,7 +25,8 @@
21
25
  "build": "del dist && rollup -c && npm run mini-cjs && npm run mini-mjs",
22
26
  "mini-cjs": "uglifyjs dist/react-interpolate.cjs --compress --mangle --enclose --output dist/react-interpolate.min.cjs",
23
27
  "mini-mjs": "uglifyjs dist/react-interpolate.mjs --compress --mangle --enclose --output dist/react-interpolate.min.mjs",
24
- "prettify": "prettier --write ."
28
+ "prettify": "prettier --write .",
29
+ "prepublishOnly": "npm run build && npm run test"
25
30
  },
26
31
  "prettier": "@doist/prettier-config",
27
32
  "keywords": [
@@ -47,8 +52,11 @@
47
52
  "@babel/runtime": "7.18.6",
48
53
  "@doist/eslint-config": "7.1.2",
49
54
  "@doist/prettier-config": "3.0.5",
55
+ "@semantic-release/changelog": "6.0.3",
56
+ "@semantic-release/git": "10.0.1",
50
57
  "@testing-library/react": "13.3.0",
51
58
  "babel-jest": "28.1.2",
59
+ "conventional-changelog-conventionalcommits": "9.3.1",
52
60
  "core-js": "3.23.3",
53
61
  "del-cli": "4.0.1",
54
62
  "eslint": "8.18.0",
@@ -68,6 +76,7 @@
68
76
  "rollup": "2.75.7",
69
77
  "rollup-plugin-babel": "4.4.0",
70
78
  "rollup-plugin-copy": "3.5.0",
79
+ "semantic-release": "25.0.5",
71
80
  "uglify-es": "3.3.9"
72
81
  }
73
82
  }