Skip to content

Commit f11b161

Browse files
committed
ignore workspace dependencies
1 parent 6c86f58 commit f11b161

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

dist/index.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269646,6 +269646,12 @@ function textify(d, location) {
269646269646
}
269647269647
}
269648269648
}
269649+
function isRelevantChange(change) {
269650+
if (change.value === "workspace:*") {
269651+
return false;
269652+
}
269653+
return true;
269654+
}
269649269655
async function tryPrettier(workdir, content) {
269650269656
try {
269651269657
const prettierConfig = await import_prettier.default.resolveConfig(workdir).catch((e2) => {
@@ -269772,8 +269778,8 @@ async function fetchJsonFile(pat, file) {
269772269778
await (0, import_fs_extra4.mkdirp)(changesetBase).catch(() => null);
269773269779
for (const [key, value] of changes) {
269774269780
const changes2 = [
269775-
...value.dependencies.map((d) => textify(d, "dependencies")),
269776-
...value.peerDependencies.map((d) => textify(d, "peerDependencies"))
269781+
...value.dependencies.filter(isRelevantChange).map((d) => textify(d, "dependencies")),
269782+
...value.peerDependencies.filter(isRelevantChange).map((d) => textify(d, "peerDependencies"))
269777269783
].map((t2) => `- ${t2}`);
269778269784
console.debug("package update summary", {
269779269785
key,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@theguild/changesets-dependencies-action",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"main": "dist/index.js",
55
"license": "MIT",
66
"devDependencies": {

src/index.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ function textify(d: IChange, location: string) {
3232
}
3333
}
3434

35+
function isRelevantChange(change: IChange): boolean {
36+
if (change.value === "workspace:*") {
37+
return false;
38+
}
39+
40+
return true;
41+
}
42+
3543
async function tryPrettier(workdir: string, content: string): Promise<string> {
3644
try {
3745
const prettierConfig = await prettier.resolveConfig(workdir).catch((e) => {
@@ -211,8 +219,12 @@ async function fetchJsonFile(
211219

212220
for (const [key, value] of changes) {
213221
const changes = [
214-
...value.dependencies.map((d) => textify(d, "dependencies")),
215-
...value.peerDependencies.map((d) => textify(d, "peerDependencies")),
222+
...value.dependencies
223+
.filter(isRelevantChange)
224+
.map((d) => textify(d, "dependencies")),
225+
...value.peerDependencies
226+
.filter(isRelevantChange)
227+
.map((d) => textify(d, "peerDependencies")),
216228
].map((t) => `- ${t}`);
217229

218230
console.debug("package update summary", {

0 commit comments

Comments
 (0)