From eaa266a5e52fe3154aed966f687844e572a29720 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Sat, 9 Nov 2024 14:23:48 -0500 Subject: [PATCH] ember-source is required for babel-plugin-ember-template-compilation --- files/__addonLocation__/package.json | 4 ++++ index.js | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/files/__addonLocation__/package.json b/files/__addonLocation__/package.json index 4e850d8..7ffb334 100644 --- a/files/__addonLocation__/package.json +++ b/files/__addonLocation__/package.json @@ -36,6 +36,9 @@ "@embroider/addon-shim": "^1.8.7", "decorator-transforms": "^2.0.0" }, + "peerDependencies": { + "ember-source": ">= <%= latestEmberSource %>" + }, "devDependencies": { "@babel/core": "^7.24.4", <% if (typescript) { %>"@babel/plugin-transform-typescript": "^7.24.4"<% } else { %>"@babel/eslint-parser": "^7.24.1"<% } %>, @@ -72,6 +75,7 @@ "@rollup/plugin-babel": "^6.0.4", "babel-plugin-ember-template-compilation": "^2.2.5", "concurrently": "^8.2.2", + "ember-source": "^<%= latestEmberSource %>", "ember-template-lint": "^6.0.0",<% if (packageManager === 'npm') { %> "ember-eslint-parser": "^0.4.2", <% } %>"eslint": "^8.56.0", diff --git a/index.js b/index.js index 4297a0e..ff9560d 100644 --- a/index.js +++ b/index.js @@ -286,6 +286,7 @@ module.exports = { pnpm: isPnpm(options), npm: isNpm(options), typescript: options.typescript, + latestEmberSource: '5.12.0', ext: options.typescript ? 'ts' : 'js', blueprint: 'addon', blueprintOptions: buildBlueprintOptions({ @@ -309,7 +310,11 @@ module.exports = { let files = this._super.files.apply(this, arguments); if (options.addonOnly) { - files = files.filter((filename) => filename.includes('__addonLocation__') || filesToCopyFromRootToAddonInAddonOnlyMode.includes(filename)); + files = files.filter( + (filename) => + filename.includes('__addonLocation__') || + filesToCopyFromRootToAddonInAddonOnlyMode.includes(filename), + ); } else { // filter out the addon-specific npmrc, as it // is only applicable during --addon-only @@ -386,4 +391,3 @@ function isYarn(options) { function isNpm(options) { return options.packageManager === 'npm' || options.npm; } -