mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-07-11 01:25:48 +02:00
Merge pull request #21018 from Snuffleupagus/Node-22
[api-minor] Update the minimum supported Node.js version to 22
This commit is contained in:
commit
5aaf30a071
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -11,7 +11,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [20, 22, 24, 25]
|
node-version: [22, 24, 25]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
|||||||
@ -87,7 +87,7 @@ const ENV_TARGETS = [
|
|||||||
"Chrome >= 118",
|
"Chrome >= 118",
|
||||||
"Firefox ESR",
|
"Firefox ESR",
|
||||||
"Safari >= 16.4",
|
"Safari >= 16.4",
|
||||||
"Node >= 20",
|
"Node >= 22",
|
||||||
"> 1%",
|
"> 1%",
|
||||||
"not IE > 0",
|
"not IE > 0",
|
||||||
"not dead",
|
"not dead",
|
||||||
@ -2500,7 +2500,7 @@ function packageJson() {
|
|||||||
url: `git+${DIST_GIT_URL}`,
|
url: `git+${DIST_GIT_URL}`,
|
||||||
},
|
},
|
||||||
engines: {
|
engines: {
|
||||||
node: ">=20.19.0 || >=22.13.0 || >=24",
|
node: ">=22.13.0 || >=24",
|
||||||
},
|
},
|
||||||
scripts: {},
|
scripts: {},
|
||||||
};
|
};
|
||||||
|
|||||||
2
package-lock.json
generated
2
package-lock.json
generated
@ -71,7 +71,7 @@
|
|||||||
"webpack-stream": "^7.0.0"
|
"webpack-stream": "^7.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20.19.0 || >=22.13.0 || >=24"
|
"node": ">=22.13.0 || >=24"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/code-frame": {
|
"node_modules/@babel/code-frame": {
|
||||||
|
|||||||
@ -70,7 +70,7 @@
|
|||||||
"url": "git://github.com/mozilla/pdf.js.git"
|
"url": "git://github.com/mozilla/pdf.js.git"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20.19.0 || >=22.13.0 || >=24"
|
"node": ">=22.13.0 || >=24"
|
||||||
},
|
},
|
||||||
"license": "Apache-2.0"
|
"license": "Apache-2.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,20 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
||||||
// eslint-disable-next-line no-var
|
var compatParams = new Map(); // eslint-disable-line no-var
|
||||||
var compatParams = new Map();
|
|
||||||
if (
|
|
||||||
typeof PDFJSDev !== "undefined" &&
|
|
||||||
PDFJSDev.test("LIB") &&
|
|
||||||
!globalThis.navigator?.language
|
|
||||||
) {
|
|
||||||
globalThis.navigator = {
|
|
||||||
language: "en-US",
|
|
||||||
maxTouchPoints: 1,
|
|
||||||
platform: "",
|
|
||||||
userAgent: "",
|
|
||||||
};
|
|
||||||
}
|
|
||||||
const { maxTouchPoints, platform, userAgent } = navigator;
|
const { maxTouchPoints, platform, userAgent } = navigator;
|
||||||
|
|
||||||
const isAndroid = /Android/.test(userAgent);
|
const isAndroid = /Android/.test(userAgent);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user