Skip to content

Commit c46fc0d

Browse files
peterbeYour Name
andauthored
test puppeteer using bun compile (#2799)
* test puppeteer using bun compile * fixes for bun install * test compiled executable * puppeteer v24.25.0 * fix lock file --------- Co-authored-by: Your Name <[email protected]>
1 parent 2d58204 commit c46fc0d

File tree

9 files changed

+357
-1158
lines changed

9 files changed

+357
-1158
lines changed

.github/workflows/python.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,47 +27,43 @@ jobs:
2727
2828
- uses: getong/[email protected]
2929
with:
30-
elasticsearch version: '8.16.0'
30+
elasticsearch version: "8.16.0"
3131
host port: 9200
3232
container port: 9200
3333
host node port: 9300
3434
node port: 9300
35-
discovery type: 'single-node'
35+
discovery type: "single-node"
3636

3737
- name: Redis Server in GitHub Actions
3838
uses: supercharge/[email protected]
3939
with:
4040
# Redis version to use
41-
redis-version: '5.0.5'
41+
redis-version: "5.0.5"
4242

4343
- name: Setup PostgreSQL
4444
uses: Harmon758/[email protected]
4545
with:
4646
# Version of PostgreSQL to use
47-
postgresql version: '16'
47+
postgresql version: "16"
4848
postgresql db: peterbecom
4949
postgresql user: user
5050
postgresql password: secret
5151

5252
- uses: actions/checkout@v5
5353

54-
- name: Setup Node.js environment
55-
uses: actions/setup-node@v5
56-
with:
57-
node-version: '22'
54+
- uses: oven-sh/setup-bun@v2
5855

59-
- name: Cache node_modules
60-
uses: actions/cache@v4
61-
id: cached-node_modules
62-
with:
63-
path: |
64-
node_modules
65-
key: ${{ runner.os }}-${{ hashFiles('peterbecom/chiveproxy/package*.json') }}-${{ hashFiles('.github/workflows/python.yml') }}
56+
- name: Install bun packages
57+
working-directory: peterbecom/chiveproxy
58+
run: bun install
59+
60+
- name: Compile puppeteer_sucks with bun
61+
working-directory: peterbecom/chiveproxy
62+
run: bun run compile
6663

67-
- name: Install node packages
68-
if: steps.cached-node_modules.outputs.cache-hit != 'true'
64+
- name: Test compiled puppeteer_sucks
6965
working-directory: peterbecom/chiveproxy
70-
run: npm install
66+
run: ./out/puppeteer_sucks https://www.example.com
7167

7268
- name: Install uv
7369
id: setup-uv

peterbecom/chiveproxy/.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# dependencies (bun install)
2+
node_modules
3+
4+
# output
5+
out
6+
dist
7+
*.tgz
8+
9+
# code coverage
10+
coverage
11+
*.lcov
12+
13+
# logs
14+
logs
15+
_.log
16+
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
17+
18+
# dotenv environment variable files
19+
.env
20+
.env.development.local
21+
.env.test.local
22+
.env.production.local
23+
.env.local
24+
25+
# caches
26+
.eslintcache
27+
.cache
28+
*.tsbuildinfo
29+
30+
# IntelliJ based IDEs
31+
.idea
32+
33+
# Finder (MacOS) folder config
34+
.DS_Store

peterbecom/chiveproxy/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# chiveproxy
2+
3+
To install dependencies:
4+
5+
```bash
6+
bun install
7+
```
8+
9+
To run:
10+
11+
```bash
12+
bun run compile
13+
/out/puppeteer_sucks https://www.peterbe.com
14+
```
15+
16+
This project was created using `bun init` in bun v1.3.0. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.

peterbecom/chiveproxy/bun.lock

Lines changed: 248 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"compilerOptions": {
3+
// Environment setup & latest features
4+
"lib": ["ESNext"],
5+
"target": "ESNext",
6+
"module": "Preserve",
7+
"moduleDetection": "force",
8+
"jsx": "react-jsx",
9+
"allowJs": true,
10+
11+
// Bundler mode
12+
"moduleResolution": "bundler",
13+
"allowImportingTsExtensions": true,
14+
"verbatimModuleSyntax": true,
15+
"noEmit": true,
16+
17+
// Best practices
18+
"strict": true,
19+
"skipLibCheck": true,
20+
"noFallthroughCasesInSwitch": true,
21+
"noUncheckedIndexedAccess": true,
22+
"noImplicitOverride": true,
23+
24+
// Some stricter flags (disabled by default)
25+
"noUnusedLocals": false,
26+
"noUnusedParameters": false,
27+
"noPropertyAccessFromIndexSignature": false
28+
}
29+
}

0 commit comments

Comments
 (0)