Build Tooling: Avoid .default
on browser global assignments
#12006
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related: #11825 (comment)
This pull request seeks to correct wrongly-assigned
.default
values on browser-assigned globals. In master you will observe both awp.tokenList.default
and awp.coreData.default
.This was discovered with the following console code:
Open question: These are technically breaking changes, though very much of the "this was obviously always broken" sort. We don't use
core-data
's default export anywhere, nor should anyone. Should we have any deprecation process here?Testing instructions:
Verify that
wp.tokenList
is the default exported function.Verify there is no
wp.coreData
.Follow-up tasks:
As noted at #11825 (comment) and similarly considered in Slack (link requires registration), we should consider correcting the naming of
tokenList
andescapeHtml
.