pdf.js/external
Nicolò Ribaudo a352f28785
Fix transform of unary expression in Babel plugin
All of our static evaluation & dead-code elimination transforms need to
happen in post-order, transforming inner nodes first. This is so that
in complex nested cases all transforms see the simplified version of
their inner nodes.

For example:
  async getNimbusExperimentData() {
    if (!PDFJSDev.test("GECKOVIEW")) { return null; }
    // other code
  }
-> [evaluation of PDFJSDev.*]
  async getNimbusExperimentData() {
    if (!false) { return null; }
    // other code
  }
-> [!false -> true]
  async getNimbusExperimentData() {
    if (true) { return null; }
    // other code
  }
-> [if (true) -> replace with the if branch]
  async getNimbusExperimentData() {
    return null;
    // other code
  }
-> [early return -> remove dead code]
  async getNimbusExperimentData() {
    return null;
    // other code
  }

This was done correctly in all cases except for our `UnaryExpression`
transform, which was happening in pre-order.
2024-01-29 11:53:17 +01:00
..
bcmaps Removes external/cmaps; adds binary cmaps to the repo 2014-03-17 13:30:27 -05:00
builder Fix transform of unary expression in Babel plugin 2024-01-29 11:53:17 +01:00
cmapscompress [ESM] Convert the "cmaps"-task to use import() syntax 2023-07-08 18:52:58 +02:00
dist Rename *.d.ts to *.d.mts. Close #17241 2023-11-12 07:30:36 +09:00
importL10n Update the path to get all locales and update locales 2023-10-25 12:47:06 +02:00
quickjs Update quickjs to revision 2788d71e823b522b178db3b3660ce93689534e6d 2022-05-01 15:53:50 +02:00
standard_fonts [api-minor] Use a local font or fallback on an embedded one (if it exists) for non-embedded fonts (bug 1766039) 2023-05-10 14:10:23 +02:00
.eslintrc Enable unicorn/prefer-at unconditionally (PR 15014 follow-up) 2023-05-07 13:43:19 +02:00
.gitignore Removes external/cmaps; adds binary cmaps to the repo 2014-03-17 13:30:27 -05:00