Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix commit message when using npx in non-monorepo #1762

Merged
merged 1 commit into from Jan 28, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions plugins/npm/__tests__/npm.test.ts
Expand Up @@ -489,7 +489,7 @@ describe("publish", () => {
Auto.SEMVER.patch,
"--no-commit-hooks",
"-m",
"Bump version to: %s [skip ci]",
"'\"Bump version to: %s [skip ci]\"'",
"--loglevel",
"silly",
]);
Expand Down Expand Up @@ -519,7 +519,7 @@ describe("publish", () => {
Auto.SEMVER.patch,
"--no-commit-hooks",
"-m",
"Bump version to: %s [skip ci]",
"'\"Bump version to: %s [skip ci]\"'",
]);
});

Expand Down Expand Up @@ -554,7 +554,7 @@ describe("publish", () => {
"--yes",
"--no-push",
"-m",
'\'"Bump version to: %s [skip ci]"\'',
"'\"Bump version to: %s [skip ci]\"'",
false,
]);
});
Expand Down Expand Up @@ -590,7 +590,7 @@ describe("publish", () => {
"--yes",
"--no-push",
"-m",
'\'"Bump version to: %s [skip ci]"\'',
"'\"Bump version to: %s [skip ci]\"'",
false,
]);
});
Expand Down Expand Up @@ -626,7 +626,7 @@ describe("publish", () => {
"--yes",
"--no-push",
"-m",
'\'"Bump version to: %s [skip ci]"\'',
"'\"Bump version to: %s [skip ci]\"'",
"--exact",
]);

Expand Down Expand Up @@ -750,7 +750,7 @@ describe("publish", () => {
"1.0.1",
"--no-commit-hooks",
"-m",
"Bump version to: %s [skip ci]",
"'\"Bump version to: %s [skip ci]\"'",
]);
});

Expand Down Expand Up @@ -786,7 +786,7 @@ describe("publish", () => {
"--yes",
"--no-push",
"-m",
'\'"Bump version to: %s [skip ci]"\'',
"'\"Bump version to: %s [skip ci]\"'",
false,
]);
});
Expand Down
4 changes: 2 additions & 2 deletions plugins/npm/src/index.ts
Expand Up @@ -35,7 +35,7 @@ import setTokenOnCI, { getRegistry, DEFAULT_REGISTRY } from "./set-npm-token";
import { writeFile, isMonorepo, readFile, getLernaJson } from "./utils";

const { isCi } = envCi();
const VERSION_COMMIT_MESSAGE = "Bump version to: %s [skip ci]";
const VERSION_COMMIT_MESSAGE = `'"Bump version to: %s [skip ci]"'`;

/** Get the last published version for a npm package */
async function getPublishedVersion(name: string) {
Expand Down Expand Up @@ -947,7 +947,7 @@ export default class NPMPlugin implements IPlugin {
"-m",
isIndependent
? '"Bump independent versions [skip ci]"'
: `'"${VERSION_COMMIT_MESSAGE}"'`,
: VERSION_COMMIT_MESSAGE,
this.exact && "--exact",
...verboseArgs,
]);
Expand Down