-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(semantic-release): remove hotfix for v4 of the action
This reverts commit a7c1a51.
- Loading branch information
Showing
4 changed files
with
3 additions
and
31 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,18 +41,10 @@ interface Inputs { | |
*/ | ||
async function runNpmInstall(packages: string[]) { | ||
info(`Installing packages in ${path.resolve(__dirname, "..")}`); | ||
// Hotfix for v4 of this action. There was a major release of @open-turo/semantic-release-config that breaks this action | ||
// If v4 of this action is asking to install that module, pin it to the latest version | ||
const actualPackages = packages.map((package_) => { | ||
if (package_.includes("@open-turo/semantic-release-config")) { | ||
return "@open-turo/[email protected]"; | ||
} | ||
return package_; | ||
}); | ||
const silentFlag = process.env.RUNNER_DEBUG === "1" ? "" : "--silent"; | ||
const data = await getExecOutput( | ||
"npm", | ||
["install", ...actualPackages, "--no-audit", silentFlag], | ||
["install", ...packages, "--no-audit", silentFlag], | ||
{ | ||
cwd: path.resolve(__dirname, ".."), | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -264,26 +264,6 @@ describe("semantic-release", () => { | |
`); | ||
}); | ||
|
||
test("pins @open-turo/semantic-release-config if asked as extra plugin", async () => { | ||
process.env.SEMANTIC_ACTION_EXTRA_PLUGINS = | ||
"@open-turo/semantic-release-config"; | ||
mockNpmInstall(); | ||
mockRelease({ nextRelease: undefined }); | ||
await callAction(); | ||
expect(getExecOutputMock).toHaveBeenCalledTimes(1); | ||
const [cmd, arguments_] = getExecOutputMock.mock.calls[0]; | ||
expect(cmd).toMatchInlineSnapshot(`"npm"`); | ||
expect(arguments_).toMatchInlineSnapshot(` | ||
[ | ||
"install", | ||
"semantic-release", | ||
"@open-turo/[email protected]", | ||
"--no-audit", | ||
"--silent", | ||
] | ||
`); | ||
}); | ||
|
||
test("propagates npm install errors", async () => { | ||
mockNpmInstall({ | ||
exitCode: 1, | ||
|