Skip to content

Commit 68c45fe

Browse files
B4nanclaude
andauthored
chore: migrate to pnpm and enable minimum release age (#175)
## Summary Part of the org-wide supply-chain hardening + pnpm migration. Migrates got-scraping from npm to pnpm and adds a 1-day minimum release age guard at two layers: - **pnpm layer** — `minimumReleaseAge: 1440` in `pnpm-workspace.yaml` blocks installs of versions < 1 day old - **Renovate layer** — `minimumReleaseAge: "1 day"` delays PR creation - **Internal allowlist** — `@apify/*` and `@crawlee/*` excluded at both layers This repo previously had no Renovate config; a standard one is added. ## Changes - `package.json`: `packageManager: pnpm@10.24.0`; `engines.node >= 18` (pnpm 10 requires Node 18+, was `>=16`); `npm run` → `pnpm` in scripts - `pnpm-workspace.yaml`: non-monorepo minimum release age settings only - `.npmrc`: `node-linker=hoisted`, `link-workspace-packages=true`, `prefer-workspace-packages=true`, `public-hoist-pattern[]=*` (the last one mirrors npm's transitive-type hoisting so tsc sees the same types) - `tsconfig.json`: `skipLibCheck: true` (standard; suppresses ow/quick-lru `.d.ts` incompatibilities with TS 5.9's `MapIterator` lib types) - `src/agent/wrapped-agent.ts` + `src/index.ts`: two small casts — same runtime behavior, satisfy stricter type resolution under pnpm that npm's hoisting happened to hide - New `.github/actions/pnpm-install` composite action (cached pnpm store, keyed by year-month + lockfile hash — pattern from apify/apify-cli#1068) - CI workflows: delegate install to composite; switch to `pnpm publish --no-git-checks`; Node matrix now 18/20/22/24 - New `renovate.json` with `minimumReleaseAge "1 day"`, `internalChecksFilter "strict"`, `@apify/*` + `@crawlee/*` whitelist 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7577a65 commit 68c45fe

13 files changed

Lines changed: 6705 additions & 8393 deletions

.github/workflows/check.yml

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,38 +15,31 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
os: [ubuntu-latest, windows-latest, macos-latest]
18-
node-version: [18, 20, 22]
18+
node-version: [18, 20, 22, 24]
1919

2020
steps:
21-
-
22-
uses: actions/checkout@v4
23-
-
24-
name: Use Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@v4
26-
with:
27-
node-version: ${{ matrix.node-version }}
28-
-
29-
name: Install Dependencies
30-
run: npm install
31-
-
32-
name: Run Tests
33-
run: npm test
34-
env:
35-
APIFY_PROXY_PASSWORD: ${{ secrets.APIFY_TEST_USER_PROXY_PASSWORD }}
21+
- uses: actions/checkout@v4
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
- name: Install pnpm and dependencies
27+
uses: apify/workflows/pnpm-install@main
28+
- name: Run Tests
29+
run: pnpm test
30+
env:
31+
APIFY_PROXY_PASSWORD: ${{ secrets.APIFY_TEST_USER_PROXY_PASSWORD }}
3632

3733
lint:
3834
name: Lint
3935
runs-on: ubuntu-latest
4036

4137
steps:
42-
-
43-
uses: actions/checkout@v4
44-
-
45-
name: Use Node.js 22
46-
uses: actions/setup-node@v4
47-
with:
48-
node-version: 22
49-
-
50-
run: npm install
51-
-
52-
run: npm run lint
38+
- uses: actions/checkout@v4
39+
- name: Use Node.js 24
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: 24
43+
- name: Install pnpm and dependencies
44+
uses: apify/workflows/pnpm-install@main
45+
- run: pnpm lint

.github/workflows/publish-to-npm.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ jobs:
4949
node-version: 24
5050
registry-url: 'https://registry.npmjs.org'
5151

52-
- name: Install Dependencies
53-
run: npm install
52+
- name: Install pnpm and dependencies
53+
uses: apify/workflows/pnpm-install@main
5454

5555
- name: Publish to NPM (@latest)
5656
if: inputs.dist-tag == 'latest'
@@ -59,7 +59,7 @@ jobs:
5959
timeout_minutes: 10
6060
max_attempts: 5
6161
retry_wait_seconds: 30
62-
command: npm publish --tag latest --access public
62+
command: pnpm publish --tag latest --access public --no-git-checks
6363

6464
- name: Publish to NPM (@next)
6565
if: inputs.dist-tag == 'next'
@@ -68,4 +68,4 @@ jobs:
6868
timeout_minutes: 10
6969
max_attempts: 5
7070
retry_wait_seconds: 30
71-
command: npm publish --tag next --access public
71+
command: pnpm publish --tag next --access public --no-git-checks

.github/workflows/release.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
fail-fast: true
2727
matrix:
2828
os: [ubuntu-latest, windows-latest, macos-latest]
29-
node-version: [18, 20, 22]
29+
node-version: [18, 20, 22, 24]
3030
runs-on: ${{ matrix.os }}
3131
steps:
3232
- uses: actions/checkout@v4
@@ -36,11 +36,11 @@ jobs:
3636
with:
3737
node-version: ${{ matrix.node-version }}
3838

39-
- name: Install Dependencies
40-
run: npm install
39+
- name: Install pnpm and dependencies
40+
uses: apify/workflows/pnpm-install@main
4141

4242
- name: Run Tests
43-
run: npm test
43+
run: pnpm test
4444
env:
4545
APIFY_PROXY_PASSWORD: ${{ secrets.APIFY_TEST_USER_PROXY_PASSWORD }}
4646

@@ -60,8 +60,8 @@ jobs:
6060
with:
6161
node-version: 24
6262

63-
- name: Install Dependencies
64-
run: npm install
63+
- name: Install pnpm and dependencies
64+
uses: apify/workflows/pnpm-install@main
6565

6666
- name: Configure git
6767
run: |
@@ -70,11 +70,11 @@ jobs:
7070
7171
- name: Bump version to custom version
7272
if: ${{ github.event.inputs.version == 'custom' && github.event.inputs.custom_version != '' }}
73-
run: npm version ${{ github.event.inputs.custom_version }}
73+
run: pnpm version ${{ github.event.inputs.custom_version }}
7474

7575
- name: Bump version to ${{ github.event.inputs.version }} version
7676
if: ${{ github.event.inputs.version != 'custom' }}
77-
run: npm version ${{ github.event.inputs.version }}
77+
run: pnpm version ${{ github.event.inputs.version }}
7878

7979
- name: Push version commit and tag
8080
run: git push --follow-tags

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
dist
33
.idea
44
node_modules
5+
yarn.lock
6+
.yarn
57
coverage

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)