Skip to content

Commit

Permalink
Don't apply the ember-get-config compat adapter when >= v2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bertdeblock committed Jun 29, 2022
1 parent 7f4ae90 commit c801ec1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/compat/src/compat-adapters/ember-get-config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import V1Addon from '../v1-addon';
import writeFile from 'broccoli-file-creator';
import mergeTrees from 'broccoli-merge-trees';
import semver from 'semver';

function createIndexContents(config: any): string {
return `export default ${JSON.stringify(config)};`;
Expand Down Expand Up @@ -28,4 +29,10 @@ export default class extends V1Addon {
writeFile('package.json', JSON.stringify(this.newPackageJSON, null, 2)),
]);
}

// v2.1.0 now behaves the same under Embroider as it does in a classic build:
// https://github.com/mansona/ember-get-config/pull/45
static shouldApplyAdapter(addonInstance: any) {
return semver.lt(addonInstance.pkg.version, '2.1.0');
}
}

0 comments on commit c801ec1

Please sign in to comment.