Skip to content

Commit

Permalink
ember-source is required for babel-plugin-ember-template-compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Nov 9, 2024
1 parent 6598c3c commit eaa266a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions files/__addonLocation__/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"<% } %>,
Expand Down Expand Up @@ -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",
Expand Down
8 changes: 6 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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
Expand Down Expand Up @@ -386,4 +391,3 @@ function isYarn(options) {
function isNpm(options) {
return options.packageManager === 'npm' || options.npm;
}

0 comments on commit eaa266a

Please sign in to comment.