Skip to content

Commit 2b38ef0

Browse files
authored
Merge pull request #872 from IQSS/release/870-release-design-system-2.1.0
Release design system 2.1.0
2 parents c1f5e89 + 1ae1eab commit 2b38ef0

File tree

8 files changed

+124
-99
lines changed

8 files changed

+124
-99
lines changed

DEVELOPER_GUIDE.md

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,84 +1048,6 @@ path included will redirect to the frontend application.
10481048
<p align="right">(<a href="#readme-top">back to top</a>)</p>
10491049
<br>
10501050
1051-
## Publishing the Design System
1052-
1053-
The Design System is published to the npm Package Registry. To publish a new version, follow these steps:
1054-
1055-
1. **Update the version**
1056-
1057-
Update the version running the lerna command:
1058-
1059-
```shell
1060-
lerna version --no-push
1061-
```
1062-
1063-
This command will ask you for the new version and will update the `package.json` files and create a new commit with the changes.
1064-
1065-
2. **Review the auto generated CHANGELOG.md**
1066-
1067-
The lerna command will generate a new `CHANGELOG.md` file with the changes for the new version. Review the changes and make sure that the file is correct.
1068-
1069-
If it looks good, you can push the changes to the repository.
1070-
1071-
```shell
1072-
git push && git push --tags
1073-
```
1074-
1075-
Optional:
1076-
1077-
If you need to make any changes to the `CHANGELOG.md` file, you can do it manually.
1078-
1079-
After manually updating the `CHANGELOG.md` file, you can commit the changes.
1080-
1081-
```shell
1082-
git add .
1083-
git commit --amend --no-edit
1084-
git push --force && git push --tags --force
1085-
```
1086-
1087-
This command will amend the lerna commit and push the changes to the repository.
1088-
1089-
3. **Review the new tag in GitHub**
1090-
1091-
After pushing the changes, you can review the new tag in the [GitHub repository](https://github.com/IQSS/dataverse-frontend/tags).
1092-
1093-
The tag should be created with the new version.
1094-
1095-
4. **Publish the package**
1096-
1097-
After the version is updated, you can publish the package running the lerna command:
1098-
1099-
```shell
1100-
lerna publish from-package
1101-
```
1102-
1103-
This command will publish the package to the npm registry.
1104-
1105-
Remember that you need a valid npm token to publish the packages.
1106-
1107-
Get a new token from the npm website and update the `.npmrc` file with the new token.
1108-
1109-
Open the `.npmrc` file and replace `YOUR_NPM_TOKEN ` with your actual npm token.
1110-
1111-
⚠️ Please ensure that any lines registering the `@iqss` scope with the GitHub Packages registry are commented out. This is important because otherwise, the package would be published there instead of npm.
1112-
1113-
```plaintext
1114-
legacy-peer-deps=true
1115-
1116-
//npm.pkg.github.com/:_authToken=YOUR_NPM_TOKEN
1117-
@iqss:registry=https://npm.pkg.github.com/
1118-
```
1119-
1120-
5. **Review the new version in the npm registry**
1121-
1122-
After publishing the packages, you can review the new version in the [npm registry](https://www.npmjs.com/package/@iqss/dataverse-design-system?activeTab=versions).
1123-
1124-
The new version should be available in the npm registry.
1125-
1126-
<p align="right">(<a href="#readme-top">back to top</a>)</p>
1127-
<br>
1128-
11291051
<!-- MARKDOWN LINKS & IMAGES -->
11301052
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
11311053
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
## Publishing the Design System
2+
3+
The Design System is published to the npm Package Registry. To publish a new version, follow these steps:
4+
5+
1. **Update the Changelog**
6+
7+
Move entries from Non Published Changes to the new version section and clear the Non Published Changes section.
8+
9+
2. **Update Readme with the latest Storybook build**
10+
11+
Update the `README.md` file in the `packages/design-system` folder with the latest Storybook build.
12+
13+
You can search this link in the Chromatic Deployment Github Action -> Publish To Chromatic step -> "View your Storybook at"
14+
15+
3. **Update the version**
16+
17+
Commit all your changes so far.
18+
19+
Update the version running the lerna command:
20+
21+
```shell
22+
lerna version --no-push
23+
```
24+
25+
This command will ask you for the new version and will update the `package.json` files and create a new commit with the changes.
26+
27+
If it looks good, you can push the changes to the repository.
28+
29+
```shell
30+
git push && git push --tags
31+
```
32+
33+
4. **Review the new tag in GitHub**
34+
35+
After pushing the changes, you can review the new tag in the [GitHub repository](https://github.com/IQSS/dataverse-frontend/tags).
36+
37+
The tag should be created with the new version.
38+
39+
5. **Build the package**
40+
41+
Ensure the design system is built so the dist artifacts are available:
42+
43+
```bash
44+
# from the repo root
45+
npm run --workspace @iqss/dataverse-design-system build
46+
# or, from the package folder
47+
# cd packages/design-system && npm run build
48+
```
49+
50+
Note: publishing will also trigger a build automatically via the package's prepublishOnly script, but running it explicitly helps catch issues earlier.
51+
52+
6. **Publish the package**
53+
54+
After the version is updated and the package is built, you can publish the package running the lerna command:
55+
56+
```shell
57+
lerna publish from-package
58+
```
59+
60+
This command will publish the package to the npm registry.
61+
62+
Remember that you need a valid npm token to publish the packages.
63+
64+
Get a new token from the npm website and update the `.npmrc` file with the new token.
65+
66+
Open the `.npmrc` file and replace `YOUR_NPM_TOKEN ` with your actual npm token.
67+
68+
⚠️ Please ensure that any lines registering the `@iqss` scope with the GitHub Packages registry are commented out. This is important because otherwise, the package would be published there instead of npm.
69+
70+
```plaintext
71+
legacy-peer-deps=true
72+
73+
//npm.pkg.github.com/:_authToken=YOUR_NPM_TOKEN
74+
@iqss:registry=https://npm.pkg.github.com/
75+
```
76+
77+
7. **Review the new version in the npm registry**
78+
79+
After publishing the packages, you can review the new version in the [npm registry](https://www.npmjs.com/package/@iqss/dataverse-design-system?activeTab=versions).
80+
81+
The new version should be available in the npm registry.

lerna.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
33
"version": "independent",
4+
"npmClient": "npm",
5+
"packages": ["packages/*"],
46
"command": {
57
"version": {
6-
"conventionalCommits": true,
7-
"changelogPreset": "angular"
8+
"npmClientArgs": [
9+
"--legacy-peer-deps"
10+
]
811
}
9-
},
10-
"npmClient": "npm",
11-
"packages": ["packages/*"]
12+
}
1213
}

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@testing-library/jest-dom": "5.16.5",
2626
"@testing-library/react": "13.4.0",
2727
"@testing-library/user-event": "13.5.0",
28-
"@types/node": "16.18.12",
28+
"@types/node": "22.18.10",
2929
"@types/react": "18.0.27",
3030
"@types/react-dom": "18.0.10",
3131
"ajv": "8.17.1",
@@ -144,7 +144,7 @@
144144
"chromatic": "13.3.0",
145145
"concurrently": "8.0.1",
146146
"cypress": "15.2.0",
147-
"cypress-vite": "1.4.0",
147+
"cypress-vite": "1.8.0",
148148
"eslint": "8.33.0",
149149
"eslint-config-prettier": "8.6.0",
150150
"eslint-plugin-import": "2.27.5",

packages/design-system/CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,27 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
55

66
# Non Published Changes
77

8+
# [2.1.0](https://github.com/IQSS/dataverse-frontend/compare/@iqss/[email protected]...@iqss/[email protected]) (2025-10-09)
9+
10+
### Added
11+
812
- **DropdownButton:**
913
- Add `customToggle` prop to allow custom toggle components.
1014
- Add `customToggleClassname` and `customToggleMenuClassname` props to allow custom styling of the custom toggle dropdown wrapper and menu.
1115
- Add `align` prop to control the alignment of the dropdown menu.
1216
- Add `size` prop to control the size of the button (e.g., 'sm', 'lg').
1317
- **DropdownButtonItem:**
1418
- Add `type` prop to allow specifying the type of the element.
19+
20+
### Changed
21+
1522
- **SelectAdvanced:**
16-
- Fix word wrapping in options list to prevent overflow and ensure long text is displayed correctly.
1723
- Support for options with a shape of `{ label: string; value: string; }[]` instead of just `string[]`.
24+
25+
### Fixed
26+
27+
- **SelectAdvanced:**
28+
- Fix word wrapping in options list to prevent overflow and ensure long text is displayed correctly.
1829
- **ButtonGroup:**
1930
- Fix styles for vertical button groups when using tooltips.
2031

packages/design-system/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function App() {
5656
export default App
5757
```
5858

59-
For detailed usage instructions and available customization options, refer to the [Storybook](https://646fbe232a8d3b501a1943f3-euwxbewiys.chromatic.com) provided with the package.
59+
For detailed usage instructions and available customization options, refer to the [Storybook](https://646fbe232a8d3b501a1943f3-mdvdyoulio.chromatic.com) provided with the package.
6060

6161
[//]: # 'COMMING SOON'
6262
[//]: # '## Contributions'

packages/design-system/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@iqss/dataverse-design-system",
3-
"version": "2.0.2",
3+
"version": "2.1.0",
44
"description": "Dataverse Design System Component Library",
55
"type": "module",
66
"license": "MIT",
@@ -22,6 +22,7 @@
2222
"scripts": {
2323
"dev": "vite",
2424
"build": "tsc && vite build",
25+
"prepublishOnly": "npm run build",
2526
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
2627
"preview": "vite preview",
2728
"storybook": "storybook dev -p 6007",

0 commit comments

Comments
 (0)