Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(tests): Introduce loading shims, use in playgrounds #7380

Merged
merged 9 commits into from
Aug 14, 2023

Commits on Aug 10, 2023

  1. Configuration menu
    Copy the full SHA
    8bb6ac5 View commit details
    Browse the repository at this point in the history
  2. fix(closure): Make safe to import in node.js

    Make the implementation declareModlueId safe to import and
    execute in node.js, which does not provide a window global.
    
    (N.B. because this is an ESM and therefore automatically
    strict, using window?.goog?.declareModuleId doesn't work
    because window being undefined is an early error.)
    cpcallen committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    cf460dc View commit details
    Browse the repository at this point in the history
  3. feat(tests): Introduce chunk loading shims

    - Add a buildShims task to build_tasks.js that, for each chunk,
      creates a correspondingly-named build/<chunk>.mjs that will
      either (in uncompressed mode) import and reexport that chunk's
      entry point module (e.g. core/blockly.js) or (in compressed
      mode) load dist/<chunk>_compressed.js using a <script> tag
      and then export the corresponding properties on the chunk's
      exports object.
    
    - Provide helper methods used by these shims in
      tests/scripts/loading.mjs, including code to detect whether
      to load in compressed or uncompressed mode.
    
    - Add a quote() function to scripts/helpers.js, used by
      buildShims.  This is copied from tests/bootstrap_helper.js,
      which will be removed in a later commit.
    cpcallen committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    64b531b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2883d16 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a25b2ed View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    dc5f42b View commit details
    Browse the repository at this point in the history
  7. chore(tests): Delete playgrounds/shared_procedures.html

    Shared procedure support was moved to a plugin and this should
    have been removed from core along with it.
    cpcallen committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    653e12f View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2023

  1. Configuration menu
    Copy the full SHA
    2e6b6f6 View commit details
    Browse the repository at this point in the history
  2. chore(tests): Add ".loader" infix to shim filenames.

    Per suggestion on PR google#7380, have buildShims name the shims
    ${chunk.name}.loader.mjs instead of just `${chunk.name}.mjs`.
    cpcallen committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    6f930f5 View commit details
    Browse the repository at this point in the history