Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Rename service to inject when needed #2

Merged
merged 1 commit into from
Jan 31, 2022

Conversation

Windvis
Copy link
Member

@Windvis Windvis commented Jan 9, 2022

This adds a Babel plugin which renames service imports to inject if the current Ember version doesn't support this import yet.

This is a polyfill for RFC 752. More information can be found in the RFC PR: emberjs/rfcs#752

This adds a Babel plugin which renames `service` imports to `inject` if the current Ember version doesn't support this import yet.

This is a polyfill for RFC 752. More information can be found in the RFC PR: emberjs/rfcs#752
@Windvis
Copy link
Member Author

Windvis commented Jan 10, 2022

We're running into issues on older Ember versions that use babel-plugin-ember-modules-api-polyfill since this new service export isn't added to the ember-cli/ember-rfc176-data#417 repo yet.

It seems the ember-cached-decorator-polyfill ran into the same issue so worst case we can do something similar to what they did there?

@Windvis
Copy link
Member Author

Windvis commented Jan 31, 2022

It seems that supporting versions older than 3.27 isn't really an option with the current ember-cli-babel implementation. The hack that was used for the ember-cached-decorator-polyfill no longer works and there doesn't seem to be a good alternative either. The question is... do we still release it for 3.27 and 3.28 LTS or is it really not worth it for only a couple of releases?

@Windvis Windvis merged commit 097059a into main Jan 31, 2022
@Windvis Windvis deleted the feature/rename-service-import-babel-plugin branch January 31, 2022 18:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant