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 semverRange <=4.11.0 for ember-data #1369

Merged
merged 2 commits into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/compat/src/addon-dependency-rules/ember-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { PackageRules } from '..';
let rules: PackageRules[] = [
{
package: '@ember-data/store',
semverRange: '<=4.11.0',
addonModules: {
'-private.js': {
dependsOnModules: ['@ember-data/record-data/-private'],
Expand Down
5 changes: 5 additions & 0 deletions packages/compat/src/compat-adapters/ember-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { join } from 'path';
import { Memoize } from 'typescript-memoize';
import { Node } from 'broccoli-node-api';
import { sync as resolveSync } from 'resolve';
import semver from 'semver';

export class EmberDataBase extends V1Addon {
// May of the ember-data packages use rollup to try to hide their internal
Expand All @@ -14,6 +15,10 @@ export class EmberDataBase extends V1Addon {
customizes(...names: string[]) {
return super.customizes(...names.filter(n => n !== 'treeForAddon'));
}

static shouldApplyAdapter(addonInstance: any) {
return semver.lt(addonInstance.pkg.version, '4.11.1');
}
}

export default class EmberData extends EmberDataBase {
Expand Down