chore: update to pnpm@8.6.11 (#50923)

https://github.com/pnpm/pnpm/releases/tag/v8.0.0
This commit is contained in:
Leah 2023-08-04 21:40:20 +02:00 committed by GitHub
parent 94709ef1b9
commit 542c4fc26a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 5471 additions and 5016 deletions

View file

@ -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 repository="https://github.com/vercel/next-stats-action"
COPY . /next-stats
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 curl -sfLS https://install-node.vercel.app/v18.16.1 | bash -s -- -f
RUN corepack enable
WORKDIR /next-stats
# Install node_modules
RUN npm i -g pnpm@7.24.3 yarn@1.22.19
RUN cd /next-stats && pnpm install --production
COPY package.json ./
RUN pnpm install --production
RUN git config --global user.email 'stats@localhost'
RUN git config --global user.name 'next stats'
# caching optimization
COPY . .
RUN apt update
RUN apt install apache2-utils -y
RUN git config --global user.email 'stats@localhost' && \
git config --global user.name 'next stats'
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View file

@ -17,5 +17,10 @@
},
"devDependencies": {
"typescript": "5.1.6"
}
},
"engines": {
"node": ">=16.8.0",
"pnpm": "8.6.11"
},
"packageManager": "pnpm@8.6.11"
}

View file

@ -8,7 +8,6 @@ on:
env:
NAPI_CLI_VERSION: 2.14.7
TURBO_VERSION: 1.10.9
PNPM_VERSION: 7.24.3
NODE_MAINTENANCE_VERSION: 16
NODE_LTS_VERSION: 18.16.1
@ -29,13 +28,12 @@ jobs:
with:
node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true
- run: corepack enable
- uses: actions/checkout@v3
with:
fetch-depth: 25
- run: npm i -g pnpm@${PNPM_VERSION}
- id: get-store-path
run: echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT
@ -85,12 +83,14 @@ jobs:
strip -x packages/next-swc/native/next-swc.*.node
- host: windows-latest
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
target: 'x86_64-pc-windows-msvc'
- host: windows-latest
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
target: 'i686-pc-windows-msvc'
- host: ubuntu-latest
@ -161,7 +161,8 @@ jobs:
- host: windows-latest
target: 'aarch64-pc-windows-msvc'
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
name: stable - ${{ matrix.settings.target }} - node@16
runs-on: ${{ matrix.settings.host }}
@ -309,13 +310,14 @@ jobs:
with:
node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true
- run: corepack enable
- name: Install Rust
uses: ./.github/actions/setup-rust
with:
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
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
@ -360,6 +362,7 @@ jobs:
with:
node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true
- run: corepack enable
# https://github.com/actions/virtual-environments/issues/1187
- name: tune linux network
@ -383,7 +386,6 @@ jobs:
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 pnpm@${PNPM_VERSION}
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run: ./scripts/publish-native.js
- run: ./scripts/publish-release.js
@ -438,7 +440,7 @@ jobs:
- run: RESET_VC_PROJECT=true node scripts/reset-vercel-project.mjs
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: Upload test trace

View file

@ -9,7 +9,6 @@ on:
env:
NAPI_CLI_VERSION: 2.14.7
TURBO_VERSION: 1.10.9
PNPM_VERSION: 7.24.3
NODE_MAINTENANCE_VERSION: 16
NODE_LTS_VERSION: 18.16.1
TEST_CONCURRENCY: 6

View file

@ -53,7 +53,6 @@ on:
env:
NAPI_CLI_VERSION: 2.14.7
TURBO_VERSION: 1.10.9
PNPM_VERSION: 7.24.3
NODE_MAINTENANCE_VERSION: 16
NODE_LTS_VERSION: 18.16.1
TEST_CONCURRENCY: 6
@ -85,6 +84,7 @@ jobs:
- run: fnm install ${{ inputs.nodeVersion || env.NODE_LTS_VERSION }}
- run: fnm use ${{ inputs.nodeVersion || env.NODE_LTS_VERSION }}
- run: node -v
- run: corepack enable
- run: pwd
- uses: actions/checkout@v3
@ -112,7 +112,7 @@ jobs:
- run: rustc --version
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
- run: git clean -xdf && rm -rf /tmp/next-repo-*; rm -rf /tmp/next-install-* /tmp/yarn-* /tmp/ncc-cache target

View file

@ -7,7 +7,6 @@ name: Generate Pull Request Stats
env:
NAPI_CLI_VERSION: 2.14.7
TURBO_VERSION: 1.10.9
PNPM_VERSION: 7.24.3
NODE_MAINTENANCE_VERSION: 16
NODE_LTS_VERSION: 18.16.1
TEST_CONCURRENCY: 6

View file

@ -13,9 +13,6 @@ on:
name: Test examples
env:
PNPM_VERSION: 7.24.3
jobs:
testExamples:
# Don't execute using cron on forks
@ -42,11 +39,10 @@ jobs:
with:
node-version: 16
check-latest: true
- run: npm i -g pnpm@${PNPM_VERSION}
- run: corepack enable
- run: pnpm install
- 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

View file

@ -26,7 +26,6 @@ name: Trigger Release
env:
NAPI_CLI_VERSION: 2.14.7
TURBO_VERSION: 1.10.9
PNPM_VERSION: 7.24.3
NODE_MAINTENANCE_VERSION: 16
NODE_LTS_VERSION: 18.16.1
@ -47,6 +46,7 @@ jobs:
with:
node-version: 18
check-latest: true
- run: corepack enable
- run: git clone https://github.com/vercel/next.js.git --depth=25 .
@ -56,8 +56,6 @@ jobs:
- name: tune linux network
run: sudo ethtool -K eth0 tx off rx off
- run: npm i -g pnpm@${PNPM_VERSION}
- id: get-store-path
run: echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT

View file

@ -33,7 +33,6 @@ pr:
variables:
PNPM_CACHE_FOLDER: $(Pipeline.Workspace)/.pnpm-store
PNPM_VERSION: 7.24.3
NEXT_TELEMETRY_DISABLED: '1'
node_16_version: ^16.8.0
@ -53,8 +52,9 @@ stages:
node scripts/run-for-change.js --not --type docs --exec echo "##vso[task.setvariable variable=isDocsOnly]No"
displayName: 'Check Docs Only Change'
- script: npm i -g pnpm@$(PNPM_VERSION)
- script: corepack enable
condition: eq(variables['isDocsOnly'], 'No')
displayName: 'Enable Corepack'
- script: pnpm config set store-dir $(PNPM_CACHE_FOLDER)
condition: eq(variables['isDocsOnly'], 'No')
@ -91,8 +91,9 @@ stages:
node scripts/run-for-change.js --not --type docs --exec echo "##vso[task.setvariable variable=isDocsOnly]No"
displayName: 'Check Docs Only Change'
- script: npm i -g pnpm@$(PNPM_VERSION)
- script: corepack enable
condition: eq(variables['isDocsOnly'], 'No')
displayName: 'Enable Corepack'
- script: pnpm config set store-dir $(PNPM_CACHE_FOLDER)
condition: eq(variables['isDocsOnly'], 'No')
@ -121,8 +122,9 @@ stages:
# node scripts/run-for-change.js --not --type docs --exec echo "##vso[task.setvariable variable=isDocsOnly]No"
# displayName: 'Check Docs Only Change'
# - script: npm i -g pnpm@$(PNPM_VERSION)
# - script: corepack enable
# condition: eq(variables['isDocsOnly'], 'No')
# displayName: 'Enable Corepack'
# - script: pnpm config set store-dir $(PNPM_CACHE_FOLDER)
# condition: eq(variables['isDocsOnly'], 'No')
@ -157,8 +159,9 @@ stages:
# node scripts/run-for-change.js --not --type docs --exec echo "##vso[task.setvariable variable=isDocsOnly]No"
# displayName: 'Check Docs Only Change'
# - script: npm i -g pnpm@$(PNPM_VERSION)
# - script: corepack enable
# condition: eq(variables['isDocsOnly'], 'No')
# displayName: 'Enable Corepack'
# - script: pnpm config set store-dir $(PNPM_CACHE_FOLDER)
# condition: eq(variables['isDocsOnly'], 'No')

View file

@ -52,7 +52,7 @@
"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",
"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",
"sync-react": "node ./scripts/sync-react.js",
"update-google-fonts": "node ./scripts/update-google-fonts.js"
@ -242,7 +242,8 @@
"@types/react-dom": "18.2.4"
},
"engines": {
"node": ">=16.8.0"
"node": ">=16.8.0",
"pnpm": "8.6.11"
},
"packageManager": "pnpm@7.24.3"
"packageManager": "pnpm@8.6.11"
}

View file

@ -305,10 +305,6 @@
"webpack-sources3": "npm:webpack-sources@3.2.3",
"ws": "8.2.3"
},
"resolutions": {
"browserslist": "4.20.2",
"caniuse-lite": "1.0.30001406"
},
"engines": {
"node": ">=16.8.0"
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -6,5 +6,10 @@
"next": "latest",
"react": "latest",
"react-dom": "latest"
}
},
"engines": {
"node": ">=16.8.0",
"pnpm": "8.6.11"
},
"packageManager": "pnpm@8.6.11"
}

View file

@ -64,9 +64,9 @@ const renames = [
module.exports = {
commentHeading: 'Stats from current PR',
commentReleaseHeading: 'Stats from current release',
appBuildCommand: 'NEXT_TELEMETRY_DISABLED=1 yarn next build',
appStartCommand: 'NEXT_TELEMETRY_DISABLED=1 yarn next start --port $PORT',
appDevCommand: 'NEXT_TELEMETRY_DISABLED=1 yarn next --port $PORT',
appBuildCommand: 'NEXT_TELEMETRY_DISABLED=1 pnpm next build',
appStartCommand: 'NEXT_TELEMETRY_DISABLED=1 pnpm next start --port $PORT',
appDevCommand: 'NEXT_TELEMETRY_DISABLED=1 pnpm next --port $PORT',
mainRepo: 'vercel/next.js',
mainBranch: 'canary',
autoMergeMain: true,

View file

@ -17,9 +17,9 @@ describe('useDefineForClassFields SWC option', () => {
},
dependencies: {
mobx: '6.3.7',
typescript: '*',
'@types/react': '*',
'@types/node': '*',
typescript: 'latest',
'@types/react': 'latest',
'@types/node': 'latest',
'mobx-react': '7.2.1',
},
})

View file

@ -120,7 +120,11 @@ it('should use Yarn as the package manager on supplying --use-yarn with example'
await execa('yarn', ['--version'])
} catch (_) {
// 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) => {
@ -193,7 +197,11 @@ it('should use pnpm as the package manager on supplying --use-pnpm with example'
await execa('pnpm', ['--version'])
} catch (_) {
// 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) => {
@ -365,7 +373,11 @@ it('should infer yarn as the package manager', async () => {
await execa('yarn', ['--version'])
} catch (_) {
// 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) => {
@ -405,7 +417,11 @@ it('should infer yarn as the package manager with example', async () => {
await execa('yarn', ['--version'])
} catch (_) {
// 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) => {
@ -440,7 +456,11 @@ it('should infer pnpm as the package manager', async () => {
await execa('pnpm', ['--version'])
} catch (_) {
// 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) => {
@ -480,7 +500,11 @@ it('should infer pnpm as the package manager with example', async () => {
await execa('pnpm', ['--version'])
} catch (_) {
// 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) => {

View file

@ -8,10 +8,12 @@ const imagesDir = join(appDir, '.next', 'cache', 'images')
describe('with outdated sharp', () => {
beforeAll(async () => {
await execa('yarn', ['init', '-y'], {
cwd: appDir,
stdio: 'inherit',
})
await fs.writeFile(
join(appDir, 'package.json'),
JSON.stringify({
packageManager: 'yarn@1.22.19',
})
)
await execa('yarn', ['add', 'sharp@0.26.3'], {
cwd: appDir,
stdio: 'inherit',

View file

@ -8,10 +8,12 @@ const imagesDir = join(appDir, '.next', 'cache', 'images')
describe('with latest sharp', () => {
beforeAll(async () => {
await execa('yarn', ['init', '-y'], {
cwd: appDir,
stdio: 'inherit',
})
await fs.writeFile(
join(appDir, 'package.json'),
JSON.stringify({
packageManager: 'yarn@1.22.19',
})
)
await execa('yarn', ['add', 'sharp'], {
cwd: appDir,
stdio: 'inherit',

View file

@ -7,6 +7,27 @@ const { randomBytes } = require('crypto')
const { linkPackages } =
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({
parentSpan = null,
dependencies = null,
@ -132,6 +153,7 @@ async function createNextInstall({
2
)
)
await setPnpmResolutionMode(installDir)
if (installCommand) {
const installString =
@ -183,6 +205,7 @@ async function createNextInstall({
}
module.exports = {
setPnpmResolutionMode,
createNextInstall,
getPkgPaths: linkPackages,
}

View file

@ -5,7 +5,10 @@ import treeKill from 'tree-kill'
import type { NextConfig } from 'next'
import { FileRef } from '../e2e-utils'
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 webdriver from '../next-webdriver'
import { renderViaHTTP, fetchViaHTTP } from 'next-test-utils'
@ -179,6 +182,7 @@ export class NextInstance {
2
)
)
await setPnpmResolutionMode(this.testDir)
} else {
if (
process.env.NEXT_TEST_STARTER &&