Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
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
22 changes: 6 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,32 +50,22 @@ jobs:
package-manager-cache: false
registry-url: 'https://registry.npmjs.org'

- name: Enable corepack
run: |
corepack enable
corepack prepare yarn@stable --activate

- name: Activate cache for Node.js 24
uses: actions/setup-node@v6
with:
cache: 'yarn'

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

- name: Run TypeScript build
run: yarn build
run: pnpm build

- name: Bump version to custom version
if: ${{ github.event.inputs.version == 'custom' && github.event.inputs.custom_version != '' }}
run: yarn version ${{ github.event.inputs.custom_version }}
run: pnpm version ${{ github.event.inputs.custom_version }}
env:
GIT_USER: 'noreply@apify.com:${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}'
GH_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}

- name: Bump version to ${{ github.event.inputs.version }} version
if: ${{ github.event.inputs.version != 'custom' }}
run: yarn version ${{ github.event.inputs.version }}
run: pnpm version ${{ github.event.inputs.version }}
env:
GIT_USER: 'noreply@apify.com:${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}'
GH_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
Expand All @@ -89,4 +79,4 @@ jobs:
message: 'chore(release): Update package version [skip ci]'

- name: Publish to npm
run: npm publish --provenance
run: pnpm publish --no-git-checks --provenance
24 changes: 12 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,31 @@ jobs:
run_ts_build_and_test:
name: Run TypeScript build & Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [20, 22, 24]
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Set up Node.js
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: '24'
node-version: ${{ matrix.node-version }}
package-manager-cache: false

- name: Enable corepack
run: corepack enable

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

- name: Check formatting + linting
run: yarn check
run: pnpm check

- name: Run TypeScript build
run: yarn build
run: pnpm build

- name: Install Camoufox
run: npx camoufox fetch
run: node dist/__main__.js fetch

- name: Run tests
run: yarn test --retry=3

run: pnpm test --retry=3
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
node_modules/
.yarn/
yarn.lock
.yarn
scripts/
*.mmdb
dist/
.npmrc
1 change: 0 additions & 1 deletion .yarnrc.yml

This file was deleted.

11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "rimraf dist && tsc && npm run copy-files",
"build": "rimraf dist && tsc && pnpm copy-files",
"test": "vitest",
"copy-files": "cp -r src/data-files dist/data-files",
"check": "biome check"
Expand All @@ -26,9 +26,16 @@
"engines": {
"node": ">= 20"
},
"devEngines": {
"packageManager": {
"name": "pnpm",
"version": "10.x",
"onFail": "error"
}
},
"license": "MPL-2.0",
"description": "Experimental JS port of Camoufox for Python.",
"packageManager": "yarn@4.13.0",
"packageManager": "pnpm@10.24.0",
"dependencies": {
"adm-zip": "^0.5.16",
"better-sqlite3": "^12.2.0",
Expand Down
Loading
Loading