bits-to-dead-trees 2.32.1 → 2.33.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,13 +44,13 @@ jobs:
44
44
  echo "TAG_NAME=${tag_name}" >> "${GITHUB_ENV}"
45
45
 
46
46
  - name: Checkout Repo
47
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
47
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
48
48
  with:
49
49
  ref: ${{ env.TAG_NAME }}
50
50
  persist-credentials: false
51
51
 
52
52
  - name: Login to GitHub Container Registry
53
- uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4
53
+ uses: docker/login-action@371161bbe7024a29a25c5e19bfcbc0804fe9ad2c # v4.5.2
54
54
  with:
55
55
  registry: ghcr.io
56
56
  username: ${{ github.repository_owner }}
@@ -60,7 +60,7 @@ jobs:
60
60
  uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
61
61
 
62
62
  - name: Build and push builder image
63
- uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7
63
+ uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
64
64
  with:
65
65
  file: Dockerfile
66
66
  push: true
@@ -15,12 +15,12 @@ jobs:
15
15
  runs-on: ubuntu-latest
16
16
  steps:
17
17
  - name: Checkout Repo
18
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
18
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
19
19
  with:
20
20
  persist-credentials: false
21
21
 
22
22
  - name: Set up Node
23
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
23
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
24
24
  with:
25
25
  node-version-file: .node-version
26
26
  cache: npm
@@ -1,4 +1,4 @@
1
- name: Keep node version and playwright version in sync
1
+ name: Keep node version, playwright version & schema in sync
2
2
 
3
3
  on:
4
4
  workflow_dispatch:
@@ -17,14 +17,19 @@ jobs:
17
17
  name: Keep versions in sync
18
18
  runs-on: ubuntu-latest
19
19
  permissions:
20
- contents: write # Required to commit version sync updates back to the current branch.
20
+ contents: write # Required to commit version & schema sync updates back to the current branch.
21
21
  steps:
22
22
  - name: Checkout Repo
23
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
23
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
24
24
  with:
25
25
  ref: ${{ github.head_ref }}
26
26
  persist-credentials: false
27
27
 
28
+ - name: Configure git
29
+ run: |
30
+ git config user.name "github-actions[bot]"
31
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
32
+
28
33
  - name: Sync .node-version with the one that Playwright is using
29
34
  run: .github/bin/sync-node-version-from-playwright
30
35
 
@@ -36,11 +41,8 @@ jobs:
36
41
  exit 0
37
42
  fi
38
43
 
39
- git config user.name "github-actions[bot]"
40
- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
41
44
  git add .
42
45
  git commit -m "🤖 Update .node-version after playwright update"
43
- git push "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:${GITHUB_REF_NAME}"
44
46
 
45
47
  - name: Sync Playwright version in dockerfile with the one from package.json
46
48
  run: .github/bin/sync-playwright-version-to-dockerfile
@@ -53,8 +55,32 @@ jobs:
53
55
  exit 0
54
56
  fi
55
57
 
56
- git config user.name "github-actions[bot]"
57
- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
58
58
  git add .
59
59
  git commit -m "🤖 Update playwright-core in Dockerfile after depfu update"
60
+
61
+ - name: Set up Node
62
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
63
+ with:
64
+ node-version-file: .node-version
65
+ cache: npm
66
+
67
+ - name: Install npm dependencies
68
+ run: npm ci
69
+
70
+ - name: Update schemas
71
+ run: npm run update-schemas
72
+
73
+ - name: Commit schema changes
74
+ env:
75
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76
+ run: |
77
+ if [ -z "$(git status --porcelain)" ]; then
78
+ exit 0
79
+ fi
80
+
81
+ git add .
82
+ git commit -m "🤖 Update schema to match Playwright version"
83
+
84
+ - name: Push changes
85
+ run: |
60
86
  git push "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:${GITHUB_REF_NAME}"
@@ -21,14 +21,14 @@ jobs:
21
21
  pull-requests: write # Required for Changesets to create release pull requests.
22
22
  steps:
23
23
  - name: Checkout Repo
24
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
24
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
25
25
  with:
26
26
  # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
27
27
  fetch-depth: 0
28
28
  persist-credentials: false
29
29
 
30
30
  - name: Set up Node
31
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
31
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
32
32
  with:
33
33
  node-version-file: .node-version
34
34
  registry-url: https://registry.npmjs.org
@@ -19,13 +19,13 @@ jobs:
19
19
  contents: write # Required to commit formatting updates back to the current branch.
20
20
  steps:
21
21
  - name: Checkout Repo
22
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
22
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
23
23
  with:
24
24
  ref: ${{ github.head_ref }}
25
25
  persist-credentials: false
26
26
 
27
27
  - name: Set up Node
28
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
28
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
29
29
  with:
30
30
  node-version-file: .node-version
31
31
  cache: npm
@@ -24,12 +24,12 @@ jobs:
24
24
  runs-on: ubuntu-latest
25
25
  steps:
26
26
  - name: Checkout repository
27
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
27
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
28
28
  with:
29
29
  persist-credentials: false
30
30
 
31
31
  - name: Run zizmor
32
- uses: zizmorcore/zizmor-action@192e21d79ab29983730a13d1382995c2307fbcaa # v0.5.7
32
+ uses: zizmorcore/zizmor-action@6fc4b006235f201fdab3722e17240ab420d580e5 # v0.6.1
33
33
  with:
34
34
  advanced-security: false
35
35
  annotations: true
package/.node-version CHANGED
@@ -1 +1 @@
1
- 24.17.0
1
+ 24.18.1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # bits-to-dead-trees
2
2
 
3
+ ## 2.33.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0655505`](https://github.com/rmehner/bits-to-dead-trees/commit/06555054682f7e148b2dc3ed6667078ff56081c0) Thanks [@rmehner](https://github.com/rmehner)! - Harden & Stabilize Dockerfile by using npm ci
8
+
9
+ ## 2.33.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#692](https://github.com/rmehner/bits-to-dead-trees/pull/692) [`50e2f44`](https://github.com/rmehner/bits-to-dead-trees/commit/50e2f4494711a3f72294357c2aa183a018e60a6e) Thanks [@depfu](https://github.com/apps/depfu)! - Upgrade to Playwright 1.62.1
14
+
3
15
  ## 2.32.1
4
16
 
5
17
  ### Patch Changes
package/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM mcr.microsoft.com/playwright:v1.61.1
1
+ FROM mcr.microsoft.com/playwright:v1.62.1
2
2
 
3
3
  ENV NODE_ENV=production
4
4
  ENV PORT=8000
@@ -6,9 +6,9 @@ ENV SERVER_ADDRESS=0.0.0.0
6
6
 
7
7
  WORKDIR /app
8
8
 
9
- COPY ["package.json", "package-lock.json*", "./"]
9
+ COPY ["package.json", "package-lock.json", "./"]
10
10
 
11
- RUN npm install --omit=dev --ignore-scripts
11
+ RUN npm ci --omit=dev --ignore-scripts
12
12
 
13
13
  COPY ["server.js", "app.js", "pdf_request_body.json", "./"]
14
14
 
package/README.md CHANGED
@@ -57,7 +57,7 @@ If you want to use it internally with docker-compose, this should give you a goo
57
57
  ```yml
58
58
  services:
59
59
  pdf:
60
- image: ghcr.io/rmehner/bits-to-dead-trees:v2.32.0
60
+ image: ghcr.io/rmehner/bits-to-dead-trees:v2.33.0
61
61
  ports:
62
62
  - 8000:8000
63
63
  ```
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bits-to-dead-trees",
3
3
  "author": "Robin Mehner <robin@coding-robin.de>",
4
- "version": "2.32.1",
4
+ "version": "2.33.1",
5
5
  "description": "Turn HTML into PDF files",
6
6
  "repository": {
7
7
  "type": "git",
@@ -33,24 +33,24 @@
33
33
  "ts-check": "npx tsc --noEmit"
34
34
  },
35
35
  "dependencies": {
36
- "fastify": "^5.9.0",
37
- "playwright-core": "^1.61.1"
36
+ "fastify": "^5.10.0",
37
+ "playwright-core": "^1.62.1"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@changesets/changelog-github": "^0.7.0",
41
- "@changesets/cli": "^2.31.0",
41
+ "@changesets/cli": "^2.31.1",
42
42
  "@eslint/js": "^10.0.1",
43
43
  "@tsconfig/node24": "^24.0.4",
44
44
  "@types/lodash": "^4.17.24",
45
45
  "@types/node": "24.12.0",
46
- "eslint": "^10.6.0",
46
+ "eslint": "^10.8.0",
47
47
  "eslint-config-prettier": "^10.1.8",
48
- "eslint-plugin-n": "^18.2.1",
48
+ "eslint-plugin-n": "^18.2.2",
49
49
  "eslint-plugin-promise": "^7.3.0",
50
- "globals": "^17.7.0",
50
+ "globals": "^17.9.0",
51
51
  "pino-pretty": "^13.1.3",
52
- "prettier": "^3.9.4",
53
- "typescript-json-schema": "^0.67.4",
52
+ "prettier": "^3.9.6",
53
+ "typescript-json-schema": "^0.68.0",
54
54
  "vitest": "^4.1.10"
55
55
  }
56
56
  }
@@ -2,6 +2,28 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "additionalProperties": false,
4
4
  "definitions": {
5
+ "AbortSignal": {
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "aborted": {
9
+ "type": "boolean"
10
+ },
11
+ "onabort": {
12
+ "anyOf": [
13
+ {
14
+ "additionalProperties": false,
15
+ "type": "object"
16
+ },
17
+ {
18
+ "type": "null"
19
+ }
20
+ ]
21
+ },
22
+ "reason": {}
23
+ },
24
+ "required": ["aborted", "onabort", "reason"],
25
+ "type": "object"
26
+ },
5
27
  "BrowserContextOptions": {
6
28
  "additionalProperties": false,
7
29
  "properties": {
@@ -231,6 +253,11 @@
231
253
  "additionalProperties": false,
232
254
  "description": "If specified, enables visual annotations on interacted elements during video recording.",
233
255
  "properties": {
256
+ "cursor": {
257
+ "description": "Cursor decoration shown for pointer actions. `\"pointer\"` (the default) renders a mouse pointer that animates from\nthe previous action point to the next one. `\"none\"` disables the cursor decoration.",
258
+ "enum": ["none", "pointer"],
259
+ "type": "string"
260
+ },
234
261
  "duration": {
235
262
  "description": "How long each annotation is displayed in milliseconds. Defaults to `500`.",
236
263
  "type": "number"
@@ -552,6 +579,10 @@
552
579
  "description": "Referer header value. If provided it will take preference over the referer header value set by\n[page.setExtraHTTPHeaders(headers)](https://playwright.dev/docs/api/class-page#page-set-extra-http-headers).",
553
580
  "type": "string"
554
581
  },
582
+ "signal": {
583
+ "$ref": "#/definitions/AbortSignal",
584
+ "description": "Allows to cancel the operation using an\n[`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the\noperation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,\nwhich can be changed using\n[browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)\nor [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass\n`timeout: 0` to disable the timeout entirely."
585
+ },
555
586
  "timeout": {
556
587
  "description": "Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via\n`navigationTimeout` option in the config, or by using the\n[browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),\n[browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),\n[page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)\nor [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.",
557
588
  "type": "number"
@@ -1,47 +0,0 @@
1
- name: Check JSON schema
2
-
3
- on: push
4
-
5
- permissions: {}
6
-
7
- concurrency:
8
- group: ${{ github.workflow }}-${{ github.ref }}
9
- cancel-in-progress: true
10
-
11
- jobs:
12
- check-json-schema:
13
- name: Check JSON schema
14
- runs-on: ubuntu-latest
15
- permissions:
16
- contents: write # Required to commit schema updates back to the current branch.
17
- steps:
18
- - name: Checkout Repo
19
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
20
- with:
21
- persist-credentials: false
22
-
23
- - name: Set up Node
24
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
25
- with:
26
- node-version-file: .node-version
27
- cache: npm
28
-
29
- - name: Install npm dependencies
30
- run: npm ci
31
-
32
- - name: Update schemas
33
- run: npm run update-schemas
34
-
35
- - name: Commit schema changes
36
- env:
37
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38
- run: |
39
- if [ -z "$(git status --porcelain)" ]; then
40
- exit 0
41
- fi
42
-
43
- git config user.name "github-actions[bot]"
44
- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
45
- git add .
46
- git commit -m "🤖 Update schema to match Playwright version"
47
- git push "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:${GITHUB_REF_NAME}"