Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: playcanvas/engine
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.19.3
Choose a base ref
...
head repository: playcanvas/engine
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.19.4
Choose a head ref
  • 2 commits
  • 3 files changed
  • 3 contributors

Commits on Jun 4, 2026

  1. fix(build): keep UMD exports overridable while preserving live bindin…

    …gs (#8839)
    
    * fix(build): keep UMD exports overridable while preserving live bindings
    
    #8837 fixed the live binding of mutable UMD exports (notably `pc.app`) by
    copying the esbuild namespace getters onto `exports` with
    `Object.defineProperties(exports, Object.getOwnPropertyDescriptors(pc))`.
    That made every export getter-only, which silently broke consumers that
    reassign members of the global `pc` namespace — e.g. the Editor's
    classic-script worker overrides `pc.createScript` / `pc.registerScript`.
    With the assignment failing, the engine's real `createScript` ran in the
    worker and threw `Cannot read properties of undefined (reading 'scripts')`
    from `AppBase.getApplication()` (no application exists in the worker).
    
    Wrap each export getter in an accessor that delegates reads to the live
    binding (so `pc.app` still updates) but also has a setter, so assignments
    like `pc.createScript = ...` redefine the property as a writable value and
    take effect again. Restores the writable-export behaviour of the pre-2.19
    (Rollup) UMD build without regressing the live-binding fix.
    
    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
    
    * docs/fix(build): address PR review on UMD footer
    
    - Point the override-regression reference to #8837 (the PR that made
      exports getter-only), not #8836 (the pc.app live-binding issue).
    - Preserve the original export's enumerability in the override setter
      instead of hardcoding `enumerable: true`, keeping attribute parity.
    
    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
    
    ---------
    
    Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
    Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
    3 people committed Jun 4, 2026
    Configuration menu
    Copy the full SHA
    09346d8 View commit details
    Browse the repository at this point in the history
  2. 2.19.4

    Martin Valigursky committed Jun 4, 2026
    Configuration menu
    Copy the full SHA
    d999442 View commit details
    Browse the repository at this point in the history
Loading