Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/busy-points-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@changesets/read": minor
---

Remove support for reading changesets from version 1
2 changes: 0 additions & 2 deletions packages/read/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@
"repository": "https://github.com/changesets/changesets/tree/main/packages/read",
"dependencies": {
"@changesets/git": "^3.0.1",
"@changesets/logger": "^0.1.1",
"@changesets/parse": "^0.4.0",
"@changesets/types": "^6.0.0",
"p-filter": "^2.1.0",
"picocolors": "^1.1.0"
},
"devDependencies": {
Expand Down
24 changes: 0 additions & 24 deletions packages/read/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,28 +192,4 @@ Awesome feature, hidden behind a feature flag
},
]);
});

it("should read an old changeset", async () => {
const cwd = await testdir({
".changeset/basic-changeset/changes.json": JSON.stringify({
releases: [
{
name: "cool-package",
type: "minor",
},
],
dependents: [],
}),
".changeset/basic-changeset/changes.md": `Nice simple summary`,
});

const changesets = await read(cwd);
expect(changesets).toEqual([
{
releases: [{ name: "cool-package", type: "minor" }],
summary: "Nice simple summary",
id: "basic-changeset",
},
]);
});
});
8 changes: 1 addition & 7 deletions packages/read/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import path from "path";
import parse from "@changesets/parse";
import { NewChangeset } from "@changesets/types";
import * as git from "@changesets/git";
import getOldChangesetsAndWarn from "./legacy";

async function filterChangesetsSinceRef(
changesets: Array<string>,
Expand Down Expand Up @@ -42,8 +41,6 @@ export default async function getChangesets(
);
}

let oldChangesetsPromise = getOldChangesetsAndWarn(changesetBase, contents);

let changesets = contents.filter(
(file) =>
!file.startsWith(".") && file.endsWith(".md") && file !== "README.md"
Expand All @@ -54,8 +51,5 @@ export default async function getChangesets(

return { ...parse(changeset), id: file.replace(".md", "") };
});
return [
...(await oldChangesetsPromise),
...(await Promise.all(changesetContents)),
];
return await Promise.all(changesetContents);
}
61 changes: 0 additions & 61 deletions packages/read/src/legacy.ts

This file was deleted.

12 changes: 0 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5693,13 +5693,6 @@ p-cancelable@^1.0.0:
resolved "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc"
integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==

p-filter@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/p-filter/-/p-filter-2.1.0.tgz#1b1472562ae7a0f742f0f3d3d3718ea66ff9c09c"
integrity sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==
dependencies:
p-map "^2.0.0"

p-limit@^2.2.0:
version "2.2.1"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.1.tgz#aa07a788cc3151c939b5131f63570f0dd2009537"
Expand Down Expand Up @@ -5742,11 +5735,6 @@ p-locate@^5.0.0:
dependencies:
p-limit "^3.0.2"

p-map@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175"
integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==

p-try@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
Expand Down