Skip to content

Commit

Permalink
fix changeset patch
Browse files Browse the repository at this point in the history
  • Loading branch information
IMax153 committed Sep 11, 2024
1 parent 868f634 commit a2227d3
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 18 deletions.
4 changes: 2 additions & 2 deletions templates/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@babel/plugin-transform-export-namespace-from": "^7.24.7",
"@babel/plugin-transform-modules-commonjs": "^7.24.8",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "2.27.7",
"@changesets/cli": "^2.27.8",
"@edge-runtime/vm": "^4.0.0",
"@effect/build-utils": "^0.7.7",
"@effect/docgen": "^0.4.4",
Expand Down Expand Up @@ -95,7 +95,7 @@
},
"patchedDependencies": {
"@changesets/[email protected]": "patches/@[email protected]",
"@changesets/[email protected].3": "patches/@[email protected].3.patch",
"@changesets/[email protected].4": "patches/@[email protected].4.patch",
"[email protected]": "patches/[email protected]"
}
}
Expand Down
8 changes: 4 additions & 4 deletions [email protected][email protected]
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/dist/changesets-assemble-release-plan.cjs.js b/dist/changesets-assemble-release-plan.cjs.js
index 60427457c887f2d72168fecec83d79088c68e3a4..b48899c83ca2bc5bfa0cbb65e0c098d5bb65fe3d 100644
index 4f7b5e5b37bb05874a5c1d8e583e29d4a9593ecf..980ead81554a8d925b6366e1644f3be03765398e 100644
--- a/dist/changesets-assemble-release-plan.cjs.js
+++ b/dist/changesets-assemble-release-plan.cjs.js
@@ -189,7 +189,7 @@ function determineDependents({
@@ -237,7 +237,7 @@ function determineDependents({
preInfo,
onlyUpdatePeerDependentsWhenOutOfRange: config.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.onlyUpdatePeerDependentsWhenOutOfRange
})) {
Expand All @@ -12,10 +12,10 @@ index 60427457c887f2d72168fecec83d79088c68e3a4..b48899c83ca2bc5bfa0cbb65e0c098d5
switch (depType) {
case "dependencies":
diff --git a/dist/changesets-assemble-release-plan.esm.js b/dist/changesets-assemble-release-plan.esm.js
index f6583cf3f639e1fe4df764a015689dea74127236..2b9dca9f460793596394484457a94a34bcc1d99a 100644
index a327d9e4c709a6698f505d60d8bbf0046d4bde74..eb00fec7262280fb4876165c942212abc6b25efb 100644
--- a/dist/changesets-assemble-release-plan.esm.js
+++ b/dist/changesets-assemble-release-plan.esm.js
@@ -178,7 +178,7 @@ function determineDependents({
@@ -226,7 +226,7 @@ function determineDependents({
preInfo,
onlyUpdatePeerDependentsWhenOutOfRange: config.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.onlyUpdatePeerDependentsWhenOutOfRange
})) {
Expand Down
4 changes: 2 additions & 2 deletions templates/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"devDependencies": {
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "2.27.7",
"@changesets/cli": "^2.27.8",
"@effect/cli": "latest",
"@effect/eslint-plugin": "^0.2.0",
"@effect/language-service": "^0.1.0",
Expand Down Expand Up @@ -61,7 +61,7 @@
},
"patchedDependencies": {
"@changesets/[email protected]": "patches/@[email protected]",
"@changesets/[email protected].3": "patches/@[email protected].3.patch"
"@changesets/[email protected].4": "patches/@[email protected].4.patch"
}
}
}
8 changes: 4 additions & 4 deletions [email protected][email protected]
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/dist/changesets-assemble-release-plan.cjs.js b/dist/changesets-assemble-release-plan.cjs.js
index 60427457c887f2d72168fecec83d79088c68e3a4..b48899c83ca2bc5bfa0cbb65e0c098d5bb65fe3d 100644
index 4f7b5e5b37bb05874a5c1d8e583e29d4a9593ecf..980ead81554a8d925b6366e1644f3be03765398e 100644
--- a/dist/changesets-assemble-release-plan.cjs.js
+++ b/dist/changesets-assemble-release-plan.cjs.js
@@ -189,7 +189,7 @@ function determineDependents({
@@ -237,7 +237,7 @@ function determineDependents({
preInfo,
onlyUpdatePeerDependentsWhenOutOfRange: config.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.onlyUpdatePeerDependentsWhenOutOfRange
})) {
Expand All @@ -12,10 +12,10 @@ index 60427457c887f2d72168fecec83d79088c68e3a4..b48899c83ca2bc5bfa0cbb65e0c098d5
switch (depType) {
case "dependencies":
diff --git a/dist/changesets-assemble-release-plan.esm.js b/dist/changesets-assemble-release-plan.esm.js
index f6583cf3f639e1fe4df764a015689dea74127236..2b9dca9f460793596394484457a94a34bcc1d99a 100644
index a327d9e4c709a6698f505d60d8bbf0046d4bde74..eb00fec7262280fb4876165c942212abc6b25efb 100644
--- a/dist/changesets-assemble-release-plan.esm.js
+++ b/dist/changesets-assemble-release-plan.esm.js
@@ -178,7 +178,7 @@ function determineDependents({
@@ -226,7 +226,7 @@ function determineDependents({
preInfo,
onlyUpdatePeerDependentsWhenOutOfRange: config.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.onlyUpdatePeerDependentsWhenOutOfRange
})) {
Expand Down
13 changes: 13 additions & 0 deletions templates/cli/patches/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/lib/index.js b/lib/index.js
index 2182884e21874ebb37261e2375eec08ad956fc9a..ef5630199121c2830756e00c7cc48cf1078c8207 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -78,7 +78,7 @@ const isInAssignmentContext = path => {

parentPath = _ref.parentPath;

- if (parentPath.isVariableDeclaration() || parentPath.isAssignmentExpression()) {
+ if (parentPath.isVariableDeclaration() || parentPath.isAssignmentExpression() || parentPath.isClassDeclaration()) {
return true;
}
} while (parentPath !== statement);
4 changes: 2 additions & 2 deletions templates/monorepo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@babel/plugin-transform-export-namespace-from": "^7.24.7",
"@babel/plugin-transform-modules-commonjs": "^7.24.8",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "2.27.7",
"@changesets/cli": "^2.27.8",
"@edge-runtime/vm": "^4.0.0",
"@effect/build-utils": "^0.7.7",
"@effect/eslint-plugin": "^0.2.0",
Expand Down Expand Up @@ -75,7 +75,7 @@
},
"patchedDependencies": {
"@changesets/[email protected]": "patches/@[email protected]",
"@changesets/[email protected].3": "patches/@[email protected].3.patch",
"@changesets/[email protected].4": "patches/@[email protected].4.patch",
"[email protected]": "patches/[email protected]"
}
}
Expand Down
8 changes: 4 additions & 4 deletions [email protected][email protected]
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/dist/changesets-assemble-release-plan.cjs.js b/dist/changesets-assemble-release-plan.cjs.js
index 60427457c887f2d72168fecec83d79088c68e3a4..b48899c83ca2bc5bfa0cbb65e0c098d5bb65fe3d 100644
index 4f7b5e5b37bb05874a5c1d8e583e29d4a9593ecf..980ead81554a8d925b6366e1644f3be03765398e 100644
--- a/dist/changesets-assemble-release-plan.cjs.js
+++ b/dist/changesets-assemble-release-plan.cjs.js
@@ -189,7 +189,7 @@ function determineDependents({
@@ -237,7 +237,7 @@ function determineDependents({
preInfo,
onlyUpdatePeerDependentsWhenOutOfRange: config.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.onlyUpdatePeerDependentsWhenOutOfRange
})) {
Expand All @@ -12,10 +12,10 @@ index 60427457c887f2d72168fecec83d79088c68e3a4..b48899c83ca2bc5bfa0cbb65e0c098d5
switch (depType) {
case "dependencies":
diff --git a/dist/changesets-assemble-release-plan.esm.js b/dist/changesets-assemble-release-plan.esm.js
index f6583cf3f639e1fe4df764a015689dea74127236..2b9dca9f460793596394484457a94a34bcc1d99a 100644
index a327d9e4c709a6698f505d60d8bbf0046d4bde74..eb00fec7262280fb4876165c942212abc6b25efb 100644
--- a/dist/changesets-assemble-release-plan.esm.js
+++ b/dist/changesets-assemble-release-plan.esm.js
@@ -178,7 +178,7 @@ function determineDependents({
@@ -226,7 +226,7 @@ function determineDependents({
preInfo,
onlyUpdatePeerDependentsWhenOutOfRange: config.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.onlyUpdatePeerDependentsWhenOutOfRange
})) {
Expand Down

0 comments on commit a2227d3

Please sign in to comment.