Skip to content

Commit

Permalink
Upgrade to pnpm@7.4.1, remove patch-package (#3747)
Browse files Browse the repository at this point in the history
* chore: upgrade to pnpm@7.4.0, remove `patch-package`

* chore: update contributing

* chore: pnpm@7.4.1

* chore: bump to pnpm@7.5.0

Co-authored-by: Nate Moore <nate@astro.build>
  • Loading branch information
natemoo-re and natemoo-re committed Jul 7, 2022
1 parent 9f54fa3 commit 0e01e0b
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 127 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ We welcome contributions of any size and skill level. As an open source project,

```shell
node: "^14.15.0 || >=16.0.0"
pnpm: "^7.0.0"
pnpm: "^7.5.0"
# otherwise, your build will fail
```

Expand Down
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"url": "https://github.com/withastro/astro.git"
},
"scripts": {
"postinstall": "patch-package",
"release": "pnpm run build && changeset publish",
"build": "turbo run build --output-logs=new-only --no-deps --scope=astro --scope=create-astro --scope=\"@astrojs/*\"",
"build:ci": "turbo run build:ci --output-logs=new-only --no-deps --scope=astro --scope=create-astro --scope=\"@astrojs/*\"",
Expand Down Expand Up @@ -44,9 +43,9 @@
],
"engines": {
"node": "^14.15.0 || >=16.0.0",
"pnpm": ">=7.0.0"
"pnpm": ">=7.5.0"
},
"packageManager": "pnpm@7.0.0",
"packageManager": "pnpm@7.5.0",
"pnpm": {
"peerDependencyRules": {
"ignoreMissing": [
Expand All @@ -55,14 +54,19 @@
"@babel/plugin-transform-react-jsx",
"vite"
]
},
"patchedDependencies": {
"@changesets/cli@2.23.0": "patches/@changesets__cli@2.23.0.patch",
"@changesets/assemble-release-plan@5.1.3": "patches/@changesets__assemble-release-plan@5.1.3.patch"
}
},
"dependencies": {
"@astrojs/webapi": "workspace:*"
},
"devDependencies": {
"@changesets/assemble-release-plan": "5.1.3",
"@changesets/changelog-github": "0.4.4",
"@changesets/cli": "2.22.0",
"@changesets/cli": "2.23.0",
"@octokit/action": "^3.18.1",
"@typescript-eslint/eslint-plugin": "^5.27.1",
"@typescript-eslint/parser": "^5.27.1",
Expand All @@ -74,7 +78,6 @@
"eslint-plugin-prettier": "^4.0.0",
"execa": "^6.1.0",
"organize-imports-cli": "^0.10.0",
"patch-package": "^6.4.7",
"prettier": "^2.7.0",
"pretty-bytes": "^6.0.0",
"tiny-glob": "^0.2.9",
Expand Down
14 changes: 0 additions & 14 deletions patches/@changesets+assemble-release-plan+5.1.2.patch

This file was deleted.

14 changes: 14 additions & 0 deletions patches/@changesets__assemble-release-plan@5.1.3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/dist/assemble-release-plan.cjs.dev.js b/dist/assemble-release-plan.cjs.dev.js
index f05ea74cd2a76884ed8a754e821775003af63764..de0b7fe8d53ffad29cae2de145042b9b8376625c 100644
--- a/dist/assemble-release-plan.cjs.dev.js
+++ b/dist/assemble-release-plan.cjs.dev.js
@@ -65,6 +65,9 @@ function incrementVersion(release, preInfo) {
}

let version = semver.inc(release.oldVersion, release.type);
+ if (release.name === 'astro') {
+ version = semver.inc(release.oldVersion, 'prerelease');
+ }

if (preInfo !== undefined && preInfo.state.mode !== "exit") {
let preVersion = preInfo.preVersions.get(release.name);
14 changes: 14 additions & 0 deletions patches/@changesets__cli@2.23.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/dist/cli.cjs.dev.js b/dist/cli.cjs.dev.js
index 5511d0c05d3b7472876dcc8410e938ccf612654f..aa75e3982b68e1226ba1877a7f32017e517480f5 100644
--- a/dist/cli.cjs.dev.js
+++ b/dist/cli.cjs.dev.js
@@ -279,6 +279,9 @@ async function confirmMajorRelease(pkgJSON) {
}

async function getPackagesToRelease(changedPackages, allPackages) {
+ const isPrivate = (name) => name === 'astro-scripts' || name.startsWith('@example/') || name.startsWith('@test/') || name.startsWith('@e2e/');
+ changedPackages = changedPackages.filter(name => !isPrivate(name));
+ allPackages = allPackages.filter(({ packageJson: { name }}) => !isPrivate(name));
function askInitialReleaseQuestion(defaultChoiceList) {
return askCheckboxPlus( // TODO: Make this wording better
// TODO: take objects and be fancy with matching

0 comments on commit 0e01e0b

Please sign in to comment.