Merge pull request #12423 from Snuffleupagus/escodegen-2

Update `escodegen` to version 2.0
This commit is contained in:
Tim van der Meij 2020-09-29 22:27:42 +02:00 committed by GitHub
commit 8fa4e48f46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 6 deletions

View File

@ -224,6 +224,12 @@ function createWebpackConfig(defines, output) {
loose: true,
},
],
[
"@babel/plugin-proposal-optional-chaining",
{
loose: true,
},
],
"@babel/plugin-transform-modules-commonjs",
[
"@babel/plugin-transform-runtime",

16
package-lock.json generated
View File

@ -4468,16 +4468,24 @@
"dev": true
},
"escodegen": {
"version": "1.14.3",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz",
"integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz",
"integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==",
"dev": true,
"requires": {
"esprima": "^4.0.1",
"estraverse": "^4.2.0",
"estraverse": "^5.2.0",
"esutils": "^2.0.2",
"optionator": "^0.8.1",
"source-map": "~0.6.1"
},
"dependencies": {
"estraverse": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
"integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
"dev": true
}
}
},
"eslint": {

View File

@ -4,6 +4,7 @@
"devDependencies": {
"@babel/core": "^7.11.6",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.4",
"@babel/plugin-proposal-optional-chaining": "^7.11.0",
"@babel/plugin-transform-modules-commonjs": "^7.10.4",
"@babel/plugin-transform-runtime": "^7.11.5",
"@babel/preset-env": "^7.11.5",
@ -15,7 +16,7 @@
"core-js": "^3.6.5",
"cross-env": "^7.0.2",
"es-module-shims": "^0.4.7",
"escodegen": "^1.14.3",
"escodegen": "^2.0.0",
"eslint": "^7.9.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-fetch-options": "^0.0.5",

View File

@ -846,7 +846,7 @@ const PDFViewerApplication = {
return undefined; // Ignore errors for previously opened PDF files.
}
const message = exception && exception.message;
const message = exception?.message;
let loadingErrorMessage;
if (exception instanceof InvalidPDFException) {
// change error message also for other builds