Skip to content

Commit

Permalink
(chore) Upgrade yarn to v4 (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen authored Nov 18, 2023
1 parent 714760b commit 14b7f32
Show file tree
Hide file tree
Showing 8 changed files with 6,475 additions and 7,511 deletions.
68 changes: 53 additions & 15 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,31 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
- run: yarn install --immutable
node-version: "18"

- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- name: Setup local cache server for Turborepo
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ secrets.TURBO_SERVER_TOKEN }}

- run: yarn verify
- run: yarn turbo build --color

- name: Run tests, lint and typechecking
run: yarn verify

- name: Run build
run: yarn turbo build --color

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
Expand All @@ -56,13 +70,25 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
node-version: "18"

- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- run: yarn install --immutable
- name: Version
run: yarn version "$(node -e "console.log(require('semver').inc(require('./package.json').version, 'patch'))")-pre.${{ github.run_number }}"

- run: yarn version "$(node -e "console.log(require('semver').inc(require('./package.json').version, 'patch'))")-pre.${{ github.run_number }}"
- name: Build
run: yarn turbo build --color

- run: yarn turbo run build --color

- run: git config user.email "[email protected]" && git config user.name "OpenMRS CI"
- run: git add . && git commit -m "Prerelease version" --no-verify
Expand All @@ -78,7 +104,6 @@ jobs:
path: |
dist
release:
runs-on: ubuntu-latest

Expand All @@ -89,24 +114,37 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Download Artifacts

uses: actions/download-artifact@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
- run: yarn install --immutable
- run: yarn turbo build --color
- run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn npm publish --access public
node-version: "18"

- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- name: Build
run: yarn turbo build --color
- run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: |
dist
deploy_form_builder:
runs-on: ubuntu-latest

Expand Down
541 changes: 0 additions & 541 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

550 changes: 0 additions & 550 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

This file was deleted.

874 changes: 0 additions & 874 deletions .yarn/releases/yarn-3.6.0.cjs

This file was deleted.

893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.0.2.cjs

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
nodeLinker: node-modules
compressionLevel: mixed

enableGlobalCache: false

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.6.0.cjs
yarnPath: .yarn/releases/yarn-4.0.2.cjs
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,5 @@
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4"
},
"packageManager": "yarn@3.6.0"
"packageManager": "yarn@4.0.2"
}
Loading

0 comments on commit 14b7f32

Please sign in to comment.