From 13dbbdcfb00b8dba795a1bdd829c65591cf38a6c Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sun, 30 May 2021 16:08:54 +0200 Subject: [PATCH 1/2] Remove the `-es5`/`-legacy` special handling in the `gulp wintersmith` task (PR 12978 follow-up) With the stable version now being `2.8.335`, this work-around is no longer necessary. --- docs/contents/getting_started/index.md | 4 ++-- gulpfile.js | 14 -------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/docs/contents/getting_started/index.md b/docs/contents/getting_started/index.md index 4cbed20651b50..38eb05a7259ba 100644 --- a/docs/contents/getting_started/index.md +++ b/docs/contents/getting_started/index.md @@ -54,8 +54,8 @@ Before downloading PDF.js please take a moment to understand the different layer Includes the generic build of PDF.js and the viewer.

- Stable (vSTABLE_VERSION) - Beta (vBETA_VERSION) + Stable (vSTABLE_VERSION) + Beta (vBETA_VERSION)
diff --git a/gulpfile.js b/gulpfile.js index e49c0777e0e5a..ed35449f25f13 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1907,20 +1907,6 @@ gulp.task("wintersmith", function (done) { } const { stableVersion, betaVersion } = config; - // Create appropriate file names for the legacy builds. This logic can be - // removed and/or simplified, once the stable version is past the cutoff. - const CUTOFF_VERSION = "2.7.570"; - replaceInFile( - GH_PAGES_DIR + "/getting_started/index.html", - /STABLE_VERSION_LEGACY/g, - stableVersion + (stableVersion <= CUTOFF_VERSION ? "-es5" : "-legacy") - ); - replaceInFile( - GH_PAGES_DIR + "/getting_started/index.html", - /BETA_VERSION_LEGACY/g, - betaVersion + (betaVersion <= CUTOFF_VERSION ? "-es5" : "-legacy") - ); - replaceInFile( GH_PAGES_DIR + "/getting_started/index.html", /STABLE_VERSION/g, From d8a7c75b4a7ca296bc9c6db46dbe4b45d347d5b0 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sun, 30 May 2021 16:35:21 +0200 Subject: [PATCH 2/2] Revert "Add `deprecated` handling of the now removed `AnnotationStorage` API-parameters" (PR 13207 follow-up) This reverts commit 737a8e846d35e146895e409baadaf7b4243c5b54, since it's included in the latest beta version `2.9.359`. --- src/display/api.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/display/api.js b/src/display/api.js index 015a526dcf051..5e28744685964 100644 --- a/src/display/api.js +++ b/src/display/api.js @@ -962,12 +962,6 @@ class PDFDocumentProxy { * {Uint8Array} containing the full data of the saved document. */ saveDocument() { - if ( - (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) && - arguments.length > 0 - ) { - deprecated("saveDocument no longer accepts any options."); - } if ( (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) && this._transport.annotationStorage.size <= 0 @@ -1282,16 +1276,6 @@ class PDFPageProxy { includeAnnotationStorage = false, optionalContentConfigPromise = null, }) { - if ( - (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) && - arguments[0]?.annotationStorage !== undefined - ) { - deprecated( - "render no longer accepts an `annotationStorage` option, " + - "please use the `includeAnnotationStorage`-boolean instead." - ); - includeAnnotationStorage ||= !!arguments[0].annotationStorage; - } if (this._stats) { this._stats.time("Overall"); }