@apollosproject/canvas-embeds 2.1.683 → 2.1.685

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
@@ -226,6 +226,20 @@ To test changes, open `http://localhost:5174` in your browser.
226
226
 
227
227
  ---
228
228
 
229
+ ### Publishing Updates / Cache Busting
230
+
231
+ Deploying the Remix app does **not** publish this package or invalidate the CDN. To ship new widget code:
232
+
233
+ 1. `cd apps/web-embeds`
234
+ 2. Bump the version (patch by default): `yarn bump` (or `yarn bump:minor` / `yarn bump:major`)
235
+ 3. Publish the package: `npm publish --access public` (automatically runs `prepublishOnly`/build)
236
+ 4. After npm shows the new version, purge jsDelivr so `@latest` updates immediately: `yarn flush`
237
+ 5. (Optional) Hit `https://cdn.jsdelivr.net/npm/@apollosproject/canvas-embeds@latest/widget/index.js` to verify the new bundle is served
238
+
239
+ Skipping the publish step means users will still download the previous version even if the repo contains newer code, and skipping the flush step delays propagation until jsDelivr expires its cache.
240
+
241
+ ---
242
+
229
243
  ### Caching
230
244
 
231
245
  To test caching in local development, modify the Apollo client configuration by commenting out the `x-cache-me-not` header in:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@apollosproject/canvas-embeds",
3
3
  "description": "Apollos React embed widgets",
4
- "version": "2.1.683",
4
+ "version": "2.1.685",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.umd.js",
7
7
  "module": "./dist/index.es.js",
@@ -62,10 +62,12 @@
62
62
  "web-vitals": "^0.2.4"
63
63
  },
64
64
  "scripts": {
65
- "build": "dotenv -- vite build && node scripts/build.js",
66
- "bump": "yarn build && ./scripts/bump.sh",
67
- "bump:minor": "yarn build && ./scripts/bump.sh minor",
68
- "bump:major": "yarn build && ./scripts/bump.sh major",
65
+ "prebuild": "yarn workspace @apollosproject/cluster-client build",
66
+ "build": "yarn workspace @apollosproject/cluster-client build && dotenv -- vite build && node scripts/build.js",
67
+ "bump": "./scripts/bump.sh",
68
+ "bump:minor": "./scripts/bump.sh minor",
69
+ "bump:major": "./scripts/bump.sh major",
70
+ "prepublishOnly": "yarn build && ([ -s widget/index.js ] && [ -s widget/index.css ] || (echo \"Web embed bundle missing. Build failed.\" && exit 1))",
69
71
  "dev": "vite --host",
70
72
  "flush": "sh scripts/flush-cdn-cache.sh",
71
73
  "format": "prettier --write .",