From 474084d700be7c5242ee27ad78dea46feefba9cd Mon Sep 17 00:00:00 2001 From: Markus Sanin Date: Tue, 28 Feb 2023 07:35:19 +0100 Subject: [PATCH 1/2] Add semverRange <=4.11.0 for ember-data --- packages/compat/src/addon-dependency-rules/ember-data.ts | 1 + 1 file changed, 1 insertion(+) 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'], From 0df6d02d9513e364d380bc73d34507347f938cb5 Mon Sep 17 00:00:00 2001 From: Markus Sanin Date: Fri, 3 Mar 2023 09:58:33 +0100 Subject: [PATCH 2/2] Add semverRange <=4.11.0 for ember-data --- packages/compat/src/compat-adapters/ember-data.ts | 5 +++++ 1 file changed, 5 insertions(+) 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 {