Skip to content

Commit 809b424

Browse files
authored
Merge pull request #1229 from revisit-studies/npm-install-compat-pr-1779068096
fix: allow npm install without changing yarn-first workflow
2 parents 02541ff + fdf947d commit 809b424

5 files changed

Lines changed: 16051 additions & 1 deletion

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Dependency lockfile drift
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '.github/workflows/dependency-lock-drift.yml'
7+
- '.npmrc'
8+
- 'package.json'
9+
- 'package-lock.json'
10+
- 'scripts/check-lockfile-drift.mjs'
11+
- 'yarn.lock'
12+
push:
13+
branches:
14+
- dev
15+
- main
16+
paths:
17+
- '.github/workflows/dependency-lock-drift.yml'
18+
- '.npmrc'
19+
- 'package.json'
20+
- 'package-lock.json'
21+
- 'scripts/check-lockfile-drift.mjs'
22+
- 'yarn.lock'
23+
24+
jobs:
25+
check:
26+
name: Check npm lock matches Yarn lock
27+
runs-on: ubuntu-latest
28+
timeout-minutes: 10
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- uses: actions/setup-node@v4
33+
with:
34+
node-version: '24'
35+
36+
- name: Use the lockfile generator version
37+
run: npm install --global npm@11.12.1
38+
39+
- name: Check npm lockfile metadata
40+
run: |
41+
cp yarn.lock "$RUNNER_TEMP/yarn.lock"
42+
npm install --package-lock-only --ignore-scripts
43+
cp "$RUNNER_TEMP/yarn.lock" yarn.lock
44+
git diff --exit-code -- package-lock.json
45+
46+
- name: Check for dependency drift
47+
run: node scripts/check-lockfile-drift.mjs
48+
49+
- name: Verify npm install and build
50+
run: |
51+
npm ci
52+
npm run build

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
legacy-peer-deps=true

0 commit comments

Comments
 (0)