Skip to content

[CLEANUP] Cleanup "octane edition" code - #20863

Merged
ef4 merged 1 commit into
emberjs:mainfrom
Windvis:octane-edition-cleanup
Mar 8, 2025
Merged

ef4 merged 1 commit into
emberjs:mainfrom
Windvis:octane-edition-cleanup

Conversation

@Windvis

@Windvis Windvis commented Mar 3, 2025

Copy link
Copy Markdown
Contributor

Octane has been the default for multiple major versions, so we can remove and simplify the code.

@Windvis Windvis changed the title Cleanup octane edition code Cleanup "octane edition" code Mar 3, 2025
@Windvis Windvis changed the title Cleanup "octane edition" code [CLEANUP] Cleanup "octane edition" code Mar 3, 2025
Octane has been the default for multiple major versions, so we can remove and simplify the code.
@Windvis
Windvis force-pushed the octane-edition-cleanup branch from 7b0511f to faffa24 Compare March 3, 2025 09:56
@Windvis
Windvis marked this pull request as ready for review March 3, 2025 09:57
Comment thread lib/index.js
Comment on lines -92 to -121
let message = [];

if (optionalFeaturesMissing) {
message.push(
`* the @ember/optional-features addon is missing, run \`ember install @ember/optional-features\` to install it`
);
}

if (message.length > 0) {
message.unshift(
`You have configured your application to indicate that it is using the 'octane' edition (via \`setEdition('octane')\`), but the appropriate Octane features were not enabled:\n`
);

throw new SilentError(message.join('\n\t'));
}
} else {
throw new SilentError(
'The Ember Classic edition has been removed. Specifying "classic" in your package.json, or not specifying a value at all, is no longer supported. You must explicitly set the "ember.edition" property to "octane". You can also run `npx @ember/octanify` to do this. \n\nFor more information, see the deprecation guide: https://deprecations.emberjs.com/v3.x/#toc_editions-classic'
);
}

if (
!optionalFeaturesMissing &&
optionalFeatures.isFeatureEnabled('jquery-integration') &&
typeof optionalFeatures.isFeatureExplicitlySet === 'function' &&
optionalFeatures.isFeatureExplicitlySet('jquery-integration')
) {
throw new SilentError(
'Setting the `jquery-integration` optional feature flag to `true` was deprecated in Ember 3.x and removed in Ember 4.0.0. You must add the `@ember/optional-features` addon and set this feature to `false`.\n\nFor more information, see the deprecation guide: https://deprecations.emberjs.com/v3.x/#toc_optional-feature-jquery-integration'
);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not sure about this change. I think we can simply remove these errors, but we could also keep them around (without the octane check).

@NullVoxPopuli NullVoxPopuli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@ef4
ef4 merged commit 3e61562 into emberjs:main Mar 8, 2025
@Windvis
Windvis deleted the octane-edition-cleanup branch March 8, 2025 15:13
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

Successfully merging this pull request may close these issues.

3 participants