mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-09-24 23:01:18 +08:00
chore(deps): update puppeteer (#55427)
This commit is contained in:
@@ -128,7 +128,6 @@ jobs:
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: pnpm
|
||||
|
||||
- name: Set Environment variables
|
||||
run: |
|
||||
@@ -173,7 +172,6 @@ jobs:
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: pnpm
|
||||
|
||||
- name: Set Environment variables
|
||||
run: |
|
||||
@@ -221,7 +219,6 @@ jobs:
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: pnpm
|
||||
|
||||
- name: Set Environment variables
|
||||
run: |
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
"mocha": "10.3.0",
|
||||
"mock-require": "3.0.3",
|
||||
"ora": "5.4.1",
|
||||
"puppeteer": "10.4.0",
|
||||
"puppeteer": "22.12.1",
|
||||
"readdirp": "3.6.0",
|
||||
"string-similarity": "4.0.4",
|
||||
"unist-util-visit": "2.0.3"
|
||||
|
||||
@@ -144,7 +144,8 @@ async function setup() {
|
||||
// because Docker’s default for /dev/shm is 64MB
|
||||
'--disable-dev-shm-usage'
|
||||
// dumpio: true
|
||||
]
|
||||
],
|
||||
headless: 'new'
|
||||
});
|
||||
global.Worker = createPseudoWorker(await newPageContext(browser));
|
||||
|
||||
|
||||
@@ -68,9 +68,17 @@ function createPseudoWorker(context) {
|
||||
}
|
||||
try {
|
||||
await this.worker.then(worker =>
|
||||
worker
|
||||
.executionContext()
|
||||
.evaluate((worker, msg) => worker.postMessage(msg), worker, msg)
|
||||
// realm is a puppeteer internal that we're abusing. Fortunately, if
|
||||
// it they change it, our tests should catch it. Reason being, we have
|
||||
// tests that expect evaluate to raise errors and tests that expect it
|
||||
// not to, so any change should be detected.
|
||||
// The change was introduced in puppeteer 21.2.0 and you can see the
|
||||
// changes in https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v21.1.1...puppeteer-core-v21.2.0
|
||||
worker.realm.evaluate(
|
||||
(worker, msg) => worker.postMessage(msg),
|
||||
worker,
|
||||
msg
|
||||
)
|
||||
);
|
||||
} catch (e) {
|
||||
if (this.onerror) {
|
||||
|
||||
Generated
+410
-133
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user