Skip to content

Conversation

@RobbieTheWagner
Copy link
Contributor

@RobbieTheWagner RobbieTheWagner commented Aug 26, 2025

This builds upon the work in #420 and converts ember-orbit to be a v2 addon.

There are several breaking changes involved here:

  • Services, folder names, etc are no longer configurable to simplify registering everything and be compatible with vite
  • Initializers have been removed in favor of calling setupOrbit manually in consuming apps
  • A custom orbitRegistry now exists for registering models etc
  • Requires Ember 4.12+

Comment on lines +102 to +85
orbitRegistry.schemaVersion = config?.schemaVersion;
injectModules(modules);
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd call this "build internal registry" or something similar -- injection is like, using the @service decorator to pull something in, but 🤷


export function applyStandardSourceInjections(
injections: RecordSourceSettings,
): void {
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe for a followup, I think using the service decorator directly in each thing that uses this would be clearer.

This pattern sort of is re-creating the implicit injections we used to have an application initializers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is to pass things to the underlying orbit things. It's not services.

{
...dataModels,
...dataSources,
...dataStrategies,
Copy link
Contributor

Choose a reason for hiding this comment

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

this is maybe stylistic, but I'd inline the import.meta.globs here

@RobbieTheWagner RobbieTheWagner changed the title Convert to v2 addon Convert to v2 addon, require Ember 4.12+ Sep 28, 2025
Copy link
Member

@dgeb dgeb left a comment

Choose a reason for hiding this comment

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

Looks good to me!

CONTRIBUTING.md Outdated

- `git clone <repository-url>`
- `cd ember-orbit`
- `cd `
Copy link
Member

Choose a reason for hiding this comment

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

Is this intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, no it is not! Will fix. Thanks!

@RobbieTheWagner RobbieTheWagner merged commit 23ce42f into main Oct 6, 2025
10 checks passed
@RobbieTheWagner RobbieTheWagner deleted the addon-v2 branch October 6, 2025 13:45
@github-actions github-actions bot mentioned this pull request Oct 6, 2025
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.

4 participants