Skip to content

Commit c042ef3

Browse files
Drop support for yarn@1, set packageManager field in package.json (pnpm 9.x, npm 11.x) (#322)
* Drop support for yarn@1, set packageManager field in package.json (pnpm 9.x, yarn 4.x, npm 11.x) * Set yarn version * Error when passing --yarn * set yarn to false * Remove yarn from ci * ope
1 parent b8b9f0b commit c042ef3

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

files/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"license": "MIT",
55
"author": "",
66
"scripts": {},
7+
"packageManager": "<%= pnpm ? '[email protected]' : '[email protected]' %>",
78
"devDependencies": {<% if (typescript) { %>
89
"@glint/core": "^1.2.1",<% } %>
910
"concurrently": "^8.2.0",

index.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,12 @@ module.exports = {
273273
.map(() => '..')
274274
.join('/');
275275

276+
if (isYarn(options)) {
277+
throw new Error(
278+
`Please do not generate this project with --yarn. Omit '--yarn' when generating this blueprint'`,
279+
);
280+
}
281+
276282
return {
277283
rootDirectory: directoryForPackageName(addonInfo.name.raw),
278284
addonInfo,
@@ -282,7 +288,7 @@ module.exports = {
282288
blueprintVersion: require('./package.json').version,
283289
year: date.getFullYear(),
284290
packageManager: options.packageManager,
285-
yarn: isYarn(options),
291+
yarn: false,
286292
pnpm: isPnpm(options),
287293
npm: isNpm(options),
288294
typescript: options.typescript,
@@ -292,11 +298,11 @@ module.exports = {
292298
[`--addon-location=${options.addonLocation}`]: options.addonLocation,
293299
[`--ci-provider=${options.ciProvider}`]: options.ciProvider,
294300
'--pnpm': isPnpm(options),
301+
'--npm': isNpm(options),
295302
'--release-it': options.releaseIt,
296303
[`--test-app-location=${options.testAppLocation}`]: options.testAppLocation,
297304
[`--test-app-name=${options.testAppName}`]: options.testAppName,
298305
'--typescript': options.typescript,
299-
'--yarn': isYarn(options),
300306
}),
301307
ciProvider: options.ciProvider,
302308
pathFromAddonToRoot,

0 commit comments

Comments
 (0)