Skip to content

Conversation

@BeksOmega
Copy link
Contributor

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Resolves

N/A

Proposed Changes

This is clean up from #6120

  • Indicates for conventional commits that this is a breaking change.
  • Properly adds the renaming to the renaming file.

Behavior Before Change

Before it was possible to access the global-this via Blockly.utils.global.

Behavior After Change

Now the global-this should be accessed via globalThis

Reason for Changes

Providing access to the global this is not Blockly's responsibility. And polyfills will make it accessible to Blockly's internal code.

Test Coverage

Tested that this renaming works by:

  1. Creating a test renaming file that looks like:
{
  '1.0.0': [
    {
      'oldName': 'Blockly.utils.global'
      'newPath': 'globalThis'
    }
  ]
}
  1. Created a test file that had Blockly.utils.global in it.
  2. Ran the renamings script using those files.
  3. Saw that Blockly.utils.global was properly changed to globalThis

Documentation

N/A

To Migrate

Rename all instances of Blockly.utils.global to globalThis. You can do this automatically using the blockly/migrate script.

@BeksOmega BeksOmega requested a review from a team as a code owner June 10, 2022 16:11
@BeksOmega BeksOmega requested a review from gonfunko June 10, 2022 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants