Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pnpm πŸŽ‰ #2671

Merged
merged 9 commits into from
Feb 21, 2025
Merged
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
8 changes: 8 additions & 0 deletions .changeset/pretty-lies-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@hashicorp/design-system-components": patch
---

Migrated our tooling from yarn to pnpm and updated our JavaScript compiler configuration

Updated `decorator-transforms` from `1.2.1` to `2.3.0`

39 changes: 22 additions & 17 deletions .github/workflows/ci-components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,28 @@ jobs:
if: needs.conditional-skip.outputs.trigger-ci == 'true'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install PNPM
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
run_install: false
- name: Install Node
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
cache-dependency-path: yarn.lock
cache: pnpm
- name: Install Dependencies
run: yarn install --immutable
run: pnpm install
- name: Build Components
run: yarn build
run: pnpm build
working-directory: packages/components
- name: Lint Showcase
run: yarn run lint
run: pnpm lint
working-directory: showcase
- name: Lint Components
run: yarn run lint
run: pnpm lint
working-directory: packages/components
- name: Run Tests
run: yarn run test:ember:percy
run: pnpm test:ember:percy
working-directory: showcase
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_COMPONENTS }}
Expand All @@ -68,28 +71,30 @@ jobs:
try-scenario:
- ember-lts-3.28
- ember-lts-4.12
# - ember-release
# - ember-release
- ember-beta
# - ember-canary
# - ember-canary
- embroider-safe
# - embroider-optimized
# - embroider-optimized

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install PNPM
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
run_install: false
- name: Install Node
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
cache-dependency-path: yarn.lock
cache: pnpm
- name: Install Dependencies
run: yarn install --immutable
run: pnpm install
- name: Build Components
run: yarn build
run: pnpm build
working-directory: packages/components
- name: Run Tests
working-directory: showcase
run: yarn ember try:one ${{ matrix.try-scenario }}
run: pnpm ember try:one ${{ matrix.try-scenario }}
env:
PERCY_ENABLE: 0
YARN_ENABLE_IMMUTABLE_INSTALLS: false
PERCY_ENABLE: 0
24 changes: 15 additions & 9 deletions .github/workflows/ci-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,19 @@ jobs:

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install PNPM
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
run_install: false
- name: Install Node
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
cache-dependency-path: yarn.lock
cache: pnpm
- name: Install Dependencies
run: yarn install --immutable
run: pnpm install
- name: Lint
run: yarn run lint
run: pnpm lint
working-directory: website

test:
Expand All @@ -55,17 +58,20 @@ jobs:

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install PNPM
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
run_install: false
- name: Install Node
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
cache-dependency-path: yarn.lock
cache: pnpm
- name: Install Dependencies
run: yarn install --immutable
run: pnpm install
- name: Build Components
run: yarn build
run: pnpm build
working-directory: packages/components
- name: Run Tests
run: yarn run test:ember
run: pnpm test:ember
working-directory: website
13 changes: 8 additions & 5 deletions .github/workflows/open-pull-request-for-icon-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install PNPM
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
run_install: false
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
cache-dependency-path: yarn.lock
cache: pnpm

- name: Install Dependencies
run: yarn install --immutable
run: pnpm install

- name: Sync icons
env:
# this is Brian's personal access token
FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }}
run: yarn sync
run: pnpm sync
working-directory: packages/flight-icons

- name: Build icons
run: yarn build
run: pnpm build
working-directory: packages/flight-icons

- name: Open a PR
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,26 @@ jobs:
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Install PNPM
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
run_install: false

- name: Setup Node.js
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: ${{ env.NODE_VERSION }}
cache-dependency-path: yarn.lock
cache: pnpm

- name: Install Dependencies
run: yarn
run: pnpm install

- name: Create Release Pull Request
uses: changesets/action@c8bada60c408975afd1a20b3db81d6eee6789308 # v1.4.9
with:
version: yarn version-packages
publish: yarn release-packages
version: pnpm version-packages
publish: pnpm release-packages
env:
# Token setup in hashibot-hds' account
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
Expand Down
27 changes: 27 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
####################
# super strict mode
####################
auto-install-peers=false
strict-peer-dependents=true
resolve-peers-from-workspace-root=false

################
# Optimizations
################
# Less strict, but required for tooling to not barf on duplicate peer trees.
# (many libraries declare the same peers, which resolve to the same
# versions)
dedupe-peer-dependents=true
public-hoist-pattern[]=ember-source

################
# Compatibility
################
# highest is what everyone is used to, but
# not ensuring folks are actually compatible with declared ranges.
resolution-mode=highest

################
# Misc
################
verify-deps-before-run=install # always verify deps before running any scripts
Loading