Skip to content

Commit b6b1d1a

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 e744e65 commit b6b1d1a

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ jobs:
7373

7474
# existing monorepo
7575
- monorepo with npm
76-
- monorepo with yarn
7776
- monorepo with pnpm
7877

7978
# build-only tests for testing if the rollup config works at all
@@ -104,7 +103,6 @@ jobs:
104103
matrix:
105104
slow-test:
106105
- defaults with npm
107-
- defaults with yarn
108106
- defaults with pnpm
109107
steps:
110108
- uses: actions/checkout@v4
@@ -129,7 +127,6 @@ jobs:
129127
matrix:
130128
slow-test:
131129
- typescript with npm
132-
- typescript with yarn
133130
- typescript with pnpm
134131
steps:
135132
- uses: actions/checkout@v4

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 ? 'pnpm@10.0.0' : 'npm@11.0.0' %>",
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)