Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,41 +22,44 @@ jobs:
- name: Checkout
uses: actions/checkout@v6

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Setup Node (uses version in .nvmrc)
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Get pnpm store
id: pnpm-store
run: echo "dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v5
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock', 'patches/*.patch') }}
path: ${{ steps.pnpm-store.outputs.dir }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml', 'patches/*.patch') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-pnpm-

- name: Install dependencies
run: yarn install --immutable
run: pnpm install --frozen-lockfile

- name: Check for unmet constraints (fix w/ "yarn constraints --fix")
run: yarn constraints
- name: Check for unmet constraints
run: node scripts/check-workspace-constraints.js

- name: Building packages
run: yarn build
run: pnpm build

- name: Running static type checking
run: yarn typecheck
run: pnpm typecheck

- name: Running linters and tests
run: yarn run jest --projects jest.{eslint,test,ts-test,bundle}.config.js --reporters github-actions
run: pnpm jest --projects jest.{eslint,test,ts-test,bundle}.config.js --reporters github-actions
env:
CI: true

- name: Building Visual Regression Tests application for UI components
run: yarn visual-testing-app:build
run: pnpm visual-testing-app:build

- name: Running Visual Regression Tests for UI components
# aa-exec:
Expand All @@ -65,7 +68,7 @@ jobs:
# that made it so that puppeteers chromium installation is not whitelisted,
# which made it so that the chromium sandbox is not available and puppeteer errors out,
# so we need to specify that we are using app armor's chrome profile when running puppeteer (https://github.com/mermaid-js/mermaid-cli/issues/730#issuecomment-2408615110)
run: aa-exec --profile=chrome -- yarn vrt:components
run: aa-exec --profile=chrome -- pnpm vrt:components
timeout-minutes: 20
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
Expand All @@ -78,7 +81,7 @@ jobs:
shell: bash

- name: Checking bundle size
run: yarn bundlesize
run: pnpm bundlesize
env:
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
CI_REPO_OWNER: ${{ github.repository_owner }}
Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/preview-release-on-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,39 +36,42 @@ jobs:
ref: ${{ steps.comment-branch.outputs.head_ref }}
token: ${{ steps.generate_github_token.outputs.token }}

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Setup Node (uses version in .nvmrc)
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Get pnpm store
id: pnpm-store
run: echo "dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v5
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock', 'patches/*.patch') }}
path: ${{ steps.pnpm-store.outputs.dir }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml', 'patches/*.patch') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-pnpm-

- name: Install dependencies
run: yarn install --immutable
run: pnpm install --frozen-lockfile

- name: Building packages
run: yarn build
run: pnpm build

- name: Building package READMEs
run: yarn generate-readmes
run: pnpm generate-readmes
env:
CI: true

- name: Publishing preview releases to npm registry
run: |
PREVIEW_TAG=$(echo "$BRANCH_NAME" | sed -e 's/[^a-zA-Z0-9-]/-/g')
yarn changeset version --snapshot ${PREVIEW_TAG}
yarn changeset publish --tag ${PREVIEW_TAG}
pnpm changeset version --snapshot ${PREVIEW_TAG}
pnpm changeset publish --tag ${PREVIEW_TAG}
env:
GITHUB_TOKEN: ${{ steps.generate_github_token.outputs.token }}
BRANCH_NAME: ${{ steps.comment-branch.outputs.head_ref }}
Expand Down
29 changes: 16 additions & 13 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,18 @@ jobs:
# https://github.bokerqi.topmunity/t/action-does-not-trigger-another-on-push-tag-action/17148/8
token: ${{ steps.generate_github_token.outputs.token }}

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Setup Node (uses version in .nvmrc)
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Get pnpm store
id: pnpm-store
run: echo "dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Verify npm version
run: |
Expand All @@ -46,19 +49,19 @@ jobs:

- uses: actions/cache@v5
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock', 'patches/*.patch') }}
path: ${{ steps.pnpm-store.outputs.dir }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml', 'patches/*.patch') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-pnpm-

- name: Install dependencies
run: yarn install --immutable
run: pnpm install --frozen-lockfile

- name: Building packages
run: yarn build
run: pnpm build

- name: Building package READMEs
run: yarn generate-readmes
run: pnpm generate-readmes
env:
CI: true

Expand All @@ -74,8 +77,8 @@ jobs:
uses: dotansimha/changesets-action@v1.5.2
with:
commit: 'ci(changesets): version packages'
publish: yarn changeset publish
version: yarn changeset:version-and-format
publish: pnpm changeset publish
version: pnpm changeset:version-and-format
createGithubReleases: aggregate
githubReleaseName: v${{ steps.release_version.outputs.VALUE }}
githubTagName: v${{ steps.release_version.outputs.VALUE }}
Expand All @@ -88,7 +91,7 @@ jobs:
if: steps.changesets.outputs.published != 'true'
run: |
git checkout main
yarn changeset version --snapshot canary
yarn changeset publish --tag canary
pnpm changeset version --snapshot canary
pnpm changeset publish --tag canary
env:
GITHUB_TOKEN: ${{ steps.generate_github_token.outputs.token }}
14 changes: 2 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
**/.DS_Store

# Build output
Expand Down Expand Up @@ -58,16 +56,8 @@ typings/
# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
# pnpm
.pnpm-debug.log

# dotenv environment variables file
.env
Expand Down
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarn commitlint --edit $1
pnpm commitlint --edit $1
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarn generate-package-json --all-workspace-packages && yarn lint-staged
pnpm generate-package-json --all-workspace-packages && pnpm lint-staged
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Hoist all dependencies to root node_modules (matches previous Yarn behavior).
# TODO: tighten with public-hoist-pattern[] for specific packages later.
shamefully-hoist=true
Comment on lines +1 to +3
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This caught my attention and I read up on it.
When determining what would needed to be done to allow pnpm's default to prevent phantom dependencies, I encountered no errors at all.
Perhaps this file isn't even needed atm?

52 changes: 0 additions & 52 deletions .yarn/plugins/@yarnpkg/plugin-constraints.cjs

This file was deleted.

Loading
Loading