Skip to content

Commit 26dbce9

Browse files
authored
Merge pull request #20 from s-group-dev/updates
Updates
2 parents 2518581 + f0b9679 commit 26dbce9

8 files changed

Lines changed: 1031 additions & 566 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ReactDOM.render(
3535
<MyApplication /** You can interact with Usercentrics inside the provider */ />
3636
</UsercentricsProvider>
3737
</>,
38-
document.body
38+
document.body,
3939
)
4040
```
4141

@@ -93,7 +93,7 @@ interface UsercentricsScriptProps
9393
* The specific version of Usercentrics UI to load instead of "latest", as a string value
9494
*
9595
* @default "latest"
96-
* @example "3.21.1"
96+
* @example "3.24.0"
9797
* @see https://releases.usercentrics.com/en?category=browser+ui&role=cmpv1%3Bcmpv2%3B
9898
*/
9999
uiVersion?: string
@@ -112,7 +112,7 @@ interface UsercentricsScriptProps
112112
;() => <UsercentricsScript settingsId="1234" version="preview" />
113113

114114
/* Fixed UI version instead of latest */
115-
;() => <UsercentricsScript settingsId="1234" uiVersion="3.21.1" />
115+
;() => <UsercentricsScript settingsId="1234" uiVersion="3.24.0" />
116116
```
117117

118118
#### `UsercentricsProvider`

package-lock.json

Lines changed: 994 additions & 528 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,37 +30,37 @@
3030
"react-dom": ">=16.8"
3131
},
3232
"devDependencies": {
33-
"@commitlint/cli": "17.6.6",
34-
"@commitlint/config-conventional": "17.6.6",
33+
"@commitlint/cli": "17.6.7",
34+
"@commitlint/config-conventional": "17.6.7",
3535
"@semantic-release/changelog": "6.0.3",
3636
"@semantic-release/commit-analyzer": "10.0.1",
3737
"@semantic-release/git": "10.0.1",
38-
"@semantic-release/github": "9.0.3",
38+
"@semantic-release/github": "9.0.4",
3939
"@semantic-release/npm": "10.0.4",
4040
"@semantic-release/release-notes-generator": "11.0.4",
41-
"@swc/core": "^1.3.68",
42-
"@swc/jest": "^0.2.26",
43-
"@testing-library/jest-dom": "^5.16.5",
41+
"@swc/core": "^1.3.70",
42+
"@swc/jest": "^0.2.27",
43+
"@testing-library/jest-dom": "^5.17.0",
4444
"@testing-library/react": "^14.0.0",
45-
"@types/jest": "^29.5.2",
46-
"@types/react": "18.2.14",
47-
"@types/react-dom": "18.2.6",
48-
"@typescript-eslint/eslint-plugin": "5.61.0",
49-
"@typescript-eslint/parser": "5.61.0",
45+
"@types/jest": "^29.5.3",
46+
"@types/react": "18.2.15",
47+
"@types/react-dom": "18.2.7",
48+
"@typescript-eslint/eslint-plugin": "6.1.0",
49+
"@typescript-eslint/parser": "6.1.0",
5050
"conventional-changelog-conventionalcommits": "6.1.0",
51-
"eslint": "8.44.0",
51+
"eslint": "8.45.0",
5252
"eslint-config-prettier": "8.8.0",
5353
"eslint-plugin-import": "2.27.5",
54-
"eslint-plugin-prettier": "4.2.1",
55-
"eslint-plugin-react": "7.32.2",
54+
"eslint-plugin-prettier": "5.0.0",
55+
"eslint-plugin-react": "7.33.0",
5656
"eslint-plugin-react-hooks": "4.6.0",
5757
"eslint-plugin-simple-import-sort": "10.0.0",
5858
"husky": "8.0.3",
5959
"jest": "^29.6.1",
60-
"jest_workaround": "^0.78.19",
60+
"jest_workaround": "^0.79.19",
6161
"jest-environment-jsdom": "^29.6.1",
6262
"lint-staged": "13.2.3",
63-
"prettier": "2.8.8",
63+
"prettier": "3.0.0",
6464
"react": "18.2.0",
6565
"react-dom": "18.2.0",
6666
"semantic-release": "21.0.7",

src/components/UsercentricsDialogToggle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const UsercentricsDialogToggle: FC<UsercentricsDialogToggleProps> = ({ on
2828
showFirstLayer()
2929
}
3030
},
31-
[isUsercentricsInitialized, onClick]
31+
[isUsercentricsInitialized, onClick],
3232
)
3333

3434
return (

src/components/UsercentricsScript.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface UsercentricsScriptProps
88
* The specific version of Usercentrics UI to load instead of "latest", as a string value
99
*
1010
* @default "latest"
11-
* @example "3.21.1"
11+
* @example "3.24.0"
1212
* @see https://releases.usercentrics.com/en?category=browser+ui&role=cmpv1%3Bcmpv2%3B
1313
*/
1414
uiVersion?: string
@@ -30,7 +30,7 @@ interface UsercentricsScriptProps
3030
* () => <UsercentricsScript settingsId="1234" version="preview" />
3131
*
3232
* @example <caption>Fixed UI version instead of latest</caption>
33-
* () => <UsercentricsScript settingsId="1234" uiVersion="3.21.1" />
33+
* () => <UsercentricsScript settingsId="1234" uiVersion="3.24.0" />
3434
*/
3535
export const UsercentricsScript: FC<UsercentricsScriptProps> = ({
3636
id = 'usercentrics-cmp',

tests/components/UsercentricsScript.test.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,26 @@ describe('Usercentrics', () => {
3333
})
3434

3535
it('should allow specifying UI version', () => {
36-
const { container } = render(<UsercentricsScript settingsId="1234" uiVersion="3.21.1" />)
36+
const { container } = render(<UsercentricsScript settingsId="1234" uiVersion="3.24.0" />)
3737

3838
expect(container.firstChild).toHaveAttribute(
3939
'src',
40-
'https://app.usercentrics.eu/browser-ui/3.21.1/loader.js'
40+
'https://app.usercentrics.eu/browser-ui/3.24.0/loader.js',
4141
)
4242
})
4343

4444
it('should allow passing integrity prop', () => {
4545
const { container } = render(
4646
<UsercentricsScript
4747
settingsId="1234"
48-
uiVersion="3.21.1"
49-
integrity="sha384-PMBjS7JXD1R1uiHpU+QuCVc4KxgMdBegmc52UyT+uWQ2+BlptesLtmCBdPXxusIP"
50-
/>
48+
uiVersion="3.24.0"
49+
integrity="sha384-WRloNuM/QNkzJ4GkUAZgJ5CWgTFhVjsLKVQbACSHGOifUvw2WJk1QaY9mphkn96U"
50+
/>,
5151
)
5252

5353
expect(container.firstChild).toHaveAttribute(
5454
'integrity',
55-
'sha384-PMBjS7JXD1R1uiHpU+QuCVc4KxgMdBegmc52UyT+uWQ2+BlptesLtmCBdPXxusIP'
55+
'sha384-WRloNuM/QNkzJ4GkUAZgJ5CWgTFhVjsLKVQbACSHGOifUvw2WJk1QaY9mphkn96U',
5656
)
5757
})
5858

@@ -62,12 +62,12 @@ describe('Usercentrics', () => {
6262
settingsId="1234"
6363
/** @ts-expect-error: Type 'string' is not assignable to type 'undefined'. */
6464
src="test.js"
65-
/>
65+
/>,
6666
)
6767

6868
expect(container.firstChild).toHaveAttribute(
6969
'src',
70-
'https://app.usercentrics.eu/browser-ui/latest/loader.js'
70+
'https://app.usercentrics.eu/browser-ui/latest/loader.js',
7171
)
7272
})
7373
})

tests/hooks/use-has-service-consent.test.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@ describe('Usercentrics', () => {
2929
const getWrapper =
3030
(context?: Partial<ContextType<typeof UsercentricsContext>>): FC<{ children: ReactNode }> =>
3131
// eslint-disable-next-line react/display-name
32-
({ children }) =>
33-
(
34-
<UsercentricsContext.Provider value={{ ...CONTEXT, ...context }}>
35-
{children}
36-
</UsercentricsContext.Provider>
37-
)
32+
({ children }) => (
33+
<UsercentricsContext.Provider value={{ ...CONTEXT, ...context }}>
34+
{children}
35+
</UsercentricsContext.Provider>
36+
)
3837

3938
it('should return null during SSR', () => {
4039
mockUseServiceInfo.mockReturnValue({

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"isolatedModules": true,
88
"jsx": "react",
99
"lib": ["dom", "ESNext"],
10-
"module": "ESNext",
11-
"moduleResolution": "node",
10+
"module": "NodeNext",
11+
"moduleResolution": "NodeNext",
1212
"noEmit": true,
1313
"paths": {
1414
"@s-group/react-usercentrics/augmented": ["./augmented.d.ts"]

0 commit comments

Comments
 (0)