Skip to content

Commit

Permalink
Merge pull request ember-cli#10452 from bertdeblock/use-correct-packa…
Browse files Browse the repository at this point in the history
…ge-manager-for-concurrently-scripts

[BUGFIX] Make sure to use the correct package manager in concurrently scripts
  • Loading branch information
bertdeblock committed Apr 7, 2024
2 parents 0f7d0cc + 4f894a2 commit a2c4c0d
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 44 deletions.
1 change: 1 addition & 0 deletions blueprints/addon/index.js
Expand Up @@ -201,6 +201,7 @@ module.exports = {
lang: options.lang,
ciProvider: options.ciProvider,
typescript: options.typescript,
packageManager: options.packageManager ?? 'npm',
};
},

Expand Down
8 changes: 4 additions & 4 deletions blueprints/app/files/package.json
Expand Up @@ -12,17 +12,17 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint": "concurrently \"<%= packageManager %>:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.css\"",
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:css:fix": "concurrently \"<%= packageManager %>:lint:css -- --fix\"",
"lint:fix": "concurrently \"<%= packageManager %>:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix<% if (typescript) { %>",
"lint:types": "tsc --noEmit<% } %>",
"start": "ember serve",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test": "concurrently \"<%= packageManager %>:lint\" \"<%= packageManager %>:test:*\" --names \"lint,test:\"",
"test:ember": "ember test"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions blueprints/app/index.js
Expand Up @@ -78,6 +78,7 @@ module.exports = {
lang: options.lang,
ciProvider: options.ciProvider,
typescript: options.typescript,
packageManager: options.packageManager ?? 'npm',
};
},

Expand Down
8 changes: 4 additions & 4 deletions tests/fixtures/addon/pnpm/package.json
Expand Up @@ -14,16 +14,16 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.css\"",
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:css:fix": "concurrently \"pnpm:lint:css -- --fix\"",
"lint:fix": "concurrently \"pnpm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test": "concurrently \"pnpm:lint\" \"pnpm:test:*\" --names \"lint,test:\"",
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each"
},
Expand Down
8 changes: 4 additions & 4 deletions tests/fixtures/addon/typescript/package.json
Expand Up @@ -29,10 +29,10 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint": "concurrently \"yarn:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.css\"",
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:css:fix": "concurrently \"yarn:lint:css -- --fix\"",
"lint:fix": "concurrently \"yarn:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
Expand All @@ -41,7 +41,7 @@
"prepack": "tsc --project tsconfig.declarations.json",
"postpack": "rimraf declarations",
"start": "ember serve",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test": "concurrently \"yarn:lint\" \"yarn:test:*\" --names \"lint,test:\"",
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each"
},
Expand Down
8 changes: 4 additions & 4 deletions tests/fixtures/addon/yarn/package.json
Expand Up @@ -14,16 +14,16 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint": "concurrently \"yarn:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.css\"",
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:css:fix": "concurrently \"yarn:lint:css -- --fix\"",
"lint:fix": "concurrently \"yarn:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test": "concurrently \"yarn:lint\" \"yarn:test:*\" --names \"lint,test:\"",
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each"
},
Expand Down
8 changes: 4 additions & 4 deletions tests/fixtures/app/embroider-pnpm/package.json
Expand Up @@ -12,16 +12,16 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.css\"",
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:css:fix": "concurrently \"pnpm:lint:css -- --fix\"",
"lint:fix": "concurrently \"pnpm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test": "concurrently \"pnpm:lint\" \"pnpm:test:*\" --names \"lint,test:\"",
"test:ember": "ember test"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions tests/fixtures/app/embroider-yarn/package.json
Expand Up @@ -12,16 +12,16 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint": "concurrently \"yarn:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.css\"",
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:css:fix": "concurrently \"yarn:lint:css -- --fix\"",
"lint:fix": "concurrently \"yarn:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test": "concurrently \"yarn:lint\" \"yarn:test:*\" --names \"lint,test:\"",
"test:ember": "ember test"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions tests/fixtures/app/pnpm/package.json
Expand Up @@ -12,16 +12,16 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.css\"",
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:css:fix": "concurrently \"pnpm:lint:css -- --fix\"",
"lint:fix": "concurrently \"pnpm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test": "concurrently \"pnpm:lint\" \"pnpm:test:*\" --names \"lint,test:\"",
"test:ember": "ember test"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions tests/fixtures/app/typescript-embroider/package.json
Expand Up @@ -12,17 +12,17 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint": "concurrently \"yarn:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.css\"",
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:css:fix": "concurrently \"yarn:lint:css -- --fix\"",
"lint:fix": "concurrently \"yarn:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"lint:types": "tsc --noEmit",
"start": "ember serve",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test": "concurrently \"yarn:lint\" \"yarn:test:*\" --names \"lint,test:\"",
"test:ember": "ember test"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions tests/fixtures/app/typescript/package.json
Expand Up @@ -12,17 +12,17 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint": "concurrently \"yarn:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.css\"",
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:css:fix": "concurrently \"yarn:lint:css -- --fix\"",
"lint:fix": "concurrently \"yarn:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"lint:types": "tsc --noEmit",
"start": "ember serve",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test": "concurrently \"yarn:lint\" \"yarn:test:*\" --names \"lint,test:\"",
"test:ember": "ember test"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions tests/fixtures/app/yarn-travis/package.json
Expand Up @@ -12,16 +12,16 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint": "concurrently \"yarn:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.css\"",
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:css:fix": "concurrently \"yarn:lint:css -- --fix\"",
"lint:fix": "concurrently \"yarn:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test": "concurrently \"yarn:lint\" \"yarn:test:*\" --names \"lint,test:\"",
"test:ember": "ember test"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions tests/fixtures/app/yarn/package.json
Expand Up @@ -12,16 +12,16 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint": "concurrently \"yarn:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.css\"",
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:css:fix": "concurrently \"yarn:lint:css -- --fix\"",
"lint:fix": "concurrently \"yarn:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test": "concurrently \"yarn:lint\" \"yarn:test:*\" --names \"lint,test:\"",
"test:ember": "ember test"
},
"devDependencies": {
Expand Down

0 comments on commit a2c4c0d

Please sign in to comment.