Skip to content

Commit

Permalink
Merge pull request #13465 from Snuffleupagus/misc-legacy-cleanup
Browse files Browse the repository at this point in the history
Some `-es5`/`-legacy` renaming clean-up, and `deprecated` API options removal (PR 12978, PR 13207 follow-up)
  • Loading branch information
timvandermeij authored May 30, 2021
2 parents a592bea + d8a7c75 commit dd0014e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 32 deletions.
4 changes: 2 additions & 2 deletions docs/contents/getting_started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
</p>
<span class="GROUP_CLASS">
<a type="button" class="btn btn-primary" href="https://github.com/mozilla/pdf.js/releases/download/vSTABLE_VERSION/pdfjs-STABLE_VERSION_LEGACY-dist.zip">Stable (vSTABLE_VERSION)</a>
<a type="button" class="btn btn-warning HIDDEN_CLASS" href="https://github.com/mozilla/pdf.js/releases/download/vBETA_VERSION/pdfjs-BETA_VERSION_LEGACY-dist.zip">Beta (vBETA_VERSION)</a>
<a type="button" class="btn btn-primary" href="https://github.com/mozilla/pdf.js/releases/download/vSTABLE_VERSION/pdfjs-STABLE_VERSION-legacy-dist.zip">Stable (vSTABLE_VERSION)</a>
<a type="button" class="btn btn-warning HIDDEN_CLASS" href="https://github.com/mozilla/pdf.js/releases/download/vBETA_VERSION/pdfjs-BETA_VERSION-legacy-dist.zip">Beta (vBETA_VERSION)</a>
</span>
</div>
<div class="col-md-4">
Expand Down
14 changes: 0 additions & 14 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
16 changes: 0 additions & 16 deletions src/display/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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");
}
Expand Down

0 comments on commit dd0014e

Please sign in to comment.