Skip to content

Commit ab72045

Browse files
authored
Merge pull request #588 from primer/release-10.10.0
Release 10.10.0
2 parents 6cc9973 + a0213f8 commit ab72045

File tree

112 files changed

+21948
-40236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+21948
-40236
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -71,110 +71,8 @@ Here are a few things you can do that will increase the likelihood of your pull
7171
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
7272
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
7373

74-
## Releasing a new Primer version 🎉
75-
76-
This section is targeted at maintainers of primer, to instruct them on the processes for releasing a new version.
77-
78-
### In `primer/primer`:
79-
80-
1. Find or create a new pull request with a release branch from `master` and name it `release-<version>`.
81-
82-
(CI will publish a release candidate version to npm for branches prefixed with `release`. These version numbers have a `rc.<number>` suffix on them)
83-
84-
For the pull request you can use the following template.
85-
86-
```md
87-
# Primer Minor Release
88-
89-
Tracking Issue for next release: 📦 **0.0.0**
90-
Approximate release date: 📆
91-
92-
### Must
93-
94-
- [ ]
95-
96-
### Should
97-
98-
- [ ]
99-
100-
### Could
101-
102-
- [ ]
103-
104-
----
105-
106-
### Ship checklist
107-
108-
- [ ] Update CHANGELOG
109-
- [ ] Run version bump
110-
- [ ] Update primer.github.io
111-
- [ ] Update github/github
112-
- [ ] Update the style guide
113-
- [ ] Update the release tag note
114-
- [ ] Create a new pull request for the next release
115-
116-
/cc @primer/ds-core
117-
```
118-
119-
2. Go through the tracking issue and make sure everything that should be merged in is merged in.
120-
121-
3. Once your builds finish, click on the details links for the continuous-integration/travis-ci/push build. Expand the `Deploying application` output and you should be able to find an outputted change log here. Copy this and update the [CHANGELOG.md](https://github.com/primer/primer/blob/master/CHANGELOG.md) file.
122-
123-
4. Run the version bump in your terminal: `npm run bump`.
124-
125-
5. Test your changes with the latest release candidate version in the appropriate places (styleguide, storybook, github/github).
126-
127-
6. Once the release PR is approved and you've done necessary testing, merge to `master`. This will trigger a publish to npm.
128-
129-
### In `github/github`:
130-
131-
1. Create a new branch
132-
133-
2. Update the primer version in your terminal `bin/npm install primer@<version>`.
134-
135-
3. Update `stylelint-config-primer` in your terminal to the appropriate version `bin/npm install stylelint-config-primer@latest`.
136-
137-
4. If you need to make changes to github/github due to the Primer release, make a separate branch. When ready, merge that branch into your release branch.
138-
139-
5. Add reviewers.
140-
141-
6. Check that every deleted vendor file has an accompanying updated vendor file and that the version numbers look correct.
142-
143-
7. Test on review-lab.
144-
145-
8. When ready, merge! 🎉
146-
147-
148-
## Other items that need to be done after publishing Primer
149-
150-
#### Update the Style Guide
151-
152-
1. In [github/styleguide](https://github.com/github/styleguide), update `primer` to your newly released version in your terminal:
153-
154-
`npm install primer@latest`
155-
156-
2. Then run: `script/update-primer-docs`.
157-
158-
3. Commit changes, make PR, get it approved, merge! 🚀
159-
160-
#### Update [primer.github.io](primer.github.io)
161-
162-
1. Edit [index.html](https://github.com/primer/primer.github.io/blob/master/index.html) to include the latest version.
163-
164-
#### Update Storybook
165-
166-
1. Pull the latest from master on primer/primer (after merging in release branch).
167-
168-
2. Run `npm run publish-storybook`.
169-
170-
#### Publish release tag
171-
172-
1. Create a new release tag [here](https://github.com/primer/primer/releases/new).
173-
174-
2. Copy the changes from the [CHANGELOG](https://github.com/primer/primer/blob/master/CHANGELOG.md) and paste it into the release notes.
175-
176-
3. Publish 🎉
177-
74+
## Releasing a new Primer version
75+
See [RELEASING.md](../RELEASING.md) for our release process.
17876

17977
## Resources
18078

.gitignore

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
*.lerna_backup
2+
*.log
3+
*/*/package-lock.json
14
.DS_Store
5+
.changelog
26
.sass-cache
3-
node_modules
4-
*.log
5-
build
67
_site
7-
*.lerna_backup
8-
.changelog
8+
build
9+
node_modules

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
save=true
22
save-exact=true
3+
no-package-lock=true

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ after_success:
2323
deploy:
2424
# publish release candidates on release branches
2525
- provider: script
26-
script: script/release-candidate --dry-run
26+
script: script/release-candidate
2727
skip_cleanup: true
2828
on:
2929
branch: release*

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
# 10.10.0
2+
3+
#### :rocket: Enhancement
4+
* [#573](https://github.com/primer/primer/pull/573) Add Progress component. ([@emilybrick](https://github.com/emilybrick))
5+
* [#561](https://github.com/primer/primer/pull/561) Add HTML `hidden` attribute docs, increase `[hidden]` selector specificity. ([@shawnbot](https://github.com/shawnbot) h/t @jonrohan)
6+
7+
#### :bug: Bug Fix
8+
* [#604](https://github.com/primer/primer/pull/604) Fix Button group focus ring z-index issues. ([@shawnbot](https://github.com/shawnbot))
9+
* [#570](https://github.com/primer/primer/pull/570) Make `.blankslate-narrow` responsive. ([@crhallberg](https://github.com/crhallberg))
10+
* [#591](https://github.com/primer/primer/pull/591) Add fs-extra to `primer-module-build.dependencies`. ([@shawnbot](https://github.com/shawnbot))
11+
12+
#### :memo: Documentation
13+
* [#585](https://github.com/primer/primer/pull/585) Improve contributing docs and add DEVELOP.md. ([@shawnbot](https://github.com/shawnbot))
14+
15+
#### :house: Internal
16+
* [#597](https://github.com/primer/primer/pull/597) Fix primerize, add "fresh" run-script, etc. ([@shawnbot](https://github.com/shawnbot))
17+
18+
#### Committers: 3
19+
- Chris Hallberg ([crhallberg](https://github.com/crhallberg))
20+
- Emily Brick ([emilybrick](https://github.com/emilybrick))
21+
- Shawn Allen ([shawnbot](https://github.com/shawnbot))
22+
123
# 10.9.0
224
#### :rocket: Enhancement
325
* [#586](https://github.com/primer/primer/pull/586) Hiding .Counter component when it's empty.. ([@jonrohan](https://github.com/jonrohan))

DEVELOP.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Primer Development
2+
3+
If you've made it this far, **thank you**! We appreciate your contribution, and hope that this document helps you along the way.
4+
5+
## Structure
6+
The project is structured as a [monorepo] made up of lots of small npm modules, many of which depend on each other. We use [Lerna] to manage, version, and publish all of the packages together.
7+
8+
The top-level `package.json` is not published, but tracks common dependencies for developing Primer, and hosts some useful npm [run-scripts]. See the [scripts section](#scripts) for more info.
9+
10+
## Workflow
11+
The typical Primer workflow looks something like this:
12+
13+
1. [Install](#install)
14+
2. [Start Storybook](#storybook)
15+
3. Navigate to the module you're working on and modify the SCSS and/or markdown files.
16+
4. Test your changes in Storybook.
17+
5. Push your work to a new branch to test it on Travis and have it reviewed by the Primer "core" team.
18+
19+
## Install
20+
Run `npm install` to install the npm dependencies and automatically run link all of the local packages together with `npm run bootstrap`.
21+
22+
### Troubleshooting install problems
23+
If you run into trouble installing, it's always best to ensure that you're starting from a clean slate by running the following from the repository root directory:
24+
25+
```sh
26+
npm run fresh
27+
```
28+
29+
If _that_ gives you problems, then you can try manually deleting everything and starting over:
30+
31+
```
32+
rm -rf node_modules
33+
rm -f package-lock.json */*/package-lock.json
34+
npm install
35+
```
36+
37+
**You may need to do this whenever switching between branches with different dependencies, submodules, or versions of Node and/or npm.** The Primer core team generally uses the latest major version of Node (10 as of this writing), but our CI tests run Node 8 and npm 6. You can check which versions you're running with:
38+
39+
```sh
40+
npm --version
41+
node --version
42+
```
43+
44+
## Storybook
45+
Run `npm start` to start up [Storybook], then visit [localhost:3000](http://localhost:3000) to test your work. By default, all `html` code blocks of all `*.md` files in each module will be rendered as stories and listed under the module's name in the left-hand nav. File changes should trigger live reload automatically after a brief delay.
46+
47+
If the package you're working on has a `stories.js`, it probably includes a snippet like this:
48+
49+
```js
50+
const stories = storiesOf('Module name', module)
51+
52+
storiesFromMarkdown(require.context('.', true, /\.md$/))
53+
.forEach(({title, story}) => {
54+
stories.add(title, story)
55+
})
56+
```
57+
58+
This is how we find all of the Markdown files in the package directory and generate stories from their code blocks. Storybook sections are labeled by the first argument to `storiesOf()` (in the above example, "Module name"), and individual stories get their titles from either the previous Markdown heading or the `title` attribute in the fenced code block. See the [`code-blocks` docs](https://npmjs.com/package/code-blocks) and the [`storiesFromMarkdown()` source](./.storybook/lib/storiesFromMarkdown.js) for more info.
59+
60+
## CSS packages
61+
All of the Primer CSS packages live in the [modules](./modules) subdirectory, including the [`primer`](./modules/package) omnibus package.
62+
63+
## Tools
64+
Many tools specific to development of Primer CSS live in the [tools](./tools) subdirectory.
65+
66+
## Scripts
67+
The [`script` directory](./script) houses a collection of scripts that we use to maintain, test, build, and publish packages. Some scripts of note:
68+
69+
* `script/check-imports` compares the list of Primer npm dependencies for each package with SCSS `@import` statements in its source, and warns if any mismatches (dependencies without corresponding imports, or vice-versa) are found.
70+
* `script/compare-published` compares the latest published versions of each Primer CSS package with the `version` field in its local `package.json`, and reports any discrepancies.
71+
* `script/get-packages` lists all of the package subdirectories from both `modules` and `tools` directories, and is useful for iterating in shell scripts:
72+
73+
```sh
74+
for pkg in $(script/get-packages); do
75+
echo $pkg
76+
done
77+
```
78+
79+
If you're looking for more detail, you can also run `npx lerna ls`, which will list the packages by name along with their versions.
80+
81+
Scripts like `lint-scss`, `notify`, and `test-docs` are called from individual packages to run specific common tasks; `npm-run` and `npm-run-all` are used more generally to run monorepo-installed npm utilities within the package directory, and can probably be refactored to simply run [npx].
82+
83+
84+
[monorepo]: https://github.com/babel/babel/blob/master/doc/design/monorepo.md
85+
[Lerna]: https://github.com/lerna/lerna
86+
[run-scripts]: https://docs.npmjs.com/cli/run-script
87+
[Storybook]: https://storybook.js.org/
88+
[npx]: https://www.npmjs.com/package/npx

README.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,35 +46,21 @@ Then, you would import the module with:
4646
@import "primer-navigation/index.scss";
4747
```
4848

49-
Or, while you're figuring out which modules you need, you can import them directly from the `primer` [`modules` directory](./modules) like so:
50-
51-
```scss
52-
@import "primer/modules/primer-navigation/index.css";
53-
```
54-
55-
56-
## Build
57-
58-
For a compiled **CSS** version of this module, an npm script is included that will output a CSS version to `build/build.css`. The built CSS file is also included in the npm package.
59-
60-
```sh
61-
$ npm run build
62-
```
49+
## Development
50+
See [DEVELOP.md](./DEVELOP.md) for development docs.
6351

6452
## Releasing (Staff only)
65-
6653
You can find docs about our release process in [RELEASING.md](./RELEASING.md).
6754

6855
## Documentation
6956

70-
You can read more about primer in the [docs][docs].
57+
Primer CSS documentation is published to the [GitHub Style Guide](https://styleguide.github.com/primer/).
7158

7259
## License
7360

7461
[MIT](./LICENSE) &copy; [GitHub](https://github.com/)
7562

7663
[primer]: https://github.com/primer/primer
77-
[docs]: http://primer.github.io/
7864
[npm]: https://www.npmjs.com/
7965
[install-npm]: https://docs.npmjs.com/getting-started/installing-node
8066
[sass]: http://sass-lang.com/

RELEASING.md

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,56 @@
44
### In `primer/primer`:
55

66

7-
1. Go through the tracking PR and make sure everything that should be merged in is merged in.
7+
1. Go through the tracking PR and make sure everything listed is merged in.
88

99
2. To update the change log for your release, click on the details links for the continuous-integration/travis-ci/push build. Expand the `Deploying application` output and copy the change log content. Update the [CHANGELOG.md](https://github.com/primer/primer/blob/master/CHANGELOG.md) file with the change log content from the build.
1010

11-
3. Run the version bump in your terminal: `npm run bump`.
11+
3. Bump the package versions in your terminal:
1212

13-
4. Run `script/check-versions` to double check there are no version conflicts. You may need to update peer dependencies in `primer-popover` and `primer-marketing-buttons`.
13+
```sh
14+
npm run bump
15+
```
16+
17+
4. Run `script/check-versions` to catch any cross-module version mismatches. You may need to update peer dependencies in `primer-popover` and `primer-marketing-buttons`.
1418

1519
5. Test your changes with the latest release candidate version in the appropriate places (styleguide, storybook, github/github).
1620

17-
6. Once the release PR is approved and you've done necessary testing, merge to `master`. This will trigger a publish to npm.
21+
6. Once the release PR is approved and you've done necessary testing, merge to `master`. This will trigger publishing to npm.
22+
23+
7. Create a new release branch for the next release from `master` and name it `release-<version>`. Please use the following template for the PR description:
24+
25+
```md
26+
# Primer [Major|Minor|Patch] Release
27+
28+
Tracking Issue for next release: 📦 **0.0.0**
29+
Approximate release date: 📆 DD/MM/YY
30+
31+
### Must
32+
33+
- [ ]
34+
35+
### Should
36+
37+
- [ ]
38+
39+
### Could
40+
41+
- [ ]
42+
43+
----
44+
45+
### Ship checklist
1846

19-
7. Create a new release branch for the next release from `master` and name it `release-<version>`.
47+
- [ ] Update CHANGELOG
48+
- [ ] Run version bump
49+
- [ ] Update primer.github.io
50+
- [ ] Update github/github
51+
- [ ] Update the style guide
52+
- [ ] Update the release tag note
53+
- [ ] Create a new pull request for the next release
2054

21-
(CI will publish a release candidate version to npm for branches prefixed with `release`. These version numbers have a `rc.<number>` suffix on them)
55+
/cc @primer/ds-core
56+
```
2257

2358

2459
### In `github/github`:

lerna.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"lerna": "2.4.0",
3+
"version": "independent",
34
"packages": [
45
"modules/*",
56
"tools/*"
67
],
8+
"npmClientArgs": ["--no-package-lock"],
79
"changelog": {
810
"repo": "primer/primer",
911
"labels": {
@@ -15,6 +17,5 @@
1517
"Tag: Internal": ":house: Internal"
1618
},
1719
"cacheDir": ".changelog"
18-
},
19-
"version": "independent"
20+
}
2021
}

modules/primer-alerts/package-lock.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)