Skip to content

Commit

Permalink
Add semverRange <=4.11.0 for ember-data
Browse files Browse the repository at this point in the history
  • Loading branch information
mkszepp committed Mar 3, 2023
1 parent 474084d commit 0df6d02
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit 0df6d02

Please sign in to comment.