Skip to content

Commit 7911d8d

Browse files
committed
fix(syncpack): updated code to be compatible with version 14
1 parent d474f15 commit 7911d8d

File tree

6 files changed

+34
-40
lines changed

6 files changed

+34
-40
lines changed

.github/workflows/sync-deps.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040

4141
- name: Sync dependencies
4242
run: |
43-
pnpm syncpack fix-mismatches --source "**/package.json"
43+
pnpm syncpack fix
4444
4545
- name: Commit changes if needed
4646
run: |
@@ -57,9 +57,9 @@ jobs:
5757
fi
5858
5959
- name: Comment on PR
60-
if: steps.commit-changes.outputs.changes_pushed == 'true' # Only run if changes were pushed
60+
if: steps.commit-changes.outputs.changes_pushed == 'true' # Only run if changes were pushed
6161
run: |
6262
gh pr comment ${{ github.event.pull_request.number }} --body "I've synchronized dependencies across the workspace to ensure consistency."
6363
env:
6464
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.syncpackrc

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
{
2-
"dependencyTypes": [
3-
"dev",
4-
"prod",
5-
"resolutions",
6-
"overrides",
7-
"pnpmOverrides"
8-
],
9-
"filter": ".",
2+
"$schema": "./node_modules/syncpack/schema.json",
103
"indent": " ",
114
"semverGroups": [],
12-
"semverRange": "",
135
"sortAz": [
146
"contributors",
157
"private",
@@ -43,7 +35,19 @@
4335
],
4436
"source": [
4537
"package.json",
46-
"pkgs/*/package.json"
38+
"*/*/package.json"
4739
],
48-
"versionGroups": []
40+
"versionGroups": [
41+
{
42+
"label": "Accept everything except peerDependencies",
43+
"dependencyTypes": [
44+
"!dev",
45+
"!prod",
46+
"!resolutions",
47+
"!overrides",
48+
"!pnpmOverrides"
49+
],
50+
"isIgnored": true
51+
}
52+
]
4953
}

crates/stylex-rs-compiler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
}
4343
},
4444
"devDependencies": {
45-
"@napi-rs/cli": "^3.5.1",
45+
"@napi-rs/cli": "^3.4.1",
4646
"@stylexjs/open-props": "^0.11.1",
4747
"@stylexjs/stylex": "^0.17.5",
4848
"@stylexswc/shared": "0.14.2",

packages/nextjs-plugin/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@
55
"private": false,
66
"license": "MIT",
77
"sideEffects": false,
8-
"files": [
9-
"dist"
10-
],
11-
"publishConfig": {
12-
"registry": "https://registry.npmjs.org/",
13-
"access": "public"
14-
},
158
"exports": {
169
"./turbopack": {
10+
"types": "./dist/turbopack.d.ts",
1711
"import": "./dist/turbopack.js",
18-
"require": "./dist/turbopack.js",
19-
"types": "./dist/turbopack.d.ts"
12+
"require": "./dist/turbopack.js"
2013
},
2114
".": {
15+
"types": "./dist/index.d.ts",
2216
"import": "./dist/index.js",
23-
"require": "./dist/index.js",
24-
"types": "./dist/index.d.ts"
17+
"require": "./dist/index.js"
2518
},
2619
"./package.json": "./package.json"
2720
},
21+
"files": [
22+
"dist"
23+
],
24+
"publishConfig": {
25+
"registry": "https://registry.npmjs.org/",
26+
"access": "public"
27+
},
2828
"scripts": {
2929
"build": "scripty --ts",
3030
"check:artifacts": "scripty",

pnpm-lock.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/git/version-mismatch-check.sh

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,11 @@
22

33
echo "Checking dependency versions across workspace..."
44

5-
raw_output=$(FORCE_COLOR=true pnpm exec syncpack list-mismatches --source "**/package.json")
6-
7-
last_line=$(echo "$raw_output" | tail -n 1)
8-
has_no_mismatches=0
9-
10-
if [[ "$last_line" == *"already valid"* ]]; then
11-
has_no_mismatches=1
12-
fi
13-
14-
if [[ $has_no_mismatches -eq 1 ]]; then
5+
if pnpm exec syncpack lint; then
156
echo "All dependencies are in sync across the workspace."
167
exit 0
178
fi
189

19-
echo "$raw_output"
20-
echo "Please run 'pnpm syncpack fix-mismatches --source \"**/package.json\"' to fix the mismatches or fix them manually."
21-
10+
echo ""
11+
echo "Please run 'pnpm syncpack fix' to fix the mismatches or fix them manually."
2212
exit 1

0 commit comments

Comments
 (0)