-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into hw-footer-mobile
- Loading branch information
Showing
57 changed files
with
3,513 additions
and
430 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,36 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## UNRELEASED | ||
|
||
- Added yarn audit check to dangerfile (on package change) | ||
- Added search component | ||
All notable changes to this project will be documented in this file. This file is generated automatically based on commit messages. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. | ||
|
||
## [1.2.0] - 2020-04-30 | ||
|
||
- Added new Alert styles (slim, no icon) and allow the Alert to accept `div` attributes as props | ||
- Added additional examples of Form templates (Sign In form, Reset Password form) to Storybook | ||
- Turn off USWDS SCSS notifications on compile | ||
- Updated CODEOWNERS and contributors | ||
- Fixed Jest running in CI | ||
- Auto-approve Dependabot PRs | ||
- Deploy Storybook static site on merge to master | ||
- Run `yarn upgrade` to update all out of date dependencies | ||
- Add [DangerJS](https://danger.systems/js/) to automate some checks for contribution standards | ||
- Add additional CSS utility classes for background colors and text colors | ||
- feat: Added components for the header and extended header (Header, NavList, MegaMenu, Menu, NavMenuButton, NavCloseButton, NavDropDownButton, PrimaryNav, Title, ExtendedNav) | ||
- chore: Added yarn audit check to dangerfile (on package change) | ||
- feat: Added search component | ||
- feat: Added Grid, GridContainer components | ||
|
||
## 1.2.0 (2020-04-30) | ||
|
||
## [1.1.0] - 2020-03-19 | ||
- feat: Added new Alert styles (slim, no icon) and allow the Alert to accept `div` attributes as props | ||
- feat: Add additional CSS utility classes for background colors and text colors | ||
- docs: Added additional examples of Form templates (Sign In form, Reset Password form) to Storybook | ||
- chore: Turn off USWDS SCSS notifications on compile | ||
- chore: Updated CODEOWNERS and contributors | ||
- chore: Auto-approve Dependabot PRs | ||
- chore: Deploy Storybook static site on merge to master | ||
- chore: Run `yarn upgrade` to update all out of date dependencies | ||
- chore: Add [DangerJS](https://danger.systems/js/) to automate some checks for contribution standards | ||
- ci: Fixed Jest running in CI | ||
|
||
- Add initial set of USWDS form components (Checkbox, Dropdown, ErrorMessage, Fieldset, Form, FormGroup, Label, Radio, TextInput, Textarea) | ||
- Add native HTML attributes to existing Tag & Button components in order to support custom CSS classes | ||
- Added new Modal component (designed by Truss) and related Overlay and ModalContainer components | ||
- Configured use of SASS/SCSS and SASS/SCSS modules so that we can use USWDS SCSS | ||
- Configure Dependabot for automated dependency updates | ||
## 1.1.0 (2020-03-19) | ||
|
||
## [1.0.0] - 2019-01-10 | ||
- feat: Add initial set of USWDS form components (Checkbox, Dropdown, ErrorMessage, Fieldset, Form, FormGroup, Label, Radio, TextInput, Textarea) | ||
- feat: Add native HTML attributes to existing Tag & Button components in order to support custom CSS classes | ||
- feat: Added new Modal component (designed by Truss) and related Overlay and ModalContainer components | ||
- chore: Configured use of SASS/SCSS and SASS/SCSS modules so that we can use USWDS SCSS | ||
- chore: Configure Dependabot for automated dependency updates | ||
|
||
### Added | ||
## 1.0.0 (2019-01-10) | ||
|
||
- Initial set of USWDS components (Accordion, Alert, Button, GovBanner, SideNav, Table, Tag) | ||
- Initial documentation and dev configuration for contributing & usage | ||
- feat!: Initial set of USWDS components (Accordion, Alert, Button, GovBanner, SideNav, Table, Tag) | ||
- feat!: Initial documentation and dev configuration for contributing & usage |
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,3 @@ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
} |
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,60 +1,71 @@ | ||
import { includes } from 'lodash'; | ||
import { danger, warn, fail } from 'danger'; | ||
import { includes } from 'lodash' | ||
import { danger, warn } from 'danger' | ||
|
||
// No PR is too small to include a description of why you made a change | ||
if (danger.github && danger.github.pr.body.length < 10) { | ||
warn('Please include a description of your PR changes.'); | ||
warn('Please include a description of your PR changes.') | ||
} | ||
|
||
// Load all modified and new files | ||
const allFiles = danger.git.modified_files.concat(danger.git.created_files); | ||
const allFiles = danger.git.modified_files.concat(danger.git.created_files) | ||
|
||
// Request changes to package source code to also include changes to tests. | ||
const hasCodeChanges = allFiles.some(p => !!p.match(/src\/.*\.[jt]sx?/)); | ||
const hasTestChanges = allFiles.some(p => !!p.match(/src\/.*\.test\.[jt]sx?/)); | ||
const hasCodeChanges = allFiles.some((p) => !!p.match(/src\/.*\.[jt]sx?/)) | ||
const hasTestChanges = allFiles.some((p) => !!p.match(/src\/.*\.test\.[jt]sx?/)) | ||
if (hasCodeChanges && !hasTestChanges) { | ||
warn('This PR does not include changes to tests, even though it affects source code.'); | ||
warn( | ||
'This PR does not include changes to tests, even though it affects source code.' | ||
) | ||
} | ||
|
||
// Make sure to export new components (src/components/*.[jt]sx) | ||
const hasNewComponents = danger.git.created_files.some( | ||
(p) => !!p.match(/src\/components\/.*\.[jt]sx/) | ||
) | ||
const hasEntrypointChanges = includes(allFiles, 'src/index.ts') | ||
if (hasNewComponents && !hasEntrypointChanges) { | ||
const message = `It looks like there are new component (JSX/TSX) files, but the entrypoint (index.ts) has not changed.` | ||
const idea = `Did you forget to export new components from the library entrypoint?` | ||
warn(`${message} - <em>${idea}</em>`) | ||
} | ||
|
||
// Require new src/components files to include changes to storybook | ||
const hasStorybookChanges = allFiles.some(p => !!p.match(/src\/.*\.stories\.[jt]sx?/)); | ||
const hasStorybookChanges = allFiles.some( | ||
(p) => !!p.match(/src\/.*\.stories\.[jt]sx?/) | ||
) | ||
|
||
if (hasCodeChanges && !hasStorybookChanges) { | ||
warn('This PR does not include changes to storybook, even though it affects component code.'); | ||
warn( | ||
'This PR does not include changes to storybook, even though it affects component code.' | ||
) | ||
} | ||
|
||
// Request update of yarn.lock if package.json changed but yarn.lock isn't | ||
const packageChanged = includes(allFiles, 'package.json'); | ||
const lockfileChanged = includes(allFiles, 'yarn.lock'); | ||
const packageChanged = includes(allFiles, 'package.json') | ||
const lockfileChanged = includes(allFiles, 'yarn.lock') | ||
if (packageChanged && !lockfileChanged) { | ||
const message = 'Changes were made to package.json, but not to yarn.lock'; | ||
const idea = 'Perhaps you need to run `yarn install`?'; | ||
warn(`${message} - <i>${idea}</i>`); | ||
const message = 'Changes were made to package.json, but not to yarn.lock' | ||
const idea = 'Perhaps you need to run `yarn install`?' | ||
warn(`${message} - <i>${idea}</i>`) | ||
} | ||
|
||
// Ensure we have access to github for these checks | ||
let isTrivial = false; | ||
let isYarnAuditMissing = false; | ||
let isYarnAuditMissing = false | ||
if (danger.github) { | ||
let prBody = danger.github.pr.body | ||
|
||
isTrivial = includes((prBody + danger.github.pr.title), '#trivial') | ||
|
||
const prBody = danger.github.pr.body | ||
if (lockfileChanged && danger.github.pr.user.type == 'User') { | ||
isYarnAuditMissing = !(includes(prBody, 'vulnerabilities found:') && includes(prBody, 'Packages audited:')); | ||
isYarnAuditMissing = !( | ||
includes(prBody, 'vulnerabilities found') && | ||
includes(prBody, 'Packages audited:') | ||
) | ||
} | ||
} | ||
|
||
// Add a CHANGELOG entry for app changes | ||
const hasChangelog = includes(danger.git.modified_files, 'CHANGELOG.md') | ||
|
||
if (!hasChangelog && !isTrivial) { | ||
warn('Please add a changelog entry for your changes.') | ||
} | ||
|
||
// Encourage adding `yarn audit` output on package change | ||
if (isYarnAuditMissing) { | ||
const message = 'Changes were made to yarn.lock, but no plain text yarn audit output was found in PR description.' | ||
const idea = 'Can you run `yarn audit` in your branch and paste the results inside a markdown code block?' | ||
warn(`${ message } - <i>${idea}</i>`) | ||
const message = | ||
'Changes were made to yarn.lock, but no plain text yarn audit output was found in PR description.' | ||
const idea = | ||
'Can you run `yarn audit` in your branch and paste the results inside a markdown code block?' | ||
warn(`${message} - <i>${idea}</i>`) | ||
} |
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
Oops, something went wrong.