Skip to content

Commit

Permalink
Migrate to pnpm (remix-run#8848)
Browse files Browse the repository at this point in the history
  • Loading branch information
markdalgleish authored Mar 6, 2024
1 parent 77b1e55 commit bfb9c72
Show file tree
Hide file tree
Showing 90 changed files with 15,953 additions and 14,367 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"access": "public",
"baseBranch": "dev",
"updateInternalDependencies": "patch",
"ignore": [],
"ignore": ["integration", "integration-*"],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
Expand Down
5 changes: 5 additions & 0 deletions .changeset/heavy-steaks-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/dev": patch
---

Improve `getDependenciesToBundle` resolution in monorepos
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: ⚙️ Deduplicate yarn.lock
name: ⚙️ Deduplicate lock file

on:
push:
branches:
- dev
paths:
- yarn.lock
- pnpm-lock.yaml

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -22,14 +22,17 @@ jobs:
with:
token: ${{ secrets.FORMAT_PAT }}

- name: 📦 Setup pnpm
uses: pnpm/[email protected]

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "yarn"
cache: "pnpm"

- name: ️️⚙️ Deduplicate yarn.lock
run: npx yarn-deduplicate && rm -rf ./node_modules && yarn
- name: ️️⚙️ Deduplicate pnpm-lock.yaml
run: pnpm dedupe && rm -rf ./node_modules && pnpm install

- name: 💪 Commit
run: |
Expand All @@ -41,6 +44,6 @@ jobs:
echo "💿 no deduplication needed"
exit 0
fi
git commit -m "chore: deduplicate yarn.lock"
git commit -m "chore: deduplicate pnpm-lock.yaml"
git push
echo "💿 https://github.com/$GITHUB_REPOSITORY/commit/$(git rev-parse HEAD)"
15 changes: 15 additions & 0 deletions .github/workflows/deployments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: 📦 Setup pnpm
uses: pnpm/[email protected]

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -69,6 +72,9 @@ jobs:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: 📦 Setup pnpm
uses: pnpm/[email protected]

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -104,6 +110,9 @@ jobs:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: 📦 Setup pnpm
uses: pnpm/[email protected]

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -140,6 +149,9 @@ jobs:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: 📦 Setup pnpm
uses: pnpm/[email protected]

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -179,6 +191,9 @@ jobs:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: 📦 Setup pnpm
uses: pnpm/[email protected]

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@ jobs:
with:
token: ${{ secrets.FORMAT_PAT }}

- name: 📦 Setup pnpm
uses: pnpm/[email protected]

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "yarn"
cache: "pnpm"

- name: 📥 Install deps
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: 🔗 Convert Docs links to references
run: node scripts/markdown-references.mjs
Expand All @@ -37,15 +40,15 @@ jobs:
run: sort --ignore-case --output contributors.yml contributors.yml

- name: 👔 Format
run: yarn format
run: pnpm format

- name: 🦕 Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: vx.x.x

- name: 👔 Format Deno files
run: yarn format:deno
run: pnpm format:deno

- name: 💪 Commit
run: |
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ jobs:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: 📦 Setup pnpm
uses: pnpm/[email protected]

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "yarn"
cache: "pnpm"

- name: Disable GitHub Actions Annotations
run: |
Expand All @@ -32,15 +35,15 @@ jobs:
echo "::remove-matcher owner=eslint-stylish::"
- name: 📥 Install deps
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: 🔬 Lint
run: yarn lint
run: pnpm lint

- name: 🦕 Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: vx.x.x

- name: 🔬 Lint deno files
run: yarn lint:deno
run: pnpm lint:deno
11 changes: 7 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,17 @@ jobs:
token: ${{ secrets.NIGHTLY_PAT }}
fetch-depth: 0

- name: 📦 Setup pnpm
uses: pnpm/[email protected]

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "yarn"
cache: "pnpm"

- name: 📥 Install deps
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: 🕵️ Check for changes
id: version
Expand Down Expand Up @@ -74,12 +77,12 @@ jobs:
git config --local user.email "[email protected]"
git config --local user.name "Remix Run Bot"
git checkout -b nightly/${{ steps.version.outputs.NEXT_VERSION }}
yarn run version ${{steps.version.outputs.NEXT_VERSION}} --skip-prompt
pnpm run version ${{steps.version.outputs.NEXT_VERSION}} --skip-prompt
git push origin --tags
- name: 🏗 Build
if: steps.version.outputs.NEXT_VERSION
run: yarn build
run: pnpm build

- name: 🔐 Setup npm auth
if: steps.version.outputs.NEXT_VERSION
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/release-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# - Make whatever changes you need and commit them:
# - `git add . && git commit "experimental changes!"`
# - Update version numbers and create a release tag:
# - `yarn run version:experimental`
# - `pnpm run version:experimental`
# - Push to GitHub:
# - `git push origin --follow-tags`
# - Create a new release for the tag on GitHub to trigger the CI workflow that
Expand Down Expand Up @@ -46,17 +46,20 @@ jobs:
with:
fetch-depth: 0

- name: 📦 Setup pnpm
uses: pnpm/[email protected]

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "yarn"
cache: "pnpm"

- name: 📥 Install deps
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: 🏗 Build
run: yarn build
run: pnpm build

- name: 🔐 Setup npm auth
run: |
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ jobs:
with:
fetch-depth: 0

- name: 📦 Setup pnpm
uses: pnpm/[email protected]

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "yarn"
cache: "pnpm"

- name: 📥 Install deps
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: 🔐 Setup npm auth
run: |
Expand All @@ -52,10 +55,10 @@ jobs:
id: changesets
uses: changesets/action@v1
with:
version: yarn run changeset:version
version: pnpm run changeset:version
commit: "chore: Update version for release"
title: "chore: Update version for release"
publish: yarn run changeset:release
publish: pnpm run changeset:release
createGithubReleases: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -72,6 +75,9 @@ jobs:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: 📦 Setup pnpm
uses: pnpm/[email protected]

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/shared-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ jobs:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: 📦 Setup pnpm
uses: pnpm/[email protected]

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "yarn"
cache: "pnpm"

- name: Disable GitHub Actions Annotations
run: |
Expand All @@ -27,7 +30,7 @@ jobs:
echo "::remove-matcher owner=eslint-stylish::"
- name: 📥 Install deps
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: 🏗 Build
run: yarn build
run: pnpm build
9 changes: 6 additions & 3 deletions .github/workflows/shared-test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,14 @@ jobs:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: 📦 Setup pnpm
uses: pnpm/[email protected]

- name: ⎔ Setup node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: "yarn"
cache: "pnpm"

- name: Disable GitHub Actions Annotations
run: |
Expand All @@ -50,10 +53,10 @@ jobs:
echo "::remove-matcher owner=eslint-stylish::"
- name: 📥 Install deps
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: 📥 Install Playwright
run: npx playwright install --with-deps ${{ matrix.browser }}

- name: 👀 Run Integration Tests ${{ matrix.browser }}
run: "yarn test:integration --project=${{ matrix.browser }}"
run: "pnpm test:integration --project=${{ matrix.browser }}"
11 changes: 7 additions & 4 deletions .github/workflows/shared-test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ jobs:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: 📦 Setup pnpm
uses: pnpm/[email protected]

- name: ⎔ Setup node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: "yarn"
cache: "pnpm"

- name: Disable GitHub Actions Annotations
run: |
Expand All @@ -42,11 +45,11 @@ jobs:
echo "::remove-matcher owner=eslint-stylish::"
- name: 📥 Install deps
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile

# It's faster to use the built `cli.js` in tests if its available and up-to-date
- name: 🏗 Build
run: yarn build
run: pnpm build

- name: 🧪 Run Primary Tests
run: "yarn test:primary"
run: "pnpm test:primary"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ tsconfig.tsbuildinfo
/scripts/deployment-test/apps
/scripts/deployment-test/package-lock.json
/scripts/deployment-test/yarn.lock
/scripts/deployment-test/pnpm-lock.yaml

/.idea/
/playground
/scripts/playground/template.local
/scripts/playground/template/build
/scripts/playground/template/package-lock.json
/scripts/playground/template/yarn.lock
/scripts/playground/template/pnpm-lock.yaml

/NOTES.md
/RELEASENOTES.md
Loading

0 comments on commit bfb9c72

Please sign in to comment.