mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Update to changesets v3 packages (#673)
* Update to changesets v3 packages * Dedupe * Fix test * Fix test 2 * update more --------- Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
This commit is contained in:
co-authored by
Mateusz Burzyński
parent
b12c36a7bf
commit
823cf741ca
@@ -1,5 +1,5 @@
|
||||
import * as github from "@actions/github";
|
||||
import getReleasePlan from "@changesets/get-release-plan";
|
||||
import { getReleasePlan } from "@changesets/get-release-plan";
|
||||
import type {
|
||||
ComprehensiveRelease,
|
||||
ReleasePlan,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { pathToFileURL } from "node:url";
|
||||
import type * as github from "@actions/github";
|
||||
import getReleasePlan from "@changesets/get-release-plan";
|
||||
import { getReleasePlan } from "@changesets/get-release-plan";
|
||||
import { createFixture } from "fs-fixture";
|
||||
import { exec } from "tinyexec";
|
||||
import { describe, expect, it } from "vitest";
|
||||
@@ -28,6 +28,7 @@ describe("getPullRequestWorktree", () => {
|
||||
private: true,
|
||||
workspaces: ["packages/*"],
|
||||
}),
|
||||
"package-lock.json": "",
|
||||
"packages/pkg-a/package.json": JSON.stringify({
|
||||
name: "pkg-a",
|
||||
version: "1.0.0",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { readPreState } from "@changesets/pre";
|
||||
import readChangesets from "@changesets/read";
|
||||
import { readChangesets } from "@changesets/read";
|
||||
import type { PreState, NewChangeset } from "@changesets/types";
|
||||
|
||||
export type ChangesetState = {
|
||||
|
||||
+3
-1
@@ -1,6 +1,6 @@
|
||||
import path from "node:path";
|
||||
import type { Changeset } from "@changesets/types";
|
||||
import writeChangeset from "@changesets/write";
|
||||
import { writeChangeset } from "@changesets/write";
|
||||
import { createFixture } from "fs-fixture";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { GitHub } from "./github.ts";
|
||||
@@ -56,6 +56,7 @@ function createSimpleProjectFixture() {
|
||||
private: true,
|
||||
workspaces: ["packages/*"],
|
||||
}),
|
||||
"package-lock.json": "",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -82,6 +83,7 @@ function createIgnoredPackageFixture() {
|
||||
private: true,
|
||||
workspaces: ["packages/*"],
|
||||
}),
|
||||
"package-lock.json": "",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -117,7 +117,7 @@ export async function runPublish({
|
||||
let { packages, tool } = await getPackages(cwd);
|
||||
let releasedPackages: Package[] = [];
|
||||
|
||||
if (tool !== "root") {
|
||||
if (tool.type !== "root") {
|
||||
let newTagRegex = /New tag:\s+(@[^/]+\/[^@]+|[^/]+)@([^\s]+)/;
|
||||
let packagesByName = new Map(packages.map((x) => [x.packageJson.name, x]));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user