Skip to content
10 changes: 5 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
version: 10.18.3

- uses: actions/cache/restore@v4
name: Check for build cache
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
- name: pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
version: 10.18.3

- name: Use Node 18
uses: actions/setup-node@v4
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
- name: pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
version: 10.18.3

- name: Use Node 18
uses: actions/setup-node@v4
Expand Down Expand Up @@ -178,7 +178,7 @@ jobs:
- name: pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
version: 10.18.3

- name: Use Node 18
uses: actions/setup-node@v4
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
- name: pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
version: 10.18.3

- name: Use Node 18
uses: actions/setup-node@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/react17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
version: 10.18.3
cache: false

- uses: actions/cache/restore@v4
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
version: 10.18.3
cache: false

- uses: actions/cache/restore@v4
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
version: 10.18.3

# Needed following Github's transition from Node 16 to 20
- name: Install node-gyp
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
- name: pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
version: 10.18.3

- name: Use Node 18
uses: actions/setup-node@v4
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
- name: pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
version: 10.18.3

- name: Use Node 18
uses: actions/setup-node@v4
Expand Down Expand Up @@ -209,7 +209,7 @@ jobs:
- name: pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
version: 10.18.3

- name: Use Node 18
uses: actions/setup-node@v4
Expand Down Expand Up @@ -264,7 +264,7 @@ jobs:
- name: pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
version: 10.18.3

# Needed following Github's transition from Node 16 to 20
- name: Install node-gyp
Expand Down Expand Up @@ -309,7 +309,7 @@ jobs:
- name: pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
version: 10.18.3

- name: Dispatch to Website repo
uses: peter-evans/repository-dispatch@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sizeDiff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
version: 10.18.3

- name: Use Node.js 18
uses: actions/setup-node@v4
Expand Down
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nodejs 18.20.8
pnpm 10.18.3
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
"private": true,
"engines": {
"node": ">= 18.20.8",
"pnpm": ">= 9.15.0"
"pnpm": ">= 10.18.3"
},
"packageManager": "[email protected]",
"scripts": {
"init": "pnpm install && pnpm build",
"init:react17": "pnpm clean; npx node ./scripts/react17/init.mjs; pnpm run init",
Expand Down Expand Up @@ -82,7 +83,11 @@
"caniuse-lite": "^1.0.30001585",
"jackspeak": "2.1.1",
"typescript": "$typescript"
}
},
"onlyBuiltDependencies": [
"core-js",
"esbuild"
]
},
"lg": {
"scopes": {
Expand All @@ -107,7 +112,5 @@
},
"bugs": {
"url": "https://github.com/mongodb/leafygreen-ui/issues"
},
"packageManager": "[email protected]",
"typesVersions": {}
}
}
62 changes: 62 additions & 0 deletions scripts/nvm-to-asdf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/usr/bin/env bash

# 1. Disable and clear corepack,
if command -v corepack >/dev/null 2>&1; then
echo "Disabling corepack"
corepack cache clean
corepack disable
fi

# 1b Disable nvm
if grep -q 'export NVM_DIR="\$HOME/.nvm"' ~/.zshrc; then
echo "Disabling nvm in ~/.zshrc..."
awk '
BEGIN { skip = 0 }
{
if ($0 ~ /export NVM_DIR="\$HOME\/\.nvm"/) {
skip = 1
}
if (skip && $0 ~ /^$/) {
skip = 0
}
if (skip && $0 !~ /^#/) {
print "#" $0
} else {
print $0
}
}
' ~/.zshrc > ~/.zshrc.tmp && mv ~/.zshrc.tmp ~/.zshrc
fi

# 1c Disable pnpm
if grep -q 'export PNPM_HOME=' ~/.zshrc; then
echo "Disabling PNPM in ~/.zshrc..."
awk '
BEGIN { skip = 0 }
{
if ($0 ~ /export PNPM_HOME=/) {
skip = 1
}
if (skip && $0 ~ /^$/) {
skip = 0
}
if (skip && $0 !~ /^#/) {
print "#" $0
} else {
print $0
}
}
' ~/.zshrc > ~/.zshrc.tmp && mv ~/.zshrc.tmp ~/.zshrc
fi

# 2. Install ASDF (if not already installed)
if ! command -v asdf >/dev/null 2>&1; then
echo "Installing asdf"
brew install asdf
# ... and add to path
echo 'export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH"' >> ~/.zshrc
fi

# 3 Enable asdf
echo "Setting up asdf"
asdf install
Loading