-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #290 from pxblue/dev
Release 5.2.0
- Loading branch information
Showing
52 changed files
with
1,184 additions
and
580 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,4 +1,6 @@ | ||
version: 2 | ||
version: 2.1 | ||
orbs: | ||
codecov: codecov/[email protected] | ||
jobs: | ||
build_library: | ||
docker: | ||
|
@@ -31,7 +33,7 @@ jobs: | |
- run: | ||
name: Test | ||
command: | | ||
yarn test | ||
yarn test --coverage --watchAll=false | ||
- run: | ||
name: Build Library | ||
command: | | ||
|
@@ -49,6 +51,18 @@ jobs: | |
root: . | ||
paths: | ||
- dist | ||
- components/coverage | ||
coverage_report: | ||
working_directory: ~/react-component-library | ||
docker: | ||
- image: circleci/node:12.9.1-browsers | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: . | ||
- codecov/upload: | ||
file: './components/coverage/clover.xml' | ||
token: 5e6faafe-eaf0-4d71-a931-22f279d3e446 | ||
|
||
# Builds the Storybook app using @pxblue/react-components persisted in /dist folder. | ||
build_storybook: | ||
|
@@ -203,19 +217,13 @@ jobs: | |
at: . | ||
- run: | ||
name: Authenticate with registry | ||
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc | ||
command: | | ||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc | ||
echo "//registry.yarnpkg.com/:_authToken=$NPM_TOKEN" >> ~/.npmrc | ||
- run: | ||
name: Publish @pxblue/react-components | ||
command: | | ||
cd dist | ||
MASTER_VERSION=`node -p "require('./package.json').version"` | ||
NPM_LATEST_VERSION=`npm show @pxblue/react-components version` | ||
if ! [ $MASTER_VERSION == $NPM_LATEST_VERSION ]; | ||
then | ||
npm publish | ||
else | ||
echo "Latest version is already published." | ||
fi | ||
yarn publish:package -b $CIRCLE_BRANCH | ||
workflows: | ||
version: 2 | ||
|
@@ -244,3 +252,11 @@ workflows: | |
branches: | ||
only: | ||
- master | ||
- dev | ||
- coverage_report: | ||
requires: | ||
- build_library | ||
filters: | ||
branches: | ||
only: | ||
- master |
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 |
---|---|---|
|
@@ -8,6 +8,9 @@ package-lock.json | |
dist | ||
storybook-static | ||
|
||
# testing | ||
/components/coverage | ||
|
||
# misc | ||
.vscode/ | ||
.idea/ | ||
|
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
Validating CODEOWNERS rules …
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 @@ | ||
* @joebochill @emclaug2 @huayunh @daileytj |
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,13 +1,29 @@ | ||
# Publishing Instructions | ||
|
||
To update the version number, edit the version in `components/package.json`. | ||
## Automatic Publishing | ||
|
||
To publish a new package through NPM, run the following commands from the root folder: | ||
This package is published to NPM automatically by CircleCI when code is merged into the `dev` or `master` branches. To publish a new version, simply update the version in `package.json` and merge your code into the appropriate branch. | ||
|
||
- The `dev` branch will publish versions marked as `alpha` or `beta`. | ||
- The `master` branch will publish any version (`alpha`, `beta`, or `latest`). | ||
In both cases, the code will only be published if the version number differs from the current version published under the respective dist tag. | ||
|
||
## Manually Publishing | ||
|
||
If you need to publish a package manually, you can run the following commands from the root folder: | ||
|
||
```sh | ||
yarn build | ||
yarn publish:package | ||
``` | ||
yarn build | ||
cd dist | ||
npm publish --tag <alpha | beta> | ||
|
||
The publishing script will look at the version in the `package.json` and automatically determine whether to publish an alpha, beta, or latest package. | ||
|
||
For this command to work, you must have an NPM token configured in your environment variables or you can perform a login prior to executing the publish command via: | ||
|
||
```sh | ||
yarn build | ||
npm adduser && yarn publish:package | ||
``` | ||
|
||
> The above command should only be run for `alpha` or `beta` packages. This repo's CircleCI will automatically publish latest packages from the master branch. | ||
> Publishing manually should only be done for `alpha` or `beta` packages. The command will work for `latest` packages, but this should be avoided except in rare situations where the automatic publishing functionality is not working in CircleCI. |
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,15 +1,15 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
extends: [ '@pxblue/eslint-config/tsx' ], | ||
parserOptions: { | ||
project: "./tsconfig.json", | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
extends: ['@pxblue/eslint-config/tsx'], | ||
parserOptions: { | ||
project: './tsconfig.json', | ||
}, | ||
env: { | ||
browser: true, | ||
jest: true | ||
jest: true, | ||
}, | ||
rules: { | ||
"@typescript-eslint/no-empty-function": "off", | ||
"no-empty-function": "off" | ||
} | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'no-empty-function': 'off', | ||
}, | ||
}; |
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,2 @@ | ||
fixes: | ||
- "::components/" # move root e.g., "path/" => "after/path/" |
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,12 +1,12 @@ | ||
const { defaults: tsjPreset } = require('ts-jest/presets'); | ||
|
||
module.exports = { | ||
transform: { | ||
...tsjPreset.transform, | ||
}, | ||
globals: { | ||
'ts-jest': { | ||
tsConfig: 'tsconfig.test.json' | ||
} | ||
} | ||
transform: { | ||
...tsjPreset.transform, | ||
}, | ||
globals: { | ||
'ts-jest': { | ||
tsConfig: 'tsconfig.test.json', | ||
}, | ||
}, | ||
}; |
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
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.