Skip to content

fix: change from version to draft#42

Merged
iiroj merged 1 commit intos-group-dev:mainfrom
tmair:feat-draft-mode
Oct 21, 2025
Merged

fix: change from version to draft#42
iiroj merged 1 commit intos-group-dev:mainfrom
tmair:feat-draft-mode

Conversation

@tmair
Copy link
Copy Markdown
Contributor

@tmair tmair commented Oct 21, 2025

In v3 of CMP data-version was replaced by data-draft. This PR addresses the change.

@iiroj
Copy link
Copy Markdown
Member

iiroj commented Oct 21, 2025

Oops, thank you for the fix!

@iiroj
Copy link
Copy Markdown
Member

iiroj commented Oct 21, 2025

Can you rename your commit message like this to generate a nice changelog for the release?

fix: set `data-draft="true"` instead of `data-version="preview"` for CMPv3 compatibility

The `data-version` attribute has been replaced with `data-draft` in CMPv3, but this was
missing from the `@s-group/react-usercentrics@3.0.0` release.

You will need to migrate your props after this update:

\`\`\`diff
--- <UsercentricsScript settingsId="1234" version="preview" />
+++ <UsercentricsScript settingsId="1234" draft={true} />
\`\`\`

Unfortunately I had to escape the inner backtick characters!

@iiroj
Copy link
Copy Markdown
Member

iiroj commented Oct 21, 2025

This should also be updated in the README.md:

/**
* Whether to run Usercentrics in "production" or "preview" mode
* @default "production"
*/
version?: 'production' | 'preview'

@tmair
Copy link
Copy Markdown
Contributor Author

tmair commented Oct 21, 2025

I updated the description of the commit and changed the README to contain the new interface

@iiroj
Copy link
Copy Markdown
Member

iiroj commented Oct 21, 2025

Thanks! And sorry for the confusion: can you remove the escape of the backticks in the commit message? The goal is to get a code block rendered into the changelog, I just can't write codeblock-in-codeblock in the GitHub comment.

…CMPv3 compatibility

The `data-version` attribute has been replaced with `data-draft` in CMPv3, but this was
missing from the `@s-group/react-usercentrics@3.0.0` release.

You will need to migrate your props after this update:

```diff
--- <UsercentricsScript settingsId="1234" version="preview" />
+++ <UsercentricsScript settingsId="1234" draft={true} />
```
@tmair
Copy link
Copy Markdown
Contributor Author

tmair commented Oct 21, 2025

Thanks! And sorry for the confusion: can you remove the escape of the backticks in the commit message? The goal is to get a code block rendered into the changelog, I just can't write codeblock-in-codeblock in the GitHub comment.

That makes sense. I could not create a preview of the changelog locally so I did not see the outcome of it. It should work now.

@iiroj iiroj merged commit 21d01d1 into s-group-dev:main Oct 21, 2025
5 checks passed
@iiroj
Copy link
Copy Markdown
Member

iiroj commented Oct 21, 2025

🎉 This PR is included in version 3.0.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@iiroj
Copy link
Copy Markdown
Member

iiroj commented Oct 21, 2025

Thank you again for the fix! Unfortunately looks like the changelog generator didn't include the fancy commit message body: https://github.com/s-group-dev/react-usercentrics/releases/tag/v3.0.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants