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

chore: hardcodes export-application-global #273

Merged
merged 1 commit into from Jul 4, 2023

Conversation

Pixelik
Copy link
Contributor

@Pixelik Pixelik commented Jun 15, 2023

Chore

export-application-global #273

  • removes ember-export-application-global dependency
  • creates export-application-global initializer
  • adds @ember/string dependency (used by the above initializer) as it's no longer available in Ember 5 internally
  • adds relevant tests
  • updates documentation

Details

ember-cli/ember-export-application-global has been deprecated and archived. But an exported application global is essential to an embedded SPA and therefore to ember-cli-embedded as well. So rather than adding a deprecated/archived module as a dependency to this addon, or to an app using this addon, this commit now hardcodes the export-application-global initializer into the ember-cli-embedded module itself, therefore removing the need for an external dependency

Behaviour

  • An application global will be exported and attached to the window, without the need to set { exportApplicationGlobal: true } in config/environment.js, as long as { embedded: delegateStart: true } is set in config/environment.js
  • To avoid breaking changes with existing config/environment.js files, { exportApplicationGlobal: false } will still work, even though there is no need for it

screenshots of updated docs:

Screenshot 2023-06-19 at 12 16 05 Screenshot 2023-06-19 at 12 16 22

@Pixelik Pixelik requested a review from a team as a code owner June 15, 2023 09:31
@Pixelik Pixelik self-assigned this Jun 15, 2023
@Pixelik
Copy link
Contributor Author

Pixelik commented Jun 15, 2023

Let me know if you agree with this.
I had some issues with the Typescript linter which I ignored.
I will write a test for this if you agree to move forward with this.
🙏 🙂

@Pixelik Pixelik force-pushed the fix/export-application-global branch from 9121154 to 1d2ecd9 Compare June 15, 2023 09:34
@Pixelik Pixelik changed the title fix: hardcodes export-application-global feat: hardcodes export-application-global Jun 15, 2023
@Pixelik Pixelik force-pushed the fix/export-application-global branch 2 times, most recently from 6e67b41 to 77047db Compare June 19, 2023 09:20
@Pixelik Pixelik changed the title feat: hardcodes export-application-global chore: hardcodes export-application-global Jun 19, 2023
@Pixelik Pixelik force-pushed the fix/export-application-global branch from 77047db to 543cb97 Compare June 19, 2023 15:23
package.json Show resolved Hide resolved
addon/initializers/export-application-global.ts Outdated Show resolved Hide resolved
@Pixelik Pixelik force-pushed the fix/export-application-global branch from 543cb97 to 45018ba Compare July 3, 2023 11:07
- declares export-application-global internally instead of using external archived dependency
@Pixelik Pixelik force-pushed the fix/export-application-global branch from 45018ba to b7f7a58 Compare July 3, 2023 11:08
@Pixelik Pixelik merged commit 434b3a3 into master Jul 4, 2023
10 checks passed
@Pixelik Pixelik deleted the fix/export-application-global branch July 4, 2023 08:03
@Pixelik Pixelik mentioned this pull request Aug 9, 2023
@MrChocolatine MrChocolatine added dependencies Changes that update a dependency file documentation labels Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Changes that update a dependency file documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants