diff --git a/.github/workflows/npm-alpha-publish.yml b/.github/workflows/npm-alpha-publish.yml deleted file mode 100644 index 68541cff..00000000 --- a/.github/workflows/npm-alpha-publish.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Publish Alpha Package to npmjs -on: - push: - branches: - - "alpha/*" - tags: - - "v*.*.*-alpha.*" - -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - id-token: write - steps: - - uses: actions/checkout@v4 - - # Setup Node.js and npm registry - - uses: actions/setup-node@v4 - with: - node-version: "18" - registry-url: "https://registry.npmjs.org" - always-auth: true - - - run: npm ci - - run: npm run build - - # Publish package to npm under the "alpha" tag - - run: npm publish --tag alpha --provenance - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 5451d01b..7921a333 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,22 +1,48 @@ -name: Publish Package to npmjs +name: Publish package to npmjs registry on: - release: - types: [created] + release: + types: [published] jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - id-token: write - steps: - - uses: actions/checkout@v4 - # Setup .npmrc file to publish to npm - - uses: actions/setup-node@v4 - with: - node-version: "18" - registry-url: "https://registry.npmjs.org" - - run: npm ci - - run: npm run build - - run: npm publish --provenance --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + publish: + runs-on: ubuntu-latest + if: ${{ !endsWith(github.event.release.name, '-alpha') }} + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.release.tag_name }} + persist-credentials: false + - uses: actions/setup-node@v4 + with: + node-version: 24 + registry-url: https://registry.npmjs.org/ + cache: 'npm' + - run: npm ci + - name: Update npm + run: npm install -g npm@latest + - name: Release + run: npm publish --provenance --access public + publish-alpha: + runs-on: ubuntu-latest + if: ${{ endsWith(github.event.release.name, '-alpha') }} + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.release.tag_name }} + persist-credentials: false + - uses: actions/setup-node@v4 + with: + node-version: 24 + registry-url: https://registry.npmjs.org/ + cache: 'npm' + - run: npm ci + - name: Update npm + run: npm install -g npm@latest + - name: Release + # Without --tag alpha npm moves the latest tag to the prerelease + run: npm publish --tag alpha --provenance --access public diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 9ec05a51..38fd9e69 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -26,4 +26,4 @@ jobs: # Set if: always() to also generate the report if tests are failing # Only works if you set `reportOnFailure: true` in your vite config as specified above if: always() - uses: davelosert/vitest-coverage-report-action@v2 + uses: davelosert/vitest-coverage-report-action@c4bbc33a89b7ace0e63d35f1f7d4bcee31155a73 # v2.13.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index e7a59903..a2769467 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,55 @@ # Changelog +## [v4.5.3](https://github.com/contentstack/live-preview-sdk/compare/v4.5.2...v4.5.3) + +> 29 September 2026 + +### Fixes + +- fix(visual-builder): handle rejection when discussion highlights has no listener (Kirtesh Suthar - [#652](https://github.com/contentstack/live-preview-sdk/pull/652)) + +### General Changes + +- Updated codeowners (Karan Bhavesh Gandhi - [#657](https://github.com/contentstack/live-preview-sdk/pull/657)) + +### Fixes + +- fix(visual-builder): correct the documented rejection contract and cover the observer send (Kirtesh Suthar - [b78d266](https://github.com/contentstack/live-preview-sdk/commit/b78d2662f563f2261b02eea9a6b7088fc2485ee5)) + +### Refactoring and Updates + +- refactor(visual-builder): warn on real send failures, stay silent on a missing listener (Kirtesh Suthar - [19f80f9](https://github.com/contentstack/live-preview-sdk/commit/19f80f9a69bd53ded3bf579d96ec6e36ad162904)) + +### Changes to Test Assests + +- test(visual-builder): bind both send sites to the discriminating handler (Kirtesh Suthar - [dc4d8bf](https://github.com/contentstack/live-preview-sdk/commit/dc4d8bf3f2c102ca30479773435d95584a881e56)) +- test(visual-builder): pin the rejection value in the warning, and tidy spy lifecycles (Kirtesh Suthar - [de91b09](https://github.com/contentstack/live-preview-sdk/commit/de91b09de7d3f8d47252f9aa5fcfe1c6ada7b278)) + +## [v4.5.2](https://github.com/contentstack/live-preview-sdk/compare/v4.5.1...v4.5.2) + +> 16 September 2026 + +### Fixes + +- fix(release): restore build before publish and the alpha dist-tag (Kirtesh Suthar - [#650](https://github.com/contentstack/live-preview-sdk/pull/650)) + +### General Changes + +- release: v4.5.2 (Kirtesh Suthar - [#651](https://github.com/contentstack/live-preview-sdk/pull/651)) + +### Fixes + +- fix: update CDN version to 4.5.2 in README (Kirtesh Suthar - [514013d](https://github.com/contentstack/live-preview-sdk/commit/514013d8cf6cb2e6c65c0da11be39df1476a7444)) +- fix(release): publish prereleases under the alpha dist-tag (Kirtesh Suthar - [86f5187](https://github.com/contentstack/live-preview-sdk/commit/86f5187abd0a861bdd8a328f9cab04df926f5c0c)) +- fix(release): build on prepack so dist ships in the published package (Kirtesh Suthar - [76e6a9d](https://github.com/contentstack/live-preview-sdk/commit/76e6a9dc6748f15d459320ced52da95e403bb9bf)) + +### Chores And Housekeeping + +- chore(ci): pin vitest-coverage-report-action to a commit sha (Kirtesh Suthar - [fd8e6af](https://github.com/contentstack/live-preview-sdk/commit/fd8e6af5a8b4b5c8cdd512955180b943616c0c26)) + ## [v4.5.1](https://github.com/contentstack/live-preview-sdk/compare/v4.5.0...v4.5.1) -> 10 September 2026 +> 15 September 2026 ### Fixes @@ -11,15 +58,22 @@ ### Chores And Housekeeping +- chore(release): v4.5.1 (Kirtesh Suthar - [#646](https://github.com/contentstack/live-preview-sdk/pull/646)) - chore: sync develop_v4 with stage_v4 (Kirtesh Suthar - [#645](https://github.com/contentstack/live-preview-sdk/pull/645)) - chore(tests): standardize api key placeholder values in specs (Hitesh Shetty - [#639](https://github.com/contentstack/live-preview-sdk/pull/639)) ### General Changes +- release: v4.5.1 (Kirtesh Suthar - [#647](https://github.com/contentstack/live-preview-sdk/pull/647)) - Develop v4 (Kirtesh Suthar - [#640](https://github.com/contentstack/live-preview-sdk/pull/640)) +### Fixes + +- fix: update CDN version to 4.5.1 in README (Kirtesh Suthar - [e93cc36](https://github.com/contentstack/live-preview-sdk/commit/e93cc36a182d084fed01b3ee5b3262a51fb159fd)) + ### Chores And Housekeeping +- chore: merge main into stage_v4 release branch (Kirtesh Suthar - [3d2e823](https://github.com/contentstack/live-preview-sdk/commit/3d2e8231f7e6cf21a8648d6435499f3773367510)) - chore: merge stage_v4 into develop_v4 (Kirtesh Suthar - [e1dee0f](https://github.com/contentstack/live-preview-sdk/commit/e1dee0f33c15fbbeb9d7842ad70aba7610801524)) - chore(deps): apply npm audit fix (hitesh-shetty-cstk - [ec144b9](https://github.com/contentstack/live-preview-sdk/commit/ec144b934935185f40efccfdcd09d4ac153222c8)) @@ -27,6 +81,13 @@ - refactor(utils): one list for live preview's own query params (Kirtesh Suthar - [c179114](https://github.com/contentstack/live-preview-sdk/commit/c1791141dd7f22430f4f96d8070f4354dc9b641e)) +### General Changes + +- Update npm-publish.yml (Aravind Kumar - [60ce24f](https://github.com/contentstack/live-preview-sdk/commit/60ce24f4c53467294a9b52307337d670a404eec9)) +- Delete .github/workflows/npm-alpha-publish.yml (Aravind Kumar - [71a26ad](https://github.com/contentstack/live-preview-sdk/commit/71a26ad7dc3a9534c2513858a0fa574fd8940be4)) +- Update npm-publish.yml (Aravind Kumar - [89811da](https://github.com/contentstack/live-preview-sdk/commit/89811da4bf36528c30d2efc14c5d01594234a501)) +- Updated codeowners (Aravind Kumar - [4183387](https://github.com/contentstack/live-preview-sdk/commit/41833878124126b1cf74d92d8501f1d1eda1c06f)) + ## [v4.5.0](https://github.com/contentstack/live-preview-sdk/compare/v4.4.5...v4.5.0) > 11 August 2026 @@ -271,10 +332,18 @@ - Merge origin/stage_v4 into stage_v4 — resolve version conflicts (4.3.0 → 4.4.0) (hitesh-shetty-cstk - [be798e3](https://github.com/contentstack/live-preview-sdk/commit/be798e30c2c82f57488407477482cd3e5273751f)) - Merge pull request #565 from contentstack/develop_v4 (Karan Bhavesh Gandhi - [c8fc00d](https://github.com/contentstack/live-preview-sdk/commit/c8fc00ddf53681e2bd5c08ad6d61799b236728ca)) -## [v4.4.0](https://github.com/contentstack/live-preview-sdk/compare/v4.3.0...v4.4.0) +## [v4.4.0](https://github.com/contentstack/live-preview-sdk/compare/v4.3.1...v4.4.0) > 6 April 2026 +### General Changes + +- Merge pull request #578 from contentstack/stage_v4 (Karan Bhavesh Gandhi - [7dbe992](https://github.com/contentstack/live-preview-sdk/commit/7dbe99233ad3920834147de9f67d63c8bd2895fc)) + +## [v4.3.1](https://github.com/contentstack/live-preview-sdk/compare/v4.3.0...v4.3.1) + +> 2 April 2026 + ### New Features - feat(visual-editor): request edit access workflow tooltips and canvas integration (Hitesh Shetty - [#572](https://github.com/contentstack/live-preview-sdk/pull/572)) @@ -318,7 +387,6 @@ ### General Changes -- Merge pull request #578 from contentstack/stage_v4 (Karan Bhavesh Gandhi - [7dbe992](https://github.com/contentstack/live-preview-sdk/commit/7dbe99233ad3920834147de9f67d63c8bd2895fc)) - Merge pull request #576 from contentstack/develop_v4 (Karan Bhavesh Gandhi - [2501855](https://github.com/contentstack/live-preview-sdk/commit/25018553092688922b523e70ac60a6a0363cec15)) - Merge pull request #577 from contentstack/VP-1133/purge-flag-4 (Karan Bhavesh Gandhi - [a621121](https://github.com/contentstack/live-preview-sdk/commit/a621121d15a2b518d75e39dbba996ba585439003)) diff --git a/README.md b/README.md index a136de21..a6449595 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,11 @@ npm install @contentstack/live-preview-utils ### Load from a CDN (advanced) -Pin the version to match your app (update `4.5.1` when you upgrade): +Pin the version to match your app (update `4.5.3` when you upgrade): ```html