@siteimprove/alfa-puppeteer 0.72.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 +265 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/puppeteer.d.ts +14 -0
- package/dist/puppeteer.js +29 -0
- package/package.json +44 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
# @siteimprove/alfa-puppeteer
|
|
2
|
+
|
|
3
|
+
## 0.72.2
|
|
4
|
+
|
|
5
|
+
## 0.72.1
|
|
6
|
+
|
|
7
|
+
## 0.72.0
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- **Changed:** Dummy minor version to experiment with publish flow, use the previous or next minor version instead. ([`4daf29d`](https://github.com/Siteimprove/alfa-integrations/commit/4daf29d55745310b6ac845f963b306a4f0e57b08))
|
|
12
|
+
|
|
13
|
+
## 0.71.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- **Changed:** Update Alfa to ^0.92.0 ([#78](https://github.com/Siteimprove/alfa-integrations/pull/78))
|
|
18
|
+
|
|
19
|
+
## 0.71.1
|
|
20
|
+
|
|
21
|
+
## 0.71.0
|
|
22
|
+
|
|
23
|
+
## 0.70.1
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- **Changed:** Update Alfa ([#75](https://github.com/Siteimprove/alfa-integrations/pull/75))
|
|
28
|
+
|
|
29
|
+
## 0.70.0
|
|
30
|
+
|
|
31
|
+
### Minor Changes
|
|
32
|
+
|
|
33
|
+
- **Changed:** Update Alfa ([#68](https://github.com/Siteimprove/alfa-integrations/pull/68))
|
|
34
|
+
|
|
35
|
+
## 0.69.1
|
|
36
|
+
|
|
37
|
+
## 0.69.0
|
|
38
|
+
|
|
39
|
+
## 0.68.4
|
|
40
|
+
|
|
41
|
+
## 0.68.3
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- **Changed:** Update Alfa ([#54](https://github.com/Siteimprove/alfa-integrations/pull/54))
|
|
46
|
+
|
|
47
|
+
## 0.68.2
|
|
48
|
+
|
|
49
|
+
### Patch Changes
|
|
50
|
+
|
|
51
|
+
- **Changed:** Update Alfa. ([#53](https://github.com/Siteimprove/alfa-integrations/pull/53))
|
|
52
|
+
|
|
53
|
+
## 0.68.1
|
|
54
|
+
|
|
55
|
+
### Patch Changes
|
|
56
|
+
|
|
57
|
+
- **Changed:** Update Alfa ([#52](https://github.com/Siteimprove/alfa-integrations/pull/52))
|
|
58
|
+
|
|
59
|
+
## 0.68.0
|
|
60
|
+
|
|
61
|
+
### Minor Changes
|
|
62
|
+
|
|
63
|
+
- - **Breaking:** TS resolution has been changed to `Node16`, target to `es2022`. ([#50](https://github.com/Siteimprove/alfa-integrations/pull/50))
|
|
64
|
+
|
|
65
|
+
- - **Breaking:** Alfa is now distributed as ESM rather than CJS modules; projects using it must be ESM or use dynamic `import()`. ([#50](https://github.com/Siteimprove/alfa-integrations/pull/50))
|
|
66
|
+
|
|
67
|
+
⚠️ This is the last of a series of changes on the internal structure and build process of distributed packages that was started with v0.67.0.
|
|
68
|
+
|
|
69
|
+
## 0.67.0
|
|
70
|
+
|
|
71
|
+
### Minor Changes
|
|
72
|
+
|
|
73
|
+
- **Breaking:** The .js files are now built in the dist folder rather than in src. ([#49](https://github.com/Siteimprove/alfa-integrations/pull/49))
|
|
74
|
+
|
|
75
|
+
⚠️ This is the first of a series of changes on the internal structure and build process of distributed packages. It is probably better to not use this version and wait until more of these internal changes have been done to jump directly to the final result. We are internally releasing these changes for validation purpose only.
|
|
76
|
+
|
|
77
|
+
This should not impact consumers, the package.json files should be set correctly to consume these files.
|
|
78
|
+
|
|
79
|
+
## 0.66.3
|
|
80
|
+
|
|
81
|
+
### Patch Changes
|
|
82
|
+
|
|
83
|
+
- **Changed:** Update Alfa. ([#47](https://github.com/Siteimprove/alfa-integrations/pull/47))
|
|
84
|
+
|
|
85
|
+
## 0.66.2
|
|
86
|
+
|
|
87
|
+
### Patch Changes
|
|
88
|
+
|
|
89
|
+
- **Changed:** Update Alfa ([#46](https://github.com/Siteimprove/alfa-integrations/pull/46))
|
|
90
|
+
|
|
91
|
+
## 0.66.1
|
|
92
|
+
|
|
93
|
+
### Patch Changes
|
|
94
|
+
|
|
95
|
+
- **Changed:** Update Alfa to ^0.83.1 ([#45](https://github.com/Siteimprove/alfa-integrations/pull/45))
|
|
96
|
+
|
|
97
|
+
## 0.66.0
|
|
98
|
+
|
|
99
|
+
### Minor Changes
|
|
100
|
+
|
|
101
|
+
- **Added:** Package dependency graphs are now included in the documentation. ([#43](https://github.com/Siteimprove/alfa-integrations/pull/43))
|
|
102
|
+
|
|
103
|
+
### Patch Changes
|
|
104
|
+
|
|
105
|
+
- **Changed:** Update Alfa. ([#44](https://github.com/Siteimprove/alfa-integrations/pull/44))
|
|
106
|
+
|
|
107
|
+
## 0.65.2
|
|
108
|
+
|
|
109
|
+
### Patch Changes
|
|
110
|
+
|
|
111
|
+
- **Changed:** Update Alfa ([#42](https://github.com/Siteimprove/alfa-integrations/pull/42))
|
|
112
|
+
|
|
113
|
+
## 0.65.1
|
|
114
|
+
|
|
115
|
+
### Patch Changes
|
|
116
|
+
|
|
117
|
+
- **Changed:** Update Alfa. ([#41](https://github.com/Siteimprove/alfa-integrations/pull/41))
|
|
118
|
+
|
|
119
|
+
## 0.65.0
|
|
120
|
+
|
|
121
|
+
### Patch Changes
|
|
122
|
+
|
|
123
|
+
- **Changed:** Update Alfa to ^0.79.1 ([#40](https://github.com/Siteimprove/alfa-integrations/pull/40))
|
|
124
|
+
|
|
125
|
+
## 0.64.11
|
|
126
|
+
|
|
127
|
+
### Patch Changes
|
|
128
|
+
|
|
129
|
+
- **Changed:** Update Alfa to ^0.77.0 ([#38](https://github.com/Siteimprove/alfa-integrations/pull/38))
|
|
130
|
+
|
|
131
|
+
- **Changed:** Updated Alfa. ([#39](https://github.com/Siteimprove/alfa-integrations/pull/39))
|
|
132
|
+
|
|
133
|
+
## 0.64.10
|
|
134
|
+
|
|
135
|
+
### Patch Changes
|
|
136
|
+
|
|
137
|
+
- **Changed:** Update Alfa to ^0.76.0 ([#37](https://github.com/Siteimprove/alfa-integrations/pull/37))
|
|
138
|
+
|
|
139
|
+
## 0.64.9
|
|
140
|
+
|
|
141
|
+
### Patch Changes
|
|
142
|
+
|
|
143
|
+
- **Changed:** Update Alfa to ^0.75.0 ([#36](https://github.com/Siteimprove/alfa-integrations/pull/36))
|
|
144
|
+
|
|
145
|
+
## 0.64.8
|
|
146
|
+
|
|
147
|
+
### Patch Changes
|
|
148
|
+
|
|
149
|
+
- **Changed:** Update Alfa to ^0.74.0 ([#34](https://github.com/Siteimprove/alfa-integrations/pull/34))
|
|
150
|
+
|
|
151
|
+
## 0.64.7
|
|
152
|
+
|
|
153
|
+
### Patch Changes
|
|
154
|
+
|
|
155
|
+
- **Changed:** Update Alfa ([#33](https://github.com/Siteimprove/alfa-integrations/pull/33))
|
|
156
|
+
|
|
157
|
+
## 0.64.6
|
|
158
|
+
|
|
159
|
+
### Patch Changes
|
|
160
|
+
|
|
161
|
+
- **Changed:** Update to Alfa v0.73.0 ([#32](https://github.com/Siteimprove/alfa-integrations/pull/32))
|
|
162
|
+
|
|
163
|
+
## 0.64.5
|
|
164
|
+
|
|
165
|
+
### Patch Changes
|
|
166
|
+
|
|
167
|
+
- **Changed:** Update Alfa to v0.72.0 ([#31](https://github.com/Siteimprove/alfa-integrations/pull/31))
|
|
168
|
+
|
|
169
|
+
## 0.64.4
|
|
170
|
+
|
|
171
|
+
### Patch Changes
|
|
172
|
+
|
|
173
|
+
- **Changed:** Each package now has peer dependencies to the main Alfa packages it uses. ([#30](https://github.com/Siteimprove/alfa-integrations/pull/30))
|
|
174
|
+
|
|
175
|
+
This should ease problem with code downstream that tries to Ix, e.g., `Option` from different versions of the package and fail to build.
|
|
176
|
+
|
|
177
|
+
- **Changed:** Update Alfa to version 0.71.0. ([#30](https://github.com/Siteimprove/alfa-integrations/pull/30))
|
|
178
|
+
|
|
179
|
+
## 0.64.3
|
|
180
|
+
|
|
181
|
+
### Patch Changes
|
|
182
|
+
|
|
183
|
+
- **Changed:** Update Alfa. ([#29](https://github.com/Siteimprove/alfa-integrations/pull/29))
|
|
184
|
+
|
|
185
|
+
## 0.64.2
|
|
186
|
+
|
|
187
|
+
## 0.64.1
|
|
188
|
+
|
|
189
|
+
### Patch Changes
|
|
190
|
+
|
|
191
|
+
- **Changed:** Update Alfa. ([`c8699c0`](https://github.com/Siteimprove/alfa-integrations/commit/c8699c081dfa36b407dbecc51baf1e11739e2537))
|
|
192
|
+
|
|
193
|
+
## 0.64.0
|
|
194
|
+
|
|
195
|
+
### Minor Changes
|
|
196
|
+
|
|
197
|
+
- **Added:** `Playwright.toNode` and `Puppeteer.toNode` now accept an option `Device` parameter. ([#26](https://github.com/Siteimprove/alfa-integrations/pull/26))
|
|
198
|
+
|
|
199
|
+
Without it, no layout information will be recorded.
|
|
200
|
+
|
|
201
|
+
### Patch Changes
|
|
202
|
+
|
|
203
|
+
- **Changed:** Update to Alfa v0.68.0 ([#26](https://github.com/Siteimprove/alfa-integrations/pull/26))
|
|
204
|
+
|
|
205
|
+
## 0.63.1
|
|
206
|
+
|
|
207
|
+
### Patch Changes
|
|
208
|
+
|
|
209
|
+
- **Fixed:** Set up correct permissions in the release workflow ([`c47b1c9`](https://github.com/Siteimprove/alfa-integrations/commit/c47b1c9b3eb79ded5c872f3e31d0b33c9140c039))
|
|
210
|
+
|
|
211
|
+
## 0.63.0
|
|
212
|
+
|
|
213
|
+
### Minor Changes
|
|
214
|
+
|
|
215
|
+
- **Changed:** Update release flow to newer version ([#24](https://github.com/Siteimprove/alfa-integrations/pull/24))
|
|
216
|
+
|
|
217
|
+
### Patch Changes
|
|
218
|
+
|
|
219
|
+
- **Changed:** Update Alfa to version 0.67.0 ([#24](https://github.com/Siteimprove/alfa-integrations/pull/24))
|
|
220
|
+
|
|
221
|
+
## 0.62.11
|
|
222
|
+
|
|
223
|
+
### Patch Changes
|
|
224
|
+
|
|
225
|
+
- **Changes:** Updated Alfa to v0.66.0 ([`f8c0275`](https://github.com/Siteimprove/alfa-integrations/commit/f8c0275d9eadc6e98ad9aa9f2a17bb95b12d4859))
|
|
226
|
+
|
|
227
|
+
## 0.62.10
|
|
228
|
+
|
|
229
|
+
### Patch Changes
|
|
230
|
+
|
|
231
|
+
- **Added:** Updated Alfa to v0.65.0 ([#19](https://github.com/Siteimprove/alfa-integrations/pull/19))
|
|
232
|
+
|
|
233
|
+
Functions that are building `Element` directly now add an empty box to them.
|
|
234
|
+
|
|
235
|
+
## 0.62.9
|
|
236
|
+
|
|
237
|
+
### Patch Changes
|
|
238
|
+
|
|
239
|
+
- **Changed:** Update Alfa to 0.64.0 ([#17](https://github.com/Siteimprove/alfa-integrations/pull/17))
|
|
240
|
+
|
|
241
|
+
## 0.62.8
|
|
242
|
+
|
|
243
|
+
### Patch Changes
|
|
244
|
+
|
|
245
|
+
- Update Alfa to 0.63.1 ([#10](https://github.com/Siteimprove/alfa-integrations/pull/10))
|
|
246
|
+
|
|
247
|
+
## 0.62.7
|
|
248
|
+
|
|
249
|
+
### Patch Changes
|
|
250
|
+
|
|
251
|
+
- **Updated:** Adapt to latest Alfa ([#9](https://github.com/Siteimprove/alfa-integrations/pull/9))
|
|
252
|
+
|
|
253
|
+
Replace the `Result#get`/`Result#getErr` with the new `Unsafe` versions.
|
|
254
|
+
|
|
255
|
+
## 0.62.6
|
|
256
|
+
|
|
257
|
+
### Patch Changes
|
|
258
|
+
|
|
259
|
+
- Update Puppeteer ([#7](https://github.com/Siteimprove/alfa-integrations/pull/7))
|
|
260
|
+
|
|
261
|
+
Update Puppeteer to latest version which allow to correctly scrape the `rotate` property.
|
|
262
|
+
|
|
263
|
+
## 0.62.5
|
|
264
|
+
|
|
265
|
+
## 0.62.4
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference lib="dom" preserve="true" />
|
|
2
|
+
import { Device } from "@siteimprove/alfa-device";
|
|
3
|
+
import { Node } from "@siteimprove/alfa-dom";
|
|
4
|
+
import { Page } from "@siteimprove/alfa-web";
|
|
5
|
+
import type { JSHandle } from "puppeteer";
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export declare namespace Puppeteer {
|
|
10
|
+
type Type = JSHandle<globalThis.Node>;
|
|
11
|
+
function toNode(value: Type, device?: Device): Promise<Node>;
|
|
12
|
+
function toPage(value: Type): Promise<Page>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=puppeteer.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference lib="dom" preserve="true" />
|
|
2
|
+
import { Device } from "@siteimprove/alfa-device";
|
|
3
|
+
import { Document, Node } from "@siteimprove/alfa-dom";
|
|
4
|
+
import { Request, Response } from "@siteimprove/alfa-http";
|
|
5
|
+
import { Page } from "@siteimprove/alfa-web";
|
|
6
|
+
import * as device from "@siteimprove/alfa-device/native";
|
|
7
|
+
import * as dom from "@siteimprove/alfa-dom/native";
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export var Puppeteer;
|
|
12
|
+
(function (Puppeteer) {
|
|
13
|
+
async function toNode(value, device) {
|
|
14
|
+
return Node.from(await value.evaluate(dom.Native.fromNode), device);
|
|
15
|
+
}
|
|
16
|
+
Puppeteer.toNode = toNode;
|
|
17
|
+
async function toPage(value) {
|
|
18
|
+
const nodeJSON = await value.evaluate(dom.Native.fromNode);
|
|
19
|
+
const deviceJSON = await value
|
|
20
|
+
.evaluateHandle(() => window)
|
|
21
|
+
.then((handle) => handle.evaluate(device.Native.fromWindow));
|
|
22
|
+
const pageDevice = Device.from(deviceJSON);
|
|
23
|
+
return Page.of(Request.empty(), Response.empty(), nodeJSON.type === "document"
|
|
24
|
+
? Document.from(nodeJSON, pageDevice)
|
|
25
|
+
: Document.of([Node.from(nodeJSON, pageDevice)]), pageDevice);
|
|
26
|
+
}
|
|
27
|
+
Puppeteer.toPage = toPage;
|
|
28
|
+
})(Puppeteer || (Puppeteer = {}));
|
|
29
|
+
//# sourceMappingURL=puppeteer.js.map
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json.schemastore.org/package",
|
|
3
|
+
"name": "@siteimprove/alfa-puppeteer",
|
|
4
|
+
"homepage": "https://alfa.siteimprove.com",
|
|
5
|
+
"version": "0.72.2",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"description": "Integrations and utilities for the Puppeteer browser automation library",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "github:Siteimprove/alfa-integrations",
|
|
11
|
+
"directory": "packages/alfa-puppeteer"
|
|
12
|
+
},
|
|
13
|
+
"bugs": "https://github.com/siteimprove/alfa/issues",
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=20.0.0"
|
|
16
|
+
},
|
|
17
|
+
"type": "module",
|
|
18
|
+
"main": "dist/index.js",
|
|
19
|
+
"types": "dist/index.d.ts",
|
|
20
|
+
"files": [
|
|
21
|
+
"dist/**/*.js",
|
|
22
|
+
"dist/**/*.d.ts"
|
|
23
|
+
],
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@siteimprove/alfa-device": "^0.92.0",
|
|
26
|
+
"@siteimprove/alfa-dom": "^0.92.0",
|
|
27
|
+
"@siteimprove/alfa-http": "^0.92.0",
|
|
28
|
+
"@siteimprove/alfa-web": "^0.92.0",
|
|
29
|
+
"puppeteer": "^22.14.0"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"@siteimprove/alfa-device": "^0.92.0",
|
|
33
|
+
"@siteimprove/alfa-dom": "^0.92.0",
|
|
34
|
+
"@siteimprove/alfa-http": "^0.92.0",
|
|
35
|
+
"@siteimprove/alfa-web": "^0.92.0"
|
|
36
|
+
},
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public",
|
|
39
|
+
"registry": "https://npm.pkg.github.com/"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@siteimprove/alfa-test": "^0.92.0"
|
|
43
|
+
}
|
|
44
|
+
}
|