Skip to content

Commit

Permalink
Downgrade semver to only have one version in output
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed Apr 12, 2024
1 parent 5b6fc84 commit 4d9d35d
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 425 deletions.
1 change: 1 addition & 0 deletions .ncurc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = {
target: (dependencyName, [{ semver, version, operator, major, minor, patch, release, build }]) => {
if (dependencyName === "@actions/http-client") return "patch"; // bloated via undici
if (dependencyName === "eslint") return "patch";
if (dependencyName === "semver") return "patch"; // Matching dep from @actions/*
if (major === "0") return "minor";
return "latest";
},
Expand Down
424 changes: 9 additions & 415 deletions dist/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
"@badrap/valita": "^0.3.8",
"@iarna/toml": "^2.2.5",
"jsonc-parser": "^3.2.1",
"semver": "^7.6.0",
"semver": "^6.3.1",
"shell-quote": "^1.8.1",
"which": "^4.0.0"
},
"devDependencies": {
"@tsconfig/node20": "^20.1.4",
"@tsconfig/strictest": "^2.0.5",
"@types/node": "^20.12.7",
"@types/semver": "^7.5.8",
"@types/semver": "^6.2.7",
"@types/shell-quote": "^1.7.5",
"@types/which": "^3.0.3",
"@typescript-eslint/eslint-plugin": "^7.6.0",
Expand Down
15 changes: 11 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as path from "node:path";
import * as core from "@actions/core";
import * as httpClient from "@actions/http-client";
import * as tc from "@actions/tool-cache";
import SemVer from "semver/classes/semver";
import { SemVer } from "semver";
import { parse } from "shell-quote";
import which from "which";

Expand Down
2 changes: 1 addition & 1 deletion src/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as fs from "node:fs";
import * as core from "@actions/core";
import * as command from "@actions/core/lib/command";
import * as TOML from "@iarna/toml";
import SemVer from "semver/classes/semver";
import { SemVer } from "semver";
import { afterEach, beforeEach, describe, expect, test, vitest } from "vitest";

import * as helpers from "./helpers";
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as core from "@actions/core";
import * as actionsCommand from "@actions/core/lib/command";
import * as TOML from "@iarna/toml";
import * as JSONC from "jsonc-parser";
import SemVer from "semver/classes/semver";
import { SemVer } from "semver";
import { quote } from "shell-quote";

import { getActionVersion, getArgs, getNodeInfo, type NodeInfo } from "./helpers";
Expand Down
2 changes: 1 addition & 1 deletion src/schema.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as v from "@badrap/valita";
import SemVer from "semver/classes/semver";
import { SemVer } from "semver";

export type Position = v.Infer<typeof Position>;
const Position = v.object({
Expand Down

0 comments on commit 4d9d35d

Please sign in to comment.