Skip to content

Commit

Permalink
Drop support for yarn@1, set packageManager field in package.json (pn…
Browse files Browse the repository at this point in the history
…pm 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
  • Loading branch information
NullVoxPopuli authored Jan 14, 2025
1 parent e744e65 commit b6b1d1a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ jobs:

# existing monorepo
- monorepo with npm
- monorepo with yarn
- monorepo with pnpm

# build-only tests for testing if the rollup config works at all
Expand Down Expand Up @@ -104,7 +103,6 @@ jobs:
matrix:
slow-test:
- defaults with npm
- defaults with yarn
- defaults with pnpm
steps:
- uses: actions/checkout@v4
Expand All @@ -129,7 +127,6 @@ jobs:
matrix:
slow-test:
- typescript with npm
- typescript with yarn
- typescript with pnpm
steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"license": "MIT",
"author": "",
"scripts": {},
"packageManager": "<%= pnpm ? '[email protected]' : '[email protected]' %>",
"devDependencies": {<% if (typescript) { %>
"@glint/core": "^1.2.1",<% } %>
"concurrently": "^8.2.0",
Expand Down
10 changes: 8 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,12 @@ module.exports = {
.map(() => '..')
.join('/');

if (isYarn(options)) {
throw new Error(
`Please do not generate this project with --yarn. Omit '--yarn' when generating this blueprint'`,
);
}

return {
rootDirectory: directoryForPackageName(addonInfo.name.raw),
addonInfo,
Expand All @@ -282,7 +288,7 @@ module.exports = {
blueprintVersion: require('./package.json').version,
year: date.getFullYear(),
packageManager: options.packageManager,
yarn: isYarn(options),
yarn: false,
pnpm: isPnpm(options),
npm: isNpm(options),
typescript: options.typescript,
Expand All @@ -292,11 +298,11 @@ module.exports = {
[`--addon-location=${options.addonLocation}`]: options.addonLocation,
[`--ci-provider=${options.ciProvider}`]: options.ciProvider,
'--pnpm': isPnpm(options),
'--npm': isNpm(options),
'--release-it': options.releaseIt,
[`--test-app-location=${options.testAppLocation}`]: options.testAppLocation,
[`--test-app-name=${options.testAppName}`]: options.testAppName,
'--typescript': options.typescript,
'--yarn': isYarn(options),
}),
ciProvider: options.ciProvider,
pathFromAddonToRoot,
Expand Down

0 comments on commit b6b1d1a

Please sign in to comment.