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 3.27+ issues deprecation for accessing window.Ember #600

Open
rwjblue opened this issue Mar 19, 2021 · 1 comment
Open

Ember 3.27+ issues deprecation for accessing window.Ember #600

rwjblue opened this issue Mar 19, 2021 · 1 comment

Comments

@rwjblue
Copy link
Member

rwjblue commented Mar 19, 2021

The code here:

var Promise = originalGlobal.Ember.RSVP.Promise;

Accesses window.Ember, which on Ember 3.27 and higher issues a deprecation.

@rwjblue
Copy link
Member Author

rwjblue commented Mar 19, 2021

I think the best fix for this (that would support both older Ember and newer) would be to change our .transpileTree invocation to actually transpile modules for us:

ember-fetch/index.js

Lines 124 to 128 in eaf18b6

browserTree = debug(babelAddon.transpileTree(browserTree, {
'ember-cli-babel': {
compileModules: false,
},
}), 'after-babel');

Then we'd change our assets/browser-fetch.js.t to just use ES6 imports for Ember.

chancancode added a commit that referenced this issue Jun 1, 2021
A minimal fix for #600. We should probably follow through with the
refactor suggested by @rwjblue in #600 but that can be done later.
chancancode added a commit that referenced this issue Jun 1, 2021
A minimal fix for #600. We should probably follow through with the
refactor suggested by @rwjblue in #600 but that can be done later.
chancancode added a commit that referenced this issue Jun 1, 2021
A minimal fix for #600. We should probably follow through with the
refactor suggested by @rwjblue in #600 but that can be done later.
chancancode added a commit that referenced this issue Jun 2, 2021
A minimal fix for #600. We should probably follow through with the
refactor suggested by @rwjblue in #600 but that can be done later.
chancancode added a commit that referenced this issue Jun 2, 2021
A minimal fix for #600. We should probably follow through with the
refactor suggested by @rwjblue in #600 but that can be done later.
chancancode added a commit that referenced this issue Jun 2, 2021
A minimal fix for #600. We should probably follow through with the
refactor suggested by @rwjblue in #600 but that can be done later.

This is probably not very embroider friendly, but neither is the
current code. It's probably easier to just rewrite the shims in
terms of ES modules and embroider macros, i.e. what was suggested
in #337.
chancancode added a commit that referenced this issue Jun 2, 2021
A minimal fix for #600. We should probably follow through with the
refactor suggested by @rwjblue in #600 but that can be done later.

This is probably not very embroider friendly, but neither is the
current code. It's probably easier to just rewrite the shims in
terms of ES modules and embroider macros, i.e. what was suggested
in #337.
chancancode added a commit that referenced this issue Jun 2, 2021
A minimal fix for #600. We should probably follow through with the
refactor suggested by @rwjblue in #600 but that can be done later.

This is probably not very embroider friendly, but neither is the
current code. It's probably easier to just rewrite the shims in
terms of ES modules and embroider macros, i.e. what was suggested
in #337.
chancancode added a commit that referenced this issue Jun 2, 2021
A minimal fix for #600. We should probably follow through with the
refactor suggested by @rwjblue in #600 but that can be done later.

This is probably not very embroider friendly, but neither is the
current code. It's probably easier to just rewrite the shims in
terms of ES modules and embroider macros, i.e. what was suggested
in #337.
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

No branches or pull requests

1 participant