-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: remove lerna and use standard-version to publish v0.10 #979
Changes from 4 commits
ee6b2c8
51b951b
2bc5978
e5ef21c
3697a63
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
## Versioning | ||
|
||
EDS uses [SemVer](https://semver.org/) semantic versioning to keep track of ongoing changes to the product. The three types of versions are: | ||
|
||
- **Major (X.y.z)** - Major versions contain breaking changes to Education developers' builds. | ||
- **Minor (x.Y.z)** - Minor versions add new features or deprecate existing features without breaking changes. | ||
- **Patch (x.y.Z)** - Patch versions fix defects or optimize existing features without breaking changes. | ||
|
||
Look to [this helpful document](http://designsystem.morningstar.com/about/versioning.html) from the Morning Star design system for detailed guidance on versioning. | ||
|
||
**Note**: We are currently using a _modified_ form of semver where: | ||
|
||
- Breaking changes update the _minor_ version | ||
- All other changes (new features, fixes, etc.) update the _patch_ version | ||
|
||
Once we publish major version 1, we will begin following conventional semver. | ||
|
||
--- | ||
|
||
### Releasing a new version of EDS | ||
|
||
_Before the first time you publish_, make sure to: | ||
|
||
- set up Two Factor Authentication for your npm account | ||
- run `npm login` in your terminal to generate an access token for publishing | ||
|
||
#### Publishing steps | ||
|
||
1. Confirm that all checks are green on CI. | ||
2. Run `git checkout main`. | ||
3. Run `yarn` to ensure all dependencies are upto date. | ||
4. Run `yarn build` to build EDS. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we just have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah that's a good idea 👍 |
||
6. Run | ||
|
||
``` | ||
yarn release | ||
|
||
# or, if there are breaking changes | ||
yarn release:breaking | ||
``` | ||
|
||
We use [standard-version](https://github.com/conventional-changelog/standard-version) to increment the version number in `package.json`, create a git tag for the new release, and update `CHANGELOG.md` based on the commit log. The package is not published, yet. | ||
|
||
6. Run the last command output by `standard-version`. It will look something like: | ||
``` | ||
git push --follow-tags origin <branch> && npm publish | ||
``` | ||
7. Communicate the changes via all appropriate channels. <TODO: determine communication strategy for new release> |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@chanzuckerberg/eds", | ||
"version": "0.9.0", | ||
"version": "0.10.0-alpha.0", | ||
"description": "The React-powered design system library for Chan Zuckerberg Initiative education web applications", | ||
"author": "CZI <[email protected]>", | ||
"homepage": "https://github.com/chanzuckerberg/edu-design-system", | ||
|
@@ -29,10 +29,6 @@ | |
"build:tokens": "node ./style-dictionary.config.js", | ||
"chromatic": "chromatic", | ||
"create-component": "plop", | ||
"create-releases": "yarn create-releases:conventional patch", | ||
"create-releases:alpha": "yarn create-releases:conventional --preid alpha prerelease", | ||
"create-releases:breaking": "yarn create-releases:conventional minor", | ||
"create-releases:conventional": "lerna version --no-push --conventional-commits --message 'chore(release): %s'", | ||
"deploy:docs": "storybook-to-ghpages --ci", | ||
"generateFlowTypes": "./scripts/generateFlowTypes.sh", | ||
"lint": "yarn run lint:styles && yarn run lint:scripts", | ||
|
@@ -42,16 +38,19 @@ | |
"lint:scripts": "eslint --ignore-path .gitignore --ext=js,jsx,ts,tsx .", | ||
"lint:scripts:fix": "yarn run lint:scripts --fix", | ||
"prettier": "prettier --write \"**/*.{js,jsx,ts,tsx}\"", | ||
"publish-releases": "lerna publish from-git --no-push", | ||
"publish-releases:alpha": "yarn publish-releases --dist-tag alpha", | ||
"release": "yarn release:patch", | ||
"release:breaking": "yarn release:minor", | ||
"release:major": "standard-version --release-as major", | ||
"release:minor": "standard-version --release-as minor", | ||
"release:patch": "standard-version --release-as patch", | ||
"release:alpha": "standard-version --prerelease alpha", | ||
"start": "yarn build:tokens && yarn storybook", | ||
"storybook": "start-storybook -p 6008", | ||
"storybook:axe": "yarn run build:storybook && yarn run storybook:axeOnly", | ||
"storybook:axeOnly": "axe-storybook --build-dir storybook-static", | ||
"test": "jest", | ||
"test:ci": "yarn run test --ci --coverage && cat ./coverage/lcov.info | codecov", | ||
"types": "tsc --noEmit", | ||
"version": "./scripts/updateYarnLockForLerna.sh" | ||
"types": "tsc --noEmit" | ||
}, | ||
"size-limit": [ | ||
{ | ||
|
@@ -85,14 +84,14 @@ | |
"@commitlint/prompt-cli": "^16.2.1", | ||
"@geometricpanda/storybook-addon-badges": "^0.2.1", | ||
"@size-limit/preset-small-lib": "^4.12.0", | ||
"@storybook/addon-a11y": "^6.4.19", | ||
"@storybook/addon-essentials": "^6.4.19", | ||
"@storybook/addon-interactions": "^6.4.19", | ||
"@storybook/addon-a11y": "^6.4.22", | ||
"@storybook/addon-essentials": "^6.4.22", | ||
"@storybook/addon-interactions": "^6.4.22", | ||
"@storybook/addon-postcss": "^2.0.0", | ||
"@storybook/react": "^6.4.19", | ||
"@storybook/storybook-deployer": "^2.8.10", | ||
"@storybook/react": "^6.4.22", | ||
"@storybook/storybook-deployer": "^2.8.11", | ||
"@storybook/testing-library": "^0.0.9", | ||
"@storybook/testing-react": "^1.2.3", | ||
"@storybook/testing-react": "^1.2.4", | ||
"@testing-library/jest-dom": "^5.16.2", | ||
"@testing-library/react": "^12.1.4", | ||
"@types/jest": "^27.4.1", | ||
|
@@ -109,13 +108,12 @@ | |
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-react": "^7.28.0", | ||
"eslint-plugin-react-hooks": "^4.3.0", | ||
"eslint-plugin-storybook": "^0.5.6", | ||
"eslint-plugin-storybook": "^0.5.8", | ||
"eslint-plugin-testing-library": "^5.0.5", | ||
"flowgen": "^1.14.1", | ||
"husky": "^4.3.8", | ||
"identity-obj-proxy": "^3.0.0", | ||
"jest": "^27.5.1", | ||
"lerna": "^4.0.0", | ||
"lint-staged": "^10.5.4", | ||
"plop": "^3.0.5", | ||
"postcss": "^8.4.12", | ||
|
@@ -126,6 +124,7 @@ | |
"react": "^16.14.0", | ||
"react-dom": "^16.14.0", | ||
"size-limit": "^4.12.0", | ||
"standard-version": "^9.3.2", | ||
"storybook-css-modules-preset": "^1.1.1", | ||
"style-dictionary": "^3.7.0", | ||
"stylelint": "^14.5.3", | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure where to place this doc other than here.
Could consider displaying it in storybook like BM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this works! I think convention is to capitalize docs file names ->
docs/PUBLISHING.md