Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 50 additions & 41 deletions dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,14 +272,14 @@ async function useNpmEnvironment(manifest, options, task) {
}

//#endregion
//#region node_modules/.pnpm/[email protected].2/node_modules/semver/internal/debug.js
//#region node_modules/.pnpm/[email protected].3/node_modules/semver/internal/debug.js
var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
module.exports = debug;
}));

//#endregion
//#region node_modules/.pnpm/[email protected].2/node_modules/semver/internal/constants.js
//#region node_modules/.pnpm/[email protected].3/node_modules/semver/internal/constants.js
var require_constants$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const SEMVER_SPEC_VERSION = "2.0.0";
const MAX_LENGTH = 256;
Expand Down Expand Up @@ -308,7 +308,7 @@ var require_constants$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}));

//#endregion
//#region node_modules/.pnpm/[email protected].2/node_modules/semver/internal/re.js
//#region node_modules/.pnpm/[email protected].3/node_modules/semver/internal/re.js
var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants$5();
const debug = require_debug();
Expand Down Expand Up @@ -388,7 +388,7 @@ var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}));

//#endregion
//#region node_modules/.pnpm/[email protected].2/node_modules/semver/internal/parse-options.js
//#region node_modules/.pnpm/[email protected].3/node_modules/semver/internal/parse-options.js
var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const looseOption = Object.freeze({ loose: true });
const emptyOpts = Object.freeze({});
Expand All @@ -401,10 +401,11 @@ var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) =>
}));

//#endregion
//#region node_modules/.pnpm/[email protected].2/node_modules/semver/internal/identifiers.js
//#region node_modules/.pnpm/[email protected].3/node_modules/semver/internal/identifiers.js
var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const numeric = /^[0-9]+$/;
const compareIdentifiers = (a, b) => {
if (typeof a === "number" && typeof b === "number") return a === b ? 0 : a < b ? -1 : 1;
const anum = numeric.test(a);
const bnum = numeric.test(b);
if (anum && bnum) {
Expand All @@ -421,7 +422,7 @@ var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}));

//#endregion
//#region node_modules/.pnpm/[email protected].2/node_modules/semver/classes/semver.js
//#region node_modules/.pnpm/[email protected].3/node_modules/semver/classes/semver.js
var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const debug = require_debug();
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants$5();
Expand Down Expand Up @@ -478,7 +479,13 @@ var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
compareMain(other) {
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
if (this.major < other.major) return -1;
if (this.major > other.major) return 1;
if (this.minor < other.minor) return -1;
if (this.minor > other.minor) return 1;
if (this.patch < other.patch) return -1;
if (this.patch > other.patch) return 1;
return 0;
}
comparePre(other) {
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
Expand Down Expand Up @@ -595,7 +602,7 @@ var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}));

//#endregion
//#region node_modules/.pnpm/[email protected].2/node_modules/semver/functions/parse.js
//#region node_modules/.pnpm/[email protected].3/node_modules/semver/functions/parse.js
var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const SemVer = require_semver();
const parse = (version, options, throwErrors = false) => {
Expand All @@ -611,7 +618,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}));

//#endregion
//#region node_modules/.pnpm/[email protected].2/node_modules/semver/functions/diff.js
//#region node_modules/.pnpm/[email protected].3/node_modules/semver/functions/diff.js
var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const parse = require_parse$1();
const diff = (version1, version2) => {
Expand Down Expand Up @@ -640,23 +647,23 @@ var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}));

//#endregion
//#region node_modules/.pnpm/[email protected].2/node_modules/semver/functions/compare.js
//#region node_modules/.pnpm/[email protected].3/node_modules/semver/functions/compare.js
var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const SemVer = require_semver();
const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
module.exports = compare;
}));

//#endregion
//#region node_modules/.pnpm/[email protected].2/node_modules/semver/functions/gt.js
//#region node_modules/.pnpm/[email protected].3/node_modules/semver/functions/gt.js
var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const compare = require_compare();
const gt = (a, b, loose) => compare(a, b, loose) > 0;
module.exports = gt;
}));

//#endregion
//#region node_modules/.pnpm/[email protected].2/node_modules/semver/functions/valid.js
//#region node_modules/.pnpm/[email protected].3/node_modules/semver/functions/valid.js
var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const parse = require_parse$1();
const valid = (version, options) => {
Expand Down Expand Up @@ -786,8 +793,7 @@ const CONTENTS_BANNER = "=== Contents ===";
* @returns Formatted string.
*/
function formatPublishResult(manifest, options, result) {
const lines = [];
lines.push(result.id === void 0 ? `🙅‍♀️ ${manifest.name}@${manifest.version} already published.` : `📦 ${result.id}`);
const lines = [result.id === void 0 ? `🙅‍♀️ ${manifest.name}@${manifest.version} already published.` : `📦 ${result.id}`];
if (result.files.length > 0) lines.push("", CONTENTS_BANNER);
for (const { path: path$6, size } of result.files) lines.push(`${formatSize(size)}\t${path$6}`);
return (options.dryRun.value ? [
Expand Down Expand Up @@ -2014,7 +2020,7 @@ var WriteStreamSync = class extends WriteStream {
};

//#endregion
//#region node_modules/.pnpm/[email protected].1/node_modules/tar/dist/esm/options.js
//#region node_modules/.pnpm/[email protected].2/node_modules/tar/dist/esm/options.js
const argmap = new Map([
["C", "cwd"],
["f", "file"],
Expand Down Expand Up @@ -2059,7 +2065,7 @@ const dealias = (opt = {}) => {
};

//#endregion
//#region node_modules/.pnpm/[email protected].1/node_modules/tar/dist/esm/make-command.js
//#region node_modules/.pnpm/[email protected].2/node_modules/tar/dist/esm/make-command.js
const makeCommand = (syncFile, asyncFile, syncNoFile, asyncNoFile, validate) => {
return Object.assign((opt_ = [], entries, cb) => {
if (Array.isArray(opt_)) {
Expand Down Expand Up @@ -2453,7 +2459,7 @@ var ZstdDecompress = class extends Zstd {
};

//#endregion
//#region node_modules/.pnpm/[email protected].1/node_modules/tar/dist/esm/large-numbers.js
//#region node_modules/.pnpm/[email protected].2/node_modules/tar/dist/esm/large-numbers.js
const encode = (num, buf) => {
if (!Number.isSafeInteger(num)) throw Error("cannot encode number outside of javascript safe integer range");
else if (num < 0) encodeNegative(num, buf);
Expand Down Expand Up @@ -2519,7 +2525,7 @@ const onesComp = (byte) => (255 ^ byte) & 255;
const twosComp = (byte) => (255 ^ byte) + 1 & 255;

//#endregion
//#region node_modules/.pnpm/[email protected].1/node_modules/tar/dist/esm/types.js
//#region node_modules/.pnpm/[email protected].2/node_modules/tar/dist/esm/types.js
const isCode = (c) => name.has(c);
const name = new Map([
["0", "File"],
Expand Down Expand Up @@ -2547,7 +2553,7 @@ const name = new Map([
const code = new Map(Array.from(name).map((kv) => [kv[1], kv[0]]));

//#endregion
//#region node_modules/.pnpm/[email protected].1/node_modules/tar/dist/esm/header.js
//#region node_modules/.pnpm/[email protected].2/node_modules/tar/dist/esm/header.js
var Header = class {
cksumValid = false;
needPax = false;
Expand Down Expand Up @@ -2577,12 +2583,12 @@ var Header = class {
decode(buf, off, ex, gex) {
if (!off) off = 0;
if (!buf || !(buf.length >= off + 512)) throw new Error("need 512 bytes for header");
this.path = decString(buf, off, 100);
this.mode = decNumber(buf, off + 100, 8);
this.uid = decNumber(buf, off + 108, 8);
this.gid = decNumber(buf, off + 116, 8);
this.size = decNumber(buf, off + 124, 12);
this.mtime = decDate(buf, off + 136, 12);
this.path = ex?.path ?? decString(buf, off, 100);
this.mode = ex?.mode ?? gex?.mode ?? decNumber(buf, off + 100, 8);
this.uid = ex?.uid ?? gex?.uid ?? decNumber(buf, off + 108, 8);
this.gid = ex?.gid ?? gex?.gid ?? decNumber(buf, off + 116, 8);
this.size = ex?.size ?? gex?.size ?? decNumber(buf, off + 124, 12);
this.mtime = ex?.mtime ?? gex?.mtime ?? decDate(buf, off + 136, 12);
this.cksum = decNumber(buf, off + 148, 12);
if (gex) this.#slurp(gex, true);
if (ex) this.#slurp(ex);
Expand All @@ -2592,18 +2598,19 @@ var Header = class {
if (this.#type === "5") this.size = 0;
this.linkpath = decString(buf, off + 157, 100);
if (buf.subarray(off + 257, off + 265).toString() === "ustar\x0000") {
this.uname = decString(buf, off + 265, 32);
this.gname = decString(buf, off + 297, 32);
/* c8 ignore start */
this.devmaj = decNumber(buf, off + 329, 8) ?? 0;
this.devmin = decNumber(buf, off + 337, 8) ?? 0;
this.uname = ex?.uname ?? gex?.uname ?? decString(buf, off + 265, 32);
this.gname = ex?.gname ?? gex?.gname ?? decString(buf, off + 297, 32);
this.devmaj = ex?.devmaj ?? gex?.devmaj ?? decNumber(buf, off + 329, 8) ?? 0;
this.devmin = ex?.devmin ?? gex?.devmin ?? decNumber(buf, off + 337, 8) ?? 0;
/* c8 ignore stop */
if (buf[off + 475] !== 0) this.path = decString(buf, off + 345, 155) + "/" + this.path;
else {
const prefix = decString(buf, off + 345, 130);
if (prefix) this.path = prefix + "/" + this.path;
this.atime = decDate(buf, off + 476, 12);
this.ctime = decDate(buf, off + 488, 12);
/* c8 ignore start */
this.atime = ex?.atime ?? gex?.atime ?? decDate(buf, off + 476, 12);
this.ctime = ex?.ctime ?? gex?.ctime ?? decDate(buf, off + 488, 12);
}
}
let sum = 256;
Expand Down Expand Up @@ -2724,7 +2731,7 @@ const NULLS = new Array(156).join("\0");
const encString = (buf, off, size, str) => str === void 0 ? false : (buf.write(str + NULLS, off, size, "utf8"), str.length !== Buffer.byteLength(str) || str.length > size);

//#endregion
//#region node_modules/.pnpm/[email protected].1/node_modules/tar/dist/esm/pax.js
//#region node_modules/.pnpm/[email protected].2/node_modules/tar/dist/esm/pax.js
var Pax = class Pax {
atime;
mtime;
Expand Down Expand Up @@ -2821,12 +2828,12 @@ const parseKVLine = (set, line) => {
};

//#endregion
//#region node_modules/.pnpm/[email protected].1/node_modules/tar/dist/esm/normalize-windows-path.js
//#region node_modules/.pnpm/[email protected].2/node_modules/tar/dist/esm/normalize-windows-path.js
const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
const normalizeWindowsPath = platform !== "win32" ? (p) => p : (p) => p && p.replace(/\\/g, "/");

//#endregion
//#region node_modules/.pnpm/[email protected].1/node_modules/tar/dist/esm/read-entry.js
//#region node_modules/.pnpm/[email protected].2/node_modules/tar/dist/esm/read-entry.js
var ReadEntry = class extends Minipass {
extended;
globalExtended;
Expand Down Expand Up @@ -2930,7 +2937,7 @@ var ReadEntry = class extends Minipass {
};

//#endregion
//#region node_modules/.pnpm/[email protected].1/node_modules/tar/dist/esm/warn-method.js
//#region node_modules/.pnpm/[email protected].2/node_modules/tar/dist/esm/warn-method.js
const warnMethod = (self, code$1, message, data = {}) => {
if (self.file) data.file = self.file;
if (self.cwd) data.cwd = self.cwd;
Expand All @@ -2947,7 +2954,7 @@ const warnMethod = (self, code$1, message, data = {}) => {
};

//#endregion
//#region node_modules/.pnpm/[email protected].1/node_modules/tar/dist/esm/parse.js
//#region node_modules/.pnpm/[email protected].2/node_modules/tar/dist/esm/parse.js
const maxMetaEntrySize = 1024 * 1024;
const gzipHeader = Buffer.from([31, 139]);
const zstdHeader = Buffer.from([
Expand Down Expand Up @@ -3358,7 +3365,7 @@ while (this[PROCESSENTRY](this[QUEUE].shift()));
};

//#endregion
//#region node_modules/.pnpm/[email protected].1/node_modules/tar/dist/esm/strip-trailing-slashes.js
//#region node_modules/.pnpm/[email protected].2/node_modules/tar/dist/esm/strip-trailing-slashes.js
const stripTrailingSlashes = (str) => {
let i = str.length - 1;
let slashesStart = -1;
Expand All @@ -3370,7 +3377,7 @@ const stripTrailingSlashes = (str) => {
};

//#endregion
//#region node_modules/.pnpm/[email protected].1/node_modules/tar/dist/esm/list.js
//#region node_modules/.pnpm/[email protected].2/node_modules/tar/dist/esm/list.js
const onReadEntryFunction = (opt) => {
const onReadEntry = opt.onReadEntry;
opt.onReadEntry = onReadEntry ? (e) => {
Expand Down Expand Up @@ -3405,13 +3412,14 @@ const listFileSync = (opt) => {
const readSize = opt.maxReadSize || 16 * 1024 * 1024;
if (stat.size < readSize) {
const buf = Buffer.allocUnsafe(stat.size);
fs$2.readSync(fd, buf, 0, stat.size, 0);
p.end(buf);
const read = fs$2.readSync(fd, buf, 0, stat.size, 0);
p.end(read === buf.byteLength ? buf : buf.subarray(0, read));
} else {
let pos$1 = 0;
const buf = Buffer.allocUnsafe(readSize);
while (pos$1 < stat.size) {
const bytesRead = fs$2.readSync(fd, buf, 0, readSize, pos$1);
if (bytesRead === 0) break;
pos$1 += bytesRead;
p.write(buf.subarray(0, bytesRead));
}
Expand Down Expand Up @@ -3449,7 +3457,7 @@ const list = makeCommand(listFileSync, listFile, (opt) => new Parser(opt), (opt)
});

//#endregion
//#region node_modules/.pnpm/validate-npm-package-name@6.0.2/node_modules/validate-npm-package-name/lib/index.js
//#region node_modules/.pnpm/validate-npm-package-name@7.0.1/node_modules/validate-npm-package-name/lib/index.js
var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
const { builtinModules: builtins } = __require("module");
var scopedPackagePattern = /* @__PURE__ */ new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");
Expand All @@ -3471,6 +3479,7 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
}
if (!name$1.length) errors.push("name length must be greater than zero");
if (name$1.startsWith(".")) errors.push("name cannot start with a period");
if (name$1.startsWith("-")) errors.push("name cannot start with a hyphen");
if (name$1.match(/^_/)) errors.push("name cannot start with an underscore");
if (name$1.trim() !== name$1) errors.push("name cannot contain leading or trailing spaces");
exclusionList.forEach(function(excludedName) {
Expand Down
6 changes: 0 additions & 6 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ export default defineConfig(
files: ["**/*.js"],
extends: [jsdoc.configs["flat/recommended-typescript-flavor-error"]],
},
{
files: ["**/__tests__/**"],
rules: {
"@typescript-eslint/no-unsafe-assignment": "off",
},
},
{
rules: {
"jsdoc/tag-lines": "off",
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,20 @@
},
"devDependencies": {
"@actions/core": "^2.0.1",
"@mcous/eslint-config": "^0.7.0",
"@mcous/eslint-config": "^0.8.0",
"@mcous/prettier-config": "^0.4.0",
"@mcous/typescript-config": "^0.3.0",
"@types/command-line-args": "^5.2.3",
"@types/node": "^25.0.3",
"@types/validate-npm-package-name": "^4.0.2",
"@vitest/coverage-v8": "^4.0.16",
"concurrently": "^9.2.1",
"eslint": "^9.35.0",
"eslint": "^9.39.2",
"eslint-plugin-jsdoc": "^61.5.0",
"globals": "^17.0.0",
"prettier": "^3.6.2",
"prettier-plugin-jsdoc": "^1.3.3",
"rimraf": "^6.0.1",
"prettier": "^3.7.4",
"prettier-plugin-jsdoc": "^1.8.0",
"rimraf": "^6.1.2",
"rolldown": "1.0.0-beta.58",
"typescript": "^5.9.2",
"vitest": "^4.0.16",
Expand All @@ -75,9 +75,9 @@
"dependencies": {
"@types/semver": "^7.7.1",
"command-line-args": "6.0.1",
"semver": "7.7.2",
"tar": "7.5.1",
"validate-npm-package-name": "^6.0.2"
"semver": "7.7.3",
"tar": "7.5.2",
"validate-npm-package-name": "^7.0.1"
},
"packageManager": "pnpm@10.18.0+sha512.e804f889f1cecc40d572db084eec3e4881739f8dec69c0ff10d2d1beff9a4e309383ba27b5b750059d7f4c149535b6cd0d2cb1ed3aeb739239a4284a68f40cfa"
"packageManager": "pnpm@10.27.0+sha512.72d699da16b1179c14ba9e64dc71c9a40988cbdc65c264cb0e489db7de917f20dcf4d64d8723625f2969ba52d4b7e2a1170682d9ac2a5dcaeaab732b7e16f04a"
}
Loading