Skip to content

Commit

Permalink
Merge pull request #42 from department-of-veterans-affairs/bug/7193-n…
Browse files Browse the repository at this point in the history
…arin-fix-yarn-workspace

[BUG] Configure Yarn Workspace Correctly
  • Loading branch information
narin authored Nov 30, 2023
2 parents 3915608 + 261def5 commit 4b39a3b
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 24,213 deletions.
1 change: 0 additions & 1 deletion .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install dependencies
working-directory: packages/components
run: yarn install --immutable
- name: yarn test
working-directory: packages/components
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ on:
jobs:
publish-package:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/${{ inputs.package }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_KEY }}
steps:
Expand All @@ -41,19 +38,17 @@ jobs:
with:
ruby-version: '3.2'
bundler-cache: true
working-directory: ${{ github.workspace }}
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
registry-url: https://registry.npmjs.org/
node-version-file: '.nvmrc'
node-version-file: .nvmrc
cache: yarn
- run: |
yarn install
cd ../../
yarn install
cache-dependency-path: yarn.lock
- run: yarn install
- name: Bump version and publish to NPM
id: bump-version
working-directory: packages/${{ inputs.package }}
run: |
NPM_PACKAGE=$(jq -r .name package.json)
echo "NPM_PACKAGE_NAME=$NPM_PACKAGE" >> "$GITHUB_OUTPUT"
Expand Down Expand Up @@ -86,6 +81,7 @@ jobs:
echo "NEW_VERSION=$NEW_VERSION" >> "$GITHUB_OUTPUT"
echo "GIT_TAG=${{ inputs.package }}-v$NEW_VERSION" >> "$GITHUB_OUTPUT"
- name: Commit changes and tag
working-directory: packages/${{ inputs.package }}
run: |
git config --global user.name 'VA Automation Bot'
git config --global user.email '[email protected]'
Expand All @@ -98,8 +94,8 @@ jobs:
git tag -a $TAG -m $TAG
git push origin $TAG
- name: Generate changelog
if: ${{ inputs.version_bump != 'alpha' && inputs.version_bump != 'beta' }}
run: |
cd ../../
chmod +x .github/scripts/generate-changelog.sh
./.github/scripts/generate-changelog.sh ${{ inputs.package }} ${{ secrets.VA_MOBILE_ROBOT_GITHUB_PAT }}
git add CHANGELOG.md
Expand Down
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"main": "index.js",
"version": "0.0.1",
"license": "ISC",
"private": true,
"workspaces": [
"packages/*"
],
Expand All @@ -25,5 +26,13 @@
"eslint-plugin-tsdoc": "^0.2.17",
"prettier": "3.0.0",
"typescript": "^5.1.6"
},
"resolutions": {
"react-docgen-typescript": "2.2.2",
"@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.cd77847.0"
},
"overrides": {
"react-docgen-typescript": "2.2.2",
"@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.cd77847.0"
}
}
3 changes: 1 addition & 2 deletions packages/components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ yarn
```
then
```
yarn tokensBuild
yarn tokens:build
```

5. Launch the app
Expand All @@ -58,4 +58,3 @@ yarn tokensBuild
| `storybook:generate` | Generates `.storybook/native/storybook.requires.js` which tells React Native where to find stores since it doesn't support dynamic imports |
| `storybook:watch` | Watches for newly created stories and regenerates `storybook.requires.js` |
| `storybook:web` | Builds and launches development server for web |
| `tokensBuild` | Builds the tokens package so they are available locally for use by Storybook |
2 changes: 1 addition & 1 deletion packages/components/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
],
},
setupFiles: [
'./node_modules/react-native-gesture-handler/jestSetup.js',
'../../node_modules/react-native-gesture-handler/jestSetup.js',
'./jest/testSetup.ts',
],
transformIgnorePatterns: ['jest-runner', '/node_modules/(?!native-base)/'],
Expand Down
15 changes: 3 additions & 12 deletions packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@department-of-veterans-affairs/mobile-component-library",
"version": "0.3.3-alpha.0",
"version": "0.3.3-alpha.3",
"description": "VA Design System Mobile Component Library",
"main": "src/index.tsx",
"scripts": {
Expand All @@ -14,8 +14,7 @@
"storybook:watch": "sb-rn-watcher --config-path .storybook/native",
"storybook:web": "STORYBOOK_WEB=true start-storybook --config-dir .storybook/web -p 6006 --no-version-updates",
"test": "jest --coverage",
"test:watch": "jest --watch",
"tokensBuild": "cd ../tokens && yarn build"
"test:watch": "jest --watch"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -93,7 +92,7 @@
"metro-react-native-babel-preset": "^0.77.0",
"react": "^18.2.0",
"react-dom": "18.2.0",
"react-native": "0.72.5",
"react-native": "0.72.6",
"react-native-gesture-handler": "^2.12.0",
"react-native-reanimated": "~3.3.0",
"react-native-safe-area-context": "4.6.3",
Expand All @@ -104,13 +103,5 @@
"storybook-dark-mode": "^3.0.1",
"ts-jest": "^29.1.1",
"typescript": "^5.1.6"
},
"resolutions": {
"react-docgen-typescript": "2.2.2",
"@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.cd77847.0"
},
"overrides": {
"react-docgen-typescript": "2.2.2",
"@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.cd77847.0"
}
}
Loading

0 comments on commit 4b39a3b

Please sign in to comment.