bits-to-dead-trees 2.19.0 → 2.19.2
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.
- package/CHANGELOG.md +12 -0
- package/Dockerfile +1 -1
- package/README.md +1 -1
- package/eslint.config.js +27 -0
- package/package.json +15 -10
- package/pdf_request_body.json +2 -2
- package/server.js +1 -10
- package/test/app.test.ts +7 -3
- package/tsconfig.json +1 -13
- package/.eslintrc.json +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# bits-to-dead-trees
|
|
2
2
|
|
|
3
|
+
## 2.19.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#411](https://github.com/rmehner/bits-to-dead-trees/pull/411) [`00d47af`](https://github.com/rmehner/bits-to-dead-trees/commit/00d47afb549cb1c6ff09ff1b1f9c41074d130912) Thanks [@depfu](https://github.com/apps/depfu)! - Upgrade to Playwright 1.48.2
|
|
8
|
+
|
|
9
|
+
## 2.19.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#407](https://github.com/rmehner/bits-to-dead-trees/pull/407) [`1533530`](https://github.com/rmehner/bits-to-dead-trees/commit/1533530758577e7e0ed8673a185b8f4795b7c191) Thanks [@dependabot](https://github.com/apps/dependabot)! - Upgrade to Playwright 1.48.1
|
|
14
|
+
|
|
3
15
|
## 2.19.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/Dockerfile
CHANGED
package/README.md
CHANGED
package/eslint.config.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import globals from "globals";
|
|
2
|
+
// @ts-ignore
|
|
3
|
+
import pluginJs from "@eslint/js";
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
import pluginPromise from "eslint-plugin-promise";
|
|
6
|
+
import nodePlugin from "eslint-plugin-n";
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
import eslintConfigPrettier from "eslint-config-prettier";
|
|
9
|
+
|
|
10
|
+
export default [
|
|
11
|
+
{
|
|
12
|
+
languageOptions: {
|
|
13
|
+
globals: globals.node,
|
|
14
|
+
sourceType: "module",
|
|
15
|
+
ecmaVersion: 2024,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
pluginJs.configs.recommended,
|
|
19
|
+
nodePlugin.configs["flat/recommended-module"],
|
|
20
|
+
{
|
|
21
|
+
rules: {
|
|
22
|
+
"n/no-unpublished-import": "off",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
pluginPromise.configs["flat/recommended"],
|
|
26
|
+
eslintConfigPrettier,
|
|
27
|
+
];
|
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.19.
|
|
4
|
+
"version": "2.19.2",
|
|
5
5
|
"description": "Turn HTML into PDF files",
|
|
6
6
|
"repository": "github:rmehner/bits-to-dead-trees",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"main": "server.js",
|
|
17
17
|
"type": "module",
|
|
18
18
|
"scripts": {
|
|
19
|
-
"check-format": "prettier --check '**/*.{js,ts,json,md}'",
|
|
19
|
+
"check-format": "prettier --check '**/*.{js,ts,cjs,mjs,json,md}'",
|
|
20
20
|
"lint": "eslint *.js",
|
|
21
|
-
"format": "prettier --write '**/*.{js,ts,json,md}'",
|
|
21
|
+
"format": "prettier --write '**/*.{js,ts,cjs,mjs,json,md}'",
|
|
22
22
|
"start": "node server.js",
|
|
23
23
|
"start:dev": "nodemon --inspect server.js",
|
|
24
24
|
"dump-schemas": "typescript-json-schema --noExtraProps --required --strictNullChecks types/schemas.ts PdfRequestBody --out pdf_request_body.json",
|
|
@@ -30,20 +30,25 @@
|
|
|
30
30
|
"ts-check": "npx tsc --noEmit"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"fastify": "^
|
|
34
|
-
"playwright-core": "^1.48.
|
|
33
|
+
"fastify": "^5.0.0",
|
|
34
|
+
"playwright-core": "^1.48.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@changesets/changelog-github": "^0.5.0",
|
|
38
38
|
"@changesets/cli": "^2.27.9",
|
|
39
|
-
"@
|
|
39
|
+
"@eslint/js": "^9.13.0",
|
|
40
|
+
"@tsconfig/node20": "^20.1.4",
|
|
41
|
+
"@types/lodash": "^4.17.12",
|
|
40
42
|
"@types/node": "20.11.22",
|
|
41
|
-
"eslint": "^
|
|
43
|
+
"eslint": "^9.13.0",
|
|
42
44
|
"eslint-config-prettier": "^9.1.0",
|
|
45
|
+
"eslint-plugin-n": "^17.11.1",
|
|
46
|
+
"eslint-plugin-promise": "^7.1.0",
|
|
47
|
+
"globals": "^15.11.0",
|
|
43
48
|
"nodemon": "^3.1.7",
|
|
44
|
-
"pino-pretty": "^
|
|
49
|
+
"pino-pretty": "^11.3.0",
|
|
45
50
|
"prettier": "^3.3.3",
|
|
46
|
-
"typescript-json-schema": "^0.
|
|
47
|
-
"vitest": "^1.
|
|
51
|
+
"typescript-json-schema": "^0.65.1",
|
|
52
|
+
"vitest": "^2.1.3"
|
|
48
53
|
}
|
|
49
54
|
}
|
package/pdf_request_body.json
CHANGED
|
@@ -618,7 +618,7 @@
|
|
|
618
618
|
"SharedArrayBuffer": {
|
|
619
619
|
"additionalProperties": false,
|
|
620
620
|
"properties": {
|
|
621
|
-
"__@species@
|
|
621
|
+
"__@species@472": {
|
|
622
622
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
623
623
|
},
|
|
624
624
|
"__@toStringTag@25": {
|
|
@@ -629,7 +629,7 @@
|
|
|
629
629
|
"type": "number"
|
|
630
630
|
}
|
|
631
631
|
},
|
|
632
|
-
"required": ["__@species@
|
|
632
|
+
"required": ["__@species@472", "__@toStringTag@25", "byteLength"],
|
|
633
633
|
"type": "object"
|
|
634
634
|
},
|
|
635
635
|
"ViewportSize": {
|
package/server.js
CHANGED
|
@@ -17,13 +17,4 @@ const server = app({
|
|
|
17
17
|
},
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
try {
|
|
22
|
-
await server.listen({ port: +PORT, host: SERVER_ADDRESS });
|
|
23
|
-
} catch (error) {
|
|
24
|
-
console.error(error);
|
|
25
|
-
process.exit(1);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
startServer();
|
|
20
|
+
await server.listen({ port: +PORT, host: SERVER_ADDRESS });
|
package/test/app.test.ts
CHANGED
|
@@ -4,7 +4,8 @@ import { afterEach, beforeEach, describe, expect, it, vi, Mock } from "vitest";
|
|
|
4
4
|
import build, {
|
|
5
5
|
defaultBrowserContextOptions,
|
|
6
6
|
defaultGotoOptions,
|
|
7
|
-
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
} from "../app.js";
|
|
8
9
|
const app = build();
|
|
9
10
|
|
|
10
11
|
describe("GET /health", () => {
|
|
@@ -51,7 +52,7 @@ describe("POST /pdf", () => {
|
|
|
51
52
|
newPage = vi.fn().mockResolvedValue({ goto: gotoMethod, pdf });
|
|
52
53
|
newContext = vi.fn().mockResolvedValue({ newPage });
|
|
53
54
|
|
|
54
|
-
(chromium.launch as Mock
|
|
55
|
+
(chromium.launch as Mock).mockResolvedValue({
|
|
55
56
|
newContext,
|
|
56
57
|
close,
|
|
57
58
|
});
|
|
@@ -244,6 +245,9 @@ describe("POST /pdf", () => {
|
|
|
244
245
|
},
|
|
245
246
|
});
|
|
246
247
|
|
|
247
|
-
|
|
248
|
+
const callOrderForPdf = pdf.mock.invocationCallOrder[0];
|
|
249
|
+
const callOrderForClose = close.mock.invocationCallOrder[0];
|
|
250
|
+
|
|
251
|
+
expect(callOrderForPdf).toBeLessThan(callOrderForClose);
|
|
248
252
|
});
|
|
249
253
|
});
|
package/tsconfig.json
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"lib": ["es2023"],
|
|
4
|
-
|
|
5
|
-
"strict": true,
|
|
6
|
-
"moduleResolution": "node",
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
"forceConsistentCasingInFileNames": true,
|
|
9
|
-
"resolveJsonModule": true,
|
|
10
|
-
"esModuleInterop": true,
|
|
11
|
-
"module": "ESNext",
|
|
12
|
-
|
|
13
|
-
"checkJs": true
|
|
14
|
-
}
|
|
2
|
+
"extends": "@tsconfig/node20/tsconfig.json"
|
|
15
3
|
}
|