-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ee6b2c8
feat: add standard-version, remove lerna, update storybook
51b951b
chore(release): 0.10.0-alpha.0
2bc5978
docs(publishing): make publishing readme
e5ef21c
docs(readme): update readme to link publishing doc
3697a63
docs(publishing): add 'yarn build' to script commands and document
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
## 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 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. | ||
|
||
5. Run the last command output by `standard-version`. It will look something like: | ||
``` | ||
git push --follow-tags origin <branch> && npm publish | ||
``` | ||
6. Communicate the changes via all appropriate channels. <TODO: determine communication strategy for new release> | ||
|
||
#### Alpha release | ||
For testing a release to build confidence. | ||
|
||
1. Run `yarn` to ensure all dependencies are upto date. | ||
2. Run `yarn build` to build EDS. | ||
3. Run `yarn release:alpha` to use `standard-version` to create appropriate tags and updates. | ||
4. Run the last command output by `standard-version` as above. It will look something like: | ||
``` | ||
git push --follow-tags origin <branch> && npm publish | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 build && yarn release:patch", | ||
"release:breaking": "yarn build && 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.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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