MCPcopy Index your code
hub / github.com/changesets/changesets / getOldChangesetsAndWarn

Function getOldChangesetsAndWarn

packages/read/src/legacy.ts:45–63  ·  view source on GitHub ↗
(
  changesetBase: string,
  dirs: string[]
)

Source from the content-addressed store, hash-verified

43// this function only exists while we wait for v1 changesets to be obsoleted
44// and should be deleted before v3
45export default async function getOldChangesetsAndWarn(
46 changesetBase: string,
47 dirs: string[]
48): Promise<Array<NewChangeset>> {
49 let oldChangesets = await getOldChangesets(changesetBase, dirs);
50 if (oldChangesets.length === 0) {
51 return [];
52 }
53 warn(importantSeparator);
54 warn("There were old changesets from version 1 found");
55 warn("These are being applied now but the dependents graph may have changed");
56 warn("Make sure you validate all your dependencies");
57 warn(
58 "In a future major version, we will no longer apply these old changesets, and will instead throw here"
59 );
60 warn(importantEnd);
61
62 return oldChangesets;
63}

Callers 1

getChangesetsFunction · 0.85

Calls 2

warnFunction · 0.90
getOldChangesetsFunction · 0.85

Tested by

no test coverage detected