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

Add useEmberModule option to force ember module usage (to avoid global window.Ember deprecation on Ember 3.27+). #175

Merged

Conversation

NullVoxPopuli
Copy link
Contributor

Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also needs to add ember import when it replaces other imports.

Test case:

// input
import Component from '@ember/component';

export default class extends Component {}
// output
import Ember from 'ember';

export default class extends Ember.Component {}

src/index.js Outdated Show resolved Hide resolved
NullVoxPopuli and others added 2 commits February 15, 2021 13:29
* Ensure import is only added if needed
* Use `scope.generateUidIdentifier` to create the new local when needed
* Ensure the identifier rewriting code uses the correct identifier
@rwjblue rwjblue force-pushed the add-option-to-preserve-ember-import branch from 6408f46 to 61b457e Compare February 15, 2021 18:31
@rwjblue
Copy link
Member

rwjblue commented Feb 15, 2021

Fixed a few issues and updated (along with a rebase).

@rwjblue rwjblue merged commit 51a9b4b into ember-cli:master Feb 16, 2021
@rwjblue rwjblue changed the title Add option to preserve import Ember from 'ember'; Add option to force ember module usage (to avoid global window.Ember deprecation on Ember 3.27+). Feb 16, 2021
@rwjblue rwjblue changed the title Add option to force ember module usage (to avoid global window.Ember deprecation on Ember 3.27+). Add useEmberModule option to force ember module usage (to avoid global window.Ember deprecation on Ember 3.27+). Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants