Skip to content

Commit 7bad2f0

Browse files
authored
Merge pull request #37 from s-group-dev/beta
Migrate to Usercentrics Web CMP v3
2 parents 652f714 + 947f8e3 commit 7bad2f0

29 files changed

+880
-902
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ name: Release
33
on:
44
push:
55
tags:
6-
# Semver-like tags "v1.0.0"
6+
# Latest release tags, e.g. "v2.0.0"
77
- 'v[0-9]+.[0-9]+.[0-9]+'
8+
# Beta release tags, e.g. "v3.0.0-beta.1"
9+
- 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'
810

911
jobs:
1012
Install:

.gitlab-ci.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,29 @@
22
## This package is mirrored to an internal NPM registry
33
#
44

5-
image: node:18-alpine
5+
image: node:22-alpine
66

77
stages:
88
- release
99

10-
workflow:
10+
release-latest:
11+
stage: release
1112
rules:
13+
- if: '$CI_COMMIT_TAG =~ /^v\d+.\d+.\d+-beta\.\d+/'
14+
when: never
1215
- if: '$CI_COMMIT_TAG =~ /^v\d+.\d+.\d+/'
1316
- if: '$CI_MANUAL_TRIGGER'
17+
script:
18+
- npm ci
19+
- npm run build
20+
- npm publish
1421

15-
release:
22+
release-beta:
1623
stage: release
24+
rules:
25+
- if: '$CI_COMMIT_TAG =~ /^v\d+.\d+.\d+-beta\.\d+/'
26+
- if: '$CI_MANUAL_TRIGGER'
1727
script:
1828
- npm ci
1929
- npm run build
20-
- npm publish
30+
- npm publish --tag beta

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
## [3.0.0-beta.4](https://github.com/s-group-dev/react-usercentrics/compare/v3.0.0-beta.3...v3.0.0-beta.4) (2025-04-03)
2+
3+
### Features
4+
5+
* export USERCENTRICS_WEB_CMP_LOADER_SCRIPT_URL constant ([0ce4253](https://github.com/s-group-dev/react-usercentrics/commit/0ce42538470e120c5cda4eab7a7e8566d251aac8))
6+
7+
## [3.0.0-beta.3](https://github.com/s-group-dev/react-usercentrics/compare/v3.0.0-beta.2...v3.0.0-beta.3) (2025-03-31)
8+
9+
### Features
10+
11+
* add `getServiceInfo()` method ([df5383f](https://github.com/s-group-dev/react-usercentrics/commit/df5383fcaddef92b1ebd2dfe3e42608810e1672b))
12+
* add missing method `saveConsents()` to use with `updateServicesConsents()` ([20347c7](https://github.com/s-group-dev/react-usercentrics/commit/20347c7f325548b745651fe743e4500910652c24))
13+
14+
### Bug Fixes
15+
16+
* only throw in strict mode when service id missing ([8f03b2b](https://github.com/s-group-dev/react-usercentrics/commit/8f03b2b22c28d863ae8fc80481424b71af8c3e9a))
17+
18+
## [3.0.0-beta.2](https://github.com/s-group-dev/react-usercentrics/compare/v3.0.0-beta.1...v3.0.0-beta.2) (2025-03-31)
19+
20+
### Bug Fixes
21+
22+
* allow npm publish of beta tags ([9fba6ce](https://github.com/s-group-dev/react-usercentrics/commit/9fba6cecf8f7b8efa853838e8d37e7b4c409cbbb))
23+
24+
## [3.0.0-beta.1](https://github.com/s-group-dev/react-usercentrics/compare/v2.0.0...v3.0.0-beta.1) (2025-03-31)
25+
26+
### ⚠ BREAKING CHANGES
27+
28+
* This package has migrated to Usercentrics Web CMP v3.
29+
Please read the provided migration guide in `MIGRATION.md`.
30+
31+
### Features
32+
33+
* migrate to Usercentrics Web CMP v3 ([e352e21](https://github.com/s-group-dev/react-usercentrics/commit/e352e212b824f2b2bddc229467a6f1fafcfef313))
34+
135
## [2.0.0](https://github.com/s-group-dev/react-usercentrics/compare/v1.7.4...v2.0.0) (2025-03-28)
236

337
### ⚠ BREAKING CHANGES

MIGRATION.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
## 3.0.0
2+
3+
- The Usercentrics Web CMP has been updated to v3 and includes a lot of changes.
4+
- Read more about the CMP v3 here: https://usercentrics.com/docs/web/v3/
5+
- Read the Usercentrics Migration guide here for more context, although it shouldn't be relevant when using this package: https://usercentrics.com/docs/web/migration/migration-from-v2/
6+
- The `windowEvent` prop for `<UsercentricsProvider />` is no longer supported and should be removed. The CMP v3 handles this automatically with a new event internally.
7+
- The `uiVersion` prop for `<UsercentricsScript />` is no longer supported and should be removed. The CMP v3 loader script currently supports only the "latest" version.
8+
- This also means that hard-coding a version number and its [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) hash is no longer supported. Instead, use a random `nonce` value when implementing a [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP): https://usercentrics.com/docs/web/implementation/ui/optional-steps/#adding-a-nonce-to-the-script-tag
9+
- The `showSecondLayer()` util no longer supports passing a service id argument to directly open to the service info. Instead, use the new `showServiceDetails(serviceId: ServiceId)` util.
10+
- The `acceptService()` util has been replaced with `updateServicesConsents()` with a signature supporting multiple consents at a time.
11+
- You will also need to call `saveConsents()` after updating them.
12+
- The `getServicesFromLocalStorage()` util has been replaced with `getConsentsFromLocalStorage()` with a different format.
13+
- Some utils and hooks have been removed because CMP v3 no longer supports them:
14+
- Removed:
15+
- `getServicesBaseInfo()`
16+
- `useServiceInfo()`
17+
- `getServicesFullInfo()`
18+
- `useServiceFullInfo()`
19+
- Added new `getServiceInfo()` util for getting service names and descriptions
20+
- All the utils are now `async` to match the CMP v3 implementations
21+
122
## 2.0.0
223

324
- No functional changes. This version is only released to sync the package version with the supported Usercentrics Web CMP v2 version.

0 commit comments

Comments
 (0)