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

Dont change global promise props #1294

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Dec 11, 2023

  1. Don't patch Promise.all, Promise.race, etc.

    This commit fails for 2 tests representing apps that imports Promise from a promise polyfill instead of just using the global Promise.
    
    Many apps and libs are still importing Promise from a polyfill to make them work on IE11. If these apps are doing Promise.resolve() or similar using the imported Promise constructor, we will not be able to track the ongoing transaction or liveQuery context if this commit is released.
    
    Those apps will need to drag down the promise polyfill in a plain script tag instead of importing from the polyfill. The webpacked code must use the global Promise and not an imported one at any time within Dexie transactions and liveQuery querier functions.
    
    This commit should be released in a new major version of Dexie with clear instrutions of how to migrate Promise polyfill dependent code.
    
    We could also make an intermediate fix that is backward compliant but warns in console if they are using import polyfill-pattern (not part of this commit).
    
    The upsides with this commit are:
    * Optimization: We only switch self.Promise between zones.
    * Simplicity: Less code
    * Unobtrusiveness
    dfahlander committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    c563130 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2de7913 View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2023

  1. Remove unused code

    dfahlander committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    4aba3e8 View commit details
    Browse the repository at this point in the history