Unverified Commit 542c4fc2 authored by Leah's avatar Leah Committed by GitHub

chore: update to `pnpm@8.6.11` (#50923)

https://github.com/pnpm/pnpm/releases/tag/v8.0.0
parent 94709ef1
...@@ -4,24 +4,25 @@ LABEL com.github.actions.name="Next.js PR Stats" ...@@ -4,24 +4,25 @@ LABEL com.github.actions.name="Next.js PR Stats"
LABEL com.github.actions.description="Compares stats of a PR with the main branch" LABEL com.github.actions.description="Compares stats of a PR with the main branch"
LABEL repository="https://github.com/vercel/next-stats-action" LABEL repository="https://github.com/vercel/next-stats-action"
COPY . /next-stats
RUN apt update && apt upgrade -y RUN apt update && apt upgrade -y
RUN apt install unzip wget curl nano htop screen build-essential pkg-config libssl-dev git build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libreadline-dev libffi-dev python3 moreutils jq iproute2 openssh-server sudo whois dnsutils -y RUN apt install unzip wget curl nano htop screen build-essential pkg-config libssl-dev git build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libreadline-dev libffi-dev python3 moreutils jq iproute2 openssh-server sudo whois dnsutils apache2-utils -y
RUN ln $(which python3) /usr/bin/python RUN ln $(which python3) /usr/bin/python
RUN curl -sfLS https://install-node.vercel.app/v18.16.1 | bash -s -- -f RUN curl -sfLS https://install-node.vercel.app/v18.16.1 | bash -s -- -f
RUN corepack enable
WORKDIR /next-stats
# Install node_modules # Install node_modules
RUN npm i -g pnpm@7.24.3 yarn@1.22.19 COPY package.json ./
RUN cd /next-stats && pnpm install --production RUN pnpm install --production
RUN git config --global user.email 'stats@localhost' # caching optimization
RUN git config --global user.name 'next stats' COPY . .
RUN apt update RUN git config --global user.email 'stats@localhost' && \
RUN apt install apache2-utils -y git config --global user.name 'next stats'
COPY entrypoint.sh /entrypoint.sh COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]
...@@ -17,5 +17,10 @@ ...@@ -17,5 +17,10 @@
}, },
"devDependencies": { "devDependencies": {
"typescript": "5.1.6" "typescript": "5.1.6"
} },
"engines": {
"node": ">=16.8.0",
"pnpm": "8.6.11"
},
"packageManager": "pnpm@8.6.11"
} }
...@@ -8,7 +8,6 @@ on: ...@@ -8,7 +8,6 @@ on:
env: env:
NAPI_CLI_VERSION: 2.14.7 NAPI_CLI_VERSION: 2.14.7
TURBO_VERSION: 1.10.9 TURBO_VERSION: 1.10.9
PNPM_VERSION: 7.24.3
NODE_MAINTENANCE_VERSION: 16 NODE_MAINTENANCE_VERSION: 16
NODE_LTS_VERSION: 18.16.1 NODE_LTS_VERSION: 18.16.1
...@@ -29,13 +28,12 @@ jobs: ...@@ -29,13 +28,12 @@ jobs:
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
- run: corepack enable
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
fetch-depth: 25 fetch-depth: 25
- run: npm i -g pnpm@${PNPM_VERSION}
- id: get-store-path - id: get-store-path
run: echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT run: echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT
...@@ -85,12 +83,14 @@ jobs: ...@@ -85,12 +83,14 @@ jobs:
strip -x packages/next-swc/native/next-swc.*.node strip -x packages/next-swc/native/next-swc.*.node
- host: windows-latest - host: windows-latest
build: | build: |
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" "pnpm@${PNPM_VERSION}" corepack enable
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}"
turbo run build-native-release --remote-cache-timeout 90 --summarize -- --target x86_64-pc-windows-msvc turbo run build-native-release --remote-cache-timeout 90 --summarize -- --target x86_64-pc-windows-msvc
target: 'x86_64-pc-windows-msvc' target: 'x86_64-pc-windows-msvc'
- host: windows-latest - host: windows-latest
build: | build: |
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" "pnpm@${PNPM_VERSION}" corepack enable
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}"
turbo run build-native-no-plugin --remote-cache-timeout 90 --summarize -- --release --target i686-pc-windows-msvc turbo run build-native-no-plugin --remote-cache-timeout 90 --summarize -- --release --target i686-pc-windows-msvc
target: 'i686-pc-windows-msvc' target: 'i686-pc-windows-msvc'
- host: ubuntu-latest - host: ubuntu-latest
...@@ -161,7 +161,8 @@ jobs: ...@@ -161,7 +161,8 @@ jobs:
- host: windows-latest - host: windows-latest
target: 'aarch64-pc-windows-msvc' target: 'aarch64-pc-windows-msvc'
build: | build: |
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}" "pnpm@${PNPM_VERSION}" corepack enable
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}"
turbo run build-native-no-plugin-woa-release --remote-cache-timeout 90 --summarize -- --target aarch64-pc-windows-msvc turbo run build-native-no-plugin-woa-release --remote-cache-timeout 90 --summarize -- --target aarch64-pc-windows-msvc
name: stable - ${{ matrix.settings.target }} - node@16 name: stable - ${{ matrix.settings.target }} - node@16
runs-on: ${{ matrix.settings.host }} runs-on: ${{ matrix.settings.host }}
...@@ -309,13 +310,14 @@ jobs: ...@@ -309,13 +310,14 @@ jobs:
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
- run: corepack enable
- name: Install Rust - name: Install Rust
uses: ./.github/actions/setup-rust uses: ./.github/actions/setup-rust
with: with:
targets: wasm32-unknown-unknown targets: wasm32-unknown-unknown
- run: npm i -g turbo@${{ env.TURBO_VERSION }} pnpm@${PNPM_VERSION} - run: npm i -g turbo@${{ env.TURBO_VERSION }}
- name: Install wasm-pack - name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
...@@ -360,6 +362,7 @@ jobs: ...@@ -360,6 +362,7 @@ jobs:
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
- run: corepack enable
# https://github.com/actions/virtual-environments/issues/1187 # https://github.com/actions/virtual-environments/issues/1187
- name: tune linux network - name: tune linux network
...@@ -383,7 +386,6 @@ jobs: ...@@ -383,7 +386,6 @@ jobs:
path: packages/next-swc/crates/wasm path: packages/next-swc/crates/wasm
- run: npm i -g npm@9.6.7 # need latest version for provenance (pinning to avoid bugs) - run: npm i -g npm@9.6.7 # need latest version for provenance (pinning to avoid bugs)
- run: npm i -g pnpm@${PNPM_VERSION}
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc - run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run: ./scripts/publish-native.js - run: ./scripts/publish-native.js
- run: ./scripts/publish-release.js - run: ./scripts/publish-release.js
...@@ -438,7 +440,7 @@ jobs: ...@@ -438,7 +440,7 @@ jobs:
- run: RESET_VC_PROJECT=true node scripts/reset-vercel-project.mjs - run: RESET_VC_PROJECT=true node scripts/reset-vercel-project.mjs
name: Reset test project name: Reset test project
- run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && NODE_VERSION=${{ env.NODE_LTS_VERSION }} ./scripts/setup-node.sh && npm i -g pnpm@${PNPM_VERSION} > /dev/null && DATADOG_TRACE_NEXTJS_TEST=TRUE DATADOG_API_KEY=${DATADOG_API_KEY} DD_ENV=ci VERCEL_TEST_TOKEN=${{ secrets.VERCEL_TEST_TOKEN }} VERCEL_TEST_TEAM=vtest314-next-e2e-tests NEXT_TEST_JOB=1 NEXT_TEST_MODE=deploy TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} NEXT_TEST_CONTINUE_ON_ERROR=1 xvfb-run node run-tests.js --type e2e >> /proc/1/fd/1" - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && NODE_VERSION=${{ env.NODE_LTS_VERSION }} ./scripts/setup-node.sh && corepack enable > /dev/null && DATADOG_TRACE_NEXTJS_TEST=TRUE DATADOG_API_KEY=${DATADOG_API_KEY} DD_ENV=ci VERCEL_TEST_TOKEN=${{ secrets.VERCEL_TEST_TOKEN }} VERCEL_TEST_TEAM=vtest314-next-e2e-tests NEXT_TEST_JOB=1 NEXT_TEST_MODE=deploy TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} NEXT_TEST_CONTINUE_ON_ERROR=1 xvfb-run node run-tests.js --type e2e >> /proc/1/fd/1"
name: Run test/e2e (deploy) name: Run test/e2e (deploy)
- name: Upload test trace - name: Upload test trace
......
...@@ -9,7 +9,6 @@ on: ...@@ -9,7 +9,6 @@ on:
env: env:
NAPI_CLI_VERSION: 2.14.7 NAPI_CLI_VERSION: 2.14.7
TURBO_VERSION: 1.10.9 TURBO_VERSION: 1.10.9
PNPM_VERSION: 7.24.3
NODE_MAINTENANCE_VERSION: 16 NODE_MAINTENANCE_VERSION: 16
NODE_LTS_VERSION: 18.16.1 NODE_LTS_VERSION: 18.16.1
TEST_CONCURRENCY: 6 TEST_CONCURRENCY: 6
......
...@@ -53,7 +53,6 @@ on: ...@@ -53,7 +53,6 @@ on:
env: env:
NAPI_CLI_VERSION: 2.14.7 NAPI_CLI_VERSION: 2.14.7
TURBO_VERSION: 1.10.9 TURBO_VERSION: 1.10.9
PNPM_VERSION: 7.24.3
NODE_MAINTENANCE_VERSION: 16 NODE_MAINTENANCE_VERSION: 16
NODE_LTS_VERSION: 18.16.1 NODE_LTS_VERSION: 18.16.1
TEST_CONCURRENCY: 6 TEST_CONCURRENCY: 6
...@@ -85,6 +84,7 @@ jobs: ...@@ -85,6 +84,7 @@ jobs:
- run: fnm install ${{ inputs.nodeVersion || env.NODE_LTS_VERSION }} - run: fnm install ${{ inputs.nodeVersion || env.NODE_LTS_VERSION }}
- run: fnm use ${{ inputs.nodeVersion || env.NODE_LTS_VERSION }} - run: fnm use ${{ inputs.nodeVersion || env.NODE_LTS_VERSION }}
- run: node -v - run: node -v
- run: corepack enable
- run: pwd - run: pwd
- uses: actions/checkout@v3 - uses: actions/checkout@v3
...@@ -112,7 +112,7 @@ jobs: ...@@ -112,7 +112,7 @@ jobs:
- run: rustc --version - run: rustc --version
if: ${{ inputs.skipNativeBuild != 'yes' || inputs.needsNextest == 'yes' || inputs.needsRust == 'yes' }} if: ${{ inputs.skipNativeBuild != 'yes' || inputs.needsNextest == 'yes' || inputs.needsRust == 'yes' }}
- run: npm i -g yarn "pnpm@${PNPM_VERSION}" "turbo@${TURBO_VERSION}" "@napi-rs/cli@${NAPI_CLI_VERSION}" - run: corepack prepare --activate yarn@1.22.19 && npm i -g "turbo@${TURBO_VERSION}" "@napi-rs/cli@${NAPI_CLI_VERSION}"
# clean up any previous artifacts to avoid hitting disk space limits # clean up any previous artifacts to avoid hitting disk space limits
- run: git clean -xdf && rm -rf /tmp/next-repo-*; rm -rf /tmp/next-install-* /tmp/yarn-* /tmp/ncc-cache target - run: git clean -xdf && rm -rf /tmp/next-repo-*; rm -rf /tmp/next-install-* /tmp/yarn-* /tmp/ncc-cache target
......
...@@ -7,7 +7,6 @@ name: Generate Pull Request Stats ...@@ -7,7 +7,6 @@ name: Generate Pull Request Stats
env: env:
NAPI_CLI_VERSION: 2.14.7 NAPI_CLI_VERSION: 2.14.7
TURBO_VERSION: 1.10.9 TURBO_VERSION: 1.10.9
PNPM_VERSION: 7.24.3
NODE_MAINTENANCE_VERSION: 16 NODE_MAINTENANCE_VERSION: 16
NODE_LTS_VERSION: 18.16.1 NODE_LTS_VERSION: 18.16.1
TEST_CONCURRENCY: 6 TEST_CONCURRENCY: 6
......
...@@ -13,9 +13,6 @@ on: ...@@ -13,9 +13,6 @@ on:
name: Test examples name: Test examples
env:
PNPM_VERSION: 7.24.3
jobs: jobs:
testExamples: testExamples:
# Don't execute using cron on forks # Don't execute using cron on forks
...@@ -42,11 +39,10 @@ jobs: ...@@ -42,11 +39,10 @@ jobs:
with: with:
node-version: 16 node-version: 16
check-latest: true check-latest: true
- run: corepack enable
- run: npm i -g pnpm@${PNPM_VERSION}
- run: pnpm install - run: pnpm install
- run: pnpm build - run: pnpm build
- run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ matrix.node }} | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_MODE=start xvfb-run node run-tests.js --type examples >> /proc/1/fd/1" - run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && curl -s https://install-node.vercel.app/v${{ matrix.node }} | FORCE=1 bash && node -v && corepack enable > /dev/null && NEXT_TEST_JOB=1 NEXT_TEST_MODE=start xvfb-run node run-tests.js --type examples >> /proc/1/fd/1"
name: Run test/examples name: Run test/examples
...@@ -26,7 +26,6 @@ name: Trigger Release ...@@ -26,7 +26,6 @@ name: Trigger Release
env: env:
NAPI_CLI_VERSION: 2.14.7 NAPI_CLI_VERSION: 2.14.7
TURBO_VERSION: 1.10.9 TURBO_VERSION: 1.10.9
PNPM_VERSION: 7.24.3
NODE_MAINTENANCE_VERSION: 16 NODE_MAINTENANCE_VERSION: 16
NODE_LTS_VERSION: 18.16.1 NODE_LTS_VERSION: 18.16.1
...@@ -47,6 +46,7 @@ jobs: ...@@ -47,6 +46,7 @@ jobs:
with: with:
node-version: 18 node-version: 18
check-latest: true check-latest: true
- run: corepack enable
- run: git clone https://github.com/vercel/next.js.git --depth=25 . - run: git clone https://github.com/vercel/next.js.git --depth=25 .
...@@ -56,8 +56,6 @@ jobs: ...@@ -56,8 +56,6 @@ jobs:
- name: tune linux network - name: tune linux network
run: sudo ethtool -K eth0 tx off rx off run: sudo ethtool -K eth0 tx off rx off
- run: npm i -g pnpm@${PNPM_VERSION}
- id: get-store-path - id: get-store-path
run: echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT run: echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT
......
...@@ -33,7 +33,6 @@ pr: ...@@ -33,7 +33,6 @@ pr:
variables: variables:
PNPM_CACHE_FOLDER: $(Pipeline.Workspace)/.pnpm-store PNPM_CACHE_FOLDER: $(Pipeline.Workspace)/.pnpm-store
PNPM_VERSION: 7.24.3
NEXT_TELEMETRY_DISABLED: '1' NEXT_TELEMETRY_DISABLED: '1'
node_16_version: ^16.8.0 node_16_version: ^16.8.0
...@@ -53,8 +52,9 @@ stages: ...@@ -53,8 +52,9 @@ stages:
node scripts/run-for-change.js --not --type docs --exec echo "##vso[task.setvariable variable=isDocsOnly]No" node scripts/run-for-change.js --not --type docs --exec echo "##vso[task.setvariable variable=isDocsOnly]No"
displayName: 'Check Docs Only Change' displayName: 'Check Docs Only Change'
- script: npm i -g pnpm@$(PNPM_VERSION) - script: corepack enable
condition: eq(variables['isDocsOnly'], 'No') condition: eq(variables['isDocsOnly'], 'No')
displayName: 'Enable Corepack'
- script: pnpm config set store-dir $(PNPM_CACHE_FOLDER) - script: pnpm config set store-dir $(PNPM_CACHE_FOLDER)
condition: eq(variables['isDocsOnly'], 'No') condition: eq(variables['isDocsOnly'], 'No')
...@@ -91,8 +91,9 @@ stages: ...@@ -91,8 +91,9 @@ stages:
node scripts/run-for-change.js --not --type docs --exec echo "##vso[task.setvariable variable=isDocsOnly]No" node scripts/run-for-change.js --not --type docs --exec echo "##vso[task.setvariable variable=isDocsOnly]No"
displayName: 'Check Docs Only Change' displayName: 'Check Docs Only Change'
- script: npm i -g pnpm@$(PNPM_VERSION) - script: corepack enable
condition: eq(variables['isDocsOnly'], 'No') condition: eq(variables['isDocsOnly'], 'No')
displayName: 'Enable Corepack'
- script: pnpm config set store-dir $(PNPM_CACHE_FOLDER) - script: pnpm config set store-dir $(PNPM_CACHE_FOLDER)
condition: eq(variables['isDocsOnly'], 'No') condition: eq(variables['isDocsOnly'], 'No')
...@@ -121,8 +122,9 @@ stages: ...@@ -121,8 +122,9 @@ stages:
# node scripts/run-for-change.js --not --type docs --exec echo "##vso[task.setvariable variable=isDocsOnly]No" # node scripts/run-for-change.js --not --type docs --exec echo "##vso[task.setvariable variable=isDocsOnly]No"
# displayName: 'Check Docs Only Change' # displayName: 'Check Docs Only Change'
# - script: npm i -g pnpm@$(PNPM_VERSION) # - script: corepack enable
# condition: eq(variables['isDocsOnly'], 'No') # condition: eq(variables['isDocsOnly'], 'No')
# displayName: 'Enable Corepack'
# - script: pnpm config set store-dir $(PNPM_CACHE_FOLDER) # - script: pnpm config set store-dir $(PNPM_CACHE_FOLDER)
# condition: eq(variables['isDocsOnly'], 'No') # condition: eq(variables['isDocsOnly'], 'No')
...@@ -157,8 +159,9 @@ stages: ...@@ -157,8 +159,9 @@ stages:
# node scripts/run-for-change.js --not --type docs --exec echo "##vso[task.setvariable variable=isDocsOnly]No" # node scripts/run-for-change.js --not --type docs --exec echo "##vso[task.setvariable variable=isDocsOnly]No"
# displayName: 'Check Docs Only Change' # displayName: 'Check Docs Only Change'
# - script: npm i -g pnpm@$(PNPM_VERSION) # - script: corepack enable
# condition: eq(variables['isDocsOnly'], 'No') # condition: eq(variables['isDocsOnly'], 'No')
# displayName: 'Enable Corepack'
# - script: pnpm config set store-dir $(PNPM_CACHE_FOLDER) # - script: pnpm config set store-dir $(PNPM_CACHE_FOLDER)
# condition: eq(variables['isDocsOnly'], 'No') # condition: eq(variables['isDocsOnly'], 'No')
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
"clean-trace-jaeger": "node scripts/rm.mjs test/integration/basic/.next && TRACE_TARGET=JAEGER pnpm next build test/integration/basic", "clean-trace-jaeger": "node scripts/rm.mjs test/integration/basic/.next && TRACE_TARGET=JAEGER pnpm next build test/integration/basic",
"debug": "cross-env NEXT_TELEMETRY_DISABLED=1 node --inspect packages/next/dist/bin/next", "debug": "cross-env NEXT_TELEMETRY_DISABLED=1 node --inspect packages/next/dist/bin/next",
"postinstall": "git config index.skipHash false && node scripts/install-native.mjs", "postinstall": "git config index.skipHash false && node scripts/install-native.mjs",
"version": "npx pnpm@7.24.3 install --no-frozen-lockfile && IS_PUBLISH=yes ./scripts/check-pre-compiled.sh && git add .", "version": "pnpm install --no-frozen-lockfile && IS_PUBLISH=yes ./scripts/check-pre-compiled.sh && git add .",
"prepare": "husky install", "prepare": "husky install",
"sync-react": "node ./scripts/sync-react.js", "sync-react": "node ./scripts/sync-react.js",
"update-google-fonts": "node ./scripts/update-google-fonts.js" "update-google-fonts": "node ./scripts/update-google-fonts.js"
...@@ -242,7 +242,8 @@ ...@@ -242,7 +242,8 @@
"@types/react-dom": "18.2.4" "@types/react-dom": "18.2.4"
}, },
"engines": { "engines": {
"node": ">=16.8.0" "node": ">=16.8.0",
"pnpm": "8.6.11"
}, },
"packageManager": "pnpm@7.24.3" "packageManager": "pnpm@8.6.11"
} }
...@@ -305,10 +305,6 @@ ...@@ -305,10 +305,6 @@
"webpack-sources3": "npm:webpack-sources@3.2.3", "webpack-sources3": "npm:webpack-sources@3.2.3",
"ws": "8.2.3" "ws": "8.2.3"
}, },
"resolutions": {
"browserslist": "4.20.2",
"caniuse-lite": "1.0.30001406"
},
"engines": { "engines": {
"node": ">=16.8.0" "node": ">=16.8.0"
} }
......
This diff is collapsed.
...@@ -6,5 +6,10 @@ ...@@ -6,5 +6,10 @@
"next": "latest", "next": "latest",
"react": "latest", "react": "latest",
"react-dom": "latest" "react-dom": "latest"
} },
"engines": {
"node": ">=16.8.0",
"pnpm": "8.6.11"
},
"packageManager": "pnpm@8.6.11"
} }
...@@ -64,9 +64,9 @@ const renames = [ ...@@ -64,9 +64,9 @@ const renames = [
module.exports = { module.exports = {
commentHeading: 'Stats from current PR', commentHeading: 'Stats from current PR',
commentReleaseHeading: 'Stats from current release', commentReleaseHeading: 'Stats from current release',
appBuildCommand: 'NEXT_TELEMETRY_DISABLED=1 yarn next build', appBuildCommand: 'NEXT_TELEMETRY_DISABLED=1 pnpm next build',
appStartCommand: 'NEXT_TELEMETRY_DISABLED=1 yarn next start --port $PORT', appStartCommand: 'NEXT_TELEMETRY_DISABLED=1 pnpm next start --port $PORT',
appDevCommand: 'NEXT_TELEMETRY_DISABLED=1 yarn next --port $PORT', appDevCommand: 'NEXT_TELEMETRY_DISABLED=1 pnpm next --port $PORT',
mainRepo: 'vercel/next.js', mainRepo: 'vercel/next.js',
mainBranch: 'canary', mainBranch: 'canary',
autoMergeMain: true, autoMergeMain: true,
......
...@@ -17,9 +17,9 @@ describe('useDefineForClassFields SWC option', () => { ...@@ -17,9 +17,9 @@ describe('useDefineForClassFields SWC option', () => {
}, },
dependencies: { dependencies: {
mobx: '6.3.7', mobx: '6.3.7',
typescript: '*', typescript: 'latest',
'@types/react': '*', '@types/react': 'latest',
'@types/node': '*', '@types/node': 'latest',
'mobx-react': '7.2.1', 'mobx-react': '7.2.1',
}, },
}) })
......
...@@ -120,7 +120,11 @@ it('should use Yarn as the package manager on supplying --use-yarn with example' ...@@ -120,7 +120,11 @@ it('should use Yarn as the package manager on supplying --use-yarn with example'
await execa('yarn', ['--version']) await execa('yarn', ['--version'])
} catch (_) { } catch (_) {
// install yarn if not available // install yarn if not available
await execa('npm', ['i', '-g', 'yarn']) try {
await execa('corepack', ['prepare', '--activate', 'yarn@1.22.19'])
} catch (_) {
await execa('npm', ['i', '-g', 'yarn'])
}
} }
await useTempDir(async (cwd) => { await useTempDir(async (cwd) => {
...@@ -193,7 +197,11 @@ it('should use pnpm as the package manager on supplying --use-pnpm with example' ...@@ -193,7 +197,11 @@ it('should use pnpm as the package manager on supplying --use-pnpm with example'
await execa('pnpm', ['--version']) await execa('pnpm', ['--version'])
} catch (_) { } catch (_) {
// install pnpm if not available // install pnpm if not available
await execa('npm', ['i', '-g', 'pnpm']) try {
await execa('corepack', ['prepare', '--activate', 'pnpm@latest'])
} catch (_) {
await execa('npm', ['i', '-g', 'pnpm'])
}
} }
await useTempDir(async (cwd) => { await useTempDir(async (cwd) => {
...@@ -365,7 +373,11 @@ it('should infer yarn as the package manager', async () => { ...@@ -365,7 +373,11 @@ it('should infer yarn as the package manager', async () => {
await execa('yarn', ['--version']) await execa('yarn', ['--version'])
} catch (_) { } catch (_) {
// install yarn if not available // install yarn if not available
await execa('npm', ['i', '-g', 'yarn']) try {
await execa('corepack', ['prepare', '--activate', 'yarn@1.22.19'])
} catch (_) {
await execa('npm', ['i', '-g', 'yarn'])
}
} }
await useTempDir(async (cwd) => { await useTempDir(async (cwd) => {
...@@ -405,7 +417,11 @@ it('should infer yarn as the package manager with example', async () => { ...@@ -405,7 +417,11 @@ it('should infer yarn as the package manager with example', async () => {
await execa('yarn', ['--version']) await execa('yarn', ['--version'])
} catch (_) { } catch (_) {
// install yarn if not available // install yarn if not available
await execa('npm', ['i', '-g', 'yarn']) try {
await execa('corepack', ['prepare', '--activate', 'yarn@1.22.19'])
} catch (_) {
await execa('npm', ['i', '-g', 'yarn'])
}
} }
await useTempDir(async (cwd) => { await useTempDir(async (cwd) => {
...@@ -440,7 +456,11 @@ it('should infer pnpm as the package manager', async () => { ...@@ -440,7 +456,11 @@ it('should infer pnpm as the package manager', async () => {
await execa('pnpm', ['--version']) await execa('pnpm', ['--version'])
} catch (_) { } catch (_) {
// install pnpm if not available // install pnpm if not available
await execa('npm', ['i', '-g', 'pnpm']) try {
await execa('corepack', ['prepare', '--activate', 'pnpm@latest'])
} catch (_) {
await execa('npm', ['i', '-g', 'pnpm'])
}
} }
await useTempDir(async (cwd) => { await useTempDir(async (cwd) => {
...@@ -480,7 +500,11 @@ it('should infer pnpm as the package manager with example', async () => { ...@@ -480,7 +500,11 @@ it('should infer pnpm as the package manager with example', async () => {
await execa('pnpm', ['--version']) await execa('pnpm', ['--version'])
} catch (_) { } catch (_) {
// install pnpm if not available // install pnpm if not available
await execa('npm', ['i', '-g', 'pnpm']) try {
await execa('corepack', ['prepare', '--activate', 'pnpm@latest'])
} catch (_) {
await execa('npm', ['i', '-g', 'pnpm'])
}
} }
await useTempDir(async (cwd) => { await useTempDir(async (cwd) => {
......
...@@ -8,10 +8,12 @@ const imagesDir = join(appDir, '.next', 'cache', 'images') ...@@ -8,10 +8,12 @@ const imagesDir = join(appDir, '.next', 'cache', 'images')
describe('with outdated sharp', () => { describe('with outdated sharp', () => {
beforeAll(async () => { beforeAll(async () => {
await execa('yarn', ['init', '-y'], { await fs.writeFile(
cwd: appDir, join(appDir, 'package.json'),
stdio: 'inherit', JSON.stringify({
}) packageManager: 'yarn@1.22.19',
})
)
await execa('yarn', ['add', 'sharp@0.26.3'], { await execa('yarn', ['add', 'sharp@0.26.3'], {
cwd: appDir, cwd: appDir,
stdio: 'inherit', stdio: 'inherit',
......
...@@ -8,10 +8,12 @@ const imagesDir = join(appDir, '.next', 'cache', 'images') ...@@ -8,10 +8,12 @@ const imagesDir = join(appDir, '.next', 'cache', 'images')
describe('with latest sharp', () => { describe('with latest sharp', () => {
beforeAll(async () => { beforeAll(async () => {
await execa('yarn', ['init', '-y'], { await fs.writeFile(
cwd: appDir, join(appDir, 'package.json'),
stdio: 'inherit', JSON.stringify({
}) packageManager: 'yarn@1.22.19',
})
)
await execa('yarn', ['add', 'sharp'], { await execa('yarn', ['add', 'sharp'], {
cwd: appDir, cwd: appDir,
stdio: 'inherit', stdio: 'inherit',
......
...@@ -7,6 +7,27 @@ const { randomBytes } = require('crypto') ...@@ -7,6 +7,27 @@ const { randomBytes } = require('crypto')
const { linkPackages } = const { linkPackages } =
require('../../.github/actions/next-stats-action/src/prepare/repo-setup')() require('../../.github/actions/next-stats-action/src/prepare/repo-setup')()
/**
* Sets the `resolution-mode` for pnpm in the specified directory.
*
* See [pnpm/.npmrc#resolution-mode]{@link https://pnpm.io/npmrc#resolution-mode} and
* [GitHub Issue]{@link https://github.com/pnpm/pnpm/issues/6463}
*
* @param {string} cwd - The project directory where pnpm configuration is set.
* @returns {Promise<void>}
*/
async function setPnpmResolutionMode(cwd) {
await execa(
'pnpm',
['config', 'set', '--location=project', 'resolution-mode', 'highest'],
{
cwd: cwd,
stdio: ['ignore', 'inherit', 'inherit'],
env: process.env,
}
)
}
async function createNextInstall({ async function createNextInstall({
parentSpan = null, parentSpan = null,
dependencies = null, dependencies = null,
...@@ -132,6 +153,7 @@ async function createNextInstall({ ...@@ -132,6 +153,7 @@ async function createNextInstall({
2 2
) )
) )
await setPnpmResolutionMode(installDir)
if (installCommand) { if (installCommand) {
const installString = const installString =
...@@ -183,6 +205,7 @@ async function createNextInstall({ ...@@ -183,6 +205,7 @@ async function createNextInstall({
} }
module.exports = { module.exports = {
setPnpmResolutionMode,
createNextInstall, createNextInstall,
getPkgPaths: linkPackages, getPkgPaths: linkPackages,
} }
...@@ -5,7 +5,10 @@ import treeKill from 'tree-kill' ...@@ -5,7 +5,10 @@ import treeKill from 'tree-kill'
import type { NextConfig } from 'next' import type { NextConfig } from 'next'
import { FileRef } from '../e2e-utils' import { FileRef } from '../e2e-utils'
import { ChildProcess } from 'child_process' import { ChildProcess } from 'child_process'
import { createNextInstall } from '../create-next-install' import {
createNextInstall,
setPnpmResolutionMode,
} from '../create-next-install'
import { Span } from 'next/src/trace' import { Span } from 'next/src/trace'
import webdriver from '../next-webdriver' import webdriver from '../next-webdriver'
import { renderViaHTTP, fetchViaHTTP } from 'next-test-utils' import { renderViaHTTP, fetchViaHTTP } from 'next-test-utils'
...@@ -179,6 +182,7 @@ export class NextInstance { ...@@ -179,6 +182,7 @@ export class NextInstance {
2 2
) )
) )
await setPnpmResolutionMode(this.testDir)
} else { } else {
if ( if (
process.env.NEXT_TEST_STARTER && process.env.NEXT_TEST_STARTER &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment