mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f13b1baaa6 | ||
|
|
cbef32198f | ||
|
|
eb19e25e77 | ||
|
|
49f9bd750b |
@@ -1,5 +1,11 @@
|
|||||||
# @changesets/action
|
# @changesets/action
|
||||||
|
|
||||||
|
## 1.4.5
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#282](https://github.com/changesets/action/pull/282) [`eb19e25`](https://github.com/changesets/action/commit/eb19e25e7797cf33dc2de4caa071e85a8057a0f0) Thanks [@mark-omarov](https://github.com/mark-omarov)! - Updated a few dependencies to patch the security vulnerabilities that were reported for their older versions.
|
||||||
|
|
||||||
## 1.4.4
|
## 1.4.4
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
Vendored
+12
-8
File diff suppressed because one or more lines are too long
+16
-14
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@changesets/action",
|
"name": "@changesets/action",
|
||||||
"version": "1.4.4",
|
"version": "1.4.5",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -10,7 +10,17 @@
|
|||||||
"@vercel/ncc": "^0.36.1",
|
"@vercel/ncc": "^0.36.1",
|
||||||
"fixturez": "^1.1.0",
|
"fixturez": "^1.1.0",
|
||||||
"prettier": "^2.0.5",
|
"prettier": "^2.0.5",
|
||||||
"typescript": "^5.0.4"
|
"typescript": "^5.0.4",
|
||||||
|
"@babel/core": "^7.13.10",
|
||||||
|
"@babel/preset-env": "^7.13.10",
|
||||||
|
"@babel/preset-typescript": "^7.13.0",
|
||||||
|
"@types/fs-extra": "^8.0.0",
|
||||||
|
"@types/jest": "^29.5.1",
|
||||||
|
"@types/node": "^12.7.1",
|
||||||
|
"@types/semver": "^6.0.2",
|
||||||
|
"babel-jest": "^29.5.0",
|
||||||
|
"husky": "^3.0.3",
|
||||||
|
"jest": "^29.5.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "ncc build src/index.ts -o dist --transpile-only --minify",
|
"build": "ncc build src/index.ts -o dist --transpile-only --minify",
|
||||||
@@ -27,21 +37,11 @@
|
|||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
"@actions/github": "^5.1.1",
|
"@actions/github": "^5.1.1",
|
||||||
"@babel/core": "^7.13.10",
|
|
||||||
"@babel/preset-env": "^7.13.10",
|
|
||||||
"@babel/preset-typescript": "^7.13.0",
|
|
||||||
"@changesets/pre": "^1.0.9",
|
"@changesets/pre": "^1.0.9",
|
||||||
"@changesets/read": "^0.5.3",
|
"@changesets/read": "^0.5.3",
|
||||||
"@manypkg/get-packages": "^1.1.3",
|
"@manypkg/get-packages": "^1.1.3",
|
||||||
"@octokit/plugin-throttling": "5.1.1",
|
"@octokit/plugin-throttling": "^5.2.1",
|
||||||
"@types/fs-extra": "^8.0.0",
|
|
||||||
"@types/jest": "^29.5.1",
|
|
||||||
"@types/node": "^12.7.1",
|
|
||||||
"@types/semver": "^6.0.2",
|
|
||||||
"babel-jest": "^29.5.0",
|
|
||||||
"fs-extra": "^8.1.0",
|
"fs-extra": "^8.1.0",
|
||||||
"husky": "^3.0.3",
|
|
||||||
"jest": "^29.5.0",
|
|
||||||
"mdast-util-to-string": "^1.0.6",
|
"mdast-util-to-string": "^1.0.6",
|
||||||
"remark-parse": "^7.0.1",
|
"remark-parse": "^7.0.1",
|
||||||
"remark-stringify": "^7.0.3",
|
"remark-stringify": "^7.0.3",
|
||||||
@@ -54,6 +54,8 @@
|
|||||||
},
|
},
|
||||||
"prettier": {},
|
"prettier": {},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"**/@octokit/core": "4.2.0"
|
"**/@octokit/core": "4.2.0",
|
||||||
|
"trim": "^0.0.3",
|
||||||
|
"y18n": "^4.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,17 +11,19 @@ export default async function readChangesetState(
|
|||||||
cwd: string = process.cwd()
|
cwd: string = process.cwd()
|
||||||
): Promise<ChangesetState> {
|
): Promise<ChangesetState> {
|
||||||
let preState = await readPreState(cwd);
|
let preState = await readPreState(cwd);
|
||||||
let isInPreMode = preState !== undefined && preState.mode === "pre";
|
|
||||||
|
|
||||||
let changesets = await readChangesets(cwd);
|
let changesets = await readChangesets(cwd);
|
||||||
|
|
||||||
if (isInPreMode) {
|
if (preState !== undefined && preState.mode === "pre") {
|
||||||
let changesetsToFilter = new Set(preState.changesets);
|
let changesetsToFilter = new Set(preState.changesets);
|
||||||
changesets = changesets.filter((x) => !changesetsToFilter.has(x.id));
|
|
||||||
|
return {
|
||||||
|
preState,
|
||||||
|
changesets: changesets.filter((x) => !changesetsToFilter.has(x.id)),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
preState: isInPreMode ? preState : undefined,
|
preState: undefined,
|
||||||
changesets,
|
changesets,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-6
@@ -17,8 +17,6 @@ import * as gitUtils from "./gitUtils";
|
|||||||
import readChangesetState from "./readChangesetState";
|
import readChangesetState from "./readChangesetState";
|
||||||
import resolveFrom from "resolve-from";
|
import resolveFrom from "resolve-from";
|
||||||
import { throttling } from "@octokit/plugin-throttling";
|
import { throttling } from "@octokit/plugin-throttling";
|
||||||
// temporary workaround for https://github.com/octokit/plugin-throttling.js/pull/590
|
|
||||||
import type {} from "@octokit/plugin-throttling/dist-types/types.d";
|
|
||||||
|
|
||||||
// GitHub Issues/PRs messages have a max size limit on the
|
// GitHub Issues/PRs messages have a max size limit on the
|
||||||
// message body payload.
|
// message body payload.
|
||||||
@@ -26,7 +24,7 @@ import type {} from "@octokit/plugin-throttling/dist-types/types.d";
|
|||||||
// To avoid that, we ensure to cap the message to 60k chars.
|
// To avoid that, we ensure to cap the message to 60k chars.
|
||||||
const MAX_CHARACTERS_PER_MESSAGE = 60000;
|
const MAX_CHARACTERS_PER_MESSAGE = 60000;
|
||||||
|
|
||||||
const setupOctokit = (githubToken) => {
|
const setupOctokit = (githubToken: string) => {
|
||||||
return new (GitHub.plugin(throttling))(
|
return new (GitHub.plugin(throttling))(
|
||||||
getOctokitOptions(githubToken, {
|
getOctokitOptions(githubToken, {
|
||||||
throttle: {
|
throttle: {
|
||||||
@@ -61,7 +59,7 @@ const setupOctokit = (githubToken) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const createRelease = async (
|
const createRelease = async (
|
||||||
octokit: ReturnType<typeof GitHub>,
|
octokit: ReturnType<typeof setupOctokit>,
|
||||||
{ pkg, tagName }: { pkg: Package; tagName: string }
|
{ pkg, tagName }: { pkg: Package; tagName: string }
|
||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
@@ -87,7 +85,12 @@ const createRelease = async (
|
|||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// if we can't find a changelog, the user has probably disabled changelogs
|
// if we can't find a changelog, the user has probably disabled changelogs
|
||||||
if (err.code !== "ENOENT") {
|
if (
|
||||||
|
err &&
|
||||||
|
typeof err === "object" &&
|
||||||
|
"code" in err &&
|
||||||
|
err.code !== "ENOENT"
|
||||||
|
) {
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -205,7 +208,12 @@ const requireChangesetsCliPkgJson = (cwd: string) => {
|
|||||||
try {
|
try {
|
||||||
return require(resolveFrom(cwd, "@changesets/cli/package.json"));
|
return require(resolveFrom(cwd, "@changesets/cli/package.json"));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err && err.code === "MODULE_NOT_FOUND") {
|
if (
|
||||||
|
err &&
|
||||||
|
typeof err === "object" &&
|
||||||
|
"code" in err &&
|
||||||
|
err.code === "MODULE_NOT_FOUND"
|
||||||
|
) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Have you forgotten to install \`@changesets/cli\` in "${cwd}"?`
|
`Have you forgotten to install \`@changesets/cli\` in "${cwd}"?`
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import remarkParse from "remark-parse";
|
|||||||
import remarkStringify from "remark-stringify";
|
import remarkStringify from "remark-stringify";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import mdastToString from "mdast-util-to-string";
|
import mdastToString from "mdast-util-to-string";
|
||||||
import { exec } from "@actions/exec";
|
|
||||||
import { getPackages, Package } from "@manypkg/get-packages";
|
import { getPackages, Package } from "@manypkg/get-packages";
|
||||||
|
|
||||||
export const BumpLevels = {
|
export const BumpLevels = {
|
||||||
|
|||||||
Reference in New Issue
Block a user