Skip to content

Commit f134fd6

Browse files
authored
ci: use workspace protocol for internal @apify/* deps (#625)
## Summary Fixes the publish workflow failure that surfaced after the pnpm migration (#616) merged. ### What broke After lerna bumped versions in [run 25099449315](https://github.com/apify/apify-shared-js/actions/runs/25099449315/job/73544484277), it called `pnpm install --lockfile-only --ignore-scripts` to refresh the lockfile. pnpm then tried to fetch the newly bumped versions (e.g. `@apify/consts@^2.52.2`) from the registry — which don't exist yet because lerna hasn't published them. The publish step exited 1 with `ERR_PNPM_NO_MATCHING_VERSION`. ### Fix Switches every internal `@apify/<package>` dependency from a registry range (e.g. `^2.52.1`) to the pnpm [`workspace:^` protocol](https://pnpm.io/workspaces#workspace-protocol-workspace). pnpm now resolves them as workspace links, and lerna replaces `workspace:^` with the actual published version at publish time — same pattern apify-storage-local-js and crawlee already use. Lockfile diff confirms the switch is purely the resolution mechanism (`version: 2.52.1` → `version: link:../consts`); no transitive dep changes. ## Test plan - [x] `pnpm install` — clean - [x] `pnpm lint` — clean - [x] `pnpm test` — 459/459 passing - [x] `pnpm build` — all 15 packages built - [ ] Next merge to master triggers a successful publish
1 parent d293765 commit f134fd6

9 files changed

Lines changed: 42 additions & 80 deletions

File tree

packages/actor-memory-expression/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
"access": "public"
4949
},
5050
"dependencies": {
51-
"@apify/consts": "^2.52.1",
52-
"@apify/log": "^2.5.35",
51+
"@apify/consts": "workspace:^",
52+
"@apify/log": "workspace:^",
5353
"mathjs": "^15.2.0"
5454
}
5555
}

packages/input_schema/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
"access": "public"
4949
},
5050
"dependencies": {
51-
"@apify/consts": "^2.52.1",
52-
"@apify/input_secrets": "^1.2.32",
53-
"@apify/json_schemas": "^0.16.3",
51+
"@apify/consts": "workspace:^",
52+
"@apify/input_secrets": "workspace:^",
53+
"@apify/json_schemas": "workspace:^",
5454
"acorn-loose": "^8.4.0",
5555
"countries-list": "^3.0.0"
5656
},

packages/input_secrets/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
"access": "public"
4545
},
4646
"dependencies": {
47-
"@apify/log": "^2.5.35",
48-
"@apify/utilities": "^2.29.0",
47+
"@apify/log": "workspace:^",
48+
"@apify/utilities": "workspace:^",
4949
"ow": "^0.28.2"
5050
}
5151
}

packages/json_schemas/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"tsx": "^4.6.2"
5656
},
5757
"dependencies": {
58-
"@apify/consts": "^2.52.1",
58+
"@apify/consts": "workspace:^",
5959
"ajv": "^8.17.1"
6060
}
6161
}

packages/log/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"access": "public"
4949
},
5050
"dependencies": {
51-
"@apify/consts": "^2.52.1",
51+
"@apify/consts": "workspace:^",
5252
"ansi-colors": "^4.1.1"
5353
}
5454
}

packages/markdown/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
"access": "public"
4949
},
5050
"dependencies": {
51-
"@apify/consts": "^2.52.1",
52-
"@apify/utilities": "^2.29.0",
51+
"@apify/consts": "workspace:^",
52+
"@apify/utilities": "workspace:^",
5353
"marked": "^15.0.0",
5454
"match-all": "^1.2.6"
5555
},

packages/pseudo_url/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@
4444
"access": "public"
4545
},
4646
"dependencies": {
47-
"@apify/log": "^2.5.35"
47+
"@apify/log": "workspace:^"
4848
}
4949
}

packages/utilities/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
"access": "public"
4949
},
5050
"dependencies": {
51-
"@apify/consts": "^2.52.1",
52-
"@apify/log": "^2.5.35"
51+
"@apify/consts": "workspace:^",
52+
"@apify/log": "workspace:^"
5353
},
5454
"devDependencies": {
5555
"@types/create-hmac": "^1.1.0"

pnpm-lock.yaml

Lines changed: 28 additions & 66 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)