@dspace-internal/ui-kit (10.3.0)
Installation
@dspace-internal:registry=npm install @dspace-internal/ui-kit@10.3.0"@dspace-internal/ui-kit": "10.3.0"About this package
General
Installation
npm i
Scripts
Development build
This will start a development build for storybook and UI Kit. Use this script for local development. All changes made in UI Kit will automatically be reflected in storybook.
npm run storybook # hosted at http://localhost:6006
Production build
# run production build for UI Kit
npm run build
# run production build for storybook
npm run build-storybook
Quality assurance scripts
# run linter across workspaces
npm run lint
# run unit testing suites
npm run test-ci
Publishing a new version
Prerequisites
When doing this for the first time, you will need to add an account with npm contribution rights
npm adduser --registry=https://bas-common.dspace.de/artifactory/api/npm/ds.pe.npm-internal/
Documentation deployment
Storybook documentations get deployed for each PR, once for each major version and for the latest version, representing the state of the master branch:
# nginx directory structure for storybook deployments
/var/www/latest # master build
/var/www/archive/v[MAJOR_VERSION_NUMBER] # major builds
/var/www/pullrequest/[PULL_REQUEST_ID] # pr builds
Changelog
The CHANGELOG.md determines all relevant details of each release. Make sure the changelog entries for are...
- complete
- helpful for the consumer
- consistent with the rest of the changelog
- cover information about all relevant changes
Releasing
- Maintain the CHANGELOG.md
- List your changes
- Set the version number to be released (replace the
"X.Y.Z"placeholder) - Don't update the "(YYYY-MM-DD)" date placeholder - this will be done automatically during the release
- Get your changes merged to master
- Run the release pipeline on the master branch
- (Each successful run of the release pipeline will trigger a subsequent build of the master branch, which will deploy a new version of the documentation)
Major releases
When releasing a new major version we want to make sure that the documentation of previous major versions are still available.
- Maintain the
MIGRATION.mdan describe the steps necessary to migrate to the new version - Perform the release as usually
- Create a branch
v[X](i.e.v7) from the commit before the new major version - Adjust
internal/master.yamlto publish changes to an archive folder- Set trigger to
v[X] - Set the CopyFilesOverSSH property
targetFolderto/var/www/archive/v[X]
- Set trigger to
- Adjust
VersionSwitcher.tsx-
const archivedVersions = [ { name: 'Latest', href: '/' }, // add this line to the list
-
- Push the
v[X]branch - The archived version should be automatically deployed
- Switch back to branch
master - Update the link to the latest archived version
Releasing outside of the release pipeline (AVOID)
This can be useful if you want to release a new patch or hotfix of an older major version.
export NPM_TOKEN=<MY_NPM_TOKEN_GOES_HERE> # set environment variable to allow publishing to registry
npm run release # this will lint, test, build and then release UI Kit
Dependencies
Dependencies
| ID | Version |
|---|---|
| @mui/x-license | ^8.14.1 |
| highlight-words-core | ^1.2.3 |
| react-draggable | ^4.5.0 |
| react-transition-group | ^4.4.5 |
| zustand | ^5.0.8 |
Development dependencies
| ID | Version |
|---|---|
| @dnd-kit/core | ^6.3.1 |
| @eslint/js | ^9.38.0 |
| @mui/system | ^7.3.3 |
| @storybook/addon-docs | ^9.1.13 |
| @storybook/addon-links | ^9.1.13 |
| @storybook/react-vite | ^9.1.13 |
| @swc/plugin-emotion | ^10.0.3 |
| @testing-library/dom | ^10.4.1 |
| @testing-library/jest-dom | ^6.9.1 |
| @testing-library/react | ^16.3.0 |
| @testing-library/user-event | ^14.6.1 |
| @types/highlight-words-core | ^1.2.3 |
| @types/react | ^18.3.1 |
| @types/react-dom | ^18.3.1 |
| @vitejs/plugin-react-swc | ^3.10.2 |
| @vitest/coverage-v8 | ^3.2.4 |
| eslint | ^9.38.0 |
| eslint-config-prettier | ^10.1.8 |
| eslint-plugin-prettier | ^5.5.4 |
| eslint-plugin-react | ^7.37.5 |
| eslint-plugin-react-hooks | ^5.2.0 |
| eslint-plugin-react-refresh | ^0.4.20 |
| eslint-plugin-storybook | 9.1.13 |
| globals | ^16.4.0 |
| identity-obj-proxy | ^3.0.0 |
| jsdom | ^26.1.0 |
| prettier | ^3.6.2 |
| react-router | ^7.9.4 |
| rollup-preserve-directives | ^1.1.3 |
| storybook | ^9.1.13 |
| ts-node | ^10.9.2 |
| typescript | ^5.9.3 |
| typescript-eslint | ^8.46.2 |
| vite | ^7.1.12 |
| vite-plugin-dts | ^4.5.4 |
| vitest | ^3.2.4 |
Peer dependencies
| ID | Version |
|---|---|
| @emotion/react | ^11.14.0 |
| @emotion/styled | ^11.14.0 |
| @mui/icons-material | ^7.0.2 |
| @mui/material | ^7.0.2 |
| @mui/x-data-grid-pro | ^8.1.0 |
| react | >=18.3.1 |
| react-dom | >=18.3.1 |