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

Ember Ember 3.27+ can determine global for template compilation #663

Merged
merged 2 commits into from
Feb 26, 2021

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Feb 26, 2021

Ensure Ember 3.27+ can determine global for template compilation.

Node 12+ has access to globalThis (including within a VM context), but older versions do not.

Due to the detection done in https://git.io/Jtb7s, when we can't find globalThis (and don't define global global) evaluating ember-template-compiler.js throws an error "unable to locate global object".

This ensures that either globalThis or global are defined.

Fixes emberjs/ember.js#19431

Node 12+ has access to `globalThis` (including within a VM context), but
older versions do not.

Due to the detection done in https://git.io/Jtb7s, when we can't find
`globalThis` (and don't define `global` global) evaluating
`ember-template-compiler.js` throws an error "unable to locate global
object".

This ensures that either `globalThis` or `global` are defined.
This would have caught the error reported in
emberjs/ember.js#19431, we should run with the
lowest supported Node version.
@rwjblue rwjblue added the bug label Feb 26, 2021
@rwjblue rwjblue merged commit a7f8a7b into master Feb 26, 2021
@delete-merged-branch delete-merged-branch bot deleted the ensure-global-can-be-found-for-canary branch February 26, 2021 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Canary fails build with "unable to locate global object"
1 participant