Skip to content

Commit

Permalink
[DS-416] Migrate to pnpm (#171)
Browse files Browse the repository at this point in the history
* [DS-416] Migrate to pnpm

* CR
  • Loading branch information
victortrinh2 authored Oct 23, 2024
1 parent 6d43939 commit 88b0240
Show file tree
Hide file tree
Showing 20 changed files with 23,508 additions and 21,410 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/.vscode
storybook-static
node_modules
dist
*.svg
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
Before submitting your pull request, please:
1. Read our contributing documentation: https://github.com/gsoft-inc/wl-orbiter/blob/master/CONTRIBUTING.md
2. Ensure there are no linting or TypeScript errors: `yarn lint`
3. Verify that tests pass: `yarn jest`
2. Ensure there are no linting or TypeScript errors: `pnpm lint`
3. Verify that tests pass: `pnpm jest`
-->

Issue:
Expand Down
24 changes: 15 additions & 9 deletions .github/workflows/changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,28 @@ jobs:
steps:
- name: Checkout Commit
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Cache yarn dependencies
node-version-file: ".nvmrc"

- name: Cache pnpm store
uses: actions/cache@v3
id: cache-dependencies
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.ox }}-yarn-
- name: Install Dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
path: |
node_modules
~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install pnpm
run: |
yarn install --frozen-lockfile
corepack enable
pnpm install --frozen-lockfile
- name: Create release Pull Request or publish to NPM
id: changesets
uses: changesets/action@v1
Expand Down
23 changes: 18 additions & 5 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,32 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: "yarn"

- name: Cache pnpm store
uses: actions/cache@v3
with:
path: |
node_modules
~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: |
corepack enable
pnpm install --frozen-lockfile
- name: Build Packages
run: yarn build
run: pnpm run build

- name: Publish to Chromatic
uses: chromaui/[email protected]
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
buildScriptName: build-sb-chroma


47 changes: 40 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,21 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Cache pnpm store
uses: actions/cache@v3
with:
path: |
node_modules
~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: |
corepack enable
pnpm install --frozen-lockfile
- name: Lint Eslint
run: yarn lint-ci-eslint
run: pnpm run lint-ci-eslint

stylelint:
name: "Stylelint"
Expand All @@ -37,10 +48,21 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Cache pnpm store
uses: actions/cache@v3
with:
path: |
node_modules
~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: |
corepack enable
pnpm install --frozen-lockfile
- name: Lint Stylelint
run: yarn lint-ci-style
run: pnpm run lint-ci-style

build_and_tests:
name: "Build and Tests"
Expand All @@ -51,9 +73,20 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Cache pnpm store
uses: actions/cache@v3
with:
path: |
node_modules
~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: |
corepack enable
pnpm install --frozen-lockfile
- name: Build Packages
run: yarn build
run: pnpm run build
- name: Run Jest
run: yarn test
run: pnpm run test
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
node_modules
dist
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
*.tgz
__MACOSX
.DS_Store
Expand Down
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
strict-peer-dependencies=false
public-hoist-pattern[]=*
Loading

0 comments on commit 88b0240

Please sign in to comment.