You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds a new property to the Package object,
`hasChangesSinceLatestRelease`. This property is computed when a package
is read from a project by running a diff between the last-created Git
tag associated with that package and whatever the HEAD commit happens to
be, then checking to see whether any of the files changed belong to that
package. If they do, then `hasChangesSinceLatestRelease` is true,
otherwise it's false. This property is then used to filter the list of
packages that are placed within the release spec template when it is
generated.
There are a couple of things to consider here:
* "the last-created Git tag associated with that package" — how do we
know this? How do we map a package's version to a tag? We have to
account for tags that were created by `action-create-release-pr` in the
past as well as the tags that this tool will create in the future. We
also have to know what kind of package this is — whether it's the root
package of a monorepo or a workspace package — because the set of
possible tags will differ. These differences are documented in
`readMonorepoRootPackage` and `readMonorepoWorkspacePackage`.
* What happens if a repo has no tags? Then all of the packages in that
repo are considered to have changed, as they have yet to receive their
initial release, so they will all be included in the release spec
template.
it('returns the second set of strings if both sets of strings exactly have the same elements (just in a different order)',()=>{
232
+
expect(
233
+
placeInSpecificOrder(
234
+
['foo','qux','bar','baz'],
235
+
['baz','foo','bar','qux'],
236
+
),
237
+
).toStrictEqual(['baz','foo','bar','qux']);
238
+
});
239
+
240
+
it('returns the first set of strings with the items common to both sets rearranged according to the second set, placing those unique to the first set last',()=>{
0 commit comments