Skip to content

Commit

Permalink
ci: patch changesets package
Browse files Browse the repository at this point in the history
  • Loading branch information
martines3000 committed Oct 6, 2023
1 parent cb4080a commit 035d77f
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 20 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
"test:ci": "pnpm nx run-many --target=test:ci"
},
"dependencies": {
"@changesets/cli": "^2.26.2"
"@changesets/cli": "2.26.2"
},
"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/changelog-github": "0.4.8",
"@commitlint/cli": "^17.6.7",
"@commitlint/config-conventional": "^17.6.7",
"@ianvs/prettier-plugin-sort-imports": "^4.1.0",
Expand Down Expand Up @@ -95,7 +95,8 @@
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/[email protected]",
"@ceramicnetwork/[email protected]": "patches/@[email protected]",
"@metamask/[email protected]": "patches/@[email protected]"
"@metamask/[email protected]": "patches/@[email protected]",
"@changesets/[email protected]": "patches/@[email protected]"
},
"allowNonAppliedPatches": true
}
Expand Down
31 changes: 31 additions & 0 deletions patches/@[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff --git a/src/index.ts b/src/index.ts
index c2808fcd430346759975a40e951d49142f4896b9..17398ae30bf292791d2aa9f36b2efce545a58b1a 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -215,14 +215,18 @@ function assembleReleasePlan(
// Detailed explanation at https://github.com/changesets/changesets/pull/382#discussion_r434434182
if (preInfo.preVersions.get(pkg.packageJson.name) !== 0) {
const existingRelease = releases.get(pkg.packageJson.name);
- if (!existingRelease) {
- releases.set(pkg.packageJson.name, {
- name: pkg.packageJson.name,
- type: "patch",
- oldVersion: pkg.packageJson.version,
- changesets: [],
- });
- } else if (
+ // [martines3000]:We don't want this behaviour in our workflows
+ // https://github.com/martines3000/changesets
+ // if (!existingRelease) {
+ // releases.set(pkg.packageJson.name, {
+ // name: pkg.packageJson.name,
+ // type: "patch",
+ // oldVersion: pkg.packageJson.version,
+ // changesets: [],
+ // });
+ // }
+ if (
+ existingRelease &&
existingRelease.type === "none" &&
!refinedConfig.ignore.includes(pkg.packageJson.name)
) {
38 changes: 21 additions & 17 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 035d77f

Please sign in to comment.