diff --git a/packages/compat/src/addon-dependency-rules/ember-data.ts b/packages/compat/src/addon-dependency-rules/ember-data.ts index 8fa811a22..91a7fec7a 100644 --- a/packages/compat/src/addon-dependency-rules/ember-data.ts +++ b/packages/compat/src/addon-dependency-rules/ember-data.ts @@ -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'], diff --git a/packages/compat/src/compat-adapters/ember-data.ts b/packages/compat/src/compat-adapters/ember-data.ts index a880fd4d3..417b5d848 100644 --- a/packages/compat/src/compat-adapters/ember-data.ts +++ b/packages/compat/src/compat-adapters/ember-data.ts @@ -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 @@ -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 {