@boldvideo/bold-js 1.5.0 → 1.5.1

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/AGENTS.md CHANGED
@@ -46,11 +46,23 @@ This project uses [Changesets](https://github.com/changesets/changesets) with au
46
46
  - Removes the changeset files
47
47
  - When you merge that Release PR, the workflow automatically publishes to npm
48
48
 
49
+ ### Manual Release (when you need to publish immediately)
50
+
51
+ If you need to release immediately without waiting for the Release PR:
52
+
53
+ ```bash
54
+ pnpm changeset version # Consume changesets, bump version, update CHANGELOG
55
+ git add -A && git commit -m "chore: release vX.Y.Z"
56
+ git tag vX.Y.Z
57
+ git push origin main --tags
58
+ ```
59
+
60
+ The `release.yml` workflow will automatically publish to npm when it sees the `v*` tag.
61
+
49
62
  ### Important Notes
50
63
 
51
- - **Never run `pnpm changeset version` or `pnpm changeset publish` locally** - the GitHub Action handles this automatically
52
64
  - The CI workflow (`ci.yml`) runs `pnpm run build` which generates the `dist/` folder - this ensures compiled files are always included in the published package
53
- - The `release.yml` workflow can also publish when a `v*` tag is pushed (alternative release method)
65
+ - The `release.yml` workflow publishes when a `v*` tag is pushed
54
66
 
55
67
  ## Project Structure
56
68
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @boldvideo/bold-js
2
2
 
3
+ ## 1.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 21267d9: Fix SSE parsing to process final 'complete' event when stream closes without trailing newline
8
+
3
9
  ## 1.5.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -232,11 +232,14 @@ async function* parseSSE(response) {
232
232
  try {
233
233
  while (true) {
234
234
  const { done, value } = await reader.read();
235
- if (done)
236
- break;
237
- buffer += decoder.decode(value, { stream: true });
235
+ if (value) {
236
+ buffer += decoder.decode(value, { stream: true });
237
+ }
238
+ if (done) {
239
+ buffer += decoder.decode();
240
+ }
238
241
  const lines = buffer.split(/\r?\n\r?\n/);
239
- buffer = lines.pop() || "";
242
+ buffer = done ? "" : lines.pop() || "";
240
243
  for (const line of lines) {
241
244
  const trimmed = line.trim();
242
245
  if (!trimmed || !trimmed.startsWith("data:"))
@@ -254,6 +257,8 @@ async function* parseSSE(response) {
254
257
  } catch {
255
258
  }
256
259
  }
260
+ if (done)
261
+ break;
257
262
  }
258
263
  } finally {
259
264
  reader.releaseLock();
package/dist/index.js CHANGED
@@ -194,11 +194,14 @@ async function* parseSSE(response) {
194
194
  try {
195
195
  while (true) {
196
196
  const { done, value } = await reader.read();
197
- if (done)
198
- break;
199
- buffer += decoder.decode(value, { stream: true });
197
+ if (value) {
198
+ buffer += decoder.decode(value, { stream: true });
199
+ }
200
+ if (done) {
201
+ buffer += decoder.decode();
202
+ }
200
203
  const lines = buffer.split(/\r?\n\r?\n/);
201
- buffer = lines.pop() || "";
204
+ buffer = done ? "" : lines.pop() || "";
202
205
  for (const line of lines) {
203
206
  const trimmed = line.trim();
204
207
  if (!trimmed || !trimmed.startsWith("data:"))
@@ -216,6 +219,8 @@ async function* parseSSE(response) {
216
219
  } catch {
217
220
  }
218
221
  }
222
+ if (done)
223
+ break;
219
224
  }
220
225
  } finally {
221
226
  reader.releaseLock();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@boldvideo/bold-js",
3
3
  "license": "MIT",
4
- "version": "1.5.0",
4
+ "version": "1.5.1",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",