Skip to content

Commit 89a769b

Browse files
aklkvalex-ju
andauthored
feat: pnpm 🎉 (#2671)
Co-authored-by: Alex <alex-ju@users.noreply.github.com>
1 parent d63bb02 commit 89a769b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+26151
-29491
lines changed

‎.changeset/pretty-lies-walk.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@hashicorp/design-system-components": patch
3+
---
4+
5+
Migrated our tooling from yarn to pnpm and updated our JavaScript compiler configuration
6+
7+
Updated `decorator-transforms` from `1.2.1` to `2.3.0`
8+

‎.github/workflows/ci-components.yml

+22-17
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,28 @@ jobs:
3434
if: needs.conditional-skip.outputs.trigger-ci == 'true'
3535
steps:
3636
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37+
- name: Install PNPM
38+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
39+
with:
40+
run_install: false
3741
- name: Install Node
3842
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
3943
with:
4044
node-version: ${{ env.NODE_VERSION }}
41-
cache: yarn
42-
cache-dependency-path: yarn.lock
45+
cache: pnpm
4346
- name: Install Dependencies
44-
run: yarn install --immutable
47+
run: pnpm install
4548
- name: Build Components
46-
run: yarn build
49+
run: pnpm build
4750
working-directory: packages/components
4851
- name: Lint Showcase
49-
run: yarn run lint
52+
run: pnpm lint
5053
working-directory: showcase
5154
- name: Lint Components
52-
run: yarn run lint
55+
run: pnpm lint
5356
working-directory: packages/components
5457
- name: Run Tests
55-
run: yarn run test:ember:percy
58+
run: pnpm test:ember:percy
5659
working-directory: showcase
5760
env:
5861
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_COMPONENTS }}
@@ -68,28 +71,30 @@ jobs:
6871
try-scenario:
6972
- ember-lts-3.28
7073
- ember-lts-4.12
71-
# - ember-release
74+
# - ember-release
7275
- ember-beta
73-
# - ember-canary
76+
# - ember-canary
7477
- embroider-safe
75-
# - embroider-optimized
78+
# - embroider-optimized
7679

7780
steps:
7881
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
82+
- name: Install PNPM
83+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
84+
with:
85+
run_install: false
7986
- name: Install Node
8087
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
8188
with:
8289
node-version: ${{ env.NODE_VERSION }}
83-
cache: yarn
84-
cache-dependency-path: yarn.lock
90+
cache: pnpm
8591
- name: Install Dependencies
86-
run: yarn install --immutable
92+
run: pnpm install
8793
- name: Build Components
88-
run: yarn build
94+
run: pnpm build
8995
working-directory: packages/components
9096
- name: Run Tests
9197
working-directory: showcase
92-
run: yarn ember try:one ${{ matrix.try-scenario }}
98+
run: pnpm ember try:one ${{ matrix.try-scenario }}
9399
env:
94-
PERCY_ENABLE: 0
95-
YARN_ENABLE_IMMUTABLE_INSTALLS: false
100+
PERCY_ENABLE: 0

‎.github/workflows/ci-website.yml

+15-9
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,19 @@ jobs:
3535

3636
steps:
3737
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
38+
- name: Install PNPM
39+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
40+
with:
41+
run_install: false
3842
- name: Install Node
3943
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
4044
with:
4145
node-version: ${{ env.NODE_VERSION }}
42-
cache: yarn
43-
cache-dependency-path: yarn.lock
46+
cache: pnpm
4447
- name: Install Dependencies
45-
run: yarn install --immutable
48+
run: pnpm install
4649
- name: Lint
47-
run: yarn run lint
50+
run: pnpm lint
4851
working-directory: website
4952

5053
test:
@@ -55,17 +58,20 @@ jobs:
5558

5659
steps:
5760
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
61+
- name: Install PNPM
62+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
63+
with:
64+
run_install: false
5865
- name: Install Node
5966
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
6067
with:
6168
node-version: ${{ env.NODE_VERSION }}
62-
cache: yarn
63-
cache-dependency-path: yarn.lock
69+
cache: pnpm
6470
- name: Install Dependencies
65-
run: yarn install --immutable
71+
run: pnpm install
6672
- name: Build Components
67-
run: yarn build
73+
run: pnpm build
6874
working-directory: packages/components
6975
- name: Run Tests
70-
run: yarn run test:ember
76+
run: pnpm test:ember
7177
working-directory: website

‎.github/workflows/open-pull-request-for-icon-update.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,27 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
14+
- name: Install PNPM
15+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
16+
with:
17+
run_install: false
1418
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
1519
with:
1620
node-version: ${{ env.NODE_VERSION }}
17-
cache: yarn
18-
cache-dependency-path: yarn.lock
21+
cache: pnpm
1922

2023
- name: Install Dependencies
21-
run: yarn install --immutable
24+
run: pnpm install
2225

2326
- name: Sync icons
2427
env:
2528
# this is Brian's personal access token
2629
FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }}
27-
run: yarn sync
30+
run: pnpm sync
2831
working-directory: packages/flight-icons
2932

3033
- name: Build icons
31-
run: yarn build
34+
run: pnpm build
3235
working-directory: packages/flight-icons
3336

3437
- name: Open a PR

‎.github/workflows/release.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,26 @@ jobs:
1818
with:
1919
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
2020
fetch-depth: 0
21+
22+
- name: Install PNPM
23+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
24+
with:
25+
run_install: false
2126

2227
- name: Setup Node.js
2328
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
2429
with:
2530
node-version: ${{ env.NODE_VERSION }}
26-
cache-dependency-path: yarn.lock
31+
cache: pnpm
2732

2833
- name: Install Dependencies
29-
run: yarn
34+
run: pnpm install
3035

3136
- name: Create Release Pull Request
3237
uses: changesets/action@c8bada60c408975afd1a20b3db81d6eee6789308 # v1.4.9
3338
with:
34-
version: yarn version-packages
35-
publish: yarn release-packages
39+
version: pnpm version-packages
40+
publish: pnpm release-packages
3641
env:
3742
# Token setup in hashibot-hds' account
3843
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}

‎.npmrc

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
####################
2+
# super strict mode
3+
####################
4+
auto-install-peers=false
5+
strict-peer-dependents=true
6+
resolve-peers-from-workspace-root=false
7+
8+
################
9+
# Optimizations
10+
################
11+
# Less strict, but required for tooling to not barf on duplicate peer trees.
12+
# (many libraries declare the same peers, which resolve to the same
13+
# versions)
14+
dedupe-peer-dependents=true
15+
public-hoist-pattern[]=ember-source
16+
17+
################
18+
# Compatibility
19+
################
20+
# highest is what everyone is used to, but
21+
# not ensuring folks are actually compatible with declared ranges.
22+
resolution-mode=highest
23+
24+
################
25+
# Misc
26+
################
27+
verify-deps-before-run=install # always verify deps before running any scripts

0 commit comments

Comments
 (0)