@tmsoft/webphone 3.0.19 → 3.0.21

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
@@ -87,6 +87,64 @@ If `onAnswer`, `onHangup` or `onReject` are provided, the component will call th
87
87
  `sipCallId` is the SIP dialog identifier. It is not the Asterisk `Uniqueid` or `Linkedid`.
88
88
  Consumers may read the emitted streams but must not stop or mutate their tracks; the WebPhone owns their lifecycle.
89
89
 
90
+ ## Releasing a new version
91
+
92
+ Publishing is automated: CI reacts to what you push, so a release is a version bump
93
+ plus a push. Never run `npm publish` by hand.
94
+
95
+ ```bash
96
+ # 1. Land the changes on master first — CI publishes what the tag points at.
97
+ git checkout master && git pull
98
+
99
+ # 2. Bump. Creates the release commit AND the tag in one step.
100
+ npm version patch # or minor / major
101
+
102
+ # 3. Push the commit together with its tag.
103
+ git push --follow-tags
104
+ ```
105
+
106
+ Step 2 needs no extra flags because [`.npmrc`](.npmrc) already pins the release
107
+ conventions: `git-tag-version=true` creates the tag, `tag-version-prefix=v` names it
108
+ `vX.Y.Z`, and `message="chore(release): v%s"` writes the commit subject. Bump `minor`
109
+ or `major` for anything past a patch, but keep in mind consumers pinned to `^3.0.x`
110
+ still pick a new minor up automatically.
111
+
112
+ ### What CI does with the tag
113
+
114
+ | Workflow | Triggered by | Publishes to |
115
+ | --- | --- | --- |
116
+ | [`ci.yml`](.github/workflows/ci.yml) | push to `master` / `develop`, tags `v*`, PRs | — builds and uploads the `dist` artifact |
117
+ | [`publish-npm.yml`](.github/workflows/publish-npm.yml) | successful CI on `master` **or** a `v*` tag | npm as `@tmsoft/webphone` |
118
+ | [`publish-github.yml`](.github/workflows/publish-github.yml) | successful CI on a `v*` tag only | GitHub Packages, rescoped to the repo owner |
119
+
120
+ Both publish jobs reuse the `dist` artifact CI already built and fall back to
121
+ `yarn install && yarn build:lib` if the download fails.
122
+
123
+ > Pushing to `master` without a version bump also fires the npm publish job, and it
124
+ > fails on the already-taken version. Harmless, but it is why a red publish run right
125
+ > after a merge is usually not a real problem.
126
+
127
+ ### Consuming the new version
128
+
129
+ Downstream projects use Yarn 4:
130
+
131
+ ```bash
132
+ yarn up @tmsoft/webphone # latest — also rewrites the range in package.json
133
+ yarn up @tmsoft/webphone@^3.0.19 # a specific version
134
+ ```
135
+
136
+ Yarn refuses packages younger than its `npmMinimalAgeGate` (24 h by default), which a
137
+ release published minutes ago always trips. Consumers that need to pick a version up
138
+ immediately set `npmMinimalAgeGate: 0` in their `.yarnrc.yml` — as this repo and
139
+ `calloperator-frontend` both do.
140
+
141
+ Verify the published bundle actually carries the change instead of trusting the
142
+ version number, since the publish jobs reuse a prebuilt artifact:
143
+
144
+ ```bash
145
+ node -p "require('./node_modules/@tmsoft/webphone/package.json').version"
146
+ ```
147
+
90
148
  ## License
91
149
 
92
150
  MIT