Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 19 additions & 26 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [18, 20, 22, 24]
node-version: [20, 22, 24]

steps:
- name: Checkout repository
Expand All @@ -38,14 +38,15 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'package-lock.json'

- name: Install Dependencies
run: npm ci
- name: Install pnpm and dependencies
uses: apify/workflows/pnpm-install@main

- name: Install Chrome for puppeteer
run: pnpm exec puppeteer browsers install chrome

- name: Run Tests
run: npm test
run: pnpm test

test_bundling:
name: Test bundler support
Expand All @@ -58,14 +59,12 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: 24
cache: 'npm'
cache-dependency-path: 'package-lock.json'

- name: Install Dependencies
run: npm ci
- name: Install pnpm and dependencies
uses: apify/workflows/pnpm-install@main

- name: Run Tests
run: npm run test:bundling
run: pnpm test:bundling

lint:
name: Lint
Expand All @@ -77,13 +76,11 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: 24
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Install Dependencies
run: npm ci
- run: npm run lint
- name: Install pnpm and dependencies
uses: apify/workflows/pnpm-install@main
- run: pnpm lint
- name: Prettier
run: npm run format:check
run: pnpm format:check

docs:
name: Docs build
Expand All @@ -97,15 +94,11 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: 24
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Install Dependencies
run: npm ci
- name: Install pnpm and dependencies
uses: apify/workflows/pnpm-install@main

- name: Install & build & deploy docs
- name: Build docs
run: |
npm ci --force
cd website
npm ci --force
npm run lint
npm run build
pnpm lint
pnpm build
17 changes: 7 additions & 10 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,30 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
cache-dependency-path: website/package-lock.json

- name: Set git identity
run: |
git config user.name 'GitHub Actions'
git config user.email 'github-actions[bot]@users.noreply.github.com'

- name: Install Node.js dependencies
run: |
npm install
cd website
npm install
npm update @apify/docs-theme
- name: Install pnpm and dependencies
uses: apify/workflows/pnpm-install@main

- name: Update docs theme
run: pnpm --filter apify-client-website update @apify/docs-theme

# We do this as early as possible to prevent conflicts if someone else would push something in the meantime
- name: Commit the updated package.json and lockfile
run: |
git config user.name 'GitHub Actions'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add website/package.json
git add website/package-lock.json
git add pnpm-lock.yaml
git diff-index --quiet HEAD || git commit -m 'chore: Automatic theme updating workflow [skip ci]' || true
git push

- name: Build Docusaurus docs
run: npm run build
run: pnpm build
working-directory: ./website
env:
SMARTLOOK_PROJECT_KEY: ${{ secrets.SMARTLOOK_DOCS_PROJECT_KEY }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pre_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ jobs:
with:
node-version: 24

- name: Install pnpm and dependencies
uses: apify/workflows/pnpm-install@main

- name: Update package version in package.json
run: npm version --no-git-tag-version --allow-same-version ${{ needs.release_metadata.outputs.version_number }}
run: pnpm version --no-git-tag-version --allow-same-version ${{ needs.release_metadata.outputs.version_number }}

- name: Update CHANGELOG.md
uses: DamianReeves/write-file-action@master
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/publish_to_npm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,12 @@ jobs:
with:
node-version: 24
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Update npm
run: npm install -g npm@latest
- name: Install dependencies
run: |
npm ci
- name: Install pnpm and dependencies
uses: apify/workflows/pnpm-install@main
- name: Check version consistency and bump pre-release version (beta only)
if: ${{ inputs.tag == 'beta' }}
run: node ./.github/scripts/before-beta-release.js
- name: Build module
run: npm run build
run: pnpm build
- name: Publish to NPM
run: npm publish --tag ${{ inputs.tag }}
run: pnpm publish --tag ${{ inputs.tag }} --no-git-checks
19 changes: 9 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ jobs:
with:
node-version: 24

- name: Install pnpm and dependencies
uses: apify/workflows/pnpm-install@main

- name: Update package version in package.json
run: npm version --no-git-tag-version --allow-same-version ${{ needs.release_metadata.outputs.version_number }}
run: pnpm version --no-git-tag-version --allow-same-version ${{ needs.release_metadata.outputs.version_number }}

- name: Update CHANGELOG.md
uses: DamianReeves/write-file-action@master
Expand Down Expand Up @@ -124,16 +127,12 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: 24
cache: 'npm'

- name: Install jq
run: sudo apt-get install jq

- name: Install dependencies
run: |
npm install
cd website
npm install
- name: Install pnpm and dependencies
uses: apify/workflows/pnpm-install@main

- name: Snapshot the current version
run: |
Expand All @@ -143,10 +142,10 @@ jobs:
rm -rf versioned_docs/version-$MAJOR
rm -rf versioned_sidebars/version-$MAJOR-sidebars.json
jq 'map(select(. != env.MAJOR))' versions.json > tmp.json && mv tmp.json versions.json
npx docusaurus docs:version $MAJOR
npx docusaurus api:version $MAJOR
pnpm exec docusaurus docs:version $MAJOR
pnpm exec docusaurus api:version $MAJOR
cd ..
npm run format
pnpm format

- name: Commit and push the version snapshot
uses: EndBug/add-and-commit@v10
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pids
.idea
.vscode
yarn.lock
.yarn
tmp
jsconfig.json
types
Expand Down
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
.husky/pre-commit
.prettierignore

# pnpm
pnpm-lock.yaml
pnpm-workspace.yaml
Loading
Loading