Skip to content

Commit

Permalink
merge defaults in even for authored v2 apps, for now
Browse files Browse the repository at this point in the history
  • Loading branch information
ef4 committed Aug 9, 2024
1 parent 9892ac6 commit 610e409
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions packages/compat/src/compat-app-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,23 +494,25 @@ export class CompatAppBuilder {
pkgLayers.push(fastbootConfig.packageJSON);
}

let meta: AppMeta = {
type: 'app',
version: 2,
assets: assetPaths,
babel: {
filename: '_babel_config_.js',
isParallelSafe: true, // TODO
majorVersion: this.compatApp.babelMajorVersion(),
fileFilter: '_babel_filter_.js',
},
'root-url': this.rootURL(),
};

if ((this.origAppPackage.packageJSON['ember-addon']?.version ?? 0) < 2) {
// the app has no v2 metdata, so we must be auto-upgrading it
let meta: AppMeta = {
type: 'app',
version: 2,
assets: assetPaths,
babel: {
filename: '_babel_config_.js',
isParallelSafe: true, // TODO
majorVersion: this.compatApp.babelMajorVersion(),
fileFilter: '_babel_filter_.js',
},
'root-url': this.rootURL(),
'auto-upgraded': true,
};
pkgLayers.push({ 'ember-addon': meta });
meta['auto-upgraded'] = true;
}

pkgLayers.push({ 'ember-addon': meta });

return combinePackageJSON(...pkgLayers);
}

Expand Down

0 comments on commit 610e409

Please sign in to comment.