MCPcopy Create free account
hub / github.com/NomicFoundation/hardhat / shouldCreateChangeset

Function shouldCreateChangeset

scripts/version-alpha.ts:87–103  ·  view source on GitHub ↗

* Checks whether a new changeset should be created for the package.

(changesets, packageName)

Source from the content-addressed store, hash-verified

85 * Checks whether a new changeset should be created for the package.
86 */
87function shouldCreateChangeset(changesets, packageName) {
88 if (changesets.length === 0) {
89 return false;
90 }
91
92 for (const { frontMatter } of changesets) {
93 if (
94 frontMatter
95 .split("\n")
96 .some((line) => line.startsWith(`"${packageName}": patch`))
97 ) {
98 return false;
99 }
100 }
101
102 return true;
103}
104
105/**
106 * Creates a new patch changeset file for the package.

Callers 1

versionAlphaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected