Skip to content

refactor: [M3-8632] - Use pnpm as our package manager #11297

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

Merged
merged 85 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from 68 commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
74723ac
switch from yarn to pnpm
bnussman Nov 20, 2024
0ae9531
fix api-v4 validation version
bnussman Nov 20, 2024
1d3f3ac
easy fixes first
bnussman Nov 20, 2024
8a697f1
cloud manager boots
bnussman Nov 20, 2024
0e38ddc
more progress
bnussman Nov 20, 2024
9829883
finish fixing cloud manager type issues
bnussman Nov 20, 2024
a9f06ff
clean up
bnussman Nov 20, 2024
8c7d20c
add back comments
bnussman Nov 20, 2024
6ed4bb2
clean up scripts
bnussman Nov 20, 2024
feb74aa
update lint job
bnussman Nov 20, 2024
fff9be6
update lint job
bnussman Nov 20, 2024
6644bc7
fix pnpm version issue
bnussman Nov 20, 2024
ea7c3e2
update github actions
bnussman Nov 20, 2024
2976289
fix lint issue
bnussman Nov 20, 2024
10cff59
storybook clean up and fixes
bnussman Nov 20, 2024
264a757
fix tests
bnussman Nov 20, 2024
062c450
fix link test
bnussman Nov 20, 2024
254d47d
use pnpm pack to fix version issue
bnussman Nov 20, 2024
0c94d06
try to fix pnpm pack issue
bnussman Nov 20, 2024
5cecafb
fix precommit hooks
bnussman Nov 20, 2024
373da44
update the rest of our github actions
bnussman Nov 21, 2024
507730c
attempt at updating docker related files
bnussman Nov 21, 2024
e01060d
break github actions
bnussman Nov 21, 2024
b038562
Merge branch 'develop' into feat/pnpm
bnussman Nov 21, 2024
5922fd1
Merge branch 'develop' into feat/pnpm
bnussman Nov 21, 2024
73fee9a
Merge branch 'develop't push into feat/pnpm
bnussman Nov 25, 2024
dbab503
Merge branch 'develop' into feat/pnpm
bnussman Nov 26, 2024
5114ca1
Merge branch 'develop' into feat/pnpm
bnussman Dec 13, 2024
5350c35
update pnpm lockfile
bnussman Dec 13, 2024
9f7a81e
Merge branch 'develop' into feat/pnpm
bnussman Dec 13, 2024
fcc9793
fix lockfile
bnussman Dec 13, 2024
8142a91
use pnpm pack so that workspace packages get resolved properly
bnussman Dec 13, 2024
fda3caa
fix missing ui dependency
bnussman Dec 13, 2024
e8fc6f4
fix missing ui dependency
bnussman Dec 13, 2024
4244ac4
Merge branch 'develop' into feat/pnpm
bnussman Dec 17, 2024
470ae78
Merge branch 'develop' into feat/pnpm
bnussman Dec 18, 2024
6ed6996
add another missing dependency to the ui package
bnussman Dec 18, 2024
9a9cb5e
Merge branch 'develop' into feat/pnpm
bnussman Jan 3, 2025
38cbb44
Merge branch 'develop' into feat/pnpm
bnussman Jan 7, 2025
31f95a4
fix outdated lockfile
bnussman Jan 7, 2025
002587d
Merge branch 'develop' into feat/pnpm
bnussman Jan 15, 2025
82a3073
fix incorrect import
bnussman Jan 15, 2025
dd92b41
Merge branch 'develop' into feat/pnpm
bnussman Jan 17, 2025
a7b0d2e
update lockfile
bnussman Jan 17, 2025
0eb0332
remove corepack packagemanager definiton
bnussman Jan 17, 2025
f074937
work on backwards compability with yarn
bnussman Jan 17, 2025
0121e99
work on backwards compability with yarn
bnussman Jan 17, 2025
d7a976e
set pnpm version manually for now
bnussman Jan 17, 2025
cfeacde
fix cypress component testing
bnussman Jan 17, 2025
2ccabe5
try to fix junit reporter
bnussman Jan 17, 2025
5f96e13
Merge branch 'develop' into feat/pnpm
bnussman Jan 22, 2025
596bc8b
update lockfile
bnussman Jan 22, 2025
f8576d8
Merge branch 'develop' into feat/pnpm
bnussman Jan 27, 2025
bcecf66
Merge branch 'develop' into feat/pnpm
bnussman Jan 29, 2025
1b8b4f9
remove search precommit
bnussman Jan 29, 2025
ea5ceca
debug packge publishing
bnussman Jan 29, 2025
779f7f9
debug packge publishing
bnussman Jan 29, 2025
970d0c6
debug packge publishing
bnussman Jan 29, 2025
810fbc4
clean up precommit
bnussman Jan 29, 2025
2dba00d
update other publish
bnussman Jan 29, 2025
4b1b8ad
update other publish
bnussman Jan 29, 2025
71ab733
finish up changes to our publish steps
bnussman Jan 30, 2025
0018870
simplify the pnpm dev command
bnussman Jan 30, 2025
f9e3986
add bootstrap command
bnussman Jan 30, 2025
3e1163b
update docs
bnussman Feb 3, 2025
f78336f
update a few more docs
bnussman Feb 3, 2025
5741910
Merge branch 'develop' into feat/pnpm
bnussman Feb 7, 2025
67a6e1e
fixes
bnussman Feb 7, 2025
5540387
Update docs/GETTING_STARTED.md
bnussman-akamai Feb 10, 2025
df37753
Merge branch 'develop' into feat/pnpm
bnussman Feb 12, 2025
62a6b26
link to pnpm install docs
bnussman Feb 12, 2025
5e6f146
ignore pnpm store for docker
bnussman Feb 20, 2025
e9c499e
make devenv work
bnussman Feb 20, 2025
cdee55d
Merge branch 'develop' into feat/pnpm
bnussman Feb 20, 2025
62df163
Merge branch 'develop' into feat/pnpm
bnussman Feb 22, 2025
8e629ca
update lockfile
bnussman Feb 22, 2025
d07c644
Merge branch 'develop' into feat/pnpm
bnussman Feb 24, 2025
a74412a
Merge branch 'develop' into feat/pnpm
bnussman Feb 24, 2025
d5044c7
update lockfile
bnussman Feb 24, 2025
3a4025e
furture proof package publishing
bnussman Feb 24, 2025
522beef
Merge branch 'develop' into feat/pnpm
bnussman Feb 25, 2025
bcbe382
fix precommit hook
bnussman Feb 25, 2025
98630c2
fix ui package missing luxon dependency
bnussman Feb 25, 2025
b7fd947
add missing @mui/x-date-pickers dependency
bnussman Feb 25, 2025
caacf9e
Merge branch 'develop' into feat/pnpm
bnussman Feb 26, 2025
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
218 changes: 102 additions & 116 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: false
version: 10
- uses: actions/setup-node@v4
with:
node-version: "20.17"
- uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn --frozen-lockfile
- run: yarn workspace ${{ matrix.package }} run lint
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm run --filter ${{ matrix.package }} lint

build-validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: false
version: 10
- uses: actions/setup-node@v4
with:
node-version: "20.17"
- uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn --frozen-lockfile
- run: yarn workspace @linode/validation run build
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm run --filter @linode/validation build
- uses: actions/upload-artifact@v4
with:
name: packages-validation-lib
Expand All @@ -52,22 +52,24 @@ jobs:
needs: build-validation
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: false
version: 10
- uses: actions/download-artifact@v4
with:
name: packages-validation-lib
path: packages/validation/lib
- uses: JS-DevTools/npm-publish@v1
id: npm-publish
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}
package: ./packages/validation/package.json
- run: pnpm publish --access public --no-git-checks
working-directory: packages/validation
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: slack-notify
uses: rtCamp/action-slack-notify@master
if: steps.npm-publish.outputs.type != 'none'
env:
SLACK_CHANNEL: api-js-client
SLACK_TITLE: "Linode Validation v${{ steps.npm-publish.outputs.version}}"
SLACK_MESSAGE: ":rocket: Linode Validation Library has been published to NPM: ${{ steps.npm-publish.outputs.old-version }} => ${{ steps.npm-publish.outputs.version }}. View the changelog at https://github.com/linode/manager/blob/master/packages/validation/CHANGELOG.md"
SLACK_TITLE: "Linode Validation has been published"
SLACK_MESSAGE: ":rocket: Linode Validation Library has been published to NPM. View the changelog at https://github.com/linode/manager/blob/master/packages/validation/CHANGELOG.md"
SLACK_USERNAME: npm-bot
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_ICON_EMOJI: ":package:"
Expand All @@ -78,40 +80,40 @@ jobs:
needs: build-validation
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: false
version: 10
- uses: actions/setup-node@v4
with:
node-version: "20.17"
- uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn --frozen-lockfile
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- uses: actions/download-artifact@v4
with:
name: packages-validation-lib
path: packages/validation/lib
- run: yarn workspace @linode/api-v4 run test
- run: pnpm run --filter @linode/api-v4 test

build-sdk:
runs-on: ubuntu-latest
needs: build-validation
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: false
version: 10
- uses: actions/setup-node@v4
with:
node-version: "20.17"
- uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
cache: "pnpm"
- uses: actions/download-artifact@v4
with:
name: packages-validation-lib
path: packages/validation/lib
- run: yarn --frozen-lockfile
- run: yarn workspace @linode/api-v4 run build
- run: pnpm install --frozen-lockfile
- run: pnpm run --filter @linode/api-v4 build
- uses: actions/upload-artifact@v4
with:
name: packages-api-v4-lib
Expand All @@ -122,9 +124,15 @@ jobs:
needs: build-sdk
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: false
version: 10
- uses: actions/setup-node@v4
with:
node-version: "20.17"
cache: "pnpm"
- run: pnpm install --frozen-lockfile

# Download the validation and api-v4 artifacts (built packages)
- uses: actions/download-artifact@v4
Expand All @@ -137,10 +145,10 @@ jobs:
path: packages/api-v4/lib

# Create an api-v4 tarball
- run: cd packages/api-v4 && npm pack --pack-destination ../../
- run: cd packages/api-v4 && pnpm pack --pack-destination ../../

# Create an validation tarball
- run: cd packages/validation && npm pack --pack-destination ../../
- run: cd packages/validation && pnpm pack --pack-destination ../../

# Test @linode/api-v4 as an ES Module
- run: mkdir test-sdk-esm && cd test-sdk-esm && npm init es6 -y && npm install ../$(ls ../ | grep "linode-api-v4-.*\.tgz") ../$(ls ../ | grep "linode-validation-.*\.tgz")
Expand All @@ -157,14 +165,14 @@ jobs:
needs: build-sdk
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: false
version: 10
- uses: actions/setup-node@v4
with:
node-version: "20.17"
- uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
cache: "pnpm"
- uses: actions/download-artifact@v4
with:
name: packages-validation-lib
Expand All @@ -173,93 +181,68 @@ jobs:
with:
name: packages-api-v4-lib
path: packages/api-v4/lib
- run: yarn --frozen-lockfile
- run: yarn workspace linode-manager run test
- run: pnpm install --frozen-lockfile
- run: pnpm run --filter linode-manager test

test-search:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: false
version: 10
- uses: actions/setup-node@v4
with:
node-version: "20.17"
- uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn --frozen-lockfile
- run: yarn workspace @linode/search run test
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm run --filter @linode/search test

test-ui:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: false
version: 10
- uses: actions/setup-node@v4
with:
node-version: "20.17"
- uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn --frozen-lockfile
- run: yarn workspace @linode/ui run test
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm run --filter @linode/ui test

typecheck-ui:
runs-on: ubuntu-latest
needs: build-sdk
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: false
version: 10
- uses: actions/setup-node@v4
with:
node-version: "20.17"
- uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn --frozen-lockfile
- run: yarn workspace @linode/ui run typecheck
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm run --filter @linode/ui typecheck

typecheck-manager:
runs-on: ubuntu-latest
needs: build-sdk
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.17"
- uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- uses: actions/download-artifact@v4
with:
name: packages-validation-lib
path: packages/validation/lib
- uses: actions/download-artifact@v4
- uses: pnpm/action-setup@v4
with:
name: packages-api-v4-lib
path: packages/api-v4/lib
- run: yarn --frozen-lockfile
- run: yarn workspace linode-manager run typecheck

build-manager:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
needs: build-sdk
steps:
- uses: actions/checkout@v4
run_install: false
version: 10
- uses: actions/setup-node@v4
with:
node-version: "20.17"
- uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
cache: "pnpm"
- uses: actions/download-artifact@v4
with:
name: packages-validation-lib
Expand All @@ -268,12 +251,8 @@ jobs:
with:
name: packages-api-v4-lib
path: packages/api-v4/lib
- run: yarn --frozen-lockfile
- run: yarn workspace linode-manager run build
- uses: actions/upload-artifact@v4
with:
name: packages-manager-build
path: packages/manager/build
- run: pnpm install --frozen-lockfile
- run: pnpm run --filter linode-manager typecheck

publish-sdk:
runs-on: ubuntu-latest
Expand All @@ -285,22 +264,29 @@ jobs:
- publish-validation
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: false
version: 10
- uses: actions/setup-node@v4
with:
node-version: "20.17"
cache: "pnpm"
- uses: actions/download-artifact@v4
with:
name: packages-api-v4-lib
path: packages/api-v4/lib
- uses: JS-DevTools/npm-publish@v1
id: npm-publish
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}
package: ./packages/api-v4/package.json
- run: pnpm install --frozen-lockfile
- run: pnpm publish --access public --no-git-checks
working-directory: packages/api-v4
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: slack-notify
uses: rtCamp/action-slack-notify@master
if: steps.npm-publish.outputs.type != 'none'
env:
SLACK_CHANNEL: api-js-client
SLACK_TITLE: "Linode JS Client v${{ steps.npm-publish.outputs.version}}"
SLACK_MESSAGE: ":rocket: Linode JS Client has been published to NPM: ${{ steps.npm-publish.outputs.old-version }} => ${{ steps.npm-publish.outputs.version }}. View the changelog at https://github.com/linode/manager/blob/master/packages/api-v4/CHANGELOG.md"
SLACK_TITLE: "Linode API-v4 Client has been published"
SLACK_MESSAGE: ":rocket: Linode API-v4 Client has been published to NPM. View the changelog at https://github.com/linode/manager/blob/master/packages/api-v4/CHANGELOG.md"
SLACK_USERNAME: npm-bot
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_ICON_EMOJI: ":package:"
Expand All @@ -313,14 +299,14 @@ jobs:
NODE_OPTIONS: --max-old-space-size=4096
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: false
version: 10
- uses: actions/setup-node@v4
with:
node-version: "20.17"
- uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
cache: "pnpm"
- uses: actions/download-artifact@v4
with:
name: packages-validation-lib
Expand All @@ -329,8 +315,8 @@ jobs:
with:
name: packages-api-v4-lib
path: packages/api-v4/lib
- run: yarn --frozen-lockfile
- run: yarn workspace linode-manager run build-storybook
- run: pnpm install --frozen-lockfile
- run: pnpm run --filter linode-manager build-storybook
- uses: actions/upload-artifact@v4
with:
name: storybook-build
Expand Down
Loading