From a44a80af4d13a2f80720d36058a6cbe6f5685b1c Mon Sep 17 00:00:00 2001 From: Michael Cousins Date: Mon, 10 Apr 2023 18:14:50 -0400 Subject: [PATCH 01/36] wip: better behaved npm --- package-lock.json | 1212 +++++++++++++++++++++++++++++++- package.json | 6 +- src/npm2/__tests__/npm.test.ts | 87 +++ src/npm2/call-npm-cli.ts | 17 + src/npm2/client.ts | 14 + src/npm2/configure-npm.ts | 14 + src/npm2/index.ts | 42 ++ 7 files changed, 1375 insertions(+), 17 deletions(-) create mode 100644 src/npm2/__tests__/npm.test.ts create mode 100644 src/npm2/call-npm-cli.ts create mode 100644 src/npm2/client.ts create mode 100644 src/npm2/configure-npm.ts create mode 100644 src/npm2/index.ts diff --git a/package-lock.json b/package-lock.json index e783579..d3b0fec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,7 +43,11 @@ "nyc": "^15.1.0", "prettier": "^2.8.7", "shx": "^0.3.3", - "typescript": "^5.0.4" + "testdouble": "^3.17.2", + "testdouble-vitest": "^0.1.2", + "type-fest": "^3.8.0", + "typescript": "^5.0.4", + "vitest": "^0.30.0" }, "engines": { "node": ">=16" @@ -1194,6 +1198,15 @@ "integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==", "dev": true }, + "node_modules/@types/chai-subset": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.3.tgz", + "integrity": "sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==", + "dev": true, + "dependencies": { + "@types/chai": "*" + } + }, "node_modules/@types/command-line-args": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@types/command-line-args/-/command-line-args-5.2.0.tgz", @@ -1458,6 +1471,87 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@vitest/expect": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.30.0.tgz", + "integrity": "sha512-b/jLWBqi6WQHfezWm8VjgXdIyfejAurtxqdyCdDqoToCim5W/nDxKjFAADitEHPz80oz+IP+c+wmkGKBucSpiw==", + "dev": true, + "dependencies": { + "@vitest/spy": "0.30.0", + "@vitest/utils": "0.30.0", + "chai": "^4.3.7" + } + }, + "node_modules/@vitest/runner": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.30.0.tgz", + "integrity": "sha512-Xh4xkdRcymdeRNrSwjhgarCTSgnQu2J59wsFI6i4UhKrL5whzo5+vWyq7iWK1ht3fppPeNAtvkbqUDf+OJSCbQ==", + "dev": true, + "dependencies": { + "@vitest/utils": "0.30.0", + "concordance": "^5.0.4", + "p-limit": "^4.0.0", + "pathe": "^1.1.0" + } + }, + "node_modules/@vitest/runner/node_modules/p-limit": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@vitest/runner/node_modules/yocto-queue": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "dev": true, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@vitest/snapshot": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-0.30.0.tgz", + "integrity": "sha512-e4eSGCy36Bw3/Tkir9qYJDlFsUz3NALFPNJSxzlY8CFl901TV9iZdKgpqXpyG1sAhLO0tPHThBAMHRi8hRA8cg==", + "dev": true, + "dependencies": { + "magic-string": "^0.30.0", + "pathe": "^1.1.0", + "pretty-format": "^27.5.1" + } + }, + "node_modules/@vitest/spy": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.30.0.tgz", + "integrity": "sha512-olTWyG5gVWdfhCrdgxWQb2K3JYtj1/ZwInFFOb4GZ2HFI91PUWHWHhLRPORxwRwVvoXD1MS1162vPJZuHlKJkg==", + "dev": true, + "dependencies": { + "tinyspy": "^2.1.0" + } + }, + "node_modules/@vitest/utils": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.30.0.tgz", + "integrity": "sha512-qFZgoOKQ+rJV9xG4BBxgOSilnLQ2gkfG4I+z1wBuuQ3AD33zQrnB88kMFfzsot1E1AbF3dNK1e4CU7q3ojahRA==", + "dev": true, + "dependencies": { + "concordance": "^5.0.4", + "loupe": "^2.3.6", + "pretty-format": "^27.5.1" + } + }, "node_modules/acorn": { "version": "8.8.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", @@ -1479,6 +1573,15 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -1711,6 +1814,12 @@ "node": ">=8" } }, + "node_modules/blueimp-md5": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.19.0.tgz", + "integrity": "sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==", + "dev": true + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1789,6 +1898,15 @@ "semver": "^7.0.0" } }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/caching-transform": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", @@ -2026,6 +2144,25 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "node_modules/concordance": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/concordance/-/concordance-5.0.4.tgz", + "integrity": "sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==", + "dev": true, + "dependencies": { + "date-time": "^3.1.0", + "esutils": "^2.0.3", + "fast-diff": "^1.2.0", + "js-string-escape": "^1.0.1", + "lodash": "^4.17.15", + "md5-hex": "^3.0.1", + "semver": "^7.3.2", + "well-known-symbols": "^2.0.0" + }, + "engines": { + "node": ">=10.18.0 <11 || >=12.14.0 <13 || >=14" + } + }, "node_modules/concurrently": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.0.1.tgz", @@ -2159,6 +2296,18 @@ "url": "https://opencollective.com/date-fns" } }, + "node_modules/date-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/date-time/-/date-time-3.1.0.tgz", + "integrity": "sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==", + "dev": true, + "dependencies": { + "time-zone": "^1.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -3036,6 +3185,12 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, + "node_modules/fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, "node_modules/fast-glob": { "version": "3.2.12", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", @@ -3450,6 +3605,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globals/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/globalthis": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", @@ -3958,6 +4125,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-shared-array-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", @@ -4201,6 +4377,15 @@ "url": "https://opencollective.com/js-sdsl" } }, + "node_modules/js-string-escape": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", + "integrity": "sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -4271,6 +4456,12 @@ "node": ">=6" } }, + "node_modules/jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -4290,6 +4481,18 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, + "node_modules/local-pkg": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.3.tgz", + "integrity": "sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -4345,14 +4548,26 @@ } }, "node_modules/loupe": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", - "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", + "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", "dev": true, "dependencies": { "get-func-name": "^2.0.0" } }, + "node_modules/magic-string": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.0.tgz", + "integrity": "sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.13" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -4377,6 +4592,18 @@ "semver": "bin/semver.js" } }, + "node_modules/md5-hex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-3.0.1.tgz", + "integrity": "sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==", + "dev": true, + "dependencies": { + "blueimp-md5": "^2.10.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -4426,6 +4653,30 @@ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, + "node_modules/mlly": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.2.0.tgz", + "integrity": "sha512-+c7A3CV0KGdKcylsI6khWyts/CYrGTrRVo4R/I7u/cUsy0Conxa6LUhiEzVKIw14lc2L5aiO4+SeVe4TeGRKww==", + "dev": true, + "dependencies": { + "acorn": "^8.8.2", + "pathe": "^1.1.0", + "pkg-types": "^1.0.2", + "ufo": "^1.1.1" + } + }, + "node_modules/mlly/node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/mocha": { "version": "10.2.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", @@ -5046,6 +5297,12 @@ "node": ">=8" } }, + "node_modules/pathe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.0.tgz", + "integrity": "sha512-ODbEPR0KKHqECXW1GoxdDb+AZvULmXjVPy4rt+pGo2+TnjJTIPJQSVS6N63n8T2Ip+syHhbn52OewKicV0373w==", + "dev": true + }, "node_modules/pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -5073,6 +5330,17 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pkg-types": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.2.tgz", + "integrity": "sha512-hM58GKXOcj8WTqUXnsQyJYXdeAPbythQgEF3nTcEo+nkD49chjQ9IKm/QJy9xf6JakXptz86h7ecP2024rrLaQ==", + "dev": true, + "dependencies": { + "jsonc-parser": "^3.2.0", + "mlly": "^1.1.1", + "pathe": "^1.1.0" + } + }, "node_modules/pluralize": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", @@ -5082,6 +5350,48 @@ "node": ">=4" } }, + "node_modules/postcss": { + "version": "8.4.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", + "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + } + ], + "dependencies": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss/node_modules/nanoid": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -5106,6 +5416,32 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/process-on-spawn": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", @@ -5147,6 +5483,19 @@ } ] }, + "node_modules/quibble": { + "version": "0.6.17", + "resolved": "https://registry.npmjs.org/quibble/-/quibble-0.6.17.tgz", + "integrity": "sha512-uybGnGrx1hAhBCmzmVny+ycKaS5F71+q+iWVzbf8x/HyeEMDGeiQFVjWl1zhi4rwfTHa05+/NIExC4L5YRNPjQ==", + "dev": true, + "dependencies": { + "lodash": "^4.17.21", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">= 0.14.0" + } + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -5156,6 +5505,12 @@ "safe-buffer": "^5.1.0" } }, + "node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true + }, "node_modules/read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", @@ -5419,6 +5774,22 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rollup": { + "version": "3.20.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.20.2.tgz", + "integrity": "sha512-3zwkBQl7Ai7MFYQE0y1MeQ15+9jsi7XxfrqwTb/9EK8D9C9+//EBR4M+CuA1KODRaNbFez/lWxA5vhEGZp4MUg==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -5591,6 +5962,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true + }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -5618,6 +5995,15 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/spawn-command": { "version": "0.0.2-1", "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", @@ -5679,6 +6065,18 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true + }, + "node_modules/std-env": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.3.2.tgz", + "integrity": "sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA==", + "dev": true + }, "node_modules/string-argv": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", @@ -5746,6 +6144,28 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/stringify-object-es5": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/stringify-object-es5/-/stringify-object-es5-2.5.0.tgz", + "integrity": "sha512-vE7Xdx9ylG4JI16zy7/ObKUB+MtxuMcWlj/WHHr3+yAlQoN6sst2stU9E+2Qs3OrlJw/Pf3loWxL1GauEHf6MA==", + "dev": true, + "dependencies": { + "is-plain-obj": "^1.0.0", + "is-regexp": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stringify-object-es5/node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -5791,6 +6211,30 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strip-literal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.0.1.tgz", + "integrity": "sha512-QZTsipNpa2Ppr6v1AmJHESqJ3Uz247MUS0OjrnnZjFAvEoWqxuyFuXn2xLgMtRnijJShAa1HL0gtJyUs7u7n3Q==", + "dev": true, + "dependencies": { + "acorn": "^8.8.2" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/strip-literal/node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -5860,12 +6304,52 @@ "node": ">=8" } }, - "node_modules/text-table": { - "version": "0.2.0", + "node_modules/testdouble": { + "version": "3.17.2", + "resolved": "https://registry.npmjs.org/testdouble/-/testdouble-3.17.2.tgz", + "integrity": "sha512-oRrk1DJISNoFr3aaczIqrrhkOUQ26BsXN3SopYT/U0GTvk9hlKPCEbd9R2uxkcufKZgEfo9D1JAB4CJrjHE9cw==", + "dev": true, + "dependencies": { + "lodash": "^4.17.21", + "quibble": "^0.6.17", + "stringify-object-es5": "^2.5.0", + "theredoc": "^1.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/testdouble-vitest": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/testdouble-vitest/-/testdouble-vitest-0.1.2.tgz", + "integrity": "sha512-wwwaNAtZT/qY53ATromcSBjq7lktMxpj9ytvJqD8T4a3OrtPtuANonhklgep2JCvJDfvzz8J4/vaad7i/1UpsQ==", + "dev": true, + "peerDependencies": { + "testdouble": "^3.16.0", + "vitest": ">=0.25.0 <1.0.0" + } + }, + "node_modules/text-table": { + "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, + "node_modules/theredoc": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/theredoc/-/theredoc-1.0.0.tgz", + "integrity": "sha512-KU3SA3TjRRM932jpNfD3u4Ec3bSvedyo5ITPI7zgWYnKep7BwQQaxlhI9qbO+lKJoRnoAbEVfMcAHRuKVYikDA==", + "dev": true + }, + "node_modules/time-zone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz", + "integrity": "sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/tiny-glob": { "version": "0.2.9", "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", @@ -5876,6 +6360,30 @@ "globrex": "^0.1.2" } }, + "node_modules/tinybench": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.4.0.tgz", + "integrity": "sha512-iyziEiyFxX4kyxSp+MtY1oCH/lvjH3PxFN8PGCDeqcZWAJ/i+9y+nL85w99PxVzrIvew/GSkSbDYtiGVa85Afg==", + "dev": true + }, + "node_modules/tinypool": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.4.0.tgz", + "integrity": "sha512-2ksntHOKf893wSAH4z/+JbPpi92esw8Gn9N2deXX+B0EO92hexAVI9GIZZPx7P5aYo5KULfeOSt3kMOmSOy6uA==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.1.0.tgz", + "integrity": "sha512-7eORpyqImoOvkQJCSkL0d0mB4NHHIFAy4b1u8PHdDa7SjGS2njzl6/lyGoZLm+eyYEtlUmFGE0rFj66SWxZgQQ==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -5957,12 +6465,12 @@ } }, "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.8.0.tgz", + "integrity": "sha512-FVNSzGQz9Th+/9R6Lvv7WIAkstylfHN2/JYxkyhhmKFYh9At2DST8t6L6Lref9eYO8PXFTfG9Sg1Agg0K3vq3Q==", "dev": true, "engines": { - "node": ">=10" + "node": ">=14.16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -6012,6 +6520,12 @@ "node": ">=8" } }, + "node_modules/ufo": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.1.1.tgz", + "integrity": "sha512-MvlCc4GHrmZdAllBc0iUDowff36Q9Ndw/UzqmEKyrfSzokTd9ZCy1i+IIk5hrYKkjoYVQyNbrw7/F8XJ2rEwTg==", + "dev": true + }, "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", @@ -6056,6 +6570,178 @@ "spdx-expression-parse": "^3.0.0" } }, + "node_modules/vite": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.2.1.tgz", + "integrity": "sha512-7MKhqdy0ISo4wnvwtqZkjke6XN4taqQ2TBaTccLIpOKv7Vp2h4Y+NpmWCnGDeSvvn45KxvWgGyb0MkHvY1vgbg==", + "dev": true, + "dependencies": { + "esbuild": "^0.17.5", + "postcss": "^8.4.21", + "resolve": "^1.22.1", + "rollup": "^3.18.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.30.0.tgz", + "integrity": "sha512-23X5Ggylx0kU/bMf8MCcEEl55d/gsTtU81mMZjm7Z0FSpgKZexUqmX3mJtgglP9SySQQs9ydYg/GEahi/cKHaA==", + "dev": true, + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.3.4", + "mlly": "^1.2.0", + "pathe": "^1.1.0", + "picocolors": "^1.0.0", + "vite": "^3.0.0 || ^4.0.0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": ">=v14.18.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/vitest": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.30.0.tgz", + "integrity": "sha512-2WW4WeTHtrLFeoiuotWvEW6khozx1NvMGYoGsNz2btdddEbqvEdPJIouIdoiC5i61Rl1ctZvm9cn2R9TcPQlzw==", + "dev": true, + "dependencies": { + "@types/chai": "^4.3.4", + "@types/chai-subset": "^1.3.3", + "@types/node": "*", + "@vitest/expect": "0.30.0", + "@vitest/runner": "0.30.0", + "@vitest/snapshot": "0.30.0", + "@vitest/spy": "0.30.0", + "@vitest/utils": "0.30.0", + "acorn": "^8.8.2", + "acorn-walk": "^8.2.0", + "cac": "^6.7.14", + "chai": "^4.3.7", + "concordance": "^5.0.4", + "debug": "^4.3.4", + "local-pkg": "^0.4.3", + "magic-string": "^0.30.0", + "pathe": "^1.1.0", + "picocolors": "^1.0.0", + "source-map": "^0.6.1", + "std-env": "^3.3.2", + "strip-literal": "^1.0.1", + "tinybench": "^2.4.0", + "tinypool": "^0.4.0", + "vite": "^3.0.0 || ^4.0.0", + "vite-node": "0.30.0", + "why-is-node-running": "^2.2.2" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": ">=v14.18.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@vitest/browser": "*", + "@vitest/ui": "*", + "happy-dom": "*", + "jsdom": "*", + "playwright": "*", + "safaridriver": "*", + "webdriverio": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + }, + "playwright": { + "optional": true + }, + "safaridriver": { + "optional": true + }, + "webdriverio": { + "optional": true + } + } + }, + "node_modules/vitest/node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/well-known-symbols": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz", + "integrity": "sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -6112,6 +6798,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/why-is-node-running": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", + "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", + "dev": true, + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -7019,6 +7721,15 @@ "integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==", "dev": true }, + "@types/chai-subset": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.3.tgz", + "integrity": "sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==", + "dev": true, + "requires": { + "@types/chai": "*" + } + }, "@types/command-line-args": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@types/command-line-args/-/command-line-args-5.2.0.tgz", @@ -7183,6 +7894,77 @@ } } }, + "@vitest/expect": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.30.0.tgz", + "integrity": "sha512-b/jLWBqi6WQHfezWm8VjgXdIyfejAurtxqdyCdDqoToCim5W/nDxKjFAADitEHPz80oz+IP+c+wmkGKBucSpiw==", + "dev": true, + "requires": { + "@vitest/spy": "0.30.0", + "@vitest/utils": "0.30.0", + "chai": "^4.3.7" + } + }, + "@vitest/runner": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.30.0.tgz", + "integrity": "sha512-Xh4xkdRcymdeRNrSwjhgarCTSgnQu2J59wsFI6i4UhKrL5whzo5+vWyq7iWK1ht3fppPeNAtvkbqUDf+OJSCbQ==", + "dev": true, + "requires": { + "@vitest/utils": "0.30.0", + "concordance": "^5.0.4", + "p-limit": "^4.0.0", + "pathe": "^1.1.0" + }, + "dependencies": { + "p-limit": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "dev": true, + "requires": { + "yocto-queue": "^1.0.0" + } + }, + "yocto-queue": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "dev": true + } + } + }, + "@vitest/snapshot": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-0.30.0.tgz", + "integrity": "sha512-e4eSGCy36Bw3/Tkir9qYJDlFsUz3NALFPNJSxzlY8CFl901TV9iZdKgpqXpyG1sAhLO0tPHThBAMHRi8hRA8cg==", + "dev": true, + "requires": { + "magic-string": "^0.30.0", + "pathe": "^1.1.0", + "pretty-format": "^27.5.1" + } + }, + "@vitest/spy": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.30.0.tgz", + "integrity": "sha512-olTWyG5gVWdfhCrdgxWQb2K3JYtj1/ZwInFFOb4GZ2HFI91PUWHWHhLRPORxwRwVvoXD1MS1162vPJZuHlKJkg==", + "dev": true, + "requires": { + "tinyspy": "^2.1.0" + } + }, + "@vitest/utils": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.30.0.tgz", + "integrity": "sha512-qFZgoOKQ+rJV9xG4BBxgOSilnLQ2gkfG4I+z1wBuuQ3AD33zQrnB88kMFfzsot1E1AbF3dNK1e4CU7q3ojahRA==", + "dev": true, + "requires": { + "concordance": "^5.0.4", + "loupe": "^2.3.6", + "pretty-format": "^27.5.1" + } + }, "acorn": { "version": "8.8.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", @@ -7196,6 +7978,12 @@ "dev": true, "requires": {} }, + "acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true + }, "aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -7361,6 +8149,12 @@ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, + "blueimp-md5": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.19.0.tgz", + "integrity": "sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -7414,6 +8208,12 @@ "semver": "^7.0.0" } }, + "cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true + }, "caching-transform": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", @@ -7584,6 +8384,22 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "concordance": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/concordance/-/concordance-5.0.4.tgz", + "integrity": "sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==", + "dev": true, + "requires": { + "date-time": "^3.1.0", + "esutils": "^2.0.3", + "fast-diff": "^1.2.0", + "js-string-escape": "^1.0.1", + "lodash": "^4.17.15", + "md5-hex": "^3.0.1", + "semver": "^7.3.2", + "well-known-symbols": "^2.0.0" + } + }, "concurrently": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.0.1.tgz", @@ -7684,6 +8500,15 @@ "integrity": "sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==", "dev": true }, + "date-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/date-time/-/date-time-3.1.0.tgz", + "integrity": "sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==", + "dev": true, + "requires": { + "time-zone": "^1.0.0" + } + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -8331,6 +9156,12 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, "fast-glob": { "version": "3.2.12", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", @@ -8625,6 +9456,14 @@ "dev": true, "requires": { "type-fest": "^0.20.2" + }, + "dependencies": { + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } } }, "globalthis": { @@ -8978,6 +9817,12 @@ "has-tostringtag": "^1.0.0" } }, + "is-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA==", + "dev": true + }, "is-shared-array-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", @@ -9153,6 +9998,12 @@ "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", "dev": true }, + "js-string-escape": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", + "integrity": "sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -9205,6 +10056,12 @@ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, + "jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true + }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -9221,6 +10078,12 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, + "local-pkg": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.3.tgz", + "integrity": "sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==", + "dev": true + }, "locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -9264,14 +10127,23 @@ } }, "loupe": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", - "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", + "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", "dev": true, "requires": { "get-func-name": "^2.0.0" } }, + "magic-string": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.0.tgz", + "integrity": "sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==", + "dev": true, + "requires": { + "@jridgewell/sourcemap-codec": "^1.4.13" + } + }, "make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -9289,6 +10161,15 @@ } } }, + "md5-hex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-3.0.1.tgz", + "integrity": "sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==", + "dev": true, + "requires": { + "blueimp-md5": "^2.10.0" + } + }, "merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -9326,6 +10207,26 @@ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, + "mlly": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.2.0.tgz", + "integrity": "sha512-+c7A3CV0KGdKcylsI6khWyts/CYrGTrRVo4R/I7u/cUsy0Conxa6LUhiEzVKIw14lc2L5aiO4+SeVe4TeGRKww==", + "dev": true, + "requires": { + "acorn": "^8.8.2", + "pathe": "^1.1.0", + "pkg-types": "^1.0.2", + "ufo": "^1.1.1" + }, + "dependencies": { + "acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true + } + } + }, "mocha": { "version": "10.2.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", @@ -9804,6 +10705,12 @@ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true }, + "pathe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.0.tgz", + "integrity": "sha512-ODbEPR0KKHqECXW1GoxdDb+AZvULmXjVPy4rt+pGo2+TnjJTIPJQSVS6N63n8T2Ip+syHhbn52OewKicV0373w==", + "dev": true + }, "pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -9822,12 +10729,42 @@ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, + "pkg-types": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.2.tgz", + "integrity": "sha512-hM58GKXOcj8WTqUXnsQyJYXdeAPbythQgEF3nTcEo+nkD49chjQ9IKm/QJy9xf6JakXptz86h7ecP2024rrLaQ==", + "dev": true, + "requires": { + "jsonc-parser": "^3.2.0", + "mlly": "^1.1.1", + "pathe": "^1.1.0" + } + }, "pluralize": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", "dev": true }, + "postcss": { + "version": "8.4.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", + "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "dev": true, + "requires": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "dependencies": { + "nanoid": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "dev": true + } + } + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -9840,6 +10777,25 @@ "integrity": "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==", "dev": true }, + "pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, "process-on-spawn": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", @@ -9861,6 +10817,16 @@ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, + "quibble": { + "version": "0.6.17", + "resolved": "https://registry.npmjs.org/quibble/-/quibble-0.6.17.tgz", + "integrity": "sha512-uybGnGrx1hAhBCmzmVny+ycKaS5F71+q+iWVzbf8x/HyeEMDGeiQFVjWl1zhi4rwfTHa05+/NIExC4L5YRNPjQ==", + "dev": true, + "requires": { + "lodash": "^4.17.21", + "resolve": "^1.22.1" + } + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -9870,6 +10836,12 @@ "safe-buffer": "^5.1.0" } }, + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true + }, "read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", @@ -10057,6 +11029,15 @@ "glob": "^7.1.3" } }, + "rollup": { + "version": "3.20.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.20.2.tgz", + "integrity": "sha512-3zwkBQl7Ai7MFYQE0y1MeQ15+9jsi7XxfrqwTb/9EK8D9C9+//EBR4M+CuA1KODRaNbFez/lWxA5vhEGZp4MUg==", + "dev": true, + "requires": { + "fsevents": "~2.3.2" + } + }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -10181,6 +11162,12 @@ "object-inspect": "^1.9.0" } }, + "siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true + }, "signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -10199,6 +11186,12 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, + "source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true + }, "spawn-command": { "version": "0.0.2-1", "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", @@ -10257,6 +11250,18 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true + }, + "std-env": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.3.2.tgz", + "integrity": "sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA==", + "dev": true + }, "string-argv": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", @@ -10306,6 +11311,24 @@ "es-abstract": "^1.20.4" } }, + "stringify-object-es5": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/stringify-object-es5/-/stringify-object-es5-2.5.0.tgz", + "integrity": "sha512-vE7Xdx9ylG4JI16zy7/ObKUB+MtxuMcWlj/WHHr3+yAlQoN6sst2stU9E+2Qs3OrlJw/Pf3loWxL1GauEHf6MA==", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0", + "is-regexp": "^1.0.0" + }, + "dependencies": { + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "dev": true + } + } + }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -10336,6 +11359,23 @@ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, + "strip-literal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.0.1.tgz", + "integrity": "sha512-QZTsipNpa2Ppr6v1AmJHESqJ3Uz247MUS0OjrnnZjFAvEoWqxuyFuXn2xLgMtRnijJShAa1HL0gtJyUs7u7n3Q==", + "dev": true, + "requires": { + "acorn": "^8.8.2" + }, + "dependencies": { + "acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true + } + } + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -10386,12 +11426,43 @@ "minimatch": "^3.0.4" } }, + "testdouble": { + "version": "3.17.2", + "resolved": "https://registry.npmjs.org/testdouble/-/testdouble-3.17.2.tgz", + "integrity": "sha512-oRrk1DJISNoFr3aaczIqrrhkOUQ26BsXN3SopYT/U0GTvk9hlKPCEbd9R2uxkcufKZgEfo9D1JAB4CJrjHE9cw==", + "dev": true, + "requires": { + "lodash": "^4.17.21", + "quibble": "^0.6.17", + "stringify-object-es5": "^2.5.0", + "theredoc": "^1.0.0" + } + }, + "testdouble-vitest": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/testdouble-vitest/-/testdouble-vitest-0.1.2.tgz", + "integrity": "sha512-wwwaNAtZT/qY53ATromcSBjq7lktMxpj9ytvJqD8T4a3OrtPtuANonhklgep2JCvJDfvzz8J4/vaad7i/1UpsQ==", + "dev": true, + "requires": {} + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, + "theredoc": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/theredoc/-/theredoc-1.0.0.tgz", + "integrity": "sha512-KU3SA3TjRRM932jpNfD3u4Ec3bSvedyo5ITPI7zgWYnKep7BwQQaxlhI9qbO+lKJoRnoAbEVfMcAHRuKVYikDA==", + "dev": true + }, + "time-zone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz", + "integrity": "sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==", + "dev": true + }, "tiny-glob": { "version": "0.2.9", "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", @@ -10402,6 +11473,24 @@ "globrex": "^0.1.2" } }, + "tinybench": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.4.0.tgz", + "integrity": "sha512-iyziEiyFxX4kyxSp+MtY1oCH/lvjH3PxFN8PGCDeqcZWAJ/i+9y+nL85w99PxVzrIvew/GSkSbDYtiGVa85Afg==", + "dev": true + }, + "tinypool": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.4.0.tgz", + "integrity": "sha512-2ksntHOKf893wSAH4z/+JbPpi92esw8Gn9N2deXX+B0EO92hexAVI9GIZZPx7P5aYo5KULfeOSt3kMOmSOy6uA==", + "dev": true + }, + "tinyspy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.1.0.tgz", + "integrity": "sha512-7eORpyqImoOvkQJCSkL0d0mB4NHHIFAy4b1u8PHdDa7SjGS2njzl6/lyGoZLm+eyYEtlUmFGE0rFj66SWxZgQQ==", + "dev": true + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -10459,9 +11548,9 @@ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" }, "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.8.0.tgz", + "integrity": "sha512-FVNSzGQz9Th+/9R6Lvv7WIAkstylfHN2/JYxkyhhmKFYh9At2DST8t6L6Lref9eYO8PXFTfG9Sg1Agg0K3vq3Q==", "dev": true }, "typed-array-length": { @@ -10495,6 +11584,12 @@ "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==" }, + "ufo": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.1.1.tgz", + "integrity": "sha512-MvlCc4GHrmZdAllBc0iUDowff36Q9Ndw/UzqmEKyrfSzokTd9ZCy1i+IIk5hrYKkjoYVQyNbrw7/F8XJ2rEwTg==", + "dev": true + }, "unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", @@ -10532,6 +11627,81 @@ "spdx-expression-parse": "^3.0.0" } }, + "vite": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.2.1.tgz", + "integrity": "sha512-7MKhqdy0ISo4wnvwtqZkjke6XN4taqQ2TBaTccLIpOKv7Vp2h4Y+NpmWCnGDeSvvn45KxvWgGyb0MkHvY1vgbg==", + "dev": true, + "requires": { + "esbuild": "^0.17.5", + "fsevents": "~2.3.2", + "postcss": "^8.4.21", + "resolve": "^1.22.1", + "rollup": "^3.18.0" + } + }, + "vite-node": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.30.0.tgz", + "integrity": "sha512-23X5Ggylx0kU/bMf8MCcEEl55d/gsTtU81mMZjm7Z0FSpgKZexUqmX3mJtgglP9SySQQs9ydYg/GEahi/cKHaA==", + "dev": true, + "requires": { + "cac": "^6.7.14", + "debug": "^4.3.4", + "mlly": "^1.2.0", + "pathe": "^1.1.0", + "picocolors": "^1.0.0", + "vite": "^3.0.0 || ^4.0.0" + } + }, + "vitest": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.30.0.tgz", + "integrity": "sha512-2WW4WeTHtrLFeoiuotWvEW6khozx1NvMGYoGsNz2btdddEbqvEdPJIouIdoiC5i61Rl1ctZvm9cn2R9TcPQlzw==", + "dev": true, + "requires": { + "@types/chai": "^4.3.4", + "@types/chai-subset": "^1.3.3", + "@types/node": "*", + "@vitest/expect": "0.30.0", + "@vitest/runner": "0.30.0", + "@vitest/snapshot": "0.30.0", + "@vitest/spy": "0.30.0", + "@vitest/utils": "0.30.0", + "acorn": "^8.8.2", + "acorn-walk": "^8.2.0", + "cac": "^6.7.14", + "chai": "^4.3.7", + "concordance": "^5.0.4", + "debug": "^4.3.4", + "local-pkg": "^0.4.3", + "magic-string": "^0.30.0", + "pathe": "^1.1.0", + "picocolors": "^1.0.0", + "source-map": "^0.6.1", + "std-env": "^3.3.2", + "strip-literal": "^1.0.1", + "tinybench": "^2.4.0", + "tinypool": "^0.4.0", + "vite": "^3.0.0 || ^4.0.0", + "vite-node": "0.30.0", + "why-is-node-running": "^2.2.2" + }, + "dependencies": { + "acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true + } + } + }, + "well-known-symbols": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz", + "integrity": "sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==", + "dev": true + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -10573,6 +11743,16 @@ "is-typed-array": "^1.1.10" } }, + "why-is-node-running": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", + "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", + "dev": true, + "requires": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", diff --git a/package.json b/package.json index b06ec6b..f6ecb00 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,11 @@ "nyc": "^15.1.0", "prettier": "^2.8.7", "shx": "^0.3.3", - "typescript": "^5.0.4" + "testdouble": "^3.17.2", + "testdouble-vitest": "^0.1.2", + "type-fest": "^3.8.0", + "typescript": "^5.0.4", + "vitest": "^0.30.0" }, "dependencies": { "@jsdevtools/ez-spawn": "^3.0.4", diff --git a/src/npm2/__tests__/npm.test.ts b/src/npm2/__tests__/npm.test.ts new file mode 100644 index 0000000..6f1b3e7 --- /dev/null +++ b/src/npm2/__tests__/npm.test.ts @@ -0,0 +1,87 @@ +import { vi, describe, it, beforeEach, afterEach, expect } from "vitest"; +import { imitateEsm, reset } from "testdouble-vitest"; +import * as td from "testdouble"; + +import { createNpmClient, type NpmClient } from ".."; +import { configureNpmCli, removeNpmCliConfig } from "../configure-npm"; +import { callNpmCli } from "../call-npm-cli"; + +vi.mock("../configure-npm", () => imitateEsm("../configure-npm")); +vi.mock("../call-npm-cli", () => imitateEsm("../call-npm-cli")); + +describe("npm", () => { + const options = { registry: "https://example.com", token: "abc123" }; + const cliOptions = { extraArgs: [], env: {} }; + let subject: NpmClient; + + beforeEach(async () => { + td.when(configureNpmCli(options), { times: 1 }).thenResolve(cliOptions); + subject = await createNpmClient(options); + }); + + afterEach(() => { + reset(); + }); + + it("should clean up a client", async () => { + await subject.cleanup(); + td.verify(removeNpmCliConfig(cliOptions), { times: 1 }); + }); + + it("should get existing versions", async () => { + td.when( + callNpmCli( + "view", + ["@example/cool-package", "dist-tags", "versions"], + cliOptions + ) + ).thenResolve({ + "dist-tags": { latest: "1.2.3" }, + versions: ["1.2.3", "4.5.6"], + }); + + const result = await subject.getVersions("@example/cool-package"); + + expect(result).toEqual({ + "dist-tags": { latest: "1.2.3" }, + versions: ["1.2.3", "4.5.6"], + }); + }); + + it("should get no versions if unpublished", async () => { + td.when( + callNpmCli( + "view", + ["@example/cool-package", "dist-tags", "versions"], + cliOptions + ) + ).thenResolve({ + code: "E404", + error: new Error("oh no"), + }); + + const result = await subject.getVersions("@example/cool-package"); + + expect(result).toEqual({ + "dist-tags": {}, + versions: [], + }); + }); + + it("should raise if other error", async () => { + td.when( + callNpmCli( + "view", + ["@example/cool-package", "dist-tags", "versions"], + cliOptions + ) + ).thenResolve({ + code: "E999", + error: new Error("oh no"), + }); + + const result = subject.getVersions("@example/cool-package"); + + await expect(result).rejects.toThrow(/oh no/); + }); +}); diff --git a/src/npm2/call-npm-cli.ts b/src/npm2/call-npm-cli.ts new file mode 100644 index 0000000..da939ea --- /dev/null +++ b/src/npm2/call-npm-cli.ts @@ -0,0 +1,17 @@ +export interface NpmCliOptions { + extraArgs: string[]; + env: Record; +} + +export interface NpmCliError { + error: Error; + code: string | null; +} + +export async function callNpmCli( + command: string, + args: string[], + options: NpmCliOptions +): Promise { + throw new Error("callNpmCli not implemented"); +} diff --git a/src/npm2/client.ts b/src/npm2/client.ts new file mode 100644 index 0000000..0844e11 --- /dev/null +++ b/src/npm2/client.ts @@ -0,0 +1,14 @@ +export interface NpmClient { + getVersions(packageName: string): Promise; + cleanup(): Promise; +} + +export interface NpmClientOptions { + registry: string; + token: string; +} + +export interface GetVersionsResult { + "dist-tags": Record; + versions: string[]; +} diff --git a/src/npm2/configure-npm.ts b/src/npm2/configure-npm.ts new file mode 100644 index 0000000..fab5d7f --- /dev/null +++ b/src/npm2/configure-npm.ts @@ -0,0 +1,14 @@ +import type { NpmClientOptions } from "."; +import type { NpmCliOptions } from "./call-npm-cli"; + +export async function configureNpmCli( + options: NpmClientOptions +): Promise { + throw new Error("configureNpmCli not implemented"); +} + +export async function removeNpmCliConfig( + cliOptions: NpmCliOptions +): Promise { + throw new Error("removeNpmCliConfig not implemented"); +} diff --git a/src/npm2/index.ts b/src/npm2/index.ts new file mode 100644 index 0000000..a1bad3e --- /dev/null +++ b/src/npm2/index.ts @@ -0,0 +1,42 @@ +import { NpmPublishError } from "../error"; +import type { NpmClient, NpmClientOptions, GetVersionsResult } from "./client"; +import { configureNpmCli, removeNpmCliConfig } from "./configure-npm"; +import { callNpmCli, type NpmCliOptions } from "./call-npm-cli"; + +export * from "./client"; + +export async function createNpmClient( + options: NpmClientOptions +): Promise { + const npmCliOptions = await configureNpmCli(options); + + return { + getVersions: (packageName: string) => + getVersions(packageName, npmCliOptions), + cleanup: () => removeNpmCliConfig(npmCliOptions), + }; +} + +async function getVersions( + packageName: string, + cliOptions: NpmCliOptions +): Promise { + const result = await callNpmCli( + "view", + [packageName, "dist-tags", "versions"], + cliOptions + ); + + if ("error" in result) { + if (result.code !== "E404") { + throw new NpmPublishError( + `Unable to get published versions of ${packageName}`, + result.error + ); + } + + return { "dist-tags": {}, versions: [] }; + } + + return result; +} From 15f560139d46faccb940092d5183aef2a1626672 Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Tue, 11 Apr 2023 07:53:23 -0400 Subject: [PATCH 02/36] wip: continue figuring out the shape of things --- src/npm2/__tests__/npm.test.ts | 73 ++++++++-------------------------- src/npm2/call-npm-cli.ts | 17 ++++---- src/npm2/client.ts | 14 ------- src/npm2/configure-npm.ts | 14 ------- src/npm2/index.ts | 49 ++++++++--------------- src/npm2/use-npm-env.ts | 15 +++++++ 6 files changed, 54 insertions(+), 128 deletions(-) delete mode 100644 src/npm2/client.ts delete mode 100644 src/npm2/configure-npm.ts create mode 100644 src/npm2/use-npm-env.ts diff --git a/src/npm2/__tests__/npm.test.ts b/src/npm2/__tests__/npm.test.ts index 6f1b3e7..7f22c4b 100644 --- a/src/npm2/__tests__/npm.test.ts +++ b/src/npm2/__tests__/npm.test.ts @@ -1,87 +1,46 @@ -import { vi, describe, it, beforeEach, afterEach, expect } from "vitest"; +import { vi, describe, it, afterEach, expect } from "vitest"; import { imitateEsm, reset } from "testdouble-vitest"; import * as td from "testdouble"; -import { createNpmClient, type NpmClient } from ".."; -import { configureNpmCli, removeNpmCliConfig } from "../configure-npm"; +import * as subject from ".."; +import { useNpmEnv, type NpmCliTask } from "../use-npm-env"; import { callNpmCli } from "../call-npm-cli"; -vi.mock("../configure-npm", () => imitateEsm("../configure-npm")); +vi.mock("../use-npm-env", () => imitateEsm("../use-npm-env")); vi.mock("../call-npm-cli", () => imitateEsm("../call-npm-cli")); describe("npm", () => { - const options = { registry: "https://example.com", token: "abc123" }; - const cliOptions = { extraArgs: [], env: {} }; - let subject: NpmClient; - - beforeEach(async () => { - td.when(configureNpmCli(options), { times: 1 }).thenResolve(cliOptions); - subject = await createNpmClient(options); - }); + const authConfig = { registry: "https://example.com", token: "abc123" }; + const cliEnv = { foo: "bar" }; afterEach(() => { reset(); }); - it("should clean up a client", async () => { - await subject.cleanup(); - td.verify(removeNpmCliConfig(cliOptions), { times: 1 }); - }); + it("should configure auth to get existing versions", async () => { + td.when(useNpmEnv(authConfig, td.matchers.isA(Function))).thenDo( + (_: unknown, task: NpmCliTask) => task(cliEnv) + ); - it("should get existing versions", async () => { td.when( - callNpmCli( + callNpmCli( "view", ["@example/cool-package", "dist-tags", "versions"], - cliOptions + { env: cliEnv, ifError: { e404: { "dist-tags": {}, versions: [] } } } ) ).thenResolve({ "dist-tags": { latest: "1.2.3" }, versions: ["1.2.3", "4.5.6"], }); - const result = await subject.getVersions("@example/cool-package"); + const result = await subject.getVersions( + "@example/cool-package", + authConfig + ); expect(result).toEqual({ "dist-tags": { latest: "1.2.3" }, versions: ["1.2.3", "4.5.6"], }); }); - - it("should get no versions if unpublished", async () => { - td.when( - callNpmCli( - "view", - ["@example/cool-package", "dist-tags", "versions"], - cliOptions - ) - ).thenResolve({ - code: "E404", - error: new Error("oh no"), - }); - - const result = await subject.getVersions("@example/cool-package"); - - expect(result).toEqual({ - "dist-tags": {}, - versions: [], - }); - }); - - it("should raise if other error", async () => { - td.when( - callNpmCli( - "view", - ["@example/cool-package", "dist-tags", "versions"], - cliOptions - ) - ).thenResolve({ - code: "E999", - error: new Error("oh no"), - }); - - const result = subject.getVersions("@example/cool-package"); - - await expect(result).rejects.toThrow(/oh no/); - }); }); diff --git a/src/npm2/call-npm-cli.ts b/src/npm2/call-npm-cli.ts index da939ea..521c842 100644 --- a/src/npm2/call-npm-cli.ts +++ b/src/npm2/call-npm-cli.ts @@ -1,17 +1,14 @@ -export interface NpmCliOptions { - extraArgs: string[]; - env: Record; -} +export type NpmCliEnv = Record; -export interface NpmCliError { - error: Error; - code: string | null; +export interface NpmCliOptions { + env: Record; + ifError?: Record; } -export async function callNpmCli( +export async function callNpmCli( command: string, args: string[], - options: NpmCliOptions -): Promise { + options: NpmCliOptions +): Promise { throw new Error("callNpmCli not implemented"); } diff --git a/src/npm2/client.ts b/src/npm2/client.ts deleted file mode 100644 index 0844e11..0000000 --- a/src/npm2/client.ts +++ /dev/null @@ -1,14 +0,0 @@ -export interface NpmClient { - getVersions(packageName: string): Promise; - cleanup(): Promise; -} - -export interface NpmClientOptions { - registry: string; - token: string; -} - -export interface GetVersionsResult { - "dist-tags": Record; - versions: string[]; -} diff --git a/src/npm2/configure-npm.ts b/src/npm2/configure-npm.ts deleted file mode 100644 index fab5d7f..0000000 --- a/src/npm2/configure-npm.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { NpmClientOptions } from "."; -import type { NpmCliOptions } from "./call-npm-cli"; - -export async function configureNpmCli( - options: NpmClientOptions -): Promise { - throw new Error("configureNpmCli not implemented"); -} - -export async function removeNpmCliConfig( - cliOptions: NpmCliOptions -): Promise { - throw new Error("removeNpmCliConfig not implemented"); -} diff --git a/src/npm2/index.ts b/src/npm2/index.ts index a1bad3e..9b1caf8 100644 --- a/src/npm2/index.ts +++ b/src/npm2/index.ts @@ -1,42 +1,25 @@ -import { NpmPublishError } from "../error"; -import type { NpmClient, NpmClientOptions, GetVersionsResult } from "./client"; -import { configureNpmCli, removeNpmCliConfig } from "./configure-npm"; -import { callNpmCli, type NpmCliOptions } from "./call-npm-cli"; +import { useNpmEnv, type NpmAuthConfig } from "./use-npm-env"; +import { callNpmCli, type NpmCliEnv } from "./call-npm-cli"; -export * from "./client"; - -export async function createNpmClient( - options: NpmClientOptions -): Promise { - const npmCliOptions = await configureNpmCli(options); +export interface VersionsResult { + "dist-tags": Record; + versions: string[]; +} - return { - getVersions: (packageName: string) => - getVersions(packageName, npmCliOptions), - cleanup: () => removeNpmCliConfig(npmCliOptions), - }; +export async function getVersions( + packageName: string, + authConfig: NpmAuthConfig +): Promise { + return useNpmEnv(authConfig, (env) => getVersionWithCliEnv(packageName, env)); } -async function getVersions( +async function getVersionWithCliEnv( packageName: string, - cliOptions: NpmCliOptions -): Promise { - const result = await callNpmCli( + env: NpmCliEnv +): Promise { + return callNpmCli( "view", [packageName, "dist-tags", "versions"], - cliOptions + { env, ifError: { e404: { "dist-tags": {}, versions: [] } } } ); - - if ("error" in result) { - if (result.code !== "E404") { - throw new NpmPublishError( - `Unable to get published versions of ${packageName}`, - result.error - ); - } - - return { "dist-tags": {}, versions: [] }; - } - - return result; } diff --git a/src/npm2/use-npm-env.ts b/src/npm2/use-npm-env.ts new file mode 100644 index 0000000..10cfd85 --- /dev/null +++ b/src/npm2/use-npm-env.ts @@ -0,0 +1,15 @@ +import type { NpmCliEnv } from "./call-npm-cli"; + +export interface NpmAuthConfig { + registry: string; + token: string; +} + +export type NpmCliTask = (env: NpmCliEnv) => Promise; + +export async function useNpmEnv( + auth: NpmAuthConfig, + task: NpmCliTask +): Promise { + throw new Error("useNpmEnv not implemented"); +} From 07bd14ca396e0e564fe48a8338bc29314f1a6ce7 Mon Sep 17 00:00:00 2001 From: Michael Cousins Date: Tue, 11 Apr 2023 17:07:28 -0400 Subject: [PATCH 03/36] wip: move on to publish --- src/npm2/__tests__/call-npm-cli.test.ts | 45 +++++++++++++++++ src/npm2/__tests__/npm.test.ts | 28 ++++++++--- src/npm2/call-npm-cli.ts | 66 +++++++++++++++++++++++-- src/npm2/get-publish-args.ts | 0 src/npm2/index.ts | 44 +++++++++++++---- src/npm2/use-npm-env.ts | 54 +++++++++++++++++++- 6 files changed, 215 insertions(+), 22 deletions(-) create mode 100644 src/npm2/__tests__/call-npm-cli.test.ts create mode 100644 src/npm2/get-publish-args.ts diff --git a/src/npm2/__tests__/call-npm-cli.test.ts b/src/npm2/__tests__/call-npm-cli.test.ts new file mode 100644 index 0000000..46a8d49 --- /dev/null +++ b/src/npm2/__tests__/call-npm-cli.test.ts @@ -0,0 +1,45 @@ +import { describe, it, expect } from "vitest"; + +import * as subject from "../call-npm-cli"; + +describe("callNpmCli", () => { + it("should call the NPM CLI in JSON mode", async () => { + const result = await subject.callNpmCli("config", ["list"]); + + expect(result).toMatchObject({ json: true }); + }); + + it("should call the NPM CLI in JSON mode", async () => { + const result = await subject.callNpmCli("config", ["list"]); + + expect(result).toMatchObject({ json: true }); + }); + + it("should raise if error", async () => { + const result = subject.callNpmCli("explain", ["not-a-real-package"]); + + await expect(result).rejects.toThrow(/No dependencies found/); + }); + + it("should map an error code to a return value", async () => { + const result = await subject.callNpmCli("config", [], { + ifError: { eusage: 42 }, + }); + + expect(result).toEqual(42); + }); + + it("should return plain strings", async () => { + const result = await subject.callNpmCli("config", ["get", "userconfig"]); + + expect(result).toMatch(/^.+\.npmrc$/); + }); + + it("should allow the environment to be overriden", async () => { + const result = await subject.callNpmCli("config", ["get", "userconfig"], { + env: { npm_config_userconfig: "/foo/bar/.npmrc" }, + }); + + expect(result).toEqual("/foo/bar/.npmrc"); + }); +}); diff --git a/src/npm2/__tests__/npm.test.ts b/src/npm2/__tests__/npm.test.ts index 7f22c4b..76d4997 100644 --- a/src/npm2/__tests__/npm.test.ts +++ b/src/npm2/__tests__/npm.test.ts @@ -1,4 +1,4 @@ -import { vi, describe, it, afterEach, expect } from "vitest"; +import { vi, describe, it, beforeEach, afterEach, expect } from "vitest"; import { imitateEsm, reset } from "testdouble-vitest"; import * as td from "testdouble"; @@ -13,15 +13,17 @@ describe("npm", () => { const authConfig = { registry: "https://example.com", token: "abc123" }; const cliEnv = { foo: "bar" }; - afterEach(() => { - reset(); - }); - - it("should configure auth to get existing versions", async () => { + beforeEach(() => { td.when(useNpmEnv(authConfig, td.matchers.isA(Function))).thenDo( (_: unknown, task: NpmCliTask) => task(cliEnv) ); + }); + afterEach(() => { + reset(); + }); + + it("should get existing versions", async () => { td.when( callNpmCli( "view", @@ -43,4 +45,18 @@ describe("npm", () => { versions: ["1.2.3", "4.5.6"], }); }); + + it("should publish a package", async () => { + td.when( + callNpmCli( + "view", + ["@example/cool-package", "dist-tags", "versions"], + { env: cliEnv, ifError: { e404: { "dist-tags": {}, versions: [] } } } + ) + ).thenResolve({ + id: "@example/cool-package@1.2.3", + name: "@example/cool-package", + version: "1.2.3", + }); + }); }); diff --git a/src/npm2/call-npm-cli.ts b/src/npm2/call-npm-cli.ts index 521c842..a56e029 100644 --- a/src/npm2/call-npm-cli.ts +++ b/src/npm2/call-npm-cli.ts @@ -1,14 +1,72 @@ +import childProcess from "node:child_process"; + export type NpmCliEnv = Record; export interface NpmCliOptions { - env: Record; + env?: Record; ifError?: Record; } -export async function callNpmCli( +const execProcess = ( + command: string, + env: Record = {} +): Promise<{ stdout: string; error: Error | null }> => { + // strip Node.js environment and runtime options out of the call to NPM + const { + NODE_ENV: _NODE_ENV, + NODE_OPTIONS: _NODE_OPTIONS, + ...processEnv + } = process.env; + + return new Promise((resolve) => { + childProcess.exec( + command, + { env: { ...processEnv, ...env } }, + (error, stdout) => resolve({ stdout: stdout.trim(), error }) + ); + }); +}; + +const parseJson = (value: string): TParsed | undefined => { + try { + return JSON.parse(value) as TParsed; + } catch { + return undefined; + } +}; + +/** + * Call the NPM CLI in JSON mode. + * + * @param command The command of the NPM CLI to call + * @param args Any arguments to send to the command + * @param options Customize environment variables or add an error handler. + * @returns The parsed JSON, or stdout if unparsable. + */ +export async function callNpmCli( command: string, args: string[], - options: NpmCliOptions + options: NpmCliOptions = {} ): Promise { - throw new Error("callNpmCli not implemented"); + const { stdout, error } = await execProcess( + ["npm", command, "--json", ...args].join(" "), + options?.env + ); + + if (error) { + const errorPayload = parseJson<{ error: { code?: string | null } }>(stdout); + const errorCode = errorPayload?.error?.code?.toLowerCase(); + + if ( + typeof errorCode === "string" && + options.ifError && + errorCode in options.ifError + ) { + return options.ifError[errorCode]; + } + + throw error; + } + + return parseJson(stdout) ?? (stdout as TReturn); } diff --git a/src/npm2/get-publish-args.ts b/src/npm2/get-publish-args.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/npm2/index.ts b/src/npm2/index.ts index 9b1caf8..062f186 100644 --- a/src/npm2/index.ts +++ b/src/npm2/index.ts @@ -6,20 +6,44 @@ export interface VersionsResult { versions: string[]; } +export interface PublishResult { + id: string; + name: string; + version: string; +} + +export interface PublishConfig { + packageSpec?: string; + tag?: string; + access?: string; + dryRun?: boolean; +} + +/** + * Get a package's published versions. + * + * @param packageName The name of the package to get published versions for. + * @param authConfig Registry and auth token. + * @returns All published versions and tags. + */ export async function getVersions( packageName: string, authConfig: NpmAuthConfig ): Promise { - return useNpmEnv(authConfig, (env) => getVersionWithCliEnv(packageName, env)); + return useNpmEnv(authConfig, (env) => { + return callNpmCli( + "view", + [packageName, "dist-tags", "versions"], + { env, ifError: { e404: { "dist-tags": {}, versions: [] } } } + ); + }); } -async function getVersionWithCliEnv( - packageName: string, - env: NpmCliEnv -): Promise { - return callNpmCli( - "view", - [packageName, "dist-tags", "versions"], - { env, ifError: { e404: { "dist-tags": {}, versions: [] } } } - ); +export async function publish( + publishConfig: PublishConfig, + authConfig: NpmAuthConfig +): Promise { + return useNpmEnv(authConfig, (env) => { + return callNpmCli("publish", []); + }); } diff --git a/src/npm2/use-npm-env.ts b/src/npm2/use-npm-env.ts index 10cfd85..88588ad 100644 --- a/src/npm2/use-npm-env.ts +++ b/src/npm2/use-npm-env.ts @@ -1,4 +1,8 @@ -import type { NpmCliEnv } from "./call-npm-cli"; +import fs from "node:fs/promises"; +import os from "node:os"; +import path from "node:path"; + +import { callNpmCli, type NpmCliEnv } from "./call-npm-cli"; export interface NpmAuthConfig { registry: string; @@ -7,9 +11,55 @@ export interface NpmAuthConfig { export type NpmCliTask = (env: NpmCliEnv) => Promise; +/** + * Create a temporary .npmrc file with the given auth token. + * Copies the existing user config. + * + * @param auth Registry and token. + * @param task A function called with the configured environment. + * After the function resolves, the temporary .npmrc file will be removed. + */ export async function useNpmEnv( auth: NpmAuthConfig, task: NpmCliTask ): Promise { - throw new Error("useNpmEnv not implemented"); + const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "npm-publish-")); + const tempConfigFile = path.join(tempDir, ".npmrc"); + const existingConfigFile = await callNpmCli("config", [ + "get", + "userconfig", + ]); + let config = ""; + + try { + config = await fs.readFile(existingConfigFile, "utf8"); + } catch (error: unknown) { + if ( + !(error instanceof Error) || + (error as NodeJS.ErrnoException).code !== "ENOENT" + ) { + throw error; + } + } + + const { registry, token } = auth; + const registryUrl = new URL(registry); + + config += ` + ; added by jsdevtools/npm-publish + //${registryUrl.hostname}/:authToken=\${NODE_AUTH_TOKEN} + `; + + await fs.writeFile(tempConfigFile, config, "utf8"); + + try { + return await task({ + /* eslint-disable @typescript-eslint/naming-convention */ + NODE_AUTH_TOKEN: token, + npm_config_userconfig: tempConfigFile, + /* eslint-enable @typescript-eslint/naming-convention */ + }); + } finally { + await fs.rm(tempDir, { force: true, recursive: true }); + } } From 36d603fa160b7dcf52487732740deb034e80b20b Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Wed, 12 Apr 2023 10:05:30 -0400 Subject: [PATCH 04/36] fixup: still going for it --- .eslintrc.yml | 4 +- dist/index.js | 1651 +++-------------- dist/index.js.map | 8 +- package-lock.json | 37 +- package.json | 1 - src/normalize-options.ts | 41 +- src/npm-config.ts | 111 -- src/npm-env.ts | 29 - src/npm-publish.ts | 21 +- src/npm.ts | 132 -- .../__tests__/call-npm-cli.test.ts | 0 src/npm/__tests__/get-publish-args.test.ts | 44 + src/{npm2 => npm}/__tests__/npm.test.ts | 24 +- src/{npm2 => npm}/call-npm-cli.ts | 4 +- src/npm/get-publish-args.ts | 30 + src/{npm2 => npm}/index.ts | 25 +- src/{npm2 => npm}/use-npm-env.ts | 50 +- src/npm2/get-publish-args.ts | 0 src/options.ts | 4 +- src/read-manifest.ts | 17 +- src/results.ts | 2 +- 21 files changed, 508 insertions(+), 1727 deletions(-) delete mode 100644 src/npm-config.ts delete mode 100644 src/npm-env.ts delete mode 100644 src/npm.ts rename src/{npm2 => npm}/__tests__/call-npm-cli.test.ts (100%) create mode 100644 src/npm/__tests__/get-publish-args.test.ts rename src/{npm2 => npm}/__tests__/npm.test.ts (71%) rename src/{npm2 => npm}/call-npm-cli.ts (93%) create mode 100644 src/npm/get-publish-args.ts rename src/{npm2 => npm}/index.ts (76%) rename src/{npm2 => npm}/use-npm-env.ts (50%) delete mode 100644 src/npm2/get-publish-args.ts diff --git a/.eslintrc.yml b/.eslintrc.yml index dc42834..ff0ddce 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -33,14 +33,14 @@ overrides: "@typescript-eslint/no-var-requires": "off" "unicorn/prefer-module": "off" - - files: ["test/**/*"] + - files: ["test/**/*", "**/__tests__/**/*"] env: mocha: true rules: sonarjs/no-duplicate-string: "off" rules: - n/no-unpublished-import: ["error", { "allowModules": ["@actions/core"] }] + n/no-unpublished-import: "off" # temporary rule overrides # TODO(mc, 2023-04-12): fix problems, remove overrides, and remove --quiet diff --git a/dist/index.js b/dist/index.js index 31215ac..4c577e7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -99,11 +99,11 @@ var require_command = __commonJS({ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.issue = exports.issueCommand = void 0; - var os = __importStar(require("os")); + var os2 = __importStar(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os.EOL); + process.stdout.write(cmd.toString() + os2.EOL); } exports.issueCommand = issueCommand; function issue(name, message = "") { @@ -520,7 +520,7 @@ var require_file_command = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; var fs3 = __importStar(require("fs")); - var os = __importStar(require("os")); + var os2 = __importStar(require("os")); var uuid_1 = (init_esm_node(), __toCommonJS(esm_node_exports)); var utils_1 = require_utils(); function issueFileCommand(command, message) { @@ -531,7 +531,7 @@ var require_file_command = __commonJS({ if (!fs3.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs3.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { + fs3.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os2.EOL}`, { encoding: "utf8" }); } @@ -545,7 +545,7 @@ var require_file_command = __commonJS({ if (convertedValue.includes(delimiter)) { throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; + return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; } exports.prepareKeyValueMessage = prepareKeyValueMessage; } @@ -647,44 +647,44 @@ var require_tunnel = __commonJS({ return agent; } function TunnelingAgent(options) { - var self2 = this; - self2.options = options || {}; - self2.proxyOptions = self2.options.proxy || {}; - self2.maxSockets = self2.options.maxSockets || http.Agent.defaultMaxSockets; - self2.requests = []; - self2.sockets = []; - self2.on("free", function onFree(socket, host, port, localAddress) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + self.on("free", function onFree(socket, host, port, localAddress) { var options2 = toOptions(host, port, localAddress); - for (var i = 0, len = self2.requests.length; i < len; ++i) { - var pending = self2.requests[i]; + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; if (pending.host === options2.host && pending.port === options2.port) { - self2.requests.splice(i, 1); + self.requests.splice(i, 1); pending.request.onSocket(socket); return; } } socket.destroy(); - self2.removeSocket(socket); + self.removeSocket(socket); }); } util.inherits(TunnelingAgent, events.EventEmitter); TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self2 = this; - var options = mergeOptions({ request: req }, self2.options, toOptions(host, port, localAddress)); - if (self2.sockets.length >= this.maxSockets) { - self2.requests.push(options); + var self = this; + var options = mergeOptions({ request: req }, self.options, toOptions(host, port, localAddress)); + if (self.sockets.length >= this.maxSockets) { + self.requests.push(options); return; } - self2.createSocket(options, function(socket) { + self.createSocket(options, function(socket) { socket.on("free", onFree); socket.on("close", onCloseOrRemove); socket.on("agentRemove", onCloseOrRemove); req.onSocket(socket); function onFree() { - self2.emit("free", socket, options); + self.emit("free", socket, options); } function onCloseOrRemove(err) { - self2.removeSocket(socket); + self.removeSocket(socket); socket.removeListener("free", onFree); socket.removeListener("close", onCloseOrRemove); socket.removeListener("agentRemove", onCloseOrRemove); @@ -692,10 +692,10 @@ var require_tunnel = __commonJS({ }); }; TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self2 = this; + var self = this; var placeholder = {}; - self2.sockets.push(placeholder); - var connectOptions = mergeOptions({}, self2.proxyOptions, { + self.sockets.push(placeholder); + var connectOptions = mergeOptions({}, self.proxyOptions, { method: "CONNECT", path: options.host + ":" + options.port, agent: false, @@ -711,7 +711,7 @@ var require_tunnel = __commonJS({ connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); } debug2("making CONNECT request"); - var connectReq = self2.request(connectOptions); + var connectReq = self.request(connectOptions); connectReq.useChunkedEncodingByDefault = false; connectReq.once("response", onResponse); connectReq.once("upgrade", onUpgrade); @@ -738,7 +738,7 @@ var require_tunnel = __commonJS({ var error = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); error.code = "ECONNRESET"; options.request.emit("error", error); - self2.removeSocket(placeholder); + self.removeSocket(placeholder); return; } if (head.length > 0) { @@ -747,11 +747,11 @@ var require_tunnel = __commonJS({ var error = new Error("got illegal response body from proxy"); error.code = "ECONNRESET"; options.request.emit("error", error); - self2.removeSocket(placeholder); + self.removeSocket(placeholder); return; } debug2("tunneling connection has established"); - self2.sockets[self2.sockets.indexOf(placeholder)] = socket; + self.sockets[self.sockets.indexOf(placeholder)] = socket; return cb(socket); } function onError(cause) { @@ -764,7 +764,7 @@ var require_tunnel = __commonJS({ var error = new Error("tunneling socket could not be established, cause=" + cause.message); error.code = "ECONNRESET"; options.request.emit("error", error); - self2.removeSocket(placeholder); + self.removeSocket(placeholder); } }; TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { @@ -781,15 +781,15 @@ var require_tunnel = __commonJS({ } }; function createSecureSocket(options, cb) { - var self2 = this; - TunnelingAgent.prototype.createSocket.call(self2, options, function(socket) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { var hostHeader = options.request.getHeader("host"); - var tlsOptions = mergeOptions({}, self2.options, { + var tlsOptions = mergeOptions({}, self.options, { socket, servername: hostHeader ? hostHeader.replace(/:.*$/, "") : options.host }); var secureSocket = tls.connect(0, tlsOptions); - self2.sockets[self2.sockets.indexOf(socket)] = secureSocket; + self.sockets[self.sockets.indexOf(socket)] = secureSocket; cb(secureSocket); }); } @@ -878,11 +878,11 @@ var require_lib = __commonJS({ }; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve3) { - resolve3(value); + return value instanceof P ? value : new P(function(resolve) { + resolve(value); }); } - return new (P || (P = Promise))(function(resolve3, reject) { + return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -898,7 +898,7 @@ var require_lib = __commonJS({ } } function step(result) { - result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -983,13 +983,13 @@ var require_lib = __commonJS({ } readBody() { return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve3) => __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); }); this.message.on("end", () => { - resolve3(output.toString()); + resolve(output.toString()); }); })); }); @@ -1198,14 +1198,14 @@ var require_lib = __commonJS({ */ requestRaw(info, data) { return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve3, reject) => { + return new Promise((resolve, reject) => { function callbackForResult(err, res) { if (err) { reject(err); } else if (!res) { reject(new Error("Unknown error")); } else { - resolve3(res); + resolve(res); } } this.requestRawWithCallback(info, data, callbackForResult); @@ -1361,12 +1361,12 @@ var require_lib = __commonJS({ return __awaiter(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve3) => setTimeout(() => resolve3(), ms)); + return new Promise((resolve) => setTimeout(() => resolve(), ms)); }); } _processResponse(res, options) { return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve3, reject) => __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -1374,7 +1374,7 @@ var require_lib = __commonJS({ headers: {} }; if (statusCode === HttpCodes.NotFound) { - resolve3(response); + resolve(response); } function dateTimeDeserializer(key, value) { if (typeof value === "string") { @@ -1413,7 +1413,7 @@ var require_lib = __commonJS({ err.result = response.result; reject(err); } else { - resolve3(response); + resolve(response); } })); }); @@ -1430,11 +1430,11 @@ var require_auth = __commonJS({ "use strict"; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve3) { - resolve3(value); + return value instanceof P ? value : new P(function(resolve) { + resolve(value); }); } - return new (P || (P = Promise))(function(resolve3, reject) { + return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -1450,7 +1450,7 @@ var require_auth = __commonJS({ } } function step(result) { - result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -1534,11 +1534,11 @@ var require_oidc_utils = __commonJS({ "use strict"; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve3) { - resolve3(value); + return value instanceof P ? value : new P(function(resolve) { + resolve(value); }); } - return new (P || (P = Promise))(function(resolve3, reject) { + return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -1554,7 +1554,7 @@ var require_oidc_utils = __commonJS({ } } function step(result) { - result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -1632,11 +1632,11 @@ var require_summary = __commonJS({ "use strict"; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve3) { - resolve3(value); + return value instanceof P ? value : new P(function(resolve) { + resolve(value); }); } - return new (P || (P = Promise))(function(resolve3, reject) { + return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -1652,7 +1652,7 @@ var require_summary = __commonJS({ } } function step(result) { - result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -1954,7 +1954,7 @@ var require_path_utils = __commonJS({ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; - var path = __importStar(require("path")); + var path4 = __importStar(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -1964,7 +1964,7 @@ var require_path_utils = __commonJS({ } exports.toWin32Path = toWin32Path; function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path.sep); + return pth.replace(/[/\\]/g, path4.sep); } exports.toPlatformPath = toPlatformPath; } @@ -2004,11 +2004,11 @@ var require_core = __commonJS({ }; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve3) { - resolve3(value); + return value instanceof P ? value : new P(function(resolve) { + resolve(value); }); } - return new (P || (P = Promise))(function(resolve3, reject) { + return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -2024,7 +2024,7 @@ var require_core = __commonJS({ } } function step(result) { - result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -2034,8 +2034,8 @@ var require_core = __commonJS({ var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os = __importStar(require("os")); - var path = __importStar(require("path")); + var os2 = __importStar(require("os")); + var path4 = __importStar(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -2063,7 +2063,7 @@ var require_core = __commonJS({ } else { command_1.issueCommand("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path4.delimiter}${process.env["PATH"]}`; } exports.addPath = addPath; function getInput2(name, options) { @@ -2102,7 +2102,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); if (filePath) { return file_command_1.issueFileCommand("OUTPUT", file_command_1.prepareKeyValueMessage(name, value)); } - process.stdout.write(os.EOL); + process.stdout.write(os2.EOL); command_1.issueCommand("set-output", { name }, utils_1.toCommandValue(value)); } exports.setOutput = setOutput2; @@ -2136,7 +2136,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports.notice = notice; function info(message) { - process.stdout.write(message + os.EOL); + process.stdout.write(message + os2.EOL); } exports.info = info; function startGroup(name) { @@ -2347,10 +2347,10 @@ var require_semver = __commonJS({ var { re, t } = require_re(); var parseOptions = require_parse_options(); var { compareIdentifiers } = require_identifiers(); - var SemVer3 = class { + var SemVer2 = class { constructor(version2, options) { options = parseOptions(options); - if (version2 instanceof SemVer3) { + if (version2 instanceof SemVer2) { if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) { return version2; } else { @@ -2413,11 +2413,11 @@ var require_semver = __commonJS({ } compare(other) { debug2("SemVer.compare", this.version, this.options, other); - if (!(other instanceof SemVer3)) { + if (!(other instanceof SemVer2)) { if (typeof other === "string" && other === this.version) { return 0; } - other = new SemVer3(other, this.options); + other = new SemVer2(other, this.options); } if (other.version === this.version) { return 0; @@ -2425,14 +2425,14 @@ var require_semver = __commonJS({ return this.compareMain(other) || this.comparePre(other); } compareMain(other) { - if (!(other instanceof SemVer3)) { - other = new SemVer3(other, this.options); + if (!(other instanceof SemVer2)) { + other = new SemVer2(other, this.options); } return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); } comparePre(other) { - if (!(other instanceof SemVer3)) { - other = new SemVer3(other, this.options); + if (!(other instanceof SemVer2)) { + other = new SemVer2(other, this.options); } if (this.prerelease.length && !other.prerelease.length) { return -1; @@ -2460,8 +2460,8 @@ var require_semver = __commonJS({ } while (++i); } compareBuild(other) { - if (!(other instanceof SemVer3)) { - other = new SemVer3(other, this.options); + if (!(other instanceof SemVer2)) { + other = new SemVer2(other, this.options); } let i = 0; do { @@ -2564,7 +2564,7 @@ var require_semver = __commonJS({ return this; } }; - module2.exports = SemVer3; + module2.exports = SemVer2; } }); @@ -2572,9 +2572,9 @@ var require_semver = __commonJS({ var require_parse = __commonJS({ "node_modules/semver/functions/parse.js"(exports, module2) { var { MAX_LENGTH } = require_constants(); - var SemVer3 = require_semver(); + var SemVer2 = require_semver(); var parse2 = (version2, options) => { - if (version2 instanceof SemVer3) { + if (version2 instanceof SemVer2) { return version2; } if (typeof version2 !== "string") { @@ -2584,7 +2584,7 @@ var require_parse = __commonJS({ return null; } try { - return new SemVer3(version2, options); + return new SemVer2(version2, options); } catch (er) { return null; } @@ -2620,7 +2620,7 @@ var require_clean = __commonJS({ // node_modules/semver/functions/inc.js var require_inc = __commonJS({ "node_modules/semver/functions/inc.js"(exports, module2) { - var SemVer3 = require_semver(); + var SemVer2 = require_semver(); var inc = (version2, release, options, identifier, identifierBase) => { if (typeof options === "string") { identifierBase = identifier; @@ -2628,8 +2628,8 @@ var require_inc = __commonJS({ options = void 0; } try { - return new SemVer3( - version2 instanceof SemVer3 ? version2.version : version2, + return new SemVer2( + version2 instanceof SemVer2 ? version2.version : version2, options ).inc(release, identifier, identifierBase).version; } catch (er) { @@ -2643,8 +2643,8 @@ var require_inc = __commonJS({ // node_modules/semver/functions/compare.js var require_compare = __commonJS({ "node_modules/semver/functions/compare.js"(exports, module2) { - var SemVer3 = require_semver(); - var compare2 = (a, b, loose) => new SemVer3(a, loose).compare(new SemVer3(b, loose)); + var SemVer2 = require_semver(); + var compare2 = (a, b, loose) => new SemVer2(a, loose).compare(new SemVer2(b, loose)); module2.exports = compare2; } }); @@ -2702,8 +2702,8 @@ var require_diff = __commonJS({ // node_modules/semver/functions/major.js var require_major = __commonJS({ "node_modules/semver/functions/major.js"(exports, module2) { - var SemVer3 = require_semver(); - var major = (a, loose) => new SemVer3(a, loose).major; + var SemVer2 = require_semver(); + var major = (a, loose) => new SemVer2(a, loose).major; module2.exports = major; } }); @@ -2711,8 +2711,8 @@ var require_major = __commonJS({ // node_modules/semver/functions/minor.js var require_minor = __commonJS({ "node_modules/semver/functions/minor.js"(exports, module2) { - var SemVer3 = require_semver(); - var minor = (a, loose) => new SemVer3(a, loose).minor; + var SemVer2 = require_semver(); + var minor = (a, loose) => new SemVer2(a, loose).minor; module2.exports = minor; } }); @@ -2720,8 +2720,8 @@ var require_minor = __commonJS({ // node_modules/semver/functions/patch.js var require_patch = __commonJS({ "node_modules/semver/functions/patch.js"(exports, module2) { - var SemVer3 = require_semver(); - var patch = (a, loose) => new SemVer3(a, loose).patch; + var SemVer2 = require_semver(); + var patch = (a, loose) => new SemVer2(a, loose).patch; module2.exports = patch; } }); @@ -2759,10 +2759,10 @@ var require_compare_loose = __commonJS({ // node_modules/semver/functions/compare-build.js var require_compare_build = __commonJS({ "node_modules/semver/functions/compare-build.js"(exports, module2) { - var SemVer3 = require_semver(); + var SemVer2 = require_semver(); var compareBuild = (a, b, loose) => { - const versionA = new SemVer3(a, loose); - const versionB = new SemVer3(b, loose); + const versionA = new SemVer2(a, loose); + const versionB = new SemVer2(b, loose); return versionA.compare(versionB) || versionA.compareBuild(versionB); }; module2.exports = compareBuild; @@ -2884,11 +2884,11 @@ var require_cmp = __commonJS({ // node_modules/semver/functions/coerce.js var require_coerce = __commonJS({ "node_modules/semver/functions/coerce.js"(exports, module2) { - var SemVer3 = require_semver(); + var SemVer2 = require_semver(); var parse2 = require_parse(); var { re, t } = require_re(); var coerce = (version2, options) => { - if (version2 instanceof SemVer3) { + if (version2 instanceof SemVer2) { return version2; } if (typeof version2 === "number") { @@ -2942,23 +2942,23 @@ var require_yallist = __commonJS({ Yallist.Node = Node; Yallist.create = Yallist; function Yallist(list) { - var self2 = this; - if (!(self2 instanceof Yallist)) { - self2 = new Yallist(); + var self = this; + if (!(self instanceof Yallist)) { + self = new Yallist(); } - self2.tail = null; - self2.head = null; - self2.length = 0; + self.tail = null; + self.head = null; + self.length = 0; if (list && typeof list.forEach === "function") { list.forEach(function(item) { - self2.push(item); + self.push(item); }); } else if (arguments.length > 0) { for (var i = 0, l = arguments.length; i < l; i++) { - self2.push(arguments[i]); + self.push(arguments[i]); } } - return self2; + return self; } Yallist.prototype.removeNode = function(node) { if (node.list !== this) { @@ -3252,30 +3252,30 @@ var require_yallist = __commonJS({ this.tail = head; return this; }; - function insert(self2, node, value) { - var inserted = node === self2.head ? new Node(value, null, node, self2) : new Node(value, node, node.next, self2); + function insert(self, node, value) { + var inserted = node === self.head ? new Node(value, null, node, self) : new Node(value, node, node.next, self); if (inserted.next === null) { - self2.tail = inserted; + self.tail = inserted; } if (inserted.prev === null) { - self2.head = inserted; + self.head = inserted; } - self2.length++; + self.length++; return inserted; } - function push(self2, item) { - self2.tail = new Node(item, self2.tail, null, self2); - if (!self2.head) { - self2.head = self2.tail; + function push(self, item) { + self.tail = new Node(item, self.tail, null, self); + if (!self.head) { + self.head = self.tail; } - self2.length++; + self.length++; } - function unshift(self2, item) { - self2.head = new Node(item, null, self2.head, self2); - if (!self2.tail) { - self2.tail = self2.head; + function unshift(self, item) { + self.head = new Node(item, null, self.head, self); + if (!self.tail) { + self.tail = self.head; } - self2.length++; + self.length++; } function Node(value, prev, next, list) { if (!(this instanceof Node)) { @@ -3507,47 +3507,47 @@ var require_lru_cache = __commonJS({ this[CACHE].forEach((value, key) => get(this, key, false)); } }; - var get = (self2, key, doUse) => { - const node = self2[CACHE].get(key); + var get = (self, key, doUse) => { + const node = self[CACHE].get(key); if (node) { const hit = node.value; - if (isStale(self2, hit)) { - del(self2, node); - if (!self2[ALLOW_STALE]) + if (isStale(self, hit)) { + del(self, node); + if (!self[ALLOW_STALE]) return void 0; } else { if (doUse) { - if (self2[UPDATE_AGE_ON_GET]) + if (self[UPDATE_AGE_ON_GET]) node.value.now = Date.now(); - self2[LRU_LIST].unshiftNode(node); + self[LRU_LIST].unshiftNode(node); } } return hit.value; } }; - var isStale = (self2, hit) => { - if (!hit || !hit.maxAge && !self2[MAX_AGE]) + var isStale = (self, hit) => { + if (!hit || !hit.maxAge && !self[MAX_AGE]) return false; const diff2 = Date.now() - hit.now; - return hit.maxAge ? diff2 > hit.maxAge : self2[MAX_AGE] && diff2 > self2[MAX_AGE]; + return hit.maxAge ? diff2 > hit.maxAge : self[MAX_AGE] && diff2 > self[MAX_AGE]; }; - var trim = (self2) => { - if (self2[LENGTH] > self2[MAX]) { - for (let walker = self2[LRU_LIST].tail; self2[LENGTH] > self2[MAX] && walker !== null; ) { + var trim = (self) => { + if (self[LENGTH] > self[MAX]) { + for (let walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null; ) { const prev = walker.prev; - del(self2, walker); + del(self, walker); walker = prev; } } }; - var del = (self2, node) => { + var del = (self, node) => { if (node) { const hit = node.value; - if (self2[DISPOSE]) - self2[DISPOSE](hit.key, hit.value); - self2[LENGTH] -= hit.length; - self2[CACHE].delete(hit.key); - self2[LRU_LIST].removeNode(node); + if (self[DISPOSE]) + self[DISPOSE](hit.key, hit.value); + self[LENGTH] -= hit.length; + self[CACHE].delete(hit.key); + self[LRU_LIST].removeNode(node); } }; var Entry = class { @@ -3559,15 +3559,15 @@ var require_lru_cache = __commonJS({ this.maxAge = maxAge || 0; } }; - var forEachStep = (self2, fn, node, thisp) => { + var forEachStep = (self, fn, node, thisp) => { let hit = node.value; - if (isStale(self2, hit)) { - del(self2, node); - if (!self2[ALLOW_STALE]) + if (isStale(self, hit)) { + del(self, node); + if (!self[ALLOW_STALE]) hit = void 0; } if (hit) - fn.call(thisp, hit.value, hit.key, self2); + fn.call(thisp, hit.value, hit.key, self); }; module2.exports = LRUCache; } @@ -3686,7 +3686,7 @@ var require_range = __commonJS({ } if (typeof version2 === "string") { try { - version2 = new SemVer3(version2, this.options); + version2 = new SemVer2(version2, this.options); } catch (er) { return false; } @@ -3705,7 +3705,7 @@ var require_range = __commonJS({ var parseOptions = require_parse_options(); var Comparator = require_comparator(); var debug2 = require_debug(); - var SemVer3 = require_semver(); + var SemVer2 = require_semver(); var { re, t, @@ -3975,7 +3975,7 @@ var require_comparator = __commonJS({ if (!m[2]) { this.semver = ANY; } else { - this.semver = new SemVer3(m[2], this.options.loose); + this.semver = new SemVer2(m[2], this.options.loose); } } toString() { @@ -3988,7 +3988,7 @@ var require_comparator = __commonJS({ } if (typeof version2 === "string") { try { - version2 = new SemVer3(version2, this.options); + version2 = new SemVer2(version2, this.options); } catch (er) { return false; } @@ -4040,7 +4040,7 @@ var require_comparator = __commonJS({ var { re, t } = require_re(); var cmp = require_cmp(); var debug2 = require_debug(); - var SemVer3 = require_semver(); + var SemVer2 = require_semver(); var Range = require_range(); } }); @@ -4073,7 +4073,7 @@ var require_to_comparators = __commonJS({ // node_modules/semver/ranges/max-satisfying.js var require_max_satisfying = __commonJS({ "node_modules/semver/ranges/max-satisfying.js"(exports, module2) { - var SemVer3 = require_semver(); + var SemVer2 = require_semver(); var Range = require_range(); var maxSatisfying = (versions, range, options) => { let max = null; @@ -4088,7 +4088,7 @@ var require_max_satisfying = __commonJS({ if (rangeObj.test(v)) { if (!max || maxSV.compare(v) === -1) { max = v; - maxSV = new SemVer3(max, options); + maxSV = new SemVer2(max, options); } } }); @@ -4101,7 +4101,7 @@ var require_max_satisfying = __commonJS({ // node_modules/semver/ranges/min-satisfying.js var require_min_satisfying = __commonJS({ "node_modules/semver/ranges/min-satisfying.js"(exports, module2) { - var SemVer3 = require_semver(); + var SemVer2 = require_semver(); var Range = require_range(); var minSatisfying = (versions, range, options) => { let min = null; @@ -4116,7 +4116,7 @@ var require_min_satisfying = __commonJS({ if (rangeObj.test(v)) { if (!min || minSV.compare(v) === 1) { min = v; - minSV = new SemVer3(min, options); + minSV = new SemVer2(min, options); } } }); @@ -4129,16 +4129,16 @@ var require_min_satisfying = __commonJS({ // node_modules/semver/ranges/min-version.js var require_min_version = __commonJS({ "node_modules/semver/ranges/min-version.js"(exports, module2) { - var SemVer3 = require_semver(); + var SemVer2 = require_semver(); var Range = require_range(); var gt = require_gt(); var minVersion = (range, loose) => { range = new Range(range, loose); - let minver = new SemVer3("0.0.0"); + let minver = new SemVer2("0.0.0"); if (range.test(minver)) { return minver; } - minver = new SemVer3("0.0.0-0"); + minver = new SemVer2("0.0.0-0"); if (range.test(minver)) { return minver; } @@ -4147,7 +4147,7 @@ var require_min_version = __commonJS({ const comparators = range.set[i]; let setMin = null; comparators.forEach((comparator) => { - const compver = new SemVer3(comparator.semver.version); + const compver = new SemVer2(comparator.semver.version); switch (comparator.operator) { case ">": if (compver.prerelease.length === 0) { @@ -4200,7 +4200,7 @@ var require_valid2 = __commonJS({ // node_modules/semver/ranges/outside.js var require_outside = __commonJS({ "node_modules/semver/ranges/outside.js"(exports, module2) { - var SemVer3 = require_semver(); + var SemVer2 = require_semver(); var Comparator = require_comparator(); var { ANY } = Comparator; var Range = require_range(); @@ -4210,7 +4210,7 @@ var require_outside = __commonJS({ var lte = require_lte(); var gte = require_gte(); var outside = (version2, range, hilo, options) => { - version2 = new SemVer3(version2, options); + version2 = new SemVer2(version2, options); range = new Range(range, options); let gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { @@ -4512,7 +4512,7 @@ var require_semver2 = __commonJS({ "node_modules/semver/index.js"(exports, module2) { var internalRe = require_re(); var constants = require_constants(); - var SemVer3 = require_semver(); + var SemVer2 = require_semver(); var identifiers = require_identifiers(); var parse2 = require_parse(); var valid = require_valid(); @@ -4589,7 +4589,7 @@ var require_semver2 = __commonJS({ intersects, simplifyRange, subset, - SemVer: SemVer3, + SemVer: SemVer2, re: internalRe.re, src: internalRe.src, tokens: internalRe.t, @@ -4601,981 +4601,6 @@ var require_semver2 = __commonJS({ } }); -// node_modules/string-argv/index.js -var require_string_argv = __commonJS({ - "node_modules/string-argv/index.js"(exports) { - "use strict"; - exports.__esModule = true; - function parseArgsStringToArgv(value, env, file) { - var myRegexp = /([^\s'"]([^\s'"]*(['"])([^\3]*?)\3)+[^\s'"]*)|[^\s'"]+|(['"])([^\5]*?)\5/gi; - var myString = value; - var myArray = []; - if (env) { - myArray.push(env); - } - if (file) { - myArray.push(file); - } - var match; - do { - match = myRegexp.exec(myString); - if (match !== null) { - myArray.push(firstString(match[1], match[6], match[0])); - } - } while (match !== null); - return myArray; - } - exports["default"] = parseArgsStringToArgv; - exports.parseArgsStringToArgv = parseArgsStringToArgv; - function firstString() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - if (typeof arg === "string") { - return arg; - } - } - } - } -}); - -// node_modules/type-detect/type-detect.js -var require_type_detect = __commonJS({ - "node_modules/type-detect/type-detect.js"(exports, module2) { - (function(global2, factory) { - typeof exports === "object" && typeof module2 !== "undefined" ? module2.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global2.typeDetect = factory(); - })(exports, function() { - "use strict"; - var promiseExists = typeof Promise === "function"; - var globalObject = typeof self === "object" ? self : global; - var symbolExists = typeof Symbol !== "undefined"; - var mapExists = typeof Map !== "undefined"; - var setExists = typeof Set !== "undefined"; - var weakMapExists = typeof WeakMap !== "undefined"; - var weakSetExists = typeof WeakSet !== "undefined"; - var dataViewExists = typeof DataView !== "undefined"; - var symbolIteratorExists = symbolExists && typeof Symbol.iterator !== "undefined"; - var symbolToStringTagExists = symbolExists && typeof Symbol.toStringTag !== "undefined"; - var setEntriesExists = setExists && typeof Set.prototype.entries === "function"; - var mapEntriesExists = mapExists && typeof Map.prototype.entries === "function"; - var setIteratorPrototype = setEntriesExists && Object.getPrototypeOf((/* @__PURE__ */ new Set()).entries()); - var mapIteratorPrototype = mapEntriesExists && Object.getPrototypeOf((/* @__PURE__ */ new Map()).entries()); - var arrayIteratorExists = symbolIteratorExists && typeof Array.prototype[Symbol.iterator] === "function"; - var arrayIteratorPrototype = arrayIteratorExists && Object.getPrototypeOf([][Symbol.iterator]()); - var stringIteratorExists = symbolIteratorExists && typeof String.prototype[Symbol.iterator] === "function"; - var stringIteratorPrototype = stringIteratorExists && Object.getPrototypeOf(""[Symbol.iterator]()); - var toStringLeftSliceLength = 8; - var toStringRightSliceLength = -1; - function typeDetect(obj) { - var typeofObj = typeof obj; - if (typeofObj !== "object") { - return typeofObj; - } - if (obj === null) { - return "null"; - } - if (obj === globalObject) { - return "global"; - } - if (Array.isArray(obj) && (symbolToStringTagExists === false || !(Symbol.toStringTag in obj))) { - return "Array"; - } - if (typeof window === "object" && window !== null) { - if (typeof window.location === "object" && obj === window.location) { - return "Location"; - } - if (typeof window.document === "object" && obj === window.document) { - return "Document"; - } - if (typeof window.navigator === "object") { - if (typeof window.navigator.mimeTypes === "object" && obj === window.navigator.mimeTypes) { - return "MimeTypeArray"; - } - if (typeof window.navigator.plugins === "object" && obj === window.navigator.plugins) { - return "PluginArray"; - } - } - if ((typeof window.HTMLElement === "function" || typeof window.HTMLElement === "object") && obj instanceof window.HTMLElement) { - if (obj.tagName === "BLOCKQUOTE") { - return "HTMLQuoteElement"; - } - if (obj.tagName === "TD") { - return "HTMLTableDataCellElement"; - } - if (obj.tagName === "TH") { - return "HTMLTableHeaderCellElement"; - } - } - } - var stringTag = symbolToStringTagExists && obj[Symbol.toStringTag]; - if (typeof stringTag === "string") { - return stringTag; - } - var objPrototype = Object.getPrototypeOf(obj); - if (objPrototype === RegExp.prototype) { - return "RegExp"; - } - if (objPrototype === Date.prototype) { - return "Date"; - } - if (promiseExists && objPrototype === Promise.prototype) { - return "Promise"; - } - if (setExists && objPrototype === Set.prototype) { - return "Set"; - } - if (mapExists && objPrototype === Map.prototype) { - return "Map"; - } - if (weakSetExists && objPrototype === WeakSet.prototype) { - return "WeakSet"; - } - if (weakMapExists && objPrototype === WeakMap.prototype) { - return "WeakMap"; - } - if (dataViewExists && objPrototype === DataView.prototype) { - return "DataView"; - } - if (mapExists && objPrototype === mapIteratorPrototype) { - return "Map Iterator"; - } - if (setExists && objPrototype === setIteratorPrototype) { - return "Set Iterator"; - } - if (arrayIteratorExists && objPrototype === arrayIteratorPrototype) { - return "Array Iterator"; - } - if (stringIteratorExists && objPrototype === stringIteratorPrototype) { - return "String Iterator"; - } - if (objPrototype === null) { - return "Object"; - } - return Object.prototype.toString.call(obj).slice(toStringLeftSliceLength, toStringRightSliceLength); - } - return typeDetect; - }); - } -}); - -// node_modules/@jsdevtools/ez-spawn/lib/normalize-args.js -var require_normalize_args = __commonJS({ - "node_modules/@jsdevtools/ez-spawn/lib/normalize-args.js"(exports, module2) { - "use strict"; - var { parseArgsStringToArgv } = require_string_argv(); - var detectType = require_type_detect(); - module2.exports = normalizeArgs; - function normalizeArgs(params) { - let command, args, options, callback, error; - try { - ({ command, args, options, callback } = shiftArgs(params)); - let commandArgs = []; - if (typeof command === "string" && args === void 0) { - command = splitArgString(command); - } - if (Array.isArray(command)) { - commandArgs = command.slice(1); - command = command[0]; - } - if (typeof args === "string") { - args = splitArgString(args); - } - if (Array.isArray(args)) { - args = commandArgs.concat(args); - } - if (args === void 0 || args === null) { - args = commandArgs; - } - if (options === void 0 || options === null) { - options = {}; - } - options.encoding = options.encoding || "utf8"; - validateArgs(command, args, options, callback); - } catch (err) { - error = err; - command = String(command || ""); - args = (Array.isArray(args) ? args : []).map((arg) => String(arg || "")); - } - return { command, args, options, callback, error }; - } - function shiftArgs(params) { - params = Array.prototype.slice.call(params); - let command, args, options, callback; - let lastParam = params[params.length - 1]; - if (typeof lastParam === "function") { - callback = lastParam; - params.pop(); - } - lastParam = params[params.length - 1]; - if (lastParam === null || lastParam === void 0 || typeof lastParam === "object" && !Array.isArray(lastParam)) { - options = lastParam; - params.pop(); - } - command = params.shift(); - if (params.length === 0) { - args = void 0; - } else if (params.length === 1 && Array.isArray(params[0])) { - args = params[0]; - } else if (params.length === 1 && params[0] === "") { - args = []; - } else { - args = params; - } - return { command, args, options, callback }; - } - function validateArgs(command, args, options, callback) { - if (command === void 0 || command === null) { - throw new Error("The command to execute is missing."); - } - if (typeof command !== "string") { - throw new Error("The command to execute should be a string, not " + friendlyType(command)); - } - if (!Array.isArray(args)) { - throw new Error( - "The command arguments should be a string or an array, not " + friendlyType(args) - ); - } - for (let i = 0; i < args.length; i++) { - let arg = args[i]; - if (typeof arg !== "string") { - throw new Error( - `The command arguments should be strings, but argument #${i + 1} is ` + friendlyType(arg) - ); - } - } - if (typeof options !== "object") { - throw new Error( - "The options should be an object, not " + friendlyType(options) - ); - } - if (callback !== void 0 && callback !== null) { - if (typeof callback !== "function") { - throw new Error("The callback should be a function, not " + friendlyType(callback)); - } - } - } - function splitArgString(argString) { - try { - return parseArgsStringToArgv(argString); - } catch (error) { - throw new Error(`Could not parse the string: ${argString} -${error.message}`); - } - } - function friendlyType(val) { - let type = detectType(val); - let firstChar = String(type)[0].toLowerCase(); - if (["a", "e", "i", "o", "u"].indexOf(firstChar) === -1) { - return `a ${type}.`; - } else { - return `an ${type}.`; - } - } - } -}); - -// node_modules/@jsdevtools/ez-spawn/lib/process.js -var require_process = __commonJS({ - "node_modules/@jsdevtools/ez-spawn/lib/process.js"(exports, module2) { - "use strict"; - module2.exports = class Process { - /** - * @param {object} props - Initial property values - */ - constructor({ command, args, pid, stdout, stderr, output, status, signal, options }) { - options = options || {}; - stdout = stdout || (options.encoding === "buffer" ? Buffer.from([]) : ""); - stderr = stderr || (options.encoding === "buffer" ? Buffer.from([]) : ""); - output = output || [options.input || null, stdout, stderr]; - this.command = command || ""; - this.args = args || []; - this.pid = pid || 0; - this.stdout = output[1]; - this.stderr = output[2]; - this.output = output; - this.status = status; - this.signal = signal || null; - } - /** - * Returns the full command and arguments used to spawn the process - * - * @type {string} - */ - toString() { - let string = this.command; - for (let arg of this.args) { - arg = arg.replace(/"/g, '\\"'); - if (arg.indexOf(" ") >= 0) { - string += ` "${arg}"`; - } else { - string += ` ${arg}`; - } - } - return string; - } - }; - } -}); - -// node_modules/@jsdevtools/ez-spawn/lib/process-error.js -var require_process_error = __commonJS({ - "node_modules/@jsdevtools/ez-spawn/lib/process-error.js"(exports, module2) { - "use strict"; - module2.exports = class ProcessError extends Error { - constructor(process2) { - let message = `${process2.toString()} exited with a status of ${process2.status}.`; - if (process2.stderr.length > 0) { - message += "\n\n" + process2.stderr.toString().trim(); - } - super(message); - Object.assign(this, process2); - this.name = ProcessError.name; - } - }; - } -}); - -// node_modules/@jsdevtools/ez-spawn/lib/normalize-result.js -var require_normalize_result = __commonJS({ - "node_modules/@jsdevtools/ez-spawn/lib/normalize-result.js"(exports, module2) { - "use strict"; - var Process = require_process(); - var ProcessError = require_process_error(); - module2.exports = normalizeResult; - function normalizeResult({ command, args, pid, stdout, stderr, output, status, signal, options, error }) { - let process2 = new Process({ command, args, pid, stdout, stderr, output, status, signal, options }); - if (error) { - if (process2.status === void 0) { - process2.status = null; - } - throw Object.assign(error, process2); - } else if (process2.status) { - throw new ProcessError(process2); - } else { - return process2; - } - } - } -}); - -// node_modules/isexe/windows.js -var require_windows = __commonJS({ - "node_modules/isexe/windows.js"(exports, module2) { - module2.exports = isexe; - isexe.sync = sync; - var fs3 = require("fs"); - function checkPathExt(path, options) { - var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT; - if (!pathext) { - return true; - } - pathext = pathext.split(";"); - if (pathext.indexOf("") !== -1) { - return true; - } - for (var i = 0; i < pathext.length; i++) { - var p = pathext[i].toLowerCase(); - if (p && path.substr(-p.length).toLowerCase() === p) { - return true; - } - } - return false; - } - function checkStat(stat, path, options) { - if (!stat.isSymbolicLink() && !stat.isFile()) { - return false; - } - return checkPathExt(path, options); - } - function isexe(path, options, cb) { - fs3.stat(path, function(er, stat) { - cb(er, er ? false : checkStat(stat, path, options)); - }); - } - function sync(path, options) { - return checkStat(fs3.statSync(path), path, options); - } - } -}); - -// node_modules/isexe/mode.js -var require_mode = __commonJS({ - "node_modules/isexe/mode.js"(exports, module2) { - module2.exports = isexe; - isexe.sync = sync; - var fs3 = require("fs"); - function isexe(path, options, cb) { - fs3.stat(path, function(er, stat) { - cb(er, er ? false : checkStat(stat, options)); - }); - } - function sync(path, options) { - return checkStat(fs3.statSync(path), options); - } - function checkStat(stat, options) { - return stat.isFile() && checkMode(stat, options); - } - function checkMode(stat, options) { - var mod = stat.mode; - var uid = stat.uid; - var gid = stat.gid; - var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid(); - var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid(); - var u = parseInt("100", 8); - var g = parseInt("010", 8); - var o = parseInt("001", 8); - var ug = u | g; - var ret = mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0; - return ret; - } - } -}); - -// node_modules/isexe/index.js -var require_isexe = __commonJS({ - "node_modules/isexe/index.js"(exports, module2) { - var fs3 = require("fs"); - var core; - if (process.platform === "win32" || global.TESTING_WINDOWS) { - core = require_windows(); - } else { - core = require_mode(); - } - module2.exports = isexe; - isexe.sync = sync; - function isexe(path, options, cb) { - if (typeof options === "function") { - cb = options; - options = {}; - } - if (!cb) { - if (typeof Promise !== "function") { - throw new TypeError("callback not provided"); - } - return new Promise(function(resolve3, reject) { - isexe(path, options || {}, function(er, is) { - if (er) { - reject(er); - } else { - resolve3(is); - } - }); - }); - } - core(path, options || {}, function(er, is) { - if (er) { - if (er.code === "EACCES" || options && options.ignoreErrors) { - er = null; - is = false; - } - } - cb(er, is); - }); - } - function sync(path, options) { - try { - return core.sync(path, options || {}); - } catch (er) { - if (options && options.ignoreErrors || er.code === "EACCES") { - return false; - } else { - throw er; - } - } - } - } -}); - -// node_modules/which/which.js -var require_which = __commonJS({ - "node_modules/which/which.js"(exports, module2) { - var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys"; - var path = require("path"); - var COLON = isWindows ? ";" : ":"; - var isexe = require_isexe(); - var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }); - var getPathInfo = (cmd, opt) => { - const colon = opt.colon || COLON; - const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [ - // windows always checks the cwd first - ...isWindows ? [process.cwd()] : [], - ...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */ - "").split(colon) - ]; - const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : ""; - const pathExt = isWindows ? pathExtExe.split(colon) : [""]; - if (isWindows) { - if (cmd.indexOf(".") !== -1 && pathExt[0] !== "") - pathExt.unshift(""); - } - return { - pathEnv, - pathExt, - pathExtExe - }; - }; - var which = (cmd, opt, cb) => { - if (typeof opt === "function") { - cb = opt; - opt = {}; - } - if (!opt) - opt = {}; - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); - const found = []; - const step = (i) => new Promise((resolve3, reject) => { - if (i === pathEnv.length) - return opt.all && found.length ? resolve3(found) : reject(getNotFoundError(cmd)); - const ppRaw = pathEnv[i]; - const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; - const pCmd = path.join(pathPart, cmd); - const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; - resolve3(subStep(p, i, 0)); - }); - const subStep = (p, i, ii) => new Promise((resolve3, reject) => { - if (ii === pathExt.length) - return resolve3(step(i + 1)); - const ext = pathExt[ii]; - isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { - if (!er && is) { - if (opt.all) - found.push(p + ext); - else - return resolve3(p + ext); - } - return resolve3(subStep(p, i, ii + 1)); - }); - }); - return cb ? step(0).then((res) => cb(null, res), cb) : step(0); - }; - var whichSync = (cmd, opt) => { - opt = opt || {}; - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); - const found = []; - for (let i = 0; i < pathEnv.length; i++) { - const ppRaw = pathEnv[i]; - const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; - const pCmd = path.join(pathPart, cmd); - const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; - for (let j = 0; j < pathExt.length; j++) { - const cur = p + pathExt[j]; - try { - const is = isexe.sync(cur, { pathExt: pathExtExe }); - if (is) { - if (opt.all) - found.push(cur); - else - return cur; - } - } catch (ex) { - } - } - } - if (opt.all && found.length) - return found; - if (opt.nothrow) - return null; - throw getNotFoundError(cmd); - }; - module2.exports = which; - which.sync = whichSync; - } -}); - -// node_modules/path-key/index.js -var require_path_key = __commonJS({ - "node_modules/path-key/index.js"(exports, module2) { - "use strict"; - var pathKey = (options = {}) => { - const environment = options.env || process.env; - const platform = options.platform || process.platform; - if (platform !== "win32") { - return "PATH"; - } - return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path"; - }; - module2.exports = pathKey; - module2.exports.default = pathKey; - } -}); - -// node_modules/cross-spawn/lib/util/resolveCommand.js -var require_resolveCommand = __commonJS({ - "node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module2) { - "use strict"; - var path = require("path"); - var which = require_which(); - var getPathKey = require_path_key(); - function resolveCommandAttempt(parsed, withoutPathExt) { - const env = parsed.options.env || process.env; - const cwd = process.cwd(); - const hasCustomCwd = parsed.options.cwd != null; - const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled; - if (shouldSwitchCwd) { - try { - process.chdir(parsed.options.cwd); - } catch (err) { - } - } - let resolved; - try { - resolved = which.sync(parsed.command, { - path: env[getPathKey({ env })], - pathExt: withoutPathExt ? path.delimiter : void 0 - }); - } catch (e) { - } finally { - if (shouldSwitchCwd) { - process.chdir(cwd); - } - } - if (resolved) { - resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved); - } - return resolved; - } - function resolveCommand(parsed) { - return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); - } - module2.exports = resolveCommand; - } -}); - -// node_modules/cross-spawn/lib/util/escape.js -var require_escape = __commonJS({ - "node_modules/cross-spawn/lib/util/escape.js"(exports, module2) { - "use strict"; - var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; - function escapeCommand(arg) { - arg = arg.replace(metaCharsRegExp, "^$1"); - return arg; - } - function escapeArgument(arg, doubleEscapeMetaChars) { - arg = `${arg}`; - arg = arg.replace(/(\\*)"/g, '$1$1\\"'); - arg = arg.replace(/(\\*)$/, "$1$1"); - arg = `"${arg}"`; - arg = arg.replace(metaCharsRegExp, "^$1"); - if (doubleEscapeMetaChars) { - arg = arg.replace(metaCharsRegExp, "^$1"); - } - return arg; - } - module2.exports.command = escapeCommand; - module2.exports.argument = escapeArgument; - } -}); - -// node_modules/shebang-regex/index.js -var require_shebang_regex = __commonJS({ - "node_modules/shebang-regex/index.js"(exports, module2) { - "use strict"; - module2.exports = /^#!(.*)/; - } -}); - -// node_modules/shebang-command/index.js -var require_shebang_command = __commonJS({ - "node_modules/shebang-command/index.js"(exports, module2) { - "use strict"; - var shebangRegex = require_shebang_regex(); - module2.exports = (string = "") => { - const match = string.match(shebangRegex); - if (!match) { - return null; - } - const [path, argument] = match[0].replace(/#! ?/, "").split(" "); - const binary = path.split("/").pop(); - if (binary === "env") { - return argument; - } - return argument ? `${binary} ${argument}` : binary; - }; - } -}); - -// node_modules/cross-spawn/lib/util/readShebang.js -var require_readShebang = __commonJS({ - "node_modules/cross-spawn/lib/util/readShebang.js"(exports, module2) { - "use strict"; - var fs3 = require("fs"); - var shebangCommand = require_shebang_command(); - function readShebang(command) { - const size = 150; - const buffer = Buffer.alloc(size); - let fd; - try { - fd = fs3.openSync(command, "r"); - fs3.readSync(fd, buffer, 0, size, 0); - fs3.closeSync(fd); - } catch (e) { - } - return shebangCommand(buffer.toString()); - } - module2.exports = readShebang; - } -}); - -// node_modules/cross-spawn/lib/parse.js -var require_parse2 = __commonJS({ - "node_modules/cross-spawn/lib/parse.js"(exports, module2) { - "use strict"; - var path = require("path"); - var resolveCommand = require_resolveCommand(); - var escape = require_escape(); - var readShebang = require_readShebang(); - var isWin = process.platform === "win32"; - var isExecutableRegExp = /\.(?:com|exe)$/i; - var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; - function detectShebang(parsed) { - parsed.file = resolveCommand(parsed); - const shebang = parsed.file && readShebang(parsed.file); - if (shebang) { - parsed.args.unshift(parsed.file); - parsed.command = shebang; - return resolveCommand(parsed); - } - return parsed.file; - } - function parseNonShell(parsed) { - if (!isWin) { - return parsed; - } - const commandFile = detectShebang(parsed); - const needsShell = !isExecutableRegExp.test(commandFile); - if (parsed.options.forceShell || needsShell) { - const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); - parsed.command = path.normalize(parsed.command); - parsed.command = escape.command(parsed.command); - parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); - const shellCommand = [parsed.command].concat(parsed.args).join(" "); - parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`]; - parsed.command = process.env.comspec || "cmd.exe"; - parsed.options.windowsVerbatimArguments = true; - } - return parsed; - } - function parse2(command, args, options) { - if (args && !Array.isArray(args)) { - options = args; - args = null; - } - args = args ? args.slice(0) : []; - options = Object.assign({}, options); - const parsed = { - command, - args, - options, - file: void 0, - original: { - command, - args - } - }; - return options.shell ? parsed : parseNonShell(parsed); - } - module2.exports = parse2; - } -}); - -// node_modules/cross-spawn/lib/enoent.js -var require_enoent = __commonJS({ - "node_modules/cross-spawn/lib/enoent.js"(exports, module2) { - "use strict"; - var isWin = process.platform === "win32"; - function notFoundError(original, syscall) { - return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { - code: "ENOENT", - errno: "ENOENT", - syscall: `${syscall} ${original.command}`, - path: original.command, - spawnargs: original.args - }); - } - function hookChildProcess(cp, parsed) { - if (!isWin) { - return; - } - const originalEmit = cp.emit; - cp.emit = function(name, arg1) { - if (name === "exit") { - const err = verifyENOENT(arg1, parsed, "spawn"); - if (err) { - return originalEmit.call(cp, "error", err); - } - } - return originalEmit.apply(cp, arguments); - }; - } - function verifyENOENT(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, "spawn"); - } - return null; - } - function verifyENOENTSync(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, "spawnSync"); - } - return null; - } - module2.exports = { - hookChildProcess, - verifyENOENT, - verifyENOENTSync, - notFoundError - }; - } -}); - -// node_modules/cross-spawn/index.js -var require_cross_spawn = __commonJS({ - "node_modules/cross-spawn/index.js"(exports, module2) { - "use strict"; - var cp = require("child_process"); - var parse2 = require_parse2(); - var enoent = require_enoent(); - function spawn(command, args, options) { - const parsed = parse2(command, args, options); - const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); - enoent.hookChildProcess(spawned, parsed); - return spawned; - } - function spawnSync(command, args, options) { - const parsed = parse2(command, args, options); - const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); - result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); - return result; - } - module2.exports = spawn; - module2.exports.spawn = spawn; - module2.exports.sync = spawnSync; - module2.exports._parse = parse2; - module2.exports._enoent = enoent; - } -}); - -// node_modules/@jsdevtools/ez-spawn/lib/sync.js -var require_sync = __commonJS({ - "node_modules/@jsdevtools/ez-spawn/lib/sync.js"(exports, module2) { - "use strict"; - var normalizeArgs = require_normalize_args(); - var normalizeResult = require_normalize_result(); - var spawnSync = require_cross_spawn().sync; - module2.exports = sync; - function sync() { - let { command, args, options, error } = normalizeArgs(arguments); - if (error) { - normalizeResult({ command, args, options, error }); - } else { - let result; - try { - result = spawnSync(command, args, options); - } catch (error2) { - normalizeResult({ error: error2, command, args, options }); - } - return normalizeResult(Object.assign({}, result, { command, args, options })); - } - } - } -}); - -// node_modules/call-me-maybe/index.js -var require_call_me_maybe = __commonJS({ - "node_modules/call-me-maybe/index.js"(exports, module2) { - "use strict"; - var next = global.process && process.nextTick || global.setImmediate || function(f) { - setTimeout(f, 0); - }; - module2.exports = function maybe(cb, promise) { - if (cb) { - promise.then(function(result) { - next(function() { - cb(null, result); - }); - }, function(err) { - next(function() { - cb(err); - }); - }); - return void 0; - } else { - return promise; - } - }; - } -}); - -// node_modules/@jsdevtools/ez-spawn/lib/async.js -var require_async = __commonJS({ - "node_modules/@jsdevtools/ez-spawn/lib/async.js"(exports, module2) { - "use strict"; - var normalizeArgs = require_normalize_args(); - var normalizeResult = require_normalize_result(); - var maybe = require_call_me_maybe(); - var spawn = require_cross_spawn(); - module2.exports = async3; - function async3() { - let { command, args, options, callback, error } = normalizeArgs(arguments); - return maybe(callback, new Promise((resolve3, reject) => { - if (error) { - normalizeResult({ command, args, options, error }); - } else { - let spawnedProcess; - try { - spawnedProcess = spawn(command, args, options); - } catch (error2) { - normalizeResult({ error: error2, command, args, options }); - } - let pid = spawnedProcess.pid; - let stdout = options.encoding === "buffer" ? Buffer.from([]) : ""; - let stderr = options.encoding === "buffer" ? Buffer.from([]) : ""; - spawnedProcess.stdout && spawnedProcess.stdout.on("data", (data) => { - if (typeof stdout === "string") { - stdout += data.toString(); - } else { - stdout = Buffer.concat([stdout, data]); - } - }); - spawnedProcess.stderr && spawnedProcess.stderr.on("data", (data) => { - if (typeof stderr === "string") { - stderr += data.toString(); - } else { - stderr = Buffer.concat([stderr, data]); - } - }); - spawnedProcess.on("error", (error2) => { - try { - normalizeResult({ error: error2, command, args, options, pid, stdout, stderr }); - } catch (error3) { - reject(error3); - } - }); - spawnedProcess.on("exit", (status, signal) => { - try { - resolve3(normalizeResult({ command, args, options, pid, stdout, stderr, status, signal })); - } catch (error2) { - reject(error2); - } - }); - } - })); - } - } -}); - -// node_modules/@jsdevtools/ez-spawn/lib/index.js -var require_lib2 = __commonJS({ - "node_modules/@jsdevtools/ez-spawn/lib/index.js"(exports, module2) { - "use strict"; - module2.exports.sync = require_sync(); - module2.exports.async = require_async(); - } -}); - // node_modules/@jsdevtools/ono/cjs/to-json.js var require_to_json = __commonJS({ "node_modules/@jsdevtools/ono/cjs/to-json.js"(exports) { @@ -5831,13 +4856,13 @@ var require_constructor = __commonJS({ exports.Ono = constructor; function Ono(ErrorConstructor, options) { options = normalize_1.normalizeOptions(options); - function ono4(...args) { + function ono2(...args) { let { originalError, props, message } = normalize_1.normalizeArgs(args, options); let newError = new ErrorConstructor(message); return extend_error_1.extendError(newError, originalError, props); } - ono4[Symbol.species] = ErrorConstructor; - return ono4; + ono2[Symbol.species] = ErrorConstructor; + return ono2; } Ono.toJSON = function toJSON(error) { return to_json_1.toJSON.call(error); @@ -5861,17 +4886,17 @@ var require_singleton = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.ono = void 0; var constructor_1 = require_constructor(); - var singleton = ono4; + var singleton = ono2; exports.ono = singleton; - ono4.error = new constructor_1.Ono(Error); - ono4.eval = new constructor_1.Ono(EvalError); - ono4.range = new constructor_1.Ono(RangeError); - ono4.reference = new constructor_1.Ono(ReferenceError); - ono4.syntax = new constructor_1.Ono(SyntaxError); - ono4.type = new constructor_1.Ono(TypeError); - ono4.uri = new constructor_1.Ono(URIError); - var onoMap = ono4; - function ono4(...args) { + ono2.error = new constructor_1.Ono(Error); + ono2.eval = new constructor_1.Ono(EvalError); + ono2.range = new constructor_1.Ono(RangeError); + ono2.reference = new constructor_1.Ono(ReferenceError); + ono2.syntax = new constructor_1.Ono(SyntaxError); + ono2.type = new constructor_1.Ono(TypeError); + ono2.uri = new constructor_1.Ono(URIError); + var onoMap = ono2; + function ono2(...args) { let originalError = args[0]; if (typeof originalError === "object" && typeof originalError.name === "string") { for (let typedOno of Object.values(onoMap)) { @@ -5883,7 +4908,7 @@ var require_singleton = __commonJS({ } } } - return ono4.error.apply(void 0, args); + return ono2.error.apply(void 0, args); } } }); @@ -5942,205 +4967,136 @@ var import_core = __toESM(require_core()); var semver = __toESM(require_semver2()); // src/normalize-options.ts -var import_url = require("url"); +var import_node_path = __toESM(require("node:path")); function normalizeOptions(options) { - let registryURL = typeof options.registry === "string" ? new import_url.URL(options.registry) : options.registry; + var _a; return { - token: options.token || "", - registry: registryURL || new import_url.URL("https://registry.npmjs.org/"), - package: options.package || "package.json", - tag: options.tag || "latest", - access: options.access, - dryRun: options.dryRun || false, - checkVersion: options.checkVersion === void 0 ? true : Boolean(options.checkVersion), - greaterVersionOnly: options.greaterVersionOnly === void 0 ? false : Boolean(options.greaterVersionOnly), - quiet: options.quiet || false, - debug: options.debug || (() => void 0) + ...options, + token: options.token ?? "", + registry: options.registry ?? "https://registry.npmjs.org/", + tag: options.tag ?? "latest", + package: ((_a = options.package) == null ? void 0 : _a.endsWith("package.json")) ? import_node_path.default.dirname(options.package) : options.package }; } -// src/npm.ts -var ezSpawn2 = __toESM(require_lib2()); -var import_ono2 = __toESM(require_cjs()); -var import_path2 = require("path"); -var import_semver = __toESM(require_semver2()); - -// src/npm-config.ts -var ezSpawn = __toESM(require_lib2()); -var import_ono = __toESM(require_cjs()); -var import_fs = require("fs"); -var import_os = require("os"); -var import_path = require("path"); - -// src/npm-env.ts -function getNpmEnvironment(options) { - let env = { - // Copy all the host's environment variables - ...process.env, - // Don't pass Node.js runtime variables to NPM - NODE_ENV: "", - NODE_OPTIONS: "" +// src/npm/use-npm-env.ts +var import_promises = __toESM(require("node:fs/promises")); +var import_node_os = __toESM(require("node:os")); +var import_node_path2 = __toESM(require("node:path")); +async function useNpmEnv(auth, task) { + const { registry, token } = auth; + const tempDir = await import_promises.default.mkdtemp(import_node_path2.default.join(import_node_os.default.tmpdir(), "npm-publish-")); + const tempConfigFile = import_node_path2.default.join(tempDir, ".npmrc"); + const registryUrl = new URL(registry); + const config = [ + "; added by jsdevtools/npm-publish", + `registry=${registry}`, + `//${registryUrl.hostname}/:authToken=\${NODE_AUTH_TOKEN}`, + "" + ].join(import_node_os.default.EOL); + const env = { + /* eslint-disable @typescript-eslint/naming-convention */ + NODE_AUTH_TOKEN: token, + npm_config_userconfig: tempConfigFile + /* eslint-enable @typescript-eslint/naming-convention */ }; - let needsToken = Boolean( - options.token && process.env.INPUT_TOKEN !== options.token - ); - if (needsToken) { - env.INPUT_TOKEN = options.token; + await import_promises.default.writeFile(tempConfigFile, config, "utf8"); + try { + return await task(env); + } finally { + await import_promises.default.rm(tempDir, { force: true, recursive: true }); } - return env; } -// src/npm-config.ts -async function setNpmConfig(options) { - let configPath = await getNpmConfigPath(options); - let config = await readNpmConfig(configPath, options); - config = updateConfig(config, options); - await writeNpmConfig(configPath, config, options); -} -function updateConfig(config, { registry, debug: debug2 }) { - let authDomain = registry.origin.slice(registry.protocol.length); - let lines = config.split(/\r?\n/); - lines = lines.filter( - (line) => !(line.startsWith("registry=") || line.includes("_authToken=")) - ); - lines.push(`${authDomain}/:_authToken=\${INPUT_TOKEN}`); - lines.push(`registry=${registry.href}`); - config = lines.join(import_os.EOL).trim() + import_os.EOL; - debug2(`NEW NPM CONFIG: -${config}`); - return config; -} -async function getNpmConfigPath(options) { +// src/npm/call-npm-cli.ts +var import_node_child_process = __toESM(require("node:child_process")); +var execProcess = (command, env = {}) => { + const { + NODE_ENV: _NODE_ENV, + NODE_OPTIONS: _NODE_OPTIONS, + ...processEnv + } = process.env; + return new Promise((resolve) => { + import_node_child_process.default.exec( + command, + { env: { ...processEnv, ...env } }, + (error, stdout) => resolve({ stdout: stdout.trim(), error }) + ); + }); +}; +var parseJson = (value) => { try { - let env = getNpmEnvironment(options); - options.debug("Running command: npm config get userconfig"); - let process2 = await ezSpawn.async("npm", "config", "get", "userconfig", { - env - }); - return process2.stdout.trim(); - } catch (error) { - throw (0, import_ono.ono)(error, "Unable to determine the NPM config file path."); + return JSON.parse(value); + } catch { + return void 0; } -} -async function readNpmConfig(configPath, { debug: debug2 }) { - try { - debug2(`Reading NPM config from ${configPath}`); - let config = await import_fs.promises.readFile(configPath, "utf-8"); - debug2(`OLD NPM CONFIG: -${config}`); - return config; - } catch (error) { - if (error.code === "ENOENT") { - debug2("OLD NPM CONFIG: "); - return ""; +}; +async function callNpmCli(command, args, options = {}) { + var _a, _b; + const { stdout, error } = await execProcess( + ["npm", command, "--json", ...args].join(" "), + options == null ? void 0 : options.env + ); + if (error) { + const errorPayload = parseJson(stdout); + const errorCode = (_b = (_a = errorPayload == null ? void 0 : errorPayload.error) == null ? void 0 : _a.code) == null ? void 0 : _b.toLowerCase(); + if (typeof errorCode === "string" && options.ifError && errorCode in options.ifError) { + return options.ifError[errorCode]; } - throw (0, import_ono.ono)(error, `Unable to read the NPM config file: ${configPath}`); + throw error; } + return parseJson(stdout) ?? stdout; } -async function writeNpmConfig(configPath, config, { debug: debug2 }) { - try { - debug2(`Writing new NPM config to ${configPath}`); - await import_fs.promises.mkdir((0, import_path.dirname)(configPath), { recursive: true }); - await import_fs.promises.writeFile(configPath, config); - } catch (error) { - throw (0, import_ono.ono)(error, `Unable to update the NPM config file: ${configPath}`); + +// src/npm/get-publish-args.ts +function getPublishArgs(config) { + const { packageSpec, tag, access, dryRun } = config; + const args = []; + if (packageSpec !== void 0) { + args.push(packageSpec); + } + if (tag !== void 0) { + args.push("--tag", tag); } + if (access !== void 0) { + args.push("--access", access); + } + if (dryRun !== void 0) { + args.push("--dry-run", JSON.stringify(dryRun)); + } + return args; } -// src/npm.ts -var npm = { - /** - * Gets the latest published version of the specified package. - */ - async getLatestVersion(name, options) { - await setNpmConfig(options); - try { - let command = ["npm", "view"]; - if (options.tag === "latest") { - command.push(name); - } else { - command.push(`${name}@${options.tag}`); - } - command.push("version"); - let env = getNpmEnvironment(options); - options.debug(`Running command: npm view ${name} version`, { - command, - env - }); - let result; - try { - result = await ezSpawn2.async(command, { env }); - } catch (err) { - result = err; - } - let version2 = result.stdout.trim(); - let error = result.stderr.trim(); - let status = result.status || 0; - if (status === 0 && !version2 || error.includes("E404")) { - options.debug( - `The latest version of ${name} is at v0.0.0, as it was never published.` - ); - return new import_semver.SemVer("0.0.0"); - } else if (result instanceof Error) { - throw result; - } - let semver2 = new import_semver.SemVer(version2); - options.debug(`The latest version of ${name} is at v${semver2}`); - return semver2; - } catch (error) { - throw (0, import_ono2.ono)( - error, - `Unable to determine the current version of ${name} on NPM.` - ); - } - }, - /** - * Publishes the specified package to NPM - */ - async publish({ name, version: version2 }, options) { - await setNpmConfig(options); - try { - let command = ["npm", "publish"]; - if (options.tag !== "latest") { - command.push("--tag", options.tag); - } - if (options.access) { - command.push("--access", options.access); - } - if (options.dryRun) { - command.push("--dry-run"); - } - let cwd = (0, import_path2.resolve)((0, import_path2.dirname)(options.package)); - let stdio = options.quiet ? "pipe" : "inherit"; - let env = getNpmEnvironment(options); - options.debug("Running command: npm publish", { - command, - stdio, - cwd, - env - }); - await ezSpawn2.async(command, { cwd, stdio, env }); - } catch (error) { - throw (0, import_ono2.ono)( - error, - `Unable to publish ${name} v${version2} to ${options.registry}.` - ); - } - } -}; +// src/npm/index.ts +async function getVersions(packageName, authConfig) { + return useNpmEnv(authConfig, (env) => { + return callNpmCli( + "view", + [packageName, "dist-tags", "versions"], + { env, ifError: { e404: { "dist-tags": {}, versions: [] } } } + ); + }); +} +async function publish(publishConfig, authConfig) { + const publishArgs = getPublishArgs(publishConfig); + return useNpmEnv(authConfig, (env) => { + return callNpmCli("publish", publishArgs, { env }); + }); +} // src/read-manifest.ts -var import_ono3 = __toESM(require_cjs()); -var import_fs2 = require("fs"); -var import_path3 = require("path"); -var import_semver2 = __toESM(require_semver2()); -async function readManifest(path, debug2) { - debug2 && debug2(`Reading package manifest from ${(0, import_path3.resolve)(path)}`); +var import_promises2 = __toESM(require("node:fs/promises")); +var import_node_path3 = __toESM(require("node:path")); +var import_semver = __toESM(require_semver2()); +var import_ono = __toESM(require_cjs()); +async function readManifest(packageSpec, debug2) { + const packageManifest = import_node_path3.default.join(packageSpec ?? ".", "package.json"); + debug2 && debug2(`Reading manifest from ${import_node_path3.default.resolve(packageManifest)}`); let json; try { - json = await import_fs2.promises.readFile(path, "utf-8"); + json = await import_promises2.default.readFile(packageManifest, "utf8"); } catch (error) { - throw (0, import_ono3.ono)(error, `Unable to read ${path}`); + throw (0, import_ono.ono)(error, `Unable to read ${packageManifest}`); } try { let { name, version: version2 } = JSON.parse(json); @@ -6149,40 +5105,45 @@ async function readManifest(path, debug2) { } let manifest = { name, - version: new import_semver2.SemVer(version2) + version: new import_semver.SemVer(version2) }; debug2 && debug2("MANIFEST:", manifest); return manifest; } catch (error) { - throw (0, import_ono3.ono)(error, `Unable to parse ${path}`); + throw (0, import_ono.ono)(error, `Unable to parse ${packageManifest}`); } } // src/npm-publish.ts async function npmPublish(opts = {}) { - let options = normalizeOptions(opts); - let manifest = await readManifest(options.package, options.debug); - let publishedVersion = await npm.getLatestVersion(manifest.name, options); + var _a; + const { registry, token, ...options } = normalizeOptions(opts); + const authOptions = { registry, token }; + const manifest = await readManifest(options.package, options.debug); + const versions = await getVersions(manifest.name, authOptions); + const publishedVersion = versions["dist-tags"][options.tag] ?? "0.0.0"; let diff2 = semver.diff(manifest.version, publishedVersion); let cmp = semver.compare(manifest.version, publishedVersion); - let shouldPublish = !options.checkVersion || // compare returns 1 if manifest is higher than published - options.greaterVersionOnly && cmp === 1 || // compare returns 0 if the manifest is the same as published - cmp !== 0; + let shouldPublish = ( + // compare returns 1 if manifest is higher than published + options.greaterVersionOnly && cmp === 1 || // compare returns 0 if the manifest is the same as published + cmp !== 0 + ); if (shouldPublish) { - await npm.publish(manifest, options); + await publish(options, authOptions); } let results = { package: manifest.name, - registry: options.registry, + registry: authOptions.registry, // The version should be marked as lower if we disallow decrementing the version type: options.greaterVersionOnly && cmp === -1 && "lower" || diff2 || "none", version: manifest.version.raw, - oldVersion: publishedVersion.raw, + oldVersion: publishedVersion, tag: options.tag, access: options.access || (manifest.name.startsWith("@") ? "restricted" : "public"), - dryRun: options.dryRun + dryRun: options.dryRun ?? false }; - options.debug("OUTPUT:", results); + (_a = options.debug) == null ? void 0 : _a.call(options, "OUTPUT:", results); return results; } diff --git a/dist/index.js.map b/dist/index.js.map index aec420d..4589f17 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1,7 +1,7 @@ { "version": 3, - "sources": ["../node_modules/@actions/core/src/utils.ts", "../node_modules/@actions/core/src/command.ts", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js", "../node_modules/@actions/core/src/file-command.ts", "../node_modules/@actions/http-client/src/proxy.ts", "../node_modules/tunnel/lib/tunnel.js", "../node_modules/tunnel/index.js", "../node_modules/@actions/http-client/src/index.ts", "../node_modules/@actions/http-client/src/auth.ts", "../node_modules/@actions/core/src/oidc-utils.ts", "../node_modules/@actions/core/src/summary.ts", "../node_modules/@actions/core/src/path-utils.ts", "../node_modules/@actions/core/src/core.ts", "../node_modules/semver/internal/constants.js", "../node_modules/semver/internal/debug.js", "../node_modules/semver/internal/re.js", "../node_modules/semver/internal/parse-options.js", "../node_modules/semver/internal/identifiers.js", "../node_modules/semver/classes/semver.js", "../node_modules/semver/functions/parse.js", "../node_modules/semver/functions/valid.js", "../node_modules/semver/functions/clean.js", "../node_modules/semver/functions/inc.js", "../node_modules/semver/functions/compare.js", "../node_modules/semver/functions/eq.js", "../node_modules/semver/functions/diff.js", "../node_modules/semver/functions/major.js", "../node_modules/semver/functions/minor.js", "../node_modules/semver/functions/patch.js", "../node_modules/semver/functions/prerelease.js", "../node_modules/semver/functions/rcompare.js", "../node_modules/semver/functions/compare-loose.js", "../node_modules/semver/functions/compare-build.js", "../node_modules/semver/functions/sort.js", "../node_modules/semver/functions/rsort.js", "../node_modules/semver/functions/gt.js", "../node_modules/semver/functions/lt.js", "../node_modules/semver/functions/neq.js", "../node_modules/semver/functions/gte.js", "../node_modules/semver/functions/lte.js", "../node_modules/semver/functions/cmp.js", "../node_modules/semver/functions/coerce.js", "../node_modules/semver/node_modules/yallist/iterator.js", "../node_modules/semver/node_modules/yallist/yallist.js", "../node_modules/semver/node_modules/lru-cache/index.js", "../node_modules/semver/classes/range.js", "../node_modules/semver/classes/comparator.js", "../node_modules/semver/functions/satisfies.js", "../node_modules/semver/ranges/to-comparators.js", "../node_modules/semver/ranges/max-satisfying.js", "../node_modules/semver/ranges/min-satisfying.js", "../node_modules/semver/ranges/min-version.js", "../node_modules/semver/ranges/valid.js", "../node_modules/semver/ranges/outside.js", "../node_modules/semver/ranges/gtr.js", "../node_modules/semver/ranges/ltr.js", "../node_modules/semver/ranges/intersects.js", "../node_modules/semver/ranges/simplify.js", "../node_modules/semver/ranges/subset.js", "../node_modules/semver/index.js", "../node_modules/string-argv/index.js", "../node_modules/type-detect/type-detect.js", "../node_modules/@jsdevtools/ez-spawn/lib/normalize-args.js", "../node_modules/@jsdevtools/ez-spawn/lib/process.js", "../node_modules/@jsdevtools/ez-spawn/lib/process-error.js", "../node_modules/@jsdevtools/ez-spawn/lib/normalize-result.js", "../node_modules/isexe/windows.js", "../node_modules/isexe/mode.js", "../node_modules/isexe/index.js", "../node_modules/which/which.js", "../node_modules/path-key/index.js", "../node_modules/cross-spawn/lib/util/resolveCommand.js", "../node_modules/cross-spawn/lib/util/escape.js", "../node_modules/shebang-regex/index.js", "../node_modules/shebang-command/index.js", "../node_modules/cross-spawn/lib/util/readShebang.js", "../node_modules/cross-spawn/lib/parse.js", "../node_modules/cross-spawn/lib/enoent.js", "../node_modules/cross-spawn/index.js", "../node_modules/@jsdevtools/ez-spawn/lib/sync.js", "../node_modules/call-me-maybe/index.js", "../node_modules/@jsdevtools/ez-spawn/lib/async.js", "../node_modules/@jsdevtools/ez-spawn/lib/index.js", "../node_modules/@jsdevtools/ono/src/to-json.ts", "../node_modules/@jsdevtools/ono/src/isomorphic.node.ts", "../node_modules/@jsdevtools/ono/src/stack.ts", "../node_modules/@jsdevtools/ono/src/extend-error.ts", "../node_modules/@jsdevtools/ono/src/normalize.ts", "../node_modules/@jsdevtools/ono/src/constructor.ts", "../node_modules/@jsdevtools/ono/src/singleton.ts", "../node_modules/@jsdevtools/ono/src/types.ts", "../node_modules/@jsdevtools/ono/src/index.ts", "../src/action/index.ts", "../src/npm-publish.ts", "../src/normalize-options.ts", "../src/npm.ts", "../src/npm-config.ts", "../src/npm-env.ts", "../src/read-manifest.ts"], - "sourcesContent": [null, null, "import crypto from 'crypto';\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\nexport default function rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n crypto.randomFillSync(rnds8Pool);\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}", "export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;", "import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;", "import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;", "import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;", "import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;", "import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}", "import crypto from 'crypto';\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('md5').update(bytes).digest();\n}\n\nexport default md5;", "import v35 from './v35.js';\nimport md5 from './md5.js';\nconst v3 = v35('v3', 0x30, md5);\nexport default v3;", "import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;", "import crypto from 'crypto';\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('sha1').update(bytes).digest();\n}\n\nexport default sha1;", "import v35 from './v35.js';\nimport sha1 from './sha1.js';\nconst v5 = v35('v5', 0x50, sha1);\nexport default v5;", "export default '00000000-0000-0000-0000-000000000000';", "import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;", "export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';", null, null, "'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n", "module.exports = require('./lib/tunnel');\n", null, null, null, null, null, null, "// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n", "const debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n", "const { MAX_SAFE_COMPONENT_LENGTH } = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst src = exports.src = []\nconst t = exports.t = {}\nlet R = 0\n\nconst createToken = (name, value, isGlobal) => {\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '[0-9]+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', '\\\\d*[a-zA-Z-][a-zA-Z0-9-]*')\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+')\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCE', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n", "// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n", "const numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n", "const debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0)\n }\n }\n if (identifier) {\n const base = Number(identifierBase) ? 1 : 0\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, base]\n }\n } else {\n this.prerelease = [identifier, base]\n }\n }\n break\n\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.format()\n this.raw = this.version\n return this\n }\n}\n\nmodule.exports = SemVer\n", "const { MAX_LENGTH } = require('../internal/constants')\nconst SemVer = require('../classes/semver')\nconst parse = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n try {\n return new SemVer(version, options)\n } catch (er) {\n return null\n }\n}\n\nmodule.exports = parse\n", "const parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n", "const parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n", "const SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n", "const SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n", "const compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n", "const parse = require('./parse')\nconst eq = require('./eq')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1)\n const v2 = parse(version2)\n if (eq(v1, v2)) {\n return null\n } else {\n const hasPre = v1.prerelease.length || v2.prerelease.length\n const prefix = hasPre ? 'pre' : ''\n const defaultResult = hasPre ? 'prerelease' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n if (!v1.prerelease.length || !v2.prerelease.length) {\n if (v1.patch) {\n return 'patch'\n }\n if (v1.minor) {\n return 'minor'\n }\n if (v1.major) {\n return 'major'\n }\n }\n return defaultResult // may be undefined\n }\n}\nmodule.exports = diff\n", "const SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n", "const SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n", "const SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n", "const parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n", "const compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n", "const compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n", "const SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n", "const compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n", "const compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n", "const compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n", "const compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n", "const compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n", "const compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n", "const compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n", "const eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n", "const SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n let next\n while ((next = re[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n re[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)\n}\nmodule.exports = coerce\n", "'use strict'\nmodule.exports = function (Yallist) {\n Yallist.prototype[Symbol.iterator] = function* () {\n for (let walker = this.head; walker; walker = walker.next) {\n yield walker.value\n }\n }\n}\n", "'use strict'\nmodule.exports = Yallist\n\nYallist.Node = Node\nYallist.create = Yallist\n\nfunction Yallist (list) {\n var self = this\n if (!(self instanceof Yallist)) {\n self = new Yallist()\n }\n\n self.tail = null\n self.head = null\n self.length = 0\n\n if (list && typeof list.forEach === 'function') {\n list.forEach(function (item) {\n self.push(item)\n })\n } else if (arguments.length > 0) {\n for (var i = 0, l = arguments.length; i < l; i++) {\n self.push(arguments[i])\n }\n }\n\n return self\n}\n\nYallist.prototype.removeNode = function (node) {\n if (node.list !== this) {\n throw new Error('removing node which does not belong to this list')\n }\n\n var next = node.next\n var prev = node.prev\n\n if (next) {\n next.prev = prev\n }\n\n if (prev) {\n prev.next = next\n }\n\n if (node === this.head) {\n this.head = next\n }\n if (node === this.tail) {\n this.tail = prev\n }\n\n node.list.length--\n node.next = null\n node.prev = null\n node.list = null\n\n return next\n}\n\nYallist.prototype.unshiftNode = function (node) {\n if (node === this.head) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var head = this.head\n node.list = this\n node.next = head\n if (head) {\n head.prev = node\n }\n\n this.head = node\n if (!this.tail) {\n this.tail = node\n }\n this.length++\n}\n\nYallist.prototype.pushNode = function (node) {\n if (node === this.tail) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var tail = this.tail\n node.list = this\n node.prev = tail\n if (tail) {\n tail.next = node\n }\n\n this.tail = node\n if (!this.head) {\n this.head = node\n }\n this.length++\n}\n\nYallist.prototype.push = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n push(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.unshift = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n unshift(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.pop = function () {\n if (!this.tail) {\n return undefined\n }\n\n var res = this.tail.value\n this.tail = this.tail.prev\n if (this.tail) {\n this.tail.next = null\n } else {\n this.head = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.shift = function () {\n if (!this.head) {\n return undefined\n }\n\n var res = this.head.value\n this.head = this.head.next\n if (this.head) {\n this.head.prev = null\n } else {\n this.tail = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.forEach = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.head, i = 0; walker !== null; i++) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.next\n }\n}\n\nYallist.prototype.forEachReverse = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.prev\n }\n}\n\nYallist.prototype.get = function (n) {\n for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.next\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.getReverse = function (n) {\n for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.prev\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.map = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.head; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.next\n }\n return res\n}\n\nYallist.prototype.mapReverse = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.tail; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.prev\n }\n return res\n}\n\nYallist.prototype.reduce = function (fn, initial) {\n var acc\n var walker = this.head\n if (arguments.length > 1) {\n acc = initial\n } else if (this.head) {\n walker = this.head.next\n acc = this.head.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = 0; walker !== null; i++) {\n acc = fn(acc, walker.value, i)\n walker = walker.next\n }\n\n return acc\n}\n\nYallist.prototype.reduceReverse = function (fn, initial) {\n var acc\n var walker = this.tail\n if (arguments.length > 1) {\n acc = initial\n } else if (this.tail) {\n walker = this.tail.prev\n acc = this.tail.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = this.length - 1; walker !== null; i--) {\n acc = fn(acc, walker.value, i)\n walker = walker.prev\n }\n\n return acc\n}\n\nYallist.prototype.toArray = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.head; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.next\n }\n return arr\n}\n\nYallist.prototype.toArrayReverse = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.tail; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.prev\n }\n return arr\n}\n\nYallist.prototype.slice = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\n walker = walker.next\n }\n for (; walker !== null && i < to; i++, walker = walker.next) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.sliceReverse = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\n walker = walker.prev\n }\n for (; walker !== null && i > from; i--, walker = walker.prev) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.splice = function (start, deleteCount, ...nodes) {\n if (start > this.length) {\n start = this.length - 1\n }\n if (start < 0) {\n start = this.length + start;\n }\n\n for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\n walker = walker.next\n }\n\n var ret = []\n for (var i = 0; walker && i < deleteCount; i++) {\n ret.push(walker.value)\n walker = this.removeNode(walker)\n }\n if (walker === null) {\n walker = this.tail\n }\n\n if (walker !== this.head && walker !== this.tail) {\n walker = walker.prev\n }\n\n for (var i = 0; i < nodes.length; i++) {\n walker = insert(this, walker, nodes[i])\n }\n return ret;\n}\n\nYallist.prototype.reverse = function () {\n var head = this.head\n var tail = this.tail\n for (var walker = head; walker !== null; walker = walker.prev) {\n var p = walker.prev\n walker.prev = walker.next\n walker.next = p\n }\n this.head = tail\n this.tail = head\n return this\n}\n\nfunction insert (self, node, value) {\n var inserted = node === self.head ?\n new Node(value, null, node, self) :\n new Node(value, node, node.next, self)\n\n if (inserted.next === null) {\n self.tail = inserted\n }\n if (inserted.prev === null) {\n self.head = inserted\n }\n\n self.length++\n\n return inserted\n}\n\nfunction push (self, item) {\n self.tail = new Node(item, self.tail, null, self)\n if (!self.head) {\n self.head = self.tail\n }\n self.length++\n}\n\nfunction unshift (self, item) {\n self.head = new Node(item, null, self.head, self)\n if (!self.tail) {\n self.tail = self.head\n }\n self.length++\n}\n\nfunction Node (value, prev, next, list) {\n if (!(this instanceof Node)) {\n return new Node(value, prev, next, list)\n }\n\n this.list = list\n this.value = value\n\n if (prev) {\n prev.next = this\n this.prev = prev\n } else {\n this.prev = null\n }\n\n if (next) {\n next.prev = this\n this.next = next\n } else {\n this.next = null\n }\n}\n\ntry {\n // add if support for Symbol.iterator is present\n require('./iterator.js')(Yallist)\n} catch (er) {}\n", "'use strict'\n\n// A linked list to keep track of recently-used-ness\nconst Yallist = require('yallist')\n\nconst MAX = Symbol('max')\nconst LENGTH = Symbol('length')\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\nconst ALLOW_STALE = Symbol('allowStale')\nconst MAX_AGE = Symbol('maxAge')\nconst DISPOSE = Symbol('dispose')\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\nconst LRU_LIST = Symbol('lruList')\nconst CACHE = Symbol('cache')\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\n\nconst naiveLength = () => 1\n\n// lruList is a yallist where the head is the youngest\n// item, and the tail is the oldest. the list contains the Hit\n// objects as the entries.\n// Each Hit object has a reference to its Yallist.Node. This\n// never changes.\n//\n// cache is a Map (or PseudoMap) that matches the keys to\n// the Yallist.Node object.\nclass LRUCache {\n constructor (options) {\n if (typeof options === 'number')\n options = { max: options }\n\n if (!options)\n options = {}\n\n if (options.max && (typeof options.max !== 'number' || options.max < 0))\n throw new TypeError('max must be a non-negative number')\n // Kind of weird to have a default max of Infinity, but oh well.\n const max = this[MAX] = options.max || Infinity\n\n const lc = options.length || naiveLength\n this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\n this[ALLOW_STALE] = options.stale || false\n if (options.maxAge && typeof options.maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n this[MAX_AGE] = options.maxAge || 0\n this[DISPOSE] = options.dispose\n this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\n this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\n this.reset()\n }\n\n // resize the cache when the max changes.\n set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }\n get max () {\n return this[MAX]\n }\n\n set allowStale (allowStale) {\n this[ALLOW_STALE] = !!allowStale\n }\n get allowStale () {\n return this[ALLOW_STALE]\n }\n\n set maxAge (mA) {\n if (typeof mA !== 'number')\n throw new TypeError('maxAge must be a non-negative number')\n\n this[MAX_AGE] = mA\n trim(this)\n }\n get maxAge () {\n return this[MAX_AGE]\n }\n\n // resize the cache when the lengthCalculator changes.\n set lengthCalculator (lC) {\n if (typeof lC !== 'function')\n lC = naiveLength\n\n if (lC !== this[LENGTH_CALCULATOR]) {\n this[LENGTH_CALCULATOR] = lC\n this[LENGTH] = 0\n this[LRU_LIST].forEach(hit => {\n hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\n this[LENGTH] += hit.length\n })\n }\n trim(this)\n }\n get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n get length () { return this[LENGTH] }\n get itemCount () { return this[LRU_LIST].length }\n\n rforEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].tail; walker !== null;) {\n const prev = walker.prev\n forEachStep(this, fn, walker, thisp)\n walker = prev\n }\n }\n\n forEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].head; walker !== null;) {\n const next = walker.next\n forEachStep(this, fn, walker, thisp)\n walker = next\n }\n }\n\n keys () {\n return this[LRU_LIST].toArray().map(k => k.key)\n }\n\n values () {\n return this[LRU_LIST].toArray().map(k => k.value)\n }\n\n reset () {\n if (this[DISPOSE] &&\n this[LRU_LIST] &&\n this[LRU_LIST].length) {\n this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\n }\n\n this[CACHE] = new Map() // hash of items by key\n this[LRU_LIST] = new Yallist() // list of items in order of use recency\n this[LENGTH] = 0 // length of items in the list\n }\n\n dump () {\n return this[LRU_LIST].map(hit =>\n isStale(this, hit) ? false : {\n k: hit.key,\n v: hit.value,\n e: hit.now + (hit.maxAge || 0)\n }).toArray().filter(h => h)\n }\n\n dumpLru () {\n return this[LRU_LIST]\n }\n\n set (key, value, maxAge) {\n maxAge = maxAge || this[MAX_AGE]\n\n if (maxAge && typeof maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n\n const now = maxAge ? Date.now() : 0\n const len = this[LENGTH_CALCULATOR](value, key)\n\n if (this[CACHE].has(key)) {\n if (len > this[MAX]) {\n del(this, this[CACHE].get(key))\n return false\n }\n\n const node = this[CACHE].get(key)\n const item = node.value\n\n // dispose of the old one before overwriting\n // split out into 2 ifs for better coverage tracking\n if (this[DISPOSE]) {\n if (!this[NO_DISPOSE_ON_SET])\n this[DISPOSE](key, item.value)\n }\n\n item.now = now\n item.maxAge = maxAge\n item.value = value\n this[LENGTH] += len - item.length\n item.length = len\n this.get(key)\n trim(this)\n return true\n }\n\n const hit = new Entry(key, value, len, now, maxAge)\n\n // oversized objects fall out of cache automatically.\n if (hit.length > this[MAX]) {\n if (this[DISPOSE])\n this[DISPOSE](key, value)\n\n return false\n }\n\n this[LENGTH] += hit.length\n this[LRU_LIST].unshift(hit)\n this[CACHE].set(key, this[LRU_LIST].head)\n trim(this)\n return true\n }\n\n has (key) {\n if (!this[CACHE].has(key)) return false\n const hit = this[CACHE].get(key).value\n return !isStale(this, hit)\n }\n\n get (key) {\n return get(this, key, true)\n }\n\n peek (key) {\n return get(this, key, false)\n }\n\n pop () {\n const node = this[LRU_LIST].tail\n if (!node)\n return null\n\n del(this, node)\n return node.value\n }\n\n del (key) {\n del(this, this[CACHE].get(key))\n }\n\n load (arr) {\n // reset the cache\n this.reset()\n\n const now = Date.now()\n // A previous serialized cache has the most recent items first\n for (let l = arr.length - 1; l >= 0; l--) {\n const hit = arr[l]\n const expiresAt = hit.e || 0\n if (expiresAt === 0)\n // the item was created without expiration in a non aged cache\n this.set(hit.k, hit.v)\n else {\n const maxAge = expiresAt - now\n // dont add already expired items\n if (maxAge > 0) {\n this.set(hit.k, hit.v, maxAge)\n }\n }\n }\n }\n\n prune () {\n this[CACHE].forEach((value, key) => get(this, key, false))\n }\n}\n\nconst get = (self, key, doUse) => {\n const node = self[CACHE].get(key)\n if (node) {\n const hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n return undefined\n } else {\n if (doUse) {\n if (self[UPDATE_AGE_ON_GET])\n node.value.now = Date.now()\n self[LRU_LIST].unshiftNode(node)\n }\n }\n return hit.value\n }\n}\n\nconst isStale = (self, hit) => {\n if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n return false\n\n const diff = Date.now() - hit.now\n return hit.maxAge ? diff > hit.maxAge\n : self[MAX_AGE] && (diff > self[MAX_AGE])\n}\n\nconst trim = self => {\n if (self[LENGTH] > self[MAX]) {\n for (let walker = self[LRU_LIST].tail;\n self[LENGTH] > self[MAX] && walker !== null;) {\n // We know that we're about to delete this one, and also\n // what the next least recently used key will be, so just\n // go ahead and set it now.\n const prev = walker.prev\n del(self, walker)\n walker = prev\n }\n }\n}\n\nconst del = (self, node) => {\n if (node) {\n const hit = node.value\n if (self[DISPOSE])\n self[DISPOSE](hit.key, hit.value)\n\n self[LENGTH] -= hit.length\n self[CACHE].delete(hit.key)\n self[LRU_LIST].removeNode(node)\n }\n}\n\nclass Entry {\n constructor (key, value, length, now, maxAge) {\n this.key = key\n this.value = value\n this.length = length\n this.now = now\n this.maxAge = maxAge || 0\n }\n}\n\nconst forEachStep = (self, fn, node, thisp) => {\n let hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n hit = undefined\n }\n if (hit)\n fn.call(thisp, hit.value, hit.key, self)\n}\n\nmodule.exports = LRUCache\n", "// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.format()\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First, split based on boolean or ||\n this.raw = range\n this.set = range\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${range}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.format()\n }\n\n format () {\n this.range = this.set\n .map((comps) => {\n return comps.join(' ').trim()\n })\n .join('||')\n .trim()\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n range = range.trim()\n\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('lru-cache')\nconst cache = new LRU({ max: 1000 })\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) =>\n comp.trim().split(/\\s+/).map((c) => {\n return replaceTilde(c, options)\n }).join(' ')\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) =>\n comp.trim().split(/\\s+/).map((c) => {\n return replaceCaret(c, options)\n }).join(' ')\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map((c) => {\n return replaceXRange(c, options)\n }).join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp.trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return (`${from} ${to}`).trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n", "const ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n", "const Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n", "const Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n", "const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n", "const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n", "const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n", "const Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n", "const SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n", "// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n", "const outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n", "const Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n", "// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n", "const Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n", "// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n", "\"use strict\";\r\nexports.__esModule = true;\r\nfunction parseArgsStringToArgv(value, env, file) {\r\n // ([^\\s'\"]([^\\s'\"]*(['\"])([^\\3]*?)\\3)+[^\\s'\"]*) Matches nested quotes until the first space outside of quotes\r\n // [^\\s'\"]+ or Match if not a space ' or \"\r\n // (['\"])([^\\5]*?)\\5 or Match \"quoted text\" without quotes\r\n // `\\3` and `\\5` are a backreference to the quote style (' or \") captured\r\n var myRegexp = /([^\\s'\"]([^\\s'\"]*(['\"])([^\\3]*?)\\3)+[^\\s'\"]*)|[^\\s'\"]+|(['\"])([^\\5]*?)\\5/gi;\r\n var myString = value;\r\n var myArray = [];\r\n if (env) {\r\n myArray.push(env);\r\n }\r\n if (file) {\r\n myArray.push(file);\r\n }\r\n var match;\r\n do {\r\n // Each call to exec returns the next regex match as an array\r\n match = myRegexp.exec(myString);\r\n if (match !== null) {\r\n // Index 1 in the array is the captured group if it exists\r\n // Index 0 is the matched text, which we use if no captured group exists\r\n myArray.push(firstString(match[1], match[6], match[0]));\r\n }\r\n } while (match !== null);\r\n return myArray;\r\n}\r\nexports[\"default\"] = parseArgsStringToArgv;\r\nexports.parseArgsStringToArgv = parseArgsStringToArgv;\r\n// Accepts any number of arguments, and returns the first one that is a string\r\n// (even an empty string)\r\nfunction firstString() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n for (var i = 0; i < args.length; i++) {\r\n var arg = args[i];\r\n if (typeof arg === \"string\") {\r\n return arg;\r\n }\r\n }\r\n}\r\n", "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.typeDetect = factory());\n}(this, (function () { 'use strict';\n\n/* !\n * type-detect\n * Copyright(c) 2013 jake luer \n * MIT Licensed\n */\nvar promiseExists = typeof Promise === 'function';\n\n/* eslint-disable no-undef */\nvar globalObject = typeof self === 'object' ? self : global; // eslint-disable-line id-blacklist\n\nvar symbolExists = typeof Symbol !== 'undefined';\nvar mapExists = typeof Map !== 'undefined';\nvar setExists = typeof Set !== 'undefined';\nvar weakMapExists = typeof WeakMap !== 'undefined';\nvar weakSetExists = typeof WeakSet !== 'undefined';\nvar dataViewExists = typeof DataView !== 'undefined';\nvar symbolIteratorExists = symbolExists && typeof Symbol.iterator !== 'undefined';\nvar symbolToStringTagExists = symbolExists && typeof Symbol.toStringTag !== 'undefined';\nvar setEntriesExists = setExists && typeof Set.prototype.entries === 'function';\nvar mapEntriesExists = mapExists && typeof Map.prototype.entries === 'function';\nvar setIteratorPrototype = setEntriesExists && Object.getPrototypeOf(new Set().entries());\nvar mapIteratorPrototype = mapEntriesExists && Object.getPrototypeOf(new Map().entries());\nvar arrayIteratorExists = symbolIteratorExists && typeof Array.prototype[Symbol.iterator] === 'function';\nvar arrayIteratorPrototype = arrayIteratorExists && Object.getPrototypeOf([][Symbol.iterator]());\nvar stringIteratorExists = symbolIteratorExists && typeof String.prototype[Symbol.iterator] === 'function';\nvar stringIteratorPrototype = stringIteratorExists && Object.getPrototypeOf(''[Symbol.iterator]());\nvar toStringLeftSliceLength = 8;\nvar toStringRightSliceLength = -1;\n/**\n * ### typeOf (obj)\n *\n * Uses `Object.prototype.toString` to determine the type of an object,\n * normalising behaviour across engine versions & well optimised.\n *\n * @param {Mixed} object\n * @return {String} object type\n * @api public\n */\nfunction typeDetect(obj) {\n /* ! Speed optimisation\n * Pre:\n * string literal x 3,039,035 ops/sec \u00B11.62% (78 runs sampled)\n * boolean literal x 1,424,138 ops/sec \u00B14.54% (75 runs sampled)\n * number literal x 1,653,153 ops/sec \u00B11.91% (82 runs sampled)\n * undefined x 9,978,660 ops/sec \u00B11.92% (75 runs sampled)\n * function x 2,556,769 ops/sec \u00B11.73% (77 runs sampled)\n * Post:\n * string literal x 38,564,796 ops/sec \u00B11.15% (79 runs sampled)\n * boolean literal x 31,148,940 ops/sec \u00B11.10% (79 runs sampled)\n * number literal x 32,679,330 ops/sec \u00B11.90% (78 runs sampled)\n * undefined x 32,363,368 ops/sec \u00B11.07% (82 runs sampled)\n * function x 31,296,870 ops/sec \u00B10.96% (83 runs sampled)\n */\n var typeofObj = typeof obj;\n if (typeofObj !== 'object') {\n return typeofObj;\n }\n\n /* ! Speed optimisation\n * Pre:\n * null x 28,645,765 ops/sec \u00B11.17% (82 runs sampled)\n * Post:\n * null x 36,428,962 ops/sec \u00B11.37% (84 runs sampled)\n */\n if (obj === null) {\n return 'null';\n }\n\n /* ! Spec Conformance\n * Test: `Object.prototype.toString.call(window)``\n * - Node === \"[object global]\"\n * - Chrome === \"[object global]\"\n * - Firefox === \"[object Window]\"\n * - PhantomJS === \"[object Window]\"\n * - Safari === \"[object Window]\"\n * - IE 11 === \"[object Window]\"\n * - IE Edge === \"[object Window]\"\n * Test: `Object.prototype.toString.call(this)``\n * - Chrome Worker === \"[object global]\"\n * - Firefox Worker === \"[object DedicatedWorkerGlobalScope]\"\n * - Safari Worker === \"[object DedicatedWorkerGlobalScope]\"\n * - IE 11 Worker === \"[object WorkerGlobalScope]\"\n * - IE Edge Worker === \"[object WorkerGlobalScope]\"\n */\n if (obj === globalObject) {\n return 'global';\n }\n\n /* ! Speed optimisation\n * Pre:\n * array literal x 2,888,352 ops/sec \u00B10.67% (82 runs sampled)\n * Post:\n * array literal x 22,479,650 ops/sec \u00B10.96% (81 runs sampled)\n */\n if (\n Array.isArray(obj) &&\n (symbolToStringTagExists === false || !(Symbol.toStringTag in obj))\n ) {\n return 'Array';\n }\n\n // Not caching existence of `window` and related properties due to potential\n // for `window` to be unset before tests in quasi-browser environments.\n if (typeof window === 'object' && window !== null) {\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/browsers.html#location)\n * WhatWG HTML$7.7.3 - The `Location` interface\n * Test: `Object.prototype.toString.call(window.location)``\n * - IE <=11 === \"[object Object]\"\n * - IE Edge <=13 === \"[object Object]\"\n */\n if (typeof window.location === 'object' && obj === window.location) {\n return 'Location';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/#document)\n * WhatWG HTML$3.1.1 - The `Document` object\n * Note: Most browsers currently adher to the W3C DOM Level 2 spec\n * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268)\n * which suggests that browsers should use HTMLTableCellElement for\n * both TD and TH elements. WhatWG separates these.\n * WhatWG HTML states:\n * > For historical reasons, Window objects must also have a\n * > writable, configurable, non-enumerable property named\n * > HTMLDocument whose value is the Document interface object.\n * Test: `Object.prototype.toString.call(document)``\n * - Chrome === \"[object HTMLDocument]\"\n * - Firefox === \"[object HTMLDocument]\"\n * - Safari === \"[object HTMLDocument]\"\n * - IE <=10 === \"[object Document]\"\n * - IE 11 === \"[object HTMLDocument]\"\n * - IE Edge <=13 === \"[object HTMLDocument]\"\n */\n if (typeof window.document === 'object' && obj === window.document) {\n return 'Document';\n }\n\n if (typeof window.navigator === 'object') {\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/webappapis.html#mimetypearray)\n * WhatWG HTML$8.6.1.5 - Plugins - Interface MimeTypeArray\n * Test: `Object.prototype.toString.call(navigator.mimeTypes)``\n * - IE <=10 === \"[object MSMimeTypesCollection]\"\n */\n if (typeof window.navigator.mimeTypes === 'object' &&\n obj === window.navigator.mimeTypes) {\n return 'MimeTypeArray';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray)\n * WhatWG HTML$8.6.1.5 - Plugins - Interface PluginArray\n * Test: `Object.prototype.toString.call(navigator.plugins)``\n * - IE <=10 === \"[object MSPluginsCollection]\"\n */\n if (typeof window.navigator.plugins === 'object' &&\n obj === window.navigator.plugins) {\n return 'PluginArray';\n }\n }\n\n if ((typeof window.HTMLElement === 'function' ||\n typeof window.HTMLElement === 'object') &&\n obj instanceof window.HTMLElement) {\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray)\n * WhatWG HTML$4.4.4 - The `blockquote` element - Interface `HTMLQuoteElement`\n * Test: `Object.prototype.toString.call(document.createElement('blockquote'))``\n * - IE <=10 === \"[object HTMLBlockElement]\"\n */\n if (obj.tagName === 'BLOCKQUOTE') {\n return 'HTMLQuoteElement';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/#htmltabledatacellelement)\n * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableDataCellElement`\n * Note: Most browsers currently adher to the W3C DOM Level 2 spec\n * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075)\n * which suggests that browsers should use HTMLTableCellElement for\n * both TD and TH elements. WhatWG separates these.\n * Test: Object.prototype.toString.call(document.createElement('td'))\n * - Chrome === \"[object HTMLTableCellElement]\"\n * - Firefox === \"[object HTMLTableCellElement]\"\n * - Safari === \"[object HTMLTableCellElement]\"\n */\n if (obj.tagName === 'TD') {\n return 'HTMLTableDataCellElement';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/#htmltableheadercellelement)\n * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableHeaderCellElement`\n * Note: Most browsers currently adher to the W3C DOM Level 2 spec\n * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075)\n * which suggests that browsers should use HTMLTableCellElement for\n * both TD and TH elements. WhatWG separates these.\n * Test: Object.prototype.toString.call(document.createElement('th'))\n * - Chrome === \"[object HTMLTableCellElement]\"\n * - Firefox === \"[object HTMLTableCellElement]\"\n * - Safari === \"[object HTMLTableCellElement]\"\n */\n if (obj.tagName === 'TH') {\n return 'HTMLTableHeaderCellElement';\n }\n }\n }\n\n /* ! Speed optimisation\n * Pre:\n * Float64Array x 625,644 ops/sec \u00B11.58% (80 runs sampled)\n * Float32Array x 1,279,852 ops/sec \u00B12.91% (77 runs sampled)\n * Uint32Array x 1,178,185 ops/sec \u00B11.95% (83 runs sampled)\n * Uint16Array x 1,008,380 ops/sec \u00B12.25% (80 runs sampled)\n * Uint8Array x 1,128,040 ops/sec \u00B12.11% (81 runs sampled)\n * Int32Array x 1,170,119 ops/sec \u00B12.88% (80 runs sampled)\n * Int16Array x 1,176,348 ops/sec \u00B15.79% (86 runs sampled)\n * Int8Array x 1,058,707 ops/sec \u00B14.94% (77 runs sampled)\n * Uint8ClampedArray x 1,110,633 ops/sec \u00B14.20% (80 runs sampled)\n * Post:\n * Float64Array x 7,105,671 ops/sec \u00B113.47% (64 runs sampled)\n * Float32Array x 5,887,912 ops/sec \u00B11.46% (82 runs sampled)\n * Uint32Array x 6,491,661 ops/sec \u00B11.76% (79 runs sampled)\n * Uint16Array x 6,559,795 ops/sec \u00B11.67% (82 runs sampled)\n * Uint8Array x 6,463,966 ops/sec \u00B11.43% (85 runs sampled)\n * Int32Array x 5,641,841 ops/sec \u00B13.49% (81 runs sampled)\n * Int16Array x 6,583,511 ops/sec \u00B11.98% (80 runs sampled)\n * Int8Array x 6,606,078 ops/sec \u00B11.74% (81 runs sampled)\n * Uint8ClampedArray x 6,602,224 ops/sec \u00B11.77% (83 runs sampled)\n */\n var stringTag = (symbolToStringTagExists && obj[Symbol.toStringTag]);\n if (typeof stringTag === 'string') {\n return stringTag;\n }\n\n var objPrototype = Object.getPrototypeOf(obj);\n /* ! Speed optimisation\n * Pre:\n * regex literal x 1,772,385 ops/sec \u00B11.85% (77 runs sampled)\n * regex constructor x 2,143,634 ops/sec \u00B12.46% (78 runs sampled)\n * Post:\n * regex literal x 3,928,009 ops/sec \u00B10.65% (78 runs sampled)\n * regex constructor x 3,931,108 ops/sec \u00B10.58% (84 runs sampled)\n */\n if (objPrototype === RegExp.prototype) {\n return 'RegExp';\n }\n\n /* ! Speed optimisation\n * Pre:\n * date x 2,130,074 ops/sec \u00B14.42% (68 runs sampled)\n * Post:\n * date x 3,953,779 ops/sec \u00B11.35% (77 runs sampled)\n */\n if (objPrototype === Date.prototype) {\n return 'Date';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-promise.prototype-@@tostringtag)\n * ES6$25.4.5.4 - Promise.prototype[@@toStringTag] should be \"Promise\":\n * Test: `Object.prototype.toString.call(Promise.resolve())``\n * - Chrome <=47 === \"[object Object]\"\n * - Edge <=20 === \"[object Object]\"\n * - Firefox 29-Latest === \"[object Promise]\"\n * - Safari 7.1-Latest === \"[object Promise]\"\n */\n if (promiseExists && objPrototype === Promise.prototype) {\n return 'Promise';\n }\n\n /* ! Speed optimisation\n * Pre:\n * set x 2,222,186 ops/sec \u00B11.31% (82 runs sampled)\n * Post:\n * set x 4,545,879 ops/sec \u00B11.13% (83 runs sampled)\n */\n if (setExists && objPrototype === Set.prototype) {\n return 'Set';\n }\n\n /* ! Speed optimisation\n * Pre:\n * map x 2,396,842 ops/sec \u00B11.59% (81 runs sampled)\n * Post:\n * map x 4,183,945 ops/sec \u00B16.59% (82 runs sampled)\n */\n if (mapExists && objPrototype === Map.prototype) {\n return 'Map';\n }\n\n /* ! Speed optimisation\n * Pre:\n * weakset x 1,323,220 ops/sec \u00B12.17% (76 runs sampled)\n * Post:\n * weakset x 4,237,510 ops/sec \u00B12.01% (77 runs sampled)\n */\n if (weakSetExists && objPrototype === WeakSet.prototype) {\n return 'WeakSet';\n }\n\n /* ! Speed optimisation\n * Pre:\n * weakmap x 1,500,260 ops/sec \u00B12.02% (78 runs sampled)\n * Post:\n * weakmap x 3,881,384 ops/sec \u00B11.45% (82 runs sampled)\n */\n if (weakMapExists && objPrototype === WeakMap.prototype) {\n return 'WeakMap';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-dataview.prototype-@@tostringtag)\n * ES6$24.2.4.21 - DataView.prototype[@@toStringTag] should be \"DataView\":\n * Test: `Object.prototype.toString.call(new DataView(new ArrayBuffer(1)))``\n * - Edge <=13 === \"[object Object]\"\n */\n if (dataViewExists && objPrototype === DataView.prototype) {\n return 'DataView';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%mapiteratorprototype%-@@tostringtag)\n * ES6$23.1.5.2.2 - %MapIteratorPrototype%[@@toStringTag] should be \"Map Iterator\":\n * Test: `Object.prototype.toString.call(new Map().entries())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (mapExists && objPrototype === mapIteratorPrototype) {\n return 'Map Iterator';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%setiteratorprototype%-@@tostringtag)\n * ES6$23.2.5.2.2 - %SetIteratorPrototype%[@@toStringTag] should be \"Set Iterator\":\n * Test: `Object.prototype.toString.call(new Set().entries())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (setExists && objPrototype === setIteratorPrototype) {\n return 'Set Iterator';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%arrayiteratorprototype%-@@tostringtag)\n * ES6$22.1.5.2.2 - %ArrayIteratorPrototype%[@@toStringTag] should be \"Array Iterator\":\n * Test: `Object.prototype.toString.call([][Symbol.iterator]())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (arrayIteratorExists && objPrototype === arrayIteratorPrototype) {\n return 'Array Iterator';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%stringiteratorprototype%-@@tostringtag)\n * ES6$21.1.5.2.2 - %StringIteratorPrototype%[@@toStringTag] should be \"String Iterator\":\n * Test: `Object.prototype.toString.call(''[Symbol.iterator]())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (stringIteratorExists && objPrototype === stringIteratorPrototype) {\n return 'String Iterator';\n }\n\n /* ! Speed optimisation\n * Pre:\n * object from null x 2,424,320 ops/sec \u00B11.67% (76 runs sampled)\n * Post:\n * object from null x 5,838,000 ops/sec \u00B10.99% (84 runs sampled)\n */\n if (objPrototype === null) {\n return 'Object';\n }\n\n return Object\n .prototype\n .toString\n .call(obj)\n .slice(toStringLeftSliceLength, toStringRightSliceLength);\n}\n\nreturn typeDetect;\n\n})));\n", "\"use strict\";\n\nconst { parseArgsStringToArgv } = require(\"string-argv\"); // possible alternative: parse-spawn-args\nconst detectType = require(\"type-detect\");\n\nmodule.exports = normalizeArgs;\n\n/**\n * This function normalizes the arguments of the {@link sync} and {@link async}\n * so they can be passed to Node's {@link child_process.spawn} or\n * {@link child_process.spawn} functions.\n *\n * @param {string|string[]} command\n * The command to run (e.g. \"git\"), or the command and its arguments as a string\n * (e.g. \"git commit -a -m fixed_stuff\"), or the command and its arguments as an\n * array (e.g. [\"git\", \"commit\", \"-a\", \"-m\", \"fixed stuff\"]).\n *\n * @param {string|string[]} [args]\n * The command arguments as a string (e.g. \"git commit -a -m fixed_stuff\") or as an array\n * (e.g. [\"git\", \"commit\", \"-a\", \"-m\", \"fixed stuff\"]).\n *\n * @param {object} [options]\n * The same options as {@link child_process.spawn} or {@link child_process.spawnSync}.\n *\n * @param {function} [callback]\n * The callback that will receive the results, if applicable.\n *\n * @returns {object}\n */\nfunction normalizeArgs (params) {\n let command, args, options, callback, error;\n\n try {\n // Shift the arguments, if necessary\n ({ command, args, options, callback } = shiftArgs(params));\n\n let commandArgs = [];\n\n if (typeof command === \"string\" && args === undefined) {\n // The command parameter is actually the command AND arguments,\n // so split the string into an array\n command = splitArgString(command);\n }\n\n if (Array.isArray(command)) {\n // Split the command from the arguments\n commandArgs = command.slice(1);\n command = command[0];\n }\n\n if (typeof args === \"string\") {\n // Convert the `args` argument from a string an array\n args = splitArgString(args);\n }\n\n if (Array.isArray(args)) {\n // Add these arguments to any arguments from above\n args = commandArgs.concat(args);\n }\n\n if (args === undefined || args === null) {\n args = commandArgs;\n }\n\n if (options === undefined || options === null) {\n options = {};\n }\n\n // Set default options\n options.encoding = options.encoding || \"utf8\";\n\n // Validate all arguments\n validateArgs(command, args, options, callback);\n }\n catch (err) {\n error = err;\n\n // Sanitize args that are used as output\n command = String(command || \"\");\n args = (Array.isArray(args) ? args : []).map((arg) => String(arg || \"\"));\n }\n\n return { command, args, options, callback, error };\n}\n\n/**\n * Detects whether any optional arguments have been omitted,\n * and shifts the other arguments as needed.\n *\n * @param {string|string[]} command\n * @param {string|string[]} [args]\n * @param {object} [options]\n * @param {function} [callback]\n * @returns {object}\n */\nfunction shiftArgs (params) {\n params = Array.prototype.slice.call(params);\n let command, args, options, callback;\n\n // Check for a callback as the final parameter\n let lastParam = params[params.length - 1];\n if (typeof lastParam === \"function\") {\n callback = lastParam;\n params.pop();\n }\n\n // Check for an options object as the second-to-last parameter\n lastParam = params[params.length - 1];\n if (lastParam === null || lastParam === undefined ||\n (typeof lastParam === \"object\" && !Array.isArray(lastParam))) {\n options = lastParam;\n params.pop();\n }\n\n // The first parameter is the command\n command = params.shift();\n\n // All remaining parameters are the args\n if (params.length === 0) {\n args = undefined;\n }\n else if (params.length === 1 && Array.isArray(params[0])) {\n args = params[0];\n }\n else if (params.length === 1 && params[0] === \"\") {\n args = [];\n }\n else {\n args = params;\n }\n\n return { command, args, options, callback };\n}\n\n/**\n * Validates all arguments, and throws an error if any are invalid.\n *\n * @param {string} command\n * @param {string[]} args\n * @param {object} options\n * @param {function} [callback]\n */\nfunction validateArgs (command, args, options, callback) {\n if (command === undefined || command === null) {\n throw new Error(\"The command to execute is missing.\");\n }\n\n if (typeof command !== \"string\") {\n throw new Error(\"The command to execute should be a string, not \" + friendlyType(command));\n }\n\n if (!Array.isArray(args)) {\n throw new Error(\n \"The command arguments should be a string or an array, not \" +\n friendlyType(args)\n );\n }\n\n for (let i = 0; i < args.length; i++) {\n let arg = args[i];\n\n if (typeof arg !== \"string\") {\n throw new Error(\n `The command arguments should be strings, but argument #${i + 1} is ` +\n friendlyType(arg)\n );\n }\n }\n\n if (typeof options !== \"object\") {\n throw new Error(\n \"The options should be an object, not \" +\n friendlyType(options)\n );\n }\n\n if (callback !== undefined && callback !== null) {\n if (typeof callback !== \"function\") {\n throw new Error(\"The callback should be a function, not \" + friendlyType(callback));\n }\n }\n}\n\n/**\n * Splits an argument string (e.g. git commit -a -m \"fixed stuff\")\n * into an array (e.g. [\"git\", \"commit\", \"-a\", \"-m\", \"fixed stuff\"]).\n *\n * @param {string} argString\n * @returns {string[]}\n */\nfunction splitArgString (argString) {\n try {\n return parseArgsStringToArgv(argString);\n }\n catch (error) {\n throw new Error(`Could not parse the string: ${argString}\\n${error.message}`);\n }\n}\n\n/**\n * Returns the friendly type name of the given value, for use in error messages.\n *\n * @param {*} val\n * @returns {string}\n */\nfunction friendlyType (val) {\n let type = detectType(val);\n let firstChar = String(type)[0].toLowerCase();\n\n if ([\"a\", \"e\", \"i\", \"o\", \"u\"].indexOf(firstChar) === -1) {\n return `a ${type}.`;\n }\n else {\n return `an ${type}.`;\n }\n}\n", "\"use strict\";\n\n/**\n * An instance of this class is returned by {@link sync} and {@link async}.\n * It contains information about how the process was spawned, how it exited, and its output.\n */\nmodule.exports = class Process {\n /**\n * @param {object} props - Initial property values\n */\n constructor ({ command, args, pid, stdout, stderr, output, status, signal, options }) {\n options = options || {};\n stdout = stdout || (options.encoding === \"buffer\" ? Buffer.from([]) : \"\");\n stderr = stderr || (options.encoding === \"buffer\" ? Buffer.from([]) : \"\");\n output = output || [options.input || null, stdout, stderr];\n\n /**\n * The command that was used to spawn the process\n *\n * @type {string}\n */\n this.command = command || \"\";\n\n /**\n * The command-line arguments that were passed to the process.\n *\n * @type {string[]}\n */\n this.args = args || [];\n\n /**\n * The numeric process ID assigned by the operating system\n *\n * @type {number}\n */\n this.pid = pid || 0;\n\n /**\n * The process's standard output\n *\n * @type {Buffer|string}\n */\n\n this.stdout = output[1];\n\n /**\n * The process's error output\n *\n * @type {Buffer|string}\n */\n this.stderr = output[2];\n\n /**\n * The process's stdio [stdin, stdout, stderr]\n *\n * @type {Buffer[]|string[]}\n */\n this.output = output;\n\n /**\n * The process's status code\n *\n * @type {number}\n */\n this.status = status;\n\n /**\n * The signal used to kill the process, if applicable\n *\n * @type {string}\n */\n this.signal = signal || null;\n }\n\n /**\n * Returns the full command and arguments used to spawn the process\n *\n * @type {string}\n */\n toString () {\n let string = this.command;\n\n for (let arg of this.args) {\n // Escape quotes\n arg = arg.replace(/\"/g, '\\\\\"');\n\n if (arg.indexOf(\" \") >= 0) {\n // Add quotes if the arg contains whitespace\n string += ` \"${arg}\"`;\n }\n else {\n string += ` ${arg}`;\n }\n }\n\n return string;\n }\n};\n", "\"use strict\";\n\n/**\n * An instance of this class is returned by {@link sync} and {@link async} when the process exits\n * with a non-zero status code.\n */\nmodule.exports = class ProcessError extends Error {\n constructor (process) {\n let message = `${process.toString()} exited with a status of ${process.status}.`;\n\n if (process.stderr.length > 0) {\n message += \"\\n\\n\" + process.stderr.toString().trim();\n }\n\n super(message);\n Object.assign(this, process);\n this.name = ProcessError.name;\n }\n};\n", "\"use strict\";\n\nconst Process = require(\"./process\");\nconst ProcessError = require(\"./process-error\");\n\nmodule.exports = normalizeResult;\n\n/**\n * @param {string} [command] - The command used to run the process\n * @param {string[]} [args] - The command-line arguments that were passed to the process\n * @param {number} [pid] - The process ID\n * @param {string|Buffer} [stdout] - The process's stdout\n * @param {string|Buffer} [stderr] - The process's stderr\n * @param {string[]|Buffer[]} [output] - The process's stdio\n * @param {number} [status] - The process's status code\n * @param {string} [signal] - The signal that was used to kill the process, if any\n * @param {object} [options] - The options used to run the process\n * @param {Error} [error] - An error, if one occurred\n * @returns {Process}\n */\nfunction normalizeResult ({ command, args, pid, stdout, stderr, output, status, signal, options, error }) {\n let process = new Process({ command, args, pid, stdout, stderr, output, status, signal, options });\n\n if (error) {\n if (process.status === undefined) {\n process.status = null;\n }\n throw Object.assign(error, process);\n }\n else if (process.status) {\n throw new ProcessError(process);\n }\n else {\n return process;\n }\n}\n", "module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction checkPathExt (path, options) {\n var pathext = options.pathExt !== undefined ?\n options.pathExt : process.env.PATHEXT\n\n if (!pathext) {\n return true\n }\n\n pathext = pathext.split(';')\n if (pathext.indexOf('') !== -1) {\n return true\n }\n for (var i = 0; i < pathext.length; i++) {\n var p = pathext[i].toLowerCase()\n if (p && path.substr(-p.length).toLowerCase() === p) {\n return true\n }\n }\n return false\n}\n\nfunction checkStat (stat, path, options) {\n if (!stat.isSymbolicLink() && !stat.isFile()) {\n return false\n }\n return checkPathExt(path, options)\n}\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, path, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), path, options)\n}\n", "module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), options)\n}\n\nfunction checkStat (stat, options) {\n return stat.isFile() && checkMode(stat, options)\n}\n\nfunction checkMode (stat, options) {\n var mod = stat.mode\n var uid = stat.uid\n var gid = stat.gid\n\n var myUid = options.uid !== undefined ?\n options.uid : process.getuid && process.getuid()\n var myGid = options.gid !== undefined ?\n options.gid : process.getgid && process.getgid()\n\n var u = parseInt('100', 8)\n var g = parseInt('010', 8)\n var o = parseInt('001', 8)\n var ug = u | g\n\n var ret = (mod & o) ||\n (mod & g) && gid === myGid ||\n (mod & u) && uid === myUid ||\n (mod & ug) && myUid === 0\n\n return ret\n}\n", "var fs = require('fs')\nvar core\nif (process.platform === 'win32' || global.TESTING_WINDOWS) {\n core = require('./windows.js')\n} else {\n core = require('./mode.js')\n}\n\nmodule.exports = isexe\nisexe.sync = sync\n\nfunction isexe (path, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n if (!cb) {\n if (typeof Promise !== 'function') {\n throw new TypeError('callback not provided')\n }\n\n return new Promise(function (resolve, reject) {\n isexe(path, options || {}, function (er, is) {\n if (er) {\n reject(er)\n } else {\n resolve(is)\n }\n })\n })\n }\n\n core(path, options || {}, function (er, is) {\n // ignore EACCES because that just means we aren't allowed to run it\n if (er) {\n if (er.code === 'EACCES' || options && options.ignoreErrors) {\n er = null\n is = false\n }\n }\n cb(er, is)\n })\n}\n\nfunction sync (path, options) {\n // my kingdom for a filtered catch\n try {\n return core.sync(path, options || {})\n } catch (er) {\n if (options && options.ignoreErrors || er.code === 'EACCES') {\n return false\n } else {\n throw er\n }\n }\n}\n", "const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n", "'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n", "'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst getPathKey = require('path-key');\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const env = parsed.options.env || process.env;\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: env[getPathKey({ env })],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n", "'use strict';\n\n// See http://www.robvanderwoude.com/escapechars.php\nconst metaCharsRegExp = /([()\\][%!^\"`<>&|;, *?])/g;\n\nfunction escapeCommand(arg) {\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n return arg;\n}\n\nfunction escapeArgument(arg, doubleEscapeMetaChars) {\n // Convert to string\n arg = `${arg}`;\n\n // Algorithm below is based on https://qntm.org/cmd\n\n // Sequence of backslashes followed by a double quote:\n // double up all the backslashes and escape the double quote\n arg = arg.replace(/(\\\\*)\"/g, '$1$1\\\\\"');\n\n // Sequence of backslashes followed by the end of the string\n // (which will become a double quote later):\n // double up all the backslashes\n arg = arg.replace(/(\\\\*)$/, '$1$1');\n\n // All other backslashes occur literally\n\n // Quote the whole thing:\n arg = `\"${arg}\"`;\n\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n // Double escape meta chars if necessary\n if (doubleEscapeMetaChars) {\n arg = arg.replace(metaCharsRegExp, '^$1');\n }\n\n return arg;\n}\n\nmodule.exports.command = escapeCommand;\nmodule.exports.argument = escapeArgument;\n", "'use strict';\nmodule.exports = /^#!(.*)/;\n", "'use strict';\nconst shebangRegex = require('shebang-regex');\n\nmodule.exports = (string = '') => {\n\tconst match = string.match(shebangRegex);\n\n\tif (!match) {\n\t\treturn null;\n\t}\n\n\tconst [path, argument] = match[0].replace(/#! ?/, '').split(' ');\n\tconst binary = path.split('/').pop();\n\n\tif (binary === 'env') {\n\t\treturn argument;\n\t}\n\n\treturn argument ? `${binary} ${argument}` : binary;\n};\n", "'use strict';\n\nconst fs = require('fs');\nconst shebangCommand = require('shebang-command');\n\nfunction readShebang(command) {\n // Read the first 150 bytes from the file\n const size = 150;\n const buffer = Buffer.alloc(size);\n\n let fd;\n\n try {\n fd = fs.openSync(command, 'r');\n fs.readSync(fd, buffer, 0, size, 0);\n fs.closeSync(fd);\n } catch (e) { /* Empty */ }\n\n // Attempt to extract shebang (null is returned if not a shebang)\n return shebangCommand(buffer.toString());\n}\n\nmodule.exports = readShebang;\n", "'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n", "'use strict';\n\nconst isWin = process.platform === 'win32';\n\nfunction notFoundError(original, syscall) {\n return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {\n code: 'ENOENT',\n errno: 'ENOENT',\n syscall: `${syscall} ${original.command}`,\n path: original.command,\n spawnargs: original.args,\n });\n}\n\nfunction hookChildProcess(cp, parsed) {\n if (!isWin) {\n return;\n }\n\n const originalEmit = cp.emit;\n\n cp.emit = function (name, arg1) {\n // If emitting \"exit\" event and exit code is 1, we need to check if\n // the command exists and emit an \"error\" instead\n // See https://github.com/IndigoUnited/node-cross-spawn/issues/16\n if (name === 'exit') {\n const err = verifyENOENT(arg1, parsed, 'spawn');\n\n if (err) {\n return originalEmit.call(cp, 'error', err);\n }\n }\n\n return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params\n };\n}\n\nfunction verifyENOENT(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawn');\n }\n\n return null;\n}\n\nfunction verifyENOENTSync(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawnSync');\n }\n\n return null;\n}\n\nmodule.exports = {\n hookChildProcess,\n verifyENOENT,\n verifyENOENTSync,\n notFoundError,\n};\n", "'use strict';\n\nconst cp = require('child_process');\nconst parse = require('./lib/parse');\nconst enoent = require('./lib/enoent');\n\nfunction spawn(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);\n\n // Hook into child process \"exit\" event to emit an error if the command\n // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n enoent.hookChildProcess(spawned, parsed);\n\n return spawned;\n}\n\nfunction spawnSync(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);\n\n // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);\n\n return result;\n}\n\nmodule.exports = spawn;\nmodule.exports.spawn = spawn;\nmodule.exports.sync = spawnSync;\n\nmodule.exports._parse = parse;\nmodule.exports._enoent = enoent;\n", "\"use strict\";\n\nconst normalizeArgs = require(\"./normalize-args\");\nconst normalizeResult = require(\"./normalize-result\");\nconst spawnSync = require(\"cross-spawn\").sync;\n\nmodule.exports = sync;\n\n/**\n * Executes the given command synchronously, and returns the buffered results.\n *\n * @param {string|string[]} command - The command to run\n * @param {string|string[]} [args] - The command arguments\n * @param {object} [options] - options\n * @returns {Process}\n *\n * @see {@link normalizeArgs} for argument details\n */\nfunction sync () {\n // Normalize the function arguments\n let { command, args, options, error } = normalizeArgs(arguments);\n\n if (error) {\n // Invalid arguments\n normalizeResult({ command, args, options, error });\n }\n else {\n let result;\n\n try {\n // Run the program\n result = spawnSync(command, args, options);\n }\n catch (error) {\n // An error occurred while spawning or killing the process\n normalizeResult({ error, command, args, options });\n }\n\n // Return the results or throw an error\n return normalizeResult(Object.assign({}, result, { command, args, options }));\n }\n}\n", "\"use strict\"\n\nvar next = (global.process && process.nextTick) || global.setImmediate || function (f) {\n setTimeout(f, 0)\n}\n\nmodule.exports = function maybe (cb, promise) {\n if (cb) {\n promise\n .then(function (result) {\n next(function () { cb(null, result) })\n }, function (err) {\n next(function () { cb(err) })\n })\n return undefined\n }\n else {\n return promise\n }\n}\n", "\"use strict\";\n\nconst normalizeArgs = require(\"./normalize-args\");\nconst normalizeResult = require(\"./normalize-result\");\nconst maybe = require(\"call-me-maybe\");\nconst spawn = require(\"cross-spawn\");\n\nmodule.exports = async;\n\n/**\n * Executes the given command asynchronously, and returns the buffered\n * results via a callback or Promise.\n *\n * @param {string|string[]} command - The command to run\n * @param {string|string[]} [args] - The command arguments\n * @param {object} [options] - options\n * @param {function} [callback] - callback that will receive the results\n *\n * @returns {Promise|undefined}\n * Returns a Promise if no callback is given. The promise resolves with\n * a {@link Process} object.\n *\n * @see {@link normalizeArgs} for argument details\n */\nfunction async () {\n // Normalize the function arguments\n let { command, args, options, callback, error } = normalizeArgs(arguments);\n\n return maybe(callback, new Promise((resolve, reject) => {\n if (error) {\n // Invalid arguments\n normalizeResult({ command, args, options, error });\n }\n else {\n let spawnedProcess;\n\n try {\n // Spawn the program\n spawnedProcess = spawn(command, args, options);\n }\n catch (error) {\n // An error occurred while spawning the process\n normalizeResult({ error, command, args, options });\n }\n\n let pid = spawnedProcess.pid;\n let stdout = options.encoding === \"buffer\" ? Buffer.from([]) : \"\";\n let stderr = options.encoding === \"buffer\" ? Buffer.from([]) : \"\";\n\n spawnedProcess.stdout && spawnedProcess.stdout.on(\"data\", (data) => {\n if (typeof stdout === \"string\") {\n stdout += data.toString();\n }\n else {\n stdout = Buffer.concat([stdout, data]);\n }\n });\n\n spawnedProcess.stderr && spawnedProcess.stderr.on(\"data\", (data) => {\n if (typeof stderr === \"string\") {\n stderr += data.toString();\n }\n else {\n stderr = Buffer.concat([stderr, data]);\n }\n });\n\n spawnedProcess.on(\"error\", (error) => {\n try {\n normalizeResult({ error, command, args, options, pid, stdout, stderr });\n }\n catch (error) {\n reject(error);\n }\n });\n\n spawnedProcess.on(\"exit\", (status, signal) => {\n try {\n resolve(normalizeResult({ command, args, options, pid, stdout, stderr, status, signal }));\n }\n catch (error) {\n reject(error);\n }\n });\n }\n }));\n}\n", "\"use strict\";\n\nmodule.exports.sync = require(\"./sync\");\nmodule.exports.async = require(\"./async\");\n", null, null, null, null, null, null, null, null, null, "import {\n debug,\n getInput,\n setFailed,\n setOutput as setOutputActionsCore,\n} from \"@actions/core\";\nimport { npmPublish } from \"../npm-publish\";\nimport { Access, Options } from \"../options\";\n\n/**\n * The main entry point of the GitHub Action\n *\n * @internal\n */\nasync function main(): Promise {\n try {\n // Setup global error handlers\n process.on(\"uncaughtException\", errorHandler);\n process.on(\"unhandledRejection\", errorHandler);\n\n // Get the GitHub Actions input options\n const options: Options = {\n token: getInput(\"token\", { required: true }),\n registry: getInput(\"registry\", { required: true }),\n package: getInput(\"package\", { required: true }),\n checkVersion:\n getInput(\"check-version\", { required: true }).toLowerCase() === \"true\",\n tag: getInput(\"tag\"),\n access: getInput(\"access\") as Access,\n dryRun: getInput(\"dry-run\").toLowerCase() === \"true\",\n greaterVersionOnly:\n getInput(\"greater-version-only\").toLowerCase() === \"true\",\n debug: debugHandler,\n };\n\n // Publish to NPM\n let results = await npmPublish(options);\n\n if (results.type === \"none\") {\n console.log(\n `\\n\uD83D\uDCE6 ${results.package} v${results.version} is already published to ${options.registry}`\n );\n }\n if (results.type === \"lower\") {\n console.log(\n `\\n\uD83D\uDCE6 ${results.package} v${results.version} is lower than the version published to ${options.registry}`\n );\n } else if (results.dryRun) {\n console.log(\n `\\n\uD83D\uDCE6 ${results.package} v${results.version} was NOT actually published to ${options.registry} (dry run)`\n );\n } else {\n console.log(\n `\\n\uD83D\uDCE6 Successfully published ${results.package} v${results.version} to ${options.registry}`\n );\n }\n\n // Set the GitHub Actions output variables\n setOutput(\"type\", results.type);\n setOutput(\"version\", results.version);\n setOutput(\"old-version\", results.oldVersion);\n setOutput(\"tag\", results.tag);\n setOutput(\"access\", results.access);\n setOutput(\"dry-run\", results.dryRun);\n } catch (error) {\n errorHandler(error as Error);\n }\n}\n\n/**\n * Set output with logging to stdout for test support\n */\nfunction setOutput(...args: Parameters) {\n if (process.env.NODE_ENV === \"test\") {\n console.log(`TEST::set-output name=${args[0]}::${args[1]}`);\n return;\n }\n return setOutputActionsCore(...args);\n}\n\n/**\n * Prints errors to the GitHub Actions console\n */\nfunction errorHandler(error: Error): void {\n let message = error.stack || error.message || String(error);\n setFailed(message);\n process.exit();\n}\n\n/**\n * Prints debug logs to the GitHub Actions console\n */\nfunction debugHandler(message: string, data?: object) {\n if (data) {\n message += \"\\n\" + JSON.stringify(data, undefined, 2);\n }\n\n debug(message);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-floating-promises\nmain();\n", "import * as semver from \"semver\";\nimport { normalizeOptions } from \"./normalize-options\";\nimport { npm } from \"./npm\";\nimport { Options } from \"./options\";\nimport { readManifest } from \"./read-manifest\";\nimport { Results } from \"./results\";\n\n/**\n * Publishes a package to NPM, if its version has changed\n */\nexport async function npmPublish(opts: Options = {}): Promise {\n let options = normalizeOptions(opts);\n\n // Get the old and new version numbers\n let manifest = await readManifest(options.package, options.debug);\n let publishedVersion = await npm.getLatestVersion(manifest.name, options);\n\n // Determine if/how the version has changed\n let diff = semver.diff(manifest.version, publishedVersion);\n\n // Compare both versions to see if it's changed\n let cmp = semver.compare(manifest.version, publishedVersion);\n\n let shouldPublish =\n !options.checkVersion ||\n // compare returns 1 if manifest is higher than published\n (options.greaterVersionOnly && cmp === 1) ||\n // compare returns 0 if the manifest is the same as published\n cmp !== 0;\n\n if (shouldPublish) {\n // Publish the new version to NPM\n await npm.publish(manifest, options);\n }\n\n let results: Results = {\n package: manifest.name,\n registry: options.registry,\n // The version should be marked as lower if we disallow decrementing the version\n type:\n (options.greaterVersionOnly && cmp === -1 && \"lower\") || diff || \"none\",\n version: manifest.version.raw,\n oldVersion: publishedVersion.raw,\n tag: options.tag,\n access:\n options.access ||\n (manifest.name.startsWith(\"@\") ? \"restricted\" : \"public\"),\n dryRun: options.dryRun,\n };\n\n options.debug(\"OUTPUT:\", results);\n return results;\n}\n", "import { URL } from \"url\";\nimport { Access, Debug, Options } from \"./options\";\n\n/**\n * Normalized and sanitized options\n *\n * @internal\n */\nexport interface NormalizedOptions {\n token: string;\n registry: URL;\n package: string;\n tag: string;\n access?: Access;\n dryRun: boolean;\n checkVersion: boolean;\n greaterVersionOnly: boolean;\n quiet: boolean;\n debug: Debug;\n}\n\n/**\n * Normalizes and sanitizes options, and fills-in any default values.\n *\n * @internal\n */\nexport function normalizeOptions(options: Options): NormalizedOptions {\n let registryURL =\n typeof options.registry === \"string\"\n ? new URL(options.registry)\n : options.registry;\n\n return {\n token: options.token || \"\",\n registry: registryURL || new URL(\"https://registry.npmjs.org/\"),\n package: options.package || \"package.json\",\n tag: options.tag || \"latest\",\n access: options.access,\n dryRun: options.dryRun || false,\n checkVersion:\n options.checkVersion === undefined ? true : Boolean(options.checkVersion),\n greaterVersionOnly:\n options.greaterVersionOnly === undefined\n ? false\n : Boolean(options.greaterVersionOnly),\n quiet: options.quiet || false,\n debug: options.debug || (() => undefined),\n };\n}\n", "import * as ezSpawn from \"@jsdevtools/ez-spawn\";\nimport { ono } from \"@jsdevtools/ono\";\nimport { StdioOptions } from \"child_process\";\nimport { dirname, resolve } from \"path\";\nimport { SemVer } from \"semver\";\nimport { NormalizedOptions } from \"./normalize-options\";\nimport { setNpmConfig } from \"./npm-config\";\nimport { getNpmEnvironment } from \"./npm-env\";\nimport { Manifest } from \"./read-manifest\";\n\n/**\n * Runs NPM commands.\n *\n * @internal\n */\nexport const npm = {\n /**\n * Gets the latest published version of the specified package.\n */\n async getLatestVersion(\n name: string,\n options: NormalizedOptions\n ): Promise {\n // Update the NPM config with the specified registry and token\n await setNpmConfig(options);\n\n try {\n let command = [\"npm\", \"view\"];\n\n if (options.tag === \"latest\") {\n command.push(name);\n } else {\n command.push(`${name}@${options.tag}`);\n }\n\n command.push(\"version\");\n\n // Get the environment variables to pass to NPM\n let env = getNpmEnvironment(options);\n\n // Run NPM to get the latest published version of the package\n options.debug(`Running command: npm view ${name} version`, {\n command,\n env,\n });\n let result;\n\n try {\n result = await ezSpawn.async(command, { env });\n } catch (err) {\n // In case ezSpawn.async throws, it still has stdout and stderr properties.\n result = err as ezSpawn.ProcessError;\n }\n\n let version = result.stdout.trim();\n let error = result.stderr.trim();\n let status = result.status || 0;\n\n // If the package was not previously published, return version 0.0.0.\n if ((status === 0 && !version) || error.includes(\"E404\")) {\n options.debug(\n `The latest version of ${name} is at v0.0.0, as it was never published.`\n );\n return new SemVer(\"0.0.0\");\n } else if (result instanceof Error) {\n // NPM failed for some reason\n throw result;\n }\n\n // Parse/validate the version number\n let semver = new SemVer(version);\n\n options.debug(`The latest version of ${name} is at v${semver}`);\n return semver;\n } catch (error) {\n throw ono(\n error,\n `Unable to determine the current version of ${name} on NPM.`\n );\n }\n },\n\n /**\n * Publishes the specified package to NPM\n */\n async publish(\n { name, version }: Manifest,\n options: NormalizedOptions\n ): Promise {\n // Update the NPM config with the specified registry and token\n await setNpmConfig(options);\n\n try {\n let command = [\"npm\", \"publish\"];\n\n if (options.tag !== \"latest\") {\n command.push(\"--tag\", options.tag);\n }\n\n if (options.access) {\n command.push(\"--access\", options.access);\n }\n\n if (options.dryRun) {\n command.push(\"--dry-run\");\n }\n\n // Run \"npm publish\" in the package.json directory\n let cwd = resolve(dirname(options.package));\n\n // Determine whether to suppress NPM's output\n let stdio: StdioOptions = options.quiet ? \"pipe\" : \"inherit\";\n\n // Get the environment variables to pass to NPM\n let env = getNpmEnvironment(options);\n\n // Run NPM to publish the package\n options.debug(\"Running command: npm publish\", {\n command,\n stdio,\n cwd,\n env,\n });\n await ezSpawn.async(command, { cwd, stdio, env });\n } catch (error) {\n throw ono(\n error,\n `Unable to publish ${name} v${version} to ${options.registry}.`\n );\n }\n },\n};\n", "import * as ezSpawn from \"@jsdevtools/ez-spawn\";\nimport { ono } from \"@jsdevtools/ono\";\nimport { promises as fs } from \"fs\";\nimport { EOL } from \"os\";\nimport { dirname } from \"path\";\nimport { NormalizedOptions } from \"./normalize-options\";\nimport { getNpmEnvironment } from \"./npm-env\";\n\n/**\n * Sets/updates the NPM config based on the options.\n *\n * @internal\n */\nexport async function setNpmConfig(options: NormalizedOptions): Promise {\n // Read the current NPM config\n let configPath = await getNpmConfigPath(options);\n let config = await readNpmConfig(configPath, options);\n\n // Update the config\n config = updateConfig(config, options);\n\n // Save the new config\n await writeNpmConfig(configPath, config, options);\n}\n\n/**\n * Updates the given NPM config with the specified options.\n */\nfunction updateConfig(\n config: string,\n { registry, debug }: NormalizedOptions\n): string {\n let authDomain = registry.origin.slice(registry.protocol.length);\n\n let lines = config.split(/\\r?\\n/);\n\n // Remove any existing lines that set the registry or token\n lines = lines.filter(\n (line) => !(line.startsWith(\"registry=\") || line.includes(\"_authToken=\"))\n );\n\n // Append the new registry and token to the end of the file\n lines.push(`${authDomain}/:_authToken=\\${INPUT_TOKEN}`);\n lines.push(`registry=${registry.href}`);\n\n config = lines.join(EOL).trim() + EOL;\n\n debug(`NEW NPM CONFIG: \\n${config}`);\n return config;\n}\n\n/**\n * Gets the path of the NPM config file.\n */\nasync function getNpmConfigPath(options: NormalizedOptions): Promise {\n try {\n // Get the environment variables to pass to NPM\n let env = getNpmEnvironment(options);\n\n options.debug(\"Running command: npm config get userconfig\");\n\n let process = await ezSpawn.async(\"npm\", \"config\", \"get\", \"userconfig\", {\n env,\n });\n return process.stdout.trim();\n } catch (error) {\n throw ono(error, \"Unable to determine the NPM config file path.\");\n }\n}\n\n/**\n * Reads the NPM config file.\n */\nasync function readNpmConfig(\n configPath: string,\n { debug }: NormalizedOptions\n): Promise {\n try {\n debug(`Reading NPM config from ${configPath}`);\n\n let config = await fs.readFile(configPath, \"utf-8\");\n\n debug(`OLD NPM CONFIG: \\n${config}`);\n return config;\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === \"ENOENT\") {\n debug(\"OLD NPM CONFIG: \");\n return \"\";\n }\n\n throw ono(error, `Unable to read the NPM config file: ${configPath}`);\n }\n}\n\n/**\n * Writes the NPM config file.\n */\nasync function writeNpmConfig(\n configPath: string,\n config: string,\n { debug }: NormalizedOptions\n): Promise {\n try {\n debug(`Writing new NPM config to ${configPath}`);\n\n await fs.mkdir(dirname(configPath), { recursive: true });\n await fs.writeFile(configPath, config);\n } catch (error) {\n throw ono(error, `Unable to update the NPM config file: ${configPath}`);\n }\n}\n", "import { NormalizedOptions } from \"./normalize-options\";\n\n/**\n * Returns the environment variables that should be passed to NPM, based on the given options.\n */\nexport function getNpmEnvironment(\n options: NormalizedOptions\n): NodeJS.ProcessEnv {\n /* eslint-disable @typescript-eslint/naming-convention */\n let env: NodeJS.ProcessEnv = {\n // Copy all the host's environment variables\n ...process.env,\n\n // Don't pass Node.js runtime variables to NPM\n NODE_ENV: \"\",\n NODE_OPTIONS: \"\",\n };\n\n // Determine if we need to set the NPM token\n let needsToken = Boolean(\n options.token && process.env.INPUT_TOKEN !== options.token\n );\n\n if (needsToken) {\n env.INPUT_TOKEN = options.token;\n }\n\n return env;\n}\n", "import { ono } from \"@jsdevtools/ono\";\nimport { promises as fs } from \"fs\";\nimport { resolve } from \"path\";\nimport { SemVer } from \"semver\";\nimport { Debug } from \"./options\";\n\n/**\n * A package manifest (package.json)\n *\n * @internal\n */\nexport interface Manifest {\n name: string;\n version: SemVer;\n}\n\n/**\n * Reads the package manifest (package.json) and returns its parsed contents\n *\n * @internal\n */\nexport async function readManifest(\n path: string,\n debug?: Debug\n): Promise {\n debug && debug(`Reading package manifest from ${resolve(path)}`);\n let json: string;\n\n try {\n json = await fs.readFile(path, \"utf-8\");\n } catch (error) {\n throw ono(error, `Unable to read ${path}`);\n }\n\n try {\n let { name, version } = JSON.parse(json) as Record;\n\n if (typeof name !== \"string\" || name.trim().length === 0) {\n throw new TypeError(\"Invalid package name\");\n }\n\n let manifest: Manifest = {\n name,\n version: new SemVer(version as string),\n };\n\n debug && debug(\"MANIFEST:\", manifest);\n return manifest;\n } catch (error) {\n throw ono(error, `Unable to parse ${path}`);\n }\n}\n"], - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,aAAgB,eAAe,OAAU;AACvC,UAAI,UAAU,QAAQ,UAAU,QAAW;AACzC,eAAO;iBACE,OAAO,UAAU,YAAY,iBAAiB,QAAQ;AAC/D,eAAO;;AAET,aAAO,KAAK,UAAU,KAAK;IAC7B;AAPA,YAAA,iBAAA;AAeA,aAAgB,oBACd,sBAA0C;AAE1C,UAAI,CAAC,OAAO,KAAK,oBAAoB,EAAE,QAAQ;AAC7C,eAAO,CAAA;;AAGT,aAAO;QACL,OAAO,qBAAqB;QAC5B,MAAM,qBAAqB;QAC3B,MAAM,qBAAqB;QAC3B,SAAS,qBAAqB;QAC9B,KAAK,qBAAqB;QAC1B,WAAW,qBAAqB;;IAEpC;AAfA,YAAA,sBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzBA,QAAA,KAAA,aAAA,QAAA,IAAA,CAAA;AACA,QAAA,UAAA;AAqBA,aAAgB,aACd,SACA,YACA,SAAY;AAEZ,YAAM,MAAM,IAAI,QAAQ,SAAS,YAAY,OAAO;AACpD,cAAQ,OAAO,MAAM,IAAI,SAAQ,IAAK,GAAG,GAAG;IAC9C;AAPA,YAAA,eAAA;AASA,aAAgB,MAAM,MAAc,UAAU,IAAE;AAC9C,mBAAa,MAAM,CAAA,GAAI,OAAO;IAChC;AAFA,YAAA,QAAA;AAIA,QAAM,aAAa;AAEnB,QAAM,UAAN,MAAa;MAKX,YAAY,SAAiB,YAA+B,SAAe;AACzE,YAAI,CAAC,SAAS;AACZ,oBAAU;;AAGZ,aAAK,UAAU;AACf,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,IAAI,aAAa,QAAQ;AACnC,YAAQ,IAAI,yBAAyB,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG;AAC1D;AAAA,EACF;AACA,aAAO,YAAAC,WAAqB,GAAG,IAAI;AACrC;AAKA,SAAS,aAAa,OAAoB;AACxC,MAAI,UAAU,MAAM,SAAS,MAAM,WAAW,OAAO,KAAK;AAC1D,6BAAU,OAAO;AACjB,UAAQ,KAAK;AACf;AAKA,SAAS,aAAa,SAAiB,MAAe;AACpD,MAAI,MAAM;AACR,eAAW,OAAO,KAAK,UAAU,MAAM,QAAW,CAAC;AAAA,EACrD;AAEA,yBAAM,OAAO;AACf;AAGA,KAAK;", - "names": ["crypto", "version", "URL", "crypto", "import_crypto", "crypto", "import_crypto", "fs", "self", "options", "debug", "socket", "require_tunnel", "module", "HttpCodes", "Headers", "MediaTypes", "resolve", "ExitCode", "getInput", "setOutput", "setFailed", "debug", "module", "module", "debug", "module", "debug", "module", "module", "module", "debug", "SemVer", "version", "module", "SemVer", "parse", "version", "module", "parse", "version", "module", "parse", "version", "module", "SemVer", "version", "module", "SemVer", "compare", "module", "compare", "module", "parse", "diff", "v1", "module", "SemVer", "module", "SemVer", "module", "SemVer", "module", "parse", "version", "module", "compare", "module", "compare", "module", "SemVer", "module", "module", "module", "compare", "module", "compare", "module", "compare", "module", "compare", "module", "compare", "module", "module", "SemVer", "parse", "version", "module", "module", "self", "module", "self", "diff", "module", "debug", "version", "SemVer", "module", "debug", "SemVer", "version", "module", "version", "module", "module", "SemVer", "module", "SemVer", "module", "SemVer", "require_valid", "module", "module", "SemVer", "version", "module", "version", "module", "version", "module", "module", "compare", "version", "module", "compare", "require_semver", "module", "SemVer", "parse", "diff", "compare", "module", "global", "module", "module", "module", "process", "module", "process", "module", "fs", "module", "fs", "module", "fs", "resolve", "module", "resolve", "module", "module", "module", "module", "module", "module", "fs", "require_parse", "module", "parse", "module", "module", "parse", "module", "error", "module", "module", "async", "resolve", "error", "require_lib", "module", "normalizeOptions", "ono", "ono", "module", "ezSpawn", "import_ono", "import_path", "debug", "process", "fs", "version", "semver", "import_ono", "import_fs", "import_path", "import_semver", "debug", "fs", "version", "diff", "setOutputActionsCore"] + "sources": ["../node_modules/@actions/core/src/utils.ts", "../node_modules/@actions/core/src/command.ts", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js", "../node_modules/@actions/core/src/file-command.ts", "../node_modules/@actions/http-client/src/proxy.ts", "../node_modules/tunnel/lib/tunnel.js", "../node_modules/tunnel/index.js", "../node_modules/@actions/http-client/src/index.ts", "../node_modules/@actions/http-client/src/auth.ts", "../node_modules/@actions/core/src/oidc-utils.ts", "../node_modules/@actions/core/src/summary.ts", "../node_modules/@actions/core/src/path-utils.ts", "../node_modules/@actions/core/src/core.ts", "../node_modules/semver/internal/constants.js", "../node_modules/semver/internal/debug.js", "../node_modules/semver/internal/re.js", "../node_modules/semver/internal/parse-options.js", "../node_modules/semver/internal/identifiers.js", "../node_modules/semver/classes/semver.js", "../node_modules/semver/functions/parse.js", "../node_modules/semver/functions/valid.js", "../node_modules/semver/functions/clean.js", "../node_modules/semver/functions/inc.js", "../node_modules/semver/functions/compare.js", "../node_modules/semver/functions/eq.js", "../node_modules/semver/functions/diff.js", "../node_modules/semver/functions/major.js", "../node_modules/semver/functions/minor.js", "../node_modules/semver/functions/patch.js", "../node_modules/semver/functions/prerelease.js", "../node_modules/semver/functions/rcompare.js", "../node_modules/semver/functions/compare-loose.js", "../node_modules/semver/functions/compare-build.js", "../node_modules/semver/functions/sort.js", "../node_modules/semver/functions/rsort.js", "../node_modules/semver/functions/gt.js", "../node_modules/semver/functions/lt.js", "../node_modules/semver/functions/neq.js", "../node_modules/semver/functions/gte.js", "../node_modules/semver/functions/lte.js", "../node_modules/semver/functions/cmp.js", "../node_modules/semver/functions/coerce.js", "../node_modules/semver/node_modules/yallist/iterator.js", "../node_modules/semver/node_modules/yallist/yallist.js", "../node_modules/semver/node_modules/lru-cache/index.js", "../node_modules/semver/classes/range.js", "../node_modules/semver/classes/comparator.js", "../node_modules/semver/functions/satisfies.js", "../node_modules/semver/ranges/to-comparators.js", "../node_modules/semver/ranges/max-satisfying.js", "../node_modules/semver/ranges/min-satisfying.js", "../node_modules/semver/ranges/min-version.js", "../node_modules/semver/ranges/valid.js", "../node_modules/semver/ranges/outside.js", "../node_modules/semver/ranges/gtr.js", "../node_modules/semver/ranges/ltr.js", "../node_modules/semver/ranges/intersects.js", "../node_modules/semver/ranges/simplify.js", "../node_modules/semver/ranges/subset.js", "../node_modules/semver/index.js", "../node_modules/@jsdevtools/ono/src/to-json.ts", "../node_modules/@jsdevtools/ono/src/isomorphic.node.ts", "../node_modules/@jsdevtools/ono/src/stack.ts", "../node_modules/@jsdevtools/ono/src/extend-error.ts", "../node_modules/@jsdevtools/ono/src/normalize.ts", "../node_modules/@jsdevtools/ono/src/constructor.ts", "../node_modules/@jsdevtools/ono/src/singleton.ts", "../node_modules/@jsdevtools/ono/src/types.ts", "../node_modules/@jsdevtools/ono/src/index.ts", "../src/action/index.ts", "../src/npm-publish.ts", "../src/normalize-options.ts", "../src/npm/use-npm-env.ts", "../src/npm/call-npm-cli.ts", "../src/npm/get-publish-args.ts", "../src/npm/index.ts", "../src/read-manifest.ts"], + "sourcesContent": [null, null, "import crypto from 'crypto';\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\nexport default function rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n crypto.randomFillSync(rnds8Pool);\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}", "export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;", "import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;", "import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;", "import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;", "import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;", "import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}", "import crypto from 'crypto';\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('md5').update(bytes).digest();\n}\n\nexport default md5;", "import v35 from './v35.js';\nimport md5 from './md5.js';\nconst v3 = v35('v3', 0x30, md5);\nexport default v3;", "import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;", "import crypto from 'crypto';\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('sha1').update(bytes).digest();\n}\n\nexport default sha1;", "import v35 from './v35.js';\nimport sha1 from './sha1.js';\nconst v5 = v35('v5', 0x50, sha1);\nexport default v5;", "export default '00000000-0000-0000-0000-000000000000';", "import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;", "export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';", null, null, "'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n", "module.exports = require('./lib/tunnel');\n", null, null, null, null, null, null, "// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n", "const debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n", "const { MAX_SAFE_COMPONENT_LENGTH } = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst src = exports.src = []\nconst t = exports.t = {}\nlet R = 0\n\nconst createToken = (name, value, isGlobal) => {\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '[0-9]+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', '\\\\d*[a-zA-Z-][a-zA-Z0-9-]*')\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+')\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCE', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n", "// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n", "const numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n", "const debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0)\n }\n }\n if (identifier) {\n const base = Number(identifierBase) ? 1 : 0\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, base]\n }\n } else {\n this.prerelease = [identifier, base]\n }\n }\n break\n\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.format()\n this.raw = this.version\n return this\n }\n}\n\nmodule.exports = SemVer\n", "const { MAX_LENGTH } = require('../internal/constants')\nconst SemVer = require('../classes/semver')\nconst parse = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n try {\n return new SemVer(version, options)\n } catch (er) {\n return null\n }\n}\n\nmodule.exports = parse\n", "const parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n", "const parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n", "const SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n", "const SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n", "const compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n", "const parse = require('./parse')\nconst eq = require('./eq')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1)\n const v2 = parse(version2)\n if (eq(v1, v2)) {\n return null\n } else {\n const hasPre = v1.prerelease.length || v2.prerelease.length\n const prefix = hasPre ? 'pre' : ''\n const defaultResult = hasPre ? 'prerelease' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n if (!v1.prerelease.length || !v2.prerelease.length) {\n if (v1.patch) {\n return 'patch'\n }\n if (v1.minor) {\n return 'minor'\n }\n if (v1.major) {\n return 'major'\n }\n }\n return defaultResult // may be undefined\n }\n}\nmodule.exports = diff\n", "const SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n", "const SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n", "const SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n", "const parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n", "const compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n", "const compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n", "const SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n", "const compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n", "const compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n", "const compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n", "const compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n", "const compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n", "const compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n", "const compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n", "const eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n", "const SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n let next\n while ((next = re[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n re[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)\n}\nmodule.exports = coerce\n", "'use strict'\nmodule.exports = function (Yallist) {\n Yallist.prototype[Symbol.iterator] = function* () {\n for (let walker = this.head; walker; walker = walker.next) {\n yield walker.value\n }\n }\n}\n", "'use strict'\nmodule.exports = Yallist\n\nYallist.Node = Node\nYallist.create = Yallist\n\nfunction Yallist (list) {\n var self = this\n if (!(self instanceof Yallist)) {\n self = new Yallist()\n }\n\n self.tail = null\n self.head = null\n self.length = 0\n\n if (list && typeof list.forEach === 'function') {\n list.forEach(function (item) {\n self.push(item)\n })\n } else if (arguments.length > 0) {\n for (var i = 0, l = arguments.length; i < l; i++) {\n self.push(arguments[i])\n }\n }\n\n return self\n}\n\nYallist.prototype.removeNode = function (node) {\n if (node.list !== this) {\n throw new Error('removing node which does not belong to this list')\n }\n\n var next = node.next\n var prev = node.prev\n\n if (next) {\n next.prev = prev\n }\n\n if (prev) {\n prev.next = next\n }\n\n if (node === this.head) {\n this.head = next\n }\n if (node === this.tail) {\n this.tail = prev\n }\n\n node.list.length--\n node.next = null\n node.prev = null\n node.list = null\n\n return next\n}\n\nYallist.prototype.unshiftNode = function (node) {\n if (node === this.head) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var head = this.head\n node.list = this\n node.next = head\n if (head) {\n head.prev = node\n }\n\n this.head = node\n if (!this.tail) {\n this.tail = node\n }\n this.length++\n}\n\nYallist.prototype.pushNode = function (node) {\n if (node === this.tail) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var tail = this.tail\n node.list = this\n node.prev = tail\n if (tail) {\n tail.next = node\n }\n\n this.tail = node\n if (!this.head) {\n this.head = node\n }\n this.length++\n}\n\nYallist.prototype.push = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n push(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.unshift = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n unshift(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.pop = function () {\n if (!this.tail) {\n return undefined\n }\n\n var res = this.tail.value\n this.tail = this.tail.prev\n if (this.tail) {\n this.tail.next = null\n } else {\n this.head = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.shift = function () {\n if (!this.head) {\n return undefined\n }\n\n var res = this.head.value\n this.head = this.head.next\n if (this.head) {\n this.head.prev = null\n } else {\n this.tail = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.forEach = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.head, i = 0; walker !== null; i++) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.next\n }\n}\n\nYallist.prototype.forEachReverse = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.prev\n }\n}\n\nYallist.prototype.get = function (n) {\n for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.next\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.getReverse = function (n) {\n for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.prev\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.map = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.head; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.next\n }\n return res\n}\n\nYallist.prototype.mapReverse = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.tail; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.prev\n }\n return res\n}\n\nYallist.prototype.reduce = function (fn, initial) {\n var acc\n var walker = this.head\n if (arguments.length > 1) {\n acc = initial\n } else if (this.head) {\n walker = this.head.next\n acc = this.head.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = 0; walker !== null; i++) {\n acc = fn(acc, walker.value, i)\n walker = walker.next\n }\n\n return acc\n}\n\nYallist.prototype.reduceReverse = function (fn, initial) {\n var acc\n var walker = this.tail\n if (arguments.length > 1) {\n acc = initial\n } else if (this.tail) {\n walker = this.tail.prev\n acc = this.tail.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = this.length - 1; walker !== null; i--) {\n acc = fn(acc, walker.value, i)\n walker = walker.prev\n }\n\n return acc\n}\n\nYallist.prototype.toArray = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.head; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.next\n }\n return arr\n}\n\nYallist.prototype.toArrayReverse = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.tail; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.prev\n }\n return arr\n}\n\nYallist.prototype.slice = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\n walker = walker.next\n }\n for (; walker !== null && i < to; i++, walker = walker.next) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.sliceReverse = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\n walker = walker.prev\n }\n for (; walker !== null && i > from; i--, walker = walker.prev) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.splice = function (start, deleteCount, ...nodes) {\n if (start > this.length) {\n start = this.length - 1\n }\n if (start < 0) {\n start = this.length + start;\n }\n\n for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\n walker = walker.next\n }\n\n var ret = []\n for (var i = 0; walker && i < deleteCount; i++) {\n ret.push(walker.value)\n walker = this.removeNode(walker)\n }\n if (walker === null) {\n walker = this.tail\n }\n\n if (walker !== this.head && walker !== this.tail) {\n walker = walker.prev\n }\n\n for (var i = 0; i < nodes.length; i++) {\n walker = insert(this, walker, nodes[i])\n }\n return ret;\n}\n\nYallist.prototype.reverse = function () {\n var head = this.head\n var tail = this.tail\n for (var walker = head; walker !== null; walker = walker.prev) {\n var p = walker.prev\n walker.prev = walker.next\n walker.next = p\n }\n this.head = tail\n this.tail = head\n return this\n}\n\nfunction insert (self, node, value) {\n var inserted = node === self.head ?\n new Node(value, null, node, self) :\n new Node(value, node, node.next, self)\n\n if (inserted.next === null) {\n self.tail = inserted\n }\n if (inserted.prev === null) {\n self.head = inserted\n }\n\n self.length++\n\n return inserted\n}\n\nfunction push (self, item) {\n self.tail = new Node(item, self.tail, null, self)\n if (!self.head) {\n self.head = self.tail\n }\n self.length++\n}\n\nfunction unshift (self, item) {\n self.head = new Node(item, null, self.head, self)\n if (!self.tail) {\n self.tail = self.head\n }\n self.length++\n}\n\nfunction Node (value, prev, next, list) {\n if (!(this instanceof Node)) {\n return new Node(value, prev, next, list)\n }\n\n this.list = list\n this.value = value\n\n if (prev) {\n prev.next = this\n this.prev = prev\n } else {\n this.prev = null\n }\n\n if (next) {\n next.prev = this\n this.next = next\n } else {\n this.next = null\n }\n}\n\ntry {\n // add if support for Symbol.iterator is present\n require('./iterator.js')(Yallist)\n} catch (er) {}\n", "'use strict'\n\n// A linked list to keep track of recently-used-ness\nconst Yallist = require('yallist')\n\nconst MAX = Symbol('max')\nconst LENGTH = Symbol('length')\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\nconst ALLOW_STALE = Symbol('allowStale')\nconst MAX_AGE = Symbol('maxAge')\nconst DISPOSE = Symbol('dispose')\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\nconst LRU_LIST = Symbol('lruList')\nconst CACHE = Symbol('cache')\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\n\nconst naiveLength = () => 1\n\n// lruList is a yallist where the head is the youngest\n// item, and the tail is the oldest. the list contains the Hit\n// objects as the entries.\n// Each Hit object has a reference to its Yallist.Node. This\n// never changes.\n//\n// cache is a Map (or PseudoMap) that matches the keys to\n// the Yallist.Node object.\nclass LRUCache {\n constructor (options) {\n if (typeof options === 'number')\n options = { max: options }\n\n if (!options)\n options = {}\n\n if (options.max && (typeof options.max !== 'number' || options.max < 0))\n throw new TypeError('max must be a non-negative number')\n // Kind of weird to have a default max of Infinity, but oh well.\n const max = this[MAX] = options.max || Infinity\n\n const lc = options.length || naiveLength\n this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\n this[ALLOW_STALE] = options.stale || false\n if (options.maxAge && typeof options.maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n this[MAX_AGE] = options.maxAge || 0\n this[DISPOSE] = options.dispose\n this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\n this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\n this.reset()\n }\n\n // resize the cache when the max changes.\n set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }\n get max () {\n return this[MAX]\n }\n\n set allowStale (allowStale) {\n this[ALLOW_STALE] = !!allowStale\n }\n get allowStale () {\n return this[ALLOW_STALE]\n }\n\n set maxAge (mA) {\n if (typeof mA !== 'number')\n throw new TypeError('maxAge must be a non-negative number')\n\n this[MAX_AGE] = mA\n trim(this)\n }\n get maxAge () {\n return this[MAX_AGE]\n }\n\n // resize the cache when the lengthCalculator changes.\n set lengthCalculator (lC) {\n if (typeof lC !== 'function')\n lC = naiveLength\n\n if (lC !== this[LENGTH_CALCULATOR]) {\n this[LENGTH_CALCULATOR] = lC\n this[LENGTH] = 0\n this[LRU_LIST].forEach(hit => {\n hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\n this[LENGTH] += hit.length\n })\n }\n trim(this)\n }\n get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n get length () { return this[LENGTH] }\n get itemCount () { return this[LRU_LIST].length }\n\n rforEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].tail; walker !== null;) {\n const prev = walker.prev\n forEachStep(this, fn, walker, thisp)\n walker = prev\n }\n }\n\n forEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].head; walker !== null;) {\n const next = walker.next\n forEachStep(this, fn, walker, thisp)\n walker = next\n }\n }\n\n keys () {\n return this[LRU_LIST].toArray().map(k => k.key)\n }\n\n values () {\n return this[LRU_LIST].toArray().map(k => k.value)\n }\n\n reset () {\n if (this[DISPOSE] &&\n this[LRU_LIST] &&\n this[LRU_LIST].length) {\n this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\n }\n\n this[CACHE] = new Map() // hash of items by key\n this[LRU_LIST] = new Yallist() // list of items in order of use recency\n this[LENGTH] = 0 // length of items in the list\n }\n\n dump () {\n return this[LRU_LIST].map(hit =>\n isStale(this, hit) ? false : {\n k: hit.key,\n v: hit.value,\n e: hit.now + (hit.maxAge || 0)\n }).toArray().filter(h => h)\n }\n\n dumpLru () {\n return this[LRU_LIST]\n }\n\n set (key, value, maxAge) {\n maxAge = maxAge || this[MAX_AGE]\n\n if (maxAge && typeof maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n\n const now = maxAge ? Date.now() : 0\n const len = this[LENGTH_CALCULATOR](value, key)\n\n if (this[CACHE].has(key)) {\n if (len > this[MAX]) {\n del(this, this[CACHE].get(key))\n return false\n }\n\n const node = this[CACHE].get(key)\n const item = node.value\n\n // dispose of the old one before overwriting\n // split out into 2 ifs for better coverage tracking\n if (this[DISPOSE]) {\n if (!this[NO_DISPOSE_ON_SET])\n this[DISPOSE](key, item.value)\n }\n\n item.now = now\n item.maxAge = maxAge\n item.value = value\n this[LENGTH] += len - item.length\n item.length = len\n this.get(key)\n trim(this)\n return true\n }\n\n const hit = new Entry(key, value, len, now, maxAge)\n\n // oversized objects fall out of cache automatically.\n if (hit.length > this[MAX]) {\n if (this[DISPOSE])\n this[DISPOSE](key, value)\n\n return false\n }\n\n this[LENGTH] += hit.length\n this[LRU_LIST].unshift(hit)\n this[CACHE].set(key, this[LRU_LIST].head)\n trim(this)\n return true\n }\n\n has (key) {\n if (!this[CACHE].has(key)) return false\n const hit = this[CACHE].get(key).value\n return !isStale(this, hit)\n }\n\n get (key) {\n return get(this, key, true)\n }\n\n peek (key) {\n return get(this, key, false)\n }\n\n pop () {\n const node = this[LRU_LIST].tail\n if (!node)\n return null\n\n del(this, node)\n return node.value\n }\n\n del (key) {\n del(this, this[CACHE].get(key))\n }\n\n load (arr) {\n // reset the cache\n this.reset()\n\n const now = Date.now()\n // A previous serialized cache has the most recent items first\n for (let l = arr.length - 1; l >= 0; l--) {\n const hit = arr[l]\n const expiresAt = hit.e || 0\n if (expiresAt === 0)\n // the item was created without expiration in a non aged cache\n this.set(hit.k, hit.v)\n else {\n const maxAge = expiresAt - now\n // dont add already expired items\n if (maxAge > 0) {\n this.set(hit.k, hit.v, maxAge)\n }\n }\n }\n }\n\n prune () {\n this[CACHE].forEach((value, key) => get(this, key, false))\n }\n}\n\nconst get = (self, key, doUse) => {\n const node = self[CACHE].get(key)\n if (node) {\n const hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n return undefined\n } else {\n if (doUse) {\n if (self[UPDATE_AGE_ON_GET])\n node.value.now = Date.now()\n self[LRU_LIST].unshiftNode(node)\n }\n }\n return hit.value\n }\n}\n\nconst isStale = (self, hit) => {\n if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n return false\n\n const diff = Date.now() - hit.now\n return hit.maxAge ? diff > hit.maxAge\n : self[MAX_AGE] && (diff > self[MAX_AGE])\n}\n\nconst trim = self => {\n if (self[LENGTH] > self[MAX]) {\n for (let walker = self[LRU_LIST].tail;\n self[LENGTH] > self[MAX] && walker !== null;) {\n // We know that we're about to delete this one, and also\n // what the next least recently used key will be, so just\n // go ahead and set it now.\n const prev = walker.prev\n del(self, walker)\n walker = prev\n }\n }\n}\n\nconst del = (self, node) => {\n if (node) {\n const hit = node.value\n if (self[DISPOSE])\n self[DISPOSE](hit.key, hit.value)\n\n self[LENGTH] -= hit.length\n self[CACHE].delete(hit.key)\n self[LRU_LIST].removeNode(node)\n }\n}\n\nclass Entry {\n constructor (key, value, length, now, maxAge) {\n this.key = key\n this.value = value\n this.length = length\n this.now = now\n this.maxAge = maxAge || 0\n }\n}\n\nconst forEachStep = (self, fn, node, thisp) => {\n let hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n hit = undefined\n }\n if (hit)\n fn.call(thisp, hit.value, hit.key, self)\n}\n\nmodule.exports = LRUCache\n", "// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.format()\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First, split based on boolean or ||\n this.raw = range\n this.set = range\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${range}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.format()\n }\n\n format () {\n this.range = this.set\n .map((comps) => {\n return comps.join(' ').trim()\n })\n .join('||')\n .trim()\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n range = range.trim()\n\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('lru-cache')\nconst cache = new LRU({ max: 1000 })\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) =>\n comp.trim().split(/\\s+/).map((c) => {\n return replaceTilde(c, options)\n }).join(' ')\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) =>\n comp.trim().split(/\\s+/).map((c) => {\n return replaceCaret(c, options)\n }).join(' ')\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map((c) => {\n return replaceXRange(c, options)\n }).join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp.trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return (`${from} ${to}`).trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n", "const ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n", "const Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n", "const Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n", "const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n", "const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n", "const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n", "const Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n", "const SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n", "// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n", "const outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n", "const Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n", "// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n", "const Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n", "// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n", null, null, null, null, null, null, null, null, null, "import {\n debug,\n getInput,\n setFailed,\n setOutput as setOutputActionsCore,\n} from \"@actions/core\";\nimport { npmPublish } from \"../npm-publish\";\nimport { Access, Options } from \"../options\";\n\n/**\n * The main entry point of the GitHub Action\n *\n * @internal\n */\nasync function main(): Promise {\n try {\n // Setup global error handlers\n process.on(\"uncaughtException\", errorHandler);\n process.on(\"unhandledRejection\", errorHandler);\n\n // Get the GitHub Actions input options\n const options: Options = {\n token: getInput(\"token\", { required: true }),\n registry: getInput(\"registry\", { required: true }),\n package: getInput(\"package\", { required: true }),\n checkVersion:\n getInput(\"check-version\", { required: true }).toLowerCase() === \"true\",\n tag: getInput(\"tag\"),\n access: getInput(\"access\") as Access,\n dryRun: getInput(\"dry-run\").toLowerCase() === \"true\",\n greaterVersionOnly:\n getInput(\"greater-version-only\").toLowerCase() === \"true\",\n debug: debugHandler,\n };\n\n // Publish to NPM\n let results = await npmPublish(options);\n\n if (results.type === \"none\") {\n console.log(\n `\\n\uD83D\uDCE6 ${results.package} v${results.version} is already published to ${options.registry}`\n );\n }\n if (results.type === \"lower\") {\n console.log(\n `\\n\uD83D\uDCE6 ${results.package} v${results.version} is lower than the version published to ${options.registry}`\n );\n } else if (results.dryRun) {\n console.log(\n `\\n\uD83D\uDCE6 ${results.package} v${results.version} was NOT actually published to ${options.registry} (dry run)`\n );\n } else {\n console.log(\n `\\n\uD83D\uDCE6 Successfully published ${results.package} v${results.version} to ${options.registry}`\n );\n }\n\n // Set the GitHub Actions output variables\n setOutput(\"type\", results.type);\n setOutput(\"version\", results.version);\n setOutput(\"old-version\", results.oldVersion);\n setOutput(\"tag\", results.tag);\n setOutput(\"access\", results.access);\n setOutput(\"dry-run\", results.dryRun);\n } catch (error) {\n errorHandler(error as Error);\n }\n}\n\n/**\n * Set output with logging to stdout for test support\n */\nfunction setOutput(...args: Parameters) {\n if (process.env.NODE_ENV === \"test\") {\n console.log(`TEST::set-output name=${args[0]}::${args[1]}`);\n return;\n }\n return setOutputActionsCore(...args);\n}\n\n/**\n * Prints errors to the GitHub Actions console\n */\nfunction errorHandler(error: Error): void {\n let message = error.stack || error.message || String(error);\n setFailed(message);\n process.exit();\n}\n\n/**\n * Prints debug logs to the GitHub Actions console\n */\nfunction debugHandler(message: string, data?: object) {\n if (data) {\n message += \"\\n\" + JSON.stringify(data, undefined, 2);\n }\n\n debug(message);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-floating-promises\nmain();\n", "import * as semver from \"semver\";\nimport { normalizeOptions } from \"./normalize-options\";\nimport { getVersions, publish } from \"./npm\";\nimport { Options } from \"./options\";\nimport { readManifest } from \"./read-manifest\";\nimport { Results } from \"./results\";\n\n/**\n * Publishes a package to NPM, if its version has changed\n */\nexport async function npmPublish(opts: Options = {}): Promise {\n const { registry, token, ...options } = normalizeOptions(opts);\n const authOptions = { registry, token };\n\n // Get the old and new version numbers\n const manifest = await readManifest(options.package, options.debug);\n const versions = await getVersions(manifest.name, authOptions);\n const publishedVersion = versions[\"dist-tags\"][options.tag] ?? \"0.0.0\";\n\n // Determine if/how the version has changed\n let diff = semver.diff(manifest.version, publishedVersion);\n\n // Compare both versions to see if it's changed\n let cmp = semver.compare(manifest.version, publishedVersion);\n\n let shouldPublish =\n // compare returns 1 if manifest is higher than published\n (options.greaterVersionOnly && cmp === 1) ||\n // compare returns 0 if the manifest is the same as published\n cmp !== 0;\n\n if (shouldPublish) {\n // Publish the new version to NPM\n await publish(options, authOptions);\n }\n\n let results: Results = {\n package: manifest.name,\n registry: authOptions.registry,\n // The version should be marked as lower if we disallow decrementing the version\n type:\n (options.greaterVersionOnly && cmp === -1 && \"lower\") || diff || \"none\",\n version: manifest.version.raw,\n oldVersion: publishedVersion,\n tag: options.tag,\n access:\n options.access ||\n (manifest.name.startsWith(\"@\") ? \"restricted\" : \"public\"),\n dryRun: options.dryRun ?? false,\n };\n\n options.debug?.(\"OUTPUT:\", results);\n return results;\n}\n", "import path from \"node:path\";\nimport { Access, Debug, Options } from \"./options\";\n\n/**\n * Normalized and sanitized options\n *\n * @internal\n */\nexport interface NormalizedOptions {\n token: string;\n registry: string;\n package?: string;\n tag: string;\n access?: Access;\n dryRun?: boolean;\n greaterVersionOnly?: boolean;\n quiet?: boolean;\n debug?: Debug;\n}\n\n/**\n * Normalizes and sanitizes options, and fills-in any default values.\n *\n * @internal\n */\nexport function normalizeOptions(options: Options): NormalizedOptions {\n return {\n ...options,\n token: options.token ?? \"\",\n registry: options.registry ?? \"https://registry.npmjs.org/\",\n tag: options.tag ?? \"latest\",\n package: options.package?.endsWith(\"package.json\")\n ? path.dirname(options.package)\n : options.package,\n };\n}\n", "import fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\nimport { type NpmCliEnv } from \"./call-npm-cli\";\n\nexport interface NpmAuthConfig {\n registry: string;\n token: string;\n}\n\nexport type NpmCliTask = (env: NpmCliEnv) => Promise;\n\n/**\n * Create a temporary .npmrc file with the given auth token,\n * and call a task with env vars set to use that .npmrc.\n *\n * @param auth Registry and token.\n * @param task A function called with the configured environment.\n * After the function resolves, the temporary .npmrc file will be removed.\n * @returns The resolved value of `task`\n */\nexport async function useNpmEnv(\n auth: NpmAuthConfig,\n task: NpmCliTask\n): Promise {\n const { registry, token } = auth;\n const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), \"npm-publish-\"));\n const tempConfigFile = path.join(tempDir, \".npmrc\");\n const registryUrl = new URL(registry);\n\n const config = [\n \"; added by jsdevtools/npm-publish\",\n `registry=${registry}`,\n `//${registryUrl.hostname}/:authToken=\\${NODE_AUTH_TOKEN}`,\n \"\",\n ].join(os.EOL);\n\n const env = {\n /* eslint-disable @typescript-eslint/naming-convention */\n NODE_AUTH_TOKEN: token,\n npm_config_userconfig: tempConfigFile,\n /* eslint-enable @typescript-eslint/naming-convention */\n };\n\n await fs.writeFile(tempConfigFile, config, \"utf8\");\n\n try {\n return await task(env);\n } finally {\n await fs.rm(tempDir, { force: true, recursive: true });\n }\n}\n", "import childProcess from \"node:child_process\";\n\nexport type NpmCliEnv = Record;\n\nexport interface NpmCliOptions {\n env?: Record;\n ifError?: Record;\n}\n\nconst execProcess = (\n command: string,\n env: Record = {}\n): Promise<{ stdout: string; error: Error | null }> => {\n // strip Node.js environment and runtime options out of the call to NPM\n const {\n NODE_ENV: _NODE_ENV,\n NODE_OPTIONS: _NODE_OPTIONS,\n ...processEnv\n } = process.env;\n\n return new Promise((resolve) => {\n childProcess.exec(\n command,\n { env: { ...processEnv, ...env } },\n (error, stdout) => resolve({ stdout: stdout.trim(), error })\n );\n });\n};\n\nconst parseJson = (value: string): TParsed | undefined => {\n try {\n return JSON.parse(value) as TParsed;\n } catch {\n return undefined;\n }\n};\n\n/**\n * Call the NPM CLI in JSON mode.\n *\n * @param command The command of the NPM CLI to call\n * @param args Any arguments to send to the command\n * @param options Customize environment variables or add an error handler.\n * @returns The parsed JSON, or stdout if unparsable.\n */\nexport async function callNpmCli(\n command: string,\n args: string[],\n options: NpmCliOptions = {}\n): Promise {\n const { stdout, error } = await execProcess(\n [\"npm\", command, \"--json\", ...args].join(\" \"),\n options?.env\n );\n\n if (error) {\n const errorPayload = parseJson<{ error: { code?: string | null } }>(stdout);\n const errorCode = errorPayload?.error?.code?.toLowerCase();\n\n if (\n typeof errorCode === \"string\" &&\n options.ifError &&\n errorCode in options.ifError\n ) {\n return options.ifError[errorCode] as TReturn;\n }\n\n throw error;\n }\n\n return parseJson(stdout) ?? (stdout as unknown as TReturn);\n}\n", "import type { PublishConfig } from \".\";\n\n/**\n * Given a publish configuration, get the NPM CLI publish arguments.\n *\n * @param config Publish configuration\n * @returns Arguments to pass to the NPM CLI\n */\nexport function getPublishArgs(config: PublishConfig): string[] {\n const { packageSpec, tag, access, dryRun } = config;\n const args: string[] = [];\n\n if (packageSpec !== undefined) {\n args.push(packageSpec);\n }\n\n if (tag !== undefined) {\n args.push(\"--tag\", tag);\n }\n\n if (access !== undefined) {\n args.push(\"--access\", access);\n }\n\n if (dryRun !== undefined) {\n args.push(\"--dry-run\", JSON.stringify(dryRun));\n }\n\n return args;\n}\n", "import { useNpmEnv, type NpmAuthConfig } from \"./use-npm-env\";\nimport { callNpmCli } from \"./call-npm-cli\";\nimport { getPublishArgs } from \"./get-publish-args\";\n\nexport interface VersionsResult {\n \"dist-tags\": Record;\n versions: string[];\n}\n\nexport interface PublishConfig {\n packageSpec?: string;\n tag?: string;\n access?: string;\n dryRun?: boolean;\n}\n\nexport interface PublishResult {\n id: string;\n name: string;\n version: string;\n}\n\n/**\n * Get a package's published versions.\n *\n * @param packageName The name of the package to get published versions for.\n * @param authConfig Registry and auth token.\n * @returns All published versions and tags.\n */\nexport async function getVersions(\n packageName: string,\n authConfig: NpmAuthConfig\n): Promise {\n return useNpmEnv(authConfig, (env) => {\n return callNpmCli(\n \"view\",\n [packageName, \"dist-tags\", \"versions\"],\n { env, ifError: { e404: { \"dist-tags\": {}, versions: [] } } }\n );\n });\n}\n\n/**\n * Publish a package.\n *\n * @param publishConfig Publish options.\n * @returns Release metadata.\n */\nexport async function publish(\n publishConfig: PublishConfig,\n authConfig: NpmAuthConfig\n): Promise {\n const publishArgs = getPublishArgs(publishConfig);\n\n return useNpmEnv(authConfig, (env) => {\n return callNpmCli(\"publish\", publishArgs, { env });\n });\n}\n", "import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { SemVer } from \"semver\";\nimport { ono } from \"@jsdevtools/ono\";\nimport { Debug } from \"./options\";\n\n/**\n * A package manifest (package.json)\n *\n * @internal\n */\nexport interface Manifest {\n name: string;\n version: SemVer;\n}\n\n/**\n * Reads the package manifest (package.json) and returns its parsed contents\n *\n * @internal\n */\nexport async function readManifest(\n packageSpec?: string,\n debug?: Debug\n): Promise {\n const packageManifest = path.join(packageSpec ?? \".\", \"package.json\");\n debug && debug(`Reading manifest from ${path.resolve(packageManifest)}`);\n let json: string;\n\n try {\n json = await fs.readFile(packageManifest, \"utf8\");\n } catch (error) {\n throw ono(error, `Unable to read ${packageManifest}`);\n }\n\n try {\n let { name, version } = JSON.parse(json) as Record;\n\n if (typeof name !== \"string\" || name.trim().length === 0) {\n throw new TypeError(\"Invalid package name\");\n }\n\n let manifest: Manifest = {\n name,\n version: new SemVer(version as string),\n };\n\n debug && debug(\"MANIFEST:\", manifest);\n return manifest;\n } catch (error) {\n throw ono(error, `Unable to parse ${packageManifest}`);\n }\n}\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,aAAgB,eAAe,OAAU;AACvC,UAAI,UAAU,QAAQ,UAAU,QAAW;AACzC,eAAO;iBACE,OAAO,UAAU,YAAY,iBAAiB,QAAQ;AAC/D,eAAO;;AAET,aAAO,KAAK,UAAU,KAAK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KAAK;", + "names": ["os", "crypto", "version", "URL", "crypto", "import_crypto", "crypto", "import_crypto", "fs", "os", "options", "debug", "socket", "require_tunnel", "module", "HttpCodes", "Headers", "MediaTypes", "path", "os", "path", "ExitCode", "getInput", "setOutput", "setFailed", "debug", "module", "module", "debug", "module", "debug", "module", "module", "module", "debug", "SemVer", "version", "module", "SemVer", "parse", "version", "module", "parse", "version", "module", "parse", "version", "module", "SemVer", "version", "module", "SemVer", "compare", "module", "compare", "module", "parse", "diff", "v1", "module", "SemVer", "module", "SemVer", "module", "SemVer", "module", "parse", "version", "module", "compare", "module", "compare", "module", "SemVer", "module", "module", "module", "compare", "module", "compare", "module", "compare", "module", "compare", "module", "compare", "module", "module", "SemVer", "parse", "version", "module", "module", "module", "diff", "module", "debug", "version", "SemVer", "module", "debug", "SemVer", "version", "module", "version", "module", "module", "SemVer", "module", "SemVer", "module", "SemVer", "require_valid", "module", "module", "SemVer", "version", "module", "version", "module", "version", "module", "module", "compare", "version", "module", "compare", "require_semver", "module", "SemVer", "parse", "diff", "compare", "normalizeOptions", "ono", "ono", "module", "path", "import_node_path", "fs", "path", "os", "childProcess", "import_promises", "import_node_path", "debug", "path", "fs", "version", "diff", "setOutputActionsCore"] } diff --git a/package-lock.json b/package-lock.json index d3b0fec..0af2722 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,6 @@ "version": "1.4.3", "license": "MIT", "dependencies": { - "@jsdevtools/ez-spawn": "^3.0.4", "@jsdevtools/ono": "^7.1.3", "@types/semver": "^7.3.13", "command-line-args": "^5.1.1", @@ -1116,6 +1115,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/@jsdevtools/ez-spawn/-/ez-spawn-3.0.4.tgz", "integrity": "sha512-f5DRIOZf7wxogefH03RjMPMdBF7ADTWUMoOs9kaJo06EfwF+aFhMZMDZxHg/Xe12hptN9xoZjGso2fdjapBRIA==", + "dev": true, "dependencies": { "call-me-maybe": "^1.0.1", "cross-spawn": "^7.0.3", @@ -1938,7 +1938,8 @@ "node_modules/call-me-maybe": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", + "dev": true }, "node_modules/callsites": { "version": "3.1.0", @@ -2274,6 +2275,7 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -4261,7 +4263,8 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true }, "node_modules/istanbul-lib-coverage": { "version": "3.2.0", @@ -5278,6 +5281,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, "engines": { "node": ">=8" } @@ -5891,6 +5895,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -5902,6 +5907,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, "engines": { "node": ">=8" } @@ -6081,6 +6087,7 @@ "version": "0.3.1", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", + "dev": true, "engines": { "node": ">=0.6.19" } @@ -6460,6 +6467,7 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, "engines": { "node": ">=4" } @@ -6746,6 +6754,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, "dependencies": { "isexe": "^2.0.0" }, @@ -7655,6 +7664,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/@jsdevtools/ez-spawn/-/ez-spawn-3.0.4.tgz", "integrity": "sha512-f5DRIOZf7wxogefH03RjMPMdBF7ADTWUMoOs9kaJo06EfwF+aFhMZMDZxHg/Xe12hptN9xoZjGso2fdjapBRIA==", + "dev": true, "requires": { "call-me-maybe": "^1.0.1", "cross-spawn": "^7.0.3", @@ -8239,7 +8249,8 @@ "call-me-maybe": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", + "dev": true }, "callsites": { "version": "3.1.0", @@ -8488,6 +8499,7 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -9908,7 +9920,8 @@ "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true }, "istanbul-lib-coverage": { "version": "3.2.0", @@ -10691,7 +10704,8 @@ "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true }, "path-parse": { "version": "1.0.7", @@ -11115,6 +11129,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, "requires": { "shebang-regex": "^3.0.0" } @@ -11122,7 +11137,8 @@ "shebang-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true }, "shell-quote": { "version": "1.8.1", @@ -11265,7 +11281,8 @@ "string-argv": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", - "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==" + "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", + "dev": true }, "string-width": { "version": "4.2.3", @@ -11545,7 +11562,8 @@ "type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true }, "type-fest": { "version": "3.8.0", @@ -11706,6 +11724,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, "requires": { "isexe": "^2.0.0" } diff --git a/package.json b/package.json index f6ecb00..e1cc784 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,6 @@ "vitest": "^0.30.0" }, "dependencies": { - "@jsdevtools/ez-spawn": "^3.0.4", "@jsdevtools/ono": "^7.1.3", "@types/semver": "^7.3.13", "command-line-args": "^5.1.1", diff --git a/src/normalize-options.ts b/src/normalize-options.ts index 6f8196a..6b62aa6 100644 --- a/src/normalize-options.ts +++ b/src/normalize-options.ts @@ -1,4 +1,4 @@ -import { URL } from "url"; +import path from "node:path"; import { Access, Debug, Options } from "./options"; /** @@ -8,15 +8,14 @@ import { Access, Debug, Options } from "./options"; */ export interface NormalizedOptions { token: string; - registry: URL; - package: string; + registry: string; + package?: string; tag: string; access?: Access; - dryRun: boolean; - checkVersion: boolean; - greaterVersionOnly: boolean; - quiet: boolean; - debug: Debug; + dryRun?: boolean; + greaterVersionOnly?: boolean; + quiet?: boolean; + debug?: Debug; } /** @@ -25,25 +24,13 @@ export interface NormalizedOptions { * @internal */ export function normalizeOptions(options: Options): NormalizedOptions { - let registryURL = - typeof options.registry === "string" - ? new URL(options.registry) - : options.registry; - return { - token: options.token || "", - registry: registryURL || new URL("https://registry.npmjs.org/"), - package: options.package || "package.json", - tag: options.tag || "latest", - access: options.access, - dryRun: options.dryRun || false, - checkVersion: - options.checkVersion === undefined ? true : Boolean(options.checkVersion), - greaterVersionOnly: - options.greaterVersionOnly === undefined - ? false - : Boolean(options.greaterVersionOnly), - quiet: options.quiet || false, - debug: options.debug || (() => undefined), + ...options, + token: options.token ?? "", + registry: options.registry ?? "https://registry.npmjs.org/", + tag: options.tag ?? "latest", + package: options.package?.endsWith("package.json") + ? path.dirname(options.package) + : options.package, }; } diff --git a/src/npm-config.ts b/src/npm-config.ts deleted file mode 100644 index 1df93c9..0000000 --- a/src/npm-config.ts +++ /dev/null @@ -1,111 +0,0 @@ -import * as ezSpawn from "@jsdevtools/ez-spawn"; -import { ono } from "@jsdevtools/ono"; -import { promises as fs } from "fs"; -import { EOL } from "os"; -import { dirname } from "path"; -import { NormalizedOptions } from "./normalize-options"; -import { getNpmEnvironment } from "./npm-env"; - -/** - * Sets/updates the NPM config based on the options. - * - * @internal - */ -export async function setNpmConfig(options: NormalizedOptions): Promise { - // Read the current NPM config - let configPath = await getNpmConfigPath(options); - let config = await readNpmConfig(configPath, options); - - // Update the config - config = updateConfig(config, options); - - // Save the new config - await writeNpmConfig(configPath, config, options); -} - -/** - * Updates the given NPM config with the specified options. - */ -function updateConfig( - config: string, - { registry, debug }: NormalizedOptions -): string { - let authDomain = registry.origin.slice(registry.protocol.length); - - let lines = config.split(/\r?\n/); - - // Remove any existing lines that set the registry or token - lines = lines.filter( - (line) => !(line.startsWith("registry=") || line.includes("_authToken=")) - ); - - // Append the new registry and token to the end of the file - lines.push(`${authDomain}/:_authToken=\${INPUT_TOKEN}`); - lines.push(`registry=${registry.href}`); - - config = lines.join(EOL).trim() + EOL; - - debug(`NEW NPM CONFIG: \n${config}`); - return config; -} - -/** - * Gets the path of the NPM config file. - */ -async function getNpmConfigPath(options: NormalizedOptions): Promise { - try { - // Get the environment variables to pass to NPM - let env = getNpmEnvironment(options); - - options.debug("Running command: npm config get userconfig"); - - let process = await ezSpawn.async("npm", "config", "get", "userconfig", { - env, - }); - return process.stdout.trim(); - } catch (error) { - throw ono(error, "Unable to determine the NPM config file path."); - } -} - -/** - * Reads the NPM config file. - */ -async function readNpmConfig( - configPath: string, - { debug }: NormalizedOptions -): Promise { - try { - debug(`Reading NPM config from ${configPath}`); - - let config = await fs.readFile(configPath, "utf-8"); - - debug(`OLD NPM CONFIG: \n${config}`); - return config; - } catch (error) { - if ((error as NodeJS.ErrnoException).code === "ENOENT") { - debug("OLD NPM CONFIG: "); - return ""; - } - - throw ono(error, `Unable to read the NPM config file: ${configPath}`); - } -} - -/** - * Writes the NPM config file. - */ -async function writeNpmConfig( - configPath: string, - config: string, - { debug }: NormalizedOptions -): Promise { - try { - debug(`Writing new NPM config to ${configPath}`); - - await fs.mkdir(dirname(configPath), { recursive: true }); - await fs.writeFile(configPath, config); - } catch (error) { - throw ono(error, `Unable to update the NPM config file: ${configPath}`); - } -} diff --git a/src/npm-env.ts b/src/npm-env.ts deleted file mode 100644 index b12ee02..0000000 --- a/src/npm-env.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { NormalizedOptions } from "./normalize-options"; - -/** - * Returns the environment variables that should be passed to NPM, based on the given options. - */ -export function getNpmEnvironment( - options: NormalizedOptions -): NodeJS.ProcessEnv { - /* eslint-disable @typescript-eslint/naming-convention */ - let env: NodeJS.ProcessEnv = { - // Copy all the host's environment variables - ...process.env, - - // Don't pass Node.js runtime variables to NPM - NODE_ENV: "", - NODE_OPTIONS: "", - }; - - // Determine if we need to set the NPM token - let needsToken = Boolean( - options.token && process.env.INPUT_TOKEN !== options.token - ); - - if (needsToken) { - env.INPUT_TOKEN = options.token; - } - - return env; -} diff --git a/src/npm-publish.ts b/src/npm-publish.ts index 23d2e74..eb3780d 100644 --- a/src/npm-publish.ts +++ b/src/npm-publish.ts @@ -1,6 +1,6 @@ import * as semver from "semver"; import { normalizeOptions } from "./normalize-options"; -import { npm } from "./npm"; +import { getVersions, publish } from "./npm"; import { Options } from "./options"; import { readManifest } from "./read-manifest"; import { Results } from "./results"; @@ -9,11 +9,13 @@ import { Results } from "./results"; * Publishes a package to NPM, if its version has changed */ export async function npmPublish(opts: Options = {}): Promise { - let options = normalizeOptions(opts); + const { registry, token, ...options } = normalizeOptions(opts); + const authOptions = { registry, token }; // Get the old and new version numbers - let manifest = await readManifest(options.package, options.debug); - let publishedVersion = await npm.getLatestVersion(manifest.name, options); + const manifest = await readManifest(options.package, options.debug); + const versions = await getVersions(manifest.name, authOptions); + const publishedVersion = versions["dist-tags"][options.tag] ?? "0.0.0"; // Determine if/how the version has changed let diff = semver.diff(manifest.version, publishedVersion); @@ -22,7 +24,6 @@ export async function npmPublish(opts: Options = {}): Promise { let cmp = semver.compare(manifest.version, publishedVersion); let shouldPublish = - !options.checkVersion || // compare returns 1 if manifest is higher than published (options.greaterVersionOnly && cmp === 1) || // compare returns 0 if the manifest is the same as published @@ -30,24 +31,24 @@ export async function npmPublish(opts: Options = {}): Promise { if (shouldPublish) { // Publish the new version to NPM - await npm.publish(manifest, options); + await publish(options, authOptions); } let results: Results = { package: manifest.name, - registry: options.registry, + registry: authOptions.registry, // The version should be marked as lower if we disallow decrementing the version type: (options.greaterVersionOnly && cmp === -1 && "lower") || diff || "none", version: manifest.version.raw, - oldVersion: publishedVersion.raw, + oldVersion: publishedVersion, tag: options.tag, access: options.access || (manifest.name.startsWith("@") ? "restricted" : "public"), - dryRun: options.dryRun, + dryRun: options.dryRun ?? false, }; - options.debug("OUTPUT:", results); + options.debug?.("OUTPUT:", results); return results; } diff --git a/src/npm.ts b/src/npm.ts deleted file mode 100644 index f40ea95..0000000 --- a/src/npm.ts +++ /dev/null @@ -1,132 +0,0 @@ -import * as ezSpawn from "@jsdevtools/ez-spawn"; -import { ono } from "@jsdevtools/ono"; -import { StdioOptions } from "child_process"; -import { dirname, resolve } from "path"; -import { SemVer } from "semver"; -import { NormalizedOptions } from "./normalize-options"; -import { setNpmConfig } from "./npm-config"; -import { getNpmEnvironment } from "./npm-env"; -import { Manifest } from "./read-manifest"; - -/** - * Runs NPM commands. - * - * @internal - */ -export const npm = { - /** - * Gets the latest published version of the specified package. - */ - async getLatestVersion( - name: string, - options: NormalizedOptions - ): Promise { - // Update the NPM config with the specified registry and token - await setNpmConfig(options); - - try { - let command = ["npm", "view"]; - - if (options.tag === "latest") { - command.push(name); - } else { - command.push(`${name}@${options.tag}`); - } - - command.push("version"); - - // Get the environment variables to pass to NPM - let env = getNpmEnvironment(options); - - // Run NPM to get the latest published version of the package - options.debug(`Running command: npm view ${name} version`, { - command, - env, - }); - let result; - - try { - result = await ezSpawn.async(command, { env }); - } catch (err) { - // In case ezSpawn.async throws, it still has stdout and stderr properties. - result = err as ezSpawn.ProcessError; - } - - let version = result.stdout.trim(); - let error = result.stderr.trim(); - let status = result.status || 0; - - // If the package was not previously published, return version 0.0.0. - if ((status === 0 && !version) || error.includes("E404")) { - options.debug( - `The latest version of ${name} is at v0.0.0, as it was never published.` - ); - return new SemVer("0.0.0"); - } else if (result instanceof Error) { - // NPM failed for some reason - throw result; - } - - // Parse/validate the version number - let semver = new SemVer(version); - - options.debug(`The latest version of ${name} is at v${semver}`); - return semver; - } catch (error) { - throw ono( - error, - `Unable to determine the current version of ${name} on NPM.` - ); - } - }, - - /** - * Publishes the specified package to NPM - */ - async publish( - { name, version }: Manifest, - options: NormalizedOptions - ): Promise { - // Update the NPM config with the specified registry and token - await setNpmConfig(options); - - try { - let command = ["npm", "publish"]; - - if (options.tag !== "latest") { - command.push("--tag", options.tag); - } - - if (options.access) { - command.push("--access", options.access); - } - - if (options.dryRun) { - command.push("--dry-run"); - } - - // Run "npm publish" in the package.json directory - let cwd = resolve(dirname(options.package)); - - // Determine whether to suppress NPM's output - let stdio: StdioOptions = options.quiet ? "pipe" : "inherit"; - - // Get the environment variables to pass to NPM - let env = getNpmEnvironment(options); - - // Run NPM to publish the package - options.debug("Running command: npm publish", { - command, - stdio, - cwd, - env, - }); - await ezSpawn.async(command, { cwd, stdio, env }); - } catch (error) { - throw ono( - error, - `Unable to publish ${name} v${version} to ${options.registry}.` - ); - } - }, -}; diff --git a/src/npm2/__tests__/call-npm-cli.test.ts b/src/npm/__tests__/call-npm-cli.test.ts similarity index 100% rename from src/npm2/__tests__/call-npm-cli.test.ts rename to src/npm/__tests__/call-npm-cli.test.ts diff --git a/src/npm/__tests__/get-publish-args.test.ts b/src/npm/__tests__/get-publish-args.test.ts new file mode 100644 index 0000000..06d89d1 --- /dev/null +++ b/src/npm/__tests__/get-publish-args.test.ts @@ -0,0 +1,44 @@ +import { describe, it, expect } from "vitest"; + +import * as subject from "../get-publish-args"; + +describe("getPublishArgs", () => { + it("should return no args if no config", () => { + const result = subject.getPublishArgs({}); + + expect(result).toEqual([]); + }); + + it("should add the package spec positional argument", () => { + const result = subject.getPublishArgs({ packageSpec: "./cool-package" }); + + expect(result).toEqual(["./cool-package"]); + }); + + it("should add a tag flag", () => { + const result = subject.getPublishArgs({ + packageSpec: "./cool-package", + tag: "next", + }); + + expect(result).toEqual(["./cool-package", "--tag", "next"]); + }); + + it("should add a access flag", () => { + const result = subject.getPublishArgs({ + packageSpec: "./cool-package", + access: "restricted", + }); + + expect(result).toEqual(["./cool-package", "--access", "restricted"]); + }); + + it("should add a dry run flag", () => { + const result = subject.getPublishArgs({ + packageSpec: "./cool-package", + dryRun: false, + }); + + expect(result).toEqual(["./cool-package", "--dry-run", "false"]); + }); +}); diff --git a/src/npm2/__tests__/npm.test.ts b/src/npm/__tests__/npm.test.ts similarity index 71% rename from src/npm2/__tests__/npm.test.ts rename to src/npm/__tests__/npm.test.ts index 76d4997..4dc9475 100644 --- a/src/npm2/__tests__/npm.test.ts +++ b/src/npm/__tests__/npm.test.ts @@ -5,9 +5,11 @@ import * as td from "testdouble"; import * as subject from ".."; import { useNpmEnv, type NpmCliTask } from "../use-npm-env"; import { callNpmCli } from "../call-npm-cli"; +import { getPublishArgs } from "../get-publish-args"; vi.mock("../use-npm-env", () => imitateEsm("../use-npm-env")); vi.mock("../call-npm-cli", () => imitateEsm("../call-npm-cli")); +vi.mock("../get-publish-args", () => imitateEsm("../get-publish-args")); describe("npm", () => { const authConfig = { registry: "https://example.com", token: "abc123" }; @@ -47,16 +49,30 @@ describe("npm", () => { }); it("should publish a package", async () => { + const publishConfig = { packageSpec: "./cool-package" }; + + td.when(getPublishArgs(publishConfig)).thenReturn([ + "--registry", + "cool-registry", + ]); td.when( - callNpmCli( - "view", - ["@example/cool-package", "dist-tags", "versions"], - { env: cliEnv, ifError: { e404: { "dist-tags": {}, versions: [] } } } + callNpmCli( + "publish", + ["--registry", "cool-registry"], + { env: cliEnv } ) ).thenResolve({ id: "@example/cool-package@1.2.3", name: "@example/cool-package", version: "1.2.3", }); + + const result = await subject.publish(publishConfig, authConfig); + + expect(result).toEqual({ + id: "@example/cool-package@1.2.3", + name: "@example/cool-package", + version: "1.2.3", + }); }); }); diff --git a/src/npm2/call-npm-cli.ts b/src/npm/call-npm-cli.ts similarity index 93% rename from src/npm2/call-npm-cli.ts rename to src/npm/call-npm-cli.ts index a56e029..223c2a7 100644 --- a/src/npm2/call-npm-cli.ts +++ b/src/npm/call-npm-cli.ts @@ -62,11 +62,11 @@ export async function callNpmCli( options.ifError && errorCode in options.ifError ) { - return options.ifError[errorCode]; + return options.ifError[errorCode] as TReturn; } throw error; } - return parseJson(stdout) ?? (stdout as TReturn); + return parseJson(stdout) ?? (stdout as unknown as TReturn); } diff --git a/src/npm/get-publish-args.ts b/src/npm/get-publish-args.ts new file mode 100644 index 0000000..432b677 --- /dev/null +++ b/src/npm/get-publish-args.ts @@ -0,0 +1,30 @@ +import type { PublishConfig } from "."; + +/** + * Given a publish configuration, get the NPM CLI publish arguments. + * + * @param config Publish configuration + * @returns Arguments to pass to the NPM CLI + */ +export function getPublishArgs(config: PublishConfig): string[] { + const { packageSpec, tag, access, dryRun } = config; + const args: string[] = []; + + if (packageSpec !== undefined) { + args.push(packageSpec); + } + + if (tag !== undefined) { + args.push("--tag", tag); + } + + if (access !== undefined) { + args.push("--access", access); + } + + if (dryRun !== undefined) { + args.push("--dry-run", JSON.stringify(dryRun)); + } + + return args; +} diff --git a/src/npm2/index.ts b/src/npm/index.ts similarity index 76% rename from src/npm2/index.ts rename to src/npm/index.ts index 062f186..cf043e2 100644 --- a/src/npm2/index.ts +++ b/src/npm/index.ts @@ -1,17 +1,12 @@ import { useNpmEnv, type NpmAuthConfig } from "./use-npm-env"; -import { callNpmCli, type NpmCliEnv } from "./call-npm-cli"; +import { callNpmCli } from "./call-npm-cli"; +import { getPublishArgs } from "./get-publish-args"; export interface VersionsResult { "dist-tags": Record; versions: string[]; } -export interface PublishResult { - id: string; - name: string; - version: string; -} - export interface PublishConfig { packageSpec?: string; tag?: string; @@ -19,6 +14,12 @@ export interface PublishConfig { dryRun?: boolean; } +export interface PublishResult { + id: string; + name: string; + version: string; +} + /** * Get a package's published versions. * @@ -39,11 +40,19 @@ export async function getVersions( }); } +/** + * Publish a package. + * + * @param publishConfig Publish options. + * @returns Release metadata. + */ export async function publish( publishConfig: PublishConfig, authConfig: NpmAuthConfig ): Promise { + const publishArgs = getPublishArgs(publishConfig); + return useNpmEnv(authConfig, (env) => { - return callNpmCli("publish", []); + return callNpmCli("publish", publishArgs, { env }); }); } diff --git a/src/npm2/use-npm-env.ts b/src/npm/use-npm-env.ts similarity index 50% rename from src/npm2/use-npm-env.ts rename to src/npm/use-npm-env.ts index 88588ad..b1db434 100644 --- a/src/npm2/use-npm-env.ts +++ b/src/npm/use-npm-env.ts @@ -2,7 +2,7 @@ import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; -import { callNpmCli, type NpmCliEnv } from "./call-npm-cli"; +import { type NpmCliEnv } from "./call-npm-cli"; export interface NpmAuthConfig { registry: string; @@ -12,53 +12,41 @@ export interface NpmAuthConfig { export type NpmCliTask = (env: NpmCliEnv) => Promise; /** - * Create a temporary .npmrc file with the given auth token. - * Copies the existing user config. + * Create a temporary .npmrc file with the given auth token, + * and call a task with env vars set to use that .npmrc. * * @param auth Registry and token. * @param task A function called with the configured environment. * After the function resolves, the temporary .npmrc file will be removed. + * @returns The resolved value of `task` */ export async function useNpmEnv( auth: NpmAuthConfig, task: NpmCliTask ): Promise { + const { registry, token } = auth; const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "npm-publish-")); const tempConfigFile = path.join(tempDir, ".npmrc"); - const existingConfigFile = await callNpmCli("config", [ - "get", - "userconfig", - ]); - let config = ""; - - try { - config = await fs.readFile(existingConfigFile, "utf8"); - } catch (error: unknown) { - if ( - !(error instanceof Error) || - (error as NodeJS.ErrnoException).code !== "ENOENT" - ) { - throw error; - } - } - - const { registry, token } = auth; const registryUrl = new URL(registry); - config += ` - ; added by jsdevtools/npm-publish - //${registryUrl.hostname}/:authToken=\${NODE_AUTH_TOKEN} - `; + const config = [ + "; added by jsdevtools/npm-publish", + `registry=${registry}`, + `//${registryUrl.hostname}/:authToken=\${NODE_AUTH_TOKEN}`, + "", + ].join(os.EOL); + + const env = { + /* eslint-disable @typescript-eslint/naming-convention */ + NODE_AUTH_TOKEN: token, + npm_config_userconfig: tempConfigFile, + /* eslint-enable @typescript-eslint/naming-convention */ + }; await fs.writeFile(tempConfigFile, config, "utf8"); try { - return await task({ - /* eslint-disable @typescript-eslint/naming-convention */ - NODE_AUTH_TOKEN: token, - npm_config_userconfig: tempConfigFile, - /* eslint-enable @typescript-eslint/naming-convention */ - }); + return await task(env); } finally { await fs.rm(tempDir, { force: true, recursive: true }); } diff --git a/src/npm2/get-publish-args.ts b/src/npm2/get-publish-args.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/options.ts b/src/options.ts index 1ed4ad8..755c5e7 100644 --- a/src/options.ts +++ b/src/options.ts @@ -1,5 +1,3 @@ -import { URL } from "url"; - /** * Options that determine how/whether the package is published. */ @@ -14,7 +12,7 @@ export interface Options { * * Defaults to "https://registry.npmjs.org/" */ - registry?: string | URL; + registry?: string; /** * The absolute or relative path of your package.json file. diff --git a/src/read-manifest.ts b/src/read-manifest.ts index dce5024..33c5f01 100644 --- a/src/read-manifest.ts +++ b/src/read-manifest.ts @@ -1,7 +1,7 @@ -import { ono } from "@jsdevtools/ono"; -import { promises as fs } from "fs"; -import { resolve } from "path"; +import fs from "node:fs/promises"; +import path from "node:path"; import { SemVer } from "semver"; +import { ono } from "@jsdevtools/ono"; import { Debug } from "./options"; /** @@ -20,16 +20,17 @@ export interface Manifest { * @internal */ export async function readManifest( - path: string, + packageSpec?: string, debug?: Debug ): Promise { - debug && debug(`Reading package manifest from ${resolve(path)}`); + const packageManifest = path.join(packageSpec ?? ".", "package.json"); + debug && debug(`Reading manifest from ${path.resolve(packageManifest)}`); let json: string; try { - json = await fs.readFile(path, "utf-8"); + json = await fs.readFile(packageManifest, "utf8"); } catch (error) { - throw ono(error, `Unable to read ${path}`); + throw ono(error, `Unable to read ${packageManifest}`); } try { @@ -47,6 +48,6 @@ export async function readManifest( debug && debug("MANIFEST:", manifest); return manifest; } catch (error) { - throw ono(error, `Unable to parse ${path}`); + throw ono(error, `Unable to parse ${packageManifest}`); } } diff --git a/src/results.ts b/src/results.ts index 3808969..d2a788c 100644 --- a/src/results.ts +++ b/src/results.ts @@ -20,7 +20,7 @@ export interface Results { /** * The registry where the NPM package was published */ - registry: URL; + registry: string; /** * The version that was published From a4f2efde15fa29893f2ca9ca4fab873d965b6c1e Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Wed, 12 Apr 2023 19:17:38 -0400 Subject: [PATCH 05/36] wip: continuing along with tdd refactor --- action.yml | 23 +- dist/index.js | 2759 ++------------------ dist/index.js.map | 8 +- package-lock.json | 181 +- package.json | 3 +- src/__tests__/normalize-options.test.ts | 102 + src/__tests__/npm-publish.test.ts | 114 + src/__tests__/read-manifest.test.ts | 50 + src/action/index.ts | 74 +- src/cli/index.ts | 28 +- src/cli/parse-args.ts | 4 +- src/compare-versions.ts | 21 + src/errors.ts | 28 + src/index.ts | 11 +- src/normalize-options.ts | 114 +- src/npm-publish.ts | 67 +- src/npm/__tests__/call-npm-cli.test.ts | 2 +- src/npm/__tests__/get-publish-args.test.ts | 47 +- src/npm/__tests__/npm.test.ts | 31 +- src/npm/call-npm-cli.ts | 2 +- src/npm/get-publish-args.ts | 29 +- src/npm/index.ts | 16 +- src/npm/use-npm-env.ts | 38 +- src/options.ts | 110 +- src/read-manifest.ts | 43 +- src/results.ts | 28 +- 26 files changed, 916 insertions(+), 3017 deletions(-) create mode 100644 src/__tests__/normalize-options.test.ts create mode 100644 src/__tests__/npm-publish.test.ts create mode 100644 src/__tests__/read-manifest.test.ts create mode 100644 src/compare-versions.ts create mode 100644 src/errors.ts diff --git a/action.yml b/action.yml index 00e5eca..40a058e 100644 --- a/action.yml +++ b/action.yml @@ -17,38 +17,31 @@ inputs: registry: description: The NPM registry URL to use required: false - default: https://registry.npmjs.org/ package: description: The path of your package.json file required: false - default: package.json tag: description: The tag to publish to. This allows people to install the package using "npm install @". required: false - default: "latest" access: - description: - Determines whether the published package should be publicly visible, or restricted to members of your NPM organization. - This only applies to scoped packages. + description: Determines whether the published package should be publicly + visible, or restricted to members of your NPM organization. This only + applies to scoped packages. required: false dry-run: description: If true, run with the --dry-run flag required: false - default: "false" - check-version: - description: Only publish if the version in package.json differs from the latest on NPM + strategy: + description: Version check strategy. If "upgrade" (default), the package + will only be published if its version is higher than the existing version + on the configured tag. If "always", the package will be published if its + version is simply not yet published. required: false - default: "true" - - greater-version-only: - description: Only publish to NPM if the version number in package.json is greater than the latest on NPM - required: false - default: "false" outputs: type: diff --git a/dist/index.js b/dist/index.js index 4c577e7..b97cb09 100644 --- a/dist/index.js +++ b/dist/index.js @@ -710,7 +710,7 @@ var require_tunnel = __commonJS({ connectOptions.headers = connectOptions.headers || {}; connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); } - debug2("making CONNECT request"); + debug("making CONNECT request"); var connectReq = self.request(connectOptions); connectReq.useChunkedEncodingByDefault = false; connectReq.once("response", onResponse); @@ -730,7 +730,7 @@ var require_tunnel = __commonJS({ connectReq.removeAllListeners(); socket.removeAllListeners(); if (res.statusCode !== 200) { - debug2( + debug( "tunneling socket could not be established, statusCode=%d", res.statusCode ); @@ -742,7 +742,7 @@ var require_tunnel = __commonJS({ return; } if (head.length > 0) { - debug2("got illegal response body from proxy"); + debug("got illegal response body from proxy"); socket.destroy(); var error = new Error("got illegal response body from proxy"); error.code = "ECONNRESET"; @@ -750,13 +750,13 @@ var require_tunnel = __commonJS({ self.removeSocket(placeholder); return; } - debug2("tunneling connection has established"); + debug("tunneling connection has established"); self.sockets[self.sockets.indexOf(placeholder)] = socket; return cb(socket); } function onError(cause) { connectReq.removeAllListeners(); - debug2( + debug( "tunneling socket could not be established, cause=%s\n", cause.message, cause.stack @@ -818,9 +818,9 @@ var require_tunnel = __commonJS({ } return target; } - var debug2; + var debug; if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug2 = function() { + debug = function() { var args = Array.prototype.slice.call(arguments); if (typeof args[0] === "string") { args[0] = "TUNNEL: " + args[0]; @@ -830,10 +830,10 @@ var require_tunnel = __commonJS({ console.error.apply(console, args); }; } else { - debug2 = function() { + debug = function() { }; } - exports.debug = debug2; + exports.debug = debug; } }); @@ -1954,7 +1954,7 @@ var require_path_utils = __commonJS({ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; - var path4 = __importStar(require("path")); + var path3 = __importStar(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -1964,7 +1964,7 @@ var require_path_utils = __commonJS({ } exports.toWin32Path = toWin32Path; function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path4.sep); + return pth.replace(/[/\\]/g, path3.sep); } exports.toPlatformPath = toPlatformPath; } @@ -2035,7 +2035,7 @@ var require_core = __commonJS({ var file_command_1 = require_file_command(); var utils_1 = require_utils(); var os2 = __importStar(require("os")); - var path4 = __importStar(require("path")); + var path3 = __importStar(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -2063,10 +2063,10 @@ var require_core = __commonJS({ } else { command_1.issueCommand("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path4.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path3.delimiter}${process.env["PATH"]}`; } exports.addPath = addPath; - function getInput2(name, options) { + function getInput3(name, options) { const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); @@ -2076,9 +2076,9 @@ var require_core = __commonJS({ } return val.trim(); } - exports.getInput = getInput2; + exports.getInput = getInput3; function getMultilineInput(name, options) { - const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + const inputs = getInput3(name, options).split("\n").filter((x) => x !== ""); if (options && options.trimWhitespace === false) { return inputs; } @@ -2088,7 +2088,7 @@ var require_core = __commonJS({ function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; - const val = getInput2(name, options); + const val = getInput3(name, options); if (trueValue.includes(val)) return true; if (falseValue.includes(val)) @@ -2097,7 +2097,7 @@ var require_core = __commonJS({ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports.getBooleanInput = getBooleanInput; - function setOutput2(name, value) { + function setOutput3(name, value) { const filePath = process.env["GITHUB_OUTPUT"] || ""; if (filePath) { return file_command_1.issueFileCommand("OUTPUT", file_command_1.prepareKeyValueMessage(name, value)); @@ -2105,7 +2105,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); process.stdout.write(os2.EOL); command_1.issueCommand("set-output", { name }, utils_1.toCommandValue(value)); } - exports.setOutput = setOutput2; + exports.setOutput = setOutput3; function setCommandEcho(enabled) { command_1.issue("echo", enabled ? "on" : "off"); } @@ -2119,10 +2119,10 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); return process.env["RUNNER_DEBUG"] === "1"; } exports.isDebug = isDebug; - function debug2(message) { + function debug(message) { command_1.issueCommand("debug", {}, message); } - exports.debug = debug2; + exports.debug = debug; function error(message, properties = {}) { command_1.issueCommand("error", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); } @@ -2199,2408 +2199,6 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } }); -// node_modules/semver/internal/constants.js -var require_constants = __commonJS({ - "node_modules/semver/internal/constants.js"(exports, module2) { - var SEMVER_SPEC_VERSION = "2.0.0"; - var MAX_LENGTH = 256; - var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ - 9007199254740991; - var MAX_SAFE_COMPONENT_LENGTH = 16; - var RELEASE_TYPES = [ - "major", - "premajor", - "minor", - "preminor", - "patch", - "prepatch", - "prerelease" - ]; - module2.exports = { - MAX_LENGTH, - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_INTEGER, - RELEASE_TYPES, - SEMVER_SPEC_VERSION, - FLAG_INCLUDE_PRERELEASE: 1, - FLAG_LOOSE: 2 - }; - } -}); - -// node_modules/semver/internal/debug.js -var require_debug = __commonJS({ - "node_modules/semver/internal/debug.js"(exports, module2) { - var debug2 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { - }; - module2.exports = debug2; - } -}); - -// node_modules/semver/internal/re.js -var require_re = __commonJS({ - "node_modules/semver/internal/re.js"(exports, module2) { - var { MAX_SAFE_COMPONENT_LENGTH } = require_constants(); - var debug2 = require_debug(); - exports = module2.exports = {}; - var re = exports.re = []; - var src = exports.src = []; - var t = exports.t = {}; - var R = 0; - var createToken = (name, value, isGlobal) => { - const index = R++; - debug2(name, index, value); - t[name] = index; - src[index] = value; - re[index] = new RegExp(value, isGlobal ? "g" : void 0); - }; - createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); - createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+"); - createToken("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*"); - createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); - createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); - createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`); - createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`); - createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); - createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); - createToken("BUILDIDENTIFIER", "[0-9A-Za-z-]+"); - createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); - createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); - createToken("FULL", `^${src[t.FULLPLAIN]}$`); - createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); - createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); - createToken("GTLT", "((?:<|>)?=?)"); - createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); - createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); - createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); - createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); - createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); - createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); - createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`); - createToken("COERCERTL", src[t.COERCE], true); - createToken("LONETILDE", "(?:~>?)"); - createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); - exports.tildeTrimReplace = "$1~"; - createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); - createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); - createToken("LONECARET", "(?:\\^)"); - createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); - exports.caretTrimReplace = "$1^"; - createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); - createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); - createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); - createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); - createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); - exports.comparatorTrimReplace = "$1$2$3"; - createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); - createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); - createToken("STAR", "(<|>)?=?\\s*\\*"); - createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); - createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); - } -}); - -// node_modules/semver/internal/parse-options.js -var require_parse_options = __commonJS({ - "node_modules/semver/internal/parse-options.js"(exports, module2) { - var looseOption = Object.freeze({ loose: true }); - var emptyOpts = Object.freeze({}); - var parseOptions = (options) => { - if (!options) { - return emptyOpts; - } - if (typeof options !== "object") { - return looseOption; - } - return options; - }; - module2.exports = parseOptions; - } -}); - -// node_modules/semver/internal/identifiers.js -var require_identifiers = __commonJS({ - "node_modules/semver/internal/identifiers.js"(exports, module2) { - var numeric = /^[0-9]+$/; - var compareIdentifiers = (a, b) => { - const anum = numeric.test(a); - const bnum = numeric.test(b); - if (anum && bnum) { - a = +a; - b = +b; - } - return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; - }; - var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); - module2.exports = { - compareIdentifiers, - rcompareIdentifiers - }; - } -}); - -// node_modules/semver/classes/semver.js -var require_semver = __commonJS({ - "node_modules/semver/classes/semver.js"(exports, module2) { - var debug2 = require_debug(); - var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(); - var { re, t } = require_re(); - var parseOptions = require_parse_options(); - var { compareIdentifiers } = require_identifiers(); - var SemVer2 = class { - constructor(version2, options) { - options = parseOptions(options); - if (version2 instanceof SemVer2) { - if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) { - return version2; - } else { - version2 = version2.version; - } - } else if (typeof version2 !== "string") { - throw new TypeError(`Invalid Version: ${version2}`); - } - if (version2.length > MAX_LENGTH) { - throw new TypeError( - `version is longer than ${MAX_LENGTH} characters` - ); - } - debug2("SemVer", version2, options); - this.options = options; - this.loose = !!options.loose; - this.includePrerelease = !!options.includePrerelease; - const m = version2.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); - if (!m) { - throw new TypeError(`Invalid Version: ${version2}`); - } - this.raw = version2; - this.major = +m[1]; - this.minor = +m[2]; - this.patch = +m[3]; - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError("Invalid major version"); - } - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError("Invalid minor version"); - } - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError("Invalid patch version"); - } - if (!m[4]) { - this.prerelease = []; - } else { - this.prerelease = m[4].split(".").map((id) => { - if (/^[0-9]+$/.test(id)) { - const num = +id; - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num; - } - } - return id; - }); - } - this.build = m[5] ? m[5].split(".") : []; - this.format(); - } - format() { - this.version = `${this.major}.${this.minor}.${this.patch}`; - if (this.prerelease.length) { - this.version += `-${this.prerelease.join(".")}`; - } - return this.version; - } - toString() { - return this.version; - } - compare(other) { - debug2("SemVer.compare", this.version, this.options, other); - if (!(other instanceof SemVer2)) { - if (typeof other === "string" && other === this.version) { - return 0; - } - other = new SemVer2(other, this.options); - } - if (other.version === this.version) { - return 0; - } - return this.compareMain(other) || this.comparePre(other); - } - compareMain(other) { - if (!(other instanceof SemVer2)) { - other = new SemVer2(other, this.options); - } - return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); - } - comparePre(other) { - if (!(other instanceof SemVer2)) { - other = new SemVer2(other, this.options); - } - if (this.prerelease.length && !other.prerelease.length) { - return -1; - } else if (!this.prerelease.length && other.prerelease.length) { - return 1; - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0; - } - let i = 0; - do { - const a = this.prerelease[i]; - const b = other.prerelease[i]; - debug2("prerelease compare", i, a, b); - if (a === void 0 && b === void 0) { - return 0; - } else if (b === void 0) { - return 1; - } else if (a === void 0) { - return -1; - } else if (a === b) { - continue; - } else { - return compareIdentifiers(a, b); - } - } while (++i); - } - compareBuild(other) { - if (!(other instanceof SemVer2)) { - other = new SemVer2(other, this.options); - } - let i = 0; - do { - const a = this.build[i]; - const b = other.build[i]; - debug2("prerelease compare", i, a, b); - if (a === void 0 && b === void 0) { - return 0; - } else if (b === void 0) { - return 1; - } else if (a === void 0) { - return -1; - } else if (a === b) { - continue; - } else { - return compareIdentifiers(a, b); - } - } while (++i); - } - // preminor will bump the version up to the next minor release, and immediately - // down to pre-release. premajor and prepatch work the same way. - inc(release, identifier, identifierBase) { - switch (release) { - case "premajor": - this.prerelease.length = 0; - this.patch = 0; - this.minor = 0; - this.major++; - this.inc("pre", identifier, identifierBase); - break; - case "preminor": - this.prerelease.length = 0; - this.patch = 0; - this.minor++; - this.inc("pre", identifier, identifierBase); - break; - case "prepatch": - this.prerelease.length = 0; - this.inc("patch", identifier, identifierBase); - this.inc("pre", identifier, identifierBase); - break; - case "prerelease": - if (this.prerelease.length === 0) { - this.inc("patch", identifier, identifierBase); - } - this.inc("pre", identifier, identifierBase); - break; - case "major": - if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { - this.major++; - } - this.minor = 0; - this.patch = 0; - this.prerelease = []; - break; - case "minor": - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++; - } - this.patch = 0; - this.prerelease = []; - break; - case "patch": - if (this.prerelease.length === 0) { - this.patch++; - } - this.prerelease = []; - break; - case "pre": - if (this.prerelease.length === 0) { - this.prerelease = [0]; - } else { - let i = this.prerelease.length; - while (--i >= 0) { - if (typeof this.prerelease[i] === "number") { - this.prerelease[i]++; - i = -2; - } - } - if (i === -1) { - this.prerelease.push(0); - } - } - if (identifier) { - const base = Number(identifierBase) ? 1 : 0; - if (compareIdentifiers(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, base]; - } - } else { - this.prerelease = [identifier, base]; - } - } - break; - default: - throw new Error(`invalid increment argument: ${release}`); - } - this.format(); - this.raw = this.version; - return this; - } - }; - module2.exports = SemVer2; - } -}); - -// node_modules/semver/functions/parse.js -var require_parse = __commonJS({ - "node_modules/semver/functions/parse.js"(exports, module2) { - var { MAX_LENGTH } = require_constants(); - var SemVer2 = require_semver(); - var parse2 = (version2, options) => { - if (version2 instanceof SemVer2) { - return version2; - } - if (typeof version2 !== "string") { - return null; - } - if (version2.length > MAX_LENGTH) { - return null; - } - try { - return new SemVer2(version2, options); - } catch (er) { - return null; - } - }; - module2.exports = parse2; - } -}); - -// node_modules/semver/functions/valid.js -var require_valid = __commonJS({ - "node_modules/semver/functions/valid.js"(exports, module2) { - var parse2 = require_parse(); - var valid = (version2, options) => { - const v = parse2(version2, options); - return v ? v.version : null; - }; - module2.exports = valid; - } -}); - -// node_modules/semver/functions/clean.js -var require_clean = __commonJS({ - "node_modules/semver/functions/clean.js"(exports, module2) { - var parse2 = require_parse(); - var clean = (version2, options) => { - const s = parse2(version2.trim().replace(/^[=v]+/, ""), options); - return s ? s.version : null; - }; - module2.exports = clean; - } -}); - -// node_modules/semver/functions/inc.js -var require_inc = __commonJS({ - "node_modules/semver/functions/inc.js"(exports, module2) { - var SemVer2 = require_semver(); - var inc = (version2, release, options, identifier, identifierBase) => { - if (typeof options === "string") { - identifierBase = identifier; - identifier = options; - options = void 0; - } - try { - return new SemVer2( - version2 instanceof SemVer2 ? version2.version : version2, - options - ).inc(release, identifier, identifierBase).version; - } catch (er) { - return null; - } - }; - module2.exports = inc; - } -}); - -// node_modules/semver/functions/compare.js -var require_compare = __commonJS({ - "node_modules/semver/functions/compare.js"(exports, module2) { - var SemVer2 = require_semver(); - var compare2 = (a, b, loose) => new SemVer2(a, loose).compare(new SemVer2(b, loose)); - module2.exports = compare2; - } -}); - -// node_modules/semver/functions/eq.js -var require_eq = __commonJS({ - "node_modules/semver/functions/eq.js"(exports, module2) { - var compare2 = require_compare(); - var eq = (a, b, loose) => compare2(a, b, loose) === 0; - module2.exports = eq; - } -}); - -// node_modules/semver/functions/diff.js -var require_diff = __commonJS({ - "node_modules/semver/functions/diff.js"(exports, module2) { - var parse2 = require_parse(); - var eq = require_eq(); - var diff2 = (version1, version2) => { - const v12 = parse2(version1); - const v2 = parse2(version2); - if (eq(v12, v2)) { - return null; - } else { - const hasPre = v12.prerelease.length || v2.prerelease.length; - const prefix = hasPre ? "pre" : ""; - const defaultResult = hasPre ? "prerelease" : ""; - if (v12.major !== v2.major) { - return prefix + "major"; - } - if (v12.minor !== v2.minor) { - return prefix + "minor"; - } - if (v12.patch !== v2.patch) { - return prefix + "patch"; - } - if (!v12.prerelease.length || !v2.prerelease.length) { - if (v12.patch) { - return "patch"; - } - if (v12.minor) { - return "minor"; - } - if (v12.major) { - return "major"; - } - } - return defaultResult; - } - }; - module2.exports = diff2; - } -}); - -// node_modules/semver/functions/major.js -var require_major = __commonJS({ - "node_modules/semver/functions/major.js"(exports, module2) { - var SemVer2 = require_semver(); - var major = (a, loose) => new SemVer2(a, loose).major; - module2.exports = major; - } -}); - -// node_modules/semver/functions/minor.js -var require_minor = __commonJS({ - "node_modules/semver/functions/minor.js"(exports, module2) { - var SemVer2 = require_semver(); - var minor = (a, loose) => new SemVer2(a, loose).minor; - module2.exports = minor; - } -}); - -// node_modules/semver/functions/patch.js -var require_patch = __commonJS({ - "node_modules/semver/functions/patch.js"(exports, module2) { - var SemVer2 = require_semver(); - var patch = (a, loose) => new SemVer2(a, loose).patch; - module2.exports = patch; - } -}); - -// node_modules/semver/functions/prerelease.js -var require_prerelease = __commonJS({ - "node_modules/semver/functions/prerelease.js"(exports, module2) { - var parse2 = require_parse(); - var prerelease = (version2, options) => { - const parsed = parse2(version2, options); - return parsed && parsed.prerelease.length ? parsed.prerelease : null; - }; - module2.exports = prerelease; - } -}); - -// node_modules/semver/functions/rcompare.js -var require_rcompare = __commonJS({ - "node_modules/semver/functions/rcompare.js"(exports, module2) { - var compare2 = require_compare(); - var rcompare = (a, b, loose) => compare2(b, a, loose); - module2.exports = rcompare; - } -}); - -// node_modules/semver/functions/compare-loose.js -var require_compare_loose = __commonJS({ - "node_modules/semver/functions/compare-loose.js"(exports, module2) { - var compare2 = require_compare(); - var compareLoose = (a, b) => compare2(a, b, true); - module2.exports = compareLoose; - } -}); - -// node_modules/semver/functions/compare-build.js -var require_compare_build = __commonJS({ - "node_modules/semver/functions/compare-build.js"(exports, module2) { - var SemVer2 = require_semver(); - var compareBuild = (a, b, loose) => { - const versionA = new SemVer2(a, loose); - const versionB = new SemVer2(b, loose); - return versionA.compare(versionB) || versionA.compareBuild(versionB); - }; - module2.exports = compareBuild; - } -}); - -// node_modules/semver/functions/sort.js -var require_sort = __commonJS({ - "node_modules/semver/functions/sort.js"(exports, module2) { - var compareBuild = require_compare_build(); - var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)); - module2.exports = sort; - } -}); - -// node_modules/semver/functions/rsort.js -var require_rsort = __commonJS({ - "node_modules/semver/functions/rsort.js"(exports, module2) { - var compareBuild = require_compare_build(); - var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)); - module2.exports = rsort; - } -}); - -// node_modules/semver/functions/gt.js -var require_gt = __commonJS({ - "node_modules/semver/functions/gt.js"(exports, module2) { - var compare2 = require_compare(); - var gt = (a, b, loose) => compare2(a, b, loose) > 0; - module2.exports = gt; - } -}); - -// node_modules/semver/functions/lt.js -var require_lt = __commonJS({ - "node_modules/semver/functions/lt.js"(exports, module2) { - var compare2 = require_compare(); - var lt = (a, b, loose) => compare2(a, b, loose) < 0; - module2.exports = lt; - } -}); - -// node_modules/semver/functions/neq.js -var require_neq = __commonJS({ - "node_modules/semver/functions/neq.js"(exports, module2) { - var compare2 = require_compare(); - var neq = (a, b, loose) => compare2(a, b, loose) !== 0; - module2.exports = neq; - } -}); - -// node_modules/semver/functions/gte.js -var require_gte = __commonJS({ - "node_modules/semver/functions/gte.js"(exports, module2) { - var compare2 = require_compare(); - var gte = (a, b, loose) => compare2(a, b, loose) >= 0; - module2.exports = gte; - } -}); - -// node_modules/semver/functions/lte.js -var require_lte = __commonJS({ - "node_modules/semver/functions/lte.js"(exports, module2) { - var compare2 = require_compare(); - var lte = (a, b, loose) => compare2(a, b, loose) <= 0; - module2.exports = lte; - } -}); - -// node_modules/semver/functions/cmp.js -var require_cmp = __commonJS({ - "node_modules/semver/functions/cmp.js"(exports, module2) { - var eq = require_eq(); - var neq = require_neq(); - var gt = require_gt(); - var gte = require_gte(); - var lt = require_lt(); - var lte = require_lte(); - var cmp = (a, op, b, loose) => { - switch (op) { - case "===": - if (typeof a === "object") { - a = a.version; - } - if (typeof b === "object") { - b = b.version; - } - return a === b; - case "!==": - if (typeof a === "object") { - a = a.version; - } - if (typeof b === "object") { - b = b.version; - } - return a !== b; - case "": - case "=": - case "==": - return eq(a, b, loose); - case "!=": - return neq(a, b, loose); - case ">": - return gt(a, b, loose); - case ">=": - return gte(a, b, loose); - case "<": - return lt(a, b, loose); - case "<=": - return lte(a, b, loose); - default: - throw new TypeError(`Invalid operator: ${op}`); - } - }; - module2.exports = cmp; - } -}); - -// node_modules/semver/functions/coerce.js -var require_coerce = __commonJS({ - "node_modules/semver/functions/coerce.js"(exports, module2) { - var SemVer2 = require_semver(); - var parse2 = require_parse(); - var { re, t } = require_re(); - var coerce = (version2, options) => { - if (version2 instanceof SemVer2) { - return version2; - } - if (typeof version2 === "number") { - version2 = String(version2); - } - if (typeof version2 !== "string") { - return null; - } - options = options || {}; - let match = null; - if (!options.rtl) { - match = version2.match(re[t.COERCE]); - } else { - let next; - while ((next = re[t.COERCERTL].exec(version2)) && (!match || match.index + match[0].length !== version2.length)) { - if (!match || next.index + next[0].length !== match.index + match[0].length) { - match = next; - } - re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; - } - re[t.COERCERTL].lastIndex = -1; - } - if (match === null) { - return null; - } - return parse2(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options); - }; - module2.exports = coerce; - } -}); - -// node_modules/semver/node_modules/yallist/iterator.js -var require_iterator = __commonJS({ - "node_modules/semver/node_modules/yallist/iterator.js"(exports, module2) { - "use strict"; - module2.exports = function(Yallist) { - Yallist.prototype[Symbol.iterator] = function* () { - for (let walker = this.head; walker; walker = walker.next) { - yield walker.value; - } - }; - }; - } -}); - -// node_modules/semver/node_modules/yallist/yallist.js -var require_yallist = __commonJS({ - "node_modules/semver/node_modules/yallist/yallist.js"(exports, module2) { - "use strict"; - module2.exports = Yallist; - Yallist.Node = Node; - Yallist.create = Yallist; - function Yallist(list) { - var self = this; - if (!(self instanceof Yallist)) { - self = new Yallist(); - } - self.tail = null; - self.head = null; - self.length = 0; - if (list && typeof list.forEach === "function") { - list.forEach(function(item) { - self.push(item); - }); - } else if (arguments.length > 0) { - for (var i = 0, l = arguments.length; i < l; i++) { - self.push(arguments[i]); - } - } - return self; - } - Yallist.prototype.removeNode = function(node) { - if (node.list !== this) { - throw new Error("removing node which does not belong to this list"); - } - var next = node.next; - var prev = node.prev; - if (next) { - next.prev = prev; - } - if (prev) { - prev.next = next; - } - if (node === this.head) { - this.head = next; - } - if (node === this.tail) { - this.tail = prev; - } - node.list.length--; - node.next = null; - node.prev = null; - node.list = null; - return next; - }; - Yallist.prototype.unshiftNode = function(node) { - if (node === this.head) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - var head = this.head; - node.list = this; - node.next = head; - if (head) { - head.prev = node; - } - this.head = node; - if (!this.tail) { - this.tail = node; - } - this.length++; - }; - Yallist.prototype.pushNode = function(node) { - if (node === this.tail) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - var tail = this.tail; - node.list = this; - node.prev = tail; - if (tail) { - tail.next = node; - } - this.tail = node; - if (!this.head) { - this.head = node; - } - this.length++; - }; - Yallist.prototype.push = function() { - for (var i = 0, l = arguments.length; i < l; i++) { - push(this, arguments[i]); - } - return this.length; - }; - Yallist.prototype.unshift = function() { - for (var i = 0, l = arguments.length; i < l; i++) { - unshift(this, arguments[i]); - } - return this.length; - }; - Yallist.prototype.pop = function() { - if (!this.tail) { - return void 0; - } - var res = this.tail.value; - this.tail = this.tail.prev; - if (this.tail) { - this.tail.next = null; - } else { - this.head = null; - } - this.length--; - return res; - }; - Yallist.prototype.shift = function() { - if (!this.head) { - return void 0; - } - var res = this.head.value; - this.head = this.head.next; - if (this.head) { - this.head.prev = null; - } else { - this.tail = null; - } - this.length--; - return res; - }; - Yallist.prototype.forEach = function(fn, thisp) { - thisp = thisp || this; - for (var walker = this.head, i = 0; walker !== null; i++) { - fn.call(thisp, walker.value, i, this); - walker = walker.next; - } - }; - Yallist.prototype.forEachReverse = function(fn, thisp) { - thisp = thisp || this; - for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { - fn.call(thisp, walker.value, i, this); - walker = walker.prev; - } - }; - Yallist.prototype.get = function(n) { - for (var i = 0, walker = this.head; walker !== null && i < n; i++) { - walker = walker.next; - } - if (i === n && walker !== null) { - return walker.value; - } - }; - Yallist.prototype.getReverse = function(n) { - for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { - walker = walker.prev; - } - if (i === n && walker !== null) { - return walker.value; - } - }; - Yallist.prototype.map = function(fn, thisp) { - thisp = thisp || this; - var res = new Yallist(); - for (var walker = this.head; walker !== null; ) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.next; - } - return res; - }; - Yallist.prototype.mapReverse = function(fn, thisp) { - thisp = thisp || this; - var res = new Yallist(); - for (var walker = this.tail; walker !== null; ) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.prev; - } - return res; - }; - Yallist.prototype.reduce = function(fn, initial) { - var acc; - var walker = this.head; - if (arguments.length > 1) { - acc = initial; - } else if (this.head) { - walker = this.head.next; - acc = this.head.value; - } else { - throw new TypeError("Reduce of empty list with no initial value"); - } - for (var i = 0; walker !== null; i++) { - acc = fn(acc, walker.value, i); - walker = walker.next; - } - return acc; - }; - Yallist.prototype.reduceReverse = function(fn, initial) { - var acc; - var walker = this.tail; - if (arguments.length > 1) { - acc = initial; - } else if (this.tail) { - walker = this.tail.prev; - acc = this.tail.value; - } else { - throw new TypeError("Reduce of empty list with no initial value"); - } - for (var i = this.length - 1; walker !== null; i--) { - acc = fn(acc, walker.value, i); - walker = walker.prev; - } - return acc; - }; - Yallist.prototype.toArray = function() { - var arr = new Array(this.length); - for (var i = 0, walker = this.head; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.next; - } - return arr; - }; - Yallist.prototype.toArrayReverse = function() { - var arr = new Array(this.length); - for (var i = 0, walker = this.tail; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.prev; - } - return arr; - }; - Yallist.prototype.slice = function(from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; - } - from = from || 0; - if (from < 0) { - from += this.length; - } - var ret = new Yallist(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - for (var i = 0, walker = this.head; walker !== null && i < from; i++) { - walker = walker.next; - } - for (; walker !== null && i < to; i++, walker = walker.next) { - ret.push(walker.value); - } - return ret; - }; - Yallist.prototype.sliceReverse = function(from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; - } - from = from || 0; - if (from < 0) { - from += this.length; - } - var ret = new Yallist(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { - walker = walker.prev; - } - for (; walker !== null && i > from; i--, walker = walker.prev) { - ret.push(walker.value); - } - return ret; - }; - Yallist.prototype.splice = function(start, deleteCount, ...nodes) { - if (start > this.length) { - start = this.length - 1; - } - if (start < 0) { - start = this.length + start; - } - for (var i = 0, walker = this.head; walker !== null && i < start; i++) { - walker = walker.next; - } - var ret = []; - for (var i = 0; walker && i < deleteCount; i++) { - ret.push(walker.value); - walker = this.removeNode(walker); - } - if (walker === null) { - walker = this.tail; - } - if (walker !== this.head && walker !== this.tail) { - walker = walker.prev; - } - for (var i = 0; i < nodes.length; i++) { - walker = insert(this, walker, nodes[i]); - } - return ret; - }; - Yallist.prototype.reverse = function() { - var head = this.head; - var tail = this.tail; - for (var walker = head; walker !== null; walker = walker.prev) { - var p = walker.prev; - walker.prev = walker.next; - walker.next = p; - } - this.head = tail; - this.tail = head; - return this; - }; - function insert(self, node, value) { - var inserted = node === self.head ? new Node(value, null, node, self) : new Node(value, node, node.next, self); - if (inserted.next === null) { - self.tail = inserted; - } - if (inserted.prev === null) { - self.head = inserted; - } - self.length++; - return inserted; - } - function push(self, item) { - self.tail = new Node(item, self.tail, null, self); - if (!self.head) { - self.head = self.tail; - } - self.length++; - } - function unshift(self, item) { - self.head = new Node(item, null, self.head, self); - if (!self.tail) { - self.tail = self.head; - } - self.length++; - } - function Node(value, prev, next, list) { - if (!(this instanceof Node)) { - return new Node(value, prev, next, list); - } - this.list = list; - this.value = value; - if (prev) { - prev.next = this; - this.prev = prev; - } else { - this.prev = null; - } - if (next) { - next.prev = this; - this.next = next; - } else { - this.next = null; - } - } - try { - require_iterator()(Yallist); - } catch (er) { - } - } -}); - -// node_modules/semver/node_modules/lru-cache/index.js -var require_lru_cache = __commonJS({ - "node_modules/semver/node_modules/lru-cache/index.js"(exports, module2) { - "use strict"; - var Yallist = require_yallist(); - var MAX = Symbol("max"); - var LENGTH = Symbol("length"); - var LENGTH_CALCULATOR = Symbol("lengthCalculator"); - var ALLOW_STALE = Symbol("allowStale"); - var MAX_AGE = Symbol("maxAge"); - var DISPOSE = Symbol("dispose"); - var NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet"); - var LRU_LIST = Symbol("lruList"); - var CACHE = Symbol("cache"); - var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet"); - var naiveLength = () => 1; - var LRUCache = class { - constructor(options) { - if (typeof options === "number") - options = { max: options }; - if (!options) - options = {}; - if (options.max && (typeof options.max !== "number" || options.max < 0)) - throw new TypeError("max must be a non-negative number"); - const max = this[MAX] = options.max || Infinity; - const lc = options.length || naiveLength; - this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc; - this[ALLOW_STALE] = options.stale || false; - if (options.maxAge && typeof options.maxAge !== "number") - throw new TypeError("maxAge must be a number"); - this[MAX_AGE] = options.maxAge || 0; - this[DISPOSE] = options.dispose; - this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false; - this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false; - this.reset(); - } - // resize the cache when the max changes. - set max(mL) { - if (typeof mL !== "number" || mL < 0) - throw new TypeError("max must be a non-negative number"); - this[MAX] = mL || Infinity; - trim(this); - } - get max() { - return this[MAX]; - } - set allowStale(allowStale) { - this[ALLOW_STALE] = !!allowStale; - } - get allowStale() { - return this[ALLOW_STALE]; - } - set maxAge(mA) { - if (typeof mA !== "number") - throw new TypeError("maxAge must be a non-negative number"); - this[MAX_AGE] = mA; - trim(this); - } - get maxAge() { - return this[MAX_AGE]; - } - // resize the cache when the lengthCalculator changes. - set lengthCalculator(lC) { - if (typeof lC !== "function") - lC = naiveLength; - if (lC !== this[LENGTH_CALCULATOR]) { - this[LENGTH_CALCULATOR] = lC; - this[LENGTH] = 0; - this[LRU_LIST].forEach((hit) => { - hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key); - this[LENGTH] += hit.length; - }); - } - trim(this); - } - get lengthCalculator() { - return this[LENGTH_CALCULATOR]; - } - get length() { - return this[LENGTH]; - } - get itemCount() { - return this[LRU_LIST].length; - } - rforEach(fn, thisp) { - thisp = thisp || this; - for (let walker = this[LRU_LIST].tail; walker !== null; ) { - const prev = walker.prev; - forEachStep(this, fn, walker, thisp); - walker = prev; - } - } - forEach(fn, thisp) { - thisp = thisp || this; - for (let walker = this[LRU_LIST].head; walker !== null; ) { - const next = walker.next; - forEachStep(this, fn, walker, thisp); - walker = next; - } - } - keys() { - return this[LRU_LIST].toArray().map((k) => k.key); - } - values() { - return this[LRU_LIST].toArray().map((k) => k.value); - } - reset() { - if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { - this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value)); - } - this[CACHE] = /* @__PURE__ */ new Map(); - this[LRU_LIST] = new Yallist(); - this[LENGTH] = 0; - } - dump() { - return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : { - k: hit.key, - v: hit.value, - e: hit.now + (hit.maxAge || 0) - }).toArray().filter((h) => h); - } - dumpLru() { - return this[LRU_LIST]; - } - set(key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE]; - if (maxAge && typeof maxAge !== "number") - throw new TypeError("maxAge must be a number"); - const now = maxAge ? Date.now() : 0; - const len = this[LENGTH_CALCULATOR](value, key); - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - del(this, this[CACHE].get(key)); - return false; - } - const node = this[CACHE].get(key); - const item = node.value; - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) - this[DISPOSE](key, item.value); - } - item.now = now; - item.maxAge = maxAge; - item.value = value; - this[LENGTH] += len - item.length; - item.length = len; - this.get(key); - trim(this); - return true; - } - const hit = new Entry(key, value, len, now, maxAge); - if (hit.length > this[MAX]) { - if (this[DISPOSE]) - this[DISPOSE](key, value); - return false; - } - this[LENGTH] += hit.length; - this[LRU_LIST].unshift(hit); - this[CACHE].set(key, this[LRU_LIST].head); - trim(this); - return true; - } - has(key) { - if (!this[CACHE].has(key)) - return false; - const hit = this[CACHE].get(key).value; - return !isStale(this, hit); - } - get(key) { - return get(this, key, true); - } - peek(key) { - return get(this, key, false); - } - pop() { - const node = this[LRU_LIST].tail; - if (!node) - return null; - del(this, node); - return node.value; - } - del(key) { - del(this, this[CACHE].get(key)); - } - load(arr) { - this.reset(); - const now = Date.now(); - for (let l = arr.length - 1; l >= 0; l--) { - const hit = arr[l]; - const expiresAt = hit.e || 0; - if (expiresAt === 0) - this.set(hit.k, hit.v); - else { - const maxAge = expiresAt - now; - if (maxAge > 0) { - this.set(hit.k, hit.v, maxAge); - } - } - } - } - prune() { - this[CACHE].forEach((value, key) => get(this, key, false)); - } - }; - var get = (self, key, doUse) => { - const node = self[CACHE].get(key); - if (node) { - const hit = node.value; - if (isStale(self, hit)) { - del(self, node); - if (!self[ALLOW_STALE]) - return void 0; - } else { - if (doUse) { - if (self[UPDATE_AGE_ON_GET]) - node.value.now = Date.now(); - self[LRU_LIST].unshiftNode(node); - } - } - return hit.value; - } - }; - var isStale = (self, hit) => { - if (!hit || !hit.maxAge && !self[MAX_AGE]) - return false; - const diff2 = Date.now() - hit.now; - return hit.maxAge ? diff2 > hit.maxAge : self[MAX_AGE] && diff2 > self[MAX_AGE]; - }; - var trim = (self) => { - if (self[LENGTH] > self[MAX]) { - for (let walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null; ) { - const prev = walker.prev; - del(self, walker); - walker = prev; - } - } - }; - var del = (self, node) => { - if (node) { - const hit = node.value; - if (self[DISPOSE]) - self[DISPOSE](hit.key, hit.value); - self[LENGTH] -= hit.length; - self[CACHE].delete(hit.key); - self[LRU_LIST].removeNode(node); - } - }; - var Entry = class { - constructor(key, value, length, now, maxAge) { - this.key = key; - this.value = value; - this.length = length; - this.now = now; - this.maxAge = maxAge || 0; - } - }; - var forEachStep = (self, fn, node, thisp) => { - let hit = node.value; - if (isStale(self, hit)) { - del(self, node); - if (!self[ALLOW_STALE]) - hit = void 0; - } - if (hit) - fn.call(thisp, hit.value, hit.key, self); - }; - module2.exports = LRUCache; - } -}); - -// node_modules/semver/classes/range.js -var require_range = __commonJS({ - "node_modules/semver/classes/range.js"(exports, module2) { - var Range = class { - constructor(range, options) { - options = parseOptions(options); - if (range instanceof Range) { - if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { - return range; - } else { - return new Range(range.raw, options); - } - } - if (range instanceof Comparator) { - this.raw = range.value; - this.set = [[range]]; - this.format(); - return this; - } - this.options = options; - this.loose = !!options.loose; - this.includePrerelease = !!options.includePrerelease; - this.raw = range; - this.set = range.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length); - if (!this.set.length) { - throw new TypeError(`Invalid SemVer Range: ${range}`); - } - if (this.set.length > 1) { - const first = this.set[0]; - this.set = this.set.filter((c) => !isNullSet(c[0])); - if (this.set.length === 0) { - this.set = [first]; - } else if (this.set.length > 1) { - for (const c of this.set) { - if (c.length === 1 && isAny(c[0])) { - this.set = [c]; - break; - } - } - } - } - this.format(); - } - format() { - this.range = this.set.map((comps) => { - return comps.join(" ").trim(); - }).join("||").trim(); - return this.range; - } - toString() { - return this.range; - } - parseRange(range) { - range = range.trim(); - const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE); - const memoKey = memoOpts + ":" + range; - const cached = cache.get(memoKey); - if (cached) { - return cached; - } - const loose = this.options.loose; - const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; - range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); - debug2("hyphen replace", range); - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); - debug2("comparator trim", range); - range = range.replace(re[t.TILDETRIM], tildeTrimReplace); - range = range.replace(re[t.CARETTRIM], caretTrimReplace); - range = range.split(/\s+/).join(" "); - let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); - if (loose) { - rangeList = rangeList.filter((comp) => { - debug2("loose invalid filter", comp, this.options); - return !!comp.match(re[t.COMPARATORLOOSE]); - }); - } - debug2("range list", rangeList); - const rangeMap = /* @__PURE__ */ new Map(); - const comparators = rangeList.map((comp) => new Comparator(comp, this.options)); - for (const comp of comparators) { - if (isNullSet(comp)) { - return [comp]; - } - rangeMap.set(comp.value, comp); - } - if (rangeMap.size > 1 && rangeMap.has("")) { - rangeMap.delete(""); - } - const result = [...rangeMap.values()]; - cache.set(memoKey, result); - return result; - } - intersects(range, options) { - if (!(range instanceof Range)) { - throw new TypeError("a Range is required"); - } - return this.set.some((thisComparators) => { - return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { - return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { - return rangeComparators.every((rangeComparator) => { - return thisComparator.intersects(rangeComparator, options); - }); - }); - }); - }); - } - // if ANY of the sets match ALL of its comparators, then pass - test(version2) { - if (!version2) { - return false; - } - if (typeof version2 === "string") { - try { - version2 = new SemVer2(version2, this.options); - } catch (er) { - return false; - } - } - for (let i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version2, this.options)) { - return true; - } - } - return false; - } - }; - module2.exports = Range; - var LRU = require_lru_cache(); - var cache = new LRU({ max: 1e3 }); - var parseOptions = require_parse_options(); - var Comparator = require_comparator(); - var debug2 = require_debug(); - var SemVer2 = require_semver(); - var { - re, - t, - comparatorTrimReplace, - tildeTrimReplace, - caretTrimReplace - } = require_re(); - var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants(); - var isNullSet = (c) => c.value === "<0.0.0-0"; - var isAny = (c) => c.value === ""; - var isSatisfiable = (comparators, options) => { - let result = true; - const remainingComparators = comparators.slice(); - let testComparator = remainingComparators.pop(); - while (result && remainingComparators.length) { - result = remainingComparators.every((otherComparator) => { - return testComparator.intersects(otherComparator, options); - }); - testComparator = remainingComparators.pop(); - } - return result; - }; - var parseComparator = (comp, options) => { - debug2("comp", comp, options); - comp = replaceCarets(comp, options); - debug2("caret", comp); - comp = replaceTildes(comp, options); - debug2("tildes", comp); - comp = replaceXRanges(comp, options); - debug2("xrange", comp); - comp = replaceStars(comp, options); - debug2("stars", comp); - return comp; - }; - var isX = (id) => !id || id.toLowerCase() === "x" || id === "*"; - var replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((c) => { - return replaceTilde(c, options); - }).join(" "); - var replaceTilde = (comp, options) => { - const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; - return comp.replace(r, (_, M, m, p, pr) => { - debug2("tilde", comp, _, M, m, p, pr); - let ret; - if (isX(M)) { - ret = ""; - } else if (isX(m)) { - ret = `>=${M}.0.0 <${+M + 1}.0.0-0`; - } else if (isX(p)) { - ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`; - } else if (pr) { - debug2("replaceTilde pr", pr); - ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; - } else { - ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; - } - debug2("tilde return", ret); - return ret; - }); - }; - var replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((c) => { - return replaceCaret(c, options); - }).join(" "); - var replaceCaret = (comp, options) => { - debug2("caret", comp, options); - const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; - const z = options.includePrerelease ? "-0" : ""; - return comp.replace(r, (_, M, m, p, pr) => { - debug2("caret", comp, _, M, m, p, pr); - let ret; - if (isX(M)) { - ret = ""; - } else if (isX(m)) { - ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; - } else if (isX(p)) { - if (M === "0") { - ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; - } else { - ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`; - } - } else if (pr) { - debug2("replaceCaret pr", pr); - if (M === "0") { - if (m === "0") { - ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`; - } else { - ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; - } - } else { - ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`; - } - } else { - debug2("no pr"); - if (M === "0") { - if (m === "0") { - ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`; - } else { - ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`; - } - } else { - ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; - } - } - debug2("caret return", ret); - return ret; - }); - }; - var replaceXRanges = (comp, options) => { - debug2("replaceXRanges", comp, options); - return comp.split(/\s+/).map((c) => { - return replaceXRange(c, options); - }).join(" "); - }; - var replaceXRange = (comp, options) => { - comp = comp.trim(); - const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; - return comp.replace(r, (ret, gtlt, M, m, p, pr) => { - debug2("xRange", comp, ret, gtlt, M, m, p, pr); - const xM = isX(M); - const xm = xM || isX(m); - const xp = xm || isX(p); - const anyX = xp; - if (gtlt === "=" && anyX) { - gtlt = ""; - } - pr = options.includePrerelease ? "-0" : ""; - if (xM) { - if (gtlt === ">" || gtlt === "<") { - ret = "<0.0.0-0"; - } else { - ret = "*"; - } - } else if (gtlt && anyX) { - if (xm) { - m = 0; - } - p = 0; - if (gtlt === ">") { - gtlt = ">="; - if (xm) { - M = +M + 1; - m = 0; - p = 0; - } else { - m = +m + 1; - p = 0; - } - } else if (gtlt === "<=") { - gtlt = "<"; - if (xm) { - M = +M + 1; - } else { - m = +m + 1; - } - } - if (gtlt === "<") { - pr = "-0"; - } - ret = `${gtlt + M}.${m}.${p}${pr}`; - } else if (xm) { - ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; - } else if (xp) { - ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; - } - debug2("xRange return", ret); - return ret; - }); - }; - var replaceStars = (comp, options) => { - debug2("replaceStars", comp, options); - return comp.trim().replace(re[t.STAR], ""); - }; - var replaceGTE0 = (comp, options) => { - debug2("replaceGTE0", comp, options); - return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); - }; - var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => { - if (isX(fM)) { - from = ""; - } else if (isX(fm)) { - from = `>=${fM}.0.0${incPr ? "-0" : ""}`; - } else if (isX(fp)) { - from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; - } else if (fpr) { - from = `>=${from}`; - } else { - from = `>=${from}${incPr ? "-0" : ""}`; - } - if (isX(tM)) { - to = ""; - } else if (isX(tm)) { - to = `<${+tM + 1}.0.0-0`; - } else if (isX(tp)) { - to = `<${tM}.${+tm + 1}.0-0`; - } else if (tpr) { - to = `<=${tM}.${tm}.${tp}-${tpr}`; - } else if (incPr) { - to = `<${tM}.${tm}.${+tp + 1}-0`; - } else { - to = `<=${to}`; - } - return `${from} ${to}`.trim(); - }; - var testSet = (set, version2, options) => { - for (let i = 0; i < set.length; i++) { - if (!set[i].test(version2)) { - return false; - } - } - if (version2.prerelease.length && !options.includePrerelease) { - for (let i = 0; i < set.length; i++) { - debug2(set[i].semver); - if (set[i].semver === Comparator.ANY) { - continue; - } - if (set[i].semver.prerelease.length > 0) { - const allowed = set[i].semver; - if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) { - return true; - } - } - } - return false; - } - return true; - }; - } -}); - -// node_modules/semver/classes/comparator.js -var require_comparator = __commonJS({ - "node_modules/semver/classes/comparator.js"(exports, module2) { - var ANY = Symbol("SemVer ANY"); - var Comparator = class { - static get ANY() { - return ANY; - } - constructor(comp, options) { - options = parseOptions(options); - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp; - } else { - comp = comp.value; - } - } - debug2("comparator", comp, options); - this.options = options; - this.loose = !!options.loose; - this.parse(comp); - if (this.semver === ANY) { - this.value = ""; - } else { - this.value = this.operator + this.semver.version; - } - debug2("comp", this); - } - parse(comp) { - const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; - const m = comp.match(r); - if (!m) { - throw new TypeError(`Invalid comparator: ${comp}`); - } - this.operator = m[1] !== void 0 ? m[1] : ""; - if (this.operator === "=") { - this.operator = ""; - } - if (!m[2]) { - this.semver = ANY; - } else { - this.semver = new SemVer2(m[2], this.options.loose); - } - } - toString() { - return this.value; - } - test(version2) { - debug2("Comparator.test", version2, this.options.loose); - if (this.semver === ANY || version2 === ANY) { - return true; - } - if (typeof version2 === "string") { - try { - version2 = new SemVer2(version2, this.options); - } catch (er) { - return false; - } - } - return cmp(version2, this.operator, this.semver, this.options); - } - intersects(comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError("a Comparator is required"); - } - if (this.operator === "") { - if (this.value === "") { - return true; - } - return new Range(comp.value, options).test(this.value); - } else if (comp.operator === "") { - if (comp.value === "") { - return true; - } - return new Range(this.value, options).test(comp.semver); - } - options = parseOptions(options); - if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) { - return false; - } - if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) { - return false; - } - if (this.operator.startsWith(">") && comp.operator.startsWith(">")) { - return true; - } - if (this.operator.startsWith("<") && comp.operator.startsWith("<")) { - return true; - } - if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) { - return true; - } - if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) { - return true; - } - if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) { - return true; - } - return false; - } - }; - module2.exports = Comparator; - var parseOptions = require_parse_options(); - var { re, t } = require_re(); - var cmp = require_cmp(); - var debug2 = require_debug(); - var SemVer2 = require_semver(); - var Range = require_range(); - } -}); - -// node_modules/semver/functions/satisfies.js -var require_satisfies = __commonJS({ - "node_modules/semver/functions/satisfies.js"(exports, module2) { - var Range = require_range(); - var satisfies = (version2, range, options) => { - try { - range = new Range(range, options); - } catch (er) { - return false; - } - return range.test(version2); - }; - module2.exports = satisfies; - } -}); - -// node_modules/semver/ranges/to-comparators.js -var require_to_comparators = __commonJS({ - "node_modules/semver/ranges/to-comparators.js"(exports, module2) { - var Range = require_range(); - var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); - module2.exports = toComparators; - } -}); - -// node_modules/semver/ranges/max-satisfying.js -var require_max_satisfying = __commonJS({ - "node_modules/semver/ranges/max-satisfying.js"(exports, module2) { - var SemVer2 = require_semver(); - var Range = require_range(); - var maxSatisfying = (versions, range, options) => { - let max = null; - let maxSV = null; - let rangeObj = null; - try { - rangeObj = new Range(range, options); - } catch (er) { - return null; - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - if (!max || maxSV.compare(v) === -1) { - max = v; - maxSV = new SemVer2(max, options); - } - } - }); - return max; - }; - module2.exports = maxSatisfying; - } -}); - -// node_modules/semver/ranges/min-satisfying.js -var require_min_satisfying = __commonJS({ - "node_modules/semver/ranges/min-satisfying.js"(exports, module2) { - var SemVer2 = require_semver(); - var Range = require_range(); - var minSatisfying = (versions, range, options) => { - let min = null; - let minSV = null; - let rangeObj = null; - try { - rangeObj = new Range(range, options); - } catch (er) { - return null; - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - if (!min || minSV.compare(v) === 1) { - min = v; - minSV = new SemVer2(min, options); - } - } - }); - return min; - }; - module2.exports = minSatisfying; - } -}); - -// node_modules/semver/ranges/min-version.js -var require_min_version = __commonJS({ - "node_modules/semver/ranges/min-version.js"(exports, module2) { - var SemVer2 = require_semver(); - var Range = require_range(); - var gt = require_gt(); - var minVersion = (range, loose) => { - range = new Range(range, loose); - let minver = new SemVer2("0.0.0"); - if (range.test(minver)) { - return minver; - } - minver = new SemVer2("0.0.0-0"); - if (range.test(minver)) { - return minver; - } - minver = null; - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i]; - let setMin = null; - comparators.forEach((comparator) => { - const compver = new SemVer2(comparator.semver.version); - switch (comparator.operator) { - case ">": - if (compver.prerelease.length === 0) { - compver.patch++; - } else { - compver.prerelease.push(0); - } - compver.raw = compver.format(); - case "": - case ">=": - if (!setMin || gt(compver, setMin)) { - setMin = compver; - } - break; - case "<": - case "<=": - break; - default: - throw new Error(`Unexpected operation: ${comparator.operator}`); - } - }); - if (setMin && (!minver || gt(minver, setMin))) { - minver = setMin; - } - } - if (minver && range.test(minver)) { - return minver; - } - return null; - }; - module2.exports = minVersion; - } -}); - -// node_modules/semver/ranges/valid.js -var require_valid2 = __commonJS({ - "node_modules/semver/ranges/valid.js"(exports, module2) { - var Range = require_range(); - var validRange = (range, options) => { - try { - return new Range(range, options).range || "*"; - } catch (er) { - return null; - } - }; - module2.exports = validRange; - } -}); - -// node_modules/semver/ranges/outside.js -var require_outside = __commonJS({ - "node_modules/semver/ranges/outside.js"(exports, module2) { - var SemVer2 = require_semver(); - var Comparator = require_comparator(); - var { ANY } = Comparator; - var Range = require_range(); - var satisfies = require_satisfies(); - var gt = require_gt(); - var lt = require_lt(); - var lte = require_lte(); - var gte = require_gte(); - var outside = (version2, range, hilo, options) => { - version2 = new SemVer2(version2, options); - range = new Range(range, options); - let gtfn, ltefn, ltfn, comp, ecomp; - switch (hilo) { - case ">": - gtfn = gt; - ltefn = lte; - ltfn = lt; - comp = ">"; - ecomp = ">="; - break; - case "<": - gtfn = lt; - ltefn = gte; - ltfn = gt; - comp = "<"; - ecomp = "<="; - break; - default: - throw new TypeError('Must provide a hilo val of "<" or ">"'); - } - if (satisfies(version2, range, options)) { - return false; - } - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i]; - let high = null; - let low = null; - comparators.forEach((comparator) => { - if (comparator.semver === ANY) { - comparator = new Comparator(">=0.0.0"); - } - high = high || comparator; - low = low || comparator; - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator; - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator; - } - }); - if (high.operator === comp || high.operator === ecomp) { - return false; - } - if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) { - return false; - } else if (low.operator === ecomp && ltfn(version2, low.semver)) { - return false; - } - } - return true; - }; - module2.exports = outside; - } -}); - -// node_modules/semver/ranges/gtr.js -var require_gtr = __commonJS({ - "node_modules/semver/ranges/gtr.js"(exports, module2) { - var outside = require_outside(); - var gtr = (version2, range, options) => outside(version2, range, ">", options); - module2.exports = gtr; - } -}); - -// node_modules/semver/ranges/ltr.js -var require_ltr = __commonJS({ - "node_modules/semver/ranges/ltr.js"(exports, module2) { - var outside = require_outside(); - var ltr = (version2, range, options) => outside(version2, range, "<", options); - module2.exports = ltr; - } -}); - -// node_modules/semver/ranges/intersects.js -var require_intersects = __commonJS({ - "node_modules/semver/ranges/intersects.js"(exports, module2) { - var Range = require_range(); - var intersects = (r1, r2, options) => { - r1 = new Range(r1, options); - r2 = new Range(r2, options); - return r1.intersects(r2, options); - }; - module2.exports = intersects; - } -}); - -// node_modules/semver/ranges/simplify.js -var require_simplify = __commonJS({ - "node_modules/semver/ranges/simplify.js"(exports, module2) { - var satisfies = require_satisfies(); - var compare2 = require_compare(); - module2.exports = (versions, range, options) => { - const set = []; - let first = null; - let prev = null; - const v = versions.sort((a, b) => compare2(a, b, options)); - for (const version2 of v) { - const included = satisfies(version2, range, options); - if (included) { - prev = version2; - if (!first) { - first = version2; - } - } else { - if (prev) { - set.push([first, prev]); - } - prev = null; - first = null; - } - } - if (first) { - set.push([first, null]); - } - const ranges = []; - for (const [min, max] of set) { - if (min === max) { - ranges.push(min); - } else if (!max && min === v[0]) { - ranges.push("*"); - } else if (!max) { - ranges.push(`>=${min}`); - } else if (min === v[0]) { - ranges.push(`<=${max}`); - } else { - ranges.push(`${min} - ${max}`); - } - } - const simplified = ranges.join(" || "); - const original = typeof range.raw === "string" ? range.raw : String(range); - return simplified.length < original.length ? simplified : range; - }; - } -}); - -// node_modules/semver/ranges/subset.js -var require_subset = __commonJS({ - "node_modules/semver/ranges/subset.js"(exports, module2) { - var Range = require_range(); - var Comparator = require_comparator(); - var { ANY } = Comparator; - var satisfies = require_satisfies(); - var compare2 = require_compare(); - var subset = (sub, dom, options = {}) => { - if (sub === dom) { - return true; - } - sub = new Range(sub, options); - dom = new Range(dom, options); - let sawNonNull = false; - OUTER: - for (const simpleSub of sub.set) { - for (const simpleDom of dom.set) { - const isSub = simpleSubset(simpleSub, simpleDom, options); - sawNonNull = sawNonNull || isSub !== null; - if (isSub) { - continue OUTER; - } - } - if (sawNonNull) { - return false; - } - } - return true; - }; - var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")]; - var minimumVersion = [new Comparator(">=0.0.0")]; - var simpleSubset = (sub, dom, options) => { - if (sub === dom) { - return true; - } - if (sub.length === 1 && sub[0].semver === ANY) { - if (dom.length === 1 && dom[0].semver === ANY) { - return true; - } else if (options.includePrerelease) { - sub = minimumVersionWithPreRelease; - } else { - sub = minimumVersion; - } - } - if (dom.length === 1 && dom[0].semver === ANY) { - if (options.includePrerelease) { - return true; - } else { - dom = minimumVersion; - } - } - const eqSet = /* @__PURE__ */ new Set(); - let gt, lt; - for (const c of sub) { - if (c.operator === ">" || c.operator === ">=") { - gt = higherGT(gt, c, options); - } else if (c.operator === "<" || c.operator === "<=") { - lt = lowerLT(lt, c, options); - } else { - eqSet.add(c.semver); - } - } - if (eqSet.size > 1) { - return null; - } - let gtltComp; - if (gt && lt) { - gtltComp = compare2(gt.semver, lt.semver, options); - if (gtltComp > 0) { - return null; - } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) { - return null; - } - } - for (const eq of eqSet) { - if (gt && !satisfies(eq, String(gt), options)) { - return null; - } - if (lt && !satisfies(eq, String(lt), options)) { - return null; - } - for (const c of dom) { - if (!satisfies(eq, String(c), options)) { - return false; - } - } - return true; - } - let higher, lower; - let hasDomLT, hasDomGT; - let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false; - let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false; - if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) { - needDomLTPre = false; - } - for (const c of dom) { - hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">="; - hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<="; - if (gt) { - if (needDomGTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) { - needDomGTPre = false; - } - } - if (c.operator === ">" || c.operator === ">=") { - higher = higherGT(gt, c, options); - if (higher === c && higher !== gt) { - return false; - } - } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) { - return false; - } - } - if (lt) { - if (needDomLTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) { - needDomLTPre = false; - } - } - if (c.operator === "<" || c.operator === "<=") { - lower = lowerLT(lt, c, options); - if (lower === c && lower !== lt) { - return false; - } - } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) { - return false; - } - } - if (!c.operator && (lt || gt) && gtltComp !== 0) { - return false; - } - } - if (gt && hasDomLT && !lt && gtltComp !== 0) { - return false; - } - if (lt && hasDomGT && !gt && gtltComp !== 0) { - return false; - } - if (needDomGTPre || needDomLTPre) { - return false; - } - return true; - }; - var higherGT = (a, b, options) => { - if (!a) { - return b; - } - const comp = compare2(a.semver, b.semver, options); - return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a; - }; - var lowerLT = (a, b, options) => { - if (!a) { - return b; - } - const comp = compare2(a.semver, b.semver, options); - return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a; - }; - module2.exports = subset; - } -}); - -// node_modules/semver/index.js -var require_semver2 = __commonJS({ - "node_modules/semver/index.js"(exports, module2) { - var internalRe = require_re(); - var constants = require_constants(); - var SemVer2 = require_semver(); - var identifiers = require_identifiers(); - var parse2 = require_parse(); - var valid = require_valid(); - var clean = require_clean(); - var inc = require_inc(); - var diff2 = require_diff(); - var major = require_major(); - var minor = require_minor(); - var patch = require_patch(); - var prerelease = require_prerelease(); - var compare2 = require_compare(); - var rcompare = require_rcompare(); - var compareLoose = require_compare_loose(); - var compareBuild = require_compare_build(); - var sort = require_sort(); - var rsort = require_rsort(); - var gt = require_gt(); - var lt = require_lt(); - var eq = require_eq(); - var neq = require_neq(); - var gte = require_gte(); - var lte = require_lte(); - var cmp = require_cmp(); - var coerce = require_coerce(); - var Comparator = require_comparator(); - var Range = require_range(); - var satisfies = require_satisfies(); - var toComparators = require_to_comparators(); - var maxSatisfying = require_max_satisfying(); - var minSatisfying = require_min_satisfying(); - var minVersion = require_min_version(); - var validRange = require_valid2(); - var outside = require_outside(); - var gtr = require_gtr(); - var ltr = require_ltr(); - var intersects = require_intersects(); - var simplifyRange = require_simplify(); - var subset = require_subset(); - module2.exports = { - parse: parse2, - valid, - clean, - inc, - diff: diff2, - major, - minor, - patch, - prerelease, - compare: compare2, - rcompare, - compareLoose, - compareBuild, - sort, - rsort, - gt, - lt, - eq, - neq, - gte, - lte, - cmp, - coerce, - Comparator, - Range, - satisfies, - toComparators, - maxSatisfying, - minSatisfying, - minVersion, - validRange, - outside, - gtr, - ltr, - intersects, - simplifyRange, - subset, - SemVer: SemVer2, - re: internalRe.re, - src: internalRe.src, - tokens: internalRe.t, - SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, - RELEASE_TYPES: constants.RELEASE_TYPES, - compareIdentifiers: identifiers.compareIdentifiers, - rcompareIdentifiers: identifiers.rcompareIdentifiers - }; - } -}); - // node_modules/@jsdevtools/ono/cjs/to-json.js var require_to_json = __commonJS({ "node_modules/@jsdevtools/ono/cjs/to-json.js"(exports) { @@ -4961,52 +2559,100 @@ var require_cjs = __commonJS({ }); // src/action/index.ts -var import_core = __toESM(require_core()); +var actionsCore = __toESM(require_core()); -// src/npm-publish.ts -var semver = __toESM(require_semver2()); +// src/read-manifest.ts +var import_promises = __toESM(require("node:fs/promises")); +var import_node_path = __toESM(require("node:path")); +var import_ono = __toESM(require_cjs()); +async function readManifest(packagePath) { + let manifestPath = packagePath; + if (!manifestPath) { + manifestPath = "package.json"; + } else if (import_node_path.default.extname(manifestPath) === "") { + manifestPath = import_node_path.default.join(manifestPath, "package.json"); + } + let json; + try { + json = await import_promises.default.readFile(manifestPath, "utf8"); + } catch (error) { + throw (0, import_ono.ono)(error, `Unable to read ${manifestPath}`); + } + try { + const { name, version: version2 } = JSON.parse(json); + if (typeof name !== "string" || name.trim().length === 0) { + throw new TypeError("Invalid package name"); + } + if (typeof version2 !== "string" || version2.trim().length === 0) { + throw new TypeError("Invalid package version"); + } + return { name: name.trim(), version: version2.trim() }; + } catch (error) { + throw (0, import_ono.ono)(error, `Unable to parse ${manifestPath}`); + } +} + +// src/errors.ts +var InvalidRegistryUrlError = class extends TypeError { + constructor(value) { + super(`The given value "${String(value)}" is not a valid registry URL`); + this.name = "InvalidRegistryUrlError"; + } +}; +var InvalidTokenError = class extends TypeError { + constructor() { + super("The given value [omitted for security] is not a valid token"); + this.name = "InvalidTokenError"; + } +}; // src/normalize-options.ts -var import_node_path = __toESM(require("node:path")); -function normalizeOptions(options) { - var _a; - return { - ...options, - token: options.token ?? "", - registry: options.registry ?? "https://registry.npmjs.org/", - tag: options.tag ?? "latest", - package: ((_a = options.package) == null ? void 0 : _a.endsWith("package.json")) ? import_node_path.default.dirname(options.package) : options.package +var DEFAULT_REGISTRY_URL = new URL("https://registry.npmjs.org/"); +var DEFAULT_TAG = "latest"; +var DEFAULT_ACCESS = "public"; +var DEFAULT_ACCESS_SCOPED = "restricted"; +var DEFAULT_STRATEGY = "upgrade"; +var setValue = (value, defaultValue) => ({ + value: value ?? defaultValue, + isDefault: value === void 0 || value === defaultValue +}); +var setUrlValue = (value, defaultValue) => ({ + value: value ?? defaultValue, + isDefault: value === void 0 || (value == null ? void 0 : value.href) === defaultValue.href +}); +function normalizeOptions(options, manifest) { + let defaultRegistryUrl = DEFAULT_REGISTRY_URL; + let defaultTag = DEFAULT_TAG; + let defaultAccess = manifest.scope ? DEFAULT_ACCESS_SCOPED : DEFAULT_ACCESS; + let registryUrl; + if (options.registryUrl !== void 0) { + try { + registryUrl = new URL(options.registryUrl); + } catch { + throw new InvalidRegistryUrlError(options.registryUrl); + } + } + if (options.token !== void 0 && typeof options.token !== "string") { + throw new InvalidTokenError(); + } + const authConfig = { + token: { value: options.token, isDefault: false }, + registryUrl: setUrlValue(registryUrl, defaultRegistryUrl) }; + const publishConfig = { + packageSpec: setValue(void 0, ""), + tag: setValue(void 0, defaultTag), + access: setValue(void 0, defaultAccess), + dryRun: setValue(void 0, false), + strategy: setValue(void 0, DEFAULT_STRATEGY) + }; + return { authConfig, publishConfig }; } // src/npm/use-npm-env.ts -var import_promises = __toESM(require("node:fs/promises")); +var import_promises2 = __toESM(require("node:fs/promises")); var import_node_os = __toESM(require("node:os")); var import_node_path2 = __toESM(require("node:path")); -async function useNpmEnv(auth, task) { - const { registry, token } = auth; - const tempDir = await import_promises.default.mkdtemp(import_node_path2.default.join(import_node_os.default.tmpdir(), "npm-publish-")); - const tempConfigFile = import_node_path2.default.join(tempDir, ".npmrc"); - const registryUrl = new URL(registry); - const config = [ - "; added by jsdevtools/npm-publish", - `registry=${registry}`, - `//${registryUrl.hostname}/:authToken=\${NODE_AUTH_TOKEN}`, - "" - ].join(import_node_os.default.EOL); - const env = { - /* eslint-disable @typescript-eslint/naming-convention */ - NODE_AUTH_TOKEN: token, - npm_config_userconfig: tempConfigFile - /* eslint-enable @typescript-eslint/naming-convention */ - }; - await import_promises.default.writeFile(tempConfigFile, config, "utf8"); - try { - return await task(env); - } finally { - await import_promises.default.rm(tempDir, { force: true, recursive: true }); - } -} // src/npm/call-npm-cli.ts var import_node_child_process = __toESM(require("node:child_process")); @@ -5034,7 +2680,7 @@ var parseJson = (value) => { async function callNpmCli(command, args, options = {}) { var _a, _b; const { stdout, error } = await execProcess( - ["npm", command, "--json", ...args].join(" "), + ["npm", command, "--ignore-scripts", "--json", ...args].join(" "), options == null ? void 0 : options.env ); if (error) { @@ -5048,23 +2694,49 @@ async function callNpmCli(command, args, options = {}) { return parseJson(stdout) ?? stdout; } +// src/npm/use-npm-env.ts +async function useNpmEnv(auth, task) { + const { registryUrl, token } = auth; + const tempDir = await import_promises2.default.mkdtemp(import_node_path2.default.join(import_node_os.default.tmpdir(), "npm-publish-")); + const tempConfigFile = import_node_path2.default.join(tempDir, ".npmrc"); + const userConfigFile = await callNpmCli("config", ["get", "userconfig"]); + const userConfig = await import_promises2.default.readFile(userConfigFile, "utf8").catch((error) => { + if (error.code === "ENOENT") + return ""; + throw error; + }); + const config = [ + `; copied from ${userConfig}`, + userConfig, + "; added by jsdevtools/npm-publish", + `registry=${registryUrl.value.href}`, + `//${registryUrl.value.hostname}/:authToken=\${NODE_AUTH_TOKEN}`, + "" + ].join(import_node_os.default.EOL); + const env = { npm_config_userconfig: tempConfigFile }; + if (token.value) { + env.NODE_AUTH_TOKEN = token.value; + } + await import_promises2.default.writeFile(tempConfigFile, config, "utf8"); + try { + return await task(env); + } finally { + await import_promises2.default.rm(tempDir, { force: true, recursive: true }); + } +} + // src/npm/get-publish-args.ts function getPublishArgs(config) { const { packageSpec, tag, access, dryRun } = config; - const args = []; - if (packageSpec !== void 0) { - args.push(packageSpec); - } - if (tag !== void 0) { - args.push("--tag", tag); - } - if (access !== void 0) { - args.push("--access", access); - } - if (dryRun !== void 0) { - args.push("--dry-run", JSON.stringify(dryRun)); - } - return args; + return [ + packageSpec.value, + "--tag", + tag.value, + "--access", + access.value, + "--dry-run", + JSON.stringify(dryRun.value) + ]; } // src/npm/index.ts @@ -5084,135 +2756,100 @@ async function publish(publishConfig, authConfig) { }); } -// src/read-manifest.ts -var import_promises2 = __toESM(require("node:fs/promises")); -var import_node_path3 = __toESM(require("node:path")); -var import_semver = __toESM(require_semver2()); -var import_ono = __toESM(require_cjs()); -async function readManifest(packageSpec, debug2) { - const packageManifest = import_node_path3.default.join(packageSpec ?? ".", "package.json"); - debug2 && debug2(`Reading manifest from ${import_node_path3.default.resolve(packageManifest)}`); - let json; - try { - json = await import_promises2.default.readFile(packageManifest, "utf8"); - } catch (error) { - throw (0, import_ono.ono)(error, `Unable to read ${packageManifest}`); - } - try { - let { name, version: version2 } = JSON.parse(json); - if (typeof name !== "string" || name.trim().length === 0) { - throw new TypeError("Invalid package name"); - } - let manifest = { - name, - version: new import_semver.SemVer(version2) - }; - debug2 && debug2("MANIFEST:", manifest); - return manifest; - } catch (error) { - throw (0, import_ono.ono)(error, `Unable to parse ${packageManifest}`); - } +// src/compare-versions.ts +function compareVersions(versions, publishConfig) { + throw new Error("ah"); } // src/npm-publish.ts -async function npmPublish(opts = {}) { - var _a; - const { registry, token, ...options } = normalizeOptions(opts); - const authOptions = { registry, token }; - const manifest = await readManifest(options.package, options.debug); - const versions = await getVersions(manifest.name, authOptions); - const publishedVersion = versions["dist-tags"][options.tag] ?? "0.0.0"; - let diff2 = semver.diff(manifest.version, publishedVersion); - let cmp = semver.compare(manifest.version, publishedVersion); - let shouldPublish = ( - // compare returns 1 if manifest is higher than published - options.greaterVersionOnly && cmp === 1 || // compare returns 0 if the manifest is the same as published - cmp !== 0 - ); - if (shouldPublish) { - await publish(options, authOptions); +async function npmPublish(options) { + const manifest = await readManifest(options.package); + const { authConfig, publishConfig } = normalizeOptions(options, manifest); + const publishedVersions = await getVersions(manifest.name, authConfig); + const versionComparison = compareVersions(publishedVersions, publishConfig); + let publishResult; + if (versionComparison.releaseType !== void 0) { + publishResult = await publish(publishConfig, authConfig); } - let results = { - package: manifest.name, - registry: authOptions.registry, - // The version should be marked as lower if we disallow decrementing the version - type: options.greaterVersionOnly && cmp === -1 && "lower" || diff2 || "none", - version: manifest.version.raw, - oldVersion: publishedVersion, - tag: options.tag, - access: options.access || (manifest.name.startsWith("@") ? "restricted" : "public"), - dryRun: options.dryRun ?? false + return { + id: publishResult == null ? void 0 : publishResult.id, + name: manifest.name, + version: manifest.version, + releaseType: versionComparison.releaseType, + previousVersion: versionComparison.previousVersion, + tag: publishConfig.tag.value, + access: publishConfig.access.value, + dryRun: publishConfig.dryRun.value, + registryUrl: authConfig.registryUrl.value }; - (_a = options.debug) == null ? void 0 : _a.call(options, "OUTPUT:", results); - return results; } // src/action/index.ts async function main() { + var _a; try { process.on("uncaughtException", errorHandler); process.on("unhandledRejection", errorHandler); const options = { - token: (0, import_core.getInput)("token", { required: true }), - registry: (0, import_core.getInput)("registry", { required: true }), - package: (0, import_core.getInput)("package", { required: true }), - checkVersion: (0, import_core.getInput)("check-version", { required: true }).toLowerCase() === "true", - tag: (0, import_core.getInput)("tag"), - access: (0, import_core.getInput)("access"), - dryRun: (0, import_core.getInput)("dry-run").toLowerCase() === "true", - greaterVersionOnly: (0, import_core.getInput)("greater-version-only").toLowerCase() === "true", - debug: debugHandler + token: getInput2("token", true), + package: getInput2("package"), + registryUrl: getInput2("registryUrl"), + tag: getInput2("tag"), + access: getInput2("access"), + strategy: getInput2("strategy"), + dryRun: ((_a = getInput2("dry-run")) == null ? void 0 : _a.toLowerCase()) === "true" }; let results = await npmPublish(options); - if (results.type === "none") { + if (!results.releaseType) { console.log( ` -\u{1F4E6} ${results.package} v${results.version} is already published to ${options.registry}` +\u{1F4E6} ${results.name} v${results.version} is already published to ${results.registryUrl}` ); } - if (results.type === "lower") { + if (results.releaseType === "lower") { console.log( ` -\u{1F4E6} ${results.package} v${results.version} is lower than the version published to ${options.registry}` +\u{1F4E6} ${results.name} v${results.version} is lower than the version published to ${results.registryUrl}` ); } else if (results.dryRun) { console.log( ` -\u{1F4E6} ${results.package} v${results.version} was NOT actually published to ${options.registry} (dry run)` +\u{1F4E6} ${results.name} v${results.version} was NOT actually published to ${results.registryUrl} (dry run)` ); } else { console.log( ` -\u{1F4E6} Successfully published ${results.package} v${results.version} to ${options.registry}` +\u{1F4E6} Successfully published ${results.name} v${results.version} to ${results.registryUrl}` ); } - setOutput("type", results.type); - setOutput("version", results.version); - setOutput("old-version", results.oldVersion); - setOutput("tag", results.tag); - setOutput("access", results.access); - setOutput("dry-run", results.dryRun); + setOutput2("id", results.id); + setOutput2("name", results.name); + setOutput2("version", results.version); + setOutput2("release-type", results.releaseType); + setOutput2("previous-version", results.previousVersion); + setOutput2("tag", results.tag); + setOutput2("access", results.access); + setOutput2("registry-url", results.registryUrl); + setOutput2("dry-run", results.dryRun); } catch (error) { errorHandler(error); } } -function setOutput(...args) { +function getInput2(name, required) { + const value = actionsCore.getInput(name, { required }); + return value === "" ? void 0 : value; +} +function setOutput2(...args) { if (process.env.NODE_ENV === "test") { console.log(`TEST::set-output name=${args[0]}::${args[1]}`); return; } - return (0, import_core.setOutput)(...args); + return actionsCore.setOutput(...args); } function errorHandler(error) { let message = error.stack || error.message || String(error); - (0, import_core.setFailed)(message); + actionsCore.setFailed(message); process.exit(); } -function debugHandler(message, data) { - if (data) { - message += "\n" + JSON.stringify(data, void 0, 2); - } - (0, import_core.debug)(message); -} main(); //# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map index 4589f17..b0732a2 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1,7 +1,7 @@ { "version": 3, - "sources": ["../node_modules/@actions/core/src/utils.ts", "../node_modules/@actions/core/src/command.ts", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js", "../node_modules/@actions/core/src/file-command.ts", "../node_modules/@actions/http-client/src/proxy.ts", "../node_modules/tunnel/lib/tunnel.js", "../node_modules/tunnel/index.js", "../node_modules/@actions/http-client/src/index.ts", "../node_modules/@actions/http-client/src/auth.ts", "../node_modules/@actions/core/src/oidc-utils.ts", "../node_modules/@actions/core/src/summary.ts", "../node_modules/@actions/core/src/path-utils.ts", "../node_modules/@actions/core/src/core.ts", "../node_modules/semver/internal/constants.js", "../node_modules/semver/internal/debug.js", "../node_modules/semver/internal/re.js", "../node_modules/semver/internal/parse-options.js", "../node_modules/semver/internal/identifiers.js", "../node_modules/semver/classes/semver.js", "../node_modules/semver/functions/parse.js", "../node_modules/semver/functions/valid.js", "../node_modules/semver/functions/clean.js", "../node_modules/semver/functions/inc.js", "../node_modules/semver/functions/compare.js", "../node_modules/semver/functions/eq.js", "../node_modules/semver/functions/diff.js", "../node_modules/semver/functions/major.js", "../node_modules/semver/functions/minor.js", "../node_modules/semver/functions/patch.js", "../node_modules/semver/functions/prerelease.js", "../node_modules/semver/functions/rcompare.js", "../node_modules/semver/functions/compare-loose.js", "../node_modules/semver/functions/compare-build.js", "../node_modules/semver/functions/sort.js", "../node_modules/semver/functions/rsort.js", "../node_modules/semver/functions/gt.js", "../node_modules/semver/functions/lt.js", "../node_modules/semver/functions/neq.js", "../node_modules/semver/functions/gte.js", "../node_modules/semver/functions/lte.js", "../node_modules/semver/functions/cmp.js", "../node_modules/semver/functions/coerce.js", "../node_modules/semver/node_modules/yallist/iterator.js", "../node_modules/semver/node_modules/yallist/yallist.js", "../node_modules/semver/node_modules/lru-cache/index.js", "../node_modules/semver/classes/range.js", "../node_modules/semver/classes/comparator.js", "../node_modules/semver/functions/satisfies.js", "../node_modules/semver/ranges/to-comparators.js", "../node_modules/semver/ranges/max-satisfying.js", "../node_modules/semver/ranges/min-satisfying.js", "../node_modules/semver/ranges/min-version.js", "../node_modules/semver/ranges/valid.js", "../node_modules/semver/ranges/outside.js", "../node_modules/semver/ranges/gtr.js", "../node_modules/semver/ranges/ltr.js", "../node_modules/semver/ranges/intersects.js", "../node_modules/semver/ranges/simplify.js", "../node_modules/semver/ranges/subset.js", "../node_modules/semver/index.js", "../node_modules/@jsdevtools/ono/src/to-json.ts", "../node_modules/@jsdevtools/ono/src/isomorphic.node.ts", "../node_modules/@jsdevtools/ono/src/stack.ts", "../node_modules/@jsdevtools/ono/src/extend-error.ts", "../node_modules/@jsdevtools/ono/src/normalize.ts", "../node_modules/@jsdevtools/ono/src/constructor.ts", "../node_modules/@jsdevtools/ono/src/singleton.ts", "../node_modules/@jsdevtools/ono/src/types.ts", "../node_modules/@jsdevtools/ono/src/index.ts", "../src/action/index.ts", "../src/npm-publish.ts", "../src/normalize-options.ts", "../src/npm/use-npm-env.ts", "../src/npm/call-npm-cli.ts", "../src/npm/get-publish-args.ts", "../src/npm/index.ts", "../src/read-manifest.ts"], - "sourcesContent": [null, null, "import crypto from 'crypto';\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\nexport default function rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n crypto.randomFillSync(rnds8Pool);\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}", "export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;", "import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;", "import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;", "import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;", "import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;", "import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}", "import crypto from 'crypto';\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('md5').update(bytes).digest();\n}\n\nexport default md5;", "import v35 from './v35.js';\nimport md5 from './md5.js';\nconst v3 = v35('v3', 0x30, md5);\nexport default v3;", "import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;", "import crypto from 'crypto';\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('sha1').update(bytes).digest();\n}\n\nexport default sha1;", "import v35 from './v35.js';\nimport sha1 from './sha1.js';\nconst v5 = v35('v5', 0x50, sha1);\nexport default v5;", "export default '00000000-0000-0000-0000-000000000000';", "import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;", "export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';", null, null, "'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n", "module.exports = require('./lib/tunnel');\n", null, null, null, null, null, null, "// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n", "const debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n", "const { MAX_SAFE_COMPONENT_LENGTH } = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst src = exports.src = []\nconst t = exports.t = {}\nlet R = 0\n\nconst createToken = (name, value, isGlobal) => {\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '[0-9]+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', '\\\\d*[a-zA-Z-][a-zA-Z0-9-]*')\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+')\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCE', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n", "// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n", "const numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n", "const debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0)\n }\n }\n if (identifier) {\n const base = Number(identifierBase) ? 1 : 0\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, base]\n }\n } else {\n this.prerelease = [identifier, base]\n }\n }\n break\n\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.format()\n this.raw = this.version\n return this\n }\n}\n\nmodule.exports = SemVer\n", "const { MAX_LENGTH } = require('../internal/constants')\nconst SemVer = require('../classes/semver')\nconst parse = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n try {\n return new SemVer(version, options)\n } catch (er) {\n return null\n }\n}\n\nmodule.exports = parse\n", "const parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n", "const parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n", "const SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n", "const SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n", "const compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n", "const parse = require('./parse')\nconst eq = require('./eq')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1)\n const v2 = parse(version2)\n if (eq(v1, v2)) {\n return null\n } else {\n const hasPre = v1.prerelease.length || v2.prerelease.length\n const prefix = hasPre ? 'pre' : ''\n const defaultResult = hasPre ? 'prerelease' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n if (!v1.prerelease.length || !v2.prerelease.length) {\n if (v1.patch) {\n return 'patch'\n }\n if (v1.minor) {\n return 'minor'\n }\n if (v1.major) {\n return 'major'\n }\n }\n return defaultResult // may be undefined\n }\n}\nmodule.exports = diff\n", "const SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n", "const SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n", "const SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n", "const parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n", "const compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n", "const compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n", "const SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n", "const compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n", "const compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n", "const compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n", "const compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n", "const compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n", "const compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n", "const compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n", "const eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n", "const SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n let next\n while ((next = re[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n re[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)\n}\nmodule.exports = coerce\n", "'use strict'\nmodule.exports = function (Yallist) {\n Yallist.prototype[Symbol.iterator] = function* () {\n for (let walker = this.head; walker; walker = walker.next) {\n yield walker.value\n }\n }\n}\n", "'use strict'\nmodule.exports = Yallist\n\nYallist.Node = Node\nYallist.create = Yallist\n\nfunction Yallist (list) {\n var self = this\n if (!(self instanceof Yallist)) {\n self = new Yallist()\n }\n\n self.tail = null\n self.head = null\n self.length = 0\n\n if (list && typeof list.forEach === 'function') {\n list.forEach(function (item) {\n self.push(item)\n })\n } else if (arguments.length > 0) {\n for (var i = 0, l = arguments.length; i < l; i++) {\n self.push(arguments[i])\n }\n }\n\n return self\n}\n\nYallist.prototype.removeNode = function (node) {\n if (node.list !== this) {\n throw new Error('removing node which does not belong to this list')\n }\n\n var next = node.next\n var prev = node.prev\n\n if (next) {\n next.prev = prev\n }\n\n if (prev) {\n prev.next = next\n }\n\n if (node === this.head) {\n this.head = next\n }\n if (node === this.tail) {\n this.tail = prev\n }\n\n node.list.length--\n node.next = null\n node.prev = null\n node.list = null\n\n return next\n}\n\nYallist.prototype.unshiftNode = function (node) {\n if (node === this.head) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var head = this.head\n node.list = this\n node.next = head\n if (head) {\n head.prev = node\n }\n\n this.head = node\n if (!this.tail) {\n this.tail = node\n }\n this.length++\n}\n\nYallist.prototype.pushNode = function (node) {\n if (node === this.tail) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var tail = this.tail\n node.list = this\n node.prev = tail\n if (tail) {\n tail.next = node\n }\n\n this.tail = node\n if (!this.head) {\n this.head = node\n }\n this.length++\n}\n\nYallist.prototype.push = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n push(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.unshift = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n unshift(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.pop = function () {\n if (!this.tail) {\n return undefined\n }\n\n var res = this.tail.value\n this.tail = this.tail.prev\n if (this.tail) {\n this.tail.next = null\n } else {\n this.head = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.shift = function () {\n if (!this.head) {\n return undefined\n }\n\n var res = this.head.value\n this.head = this.head.next\n if (this.head) {\n this.head.prev = null\n } else {\n this.tail = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.forEach = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.head, i = 0; walker !== null; i++) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.next\n }\n}\n\nYallist.prototype.forEachReverse = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.prev\n }\n}\n\nYallist.prototype.get = function (n) {\n for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.next\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.getReverse = function (n) {\n for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.prev\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.map = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.head; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.next\n }\n return res\n}\n\nYallist.prototype.mapReverse = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.tail; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.prev\n }\n return res\n}\n\nYallist.prototype.reduce = function (fn, initial) {\n var acc\n var walker = this.head\n if (arguments.length > 1) {\n acc = initial\n } else if (this.head) {\n walker = this.head.next\n acc = this.head.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = 0; walker !== null; i++) {\n acc = fn(acc, walker.value, i)\n walker = walker.next\n }\n\n return acc\n}\n\nYallist.prototype.reduceReverse = function (fn, initial) {\n var acc\n var walker = this.tail\n if (arguments.length > 1) {\n acc = initial\n } else if (this.tail) {\n walker = this.tail.prev\n acc = this.tail.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = this.length - 1; walker !== null; i--) {\n acc = fn(acc, walker.value, i)\n walker = walker.prev\n }\n\n return acc\n}\n\nYallist.prototype.toArray = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.head; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.next\n }\n return arr\n}\n\nYallist.prototype.toArrayReverse = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.tail; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.prev\n }\n return arr\n}\n\nYallist.prototype.slice = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\n walker = walker.next\n }\n for (; walker !== null && i < to; i++, walker = walker.next) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.sliceReverse = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\n walker = walker.prev\n }\n for (; walker !== null && i > from; i--, walker = walker.prev) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.splice = function (start, deleteCount, ...nodes) {\n if (start > this.length) {\n start = this.length - 1\n }\n if (start < 0) {\n start = this.length + start;\n }\n\n for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\n walker = walker.next\n }\n\n var ret = []\n for (var i = 0; walker && i < deleteCount; i++) {\n ret.push(walker.value)\n walker = this.removeNode(walker)\n }\n if (walker === null) {\n walker = this.tail\n }\n\n if (walker !== this.head && walker !== this.tail) {\n walker = walker.prev\n }\n\n for (var i = 0; i < nodes.length; i++) {\n walker = insert(this, walker, nodes[i])\n }\n return ret;\n}\n\nYallist.prototype.reverse = function () {\n var head = this.head\n var tail = this.tail\n for (var walker = head; walker !== null; walker = walker.prev) {\n var p = walker.prev\n walker.prev = walker.next\n walker.next = p\n }\n this.head = tail\n this.tail = head\n return this\n}\n\nfunction insert (self, node, value) {\n var inserted = node === self.head ?\n new Node(value, null, node, self) :\n new Node(value, node, node.next, self)\n\n if (inserted.next === null) {\n self.tail = inserted\n }\n if (inserted.prev === null) {\n self.head = inserted\n }\n\n self.length++\n\n return inserted\n}\n\nfunction push (self, item) {\n self.tail = new Node(item, self.tail, null, self)\n if (!self.head) {\n self.head = self.tail\n }\n self.length++\n}\n\nfunction unshift (self, item) {\n self.head = new Node(item, null, self.head, self)\n if (!self.tail) {\n self.tail = self.head\n }\n self.length++\n}\n\nfunction Node (value, prev, next, list) {\n if (!(this instanceof Node)) {\n return new Node(value, prev, next, list)\n }\n\n this.list = list\n this.value = value\n\n if (prev) {\n prev.next = this\n this.prev = prev\n } else {\n this.prev = null\n }\n\n if (next) {\n next.prev = this\n this.next = next\n } else {\n this.next = null\n }\n}\n\ntry {\n // add if support for Symbol.iterator is present\n require('./iterator.js')(Yallist)\n} catch (er) {}\n", "'use strict'\n\n// A linked list to keep track of recently-used-ness\nconst Yallist = require('yallist')\n\nconst MAX = Symbol('max')\nconst LENGTH = Symbol('length')\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\nconst ALLOW_STALE = Symbol('allowStale')\nconst MAX_AGE = Symbol('maxAge')\nconst DISPOSE = Symbol('dispose')\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\nconst LRU_LIST = Symbol('lruList')\nconst CACHE = Symbol('cache')\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\n\nconst naiveLength = () => 1\n\n// lruList is a yallist where the head is the youngest\n// item, and the tail is the oldest. the list contains the Hit\n// objects as the entries.\n// Each Hit object has a reference to its Yallist.Node. This\n// never changes.\n//\n// cache is a Map (or PseudoMap) that matches the keys to\n// the Yallist.Node object.\nclass LRUCache {\n constructor (options) {\n if (typeof options === 'number')\n options = { max: options }\n\n if (!options)\n options = {}\n\n if (options.max && (typeof options.max !== 'number' || options.max < 0))\n throw new TypeError('max must be a non-negative number')\n // Kind of weird to have a default max of Infinity, but oh well.\n const max = this[MAX] = options.max || Infinity\n\n const lc = options.length || naiveLength\n this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\n this[ALLOW_STALE] = options.stale || false\n if (options.maxAge && typeof options.maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n this[MAX_AGE] = options.maxAge || 0\n this[DISPOSE] = options.dispose\n this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\n this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\n this.reset()\n }\n\n // resize the cache when the max changes.\n set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }\n get max () {\n return this[MAX]\n }\n\n set allowStale (allowStale) {\n this[ALLOW_STALE] = !!allowStale\n }\n get allowStale () {\n return this[ALLOW_STALE]\n }\n\n set maxAge (mA) {\n if (typeof mA !== 'number')\n throw new TypeError('maxAge must be a non-negative number')\n\n this[MAX_AGE] = mA\n trim(this)\n }\n get maxAge () {\n return this[MAX_AGE]\n }\n\n // resize the cache when the lengthCalculator changes.\n set lengthCalculator (lC) {\n if (typeof lC !== 'function')\n lC = naiveLength\n\n if (lC !== this[LENGTH_CALCULATOR]) {\n this[LENGTH_CALCULATOR] = lC\n this[LENGTH] = 0\n this[LRU_LIST].forEach(hit => {\n hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\n this[LENGTH] += hit.length\n })\n }\n trim(this)\n }\n get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n get length () { return this[LENGTH] }\n get itemCount () { return this[LRU_LIST].length }\n\n rforEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].tail; walker !== null;) {\n const prev = walker.prev\n forEachStep(this, fn, walker, thisp)\n walker = prev\n }\n }\n\n forEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].head; walker !== null;) {\n const next = walker.next\n forEachStep(this, fn, walker, thisp)\n walker = next\n }\n }\n\n keys () {\n return this[LRU_LIST].toArray().map(k => k.key)\n }\n\n values () {\n return this[LRU_LIST].toArray().map(k => k.value)\n }\n\n reset () {\n if (this[DISPOSE] &&\n this[LRU_LIST] &&\n this[LRU_LIST].length) {\n this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\n }\n\n this[CACHE] = new Map() // hash of items by key\n this[LRU_LIST] = new Yallist() // list of items in order of use recency\n this[LENGTH] = 0 // length of items in the list\n }\n\n dump () {\n return this[LRU_LIST].map(hit =>\n isStale(this, hit) ? false : {\n k: hit.key,\n v: hit.value,\n e: hit.now + (hit.maxAge || 0)\n }).toArray().filter(h => h)\n }\n\n dumpLru () {\n return this[LRU_LIST]\n }\n\n set (key, value, maxAge) {\n maxAge = maxAge || this[MAX_AGE]\n\n if (maxAge && typeof maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n\n const now = maxAge ? Date.now() : 0\n const len = this[LENGTH_CALCULATOR](value, key)\n\n if (this[CACHE].has(key)) {\n if (len > this[MAX]) {\n del(this, this[CACHE].get(key))\n return false\n }\n\n const node = this[CACHE].get(key)\n const item = node.value\n\n // dispose of the old one before overwriting\n // split out into 2 ifs for better coverage tracking\n if (this[DISPOSE]) {\n if (!this[NO_DISPOSE_ON_SET])\n this[DISPOSE](key, item.value)\n }\n\n item.now = now\n item.maxAge = maxAge\n item.value = value\n this[LENGTH] += len - item.length\n item.length = len\n this.get(key)\n trim(this)\n return true\n }\n\n const hit = new Entry(key, value, len, now, maxAge)\n\n // oversized objects fall out of cache automatically.\n if (hit.length > this[MAX]) {\n if (this[DISPOSE])\n this[DISPOSE](key, value)\n\n return false\n }\n\n this[LENGTH] += hit.length\n this[LRU_LIST].unshift(hit)\n this[CACHE].set(key, this[LRU_LIST].head)\n trim(this)\n return true\n }\n\n has (key) {\n if (!this[CACHE].has(key)) return false\n const hit = this[CACHE].get(key).value\n return !isStale(this, hit)\n }\n\n get (key) {\n return get(this, key, true)\n }\n\n peek (key) {\n return get(this, key, false)\n }\n\n pop () {\n const node = this[LRU_LIST].tail\n if (!node)\n return null\n\n del(this, node)\n return node.value\n }\n\n del (key) {\n del(this, this[CACHE].get(key))\n }\n\n load (arr) {\n // reset the cache\n this.reset()\n\n const now = Date.now()\n // A previous serialized cache has the most recent items first\n for (let l = arr.length - 1; l >= 0; l--) {\n const hit = arr[l]\n const expiresAt = hit.e || 0\n if (expiresAt === 0)\n // the item was created without expiration in a non aged cache\n this.set(hit.k, hit.v)\n else {\n const maxAge = expiresAt - now\n // dont add already expired items\n if (maxAge > 0) {\n this.set(hit.k, hit.v, maxAge)\n }\n }\n }\n }\n\n prune () {\n this[CACHE].forEach((value, key) => get(this, key, false))\n }\n}\n\nconst get = (self, key, doUse) => {\n const node = self[CACHE].get(key)\n if (node) {\n const hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n return undefined\n } else {\n if (doUse) {\n if (self[UPDATE_AGE_ON_GET])\n node.value.now = Date.now()\n self[LRU_LIST].unshiftNode(node)\n }\n }\n return hit.value\n }\n}\n\nconst isStale = (self, hit) => {\n if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n return false\n\n const diff = Date.now() - hit.now\n return hit.maxAge ? diff > hit.maxAge\n : self[MAX_AGE] && (diff > self[MAX_AGE])\n}\n\nconst trim = self => {\n if (self[LENGTH] > self[MAX]) {\n for (let walker = self[LRU_LIST].tail;\n self[LENGTH] > self[MAX] && walker !== null;) {\n // We know that we're about to delete this one, and also\n // what the next least recently used key will be, so just\n // go ahead and set it now.\n const prev = walker.prev\n del(self, walker)\n walker = prev\n }\n }\n}\n\nconst del = (self, node) => {\n if (node) {\n const hit = node.value\n if (self[DISPOSE])\n self[DISPOSE](hit.key, hit.value)\n\n self[LENGTH] -= hit.length\n self[CACHE].delete(hit.key)\n self[LRU_LIST].removeNode(node)\n }\n}\n\nclass Entry {\n constructor (key, value, length, now, maxAge) {\n this.key = key\n this.value = value\n this.length = length\n this.now = now\n this.maxAge = maxAge || 0\n }\n}\n\nconst forEachStep = (self, fn, node, thisp) => {\n let hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n hit = undefined\n }\n if (hit)\n fn.call(thisp, hit.value, hit.key, self)\n}\n\nmodule.exports = LRUCache\n", "// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.format()\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First, split based on boolean or ||\n this.raw = range\n this.set = range\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${range}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.format()\n }\n\n format () {\n this.range = this.set\n .map((comps) => {\n return comps.join(' ').trim()\n })\n .join('||')\n .trim()\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n range = range.trim()\n\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('lru-cache')\nconst cache = new LRU({ max: 1000 })\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) =>\n comp.trim().split(/\\s+/).map((c) => {\n return replaceTilde(c, options)\n }).join(' ')\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) =>\n comp.trim().split(/\\s+/).map((c) => {\n return replaceCaret(c, options)\n }).join(' ')\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map((c) => {\n return replaceXRange(c, options)\n }).join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp.trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return (`${from} ${to}`).trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n", "const ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n", "const Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n", "const Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n", "const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n", "const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n", "const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n", "const Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n", "const SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n", "// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n", "const outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n", "const Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n", "// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n", "const Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n", "// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n", null, null, null, null, null, null, null, null, null, "import {\n debug,\n getInput,\n setFailed,\n setOutput as setOutputActionsCore,\n} from \"@actions/core\";\nimport { npmPublish } from \"../npm-publish\";\nimport { Access, Options } from \"../options\";\n\n/**\n * The main entry point of the GitHub Action\n *\n * @internal\n */\nasync function main(): Promise {\n try {\n // Setup global error handlers\n process.on(\"uncaughtException\", errorHandler);\n process.on(\"unhandledRejection\", errorHandler);\n\n // Get the GitHub Actions input options\n const options: Options = {\n token: getInput(\"token\", { required: true }),\n registry: getInput(\"registry\", { required: true }),\n package: getInput(\"package\", { required: true }),\n checkVersion:\n getInput(\"check-version\", { required: true }).toLowerCase() === \"true\",\n tag: getInput(\"tag\"),\n access: getInput(\"access\") as Access,\n dryRun: getInput(\"dry-run\").toLowerCase() === \"true\",\n greaterVersionOnly:\n getInput(\"greater-version-only\").toLowerCase() === \"true\",\n debug: debugHandler,\n };\n\n // Publish to NPM\n let results = await npmPublish(options);\n\n if (results.type === \"none\") {\n console.log(\n `\\n\uD83D\uDCE6 ${results.package} v${results.version} is already published to ${options.registry}`\n );\n }\n if (results.type === \"lower\") {\n console.log(\n `\\n\uD83D\uDCE6 ${results.package} v${results.version} is lower than the version published to ${options.registry}`\n );\n } else if (results.dryRun) {\n console.log(\n `\\n\uD83D\uDCE6 ${results.package} v${results.version} was NOT actually published to ${options.registry} (dry run)`\n );\n } else {\n console.log(\n `\\n\uD83D\uDCE6 Successfully published ${results.package} v${results.version} to ${options.registry}`\n );\n }\n\n // Set the GitHub Actions output variables\n setOutput(\"type\", results.type);\n setOutput(\"version\", results.version);\n setOutput(\"old-version\", results.oldVersion);\n setOutput(\"tag\", results.tag);\n setOutput(\"access\", results.access);\n setOutput(\"dry-run\", results.dryRun);\n } catch (error) {\n errorHandler(error as Error);\n }\n}\n\n/**\n * Set output with logging to stdout for test support\n */\nfunction setOutput(...args: Parameters) {\n if (process.env.NODE_ENV === \"test\") {\n console.log(`TEST::set-output name=${args[0]}::${args[1]}`);\n return;\n }\n return setOutputActionsCore(...args);\n}\n\n/**\n * Prints errors to the GitHub Actions console\n */\nfunction errorHandler(error: Error): void {\n let message = error.stack || error.message || String(error);\n setFailed(message);\n process.exit();\n}\n\n/**\n * Prints debug logs to the GitHub Actions console\n */\nfunction debugHandler(message: string, data?: object) {\n if (data) {\n message += \"\\n\" + JSON.stringify(data, undefined, 2);\n }\n\n debug(message);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-floating-promises\nmain();\n", "import * as semver from \"semver\";\nimport { normalizeOptions } from \"./normalize-options\";\nimport { getVersions, publish } from \"./npm\";\nimport { Options } from \"./options\";\nimport { readManifest } from \"./read-manifest\";\nimport { Results } from \"./results\";\n\n/**\n * Publishes a package to NPM, if its version has changed\n */\nexport async function npmPublish(opts: Options = {}): Promise {\n const { registry, token, ...options } = normalizeOptions(opts);\n const authOptions = { registry, token };\n\n // Get the old and new version numbers\n const manifest = await readManifest(options.package, options.debug);\n const versions = await getVersions(manifest.name, authOptions);\n const publishedVersion = versions[\"dist-tags\"][options.tag] ?? \"0.0.0\";\n\n // Determine if/how the version has changed\n let diff = semver.diff(manifest.version, publishedVersion);\n\n // Compare both versions to see if it's changed\n let cmp = semver.compare(manifest.version, publishedVersion);\n\n let shouldPublish =\n // compare returns 1 if manifest is higher than published\n (options.greaterVersionOnly && cmp === 1) ||\n // compare returns 0 if the manifest is the same as published\n cmp !== 0;\n\n if (shouldPublish) {\n // Publish the new version to NPM\n await publish(options, authOptions);\n }\n\n let results: Results = {\n package: manifest.name,\n registry: authOptions.registry,\n // The version should be marked as lower if we disallow decrementing the version\n type:\n (options.greaterVersionOnly && cmp === -1 && \"lower\") || diff || \"none\",\n version: manifest.version.raw,\n oldVersion: publishedVersion,\n tag: options.tag,\n access:\n options.access ||\n (manifest.name.startsWith(\"@\") ? \"restricted\" : \"public\"),\n dryRun: options.dryRun ?? false,\n };\n\n options.debug?.(\"OUTPUT:\", results);\n return results;\n}\n", "import path from \"node:path\";\nimport { Access, Debug, Options } from \"./options\";\n\n/**\n * Normalized and sanitized options\n *\n * @internal\n */\nexport interface NormalizedOptions {\n token: string;\n registry: string;\n package?: string;\n tag: string;\n access?: Access;\n dryRun?: boolean;\n greaterVersionOnly?: boolean;\n quiet?: boolean;\n debug?: Debug;\n}\n\n/**\n * Normalizes and sanitizes options, and fills-in any default values.\n *\n * @internal\n */\nexport function normalizeOptions(options: Options): NormalizedOptions {\n return {\n ...options,\n token: options.token ?? \"\",\n registry: options.registry ?? \"https://registry.npmjs.org/\",\n tag: options.tag ?? \"latest\",\n package: options.package?.endsWith(\"package.json\")\n ? path.dirname(options.package)\n : options.package,\n };\n}\n", "import fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\nimport { type NpmCliEnv } from \"./call-npm-cli\";\n\nexport interface NpmAuthConfig {\n registry: string;\n token: string;\n}\n\nexport type NpmCliTask = (env: NpmCliEnv) => Promise;\n\n/**\n * Create a temporary .npmrc file with the given auth token,\n * and call a task with env vars set to use that .npmrc.\n *\n * @param auth Registry and token.\n * @param task A function called with the configured environment.\n * After the function resolves, the temporary .npmrc file will be removed.\n * @returns The resolved value of `task`\n */\nexport async function useNpmEnv(\n auth: NpmAuthConfig,\n task: NpmCliTask\n): Promise {\n const { registry, token } = auth;\n const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), \"npm-publish-\"));\n const tempConfigFile = path.join(tempDir, \".npmrc\");\n const registryUrl = new URL(registry);\n\n const config = [\n \"; added by jsdevtools/npm-publish\",\n `registry=${registry}`,\n `//${registryUrl.hostname}/:authToken=\\${NODE_AUTH_TOKEN}`,\n \"\",\n ].join(os.EOL);\n\n const env = {\n /* eslint-disable @typescript-eslint/naming-convention */\n NODE_AUTH_TOKEN: token,\n npm_config_userconfig: tempConfigFile,\n /* eslint-enable @typescript-eslint/naming-convention */\n };\n\n await fs.writeFile(tempConfigFile, config, \"utf8\");\n\n try {\n return await task(env);\n } finally {\n await fs.rm(tempDir, { force: true, recursive: true });\n }\n}\n", "import childProcess from \"node:child_process\";\n\nexport type NpmCliEnv = Record;\n\nexport interface NpmCliOptions {\n env?: Record;\n ifError?: Record;\n}\n\nconst execProcess = (\n command: string,\n env: Record = {}\n): Promise<{ stdout: string; error: Error | null }> => {\n // strip Node.js environment and runtime options out of the call to NPM\n const {\n NODE_ENV: _NODE_ENV,\n NODE_OPTIONS: _NODE_OPTIONS,\n ...processEnv\n } = process.env;\n\n return new Promise((resolve) => {\n childProcess.exec(\n command,\n { env: { ...processEnv, ...env } },\n (error, stdout) => resolve({ stdout: stdout.trim(), error })\n );\n });\n};\n\nconst parseJson = (value: string): TParsed | undefined => {\n try {\n return JSON.parse(value) as TParsed;\n } catch {\n return undefined;\n }\n};\n\n/**\n * Call the NPM CLI in JSON mode.\n *\n * @param command The command of the NPM CLI to call\n * @param args Any arguments to send to the command\n * @param options Customize environment variables or add an error handler.\n * @returns The parsed JSON, or stdout if unparsable.\n */\nexport async function callNpmCli(\n command: string,\n args: string[],\n options: NpmCliOptions = {}\n): Promise {\n const { stdout, error } = await execProcess(\n [\"npm\", command, \"--json\", ...args].join(\" \"),\n options?.env\n );\n\n if (error) {\n const errorPayload = parseJson<{ error: { code?: string | null } }>(stdout);\n const errorCode = errorPayload?.error?.code?.toLowerCase();\n\n if (\n typeof errorCode === \"string\" &&\n options.ifError &&\n errorCode in options.ifError\n ) {\n return options.ifError[errorCode] as TReturn;\n }\n\n throw error;\n }\n\n return parseJson(stdout) ?? (stdout as unknown as TReturn);\n}\n", "import type { PublishConfig } from \".\";\n\n/**\n * Given a publish configuration, get the NPM CLI publish arguments.\n *\n * @param config Publish configuration\n * @returns Arguments to pass to the NPM CLI\n */\nexport function getPublishArgs(config: PublishConfig): string[] {\n const { packageSpec, tag, access, dryRun } = config;\n const args: string[] = [];\n\n if (packageSpec !== undefined) {\n args.push(packageSpec);\n }\n\n if (tag !== undefined) {\n args.push(\"--tag\", tag);\n }\n\n if (access !== undefined) {\n args.push(\"--access\", access);\n }\n\n if (dryRun !== undefined) {\n args.push(\"--dry-run\", JSON.stringify(dryRun));\n }\n\n return args;\n}\n", "import { useNpmEnv, type NpmAuthConfig } from \"./use-npm-env\";\nimport { callNpmCli } from \"./call-npm-cli\";\nimport { getPublishArgs } from \"./get-publish-args\";\n\nexport interface VersionsResult {\n \"dist-tags\": Record;\n versions: string[];\n}\n\nexport interface PublishConfig {\n packageSpec?: string;\n tag?: string;\n access?: string;\n dryRun?: boolean;\n}\n\nexport interface PublishResult {\n id: string;\n name: string;\n version: string;\n}\n\n/**\n * Get a package's published versions.\n *\n * @param packageName The name of the package to get published versions for.\n * @param authConfig Registry and auth token.\n * @returns All published versions and tags.\n */\nexport async function getVersions(\n packageName: string,\n authConfig: NpmAuthConfig\n): Promise {\n return useNpmEnv(authConfig, (env) => {\n return callNpmCli(\n \"view\",\n [packageName, \"dist-tags\", \"versions\"],\n { env, ifError: { e404: { \"dist-tags\": {}, versions: [] } } }\n );\n });\n}\n\n/**\n * Publish a package.\n *\n * @param publishConfig Publish options.\n * @returns Release metadata.\n */\nexport async function publish(\n publishConfig: PublishConfig,\n authConfig: NpmAuthConfig\n): Promise {\n const publishArgs = getPublishArgs(publishConfig);\n\n return useNpmEnv(authConfig, (env) => {\n return callNpmCli(\"publish\", publishArgs, { env });\n });\n}\n", "import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { SemVer } from \"semver\";\nimport { ono } from \"@jsdevtools/ono\";\nimport { Debug } from \"./options\";\n\n/**\n * A package manifest (package.json)\n *\n * @internal\n */\nexport interface Manifest {\n name: string;\n version: SemVer;\n}\n\n/**\n * Reads the package manifest (package.json) and returns its parsed contents\n *\n * @internal\n */\nexport async function readManifest(\n packageSpec?: string,\n debug?: Debug\n): Promise {\n const packageManifest = path.join(packageSpec ?? \".\", \"package.json\");\n debug && debug(`Reading manifest from ${path.resolve(packageManifest)}`);\n let json: string;\n\n try {\n json = await fs.readFile(packageManifest, \"utf8\");\n } catch (error) {\n throw ono(error, `Unable to read ${packageManifest}`);\n }\n\n try {\n let { name, version } = JSON.parse(json) as Record;\n\n if (typeof name !== \"string\" || name.trim().length === 0) {\n throw new TypeError(\"Invalid package name\");\n }\n\n let manifest: Manifest = {\n name,\n version: new SemVer(version as string),\n };\n\n debug && debug(\"MANIFEST:\", manifest);\n return manifest;\n } catch (error) {\n throw ono(error, `Unable to parse ${packageManifest}`);\n }\n}\n"], - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,aAAgB,eAAe,OAAU;AACvC,UAAI,UAAU,QAAQ,UAAU,QAAW;AACzC,eAAO;iBACE,OAAO,UAAU,YAAY,iBAAiB,QAAQ;AAC/D,eAAO;;AAET,aAAO,KAAK,UAAU,KAAK;IAC7B;AAPA,YAAA,iBAAA;AAeA,aAAgB,oBACd,sBAA0C;AAE1C,UAAI,CAAC,OAAO,KAAK,oBAAoB,EAAE,QAAQ;AAC7C,eAAO,CAAA;;AAGT,aAAO;QACL,OAAO,qBAAqB;QAC5B,MAAM,qBAAqB;QAC3B,MAAM,qBAAqB;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AAS,SAAS;AAC5B,cAAQ;AAAA,QACN;AAAA,YAAQ,QAAQ,YAAY,QAAQ,kDAAkD,QAAQ;AAAA,MAChG;AAAA,IACF,WAAW,QAAQ,QAAQ;AACzB,cAAQ;AAAA,QACN;AAAA,YAAQ,QAAQ,YAAY,QAAQ,yCAAyC,QAAQ;AAAA,MACvF;AAAA,IACF,OAAO;AACL,cAAQ;AAAA,QACN;AAAA,mCAA+B,QAAQ,YAAY,QAAQ,cAAc,QAAQ;AAAA,MACnF;AAAA,IACF;AAGA,cAAU,QAAQ,QAAQ,IAAI;AAC9B,cAAU,WAAW,QAAQ,OAAO;AACpC,cAAU,eAAe,QAAQ,UAAU;AAC3C,cAAU,OAAO,QAAQ,GAAG;AAC5B,cAAU,UAAU,QAAQ,MAAM;AAClC,cAAU,WAAW,QAAQ,MAAM;AAAA,EACrC,SAAS,OAAP;AACA,iBAAa,KAAc;AAAA,EAC7B;AACF;AAKA,SAAS,aAAa,MAA+C;AACnE,MAAI,QAAQ,IAAI,aAAa,QAAQ;AACnC,YAAQ,IAAI,yBAAyB,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG;AAC1D;AAAA,EACF;AACA,aAAO,YAAAC,WAAqB,GAAG,IAAI;AACrC;AAKA,SAAS,aAAa,OAAoB;AACxC,MAAI,UAAU,MAAM,SAAS,MAAM,WAAW,OAAO,KAAK;AAC1D,6BAAU,OAAO;AACjB,UAAQ,KAAK;AACf;AAKA,SAAS,aAAa,SAAiB,MAAe;AACpD,MAAI,MAAM;AACR,eAAW,OAAO,KAAK,UAAU,MAAM,QAAW,CAAC;AAAA,EACrD;AAEA,yBAAM,OAAO;AACf;AAGA,KAAK;", - "names": ["os", "crypto", "version", "URL", "crypto", "import_crypto", "crypto", "import_crypto", "fs", "os", "options", "debug", "socket", "require_tunnel", "module", "HttpCodes", "Headers", "MediaTypes", "path", "os", "path", "ExitCode", "getInput", "setOutput", "setFailed", "debug", "module", "module", "debug", "module", "debug", "module", "module", "module", "debug", "SemVer", "version", "module", "SemVer", "parse", "version", "module", "parse", "version", "module", "parse", "version", "module", "SemVer", "version", "module", "SemVer", "compare", "module", "compare", "module", "parse", "diff", "v1", "module", "SemVer", "module", "SemVer", "module", "SemVer", "module", "parse", "version", "module", "compare", "module", "compare", "module", "SemVer", "module", "module", "module", "compare", "module", "compare", "module", "compare", "module", "compare", "module", "compare", "module", "module", "SemVer", "parse", "version", "module", "module", "module", "diff", "module", "debug", "version", "SemVer", "module", "debug", "SemVer", "version", "module", "version", "module", "module", "SemVer", "module", "SemVer", "module", "SemVer", "require_valid", "module", "module", "SemVer", "version", "module", "version", "module", "version", "module", "module", "compare", "version", "module", "compare", "require_semver", "module", "SemVer", "parse", "diff", "compare", "normalizeOptions", "ono", "ono", "module", "path", "import_node_path", "fs", "path", "os", "childProcess", "import_promises", "import_node_path", "debug", "path", "fs", "version", "diff", "setOutputActionsCore"] + "sources": ["../node_modules/@actions/core/src/utils.ts", "../node_modules/@actions/core/src/command.ts", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js", "../node_modules/@actions/core/src/file-command.ts", "../node_modules/@actions/http-client/src/proxy.ts", "../node_modules/tunnel/lib/tunnel.js", "../node_modules/tunnel/index.js", "../node_modules/@actions/http-client/src/index.ts", "../node_modules/@actions/http-client/src/auth.ts", "../node_modules/@actions/core/src/oidc-utils.ts", "../node_modules/@actions/core/src/summary.ts", "../node_modules/@actions/core/src/path-utils.ts", "../node_modules/@actions/core/src/core.ts", "../node_modules/@jsdevtools/ono/src/to-json.ts", "../node_modules/@jsdevtools/ono/src/isomorphic.node.ts", "../node_modules/@jsdevtools/ono/src/stack.ts", "../node_modules/@jsdevtools/ono/src/extend-error.ts", "../node_modules/@jsdevtools/ono/src/normalize.ts", "../node_modules/@jsdevtools/ono/src/constructor.ts", "../node_modules/@jsdevtools/ono/src/singleton.ts", "../node_modules/@jsdevtools/ono/src/types.ts", "../node_modules/@jsdevtools/ono/src/index.ts", "../src/action/index.ts", "../src/read-manifest.ts", "../src/errors.ts", "../src/normalize-options.ts", "../src/npm/use-npm-env.ts", "../src/npm/call-npm-cli.ts", "../src/npm/get-publish-args.ts", "../src/npm/index.ts", "../src/compare-versions.ts", "../src/npm-publish.ts"], + "sourcesContent": [null, null, "import crypto from 'crypto';\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\nexport default function rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n crypto.randomFillSync(rnds8Pool);\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}", "export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;", "import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;", "import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;", "import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;", "import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;", "import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}", "import crypto from 'crypto';\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('md5').update(bytes).digest();\n}\n\nexport default md5;", "import v35 from './v35.js';\nimport md5 from './md5.js';\nconst v3 = v35('v3', 0x30, md5);\nexport default v3;", "import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;", "import crypto from 'crypto';\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('sha1').update(bytes).digest();\n}\n\nexport default sha1;", "import v35 from './v35.js';\nimport sha1 from './sha1.js';\nconst v5 = v35('v5', 0x50, sha1);\nexport default v5;", "export default '00000000-0000-0000-0000-000000000000';", "import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;", "export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';", null, null, "'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n", "module.exports = require('./lib/tunnel');\n", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "import * as actionsCore from \"@actions/core\";\nimport { npmPublish } from \"../npm-publish\";\nimport type { Access, Options, Strategy } from \"../options\";\n\n/**\n * The main entry point of the GitHub Action\n *\n * @internal\n */\nasync function main(): Promise {\n try {\n // Setup global error handlers\n process.on(\"uncaughtException\", errorHandler);\n process.on(\"unhandledRejection\", errorHandler);\n\n // Get the GitHub Actions input options\n const options: Options = {\n token: getInput(\"token\", true),\n package: getInput(\"package\"),\n registryUrl: getInput(\"registryUrl\"),\n tag: getInput(\"tag\"),\n access: getInput(\"access\"),\n strategy: getInput(\"strategy\"),\n dryRun: getInput(\"dry-run\")?.toLowerCase() === \"true\",\n };\n\n // Publish to NPM\n let results = await npmPublish(options);\n\n if (!results.releaseType) {\n console.log(\n `\\n\uD83D\uDCE6 ${results.name} v${results.version} is already published to ${results.registryUrl}`\n );\n }\n if (results.releaseType === \"lower\") {\n console.log(\n `\\n\uD83D\uDCE6 ${results.name} v${results.version} is lower than the version published to ${results.registryUrl}`\n );\n } else if (results.dryRun) {\n console.log(\n `\\n\uD83D\uDCE6 ${results.name} v${results.version} was NOT actually published to ${results.registryUrl} (dry run)`\n );\n } else {\n console.log(\n `\\n\uD83D\uDCE6 Successfully published ${results.name} v${results.version} to ${results.registryUrl}`\n );\n }\n\n // Set the GitHub Actions output variables\n setOutput(\"id\", results.id);\n setOutput(\"name\", results.name);\n setOutput(\"version\", results.version);\n setOutput(\"release-type\", results.releaseType);\n setOutput(\"previous-version\", results.previousVersion);\n setOutput(\"tag\", results.tag);\n setOutput(\"access\", results.access);\n setOutput(\"registry-url\", results.registryUrl);\n setOutput(\"dry-run\", results.dryRun);\n } catch (error) {\n errorHandler(error as Error);\n }\n}\n\n/**\n * Get input.\n */\n\nfunction getInput(\n name: string,\n required?: TRequired\n): TRequired extends true ? ReturnT : ReturnT | undefined {\n const value = actionsCore.getInput(name, { required });\n return value === \"\" ? undefined : (value as any);\n}\n\n/**\n * Set output with logging to stdout for test support\n */\nfunction setOutput(...args: Parameters) {\n if (process.env.NODE_ENV === \"test\") {\n console.log(`TEST::set-output name=${args[0]}::${args[1]}`);\n return;\n }\n return actionsCore.setOutput(...args);\n}\n\n/**\n * Prints errors to the GitHub Actions console\n */\nfunction errorHandler(error: Error): void {\n let message = error.stack || error.message || String(error);\n actionsCore.setFailed(message);\n process.exit();\n}\n\n/**\n * Prints debug logs to the GitHub Actions console\n */\n// function debugHandler(message: string, data?: object) {\n// if (data) {\n// message += \"\\n\" + JSON.stringify(data, undefined, 2);\n// }\n\n// actionsCore.debug(message);\n// }\n\n// eslint-disable-next-line @typescript-eslint/no-floating-promises\nmain();\n", "import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { ono } from \"@jsdevtools/ono\";\n\n/**\n * A package manifest (package.json)\n *\n * @internal\n */\nexport interface Manifest {\n name: string;\n version: string;\n scope?: string;\n}\n\n/**\n * Reads the package manifest (package.json) and returns its parsed contents.\n *\n * @param packagePath The path to the package being published.\n * @returns The parsed package metadata.\n */\nexport async function readManifest(packagePath?: string): Promise {\n let manifestPath = packagePath;\n\n if (!manifestPath) {\n manifestPath = \"package.json\";\n } else if (path.extname(manifestPath) === \"\") {\n manifestPath = path.join(manifestPath, \"package.json\");\n }\n\n let json: string;\n\n try {\n json = await fs.readFile(manifestPath, \"utf8\");\n } catch (error) {\n throw ono(error, `Unable to read ${manifestPath}`);\n }\n\n try {\n const { name, version } = JSON.parse(json) as Record;\n\n if (typeof name !== \"string\" || name.trim().length === 0) {\n throw new TypeError(\"Invalid package name\");\n }\n\n if (typeof version !== \"string\" || version.trim().length === 0) {\n throw new TypeError(\"Invalid package version\");\n }\n\n return { name: name.trim(), version: version.trim() };\n } catch (error) {\n throw ono(error, `Unable to parse ${manifestPath}`);\n }\n}\n", "export class NpmPublishError extends Error {\n public originalError: Error | undefined;\n\n public constructor(message: string, originalError?: Error) {\n if (originalError) {\n super(`${message}\\n${originalError.message}`);\n } else {\n super(message);\n }\n\n this.name = \"NpmPublishError\";\n this.originalError = originalError;\n }\n}\n\nexport class InvalidRegistryUrlError extends TypeError {\n public constructor(value: unknown) {\n super(`The given value \"${String(value)}\" is not a valid registry URL`);\n this.name = \"InvalidRegistryUrlError\";\n }\n}\n\nexport class InvalidTokenError extends TypeError {\n public constructor() {\n super(\"The given value [omitted for security] is not a valid token\");\n this.name = \"InvalidTokenError\";\n }\n}\n", "import type { Options, Access, Strategy } from \"./options\";\nimport type { Manifest } from \"./read-manifest\";\nimport * as errors from \"./errors\";\n\nconst DEFAULT_REGISTRY_URL = new URL(\"https://registry.npmjs.org/\");\nconst DEFAULT_TAG = \"latest\";\nconst DEFAULT_ACCESS = \"public\";\nconst DEFAULT_ACCESS_SCOPED = \"restricted\";\nconst DEFAULT_STRATEGY = \"upgrade\";\n\n/**\n * Normalized and sanitized auth and publish configurations.\n */\nexport interface NormalizedOptions {\n authConfig: AuthConfig;\n publishConfig: PublishConfig;\n}\n\ninterface ConfigValue {\n value: TValue;\n isDefault: boolean;\n}\n\n/**\n * Normalized and sanitized auth configuration.\n */\nexport interface AuthConfig {\n registryUrl: ConfigValue;\n token: ConfigValue;\n}\n\n/**\n * Normalized and sanitized publish configuration.\n */\nexport interface PublishConfig {\n packageSpec: ConfigValue;\n tag: ConfigValue;\n access: ConfigValue;\n dryRun: ConfigValue;\n strategy: ConfigValue;\n}\n\nconst setValue = (\n value: T | undefined,\n defaultValue: T\n): ConfigValue => ({\n value: value ?? defaultValue,\n isDefault: value === undefined || value === defaultValue,\n});\n\nconst setUrlValue = (\n value: URL | undefined,\n defaultValue: URL\n): ConfigValue => ({\n value: value ?? defaultValue,\n isDefault: value === undefined || value?.href === defaultValue.href,\n});\n\n/**\n * Normalizes and sanitizes options, and fills-in any default values.\n */\nexport function normalizeOptions(\n options: Options,\n manifest: Manifest\n): NormalizedOptions {\n let defaultRegistryUrl = DEFAULT_REGISTRY_URL;\n let defaultTag = DEFAULT_TAG;\n let defaultAccess: Access = manifest.scope\n ? DEFAULT_ACCESS_SCOPED\n : DEFAULT_ACCESS;\n\n let registryUrl;\n\n if (options.registryUrl !== undefined) {\n try {\n registryUrl = new URL(options.registryUrl);\n } catch {\n throw new errors.InvalidRegistryUrlError(options.registryUrl);\n }\n }\n\n if (options.token !== undefined && typeof options.token !== \"string\") {\n throw new errors.InvalidTokenError();\n }\n\n const authConfig: AuthConfig = {\n token: { value: options.token, isDefault: false },\n registryUrl: setUrlValue(registryUrl, defaultRegistryUrl),\n };\n\n const publishConfig: PublishConfig = {\n packageSpec: setValue(undefined, \"\"),\n tag: setValue(undefined, defaultTag),\n access: setValue(undefined, defaultAccess),\n dryRun: setValue(undefined, false),\n strategy: setValue(undefined, DEFAULT_STRATEGY),\n };\n\n return { authConfig, publishConfig };\n}\n", "import fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\nimport type { AuthConfig } from \"../normalize-options\";\nimport { callNpmCli, type NpmCliEnv } from \"./call-npm-cli\";\n\nexport type NpmCliTask = (env: NpmCliEnv) => Promise;\n\n/**\n * Create a temporary .npmrc file with the given auth token,\n * and call a task with env vars set to use that .npmrc.\n *\n * @param auth Registry and token.\n * @param task A function called with the configured environment.\n * After the function resolves, the temporary .npmrc file will be removed.\n * @returns The resolved value of `task`\n */\nexport async function useNpmEnv(\n auth: AuthConfig,\n task: NpmCliTask\n): Promise {\n const { registryUrl, token } = auth;\n const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), \"npm-publish-\"));\n const tempConfigFile = path.join(tempDir, \".npmrc\");\n const userConfigFile = await callNpmCli(\"config\", [\"get\", \"userconfig\"]);\n\n const userConfig = await fs\n .readFile(userConfigFile, \"utf8\")\n .catch((error: NodeJS.ErrnoException) => {\n if (error.code === \"ENOENT\") return \"\";\n throw error;\n });\n\n const config = [\n `; copied from ${userConfig}`,\n userConfig,\n \"; added by jsdevtools/npm-publish\",\n `registry=${registryUrl.value.href}`,\n `//${registryUrl.value.hostname}/:authToken=\\${NODE_AUTH_TOKEN}`,\n \"\",\n ].join(os.EOL);\n\n const env: NpmCliEnv = { npm_config_userconfig: tempConfigFile };\n\n if (token.value) {\n env.NODE_AUTH_TOKEN = token.value;\n }\n\n await fs.writeFile(tempConfigFile, config, \"utf8\");\n\n try {\n return await task(env);\n } finally {\n await fs.rm(tempDir, { force: true, recursive: true });\n }\n}\n", "import childProcess from \"node:child_process\";\n\nexport type NpmCliEnv = Record;\n\nexport interface NpmCliOptions {\n env?: Record;\n ifError?: Record;\n}\n\nconst execProcess = (\n command: string,\n env: Record = {}\n): Promise<{ stdout: string; error: Error | null }> => {\n // strip Node.js environment and runtime options out of the call to NPM\n const {\n NODE_ENV: _NODE_ENV,\n NODE_OPTIONS: _NODE_OPTIONS,\n ...processEnv\n } = process.env;\n\n return new Promise((resolve) => {\n childProcess.exec(\n command,\n { env: { ...processEnv, ...env } },\n (error, stdout) => resolve({ stdout: stdout.trim(), error })\n );\n });\n};\n\nconst parseJson = (value: string): TParsed | undefined => {\n try {\n return JSON.parse(value) as TParsed;\n } catch {\n return undefined;\n }\n};\n\n/**\n * Call the NPM CLI in JSON mode.\n *\n * @param command The command of the NPM CLI to call\n * @param args Any arguments to send to the command\n * @param options Customize environment variables or add an error handler.\n * @returns The parsed JSON, or stdout if unparsable.\n */\nexport async function callNpmCli(\n command: string,\n args: string[],\n options: NpmCliOptions = {}\n): Promise {\n const { stdout, error } = await execProcess(\n [\"npm\", command, \"--ignore-scripts\", \"--json\", ...args].join(\" \"),\n options?.env\n );\n\n if (error) {\n const errorPayload = parseJson<{ error: { code?: string | null } }>(stdout);\n const errorCode = errorPayload?.error?.code?.toLowerCase();\n\n if (\n typeof errorCode === \"string\" &&\n options.ifError &&\n errorCode in options.ifError\n ) {\n return options.ifError[errorCode] as TReturn;\n }\n\n throw error;\n }\n\n return parseJson(stdout) ?? (stdout as unknown as TReturn);\n}\n", "import type { PublishConfig } from \"../normalize-options\";\n\n/**\n * Given a publish configuration, get the NPM CLI publish arguments.\n *\n * @param config Publish configuration\n * @returns Arguments to pass to the NPM CLI\n */\nexport function getPublishArgs(config: PublishConfig): string[] {\n const { packageSpec, tag, access, dryRun } = config;\n\n return [\n packageSpec.value,\n \"--tag\",\n tag.value,\n \"--access\",\n access.value,\n \"--dry-run\",\n JSON.stringify(dryRun.value),\n ];\n}\n", "import type { AuthConfig, PublishConfig } from \"../normalize-options\";\nimport { useNpmEnv } from \"./use-npm-env\";\nimport { callNpmCli } from \"./call-npm-cli\";\nimport { getPublishArgs } from \"./get-publish-args\";\n\nexport interface VersionsResult {\n \"dist-tags\": Record;\n versions: string[];\n}\n\nexport interface PublishResult {\n id: string;\n}\n\n/**\n * Get a package's published versions.\n *\n * @param packageName The name of the package to get published versions for.\n * @param authConfig Registry and auth token.\n * @returns All published versions and tags.\n */\nexport async function getVersions(\n packageName: string,\n authConfig: AuthConfig\n): Promise {\n return useNpmEnv(authConfig, (env) => {\n return callNpmCli(\n \"view\",\n [packageName, \"dist-tags\", \"versions\"],\n { env, ifError: { e404: { \"dist-tags\": {}, versions: [] } } }\n );\n });\n}\n\n/**\n * Publish a package.\n *\n * @param publishConfig Publish options.\n * @returns Release metadata.\n */\nexport async function publish(\n publishConfig: PublishConfig,\n authConfig: AuthConfig\n): Promise {\n const publishArgs = getPublishArgs(publishConfig);\n\n return useNpmEnv(authConfig, (env) => {\n return callNpmCli(\"publish\", publishArgs, { env });\n });\n}\n", "import type { ReleaseType as SemverReleaseType } from \"semver\";\n\nimport type { PublishConfig } from \"./normalize-options\";\nimport type { VersionsResult } from \"./npm\";\n\nexport type ReleaseType = SemverReleaseType | \"lower\";\n\nexport interface VersionComparison {\n releaseType: ReleaseType | undefined;\n previousVersion: string;\n}\n\nexport function compareVersions(\n versions: VersionsResult,\n publishConfig: PublishConfig\n): VersionComparison {\n void versions;\n void publishConfig;\n\n throw new Error(\"ah\");\n}\n", "import { readManifest } from \"./read-manifest\";\nimport { normalizeOptions } from \"./normalize-options\";\nimport { getVersions, publish } from \"./npm\";\nimport { compareVersions } from \"./compare-versions\";\nimport type { Options } from \"./options\";\nimport type { Results } from \"./results\";\n\n/**\n * Publishes a package to NPM, if its version has changed\n */\nexport async function npmPublish(options: Options): Promise {\n const manifest = await readManifest(options.package);\n const { authConfig, publishConfig } = normalizeOptions(options, manifest);\n const publishedVersions = await getVersions(manifest.name, authConfig);\n const versionComparison = compareVersions(publishedVersions, publishConfig);\n let publishResult;\n\n if (versionComparison.releaseType !== undefined) {\n publishResult = await publish(publishConfig, authConfig);\n }\n\n return {\n id: publishResult?.id,\n name: manifest.name,\n version: manifest.version,\n releaseType: versionComparison.releaseType,\n previousVersion: versionComparison.previousVersion,\n tag: publishCon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U,OAAO,QAAQ,GAAG;AAC5B,IAAAA,WAAU,UAAU,QAAQ,MAAM;AAClC,IAAAA,WAAU,gBAAgB,QAAQ,WAAW;AAC7C,IAAAA,WAAU,WAAW,QAAQ,MAAM;AAAA,EACrC,SAAS,OAAP;AACA,iBAAa,KAAc;AAAA,EAC7B;AACF;AAMA,SAASD,UACP,MACA,UACwD;AACxD,QAAM,QAAoB,qBAAS,MAAM,EAAE,SAAS,CAAC;AACrD,SAAO,UAAU,KAAK,SAAa;AACrC;AAKA,SAASC,cAAa,MAAgD;AACpE,MAAI,QAAQ,IAAI,aAAa,QAAQ;AACnC,YAAQ,IAAI,yBAAyB,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG;AAC1D;AAAA,EACF;AACA,SAAmB,sBAAU,GAAG,IAAI;AACtC;AAKA,SAAS,aAAa,OAAoB;AACxC,MAAI,UAAU,MAAM,SAAS,MAAM,WAAW,OAAO,KAAK;AAC1D,EAAY,sBAAU,OAAO;AAC7B,UAAQ,KAAK;AACf;AAcA,KAAK;", + "names": ["os", "crypto", "version", "URL", "crypto", "import_crypto", "crypto", "import_crypto", "fs", "os", "options", "socket", "require_tunnel", "module", "HttpCodes", "Headers", "MediaTypes", "path", "os", "path", "ExitCode", "getInput", "setOutput", "setFailed", "normalizeOptions", "ono", "ono", "module", "path", "fs", "version", "import_promises", "import_node_path", "childProcess", "fs", "path", "os", "getInput", "setOutput"] } diff --git a/package-lock.json b/package-lock.json index 0af2722..a2f69cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,9 +44,8 @@ "shx": "^0.3.3", "testdouble": "^3.17.2", "testdouble-vitest": "^0.1.2", - "type-fest": "^3.8.0", "typescript": "^5.0.4", - "vitest": "^0.30.0" + "vitest": "^0.30.1" }, "engines": { "node": ">=16" @@ -1472,23 +1471,23 @@ } }, "node_modules/@vitest/expect": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.30.0.tgz", - "integrity": "sha512-b/jLWBqi6WQHfezWm8VjgXdIyfejAurtxqdyCdDqoToCim5W/nDxKjFAADitEHPz80oz+IP+c+wmkGKBucSpiw==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.30.1.tgz", + "integrity": "sha512-c3kbEtN8XXJSeN81iDGq29bUzSjQhjES2WR3aColsS4lPGbivwLtas4DNUe0jD9gg/FYGIteqOenfU95EFituw==", "dev": true, "dependencies": { - "@vitest/spy": "0.30.0", - "@vitest/utils": "0.30.0", + "@vitest/spy": "0.30.1", + "@vitest/utils": "0.30.1", "chai": "^4.3.7" } }, "node_modules/@vitest/runner": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.30.0.tgz", - "integrity": "sha512-Xh4xkdRcymdeRNrSwjhgarCTSgnQu2J59wsFI6i4UhKrL5whzo5+vWyq7iWK1ht3fppPeNAtvkbqUDf+OJSCbQ==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.30.1.tgz", + "integrity": "sha512-W62kT/8i0TF1UBCNMRtRMOBWJKRnNyv9RrjIgdUryEe0wNpGZvvwPDLuzYdxvgSckzjp54DSpv1xUbv4BQ0qVA==", "dev": true, "dependencies": { - "@vitest/utils": "0.30.0", + "@vitest/utils": "0.30.1", "concordance": "^5.0.4", "p-limit": "^4.0.0", "pathe": "^1.1.0" @@ -1522,9 +1521,9 @@ } }, "node_modules/@vitest/snapshot": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-0.30.0.tgz", - "integrity": "sha512-e4eSGCy36Bw3/Tkir9qYJDlFsUz3NALFPNJSxzlY8CFl901TV9iZdKgpqXpyG1sAhLO0tPHThBAMHRi8hRA8cg==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-0.30.1.tgz", + "integrity": "sha512-fJZqKrE99zo27uoZA/azgWyWbFvM1rw2APS05yB0JaLwUIg9aUtvvnBf4q7JWhEcAHmSwbrxKFgyBUga6tq9Tw==", "dev": true, "dependencies": { "magic-string": "^0.30.0", @@ -1533,18 +1532,18 @@ } }, "node_modules/@vitest/spy": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.30.0.tgz", - "integrity": "sha512-olTWyG5gVWdfhCrdgxWQb2K3JYtj1/ZwInFFOb4GZ2HFI91PUWHWHhLRPORxwRwVvoXD1MS1162vPJZuHlKJkg==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.30.1.tgz", + "integrity": "sha512-YfJeIf37GvTZe04ZKxzJfnNNuNSmTEGnla2OdL60C8od16f3zOfv9q9K0nNii0NfjDJRt/CVN/POuY5/zTS+BA==", "dev": true, "dependencies": { "tinyspy": "^2.1.0" } }, "node_modules/@vitest/utils": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.30.0.tgz", - "integrity": "sha512-qFZgoOKQ+rJV9xG4BBxgOSilnLQ2gkfG4I+z1wBuuQ3AD33zQrnB88kMFfzsot1E1AbF3dNK1e4CU7q3ojahRA==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.30.1.tgz", + "integrity": "sha512-/c8Xv2zUVc+rnNt84QF0Y0zkfxnaGhp87K2dYJMLtLOIckPzuxLVzAtFCicGFdB4NeBHNzTRr1tNn7rCtQcWFA==", "dev": true, "dependencies": { "concordance": "^5.0.4", @@ -4668,18 +4667,6 @@ "ufo": "^1.1.1" } }, - "node_modules/mlly/node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/mocha": { "version": "10.2.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", @@ -6472,18 +6459,6 @@ "node": ">=4" } }, - "node_modules/type-fest": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.8.0.tgz", - "integrity": "sha512-FVNSzGQz9Th+/9R6Lvv7WIAkstylfHN2/JYxkyhhmKFYh9At2DST8t6L6Lref9eYO8PXFTfG9Sg1Agg0K3vq3Q==", - "dev": true, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/typed-array-length": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", @@ -6628,9 +6603,9 @@ } }, "node_modules/vite-node": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.30.0.tgz", - "integrity": "sha512-23X5Ggylx0kU/bMf8MCcEEl55d/gsTtU81mMZjm7Z0FSpgKZexUqmX3mJtgglP9SySQQs9ydYg/GEahi/cKHaA==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.30.1.tgz", + "integrity": "sha512-vTikpU/J7e6LU/8iM3dzBo8ZhEiKZEKRznEMm+mJh95XhWaPrJQraT/QsT2NWmuEf+zgAoMe64PKT7hfZ1Njmg==", "dev": true, "dependencies": { "cac": "^6.7.14", @@ -6651,19 +6626,19 @@ } }, "node_modules/vitest": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.30.0.tgz", - "integrity": "sha512-2WW4WeTHtrLFeoiuotWvEW6khozx1NvMGYoGsNz2btdddEbqvEdPJIouIdoiC5i61Rl1ctZvm9cn2R9TcPQlzw==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.30.1.tgz", + "integrity": "sha512-y35WTrSTlTxfMLttgQk4rHcaDkbHQwDP++SNwPb+7H8yb13Q3cu2EixrtHzF27iZ8v0XCciSsLg00RkPAzB/aA==", "dev": true, "dependencies": { "@types/chai": "^4.3.4", "@types/chai-subset": "^1.3.3", "@types/node": "*", - "@vitest/expect": "0.30.0", - "@vitest/runner": "0.30.0", - "@vitest/snapshot": "0.30.0", - "@vitest/spy": "0.30.0", - "@vitest/utils": "0.30.0", + "@vitest/expect": "0.30.1", + "@vitest/runner": "0.30.1", + "@vitest/snapshot": "0.30.1", + "@vitest/spy": "0.30.1", + "@vitest/utils": "0.30.1", "acorn": "^8.8.2", "acorn-walk": "^8.2.0", "cac": "^6.7.14", @@ -6680,7 +6655,7 @@ "tinybench": "^2.4.0", "tinypool": "^0.4.0", "vite": "^3.0.0 || ^4.0.0", - "vite-node": "0.30.0", + "vite-node": "0.30.1", "why-is-node-running": "^2.2.2" }, "bin": { @@ -6729,18 +6704,6 @@ } } }, - "node_modules/vitest/node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/well-known-symbols": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz", @@ -7905,23 +7868,23 @@ } }, "@vitest/expect": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.30.0.tgz", - "integrity": "sha512-b/jLWBqi6WQHfezWm8VjgXdIyfejAurtxqdyCdDqoToCim5W/nDxKjFAADitEHPz80oz+IP+c+wmkGKBucSpiw==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.30.1.tgz", + "integrity": "sha512-c3kbEtN8XXJSeN81iDGq29bUzSjQhjES2WR3aColsS4lPGbivwLtas4DNUe0jD9gg/FYGIteqOenfU95EFituw==", "dev": true, "requires": { - "@vitest/spy": "0.30.0", - "@vitest/utils": "0.30.0", + "@vitest/spy": "0.30.1", + "@vitest/utils": "0.30.1", "chai": "^4.3.7" } }, "@vitest/runner": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.30.0.tgz", - "integrity": "sha512-Xh4xkdRcymdeRNrSwjhgarCTSgnQu2J59wsFI6i4UhKrL5whzo5+vWyq7iWK1ht3fppPeNAtvkbqUDf+OJSCbQ==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.30.1.tgz", + "integrity": "sha512-W62kT/8i0TF1UBCNMRtRMOBWJKRnNyv9RrjIgdUryEe0wNpGZvvwPDLuzYdxvgSckzjp54DSpv1xUbv4BQ0qVA==", "dev": true, "requires": { - "@vitest/utils": "0.30.0", + "@vitest/utils": "0.30.1", "concordance": "^5.0.4", "p-limit": "^4.0.0", "pathe": "^1.1.0" @@ -7945,9 +7908,9 @@ } }, "@vitest/snapshot": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-0.30.0.tgz", - "integrity": "sha512-e4eSGCy36Bw3/Tkir9qYJDlFsUz3NALFPNJSxzlY8CFl901TV9iZdKgpqXpyG1sAhLO0tPHThBAMHRi8hRA8cg==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-0.30.1.tgz", + "integrity": "sha512-fJZqKrE99zo27uoZA/azgWyWbFvM1rw2APS05yB0JaLwUIg9aUtvvnBf4q7JWhEcAHmSwbrxKFgyBUga6tq9Tw==", "dev": true, "requires": { "magic-string": "^0.30.0", @@ -7956,18 +7919,18 @@ } }, "@vitest/spy": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.30.0.tgz", - "integrity": "sha512-olTWyG5gVWdfhCrdgxWQb2K3JYtj1/ZwInFFOb4GZ2HFI91PUWHWHhLRPORxwRwVvoXD1MS1162vPJZuHlKJkg==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.30.1.tgz", + "integrity": "sha512-YfJeIf37GvTZe04ZKxzJfnNNuNSmTEGnla2OdL60C8od16f3zOfv9q9K0nNii0NfjDJRt/CVN/POuY5/zTS+BA==", "dev": true, "requires": { "tinyspy": "^2.1.0" } }, "@vitest/utils": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.30.0.tgz", - "integrity": "sha512-qFZgoOKQ+rJV9xG4BBxgOSilnLQ2gkfG4I+z1wBuuQ3AD33zQrnB88kMFfzsot1E1AbF3dNK1e4CU7q3ojahRA==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.30.1.tgz", + "integrity": "sha512-/c8Xv2zUVc+rnNt84QF0Y0zkfxnaGhp87K2dYJMLtLOIckPzuxLVzAtFCicGFdB4NeBHNzTRr1tNn7rCtQcWFA==", "dev": true, "requires": { "concordance": "^5.0.4", @@ -10230,14 +10193,6 @@ "pathe": "^1.1.0", "pkg-types": "^1.0.2", "ufo": "^1.1.1" - }, - "dependencies": { - "acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true - } } }, "mocha": { @@ -11565,12 +11520,6 @@ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, - "type-fest": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.8.0.tgz", - "integrity": "sha512-FVNSzGQz9Th+/9R6Lvv7WIAkstylfHN2/JYxkyhhmKFYh9At2DST8t6L6Lref9eYO8PXFTfG9Sg1Agg0K3vq3Q==", - "dev": true - }, "typed-array-length": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", @@ -11659,9 +11608,9 @@ } }, "vite-node": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.30.0.tgz", - "integrity": "sha512-23X5Ggylx0kU/bMf8MCcEEl55d/gsTtU81mMZjm7Z0FSpgKZexUqmX3mJtgglP9SySQQs9ydYg/GEahi/cKHaA==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.30.1.tgz", + "integrity": "sha512-vTikpU/J7e6LU/8iM3dzBo8ZhEiKZEKRznEMm+mJh95XhWaPrJQraT/QsT2NWmuEf+zgAoMe64PKT7hfZ1Njmg==", "dev": true, "requires": { "cac": "^6.7.14", @@ -11673,19 +11622,19 @@ } }, "vitest": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.30.0.tgz", - "integrity": "sha512-2WW4WeTHtrLFeoiuotWvEW6khozx1NvMGYoGsNz2btdddEbqvEdPJIouIdoiC5i61Rl1ctZvm9cn2R9TcPQlzw==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.30.1.tgz", + "integrity": "sha512-y35WTrSTlTxfMLttgQk4rHcaDkbHQwDP++SNwPb+7H8yb13Q3cu2EixrtHzF27iZ8v0XCciSsLg00RkPAzB/aA==", "dev": true, "requires": { "@types/chai": "^4.3.4", "@types/chai-subset": "^1.3.3", "@types/node": "*", - "@vitest/expect": "0.30.0", - "@vitest/runner": "0.30.0", - "@vitest/snapshot": "0.30.0", - "@vitest/spy": "0.30.0", - "@vitest/utils": "0.30.0", + "@vitest/expect": "0.30.1", + "@vitest/runner": "0.30.1", + "@vitest/snapshot": "0.30.1", + "@vitest/spy": "0.30.1", + "@vitest/utils": "0.30.1", "acorn": "^8.8.2", "acorn-walk": "^8.2.0", "cac": "^6.7.14", @@ -11702,16 +11651,8 @@ "tinybench": "^2.4.0", "tinypool": "^0.4.0", "vite": "^3.0.0 || ^4.0.0", - "vite-node": "0.30.0", + "vite-node": "0.30.1", "why-is-node-running": "^2.2.2" - }, - "dependencies": { - "acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true - } } }, "well-known-symbols": { diff --git a/package.json b/package.json index e1cc784..5bde3a3 100644 --- a/package.json +++ b/package.json @@ -72,9 +72,8 @@ "shx": "^0.3.3", "testdouble": "^3.17.2", "testdouble-vitest": "^0.1.2", - "type-fest": "^3.8.0", "typescript": "^5.0.4", - "vitest": "^0.30.0" + "vitest": "^0.30.1" }, "dependencies": { "@jsdevtools/ono": "^7.1.3", diff --git a/src/__tests__/normalize-options.test.ts b/src/__tests__/normalize-options.test.ts new file mode 100644 index 0000000..0700abe --- /dev/null +++ b/src/__tests__/normalize-options.test.ts @@ -0,0 +1,102 @@ +import { describe, it, expect } from "vitest"; + +import * as subject from "../normalize-options"; +import * as errors from "../errors"; + +describe("normalizeOptions", () => { + const manifest = { name: "cool-package", version: "1.2.3" }; + const scopedManifest = { + name: "@cool-org/cool-package", + version: "1.2.3", + scope: "@cool-org", + }; + + describe("authConfig", () => { + it("should set auth config defaults", () => { + const result = subject.normalizeOptions({ token: "abc123" }, manifest); + + expect(result.authConfig).toEqual({ + token: { value: "abc123", isDefault: false }, + registryUrl: { + value: new URL("https://registry.npmjs.org/"), + isDefault: true, + }, + }); + }); + + it("should normalize registry URL", () => { + const result = subject.normalizeOptions( + { token: "abc123", registryUrl: "https://registry.npmjs.org/" }, + manifest + ); + + expect(result.authConfig).toEqual({ + token: { value: "abc123", isDefault: false }, + registryUrl: { + value: new URL("https://registry.npmjs.org/"), + isDefault: true, + }, + }); + }); + + it("should normalize custom registry URL", () => { + const result = subject.normalizeOptions( + { registryUrl: "https://example.com", token: "abc123" }, + manifest + ); + + expect(result.authConfig).toEqual({ + registryUrl: { + value: new URL("https://example.com"), + isDefault: false, + }, + token: { value: "abc123", isDefault: false }, + }); + }); + + it("should throw if registry URL invalid", () => { + expect(() => { + subject.normalizeOptions( + { token: "abc123", registryUrl: "hello world" }, + manifest + ); + }).toThrow(errors.InvalidRegistryUrlError); + }); + + it("should throw if token invalid", () => { + expect(() => { + // @ts-expect-error: intentionally mistyped for validation testing + subject.normalizeOptions({ token: 42 }, manifest); + }).toThrow(errors.InvalidTokenError); + }); + }); + + describe("publishConfig", () => { + it("should set publish config defaults", () => { + const result = subject.normalizeOptions({ token: "abc123" }, manifest); + + expect(result.publishConfig).toEqual({ + packageSpec: { value: "", isDefault: true }, + tag: { value: "latest", isDefault: true }, + access: { value: "public", isDefault: true }, + dryRun: { value: false, isDefault: true }, + strategy: { value: "upgrade", isDefault: true }, + }); + }); + + it("should set publish config defaults for scoped package", () => { + const result = subject.normalizeOptions( + { token: "abc123" }, + scopedManifest + ); + + expect(result.publishConfig).toEqual({ + packageSpec: { value: "", isDefault: true }, + tag: { value: "latest", isDefault: true }, + access: { value: "restricted", isDefault: true }, + dryRun: { value: false, isDefault: true }, + strategy: { value: "upgrade", isDefault: true }, + }); + }); + }); +}); diff --git a/src/__tests__/npm-publish.test.ts b/src/__tests__/npm-publish.test.ts new file mode 100644 index 0000000..2fe0921 --- /dev/null +++ b/src/__tests__/npm-publish.test.ts @@ -0,0 +1,114 @@ +import { vi, describe, it, afterEach, expect } from "vitest"; +import { imitateEsm, reset } from "testdouble-vitest"; +import * as td from "testdouble"; + +import * as subject from "../npm-publish"; +import { readManifest, type Manifest } from "../read-manifest"; +import { + normalizeOptions, + type AuthConfig, + type PublishConfig, +} from "../normalize-options"; +import { + getVersions, + publish, + type VersionsResult, + type PublishResult, +} from "../npm"; +import { compareVersions, type VersionComparison } from "../compare-versions"; +import type { Options } from "../options"; + +vi.mock("../read-manifest", () => imitateEsm("../read-manifest")); +vi.mock("../normalize-options", () => imitateEsm("../normalize-options")); +vi.mock("../npm", () => imitateEsm("../npm")); +vi.mock("../compare-versions", () => imitateEsm("../compare-versions")); + +describe("npmPublish", () => { + afterEach(() => { + reset(); + }); + + it("should read the manifest, get publish config, compare, and publish", async () => { + const options: Options = { token: "abc123" }; + const manifest: Manifest = { name: "cool-package", version: "1.2.3" }; + const authConfig = { + registryUrl: { value: new URL("http://example.com") }, + } as AuthConfig; + const publishConfig = { + tag: { value: "latest" }, + access: { value: "public" }, + dryRun: { value: false }, + } as PublishConfig; + const versions: VersionsResult = { "dist-tags": {}, versions: [] }; + const comparison: VersionComparison = { + releaseType: "major", + previousVersion: "0.1.2", + }; + const publishResult: PublishResult = { id: "cool-package@1.2.3" }; + + td.when(readManifest("./package.json")).thenResolve(manifest); + td.when(normalizeOptions(options, manifest)).thenReturn({ + authConfig, + publishConfig, + }); + td.when(getVersions("cool-package", authConfig)).thenResolve(versions); + td.when(compareVersions(versions, publishConfig)).thenReturn(comparison); + td.when(publish(publishConfig, authConfig)).thenResolve(publishResult); + + const result = await subject.npmPublish(options); + + expect(result).toEqual({ + id: "cool-package@1.2.3", + name: "cool-package", + version: "1.2.3", + previousVersion: "0.1.2", + tag: "latest", + access: "public", + registryUrl: new URL("http://example.com"), + releaseType: "major", + dryRun: false, + }); + }); + + it("should skip publish if not needed", async () => { + const options: Options = { token: "abc123" }; + const manifest: Manifest = { name: "cool-package", version: "1.2.3" }; + const authConfig = { + registryUrl: { value: new URL("http://example.com") }, + } as AuthConfig; + const publishConfig = { + tag: { value: "latest" }, + access: { value: "public" }, + dryRun: { value: false }, + } as PublishConfig; + const versions: VersionsResult = { "dist-tags": {}, versions: [] }; + const comparison: VersionComparison = { + releaseType: undefined, + previousVersion: "0.1.2", + }; + + td.when(readManifest("./package.json")).thenResolve(manifest); + td.when(normalizeOptions(options, manifest)).thenReturn({ + authConfig, + publishConfig, + }); + td.when(getVersions("cool-package", authConfig)).thenResolve(versions); + td.when(compareVersions(versions, publishConfig)).thenReturn(comparison); + + const result = await subject.npmPublish(options); + + td.verify(publish(publishConfig, authConfig), { times: 0 }); + + expect(result).toEqual({ + id: undefined, + name: "cool-package", + version: "1.2.3", + previousVersion: "0.1.2", + tag: "latest", + access: "public", + registryUrl: new URL("http://example.com"), + releaseType: undefined, + dryRun: false, + }); + }); +}); diff --git a/src/__tests__/read-manifest.test.ts b/src/__tests__/read-manifest.test.ts new file mode 100644 index 0000000..0909bf9 --- /dev/null +++ b/src/__tests__/read-manifest.test.ts @@ -0,0 +1,50 @@ +import fs from "node:fs/promises"; +import path from "node:path"; +import os from "node:os"; +import { describe, it, beforeEach, afterEach, expect } from "vitest"; + +import * as subject from "../read-manifest"; + +describe("readManifest", () => { + let tempDir: string; + + beforeEach(async () => { + tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "read-manifest-test-")); + }); + + afterEach(async () => { + await fs.rm(tempDir, { recursive: true, force: true }); + }); + + it("should read a package.json file", async () => { + await fs.writeFile( + path.join(tempDir, "package.json"), + JSON.stringify({ name: "cool-name", version: "cool-version" }), + "utf8" + ); + + const result = await subject.readManifest( + path.join(tempDir, "package.json") + ); + + expect(result).toEqual({ name: "cool-name", version: "cool-version" }); + }); + + it("should read a package.json file in a directory", async () => { + await fs.writeFile( + path.join(tempDir, "package.json"), + JSON.stringify({ name: "cool-name", version: "cool-version" }), + "utf8" + ); + + const result = await subject.readManifest(tempDir); + + expect(result).toEqual({ name: "cool-name", version: "cool-version" }); + }); + + it("should read a package.json file in the current working directory", async () => { + const result = await subject.readManifest(); + + expect(result).toMatchObject({ name: "@jsdevtools/npm-publish" }); + }); +}); diff --git a/src/action/index.ts b/src/action/index.ts index 1118850..179498b 100644 --- a/src/action/index.ts +++ b/src/action/index.ts @@ -1,11 +1,6 @@ -import { - debug, - getInput, - setFailed, - setOutput as setOutputActionsCore, -} from "@actions/core"; +import * as actionsCore from "@actions/core"; import { npmPublish } from "../npm-publish"; -import { Access, Options } from "../options"; +import type { Access, Options, Strategy } from "../options"; /** * The main entry point of the GitHub Action @@ -20,62 +15,73 @@ async function main(): Promise { // Get the GitHub Actions input options const options: Options = { - token: getInput("token", { required: true }), - registry: getInput("registry", { required: true }), - package: getInput("package", { required: true }), - checkVersion: - getInput("check-version", { required: true }).toLowerCase() === "true", + token: getInput("token", true), + package: getInput("package"), + registryUrl: getInput("registryUrl"), tag: getInput("tag"), - access: getInput("access") as Access, - dryRun: getInput("dry-run").toLowerCase() === "true", - greaterVersionOnly: - getInput("greater-version-only").toLowerCase() === "true", - debug: debugHandler, + access: getInput("access"), + strategy: getInput("strategy"), + dryRun: getInput("dry-run")?.toLowerCase() === "true", }; // Publish to NPM let results = await npmPublish(options); - if (results.type === "none") { + if (!results.releaseType) { console.log( - `\n📦 ${results.package} v${results.version} is already published to ${options.registry}` + `\n📦 ${results.name} v${results.version} is already published to ${results.registryUrl}` ); } - if (results.type === "lower") { + if (results.releaseType === "lower") { console.log( - `\n📦 ${results.package} v${results.version} is lower than the version published to ${options.registry}` + `\n📦 ${results.name} v${results.version} is lower than the version published to ${results.registryUrl}` ); } else if (results.dryRun) { console.log( - `\n📦 ${results.package} v${results.version} was NOT actually published to ${options.registry} (dry run)` + `\n📦 ${results.name} v${results.version} was NOT actually published to ${results.registryUrl} (dry run)` ); } else { console.log( - `\n📦 Successfully published ${results.package} v${results.version} to ${options.registry}` + `\n📦 Successfully published ${results.name} v${results.version} to ${results.registryUrl}` ); } // Set the GitHub Actions output variables - setOutput("type", results.type); + setOutput("id", results.id); + setOutput("name", results.name); setOutput("version", results.version); - setOutput("old-version", results.oldVersion); + setOutput("release-type", results.releaseType); + setOutput("previous-version", results.previousVersion); setOutput("tag", results.tag); setOutput("access", results.access); + setOutput("registry-url", results.registryUrl); setOutput("dry-run", results.dryRun); } catch (error) { errorHandler(error as Error); } } +/** + * Get input. + */ + +function getInput( + name: string, + required?: TRequired +): TRequired extends true ? ReturnT : ReturnT | undefined { + const value = actionsCore.getInput(name, { required }); + return value === "" ? undefined : (value as any); +} + /** * Set output with logging to stdout for test support */ -function setOutput(...args: Parameters) { +function setOutput(...args: Parameters) { if (process.env.NODE_ENV === "test") { console.log(`TEST::set-output name=${args[0]}::${args[1]}`); return; } - return setOutputActionsCore(...args); + return actionsCore.setOutput(...args); } /** @@ -83,20 +89,20 @@ function setOutput(...args: Parameters) { */ function errorHandler(error: Error): void { let message = error.stack || error.message || String(error); - setFailed(message); + actionsCore.setFailed(message); process.exit(); } /** * Prints debug logs to the GitHub Actions console */ -function debugHandler(message: string, data?: object) { - if (data) { - message += "\n" + JSON.stringify(data, undefined, 2); - } +// function debugHandler(message: string, data?: object) { +// if (data) { +// message += "\n" + JSON.stringify(data, undefined, 2); +// } - debug(message); -} +// actionsCore.debug(message); +// } // eslint-disable-next-line @typescript-eslint/no-floating-promises main(); diff --git a/src/cli/index.ts b/src/cli/index.ts index 318410f..ad23cf9 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -31,21 +31,21 @@ export async function main(args: string[]): Promise { } else { let results = await npmPublish(options); - if (!options.quiet) { - if (results.type === "none") { - console.log( - `\n📦 ${results.package} v${results.version} is already published to ${options.registry}` - ); - } else if (results.dryRun) { - console.log( - `\n📦 ${results.package} v${results.version} was NOT actually published to ${options.registry} (dry run)` - ); - } else { - console.log( - `\n📦 Successfully published ${results.package} v${results.version} to ${options.registry}` - ); - } + // if (!options.quiet) { + if (!results.releaseType) { + console.log( + `\n📦 ${results.name} v${results.version} is already published to ${results.registryUrl}` + ); + } else if (results.dryRun) { + console.log( + `\n📦 ${results.name} v${results.version} was NOT actually published to ${results.registryUrl} (dry run)` + ); + } else { + console.log( + `\n📦 Successfully published ${results.name} v${results.version} to ${results.registryUrl}` + ); } + // } } } catch (error) { errorHandler(error as Error); diff --git a/src/cli/parse-args.ts b/src/cli/parse-args.ts index 4ca0faa..fc224a8 100644 --- a/src/cli/parse-args.ts +++ b/src/cli/parse-args.ts @@ -54,13 +54,11 @@ export function parseArgs(argv: string[]): ParsedArgs { version: args.version as boolean, options: { token: args.token as string, - registry: args.registry as string, + registryUrl: args.registry as string, package: args.package as string, tag: args.tag as string, access: args.access as Access, dryRun: args["dry-run"] as boolean, - debug: args.debug ? console.debug : undefined, - quiet: args.quiet as boolean, }, }; diff --git a/src/compare-versions.ts b/src/compare-versions.ts new file mode 100644 index 0000000..65868c1 --- /dev/null +++ b/src/compare-versions.ts @@ -0,0 +1,21 @@ +import type { ReleaseType as SemverReleaseType } from "semver"; + +import type { PublishConfig } from "./normalize-options"; +import type { VersionsResult } from "./npm"; + +export type ReleaseType = SemverReleaseType | "lower"; + +export interface VersionComparison { + releaseType: ReleaseType | undefined; + previousVersion: string; +} + +export function compareVersions( + versions: VersionsResult, + publishConfig: PublishConfig +): VersionComparison { + void versions; + void publishConfig; + + throw new Error("ah"); +} diff --git a/src/errors.ts b/src/errors.ts new file mode 100644 index 0000000..07d3c2f --- /dev/null +++ b/src/errors.ts @@ -0,0 +1,28 @@ +export class NpmPublishError extends Error { + public originalError: Error | undefined; + + public constructor(message: string, originalError?: Error) { + if (originalError) { + super(`${message}\n${originalError.message}`); + } else { + super(message); + } + + this.name = "NpmPublishError"; + this.originalError = originalError; + } +} + +export class InvalidRegistryUrlError extends TypeError { + public constructor(value: unknown) { + super(`The given value "${String(value)}" is not a valid registry URL`); + this.name = "InvalidRegistryUrlError"; + } +} + +export class InvalidTokenError extends TypeError { + public constructor() { + super("The given value [omitted for security] is not a valid token"); + this.name = "InvalidTokenError"; + } +} diff --git a/src/index.ts b/src/index.ts index 0438c4c..e999876 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,14 +1,7 @@ -import { npmPublish } from "./npm-publish"; - // Export the external type definitions as named exports export * from "./options"; export * from "./results"; +export * from "./errors"; // Export `npmPublish` as a named export and the default export -export { npmPublish }; -export default npmPublish; - -// CommonJS default export hack -if (typeof module === "object" && typeof module.exports === "object") { - module.exports = Object.assign(module.exports.default, module.exports); -} +export { npmPublish } from "./npm-publish"; diff --git a/src/normalize-options.ts b/src/normalize-options.ts index 6b62aa6..f932d44 100644 --- a/src/normalize-options.ts +++ b/src/normalize-options.ts @@ -1,36 +1,100 @@ -import path from "node:path"; -import { Access, Debug, Options } from "./options"; +import type { Options, Access, Strategy } from "./options"; +import type { Manifest } from "./read-manifest"; +import * as errors from "./errors"; + +const DEFAULT_REGISTRY_URL = new URL("https://registry.npmjs.org/"); +const DEFAULT_TAG = "latest"; +const DEFAULT_ACCESS = "public"; +const DEFAULT_ACCESS_SCOPED = "restricted"; +const DEFAULT_STRATEGY = "upgrade"; /** - * Normalized and sanitized options - * - * @internal + * Normalized and sanitized auth and publish configurations. */ export interface NormalizedOptions { - token: string; - registry: string; - package?: string; - tag: string; - access?: Access; - dryRun?: boolean; - greaterVersionOnly?: boolean; - quiet?: boolean; - debug?: Debug; + authConfig: AuthConfig; + publishConfig: PublishConfig; +} + +interface ConfigValue { + value: TValue; + isDefault: boolean; +} + +/** + * Normalized and sanitized auth configuration. + */ +export interface AuthConfig { + registryUrl: ConfigValue; + token: ConfigValue; +} + +/** + * Normalized and sanitized publish configuration. + */ +export interface PublishConfig { + packageSpec: ConfigValue; + tag: ConfigValue; + access: ConfigValue; + dryRun: ConfigValue; + strategy: ConfigValue; } +const setValue = ( + value: T | undefined, + defaultValue: T +): ConfigValue => ({ + value: value ?? defaultValue, + isDefault: value === undefined || value === defaultValue, +}); + +const setUrlValue = ( + value: URL | undefined, + defaultValue: URL +): ConfigValue => ({ + value: value ?? defaultValue, + isDefault: value === undefined || value?.href === defaultValue.href, +}); + /** * Normalizes and sanitizes options, and fills-in any default values. - * - * @internal */ -export function normalizeOptions(options: Options): NormalizedOptions { - return { - ...options, - token: options.token ?? "", - registry: options.registry ?? "https://registry.npmjs.org/", - tag: options.tag ?? "latest", - package: options.package?.endsWith("package.json") - ? path.dirname(options.package) - : options.package, +export function normalizeOptions( + options: Options, + manifest: Manifest +): NormalizedOptions { + let defaultRegistryUrl = DEFAULT_REGISTRY_URL; + let defaultTag = DEFAULT_TAG; + let defaultAccess: Access = manifest.scope + ? DEFAULT_ACCESS_SCOPED + : DEFAULT_ACCESS; + + let registryUrl; + + if (options.registryUrl !== undefined) { + try { + registryUrl = new URL(options.registryUrl); + } catch { + throw new errors.InvalidRegistryUrlError(options.registryUrl); + } + } + + if (options.token !== undefined && typeof options.token !== "string") { + throw new errors.InvalidTokenError(); + } + + const authConfig: AuthConfig = { + token: { value: options.token, isDefault: false }, + registryUrl: setUrlValue(registryUrl, defaultRegistryUrl), }; + + const publishConfig: PublishConfig = { + packageSpec: setValue(undefined, ""), + tag: setValue(undefined, defaultTag), + access: setValue(undefined, defaultAccess), + dryRun: setValue(undefined, false), + strategy: setValue(undefined, DEFAULT_STRATEGY), + }; + + return { authConfig, publishConfig }; } diff --git a/src/npm-publish.ts b/src/npm-publish.ts index eb3780d..87e7903 100644 --- a/src/npm-publish.ts +++ b/src/npm-publish.ts @@ -1,54 +1,33 @@ -import * as semver from "semver"; +import { readManifest } from "./read-manifest"; import { normalizeOptions } from "./normalize-options"; import { getVersions, publish } from "./npm"; -import { Options } from "./options"; -import { readManifest } from "./read-manifest"; -import { Results } from "./results"; +import { compareVersions } from "./compare-versions"; +import type { Options } from "./options"; +import type { Results } from "./results"; /** * Publishes a package to NPM, if its version has changed */ -export async function npmPublish(opts: Options = {}): Promise { - const { registry, token, ...options } = normalizeOptions(opts); - const authOptions = { registry, token }; - - // Get the old and new version numbers - const manifest = await readManifest(options.package, options.debug); - const versions = await getVersions(manifest.name, authOptions); - const publishedVersion = versions["dist-tags"][options.tag] ?? "0.0.0"; - - // Determine if/how the version has changed - let diff = semver.diff(manifest.version, publishedVersion); - - // Compare both versions to see if it's changed - let cmp = semver.compare(manifest.version, publishedVersion); - - let shouldPublish = - // compare returns 1 if manifest is higher than published - (options.greaterVersionOnly && cmp === 1) || - // compare returns 0 if the manifest is the same as published - cmp !== 0; - - if (shouldPublish) { - // Publish the new version to NPM - await publish(options, authOptions); +export async function npmPublish(options: Options): Promise { + const manifest = await readManifest(options.package); + const { authConfig, publishConfig } = normalizeOptions(options, manifest); + const publishedVersions = await getVersions(manifest.name, authConfig); + const versionComparison = compareVersions(publishedVersions, publishConfig); + let publishResult; + + if (versionComparison.releaseType !== undefined) { + publishResult = await publish(publishConfig, authConfig); } - let results: Results = { - package: manifest.name, - registry: authOptions.registry, - // The version should be marked as lower if we disallow decrementing the version - type: - (options.greaterVersionOnly && cmp === -1 && "lower") || diff || "none", - version: manifest.version.raw, - oldVersion: publishedVersion, - tag: options.tag, - access: - options.access || - (manifest.name.startsWith("@") ? "restricted" : "public"), - dryRun: options.dryRun ?? false, + return { + id: publishResult?.id, + name: manifest.name, + version: manifest.version, + releaseType: versionComparison.releaseType, + previousVersion: versionComparison.previousVersion, + tag: publishConfig.tag.value, + access: publishConfig.access.value, + dryRun: publishConfig.dryRun.value, + registryUrl: authConfig.registryUrl.value, }; - - options.debug?.("OUTPUT:", results); - return results; } diff --git a/src/npm/__tests__/call-npm-cli.test.ts b/src/npm/__tests__/call-npm-cli.test.ts index 46a8d49..93d0a62 100644 --- a/src/npm/__tests__/call-npm-cli.test.ts +++ b/src/npm/__tests__/call-npm-cli.test.ts @@ -12,7 +12,7 @@ describe("callNpmCli", () => { it("should call the NPM CLI in JSON mode", async () => { const result = await subject.callNpmCli("config", ["list"]); - expect(result).toMatchObject({ json: true }); + expect(result).toMatchObject({ json: true, "ignore-scripts": true }); }); it("should raise if error", async () => { diff --git a/src/npm/__tests__/get-publish-args.test.ts b/src/npm/__tests__/get-publish-args.test.ts index 06d89d1..ec207e8 100644 --- a/src/npm/__tests__/get-publish-args.test.ts +++ b/src/npm/__tests__/get-publish-args.test.ts @@ -3,42 +3,23 @@ import { describe, it, expect } from "vitest"; import * as subject from "../get-publish-args"; describe("getPublishArgs", () => { - it("should return no args if no config", () => { - const result = subject.getPublishArgs({}); - - expect(result).toEqual([]); - }); - it("should add the package spec positional argument", () => { - const result = subject.getPublishArgs({ packageSpec: "./cool-package" }); - - expect(result).toEqual(["./cool-package"]); - }); - - it("should add a tag flag", () => { - const result = subject.getPublishArgs({ - packageSpec: "./cool-package", - tag: "next", - }); - - expect(result).toEqual(["./cool-package", "--tag", "next"]); - }); - - it("should add a access flag", () => { - const result = subject.getPublishArgs({ - packageSpec: "./cool-package", - access: "restricted", - }); - - expect(result).toEqual(["./cool-package", "--access", "restricted"]); - }); - - it("should add a dry run flag", () => { const result = subject.getPublishArgs({ - packageSpec: "./cool-package", - dryRun: false, + packageSpec: { value: "./cool-package", isDefault: false }, + tag: { value: "next", isDefault: false }, + access: { value: "restricted", isDefault: false }, + dryRun: { value: false, isDefault: false }, + strategy: { value: "upgrade", isDefault: true }, }); - expect(result).toEqual(["./cool-package", "--dry-run", "false"]); + expect(result).toEqual([ + "./cool-package", + "--tag", + "next", + "--access", + "restricted", + "--dry-run", + "false", + ]); }); }); diff --git a/src/npm/__tests__/npm.test.ts b/src/npm/__tests__/npm.test.ts index 4dc9475..1a2611f 100644 --- a/src/npm/__tests__/npm.test.ts +++ b/src/npm/__tests__/npm.test.ts @@ -2,6 +2,8 @@ import { vi, describe, it, beforeEach, afterEach, expect } from "vitest"; import { imitateEsm, reset } from "testdouble-vitest"; import * as td from "testdouble"; +import type { AuthConfig, PublishConfig } from "../../normalize-options"; + import * as subject from ".."; import { useNpmEnv, type NpmCliTask } from "../use-npm-env"; import { callNpmCli } from "../call-npm-cli"; @@ -12,7 +14,7 @@ vi.mock("../call-npm-cli", () => imitateEsm("../call-npm-cli")); vi.mock("../get-publish-args", () => imitateEsm("../get-publish-args")); describe("npm", () => { - const authConfig = { registry: "https://example.com", token: "abc123" }; + const authConfig = { token: { value: "abc123" } } as AuthConfig; const cliEnv = { foo: "bar" }; beforeEach(() => { @@ -49,30 +51,17 @@ describe("npm", () => { }); it("should publish a package", async () => { - const publishConfig = { packageSpec: "./cool-package" }; + const publishConfig = { tag: { value: "next" } } as PublishConfig; - td.when(getPublishArgs(publishConfig)).thenReturn([ - "--registry", - "cool-registry", - ]); + td.when(getPublishArgs(publishConfig)).thenReturn(["--tag", "next"]); td.when( - callNpmCli( - "publish", - ["--registry", "cool-registry"], - { env: cliEnv } - ) - ).thenResolve({ - id: "@example/cool-package@1.2.3", - name: "@example/cool-package", - version: "1.2.3", - }); + callNpmCli("publish", ["--tag", "next"], { + env: cliEnv, + }) + ).thenResolve({ id: "@example/cool-package@1.2.3" }); const result = await subject.publish(publishConfig, authConfig); - expect(result).toEqual({ - id: "@example/cool-package@1.2.3", - name: "@example/cool-package", - version: "1.2.3", - }); + expect(result).toEqual({ id: "@example/cool-package@1.2.3" }); }); }); diff --git a/src/npm/call-npm-cli.ts b/src/npm/call-npm-cli.ts index 223c2a7..af9174e 100644 --- a/src/npm/call-npm-cli.ts +++ b/src/npm/call-npm-cli.ts @@ -49,7 +49,7 @@ export async function callNpmCli( options: NpmCliOptions = {} ): Promise { const { stdout, error } = await execProcess( - ["npm", command, "--json", ...args].join(" "), + ["npm", command, "--ignore-scripts", "--json", ...args].join(" "), options?.env ); diff --git a/src/npm/get-publish-args.ts b/src/npm/get-publish-args.ts index 432b677..2b69d8f 100644 --- a/src/npm/get-publish-args.ts +++ b/src/npm/get-publish-args.ts @@ -1,4 +1,4 @@ -import type { PublishConfig } from "."; +import type { PublishConfig } from "../normalize-options"; /** * Given a publish configuration, get the NPM CLI publish arguments. @@ -8,23 +8,14 @@ import type { PublishConfig } from "."; */ export function getPublishArgs(config: PublishConfig): string[] { const { packageSpec, tag, access, dryRun } = config; - const args: string[] = []; - if (packageSpec !== undefined) { - args.push(packageSpec); - } - - if (tag !== undefined) { - args.push("--tag", tag); - } - - if (access !== undefined) { - args.push("--access", access); - } - - if (dryRun !== undefined) { - args.push("--dry-run", JSON.stringify(dryRun)); - } - - return args; + return [ + packageSpec.value, + "--tag", + tag.value, + "--access", + access.value, + "--dry-run", + JSON.stringify(dryRun.value), + ]; } diff --git a/src/npm/index.ts b/src/npm/index.ts index cf043e2..3ae83c5 100644 --- a/src/npm/index.ts +++ b/src/npm/index.ts @@ -1,4 +1,5 @@ -import { useNpmEnv, type NpmAuthConfig } from "./use-npm-env"; +import type { AuthConfig, PublishConfig } from "../normalize-options"; +import { useNpmEnv } from "./use-npm-env"; import { callNpmCli } from "./call-npm-cli"; import { getPublishArgs } from "./get-publish-args"; @@ -7,17 +8,8 @@ export interface VersionsResult { versions: string[]; } -export interface PublishConfig { - packageSpec?: string; - tag?: string; - access?: string; - dryRun?: boolean; -} - export interface PublishResult { id: string; - name: string; - version: string; } /** @@ -29,7 +21,7 @@ export interface PublishResult { */ export async function getVersions( packageName: string, - authConfig: NpmAuthConfig + authConfig: AuthConfig ): Promise { return useNpmEnv(authConfig, (env) => { return callNpmCli( @@ -48,7 +40,7 @@ export async function getVersions( */ export async function publish( publishConfig: PublishConfig, - authConfig: NpmAuthConfig + authConfig: AuthConfig ): Promise { const publishArgs = getPublishArgs(publishConfig); diff --git a/src/npm/use-npm-env.ts b/src/npm/use-npm-env.ts index b1db434..f166fda 100644 --- a/src/npm/use-npm-env.ts +++ b/src/npm/use-npm-env.ts @@ -2,12 +2,8 @@ import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; -import { type NpmCliEnv } from "./call-npm-cli"; - -export interface NpmAuthConfig { - registry: string; - token: string; -} +import type { AuthConfig } from "../normalize-options"; +import { callNpmCli, type NpmCliEnv } from "./call-npm-cli"; export type NpmCliTask = (env: NpmCliEnv) => Promise; @@ -21,27 +17,35 @@ export type NpmCliTask = (env: NpmCliEnv) => Promise; * @returns The resolved value of `task` */ export async function useNpmEnv( - auth: NpmAuthConfig, + auth: AuthConfig, task: NpmCliTask ): Promise { - const { registry, token } = auth; + const { registryUrl, token } = auth; const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "npm-publish-")); const tempConfigFile = path.join(tempDir, ".npmrc"); - const registryUrl = new URL(registry); + const userConfigFile = await callNpmCli("config", ["get", "userconfig"]); + + const userConfig = await fs + .readFile(userConfigFile, "utf8") + .catch((error: NodeJS.ErrnoException) => { + if (error.code === "ENOENT") return ""; + throw error; + }); const config = [ + `; copied from ${userConfig}`, + userConfig, "; added by jsdevtools/npm-publish", - `registry=${registry}`, - `//${registryUrl.hostname}/:authToken=\${NODE_AUTH_TOKEN}`, + `registry=${registryUrl.value.href}`, + `//${registryUrl.value.hostname}/:authToken=\${NODE_AUTH_TOKEN}`, "", ].join(os.EOL); - const env = { - /* eslint-disable @typescript-eslint/naming-convention */ - NODE_AUTH_TOKEN: token, - npm_config_userconfig: tempConfigFile, - /* eslint-enable @typescript-eslint/naming-convention */ - }; + const env: NpmCliEnv = { npm_config_userconfig: tempConfigFile }; + + if (token.value) { + env.NODE_AUTH_TOKEN = token.value; + } await fs.writeFile(tempConfigFile, config, "utf8"); diff --git a/src/options.ts b/src/options.ts index 755c5e7..4a8567c 100644 --- a/src/options.ts +++ b/src/options.ts @@ -1,89 +1,101 @@ +/** + * The possible access levels for an NPM package + */ +export type Access = "public" | "restricted"; + +/** + * Version check strategy. + * + * - `upgrade`: the package will only be published if its version + * is higher than the existing version on the configured tag. + * - `always`: the package will be published if its version + * is not yet published, even if its lower that the existing tag. + */ +export type Strategy = "upgrade" | "always"; + +/** + * A function that logs messages + */ +export type HandleLog = (message: string, data?: object) => void; + +/** + * A level at which a log can occur. + */ +export type LogLevel = "error" | "warn" | "info" | "debug"; + +/** + * An object that can be used to log messages. + */ +export type Logger = Record; + /** * Options that determine how/whether the package is published. */ export interface Options { /** - * The NPM access token to use when publishing + * The NPM access token to use when publishing. */ - token?: string; + token: string; /** - * The NPM registry URL to use. + * The absolute or relative path of your package. * - * Defaults to "https://registry.npmjs.org/" + * Defaults to the package in the current working directory. */ - registry?: string; + package?: string; /** - * The absolute or relative path of your package.json file. + * The NPM registry URL to use. * - * Defaults to "./package.json" + * Defaults to "https://registry.npmjs.org/". + * + * Can be overridden by the package.json's `publishConfig` field. */ - package?: string; + registryUrl?: string | URL; /** - * The tag to publish to. This allows people to install the package - * using "npm install @". + * The tag to publish to. * - * Defaults to "latest" + * Defaults to "latest". + * + * Can be overridden by the package.json's `publishConfig` field. */ tag?: string; /** + * Package access. + * * Determines whether the published package should be publicly visible, * or restricted to members of your NPM organization. This only applies * to scoped packages. * - * Defaults to "restricted" for scoped packages and "public" for non-scoped packages. - */ - access?: Access; - - /** - * If true, run npm publish with the --dry-run flag - * so that the package is not published. Used for - * testing workflows. + * Defaults to "restricted" for scoped packages, unless that package has been + * previously published as `public` * - * Defaults to `false` + * Can be overridden by the package.json's `publishConfig` field. */ - dryRun?: boolean; + access?: Access; /** - * Only publish the package if the version number in package.json - * differs from the latest on NPM. + * Version check strategy. * - * Defaults to `true` - */ - checkVersion?: boolean; - - /** - * Suppress console output from NPM and npm-publish. + * If "upgrade" (default), the package will only be published if its version + * is higher than the existing version on the configured tag. If "always", + * the package will be published if its version is simply not yet published. * - * Defaults to `false` + * Defaults to `upgrade`. */ - quiet?: boolean; + strategy?: Strategy; /** - * Only publish the package if the version number in package.json - * is greater than the latest on NPM. + * Pretend to publish, but don't actually upload to the registry. * - * Defaults to `false` + * Defaults to `false`. */ - greaterVersionOnly?: boolean; + dryRun?: boolean; /** - * A function to call to log debug messages. - * - * Defaults to a no-op function + * An interface to log messages. */ - debug?: Debug; + logger?: Logger; } - -/** - * The possible access levels for an NPM package - */ -export type Access = "public" | "restricted"; - -/** - * A function that receives debug messages - */ -export type Debug = (message: string, data?: object) => void; diff --git a/src/read-manifest.ts b/src/read-manifest.ts index 33c5f01..8d7fe03 100644 --- a/src/read-manifest.ts +++ b/src/read-manifest.ts @@ -1,8 +1,6 @@ import fs from "node:fs/promises"; import path from "node:path"; -import { SemVer } from "semver"; import { ono } from "@jsdevtools/ono"; -import { Debug } from "./options"; /** * A package manifest (package.json) @@ -11,43 +9,46 @@ import { Debug } from "./options"; */ export interface Manifest { name: string; - version: SemVer; + version: string; + scope?: string; } /** - * Reads the package manifest (package.json) and returns its parsed contents + * Reads the package manifest (package.json) and returns its parsed contents. * - * @internal + * @param packagePath The path to the package being published. + * @returns The parsed package metadata. */ -export async function readManifest( - packageSpec?: string, - debug?: Debug -): Promise { - const packageManifest = path.join(packageSpec ?? ".", "package.json"); - debug && debug(`Reading manifest from ${path.resolve(packageManifest)}`); +export async function readManifest(packagePath?: string): Promise { + let manifestPath = packagePath; + + if (!manifestPath) { + manifestPath = "package.json"; + } else if (path.extname(manifestPath) === "") { + manifestPath = path.join(manifestPath, "package.json"); + } + let json: string; try { - json = await fs.readFile(packageManifest, "utf8"); + json = await fs.readFile(manifestPath, "utf8"); } catch (error) { - throw ono(error, `Unable to read ${packageManifest}`); + throw ono(error, `Unable to read ${manifestPath}`); } try { - let { name, version } = JSON.parse(json) as Record; + const { name, version } = JSON.parse(json) as Record; if (typeof name !== "string" || name.trim().length === 0) { throw new TypeError("Invalid package name"); } - let manifest: Manifest = { - name, - version: new SemVer(version as string), - }; + if (typeof version !== "string" || version.trim().length === 0) { + throw new TypeError("Invalid package version"); + } - debug && debug("MANIFEST:", manifest); - return manifest; + return { name: name.trim(), version: version.trim() }; } catch (error) { - throw ono(error, `Unable to parse ${packageManifest}`); + throw ono(error, `Unable to parse ${manifestPath}`); } } diff --git a/src/results.ts b/src/results.ts index d2a788c..2ae638a 100644 --- a/src/results.ts +++ b/src/results.ts @@ -1,36 +1,35 @@ -import { ReleaseType } from "semver"; -import { Access } from "./options"; - -export { ReleaseType }; +import type { Access } from "./options"; +import type { ReleaseType } from "./compare-versions"; /** * Results of the publish */ export interface Results { /** - * The type of version change that occurred + * The identifier of the published package, if published. + * Format is `${packageName}@${version}` */ - type: ReleaseType | "lower" | "none"; + id: string | undefined; /** * The name of the NPM package that was published */ - package: string; + name: string; /** - * The registry where the NPM package was published + * The version that was published */ - registry: string; + version: string; /** - * The version that was published + * The type of version change that occurred, if any. */ - version: string; + releaseType: ReleaseType | undefined; /** * The version number that was previously published to NPM */ - oldVersion: string; + previousVersion: string; /** * The tag that the package was published to. @@ -43,6 +42,11 @@ export interface Results { */ access: Access; + /** + * The registry where the NPM package was published + */ + registryUrl: URL; + /** * Whether this was a dry run (not published to NPM) */ From 9662ce011195b44af37d15b1f16a6d1dfbe7d434 Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Fri, 14 Apr 2023 17:33:20 -0400 Subject: [PATCH 06/36] fixup: switch ci to use new unit test suite --- .eslintignore | 1 + .github/workflows/ci-cd.yml | 29 +- .mocharc.yml | 13 - .nycrc.yml | 13 - package-lock.json | 2622 ++++------------------------- package.json | 18 +- src/__tests__/npm-publish.test.ts | 8 +- vitest.config.ts | 12 + 8 files changed, 339 insertions(+), 2377 deletions(-) delete mode 100644 .mocharc.yml delete mode 100644 .nycrc.yml create mode 100644 vitest.config.ts diff --git a/.eslintignore b/.eslintignore index 4bc4547..a245ef7 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ dist lib coverage +test diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 99a5772..37b0d2d 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -29,18 +29,13 @@ jobs: run: npm run lint test: - name: Run tests using Node ${{ matrix.node }} on ${{ matrix.os }} - runs-on: ${{ matrix.os }} + name: Run unit tests with Node.js ${{ matrix.node-version }} + runs-on: ubuntu-latest timeout-minutes: 10 strategy: fail-fast: false matrix: - os: - - ubuntu-latest - - macos-latest - # TODO(mc, 2023-04-07): investigate and fix coverage-related failures on Windows - # - windows-latest - node: + node-version: - 16 - 18 @@ -51,7 +46,7 @@ jobs: - name: Install Node.js ${{ matrix.node }} and dependencies uses: ./.github/actions/setup with: - node-version: ${{ matrix.node }} + node-version: ${{ matrix.node-version }} - name: Build the code run: npm run build @@ -99,11 +94,22 @@ jobs: path: lib e2e: - name: Run end-to-end tests - runs-on: ubuntu-latest + name: Run E2E tests with Node.js ${{ matrix.node-version }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} timeout-minutes: 10 needs: build + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + # - macos-latest + # - windows-latest + node-version: + # - 16 + - 18 + services: verdaccio: image: verdaccio/verdaccio:5 @@ -117,6 +123,7 @@ jobs: - name: Install Node.js and dependencies uses: ./.github/actions/setup with: + node-version: ${{ matrix.node-version }} install-command: npm install --production - name: Download publish artifact diff --git a/.mocharc.yml b/.mocharc.yml deleted file mode 100644 index 9ce66d4..0000000 --- a/.mocharc.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Mocha options -# https://mochajs.org/#configuring-mocha-nodejs -# https://github.com/mochajs/mocha/blob/master/example/config/.mocharc.yml - -spec: - # Test fixtures - - test/fixtures/**/*.js - - # Test specs - - test/specs/**/*.spec.js - -recursive: true -timeout: 30000 # Allow time for multiple process spawning diff --git a/.nycrc.yml b/.nycrc.yml deleted file mode 100644 index a6717cb..0000000 --- a/.nycrc.yml +++ /dev/null @@ -1,13 +0,0 @@ -# NYC config -# https://github.com/istanbuljs/nyc#configuration-files - -extension: - - .js - - .ts - -exclude: - - test - -reporter: - - text - - lcov diff --git a/package-lock.json b/package-lock.json index a2f69cc..9cf37c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,14 +19,11 @@ }, "devDependencies": { "@actions/core": "^1.10.0", - "@jsdevtools/chai-exec": "^2.1.1", - "@types/chai": "^4.3.4", "@types/command-line-args": "^5.0.0", - "@types/mocha": "^10.0.1", "@types/node": "^18.15.11", "@typescript-eslint/eslint-plugin": "^5.58.0", "@typescript-eslint/parser": "^5.58.0", - "chai": "^4.3.7", + "@vitest/coverage-istanbul": "^0.30.1", "concurrently": "^8.0.1", "esbuild": "0.17.16", "eslint": "^8.38.0", @@ -38,10 +35,8 @@ "eslint-plugin-promise": "^6.1.1", "eslint-plugin-sonarjs": "^0.19.0", "eslint-plugin-unicorn": "^46.0.0", - "mocha": "^10.2.0", - "nyc": "^15.1.0", "prettier": "^2.8.7", - "shx": "^0.3.3", + "rimraf": "^5.0.0", "testdouble": "^3.17.2", "testdouble-vitest": "^0.1.2", "typescript": "^5.0.4", @@ -956,92 +951,6 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", @@ -1098,33 +1007,6 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@jsdevtools/chai-exec": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@jsdevtools/chai-exec/-/chai-exec-2.1.1.tgz", - "integrity": "sha512-EhLHKeucYbbbWHDhExi0fqDSI9noxYUdzy1LLaAdkHLaIJjd8gv5bCOqEsuVh6EJF3ZspUSpLJjytxnOPahRig==", - "dev": true, - "dependencies": { - "@jsdevtools/ez-spawn": "^3.0.3" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@jsdevtools/ez-spawn": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@jsdevtools/ez-spawn/-/ez-spawn-3.0.4.tgz", - "integrity": "sha512-f5DRIOZf7wxogefH03RjMPMdBF7ADTWUMoOs9kaJo06EfwF+aFhMZMDZxHg/Xe12hptN9xoZjGso2fdjapBRIA==", - "dev": true, - "dependencies": { - "call-me-maybe": "^1.0.1", - "cross-spawn": "^7.0.3", - "string-argv": "^0.3.1", - "type-detect": "^4.0.8" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@jsdevtools/ono": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", @@ -1218,12 +1100,6 @@ "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, - "node_modules/@types/mocha": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", - "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", - "dev": true - }, "node_modules/@types/node": { "version": "18.15.11", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz", @@ -1470,6 +1346,51 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@vitest/coverage-istanbul": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/coverage-istanbul/-/coverage-istanbul-0.30.1.tgz", + "integrity": "sha512-DGlvErzx3zzrqtKlwTq/vxOPBRmUU/qDdlxTZgPhIuyoQIUCiQBrQod9wlX5uhppyYZ1mgxf2XtStZmzZxcSug==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-instrument": "^5.2.1", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.1", + "istanbul-reports": "^3.1.5", + "test-exclude": "^6.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "vitest": ">=0.30.0 <1" + } + }, + "node_modules/@vitest/coverage-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@vitest/coverage-istanbul/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/@vitest/expect": { "version": "0.30.1", "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.30.1.tgz", @@ -1581,19 +1502,6 @@ "node": ">=0.4.0" } }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -1610,15 +1518,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -1643,37 +1542,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/append-transform": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", - "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", - "dev": true, - "dependencies": { - "default-require-extensions": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true - }, "node_modules/are-docs-informative": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", @@ -1683,15 +1551,6 @@ "node": ">=14" } }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, "node_modules/array-back": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", @@ -1804,15 +1663,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/blueimp-md5": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.19.0.tgz", @@ -1841,12 +1691,6 @@ "node": ">=8" } }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, "node_modules/browserslist": { "version": "4.20.3", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.3.tgz", @@ -1906,21 +1750,6 @@ "node": ">=8" } }, - "node_modules/caching-transform": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", - "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", - "dev": true, - "dependencies": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -1934,12 +1763,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2008,33 +1831,6 @@ "node": "*" } }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, "node_modules/ci-info": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", @@ -2071,26 +1867,6 @@ "node": ">=0.8.0" } }, - "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -2132,12 +1908,6 @@ "node": ">= 12.0.0" } }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -2326,15 +2096,6 @@ } } }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/deep-eql": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", @@ -2353,18 +2114,6 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "node_modules/default-require-extensions": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", - "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", - "dev": true, - "dependencies": { - "strip-bom": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/define-lazy-prop": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", @@ -2390,15 +2139,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -2545,12 +2285,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true - }, "node_modules/esbuild": { "version": "0.17.16", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.16.tgz", @@ -3107,19 +2841,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/esquery": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", @@ -3253,105 +2974,24 @@ "node": ">=8" } }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, + "node_modules/find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" + "array-back": "^3.0.1" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + "node": ">=4.0.0" } }, - "node_modules/find-cache-dir/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-cache-dir/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-cache-dir/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/find-cache-dir/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-cache-dir/node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-replace": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", - "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", - "dependencies": { - "array-back": "^3.0.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", + "locate-path": "^6.0.0", "path-exists": "^4.0.0" }, "engines": { @@ -3361,15 +3001,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, "node_modules/flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -3383,6 +3014,21 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/flat-cache/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/flatted": { "version": "3.2.5", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", @@ -3398,39 +3044,6 @@ "is-callable": "^1.1.3" } }, - "node_modules/foreground-child": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/fromentries": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", - "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3525,15 +3138,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/get-symbol-description": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", @@ -3769,40 +3373,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/hasha": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", - "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", - "dev": true, - "dependencies": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/hasha/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, "node_modules/hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", @@ -3888,15 +3458,6 @@ "node": ">= 0.4" } }, - "node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/is-array-buffer": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", @@ -3929,18 +3490,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/is-boolean-object": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", @@ -4101,15 +3650,6 @@ "node": ">=8" } }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -4147,18 +3687,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-string": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", @@ -4208,24 +3736,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", @@ -4238,15 +3748,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", @@ -4274,60 +3775,6 @@ "node": ">=8" } }, - "node_modules/istanbul-lib-hook": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", - "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", - "dev": true, - "dependencies": { - "append-transform": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", - "dev": true, - "dependencies": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/istanbul-lib-processinfo": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", - "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", - "dev": true, - "dependencies": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.0", - "istanbul-lib-coverage": "^3.0.0-alpha.1", - "make-dir": "^3.0.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^3.3.3" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/istanbul-lib-report": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", @@ -4357,9 +3804,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz", - "integrity": "sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -4394,19 +3841,6 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/jsdoc-type-pratt-parser": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz", @@ -4521,34 +3955,12 @@ "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" }, - "node_modules/lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true - }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/loupe": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", @@ -4558,6 +3970,15 @@ "get-func-name": "^2.0.0" } }, + "node_modules/lru-cache": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.0.2.tgz", + "integrity": "sha512-7zYMKApzQ9qQE13xQUzbXVY3p2C5lh+9V+bs8M9fRf1TF59id+8jkljRWtIPfBfNP4yQAol5cqh/e8clxatdXw==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, "node_modules/magic-string": { "version": "0.30.0", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.0.tgz", @@ -4649,11 +4070,14 @@ "node": "*" } }, - "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true + "node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "dev": true, + "engines": { + "node": ">=8" + } }, "node_modules/mlly": { "version": "1.2.0", @@ -4667,156 +4091,12 @@ "ufo": "^1.1.1" } }, - "node_modules/mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", - "dev": true, - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "node_modules/mocha/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/mocha/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/mocha/node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/mocha/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/mocha/node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -4829,18 +4109,6 @@ "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", "dev": true }, - "node_modules/node-preload": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", - "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", - "dev": true, - "dependencies": { - "process-on-spawn": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/node-releases": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.4.tgz", @@ -4868,192 +4136,6 @@ "semver": "bin/semver" } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nyc": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", - "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", - "dev": true, - "dependencies": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "bin": { - "nyc": "bin/nyc.js" - }, - "engines": { - "node": ">=8.9" - } - }, - "node_modules/nyc/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/nyc/node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/nyc/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/nyc/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "node_modules/nyc/node_modules/yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dev": true, - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/object-inspect": { "version": "1.12.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", @@ -5180,18 +4262,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -5201,21 +4271,6 @@ "node": ">=6" } }, - "node_modules/package-hash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", - "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -5279,6 +4334,22 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-scurry": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.6.4.tgz", + "integrity": "sha512-Qp/9IHkdNiXJ3/Kon++At2nVpnhRiPq/aSvQN+H3U1WZbvNRK0RIQK/o4HMqPoXjpuGJUEWpHSs6Mnjxqh3TQg==", + "dev": true, + "dependencies": { + "lru-cache": "^9.0.0", + "minipass": "^5.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -5433,18 +4504,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/process-on-spawn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", - "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", - "dev": true, - "dependencies": { - "fromentries": "^1.2.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/punycode": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", @@ -5487,15 +4546,6 @@ "node": ">= 0.14.0" } }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -5604,30 +4654,6 @@ "node": ">=8" } }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "dependencies": { - "resolve": "^1.1.6" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/regexp-tree": { "version": "0.1.24", "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.24.tgz", @@ -5687,18 +4713,6 @@ "jsesc": "bin/jsesc" } }, - "node_modules/release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", - "dev": true, - "dependencies": { - "es6-error": "^4.0.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -5708,12 +4722,6 @@ "node": ">=0.10.0" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, "node_modules/resolve": { "version": "1.22.3", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.3.tgz", @@ -5746,20 +4754,65 @@ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.0.tgz", + "integrity": "sha512-Jf9llaP+RvaEVS5nPShYFhtXIrb3LRKP281ib3So0KkeZKo2wIKyq0Re7TOSwanasA423PSr6CCIL4bP6T040g==", + "dev": true, + "dependencies": { + "glob": "^10.0.0" + }, + "bin": { + "rimraf": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.0.0.tgz", + "integrity": "sha512-zmp9ZDC6NpDNLujV2W2n+3lH+BafIVZ4/ct+Yj3BMZTH/+bgm/eVjHzeFLwxJrrIGgjjS2eiQLlpurHsNlEAtQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "minimatch": "^9.0.0", + "minipass": "^5.0.0", + "path-scurry": "^1.6.4" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "node_modules/rimraf/node_modules/minimatch": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.0.tgz", + "integrity": "sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w==", "dev": true, "dependencies": { - "glob": "^7.1.3" + "brace-expansion": "^2.0.1" }, - "bin": { - "rimraf": "bin.js" + "engines": { + "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -5863,21 +4916,6 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, - "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -5908,39 +4946,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", - "dev": true, - "dependencies": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - }, - "bin": { - "shjs": "bin/shjs" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/shx": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz", - "integrity": "sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==", - "dev": true, - "dependencies": { - "minimist": "^1.2.3", - "shelljs": "^0.8.5" - }, - "bin": { - "shx": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -5961,12 +4966,6 @@ "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", "dev": true }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, "node_modules/slash": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", @@ -6003,23 +5002,6 @@ "integrity": "sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==", "dev": true }, - "node_modules/spawn-wrap": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", - "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", - "dev": true, - "dependencies": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/spdx-correct": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", @@ -6052,12 +5034,6 @@ "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", "dev": true }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, "node_modules/stackback": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", @@ -6070,15 +5046,6 @@ "integrity": "sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA==", "dev": true }, - "node_modules/string-argv": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", - "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", - "dev": true, - "engines": { - "node": ">=0.6.19" - } - }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -6172,15 +5139,6 @@ "node": ">=8" } }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-indent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", @@ -6473,15 +5431,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "node_modules/typescript": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", @@ -6533,16 +5482,6 @@ "punycode": "^2.1.0" } }, - "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, - "bin": { - "uuid": "bin/uuid" - } - }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -6744,12 +5683,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, "node_modules/which-typed-array": { "version": "1.1.9", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", @@ -6795,12 +5728,6 @@ "node": ">=0.10.0" } }, - "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true - }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -6824,18 +5751,6 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -6845,72 +5760,6 @@ "node": ">=10" } }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -7506,70 +6355,6 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, - "@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } - } - }, "@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", @@ -7614,27 +6399,6 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "@jsdevtools/chai-exec": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@jsdevtools/chai-exec/-/chai-exec-2.1.1.tgz", - "integrity": "sha512-EhLHKeucYbbbWHDhExi0fqDSI9noxYUdzy1LLaAdkHLaIJjd8gv5bCOqEsuVh6EJF3ZspUSpLJjytxnOPahRig==", - "dev": true, - "requires": { - "@jsdevtools/ez-spawn": "^3.0.3" - } - }, - "@jsdevtools/ez-spawn": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@jsdevtools/ez-spawn/-/ez-spawn-3.0.4.tgz", - "integrity": "sha512-f5DRIOZf7wxogefH03RjMPMdBF7ADTWUMoOs9kaJo06EfwF+aFhMZMDZxHg/Xe12hptN9xoZjGso2fdjapBRIA==", - "dev": true, - "requires": { - "call-me-maybe": "^1.0.1", - "cross-spawn": "^7.0.3", - "string-argv": "^0.3.1", - "type-detect": "^4.0.8" - } - }, "@jsdevtools/ono": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", @@ -7715,12 +6479,6 @@ "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, - "@types/mocha": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", - "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", - "dev": true - }, "@types/node": { "version": "18.15.11", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz", @@ -7867,6 +6625,41 @@ } } }, + "@vitest/coverage-istanbul": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/coverage-istanbul/-/coverage-istanbul-0.30.1.tgz", + "integrity": "sha512-DGlvErzx3zzrqtKlwTq/vxOPBRmUU/qDdlxTZgPhIuyoQIUCiQBrQod9wlX5uhppyYZ1mgxf2XtStZmzZxcSug==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-instrument": "^5.2.1", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.1", + "istanbul-reports": "^3.1.5", + "test-exclude": "^6.0.0" + }, + "dependencies": { + "istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "requires": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "@vitest/expect": { "version": "0.30.1", "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.30.1.tgz", @@ -7957,16 +6750,6 @@ "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", "dev": true }, - "aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } - }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -7979,12 +6762,6 @@ "uri-js": "^4.2.2" } }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -8000,46 +6777,12 @@ "color-convert": "^2.0.1" } }, - "anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "append-transform": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", - "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", - "dev": true, - "requires": { - "default-require-extensions": "^3.0.0" - } - }, - "archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true - }, "are-docs-informative": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", "dev": true }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, "array-back": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", @@ -8116,12 +6859,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true - }, "blueimp-md5": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.19.0.tgz", @@ -8147,12 +6884,6 @@ "fill-range": "^7.0.1" } }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, "browserslist": { "version": "4.20.3", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.3.tgz", @@ -8183,21 +6914,9 @@ }, "cac": { "version": "6.7.14", - "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", - "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", - "dev": true - }, - "caching-transform": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", - "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", - "dev": true, - "requires": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" - } + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true }, "call-bind": { "version": "1.0.2", @@ -8209,12 +6928,6 @@ "get-intrinsic": "^1.0.2" } }, - "call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true - }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -8258,22 +6971,6 @@ "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", "dev": true }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - } - }, "ci-info": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", @@ -8297,23 +6994,6 @@ } } }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true - }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -8346,12 +7026,6 @@ "integrity": "sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA==", "dev": true }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -8493,12 +7167,6 @@ "ms": "2.1.2" } }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, "deep-eql": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", @@ -8514,15 +7182,6 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "default-require-extensions": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", - "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", - "dev": true, - "requires": { - "strip-bom": "^4.0.0" - } - }, "define-lazy-prop": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", @@ -8539,12 +7198,6 @@ "object-keys": "^1.1.1" } }, - "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true - }, "dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -8667,12 +7320,6 @@ "is-symbol": "^1.0.2" } }, - "es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true - }, "esbuild": { "version": "0.17.16", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.16.tgz", @@ -9073,12 +7720,6 @@ } } }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, "esquery": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", @@ -9189,65 +7830,6 @@ "to-regex-range": "^5.0.1" } }, - "find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - } - } - }, "find-replace": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", @@ -9266,12 +7848,6 @@ "path-exists": "^4.0.0" } }, - "flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true - }, "flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -9280,6 +7856,17 @@ "requires": { "flatted": "^3.1.0", "rimraf": "^3.0.2" + }, + "dependencies": { + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } } }, "flatted": { @@ -9297,22 +7884,6 @@ "is-callable": "^1.1.3" } }, - "foreground-child": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - } - }, - "fromentries": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", - "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", - "dev": true - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -9379,12 +7950,6 @@ "has-symbols": "^1.0.3" } }, - "get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true - }, "get-symbol-description": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", @@ -9547,30 +8112,6 @@ "has-symbols": "^1.0.2" } }, - "hasha": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", - "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", - "dev": true, - "requires": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "dependencies": { - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true - } - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, "hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", @@ -9638,12 +8179,6 @@ "side-channel": "^1.0.4" } }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true - }, "is-array-buffer": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", @@ -9670,15 +8205,6 @@ "has-bigints": "^1.0.1" } }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, "is-boolean-object": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", @@ -9776,12 +8302,6 @@ "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true }, - "is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true - }, "is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -9807,12 +8327,6 @@ "call-bind": "^1.0.2" } }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true - }, "is-string": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", @@ -9844,18 +8358,6 @@ "has-tostringtag": "^1.0.0" } }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true - }, "is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", @@ -9865,12 +8367,6 @@ "call-bind": "^1.0.2" } }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, "is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", @@ -9892,50 +8388,6 @@ "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", "dev": true }, - "istanbul-lib-hook": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", - "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", - "dev": true, - "requires": { - "append-transform": "^2.0.0" - } - }, - "istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", - "dev": true, - "requires": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "istanbul-lib-processinfo": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", - "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", - "dev": true, - "requires": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.0", - "istanbul-lib-coverage": "^3.0.0-alpha.1", - "make-dir": "^3.0.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^3.3.3" - } - }, "istanbul-lib-report": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", @@ -9959,9 +8411,9 @@ } }, "istanbul-reports": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz", - "integrity": "sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", "dev": true, "requires": { "html-escaper": "^2.0.0", @@ -9986,16 +8438,6 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, "jsdoc-type-pratt-parser": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz", @@ -10080,28 +8522,12 @@ "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" }, - "lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true - }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - } - }, "loupe": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", @@ -10111,6 +8537,12 @@ "get-func-name": "^2.0.0" } }, + "lru-cache": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.0.2.tgz", + "integrity": "sha512-7zYMKApzQ9qQE13xQUzbXVY3p2C5lh+9V+bs8M9fRf1TF59id+8jkljRWtIPfBfNP4yQAol5cqh/e8clxatdXw==", + "dev": true + }, "magic-string": { "version": "0.30.0", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.0.tgz", @@ -10163,142 +8595,36 @@ } }, "min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", - "dev": true - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - }, - "mlly": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.2.0.tgz", - "integrity": "sha512-+c7A3CV0KGdKcylsI6khWyts/CYrGTrRVo4R/I7u/cUsy0Conxa6LUhiEzVKIw14lc2L5aiO4+SeVe4TeGRKww==", - "dev": true, - "requires": { - "acorn": "^8.8.2", - "pathe": "^1.1.0", - "pkg-types": "^1.0.2", - "ufo": "^1.1.1" - } - }, - "mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", - "dev": true, - "requires": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "dependencies": { - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } - } - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - } - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "dev": true + }, + "mlly": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.2.0.tgz", + "integrity": "sha512-+c7A3CV0KGdKcylsI6khWyts/CYrGTrRVo4R/I7u/cUsy0Conxa6LUhiEzVKIw14lc2L5aiO4+SeVe4TeGRKww==", + "dev": true, + "requires": { + "acorn": "^8.8.2", + "pathe": "^1.1.0", + "pkg-types": "^1.0.2", + "ufo": "^1.1.1" } }, "ms": { @@ -10307,12 +8633,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true - }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -10325,15 +8645,6 @@ "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", "dev": true }, - "node-preload": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", - "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", - "dev": true, - "requires": { - "process-on-spawn": "^1.0.0" - } - }, "node-releases": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.4.tgz", @@ -10360,155 +8671,6 @@ } } }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "nyc": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", - "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", - "dev": true, - "requires": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dev": true, - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - } - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, "object-inspect": { "version": "1.12.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", @@ -10596,33 +8758,12 @@ "p-limit": "^3.0.2" } }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - }, "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, - "package-hash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", - "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - } - }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -10668,6 +8809,16 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "path-scurry": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.6.4.tgz", + "integrity": "sha512-Qp/9IHkdNiXJ3/Kon++At2nVpnhRiPq/aSvQN+H3U1WZbvNRK0RIQK/o4HMqPoXjpuGJUEWpHSs6Mnjxqh3TQg==", + "dev": true, + "requires": { + "lru-cache": "^9.0.0", + "minipass": "^5.0.0" + } + }, "path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -10765,15 +8916,6 @@ } } }, - "process-on-spawn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", - "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", - "dev": true, - "requires": { - "fromentries": "^1.2.0" - } - }, "punycode": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", @@ -10796,15 +8938,6 @@ "resolve": "^1.22.1" } }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, "react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -10887,24 +9020,6 @@ } } }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, "regexp-tree": { "version": "0.1.24", "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.24.tgz", @@ -10945,27 +9060,12 @@ } } }, - "release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", - "dev": true, - "requires": { - "es6-error": "^4.0.1" - } - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, "resolve": { "version": "1.22.3", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.3.tgz", @@ -10990,12 +9090,44 @@ "dev": true }, "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.0.tgz", + "integrity": "sha512-Jf9llaP+RvaEVS5nPShYFhtXIrb3LRKP281ib3So0KkeZKo2wIKyq0Re7TOSwanasA423PSr6CCIL4bP6T040g==", "dev": true, "requires": { - "glob": "^7.1.3" + "glob": "^10.0.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "glob": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.0.0.tgz", + "integrity": "sha512-zmp9ZDC6NpDNLujV2W2n+3lH+BafIVZ4/ct+Yj3BMZTH/+bgm/eVjHzeFLwxJrrIGgjjS2eiQLlpurHsNlEAtQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "minimatch": "^9.0.0", + "minipass": "^5.0.0", + "path-scurry": "^1.6.4" + } + }, + "minimatch": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.0.tgz", + "integrity": "sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } } }, "rollup": { @@ -11065,21 +9197,6 @@ } } }, - "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -11101,27 +9218,6 @@ "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", "dev": true }, - "shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, - "shx": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz", - "integrity": "sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==", - "dev": true, - "requires": { - "minimist": "^1.2.3", - "shelljs": "^0.8.5" - } - }, "side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -11139,12 +9235,6 @@ "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", "dev": true }, - "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, "slash": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", @@ -11169,20 +9259,6 @@ "integrity": "sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==", "dev": true }, - "spawn-wrap": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", - "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", - "dev": true, - "requires": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - } - }, "spdx-correct": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", @@ -11215,12 +9291,6 @@ "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", "dev": true }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, "stackback": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", @@ -11233,12 +9303,6 @@ "integrity": "sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA==", "dev": true }, - "string-argv": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", - "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", - "dev": true - }, "string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -11310,12 +9374,6 @@ "ansi-regex": "^5.0.1" } }, - "strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true - }, "strip-indent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", @@ -11531,15 +9589,6 @@ "is-typed-array": "^1.1.9" } }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "requires": { - "is-typedarray": "^1.0.0" - } - }, "typescript": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", @@ -11578,12 +9627,6 @@ "punycode": "^2.1.0" } }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true - }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -11683,12 +9726,6 @@ "is-symbol": "^1.0.3" } }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, "which-typed-array": { "version": "1.1.9", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", @@ -11719,12 +9756,6 @@ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, - "workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true - }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -11742,71 +9773,12 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, - "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - }, - "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true - }, - "yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "requires": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "dependencies": { - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true - }, - "decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true - } - } - }, "yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 5bde3a3..5762963 100644 --- a/package.json +++ b/package.json @@ -27,18 +27,19 @@ "files": [ "bin", "lib", - "src" + "src", + "!__tests__" ], "scripts": { "all": "npm run clean && npm run lint && npm run build && npm run coverage", - "clean": "shx rm -rf .nyc_output coverage lib dist e2e/fixture", + "clean": "rimraf coverage lib dist e2e/fixture *.tgz", "lint": "npm run _eslint && npm run _prettier -- --check", "format": "npm run _eslint -- --fix && npm run _prettier -- --write", "build": "concurrently -g npm:build:*", "build:dist": "esbuild src/action/index.ts --bundle --sourcemap --outdir=dist --platform=node --target=node16", "build:lib": "tsc", - "test": "mocha", - "coverage": "nyc npm run test", + "test": "vitest src", + "coverage": "vitest run --coverage src", "_eslint": "eslint --quiet \"**/*.@(js|ts)\"", "_prettier": "prettier \"**/*.@(js|ts|json|md|yml)\"" }, @@ -47,14 +48,11 @@ }, "devDependencies": { "@actions/core": "^1.10.0", - "@jsdevtools/chai-exec": "^2.1.1", - "@types/chai": "^4.3.4", "@types/command-line-args": "^5.0.0", - "@types/mocha": "^10.0.1", "@types/node": "^18.15.11", "@typescript-eslint/eslint-plugin": "^5.58.0", "@typescript-eslint/parser": "^5.58.0", - "chai": "^4.3.7", + "@vitest/coverage-istanbul": "^0.30.1", "concurrently": "^8.0.1", "esbuild": "0.17.16", "eslint": "^8.38.0", @@ -66,10 +64,8 @@ "eslint-plugin-promise": "^6.1.1", "eslint-plugin-sonarjs": "^0.19.0", "eslint-plugin-unicorn": "^46.0.0", - "mocha": "^10.2.0", - "nyc": "^15.1.0", "prettier": "^2.8.7", - "shx": "^0.3.3", + "rimraf": "^5.0.0", "testdouble": "^3.17.2", "testdouble-vitest": "^0.1.2", "typescript": "^5.0.4", diff --git a/src/__tests__/npm-publish.test.ts b/src/__tests__/npm-publish.test.ts index 2fe0921..de3e07c 100644 --- a/src/__tests__/npm-publish.test.ts +++ b/src/__tests__/npm-publish.test.ts @@ -29,7 +29,7 @@ describe("npmPublish", () => { }); it("should read the manifest, get publish config, compare, and publish", async () => { - const options: Options = { token: "abc123" }; + const options: Options = { package: "./cool-package", token: "abc123" }; const manifest: Manifest = { name: "cool-package", version: "1.2.3" }; const authConfig = { registryUrl: { value: new URL("http://example.com") }, @@ -46,7 +46,7 @@ describe("npmPublish", () => { }; const publishResult: PublishResult = { id: "cool-package@1.2.3" }; - td.when(readManifest("./package.json")).thenResolve(manifest); + td.when(readManifest("./cool-package")).thenResolve(manifest); td.when(normalizeOptions(options, manifest)).thenReturn({ authConfig, publishConfig, @@ -71,7 +71,7 @@ describe("npmPublish", () => { }); it("should skip publish if not needed", async () => { - const options: Options = { token: "abc123" }; + const options: Options = { package: "./cool-package", token: "abc123" }; const manifest: Manifest = { name: "cool-package", version: "1.2.3" }; const authConfig = { registryUrl: { value: new URL("http://example.com") }, @@ -87,7 +87,7 @@ describe("npmPublish", () => { previousVersion: "0.1.2", }; - td.when(readManifest("./package.json")).thenResolve(manifest); + td.when(readManifest("./cool-package")).thenResolve(manifest); td.when(normalizeOptions(options, manifest)).thenReturn({ authConfig, publishConfig, diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 0000000..e381fb2 --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + coverage: { + provider: "istanbul", + all: true, + include: ["src"], + reporter: ["text", "lcov"], + }, + }, +}); From 54cc7a311a5e198ceae93d7f0155d07349ea9ea9 Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Mon, 17 Apr 2023 08:57:25 -0400 Subject: [PATCH 07/36] wip: almost through the rewrite, CLI left --- .eslintrc.yml | 66 +- README.md | 148 +- action.yml | 53 +- dist/index.js | 3239 ++++++++++++++--- dist/index.js.map | 8 +- package.json | 2 +- src/__tests__/compare-versions.test.ts | 93 + src/__tests__/normalize-options.test.ts | 132 +- src/__tests__/npm-publish.test.ts | 69 +- src/__tests__/read-manifest.test.ts | 147 +- src/action/__tests__/run.test.ts | 62 + src/action/core.ts | 71 + src/action/index.ts | 110 +- src/action/run.ts | 35 + src/cli/index.ts | 13 +- src/cli/parse-args.ts | 6 +- src/compare-versions.ts | 49 +- src/errors.ts | 89 +- src/index.ts | 8 +- src/normalize-options.ts | 154 +- src/npm-publish.ts | 31 +- src/npm/__tests__/call-npm-cli.test.ts | 4 +- src/npm/__tests__/get-publish-args.test.ts | 25 - .../__tests__/get-publish-arguments.test.ts | 52 + src/npm/__tests__/npm.test.ts | 39 +- src/npm/call-npm-cli.ts | 56 +- src/npm/get-publish-args.ts | 21 - src/npm/get-publish-arguments.ts | 34 + src/npm/index.ts | 31 +- src/npm/use-npm-env.ts | 57 - src/npm/use-npm-environment.ts | 49 + src/options.ts | 29 +- src/read-manifest.ts | 108 +- src/results.ts | 25 +- tsconfig.json | 15 +- 35 files changed, 3993 insertions(+), 1137 deletions(-) create mode 100644 src/__tests__/compare-versions.test.ts create mode 100644 src/action/__tests__/run.test.ts create mode 100644 src/action/core.ts create mode 100644 src/action/run.ts delete mode 100644 src/npm/__tests__/get-publish-args.test.ts create mode 100644 src/npm/__tests__/get-publish-arguments.test.ts delete mode 100644 src/npm/get-publish-args.ts create mode 100644 src/npm/get-publish-arguments.ts delete mode 100644 src/npm/use-npm-env.ts create mode 100644 src/npm/use-npm-environment.ts diff --git a/.eslintrc.yml b/.eslintrc.yml index ff0ddce..d5258cb 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -7,7 +7,7 @@ extends: - "plugin:@typescript-eslint/strict" - "plugin:import/recommended" - "plugin:import/typescript" - - "plugin:jsdoc/recommended-typescript" + - "plugin:jsdoc/recommended-typescript-error" - "plugin:n/recommended" - "plugin:promise/recommended" - "plugin:sonarjs/recommended" @@ -27,49 +27,39 @@ env: es2021: true node: true +rules: + unicorn/prefer-top-level-await: "off" + overrides: - files: ["**/*.js"] rules: "@typescript-eslint/no-var-requires": "off" - "unicorn/prefer-module": "off" + unicorn/prefer-module: "off" - - files: ["test/**/*", "**/__tests__/**/*"] - env: - mocha: true + - files: ["**/__tests__/**/*"] rules: + "@typescript-eslint/no-unsafe-argument": "off" sonarjs/no-duplicate-string: "off" + unicorn/no-useless-undefined: "off" -rules: - n/no-unpublished-import: "off" + - files: ["src/action/**/*"] + rules: + n/no-unpublished-import: "off" - # temporary rule overrides - # TODO(mc, 2023-04-12): fix problems, remove overrides, and remove --quiet - prefer-const: "warn" - no-regex-spaces: "warn" - "@typescript-eslint/no-floating-promises": "warn" - "@typescript-eslint/no-unsafe-argument": "warn" - "@typescript-eslint/no-unsafe-assignment": "warn" - "@typescript-eslint/no-unsafe-call": "warn" - "@typescript-eslint/no-unsafe-member-access": "warn" - "@typescript-eslint/no-unsafe-return": "warn" - "@typescript-eslint/require-await": "warn" - "@typescript-eslint/restrict-plus-operands": "warn" - "@typescript-eslint/restrict-template-expressions": "warn" - "@typescript-eslint/unbound-method": "warn" - n/no-missing-import: "warn" - n/no-missing-require: "warn" - n/no-process-exit: "warn" - unicorn/better-regex: "warn" - unicorn/catch-error-name: "warn" - unicorn/import-style: "warn" - unicorn/no-array-push-push: "warn" - unicorn/no-process-exit: "warn" - unicorn/no-useless-undefined: "warn" - unicorn/prefer-export-from: "warn" - unicorn/prefer-module: "warn" - unicorn/prefer-node-protocol: "warn" - unicorn/prefer-optional-catch-binding: "warn" - unicorn/prefer-spread: "warn" - unicorn/prefer-top-level-await: "warn" - unicorn/prevent-abbreviations: "warn" - unicorn/text-encoding-identifier-case: "warn" + # temporary rule overrides + # TODO(mc, 2023-04-12): fix problems, remove overrides, and remove --quiet + - files: ["bin/**/*", "src/cli/**/*"] + rules: + n/no-process-exit: "warn" + unicorn/no-process-exit: "warn" + prefer-const: "warn" + unicorn/prevent-abbreviations: "warn" + unicorn/prefer-module: "warn" + unicorn/prefer-top-level-await: "warn" + "@typescript-eslint/no-floating-promises": "warn" + "@typescript-eslint/no-unsafe-call": "warn" + "@typescript-eslint/no-unsafe-member-access": "warn" + "@typescript-eslint/restrict-template-expressions": "warn" + jsdoc/require-jsdoc: "warn" + jsdoc/require-param: "warn" + jsdoc/require-returns: "warn" diff --git a/README.md b/README.md index 3f23b70..0dc4581 100644 --- a/README.md +++ b/README.md @@ -12,16 +12,16 @@ ## Features - 🧠 **Smart**
- Only publishes if the version number in `package.json` differs from the latest on NPM + Only publishes if the version number in `package.json` differs from the latest on NPM. - 🛠 **Configurable**
- Customize the version-checking behavior, the registry URL, and path of your package + Customize the version-checking behavior, the registry URL, and path of your package. - 🔐 **Secure**
- Keeps your NPM access token secret. Doesn't write it to `~/.npmrc` + Keeps your NPM access token secret. Doesn't write it to `~/.npmrc`. - ⚡ **Fast**
- 100% JavaScript (which is faster than Docker) and bundled to optimize loading time + 100% JavaScript (which is faster than Docker) and bundled to optimize loading time. - 📤 **Outputs**
Exposes the old and new version numbers, and the type of change (major, minor, patch, etc.) as variables that you can use in your workflow. @@ -58,22 +58,26 @@ jobs: token: ${{ secrets.NPM_TOKEN }} ``` -## Input Parameters +For security and safety, the `JS-DevTools/npm-publish` action uses a different, isolated configuration than calling `npm` directly. Auth settings for `npm` will not affect `npm-publish`, nor vice-versa. -You can set any or all of the following input parameters: +### Usage -| Name | Type | Default | Description | -| ---------------------- | ------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `token` | string | **required** | The NPM auth token to use for publishing | -| `registry` | string | https://registry.npmjs.org/ | The NPM registry URL to use | -| `package` | string | ./package.json | The path of your package.json file | -| `tag` | string | "latest" | The tag to publish to. This allows people to install the package using `npm install @`. | -| `access` | string | "public" for non-scoped packages. "restricted" for scoped packages. | Determines whether the published package should be publicly visible, or restricted to members of your NPM organization. | -| `dry-run` | boolean | false | Run NPM publish with the `--dry-run` flag to prevent publication | -| `check-version` | boolean | true | Only publish to NPM if the version number in `package.json` differs from the latest on NPM | -| `greater-version-only` | boolean | false | Only publish to NPM if the version number in `package.json` is greater than the latest on NPM | +You can set any or all of the following input parameters using `with`: -## Output Variables +| Name | Type | Default | Description | +| ---------- | ---------------------- | ------------------------------ | ----------------------------------------------------------------------------- | +| `token` | string | **required** | The authentication token to use with npm. | +| `registry` | string | `https://registry.npmjs.org/` | The registry URL to read and write to. | +| `package` | string | Current working directory | The path to the package or its package.json file. | +| `tag` | string | `latest` | The [distribution tag][npm-tag] to publish to. | +| `access` | `public`, `restricted` | [Use npm defaults][npm-access] | Whether the package should be publicly visible or restricted. | +| `strategy` | `all`, `upgrade` | `all` | Use `all` to publish all unique versions, `upgrade` for only semver upgrades. | +| `dry-run` | boolean | `false` | Run `npm publish` with the `--dry-run` flag to prevent publication. | + +[npm-tag]: https://docs.npmjs.com/cli/v9/commands/npm-publish#tag +[npm-access]: https://docs.npmjs.com/cli/v9/commands/npm-publish#access + +### Output npm-publish exposes some output variables, which you can use in later steps of your workflow. To access the output variables, you'll need to set an `id` for the npm-publish step. @@ -84,94 +88,100 @@ steps: with: token: ${{ secrets.NPM_TOKEN }} - - if: steps.publish.outputs.type != 'none' + - if: ${{ steps.publish.outputs.type }} run: | echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}" ``` -| Variable | Type | Description | -| ------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | string | The type of version change that occurred ("major", "minor", "patch", etc.). If there was no version change, then type will be "none". If `greater-version-only` is set and the version is lower, then type will be "lower". | -| `version` | string | The version that was published | -| `old-version` | string | The version number that was previously published to NPM | -| `tag` | string | The tag that the package was published to. | -| `access` | string | Indicates whether the published package is publicly visible or restricted to members of your NPM organization. | -| `dry-run` | boolean | Indicates whether NPM was run in "dry run" mode | +| Name | Type | Description | +| ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------ | +| `id` | string | Package identifier of the release: `${name}@${version}` or empty if no release. | +| `type` | string | Semver upgrade (`major`, `minor`, ...), `initial` if first release, `different` if other change, or empty if no release. | +| `name` | string | The name of the package. | +| `version` | string | The version of the package. | +| `old-version` | string | The previously published version on `tag` or empty if no previous version on tag. | +| `tag` | string | The [distribution tag][npm-tag] that the package was published to. | +| `access` | string | The [access level][npm-access] the package was published with, or `default` if scoped-package defaults were used. | +| `dry-run` | boolean | Indicates whether `npm publish` was run in "dry run" mode. | ## JavaScript Function -To use npm-package in your JavaScript code, you'll need to install it using [NPM](https://docs.npmjs.com/about-npm/): +To use npm-package in your JavaScript code, you'll need to install it using [npm](https://docs.npmjs.com/about-npm/) or other package manager of choice: ```bash -npm install @jsdevtools/npm-publish +npm install --save-dev @jsdevtools/npm-publish ``` You can then import it and use it in your code like this: ```javascript -const npmPublish = require("@jsdevtools/npm-publish"); +import { npmPublish } from "@jsdevtools/npm-publish"; // Run npm-publish with all defaults -await npmPublish(); +await npmPublish({ token: "YOUR_NPM_AUTH_TOKEN_HERE" }); +``` + +For security and safety, the `npmPublish` function uses a different, isolated configuration than calling `npm` directly. Auth settings for `npm` will not affect `npmPublish`, nor vice-versa. + +### Usage + +As shown in the example above, you should pass an options object to the `npmPublish` function. In TypeScript, the `Options` interface is available as an import. -// Run npm-publish with options -await npmPublish({ - package: "./path/to/package.json", - token: "YOUR_NPM_AUTH_TOKEN_HERE", -}); +```ts +import type { Options } from "@jsdevtools/npm-publish"; ``` -### Options +| Name | Type | Default | Description | +| ---------- | ---------------------- | ------------------------------ | ----------------------------------------------------------------------------- | +| `token` | string | **required** | The authentication token to use with npm. | +| `registry` | string, `URL` | `https://registry.npmjs.org/` | The registry URL to read and write to. | +| `package` | string | Current working directory | The path to the package or its package.json file. | +| `tag` | string | `latest` | The [distribution tag][npm-tag] to publish to. | +| `access` | `public`, `restricted` | [Use npm defaults][npm-access] | Whether the package should be publicly visible or restricted. | +| `strategy` | `all`, `upgrade` | `all` | Use `all` to publish all unique versions, `upgrade` for only semver upgrades. | +| `dryRun` | boolean | `false` | Run `npm publish` with the `--dry-run` flag to prevent publication. | + +### Output + +The `npmPublish()` function returns a promise of a `Results` object. In TypeScript, the `Results` interface is available as an import. -As shown in the example above, you can pass options to the `npmPublish()` function. Here are the available options: - -| Name | Type | Default | Description | -| -------------------- | -------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `token` | string | NPM's default credentials | The NPM auth token to use for publishing. If not set, then NPM will | -| `registry` | string | https://registry.npmjs.org/ | The NPM registry URL to use | -| `package` | string | ./package.json | The path of your package.json file | -| `tag` | string | "latest" | The tag to publish to. This allows people to install the package using `npm install @`. | -| `access` | string | "public" for non-scoped packages. "restricted" for scoped packages. | Determines whether the published package should be publicly visible, or restricted to members of your NPM organization. | -| `dryRun` | boolean | false | Run NPM publish with the `--dry-run` flag to prevent publication | -| `checkVersion` | boolean | true | Only publish to NPM if the version number in `package.json` differs from the latest on NPM | -| `greaterVersionOnly` | boolean | false | Only publish to NPM if the version number in `package.json` is greater then the latest on NPM | -| `quiet` | boolean | false | Suppress console output from NPM and npm-publish | -| `debug` | function | no-op | A function to log debug messages. You can set this to a custom function to receive debug messages, or just set it to `console.debug` to print debug messages to the console. | - -### Return Value - -The `npmPublish()` function asynchronously returns an object with the following properties: - -| Name | Type | Description | -| ------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | string | The type of version change that occurred ("major", "minor", "patch", etc.) If there was no version change, then the the type is "none". If `greater-version-only` is set and the version is lower, then type will be "lower". | -| `package` | string | The name of the NPM package that was published | -| `version` | string | The version number that was published | -| `oldVersion` | string | The version number that was previously published to NPM | -| `tag` | string | The tag that the package was published to. | -| `access` | string | Indicates whether the published package is publicly visible or restricted to members of your NPM organization. | -| `dryRun` | boolean | Indicates whether NPM was run in "dry run" mode | +```ts +import type { Results } from "@jsdevtools/npm-publish"; +``` + +| Name | Type | Description | +| ------------ | --------------- | ------------------------------------------------------------------------------------------------------------------------------ | +| `id` | Optional string | Package identifier of the release: `${name}@${version}` or `undefined` if no release. | +| `type` | Optional string | Semver upgrade (`major`, `minor`, ...), `initial` if first release, `different` if other change, or `undefined` if no release. | +| `name` | string | The name of the package. | +| `version` | string | The version of the package. | +| `oldVersion` | Optional string | The previously published version on `tag` or `undefined` if no previous version. | +| `tag` | string | The [distribution tag][npm-tag] that the package was published to. | +| `access` | Optional string | The [access level][npm-access] the package was published with, or `undefined` if scoped-package defaults were used. | +| `dryRun` | boolean | Indicates whether `npm publish` was run in "dry run" mode. | ## Command Line Interface -To use npm-package from as a command-line tool in your terminal, you'll need to install it globally using [NPM](https://docs.npmjs.com/about-npm/): +You can also use `npm-publish` as a command-line tool in your terminal. ```bash -npm install -g @jsdevtools/npm-publish +npm install --save-dev @jsdevtools/npm-publish ``` -You can then use it in your terminal or in Bash scripts. You can call it without any arguments, and it will publish the current directory using NPM's default credentials. +You can then use it in your terminal or in `npm run` scripts. ```bash -npm-publish +npx npm-publish --token YOUR_NPM_AUTH_TOKEN_HERE ``` Or you can call it with arguments to explicitly set the NPM auth token, registry, package path, etc. ```bash -npm-publish --token=YOUR_NPM_AUTH_TOKEN_HERE ./path/to/package.json +npm-publish --token YOUR_NPM_AUTH_TOKEN_HERE --package ./path/to/package ``` +For security and safety, the `npm-publish` CLI uses a different, isolated configuration than calling `npm` directly. Auth settings for `npm` will not affect `npm-publish`, nor vice-versa. + ### Options Run `npm-publish --help` to see the full list of options available. diff --git a/action.yml b/action.yml index 40a058e..72d3e72 100644 --- a/action.yml +++ b/action.yml @@ -1,6 +1,3 @@ -# GitHub Action -# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions - name: NPM Publish description: Fast, easy publishing to NPM @@ -19,11 +16,11 @@ inputs: required: false package: - description: The path of your package.json file + description: The path to your package or its package.json file required: false tag: - description: The tag to publish to. This allows people to install the package using "npm install @". + description: The distribution tag to publish required: false access: @@ -32,26 +29,52 @@ inputs: applies to scoped packages. required: false - dry-run: - description: If true, run with the --dry-run flag + strategy: + description: Version check and release strategy. + If "all" (default), package will be published if its version is simply not yet published. + If "upgrade", package will be published if its version is higher than the existing tag, + according to semantic versioning. + required: false - strategy: - description: Version check strategy. If "upgrade" (default), the package - will only be published if its version is higher than the existing version - on the configured tag. If "always", the package will be published if its - version is simply not yet published. + dry-run: + description: Run npm with the --dry-run flag to avoid actually publishing anything. required: false outputs: + id: + description: The identifier of the published package. + If a release was published, format is `${name}@${version}. + If no release occurred, will be an empty string. + type: - description: The type of version change that occurred ("none", "major", "minor", "patch", etc.) + description: The type of version change that occurred on the published tag. + If release was an upgrade, will be a semver release type ("major", "minor", ...). + If the published tag had no previous version, will be "initial". + If version was change was not an upgrade, will be "different". + If no release occurred, will be an empty string. + + name: + description: Name of the package. version: - description: The version that was published + description: Version of the package. old-version: - description: The version number that was previously published to NPM + description: The previous version on the distribution tag. + If there was no previous version on the tag, will be an empty string. + + registry: + description: The registry used for version checking and publishing. + + tag: + description: The distribution tag used for version checking and publishing. + + access: + description: The package access setting used. + If configured by the action or package.json, will be "public" or "protected". + If not configured for a non-scoped package, will be "public". + If not configured for a scoped package, will be "default". runs: using: node16 diff --git a/dist/index.js b/dist/index.js index b97cb09..b5a6f34 100644 --- a/dist/index.js +++ b/dist/index.js @@ -99,11 +99,11 @@ var require_command = __commonJS({ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.issue = exports.issueCommand = void 0; - var os2 = __importStar(require("os")); + var os3 = __importStar(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os2.EOL); + process.stdout.write(cmd.toString() + os3.EOL); } exports.issueCommand = issueCommand; function issue(name, message = "") { @@ -520,7 +520,7 @@ var require_file_command = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; var fs3 = __importStar(require("fs")); - var os2 = __importStar(require("os")); + var os3 = __importStar(require("os")); var uuid_1 = (init_esm_node(), __toCommonJS(esm_node_exports)); var utils_1 = require_utils(); function issueFileCommand(command, message) { @@ -531,7 +531,7 @@ var require_file_command = __commonJS({ if (!fs3.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs3.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os2.EOL}`, { + fs3.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os3.EOL}`, { encoding: "utf8" }); } @@ -545,7 +545,7 @@ var require_file_command = __commonJS({ if (convertedValue.includes(delimiter)) { throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; + return `${key}<<${delimiter}${os3.EOL}${convertedValue}${os3.EOL}${delimiter}`; } exports.prepareKeyValueMessage = prepareKeyValueMessage; } @@ -2034,7 +2034,7 @@ var require_core = __commonJS({ var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os2 = __importStar(require("os")); + var os3 = __importStar(require("os")); var path3 = __importStar(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; @@ -2066,7 +2066,7 @@ var require_core = __commonJS({ process.env["PATH"] = `${inputPath}${path3.delimiter}${process.env["PATH"]}`; } exports.addPath = addPath; - function getInput3(name, options) { + function getInput2(name, options) { const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); @@ -2076,19 +2076,19 @@ var require_core = __commonJS({ } return val.trim(); } - exports.getInput = getInput3; + exports.getInput = getInput2; function getMultilineInput(name, options) { - const inputs = getInput3(name, options).split("\n").filter((x) => x !== ""); + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); if (options && options.trimWhitespace === false) { return inputs; } return inputs.map((input) => input.trim()); } exports.getMultilineInput = getMultilineInput; - function getBooleanInput(name, options) { + function getBooleanInput2(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; - const val = getInput3(name, options); + const val = getInput2(name, options); if (trueValue.includes(val)) return true; if (falseValue.includes(val)) @@ -2096,16 +2096,16 @@ var require_core = __commonJS({ throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } - exports.getBooleanInput = getBooleanInput; - function setOutput3(name, value) { + exports.getBooleanInput = getBooleanInput2; + function setOutput2(name, value) { const filePath = process.env["GITHUB_OUTPUT"] || ""; if (filePath) { return file_command_1.issueFileCommand("OUTPUT", file_command_1.prepareKeyValueMessage(name, value)); } - process.stdout.write(os2.EOL); + process.stdout.write(os3.EOL); command_1.issueCommand("set-output", { name }, utils_1.toCommandValue(value)); } - exports.setOutput = setOutput3; + exports.setOutput = setOutput2; function setCommandEcho(enabled) { command_1.issue("echo", enabled ? "on" : "off"); } @@ -2136,7 +2136,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports.notice = notice; function info(message) { - process.stdout.write(message + os2.EOL); + process.stdout.write(message + os3.EOL); } exports.info = info; function startGroup(name) { @@ -2199,492 +2199,2685 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } }); -// node_modules/@jsdevtools/ono/cjs/to-json.js -var require_to_json = __commonJS({ - "node_modules/@jsdevtools/ono/cjs/to-json.js"(exports) { +// node_modules/semver/internal/constants.js +var require_constants = __commonJS({ + "node_modules/semver/internal/constants.js"(exports, module2) { + var SEMVER_SPEC_VERSION = "2.0.0"; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ + 9007199254740991; + var MAX_SAFE_COMPONENT_LENGTH = 16; + var RELEASE_TYPES = [ + "major", + "premajor", + "minor", + "preminor", + "patch", + "prepatch", + "prerelease" + ]; + module2.exports = { + MAX_LENGTH, + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_INTEGER, + RELEASE_TYPES, + SEMVER_SPEC_VERSION, + FLAG_INCLUDE_PRERELEASE: 1, + FLAG_LOOSE: 2 + }; + } +}); + +// node_modules/semver/internal/debug.js +var require_debug = __commonJS({ + "node_modules/semver/internal/debug.js"(exports, module2) { + var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { + }; + module2.exports = debug; + } +}); + +// node_modules/semver/internal/re.js +var require_re = __commonJS({ + "node_modules/semver/internal/re.js"(exports, module2) { + var { MAX_SAFE_COMPONENT_LENGTH } = require_constants(); + var debug = require_debug(); + exports = module2.exports = {}; + var re = exports.re = []; + var src = exports.src = []; + var t = exports.t = {}; + var R = 0; + var createToken = (name, value, isGlobal) => { + const index = R++; + debug(name, index, value); + t[name] = index; + src[index] = value; + re[index] = new RegExp(value, isGlobal ? "g" : void 0); + }; + createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); + createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+"); + createToken("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*"); + createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); + createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`); + createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`); + createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); + createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); + createToken("BUILDIDENTIFIER", "[0-9A-Za-z-]+"); + createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); + createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); + createToken("FULL", `^${src[t.FULLPLAIN]}$`); + createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); + createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); + createToken("GTLT", "((?:<|>)?=?)"); + createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); + createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); + createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); + createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`); + createToken("COERCERTL", src[t.COERCE], true); + createToken("LONETILDE", "(?:~>?)"); + createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); + exports.tildeTrimReplace = "$1~"; + createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); + createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("LONECARET", "(?:\\^)"); + createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); + exports.caretTrimReplace = "$1^"; + createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); + createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); + createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); + createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); + exports.comparatorTrimReplace = "$1$2$3"; + createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); + createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); + createToken("STAR", "(<|>)?=?\\s*\\*"); + createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); + createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); + } +}); + +// node_modules/semver/internal/parse-options.js +var require_parse_options = __commonJS({ + "node_modules/semver/internal/parse-options.js"(exports, module2) { + var looseOption = Object.freeze({ loose: true }); + var emptyOpts = Object.freeze({}); + var parseOptions = (options) => { + if (!options) { + return emptyOpts; + } + if (typeof options !== "object") { + return looseOption; + } + return options; + }; + module2.exports = parseOptions; + } +}); + +// node_modules/semver/internal/identifiers.js +var require_identifiers = __commonJS({ + "node_modules/semver/internal/identifiers.js"(exports, module2) { + var numeric = /^[0-9]+$/; + var compareIdentifiers = (a, b) => { + const anum = numeric.test(a); + const bnum = numeric.test(b); + if (anum && bnum) { + a = +a; + b = +b; + } + return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; + }; + var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); + module2.exports = { + compareIdentifiers, + rcompareIdentifiers + }; + } +}); + +// node_modules/semver/classes/semver.js +var require_semver = __commonJS({ + "node_modules/semver/classes/semver.js"(exports, module2) { + var debug = require_debug(); + var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(); + var { re, t } = require_re(); + var parseOptions = require_parse_options(); + var { compareIdentifiers } = require_identifiers(); + var SemVer = class { + constructor(version2, options) { + options = parseOptions(options); + if (version2 instanceof SemVer) { + if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) { + return version2; + } else { + version2 = version2.version; + } + } else if (typeof version2 !== "string") { + throw new TypeError(`Invalid Version: ${version2}`); + } + if (version2.length > MAX_LENGTH) { + throw new TypeError( + `version is longer than ${MAX_LENGTH} characters` + ); + } + debug("SemVer", version2, options); + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + const m = version2.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); + if (!m) { + throw new TypeError(`Invalid Version: ${version2}`); + } + this.raw = version2; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError("Invalid major version"); + } + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError("Invalid minor version"); + } + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError("Invalid patch version"); + } + if (!m[4]) { + this.prerelease = []; + } else { + this.prerelease = m[4].split(".").map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num; + } + } + return id; + }); + } + this.build = m[5] ? m[5].split(".") : []; + this.format(); + } + format() { + this.version = `${this.major}.${this.minor}.${this.patch}`; + if (this.prerelease.length) { + this.version += `-${this.prerelease.join(".")}`; + } + return this.version; + } + toString() { + return this.version; + } + compare(other) { + debug("SemVer.compare", this.version, this.options, other); + if (!(other instanceof SemVer)) { + if (typeof other === "string" && other === this.version) { + return 0; + } + other = new SemVer(other, this.options); + } + if (other.version === this.version) { + return 0; + } + return this.compareMain(other) || this.comparePre(other); + } + 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); + } + comparePre(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + if (this.prerelease.length && !other.prerelease.length) { + return -1; + } else if (!this.prerelease.length && other.prerelease.length) { + return 1; + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0; + } + let i = 0; + do { + const a = this.prerelease[i]; + const b = other.prerelease[i]; + debug("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); + } + compareBuild(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + let i = 0; + do { + const a = this.build[i]; + const b = other.build[i]; + debug("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); + } + // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + inc(release, identifier, identifierBase) { + switch (release) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", identifier, identifierBase); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", identifier, identifierBase); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", identifier, identifierBase); + this.inc("pre", identifier, identifierBase); + break; + case "prerelease": + if (this.prerelease.length === 0) { + this.inc("patch", identifier, identifierBase); + } + this.inc("pre", identifier, identifierBase); + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { + this.major++; + } + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++; + } + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) { + this.patch++; + } + this.prerelease = []; + break; + case "pre": + if (this.prerelease.length === 0) { + this.prerelease = [0]; + } else { + let i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === "number") { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) { + this.prerelease.push(0); + } + } + if (identifier) { + const base = Number(identifierBase) ? 1 : 0; + if (compareIdentifiers(this.prerelease[0], identifier) === 0) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, base]; + } + } else { + this.prerelease = [identifier, base]; + } + } + break; + default: + throw new Error(`invalid increment argument: ${release}`); + } + this.format(); + this.raw = this.version; + return this; + } + }; + module2.exports = SemVer; + } +}); + +// node_modules/semver/functions/parse.js +var require_parse = __commonJS({ + "node_modules/semver/functions/parse.js"(exports, module2) { + var { MAX_LENGTH } = require_constants(); + var SemVer = require_semver(); + var parse2 = (version2, options) => { + if (version2 instanceof SemVer) { + return version2; + } + if (typeof version2 !== "string") { + return null; + } + if (version2.length > MAX_LENGTH) { + return null; + } + try { + return new SemVer(version2, options); + } catch (er) { + return null; + } + }; + module2.exports = parse2; + } +}); + +// node_modules/semver/functions/valid.js +var require_valid = __commonJS({ + "node_modules/semver/functions/valid.js"(exports, module2) { + var parse2 = require_parse(); + var valid = (version2, options) => { + const v = parse2(version2, options); + return v ? v.version : null; + }; + module2.exports = valid; + } +}); + +// node_modules/semver/functions/clean.js +var require_clean = __commonJS({ + "node_modules/semver/functions/clean.js"(exports, module2) { + var parse2 = require_parse(); + var clean = (version2, options) => { + const s = parse2(version2.trim().replace(/^[=v]+/, ""), options); + return s ? s.version : null; + }; + module2.exports = clean; + } +}); + +// node_modules/semver/functions/inc.js +var require_inc = __commonJS({ + "node_modules/semver/functions/inc.js"(exports, module2) { + var SemVer = require_semver(); + var inc = (version2, release, options, identifier, identifierBase) => { + if (typeof options === "string") { + identifierBase = identifier; + identifier = options; + options = void 0; + } + try { + return new SemVer( + version2 instanceof SemVer ? version2.version : version2, + options + ).inc(release, identifier, identifierBase).version; + } catch (er) { + return null; + } + }; + module2.exports = inc; + } +}); + +// node_modules/semver/functions/compare.js +var require_compare = __commonJS({ + "node_modules/semver/functions/compare.js"(exports, module2) { + var SemVer = require_semver(); + var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)); + module2.exports = compare; + } +}); + +// node_modules/semver/functions/eq.js +var require_eq = __commonJS({ + "node_modules/semver/functions/eq.js"(exports, module2) { + var compare = require_compare(); + var eq = (a, b, loose) => compare(a, b, loose) === 0; + module2.exports = eq; + } +}); + +// node_modules/semver/functions/diff.js +var require_diff = __commonJS({ + "node_modules/semver/functions/diff.js"(exports, module2) { + var parse2 = require_parse(); + var eq = require_eq(); + var diff = (version1, version2) => { + const v12 = parse2(version1); + const v2 = parse2(version2); + if (eq(v12, v2)) { + return null; + } else { + const hasPre = v12.prerelease.length || v2.prerelease.length; + const prefix = hasPre ? "pre" : ""; + const defaultResult = hasPre ? "prerelease" : ""; + if (v12.major !== v2.major) { + return prefix + "major"; + } + if (v12.minor !== v2.minor) { + return prefix + "minor"; + } + if (v12.patch !== v2.patch) { + return prefix + "patch"; + } + if (!v12.prerelease.length || !v2.prerelease.length) { + if (v12.patch) { + return "patch"; + } + if (v12.minor) { + return "minor"; + } + if (v12.major) { + return "major"; + } + } + return defaultResult; + } + }; + module2.exports = diff; + } +}); + +// node_modules/semver/functions/major.js +var require_major = __commonJS({ + "node_modules/semver/functions/major.js"(exports, module2) { + var SemVer = require_semver(); + var major = (a, loose) => new SemVer(a, loose).major; + module2.exports = major; + } +}); + +// node_modules/semver/functions/minor.js +var require_minor = __commonJS({ + "node_modules/semver/functions/minor.js"(exports, module2) { + var SemVer = require_semver(); + var minor = (a, loose) => new SemVer(a, loose).minor; + module2.exports = minor; + } +}); + +// node_modules/semver/functions/patch.js +var require_patch = __commonJS({ + "node_modules/semver/functions/patch.js"(exports, module2) { + var SemVer = require_semver(); + var patch = (a, loose) => new SemVer(a, loose).patch; + module2.exports = patch; + } +}); + +// node_modules/semver/functions/prerelease.js +var require_prerelease = __commonJS({ + "node_modules/semver/functions/prerelease.js"(exports, module2) { + var parse2 = require_parse(); + var prerelease = (version2, options) => { + const parsed = parse2(version2, options); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + }; + module2.exports = prerelease; + } +}); + +// node_modules/semver/functions/rcompare.js +var require_rcompare = __commonJS({ + "node_modules/semver/functions/rcompare.js"(exports, module2) { + var compare = require_compare(); + var rcompare = (a, b, loose) => compare(b, a, loose); + module2.exports = rcompare; + } +}); + +// node_modules/semver/functions/compare-loose.js +var require_compare_loose = __commonJS({ + "node_modules/semver/functions/compare-loose.js"(exports, module2) { + var compare = require_compare(); + var compareLoose = (a, b) => compare(a, b, true); + module2.exports = compareLoose; + } +}); + +// node_modules/semver/functions/compare-build.js +var require_compare_build = __commonJS({ + "node_modules/semver/functions/compare-build.js"(exports, module2) { + var SemVer = require_semver(); + var compareBuild = (a, b, loose) => { + const versionA = new SemVer(a, loose); + const versionB = new SemVer(b, loose); + return versionA.compare(versionB) || versionA.compareBuild(versionB); + }; + module2.exports = compareBuild; + } +}); + +// node_modules/semver/functions/sort.js +var require_sort = __commonJS({ + "node_modules/semver/functions/sort.js"(exports, module2) { + var compareBuild = require_compare_build(); + var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)); + module2.exports = sort; + } +}); + +// node_modules/semver/functions/rsort.js +var require_rsort = __commonJS({ + "node_modules/semver/functions/rsort.js"(exports, module2) { + var compareBuild = require_compare_build(); + var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)); + module2.exports = rsort; + } +}); + +// node_modules/semver/functions/gt.js +var require_gt = __commonJS({ + "node_modules/semver/functions/gt.js"(exports, module2) { + var compare = require_compare(); + var gt = (a, b, loose) => compare(a, b, loose) > 0; + module2.exports = gt; + } +}); + +// node_modules/semver/functions/lt.js +var require_lt = __commonJS({ + "node_modules/semver/functions/lt.js"(exports, module2) { + var compare = require_compare(); + var lt = (a, b, loose) => compare(a, b, loose) < 0; + module2.exports = lt; + } +}); + +// node_modules/semver/functions/neq.js +var require_neq = __commonJS({ + "node_modules/semver/functions/neq.js"(exports, module2) { + var compare = require_compare(); + var neq = (a, b, loose) => compare(a, b, loose) !== 0; + module2.exports = neq; + } +}); + +// node_modules/semver/functions/gte.js +var require_gte = __commonJS({ + "node_modules/semver/functions/gte.js"(exports, module2) { + var compare = require_compare(); + var gte = (a, b, loose) => compare(a, b, loose) >= 0; + module2.exports = gte; + } +}); + +// node_modules/semver/functions/lte.js +var require_lte = __commonJS({ + "node_modules/semver/functions/lte.js"(exports, module2) { + var compare = require_compare(); + var lte = (a, b, loose) => compare(a, b, loose) <= 0; + module2.exports = lte; + } +}); + +// node_modules/semver/functions/cmp.js +var require_cmp = __commonJS({ + "node_modules/semver/functions/cmp.js"(exports, module2) { + var eq = require_eq(); + var neq = require_neq(); + var gt = require_gt(); + var gte = require_gte(); + var lt = require_lt(); + var lte = require_lte(); + var cmp = (a, op, b, loose) => { + switch (op) { + case "===": + if (typeof a === "object") { + a = a.version; + } + if (typeof b === "object") { + b = b.version; + } + return a === b; + case "!==": + if (typeof a === "object") { + a = a.version; + } + if (typeof b === "object") { + b = b.version; + } + return a !== b; + case "": + case "=": + case "==": + return eq(a, b, loose); + case "!=": + return neq(a, b, loose); + case ">": + return gt(a, b, loose); + case ">=": + return gte(a, b, loose); + case "<": + return lt(a, b, loose); + case "<=": + return lte(a, b, loose); + default: + throw new TypeError(`Invalid operator: ${op}`); + } + }; + module2.exports = cmp; + } +}); + +// node_modules/semver/functions/coerce.js +var require_coerce = __commonJS({ + "node_modules/semver/functions/coerce.js"(exports, module2) { + var SemVer = require_semver(); + var parse2 = require_parse(); + var { re, t } = require_re(); + var coerce = (version2, options) => { + if (version2 instanceof SemVer) { + return version2; + } + if (typeof version2 === "number") { + version2 = String(version2); + } + if (typeof version2 !== "string") { + return null; + } + options = options || {}; + let match = null; + if (!options.rtl) { + match = version2.match(re[t.COERCE]); + } else { + let next; + while ((next = re[t.COERCERTL].exec(version2)) && (!match || match.index + match[0].length !== version2.length)) { + if (!match || next.index + next[0].length !== match.index + match[0].length) { + match = next; + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; + } + re[t.COERCERTL].lastIndex = -1; + } + if (match === null) { + return null; + } + return parse2(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options); + }; + module2.exports = coerce; + } +}); + +// node_modules/semver/node_modules/yallist/iterator.js +var require_iterator = __commonJS({ + "node_modules/semver/node_modules/yallist/iterator.js"(exports, module2) { "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getDeepKeys = exports.toJSON = void 0; - var nonJsonTypes = ["function", "symbol", "undefined"]; - var protectedProps = ["constructor", "prototype", "__proto__"]; - var objectPrototype = Object.getPrototypeOf({}); - function toJSON() { - let pojo = {}; - let error = this; - for (let key of getDeepKeys(error)) { - if (typeof key === "string") { - let value = error[key]; - let type = typeof value; - if (!nonJsonTypes.includes(type)) { - pojo[key] = value; - } - } - } - return pojo; + module2.exports = function(Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value; + } + }; + }; + } +}); + +// node_modules/semver/node_modules/yallist/yallist.js +var require_yallist = __commonJS({ + "node_modules/semver/node_modules/yallist/yallist.js"(exports, module2) { + "use strict"; + module2.exports = Yallist; + Yallist.Node = Node; + Yallist.create = Yallist; + function Yallist(list) { + var self = this; + if (!(self instanceof Yallist)) { + self = new Yallist(); + } + self.tail = null; + self.head = null; + self.length = 0; + if (list && typeof list.forEach === "function") { + list.forEach(function(item) { + self.push(item); + }); + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]); + } + } + return self; + } + Yallist.prototype.removeNode = function(node) { + if (node.list !== this) { + throw new Error("removing node which does not belong to this list"); + } + var next = node.next; + var prev = node.prev; + if (next) { + next.prev = prev; + } + if (prev) { + prev.next = next; + } + if (node === this.head) { + this.head = next; + } + if (node === this.tail) { + this.tail = prev; + } + node.list.length--; + node.next = null; + node.prev = null; + node.list = null; + return next; + }; + Yallist.prototype.unshiftNode = function(node) { + if (node === this.head) { + return; + } + if (node.list) { + node.list.removeNode(node); + } + var head = this.head; + node.list = this; + node.next = head; + if (head) { + head.prev = node; + } + this.head = node; + if (!this.tail) { + this.tail = node; + } + this.length++; + }; + Yallist.prototype.pushNode = function(node) { + if (node === this.tail) { + return; + } + if (node.list) { + node.list.removeNode(node); + } + var tail = this.tail; + node.list = this; + node.prev = tail; + if (tail) { + tail.next = node; + } + this.tail = node; + if (!this.head) { + this.head = node; + } + this.length++; + }; + Yallist.prototype.push = function() { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]); + } + return this.length; + }; + Yallist.prototype.unshift = function() { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]); + } + return this.length; + }; + Yallist.prototype.pop = function() { + if (!this.tail) { + return void 0; + } + var res = this.tail.value; + this.tail = this.tail.prev; + if (this.tail) { + this.tail.next = null; + } else { + this.head = null; + } + this.length--; + return res; + }; + Yallist.prototype.shift = function() { + if (!this.head) { + return void 0; + } + var res = this.head.value; + this.head = this.head.next; + if (this.head) { + this.head.prev = null; + } else { + this.tail = null; + } + this.length--; + return res; + }; + Yallist.prototype.forEach = function(fn, thisp) { + thisp = thisp || this; + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this); + walker = walker.next; + } + }; + Yallist.prototype.forEachReverse = function(fn, thisp) { + thisp = thisp || this; + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this); + walker = walker.prev; + } + }; + Yallist.prototype.get = function(n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + walker = walker.next; + } + if (i === n && walker !== null) { + return walker.value; + } + }; + Yallist.prototype.getReverse = function(n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + walker = walker.prev; + } + if (i === n && walker !== null) { + return walker.value; + } + }; + Yallist.prototype.map = function(fn, thisp) { + thisp = thisp || this; + var res = new Yallist(); + for (var walker = this.head; walker !== null; ) { + res.push(fn.call(thisp, walker.value, this)); + walker = walker.next; + } + return res; + }; + Yallist.prototype.mapReverse = function(fn, thisp) { + thisp = thisp || this; + var res = new Yallist(); + for (var walker = this.tail; walker !== null; ) { + res.push(fn.call(thisp, walker.value, this)); + walker = walker.prev; + } + return res; + }; + Yallist.prototype.reduce = function(fn, initial) { + var acc; + var walker = this.head; + if (arguments.length > 1) { + acc = initial; + } else if (this.head) { + walker = this.head.next; + acc = this.head.value; + } else { + throw new TypeError("Reduce of empty list with no initial value"); + } + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i); + walker = walker.next; + } + return acc; + }; + Yallist.prototype.reduceReverse = function(fn, initial) { + var acc; + var walker = this.tail; + if (arguments.length > 1) { + acc = initial; + } else if (this.tail) { + walker = this.tail.prev; + acc = this.tail.value; + } else { + throw new TypeError("Reduce of empty list with no initial value"); + } + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i); + walker = walker.prev; + } + return acc; + }; + Yallist.prototype.toArray = function() { + var arr = new Array(this.length); + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value; + walker = walker.next; + } + return arr; + }; + Yallist.prototype.toArrayReverse = function() { + var arr = new Array(this.length); + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value; + walker = walker.prev; + } + return arr; + }; + Yallist.prototype.slice = function(from, to) { + to = to || this.length; + if (to < 0) { + to += this.length; + } + from = from || 0; + if (from < 0) { + from += this.length; + } + var ret = new Yallist(); + if (to < from || to < 0) { + return ret; + } + if (from < 0) { + from = 0; + } + if (to > this.length) { + to = this.length; + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next; + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value); + } + return ret; + }; + Yallist.prototype.sliceReverse = function(from, to) { + to = to || this.length; + if (to < 0) { + to += this.length; + } + from = from || 0; + if (from < 0) { + from += this.length; + } + var ret = new Yallist(); + if (to < from || to < 0) { + return ret; + } + if (from < 0) { + from = 0; + } + if (to > this.length) { + to = this.length; + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev; + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value); + } + return ret; + }; + Yallist.prototype.splice = function(start, deleteCount, ...nodes) { + if (start > this.length) { + start = this.length - 1; + } + if (start < 0) { + start = this.length + start; + } + for (var i = 0, walker = this.head; walker !== null && i < start; i++) { + walker = walker.next; + } + var ret = []; + for (var i = 0; walker && i < deleteCount; i++) { + ret.push(walker.value); + walker = this.removeNode(walker); + } + if (walker === null) { + walker = this.tail; + } + if (walker !== this.head && walker !== this.tail) { + walker = walker.prev; + } + for (var i = 0; i < nodes.length; i++) { + walker = insert(this, walker, nodes[i]); + } + return ret; + }; + Yallist.prototype.reverse = function() { + var head = this.head; + var tail = this.tail; + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev; + walker.prev = walker.next; + walker.next = p; + } + this.head = tail; + this.tail = head; + return this; + }; + function insert(self, node, value) { + var inserted = node === self.head ? new Node(value, null, node, self) : new Node(value, node, node.next, self); + if (inserted.next === null) { + self.tail = inserted; + } + if (inserted.prev === null) { + self.head = inserted; + } + self.length++; + return inserted; + } + function push(self, item) { + self.tail = new Node(item, self.tail, null, self); + if (!self.head) { + self.head = self.tail; + } + self.length++; + } + function unshift(self, item) { + self.head = new Node(item, null, self.head, self); + if (!self.tail) { + self.tail = self.head; + } + self.length++; + } + function Node(value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list); + } + this.list = list; + this.value = value; + if (prev) { + prev.next = this; + this.prev = prev; + } else { + this.prev = null; + } + if (next) { + next.prev = this; + this.next = next; + } else { + this.next = null; + } } - exports.toJSON = toJSON; - function getDeepKeys(obj, omit = []) { - let keys = []; - while (obj && obj !== objectPrototype) { - keys = keys.concat(Object.getOwnPropertyNames(obj), Object.getOwnPropertySymbols(obj)); - obj = Object.getPrototypeOf(obj); - } - let uniqueKeys = new Set(keys); - for (let key of omit.concat(protectedProps)) { - uniqueKeys.delete(key); - } - return uniqueKeys; + try { + require_iterator()(Yallist); + } catch (er) { } - exports.getDeepKeys = getDeepKeys; } }); -// node_modules/@jsdevtools/ono/cjs/isomorphic.node.js -var require_isomorphic_node = __commonJS({ - "node_modules/@jsdevtools/ono/cjs/isomorphic.node.js"(exports) { +// node_modules/semver/node_modules/lru-cache/index.js +var require_lru_cache = __commonJS({ + "node_modules/semver/node_modules/lru-cache/index.js"(exports, module2) { "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.addInspectMethod = exports.format = void 0; - var util = require("util"); - var to_json_1 = require_to_json(); - var inspectMethod = util.inspect.custom || Symbol.for("nodejs.util.inspect.custom"); - exports.format = util.format; - function addInspectMethod(newError) { - newError[inspectMethod] = inspect; - } - exports.addInspectMethod = addInspectMethod; - function inspect() { - let pojo = {}; - let error = this; - for (let key of to_json_1.getDeepKeys(error)) { - let value = error[key]; - pojo[key] = value; - } - delete pojo[inspectMethod]; - return pojo; - } + var Yallist = require_yallist(); + var MAX = Symbol("max"); + var LENGTH = Symbol("length"); + var LENGTH_CALCULATOR = Symbol("lengthCalculator"); + var ALLOW_STALE = Symbol("allowStale"); + var MAX_AGE = Symbol("maxAge"); + var DISPOSE = Symbol("dispose"); + var NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet"); + var LRU_LIST = Symbol("lruList"); + var CACHE = Symbol("cache"); + var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet"); + var naiveLength = () => 1; + var LRUCache = class { + constructor(options) { + if (typeof options === "number") + options = { max: options }; + if (!options) + options = {}; + if (options.max && (typeof options.max !== "number" || options.max < 0)) + throw new TypeError("max must be a non-negative number"); + const max = this[MAX] = options.max || Infinity; + const lc = options.length || naiveLength; + this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc; + this[ALLOW_STALE] = options.stale || false; + if (options.maxAge && typeof options.maxAge !== "number") + throw new TypeError("maxAge must be a number"); + this[MAX_AGE] = options.maxAge || 0; + this[DISPOSE] = options.dispose; + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false; + this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false; + this.reset(); + } + // resize the cache when the max changes. + set max(mL) { + if (typeof mL !== "number" || mL < 0) + throw new TypeError("max must be a non-negative number"); + this[MAX] = mL || Infinity; + trim(this); + } + get max() { + return this[MAX]; + } + set allowStale(allowStale) { + this[ALLOW_STALE] = !!allowStale; + } + get allowStale() { + return this[ALLOW_STALE]; + } + set maxAge(mA) { + if (typeof mA !== "number") + throw new TypeError("maxAge must be a non-negative number"); + this[MAX_AGE] = mA; + trim(this); + } + get maxAge() { + return this[MAX_AGE]; + } + // resize the cache when the lengthCalculator changes. + set lengthCalculator(lC) { + if (typeof lC !== "function") + lC = naiveLength; + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC; + this[LENGTH] = 0; + this[LRU_LIST].forEach((hit) => { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key); + this[LENGTH] += hit.length; + }); + } + trim(this); + } + get lengthCalculator() { + return this[LENGTH_CALCULATOR]; + } + get length() { + return this[LENGTH]; + } + get itemCount() { + return this[LRU_LIST].length; + } + rforEach(fn, thisp) { + thisp = thisp || this; + for (let walker = this[LRU_LIST].tail; walker !== null; ) { + const prev = walker.prev; + forEachStep(this, fn, walker, thisp); + walker = prev; + } + } + forEach(fn, thisp) { + thisp = thisp || this; + for (let walker = this[LRU_LIST].head; walker !== null; ) { + const next = walker.next; + forEachStep(this, fn, walker, thisp); + walker = next; + } + } + keys() { + return this[LRU_LIST].toArray().map((k) => k.key); + } + values() { + return this[LRU_LIST].toArray().map((k) => k.value); + } + reset() { + if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { + this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value)); + } + this[CACHE] = /* @__PURE__ */ new Map(); + this[LRU_LIST] = new Yallist(); + this[LENGTH] = 0; + } + dump() { + return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + }).toArray().filter((h) => h); + } + dumpLru() { + return this[LRU_LIST]; + } + set(key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE]; + if (maxAge && typeof maxAge !== "number") + throw new TypeError("maxAge must be a number"); + const now = maxAge ? Date.now() : 0; + const len = this[LENGTH_CALCULATOR](value, key); + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)); + return false; + } + const node = this[CACHE].get(key); + const item = node.value; + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) + this[DISPOSE](key, item.value); + } + item.now = now; + item.maxAge = maxAge; + item.value = value; + this[LENGTH] += len - item.length; + item.length = len; + this.get(key); + trim(this); + return true; + } + const hit = new Entry(key, value, len, now, maxAge); + if (hit.length > this[MAX]) { + if (this[DISPOSE]) + this[DISPOSE](key, value); + return false; + } + this[LENGTH] += hit.length; + this[LRU_LIST].unshift(hit); + this[CACHE].set(key, this[LRU_LIST].head); + trim(this); + return true; + } + has(key) { + if (!this[CACHE].has(key)) + return false; + const hit = this[CACHE].get(key).value; + return !isStale(this, hit); + } + get(key) { + return get(this, key, true); + } + peek(key) { + return get(this, key, false); + } + pop() { + const node = this[LRU_LIST].tail; + if (!node) + return null; + del(this, node); + return node.value; + } + del(key) { + del(this, this[CACHE].get(key)); + } + load(arr) { + this.reset(); + const now = Date.now(); + for (let l = arr.length - 1; l >= 0; l--) { + const hit = arr[l]; + const expiresAt = hit.e || 0; + if (expiresAt === 0) + this.set(hit.k, hit.v); + else { + const maxAge = expiresAt - now; + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge); + } + } + } + } + prune() { + this[CACHE].forEach((value, key) => get(this, key, false)); + } + }; + var get = (self, key, doUse) => { + const node = self[CACHE].get(key); + if (node) { + const hit = node.value; + if (isStale(self, hit)) { + del(self, node); + if (!self[ALLOW_STALE]) + return void 0; + } else { + if (doUse) { + if (self[UPDATE_AGE_ON_GET]) + node.value.now = Date.now(); + self[LRU_LIST].unshiftNode(node); + } + } + return hit.value; + } + }; + var isStale = (self, hit) => { + if (!hit || !hit.maxAge && !self[MAX_AGE]) + return false; + const diff = Date.now() - hit.now; + return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && diff > self[MAX_AGE]; + }; + var trim = (self) => { + if (self[LENGTH] > self[MAX]) { + for (let walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null; ) { + const prev = walker.prev; + del(self, walker); + walker = prev; + } + } + }; + var del = (self, node) => { + if (node) { + const hit = node.value; + if (self[DISPOSE]) + self[DISPOSE](hit.key, hit.value); + self[LENGTH] -= hit.length; + self[CACHE].delete(hit.key); + self[LRU_LIST].removeNode(node); + } + }; + var Entry = class { + constructor(key, value, length, now, maxAge) { + this.key = key; + this.value = value; + this.length = length; + this.now = now; + this.maxAge = maxAge || 0; + } + }; + var forEachStep = (self, fn, node, thisp) => { + let hit = node.value; + if (isStale(self, hit)) { + del(self, node); + if (!self[ALLOW_STALE]) + hit = void 0; + } + if (hit) + fn.call(thisp, hit.value, hit.key, self); + }; + module2.exports = LRUCache; + } +}); + +// node_modules/semver/classes/range.js +var require_range = __commonJS({ + "node_modules/semver/classes/range.js"(exports, module2) { + var Range = class { + constructor(range, options) { + options = parseOptions(options); + if (range instanceof Range) { + if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { + return range; + } else { + return new Range(range.raw, options); + } + } + if (range instanceof Comparator) { + this.raw = range.value; + this.set = [[range]]; + this.format(); + return this; + } + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + this.raw = range; + this.set = range.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length); + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${range}`); + } + if (this.set.length > 1) { + const first = this.set[0]; + this.set = this.set.filter((c) => !isNullSet(c[0])); + if (this.set.length === 0) { + this.set = [first]; + } else if (this.set.length > 1) { + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c]; + break; + } + } + } + } + this.format(); + } + format() { + this.range = this.set.map((comps) => { + return comps.join(" ").trim(); + }).join("||").trim(); + return this.range; + } + toString() { + return this.range; + } + parseRange(range) { + range = range.trim(); + const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE); + const memoKey = memoOpts + ":" + range; + const cached = cache.get(memoKey); + if (cached) { + return cached; + } + const loose = this.options.loose; + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); + debug("hyphen replace", range); + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); + debug("comparator trim", range); + range = range.replace(re[t.TILDETRIM], tildeTrimReplace); + range = range.replace(re[t.CARETTRIM], caretTrimReplace); + range = range.split(/\s+/).join(" "); + let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); + if (loose) { + rangeList = rangeList.filter((comp) => { + debug("loose invalid filter", comp, this.options); + return !!comp.match(re[t.COMPARATORLOOSE]); + }); + } + debug("range list", rangeList); + const rangeMap = /* @__PURE__ */ new Map(); + const comparators = rangeList.map((comp) => new Comparator(comp, this.options)); + for (const comp of comparators) { + if (isNullSet(comp)) { + return [comp]; + } + rangeMap.set(comp.value, comp); + } + if (rangeMap.size > 1 && rangeMap.has("")) { + rangeMap.delete(""); + } + const result = [...rangeMap.values()]; + cache.set(memoKey, result); + return result; + } + intersects(range, options) { + if (!(range instanceof Range)) { + throw new TypeError("a Range is required"); + } + return this.set.some((thisComparators) => { + return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { + return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); + } + // if ANY of the sets match ALL of its comparators, then pass + test(version2) { + if (!version2) { + return false; + } + if (typeof version2 === "string") { + try { + version2 = new SemVer(version2, this.options); + } catch (er) { + return false; + } + } + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version2, this.options)) { + return true; + } + } + return false; + } + }; + module2.exports = Range; + var LRU = require_lru_cache(); + var cache = new LRU({ max: 1e3 }); + var parseOptions = require_parse_options(); + var Comparator = require_comparator(); + var debug = require_debug(); + var SemVer = require_semver(); + var { + re, + t, + comparatorTrimReplace, + tildeTrimReplace, + caretTrimReplace + } = require_re(); + var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants(); + var isNullSet = (c) => c.value === "<0.0.0-0"; + var isAny = (c) => c.value === ""; + var isSatisfiable = (comparators, options) => { + let result = true; + const remainingComparators = comparators.slice(); + let testComparator = remainingComparators.pop(); + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options); + }); + testComparator = remainingComparators.pop(); + } + return result; + }; + var parseComparator = (comp, options) => { + debug("comp", comp, options); + comp = replaceCarets(comp, options); + debug("caret", comp); + comp = replaceTildes(comp, options); + debug("tildes", comp); + comp = replaceXRanges(comp, options); + debug("xrange", comp); + comp = replaceStars(comp, options); + debug("stars", comp); + return comp; + }; + var isX = (id) => !id || id.toLowerCase() === "x" || id === "*"; + var replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((c) => { + return replaceTilde(c, options); + }).join(" "); + var replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; + return comp.replace(r, (_, M, m, p, pr) => { + debug("tilde", comp, _, M, m, p, pr); + let ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = `>=${M}.0.0 <${+M + 1}.0.0-0`; + } else if (isX(p)) { + ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`; + } else if (pr) { + debug("replaceTilde pr", pr); + ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + } else { + ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; + } + debug("tilde return", ret); + return ret; + }); + }; + var replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((c) => { + return replaceCaret(c, options); + }).join(" "); + var replaceCaret = (comp, options) => { + debug("caret", comp, options); + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; + const z = options.includePrerelease ? "-0" : ""; + return comp.replace(r, (_, M, m, p, pr) => { + debug("caret", comp, _, M, m, p, pr); + let ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; + } else if (isX(p)) { + if (M === "0") { + ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; + } else { + ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`; + } + } else if (pr) { + debug("replaceCaret pr", pr); + if (M === "0") { + if (m === "0") { + ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`; + } else { + ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + } + } else { + ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`; + } + } else { + debug("no pr"); + if (M === "0") { + if (m === "0") { + ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`; + } else { + ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`; + } + } else { + ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; + } + } + debug("caret return", ret); + return ret; + }); + }; + var replaceXRanges = (comp, options) => { + debug("replaceXRanges", comp, options); + return comp.split(/\s+/).map((c) => { + return replaceXRange(c, options); + }).join(" "); + }; + var replaceXRange = (comp, options) => { + comp = comp.trim(); + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; + return comp.replace(r, (ret, gtlt, M, m, p, pr) => { + debug("xRange", comp, ret, gtlt, M, m, p, pr); + const xM = isX(M); + const xm = xM || isX(m); + const xp = xm || isX(p); + const anyX = xp; + if (gtlt === "=" && anyX) { + gtlt = ""; + } + pr = options.includePrerelease ? "-0" : ""; + if (xM) { + if (gtlt === ">" || gtlt === "<") { + ret = "<0.0.0-0"; + } else { + ret = "*"; + } + } else if (gtlt && anyX) { + if (xm) { + m = 0; + } + p = 0; + if (gtlt === ">") { + gtlt = ">="; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else { + m = +m + 1; + p = 0; + } + } else if (gtlt === "<=") { + gtlt = "<"; + if (xm) { + M = +M + 1; + } else { + m = +m + 1; + } + } + if (gtlt === "<") { + pr = "-0"; + } + ret = `${gtlt + M}.${m}.${p}${pr}`; + } else if (xm) { + ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; + } else if (xp) { + ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; + } + debug("xRange return", ret); + return ret; + }); + }; + var replaceStars = (comp, options) => { + debug("replaceStars", comp, options); + return comp.trim().replace(re[t.STAR], ""); + }; + var replaceGTE0 = (comp, options) => { + debug("replaceGTE0", comp, options); + return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); + }; + var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => { + if (isX(fM)) { + from = ""; + } else if (isX(fm)) { + from = `>=${fM}.0.0${incPr ? "-0" : ""}`; + } else if (isX(fp)) { + from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; + } else if (fpr) { + from = `>=${from}`; + } else { + from = `>=${from}${incPr ? "-0" : ""}`; + } + if (isX(tM)) { + to = ""; + } else if (isX(tm)) { + to = `<${+tM + 1}.0.0-0`; + } else if (isX(tp)) { + to = `<${tM}.${+tm + 1}.0-0`; + } else if (tpr) { + to = `<=${tM}.${tm}.${tp}-${tpr}`; + } else if (incPr) { + to = `<${tM}.${tm}.${+tp + 1}-0`; + } else { + to = `<=${to}`; + } + return `${from} ${to}`.trim(); + }; + var testSet = (set, version2, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version2)) { + return false; + } + } + if (version2.prerelease.length && !options.includePrerelease) { + for (let i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === Comparator.ANY) { + continue; + } + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver; + if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) { + return true; + } + } + } + return false; + } + return true; + }; + } +}); + +// node_modules/semver/classes/comparator.js +var require_comparator = __commonJS({ + "node_modules/semver/classes/comparator.js"(exports, module2) { + var ANY = Symbol("SemVer ANY"); + var Comparator = class { + static get ANY() { + return ANY; + } + constructor(comp, options) { + options = parseOptions(options); + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp; + } else { + comp = comp.value; + } + } + debug("comparator", comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) { + this.value = ""; + } else { + this.value = this.operator + this.semver.version; + } + debug("comp", this); + } + parse(comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; + const m = comp.match(r); + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`); + } + this.operator = m[1] !== void 0 ? m[1] : ""; + if (this.operator === "=") { + this.operator = ""; + } + if (!m[2]) { + this.semver = ANY; + } else { + this.semver = new SemVer(m[2], this.options.loose); + } + } + toString() { + return this.value; + } + test(version2) { + debug("Comparator.test", version2, this.options.loose); + if (this.semver === ANY || version2 === ANY) { + return true; + } + if (typeof version2 === "string") { + try { + version2 = new SemVer(version2, this.options); + } catch (er) { + return false; + } + } + return cmp(version2, this.operator, this.semver, this.options); + } + intersects(comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError("a Comparator is required"); + } + if (this.operator === "") { + if (this.value === "") { + return true; + } + return new Range(comp.value, options).test(this.value); + } else if (comp.operator === "") { + if (comp.value === "") { + return true; + } + return new Range(this.value, options).test(comp.semver); + } + options = parseOptions(options); + if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) { + return false; + } + if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) { + return false; + } + if (this.operator.startsWith(">") && comp.operator.startsWith(">")) { + return true; + } + if (this.operator.startsWith("<") && comp.operator.startsWith("<")) { + return true; + } + if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) { + return true; + } + if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) { + return true; + } + if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) { + return true; + } + return false; + } + }; + module2.exports = Comparator; + var parseOptions = require_parse_options(); + var { re, t } = require_re(); + var cmp = require_cmp(); + var debug = require_debug(); + var SemVer = require_semver(); + var Range = require_range(); + } +}); + +// node_modules/semver/functions/satisfies.js +var require_satisfies = __commonJS({ + "node_modules/semver/functions/satisfies.js"(exports, module2) { + var Range = require_range(); + var satisfies = (version2, range, options) => { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + return range.test(version2); + }; + module2.exports = satisfies; + } +}); + +// node_modules/semver/ranges/to-comparators.js +var require_to_comparators = __commonJS({ + "node_modules/semver/ranges/to-comparators.js"(exports, module2) { + var Range = require_range(); + var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); + module2.exports = toComparators; + } +}); + +// node_modules/semver/ranges/max-satisfying.js +var require_max_satisfying = __commonJS({ + "node_modules/semver/ranges/max-satisfying.js"(exports, module2) { + var SemVer = require_semver(); + var Range = require_range(); + var maxSatisfying = (versions, range, options) => { + let max = null; + let maxSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!max || maxSV.compare(v) === -1) { + max = v; + maxSV = new SemVer(max, options); + } + } + }); + return max; + }; + module2.exports = maxSatisfying; + } +}); + +// node_modules/semver/ranges/min-satisfying.js +var require_min_satisfying = __commonJS({ + "node_modules/semver/ranges/min-satisfying.js"(exports, module2) { + var SemVer = require_semver(); + var Range = require_range(); + var minSatisfying = (versions, range, options) => { + let min = null; + let minSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!min || minSV.compare(v) === 1) { + min = v; + minSV = new SemVer(min, options); + } + } + }); + return min; + }; + module2.exports = minSatisfying; + } +}); + +// node_modules/semver/ranges/min-version.js +var require_min_version = __commonJS({ + "node_modules/semver/ranges/min-version.js"(exports, module2) { + var SemVer = require_semver(); + var Range = require_range(); + var gt = require_gt(); + var minVersion = (range, loose) => { + range = new Range(range, loose); + let minver = new SemVer("0.0.0"); + if (range.test(minver)) { + return minver; + } + minver = new SemVer("0.0.0-0"); + if (range.test(minver)) { + return minver; + } + minver = null; + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let setMin = null; + comparators.forEach((comparator) => { + const compver = new SemVer(comparator.semver.version); + switch (comparator.operator) { + case ">": + if (compver.prerelease.length === 0) { + compver.patch++; + } else { + compver.prerelease.push(0); + } + compver.raw = compver.format(); + case "": + case ">=": + if (!setMin || gt(compver, setMin)) { + setMin = compver; + } + break; + case "<": + case "<=": + break; + default: + throw new Error(`Unexpected operation: ${comparator.operator}`); + } + }); + if (setMin && (!minver || gt(minver, setMin))) { + minver = setMin; + } + } + if (minver && range.test(minver)) { + return minver; + } + return null; + }; + module2.exports = minVersion; + } +}); + +// node_modules/semver/ranges/valid.js +var require_valid2 = __commonJS({ + "node_modules/semver/ranges/valid.js"(exports, module2) { + var Range = require_range(); + var validRange = (range, options) => { + try { + return new Range(range, options).range || "*"; + } catch (er) { + return null; + } + }; + module2.exports = validRange; } }); -// node_modules/@jsdevtools/ono/cjs/stack.js -var require_stack = __commonJS({ - "node_modules/@jsdevtools/ono/cjs/stack.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.lazyJoinStacks = exports.joinStacks = exports.isWritableStack = exports.isLazyStack = void 0; - var newline = /\r?\n/; - var onoCall = /\bono[ @]/; - function isLazyStack(stackProp) { - return Boolean(stackProp && stackProp.configurable && typeof stackProp.get === "function"); - } - exports.isLazyStack = isLazyStack; - function isWritableStack(stackProp) { - return Boolean( - // If there is no stack property, then it's writable, since assigning it will create it - !stackProp || stackProp.writable || typeof stackProp.set === "function" - ); - } - exports.isWritableStack = isWritableStack; - function joinStacks(newError, originalError) { - let newStack = popStack(newError.stack); - let originalStack = originalError ? originalError.stack : void 0; - if (newStack && originalStack) { - return newStack + "\n\n" + originalStack; - } else { - return newStack || originalStack; +// node_modules/semver/ranges/outside.js +var require_outside = __commonJS({ + "node_modules/semver/ranges/outside.js"(exports, module2) { + var SemVer = require_semver(); + var Comparator = require_comparator(); + var { ANY } = Comparator; + var Range = require_range(); + var satisfies = require_satisfies(); + var gt = require_gt(); + var lt = require_lt(); + var lte = require_lte(); + var gte = require_gte(); + var outside = (version2, range, hilo, options) => { + version2 = new SemVer(version2, options); + range = new Range(range, options); + let gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case ">": + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = ">"; + ecomp = ">="; + break; + case "<": + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = "<"; + ecomp = "<="; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); } - } - exports.joinStacks = joinStacks; - function lazyJoinStacks(lazyStack, newError, originalError) { - if (originalError) { - Object.defineProperty(newError, "stack", { - get: () => { - let newStack = lazyStack.get.apply(newError); - return joinStacks({ stack: newStack }, originalError); - }, - enumerable: false, - configurable: true - }); - } else { - lazyPopStack(newError, lazyStack); + if (satisfies(version2, range, options)) { + return false; } - } - exports.lazyJoinStacks = lazyJoinStacks; - function popStack(stack) { - if (stack) { - let lines = stack.split(newline); - let onoStart; - for (let i = 0; i < lines.length; i++) { - let line = lines[i]; - if (onoCall.test(line)) { - if (onoStart === void 0) { - onoStart = i; - } - } else if (onoStart !== void 0) { - lines.splice(onoStart, i - onoStart); - break; + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let high = null; + let low = null; + comparators.forEach((comparator) => { + if (comparator.semver === ANY) { + comparator = new Comparator(">=0.0.0"); } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator; + } + }); + if (high.operator === comp || high.operator === ecomp) { + return false; } - if (lines.length > 0) { - return lines.join("\n"); + if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version2, low.semver)) { + return false; } } - return stack; - } - function lazyPopStack(error, lazyStack) { - Object.defineProperty(error, "stack", { - get: () => popStack(lazyStack.get.apply(error)), - enumerable: false, - configurable: true - }); - } + return true; + }; + module2.exports = outside; } }); -// node_modules/@jsdevtools/ono/cjs/extend-error.js -var require_extend_error = __commonJS({ - "node_modules/@jsdevtools/ono/cjs/extend-error.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.extendError = void 0; - var isomorphic_node_1 = require_isomorphic_node(); - var stack_1 = require_stack(); - var to_json_1 = require_to_json(); - var protectedProps = ["name", "message", "stack"]; - function extendError(error, originalError, props) { - let onoError = error; - extendStack(onoError, originalError); - if (originalError && typeof originalError === "object") { - mergeErrors(onoError, originalError); - } - onoError.toJSON = to_json_1.toJSON; - if (isomorphic_node_1.addInspectMethod) { - isomorphic_node_1.addInspectMethod(onoError); - } - if (props && typeof props === "object") { - Object.assign(onoError, props); - } - return onoError; - } - exports.extendError = extendError; - function extendStack(newError, originalError) { - let stackProp = Object.getOwnPropertyDescriptor(newError, "stack"); - if (stack_1.isLazyStack(stackProp)) { - stack_1.lazyJoinStacks(stackProp, newError, originalError); - } else if (stack_1.isWritableStack(stackProp)) { - newError.stack = stack_1.joinStacks(newError, originalError); - } - } - function mergeErrors(newError, originalError) { - let keys = to_json_1.getDeepKeys(originalError, protectedProps); - let _newError = newError; - let _originalError = originalError; - for (let key of keys) { - if (_newError[key] === void 0) { - try { - _newError[key] = _originalError[key]; - } catch (e) { - } - } - } - } +// node_modules/semver/ranges/gtr.js +var require_gtr = __commonJS({ + "node_modules/semver/ranges/gtr.js"(exports, module2) { + var outside = require_outside(); + var gtr = (version2, range, options) => outside(version2, range, ">", options); + module2.exports = gtr; } }); -// node_modules/@jsdevtools/ono/cjs/normalize.js -var require_normalize = __commonJS({ - "node_modules/@jsdevtools/ono/cjs/normalize.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.normalizeArgs = exports.normalizeOptions = void 0; - var isomorphic_node_1 = require_isomorphic_node(); - function normalizeOptions2(options) { - options = options || {}; - return { - concatMessages: options.concatMessages === void 0 ? true : Boolean(options.concatMessages), - format: options.format === void 0 ? isomorphic_node_1.format : typeof options.format === "function" ? options.format : false - }; - } - exports.normalizeOptions = normalizeOptions2; - function normalizeArgs(args, options) { - let originalError; - let props; - let formatArgs; - let message = ""; - if (typeof args[0] === "string") { - formatArgs = args; - } else if (typeof args[1] === "string") { - if (args[0] instanceof Error) { - originalError = args[0]; +// node_modules/semver/ranges/ltr.js +var require_ltr = __commonJS({ + "node_modules/semver/ranges/ltr.js"(exports, module2) { + var outside = require_outside(); + var ltr = (version2, range, options) => outside(version2, range, "<", options); + module2.exports = ltr; + } +}); + +// node_modules/semver/ranges/intersects.js +var require_intersects = __commonJS({ + "node_modules/semver/ranges/intersects.js"(exports, module2) { + var Range = require_range(); + var intersects = (r1, r2, options) => { + r1 = new Range(r1, options); + r2 = new Range(r2, options); + return r1.intersects(r2, options); + }; + module2.exports = intersects; + } +}); + +// node_modules/semver/ranges/simplify.js +var require_simplify = __commonJS({ + "node_modules/semver/ranges/simplify.js"(exports, module2) { + var satisfies = require_satisfies(); + var compare = require_compare(); + module2.exports = (versions, range, options) => { + const set = []; + let first = null; + let prev = null; + const v = versions.sort((a, b) => compare(a, b, options)); + for (const version2 of v) { + const included = satisfies(version2, range, options); + if (included) { + prev = version2; + if (!first) { + first = version2; + } } else { - props = args[0]; + if (prev) { + set.push([first, prev]); + } + prev = null; + first = null; } - formatArgs = args.slice(1); - } else { - originalError = args[0]; - props = args[1]; - formatArgs = args.slice(2); } - if (formatArgs.length > 0) { - if (options.format) { - message = options.format.apply(void 0, formatArgs); + if (first) { + set.push([first, null]); + } + const ranges = []; + for (const [min, max] of set) { + if (min === max) { + ranges.push(min); + } else if (!max && min === v[0]) { + ranges.push("*"); + } else if (!max) { + ranges.push(`>=${min}`); + } else if (min === v[0]) { + ranges.push(`<=${max}`); } else { - message = formatArgs.join(" "); + ranges.push(`${min} - ${max}`); } } - if (options.concatMessages && originalError && originalError.message) { - message += (message ? " \n" : "") + originalError.message; - } - return { originalError, props, message }; - } - exports.normalizeArgs = normalizeArgs; + const simplified = ranges.join(" || "); + const original = typeof range.raw === "string" ? range.raw : String(range); + return simplified.length < original.length ? simplified : range; + }; } }); -// node_modules/@jsdevtools/ono/cjs/constructor.js -var require_constructor = __commonJS({ - "node_modules/@jsdevtools/ono/cjs/constructor.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Ono = void 0; - var extend_error_1 = require_extend_error(); - var normalize_1 = require_normalize(); - var to_json_1 = require_to_json(); - var constructor = Ono; - exports.Ono = constructor; - function Ono(ErrorConstructor, options) { - options = normalize_1.normalizeOptions(options); - function ono2(...args) { - let { originalError, props, message } = normalize_1.normalizeArgs(args, options); - let newError = new ErrorConstructor(message); - return extend_error_1.extendError(newError, originalError, props); - } - ono2[Symbol.species] = ErrorConstructor; - return ono2; - } - Ono.toJSON = function toJSON(error) { - return to_json_1.toJSON.call(error); - }; - Ono.extend = function extend(error, originalError, props) { - if (props || originalError instanceof Error) { - return extend_error_1.extendError(error, originalError, props); - } else if (originalError) { - return extend_error_1.extendError(error, void 0, originalError); - } else { - return extend_error_1.extendError(error); +// node_modules/semver/ranges/subset.js +var require_subset = __commonJS({ + "node_modules/semver/ranges/subset.js"(exports, module2) { + var Range = require_range(); + var Comparator = require_comparator(); + var { ANY } = Comparator; + var satisfies = require_satisfies(); + var compare = require_compare(); + var subset = (sub, dom, options = {}) => { + if (sub === dom) { + return true; } + sub = new Range(sub, options); + dom = new Range(dom, options); + let sawNonNull = false; + OUTER: + for (const simpleSub of sub.set) { + for (const simpleDom of dom.set) { + const isSub = simpleSubset(simpleSub, simpleDom, options); + sawNonNull = sawNonNull || isSub !== null; + if (isSub) { + continue OUTER; + } + } + if (sawNonNull) { + return false; + } + } + return true; }; - } -}); - -// node_modules/@jsdevtools/ono/cjs/singleton.js -var require_singleton = __commonJS({ - "node_modules/@jsdevtools/ono/cjs/singleton.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.ono = void 0; - var constructor_1 = require_constructor(); - var singleton = ono2; - exports.ono = singleton; - ono2.error = new constructor_1.Ono(Error); - ono2.eval = new constructor_1.Ono(EvalError); - ono2.range = new constructor_1.Ono(RangeError); - ono2.reference = new constructor_1.Ono(ReferenceError); - ono2.syntax = new constructor_1.Ono(SyntaxError); - ono2.type = new constructor_1.Ono(TypeError); - ono2.uri = new constructor_1.Ono(URIError); - var onoMap = ono2; - function ono2(...args) { - let originalError = args[0]; - if (typeof originalError === "object" && typeof originalError.name === "string") { - for (let typedOno of Object.values(onoMap)) { - if (typeof typedOno === "function" && typedOno.name === "ono") { - let species = typedOno[Symbol.species]; - if (species && species !== Error && (originalError instanceof species || originalError.name === species.name)) { - return typedOno.apply(void 0, args); + var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")]; + var minimumVersion = [new Comparator(">=0.0.0")]; + var simpleSubset = (sub, dom, options) => { + if (sub === dom) { + return true; + } + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) { + return true; + } else if (options.includePrerelease) { + sub = minimumVersionWithPreRelease; + } else { + sub = minimumVersion; + } + } + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) { + return true; + } else { + dom = minimumVersion; + } + } + const eqSet = /* @__PURE__ */ new Set(); + let gt, lt; + for (const c of sub) { + if (c.operator === ">" || c.operator === ">=") { + gt = higherGT(gt, c, options); + } else if (c.operator === "<" || c.operator === "<=") { + lt = lowerLT(lt, c, options); + } else { + eqSet.add(c.semver); + } + } + if (eqSet.size > 1) { + return null; + } + let gtltComp; + if (gt && lt) { + gtltComp = compare(gt.semver, lt.semver, options); + if (gtltComp > 0) { + return null; + } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) { + return null; + } + } + for (const eq of eqSet) { + if (gt && !satisfies(eq, String(gt), options)) { + return null; + } + if (lt && !satisfies(eq, String(lt), options)) { + return null; + } + for (const c of dom) { + if (!satisfies(eq, String(c), options)) { + return false; + } + } + return true; + } + let higher, lower; + let hasDomLT, hasDomGT; + let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false; + let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false; + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) { + needDomLTPre = false; + } + for (const c of dom) { + hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">="; + hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<="; + if (gt) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) { + needDomGTPre = false; + } + } + if (c.operator === ">" || c.operator === ">=") { + higher = higherGT(gt, c, options); + if (higher === c && higher !== gt) { + return false; + } + } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) { + return false; + } + } + if (lt) { + if (needDomLTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) { + needDomLTPre = false; + } + } + if (c.operator === "<" || c.operator === "<=") { + lower = lowerLT(lt, c, options); + if (lower === c && lower !== lt) { + return false; } + } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) { + return false; } } + if (!c.operator && (lt || gt) && gtltComp !== 0) { + return false; + } } - return ono2.error.apply(void 0, args); - } - } -}); - -// node_modules/@jsdevtools/ono/cjs/types.js -var require_types = __commonJS({ - "node_modules/@jsdevtools/ono/cjs/types.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var util_1 = require("util"); + if (gt && hasDomLT && !lt && gtltComp !== 0) { + return false; + } + if (lt && hasDomGT && !gt && gtltComp !== 0) { + return false; + } + if (needDomGTPre || needDomLTPre) { + return false; + } + return true; + }; + var higherGT = (a, b, options) => { + if (!a) { + return b; + } + const comp = compare(a.semver, b.semver, options); + return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a; + }; + var lowerLT = (a, b, options) => { + if (!a) { + return b; + } + const comp = compare(a.semver, b.semver, options); + return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a; + }; + module2.exports = subset; } }); -// node_modules/@jsdevtools/ono/cjs/index.js -var require_cjs = __commonJS({ - "node_modules/@jsdevtools/ono/cjs/index.js"(exports, module2) { - "use strict"; - var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) - k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - } : function(o, m, k, k2) { - if (k2 === void 0) - k2 = k; - o[k2] = m[k]; - }); - var __exportStar = exports && exports.__exportStar || function(m, exports2) { - for (var p in m) - if (p !== "default" && !exports2.hasOwnProperty(p)) - __createBinding(exports2, m, p); +// node_modules/semver/index.js +var require_semver2 = __commonJS({ + "node_modules/semver/index.js"(exports, module2) { + var internalRe = require_re(); + var constants = require_constants(); + var SemVer = require_semver(); + var identifiers = require_identifiers(); + var parse2 = require_parse(); + var valid = require_valid(); + var clean = require_clean(); + var inc = require_inc(); + var diff = require_diff(); + var major = require_major(); + var minor = require_minor(); + var patch = require_patch(); + var prerelease = require_prerelease(); + var compare = require_compare(); + var rcompare = require_rcompare(); + var compareLoose = require_compare_loose(); + var compareBuild = require_compare_build(); + var sort = require_sort(); + var rsort = require_rsort(); + var gt = require_gt(); + var lt = require_lt(); + var eq = require_eq(); + var neq = require_neq(); + var gte = require_gte(); + var lte = require_lte(); + var cmp = require_cmp(); + var coerce = require_coerce(); + var Comparator = require_comparator(); + var Range = require_range(); + var satisfies = require_satisfies(); + var toComparators = require_to_comparators(); + var maxSatisfying = require_max_satisfying(); + var minSatisfying = require_min_satisfying(); + var minVersion = require_min_version(); + var validRange = require_valid2(); + var outside = require_outside(); + var gtr = require_gtr(); + var ltr = require_ltr(); + var intersects = require_intersects(); + var simplifyRange = require_simplify(); + var subset = require_subset(); + module2.exports = { + parse: parse2, + valid, + clean, + inc, + diff, + major, + minor, + patch, + prerelease, + compare, + rcompare, + compareLoose, + compareBuild, + sort, + rsort, + gt, + lt, + eq, + neq, + gte, + lte, + cmp, + coerce, + Comparator, + Range, + satisfies, + toComparators, + maxSatisfying, + minSatisfying, + minVersion, + validRange, + outside, + gtr, + ltr, + intersects, + simplifyRange, + subset, + SemVer, + re: internalRe.re, + src: internalRe.src, + tokens: internalRe.t, + SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, + RELEASE_TYPES: constants.RELEASE_TYPES, + compareIdentifiers: identifiers.compareIdentifiers, + rcompareIdentifiers: identifiers.rcompareIdentifiers }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.ono = void 0; - var singleton_1 = require_singleton(); - Object.defineProperty(exports, "ono", { enumerable: true, get: function() { - return singleton_1.ono; - } }); - var constructor_1 = require_constructor(); - Object.defineProperty(exports, "Ono", { enumerable: true, get: function() { - return constructor_1.Ono; - } }); - __exportStar(require_types(), exports); - exports.default = singleton_1.ono; - if (typeof module2 === "object" && typeof module2.exports === "object") { - module2.exports = Object.assign(module2.exports.default, module2.exports); - } } }); // src/action/index.ts -var actionsCore = __toESM(require_core()); +var import_core2 = __toESM(require_core()); + +// src/options.ts +var ACCESS_PUBLIC = "public"; +var ACCESS_RESTRICTED = "restricted"; +var STRATEGY_UPGRADE = "upgrade"; +var STRATEGY_ALL = "all"; + +// src/errors.ts +var import_node_os = __toESM(require("node:os")); +var InvalidPackageError = class extends TypeError { + constructor(value) { + super( + `Package must be a directory or package.json file, got "${String(value)}"` + ); + this.name = "PackageJsonReadError"; + } +}; +var PackageJsonReadError = class extends Error { + constructor(manifestPath, originalError) { + const message = [ + `Could not read package.json at ${manifestPath}`, + originalError instanceof Error ? originalError.message : "" + ].join(import_node_os.default.EOL); + super(message); + this.name = "PackageJsonReadError"; + } +}; +var PackageJsonParseError = class extends SyntaxError { + constructor(manifestPath, originalError) { + const message = [ + `Invalid JSON, could not parse package.json at ${manifestPath}`, + originalError instanceof Error ? originalError.message : "" + ].join(import_node_os.default.EOL); + super(message); + this.name = "PackageJsonParseError"; + } +}; +var InvalidPackageNameError = class extends TypeError { + constructor(value) { + super(`Package name must be a string, got "${String(value)}"`); + this.name = "InvalidPackageNameError"; + } +}; +var InvalidPackageVersionError = class extends TypeError { + constructor(value) { + super(`Package version must be a string, got "${String(value)}"`); + this.name = "InvalidPackageVersionError"; + } +}; +var InvalidPackagePublishConfigError = class extends TypeError { + constructor(value) { + super(`Publish config must be an object, got "${String(value)}"`); + this.name = "InvalidPackagePublishConfigError"; + } +}; +var InvalidRegistryUrlError = class extends TypeError { + constructor(value) { + super(`Registry URL invalid, got "${String(value)}"`); + this.name = "InvalidRegistryUrlError"; + } +}; +var InvalidTokenError = class extends TypeError { + constructor() { + super("Token must be a non-empty string."); + this.name = "InvalidTokenError"; + } +}; +var InvalidAccessError = class extends TypeError { + constructor(value) { + super( + `Access must be "${ACCESS_PUBLIC}" or "${ACCESS_RESTRICTED}", got "${String( + value + )}".` + ); + this.name = "InvalidAccessError"; + } +}; +var InvalidStrategyError = class extends TypeError { + constructor(value) { + super( + `Strategy must be "${STRATEGY_UPGRADE}" or "${STRATEGY_ALL}", got "${String( + value + )}".` + ); + this.name = "InvalidStrategyError"; + } +}; // src/read-manifest.ts var import_promises = __toESM(require("node:fs/promises")); var import_node_path = __toESM(require("node:path")); -var import_ono = __toESM(require_cjs()); +var import_semver = __toESM(require_semver2()); +var SCOPE_RE = /^(@.+)\/.+$/u; +var MANIFEST_BASENAME = "package.json"; +var isManifest = (name) => { + return typeof name === "string" && import_node_path.default.basename(name) === MANIFEST_BASENAME; +}; +var isDirectory = (name) => { + return typeof name === "string" && import_node_path.default.extname(name) === ""; +}; +var isVersion = (version2) => { + return (0, import_semver.valid)(version2) !== null; +}; async function readManifest(packagePath) { - let manifestPath = packagePath; - if (!manifestPath) { + var _a; + let packageSpec; + let manifestPath; + if (!packagePath) { + packageSpec = ""; manifestPath = "package.json"; - } else if (import_node_path.default.extname(manifestPath) === "") { - manifestPath = import_node_path.default.join(manifestPath, "package.json"); + } else if (isManifest(packagePath)) { + packageSpec = import_node_path.default.dirname(packagePath); + manifestPath = packagePath; + } else if (isDirectory(packagePath)) { + packageSpec = packagePath; + manifestPath = import_node_path.default.join(packagePath, MANIFEST_BASENAME); + } else { + throw new InvalidPackageError(packagePath); } - let json; + let manifestContents; + let manifestJson; + let name; + let version2; + let publishConfig; try { - json = await import_promises.default.readFile(manifestPath, "utf8"); + manifestContents = await import_promises.default.readFile(manifestPath, "utf8"); } catch (error) { - throw (0, import_ono.ono)(error, `Unable to read ${manifestPath}`); + throw new PackageJsonReadError(manifestPath, error); } try { - const { name, version: version2 } = JSON.parse(json); - if (typeof name !== "string" || name.trim().length === 0) { - throw new TypeError("Invalid package name"); - } - if (typeof version2 !== "string" || version2.trim().length === 0) { - throw new TypeError("Invalid package version"); - } - return { name: name.trim(), version: version2.trim() }; + manifestJson = JSON.parse(manifestContents); + name = manifestJson.name; + version2 = manifestJson.version; + publishConfig = manifestJson.publishConfig ?? {}; } catch (error) { - throw (0, import_ono.ono)(error, `Unable to parse ${manifestPath}`); + throw new PackageJsonParseError(manifestPath, error); } -} - -// src/errors.ts -var InvalidRegistryUrlError = class extends TypeError { - constructor(value) { - super(`The given value "${String(value)}" is not a valid registry URL`); - this.name = "InvalidRegistryUrlError"; + if (typeof name !== "string" || name.length === 0) { + throw new InvalidPackageNameError(name); } -}; -var InvalidTokenError = class extends TypeError { - constructor() { - super("The given value [omitted for security] is not a valid token"); - this.name = "InvalidTokenError"; + if (!isVersion(version2)) { + throw new InvalidPackageVersionError(version2); } -}; + if (typeof publishConfig !== "object" || Array.isArray(publishConfig) || !publishConfig) { + throw new InvalidPackagePublishConfigError(publishConfig); + } + return { + packageSpec, + manifest: { name, version: version2, publishConfig, scope: (_a = SCOPE_RE.exec(name)) == null ? void 0 : _a[1] } + }; +} // src/normalize-options.ts -var DEFAULT_REGISTRY_URL = new URL("https://registry.npmjs.org/"); +var DEFAULT_REGISTRY = "https://registry.npmjs.org/"; var DEFAULT_TAG = "latest"; -var DEFAULT_ACCESS = "public"; -var DEFAULT_ACCESS_SCOPED = "restricted"; -var DEFAULT_STRATEGY = "upgrade"; -var setValue = (value, defaultValue) => ({ - value: value ?? defaultValue, - isDefault: value === void 0 || value === defaultValue -}); -var setUrlValue = (value, defaultValue) => ({ - value: value ?? defaultValue, - isDefault: value === void 0 || (value == null ? void 0 : value.href) === defaultValue.href -}); function normalizeOptions(options, manifest) { - let defaultRegistryUrl = DEFAULT_REGISTRY_URL; - let defaultTag = DEFAULT_TAG; - let defaultAccess = manifest.scope ? DEFAULT_ACCESS_SCOPED : DEFAULT_ACCESS; - let registryUrl; - if (options.registryUrl !== void 0) { - try { - registryUrl = new URL(options.registryUrl); - } catch { - throw new InvalidRegistryUrlError(options.registryUrl); + var _a, _b, _c; + const defaultTag = ((_a = manifest.publishConfig) == null ? void 0 : _a.tag) ?? DEFAULT_TAG; + const defaultRegistry = ((_b = manifest.publishConfig) == null ? void 0 : _b.registry) ?? DEFAULT_REGISTRY; + const defaultAccess = ((_c = manifest.publishConfig) == null ? void 0 : _c.access) ?? (manifest.scope === void 0 ? ACCESS_PUBLIC : void 0); + return { + authConfig: { + token: setValue(options.token, "", validateToken), + registry: setValue(options.registry, defaultRegistry, validateRegistry) + }, + publishConfig: { + tag: setValue(options.tag, defaultTag, validateTag), + access: setValue(options.access, defaultAccess, validateAccess), + dryRun: setValue(options.dryRun, false, validateDryRun), + strategy: setValue(options.strategy, STRATEGY_ALL, validateStrategy) } - } - if (options.token !== void 0 && typeof options.token !== "string") { - throw new InvalidTokenError(); - } - const authConfig = { - token: { value: options.token, isDefault: false }, - registryUrl: setUrlValue(registryUrl, defaultRegistryUrl) - }; - const publishConfig = { - packageSpec: setValue(void 0, ""), - tag: setValue(void 0, defaultTag), - access: setValue(void 0, defaultAccess), - dryRun: setValue(void 0, false), - strategy: setValue(void 0, DEFAULT_STRATEGY) }; - return { authConfig, publishConfig }; } +var setValue = (value, defaultValue, validate2 = (_) => _) => ({ + value: validate2(value ?? defaultValue), + isDefault: value === void 0 +}); +var validateToken = (value) => { + if (typeof value === "string" && value.length > 0) { + return value; + } + throw new InvalidTokenError(); +}; +var validateRegistry = (value) => { + try { + return new URL(value); + } catch { + throw new InvalidRegistryUrlError(value); + } +}; +var validateTag = (value) => { + return value; +}; +var validateDryRun = (value) => { + return value; +}; +var validateAccess = (value) => { + if (value === void 0 || value === ACCESS_PUBLIC || value === ACCESS_RESTRICTED) { + return value; + } + throw new InvalidAccessError(value); +}; +var validateStrategy = (value) => { + if (value === STRATEGY_ALL || value === STRATEGY_UPGRADE) { + return value; + } + throw new InvalidStrategyError(value); +}; -// src/npm/use-npm-env.ts +// src/npm/use-npm-environment.ts var import_promises2 = __toESM(require("node:fs/promises")); -var import_node_os = __toESM(require("node:os")); +var import_node_os2 = __toESM(require("node:os")); var import_node_path2 = __toESM(require("node:path")); +async function useNpmEnvironment(auth, task) { + const { registry, token } = auth; + const npmrcDirectory = await import_promises2.default.mkdtemp( + import_node_path2.default.join(import_node_os2.default.tmpdir(), "npm-publish-") + ); + const npmrc = import_node_path2.default.join(npmrcDirectory, ".npmrc"); + const config = [ + "; created by jsdevtools/npm-publish", + `//${registry.value.hostname}/:authToken=\${NODE_AUTH_TOKEN}`, + registry.isDefault ? "" : `registry=${registry.value.href}`, + "" + ].join(import_node_os2.default.EOL); + await import_promises2.default.writeFile(npmrc, config, "utf8"); + try { + return await task({ + NODE_AUTH_TOKEN: token.value, + npm_config_userconfig: npmrc + }); + } finally { + await import_promises2.default.rm(npmrcDirectory, { force: true, recursive: true }); + } +} // src/npm/call-npm-cli.ts var import_node_child_process = __toESM(require("node:child_process")); -var execProcess = (command, env = {}) => { - const { - NODE_ENV: _NODE_ENV, - NODE_OPTIONS: _NODE_OPTIONS, - ...processEnv - } = process.env; +var JSON_MATCH_RE = /(\{[\s\S]*\})/mu; +var execProcess = (command, environment = {}) => { return new Promise((resolve) => { import_node_child_process.default.exec( command, - { env: { ...processEnv, ...env } }, - (error, stdout) => resolve({ stdout: stdout.trim(), error }) + { env: { ...process.env, ...environment } }, + (error, stdout, stderr) => { + return resolve({ stdout: stdout.trim(), stderr: stderr.trim(), error }); + } ); }); }; -var parseJson = (value) => { - try { - return JSON.parse(value); - } catch { - return void 0; +var parseJson = (...values) => { + var _a; + for (const value of values) { + const jsonValue = (_a = JSON_MATCH_RE.exec(value)) == null ? void 0 : _a[1]; + if (jsonValue) { + try { + return JSON.parse(jsonValue); + } catch { + return void 0; + } + } } + return void 0; }; -async function callNpmCli(command, args, options = {}) { +async function callNpmCli(command, cliArguments, options = {}) { var _a, _b; - const { stdout, error } = await execProcess( - ["npm", command, "--ignore-scripts", "--json", ...args].join(" "), - options == null ? void 0 : options.env + const { stdout, stderr, error } = await execProcess( + ["npm", command, "--ignore-scripts", "--json", ...cliArguments].join(" "), + options.environment ); if (error) { - const errorPayload = parseJson(stdout); + const errorPayload = parseJson( + stdout, + stderr + ); const errorCode = (_b = (_a = errorPayload == null ? void 0 : errorPayload.error) == null ? void 0 : _a.code) == null ? void 0 : _b.toLowerCase(); if (typeof errorCode === "string" && options.ifError && errorCode in options.ifError) { return options.ifError[errorCode]; @@ -2694,82 +4887,79 @@ async function callNpmCli(command, args, options = {}) { return parseJson(stdout) ?? stdout; } -// src/npm/use-npm-env.ts -async function useNpmEnv(auth, task) { - const { registryUrl, token } = auth; - const tempDir = await import_promises2.default.mkdtemp(import_node_path2.default.join(import_node_os.default.tmpdir(), "npm-publish-")); - const tempConfigFile = import_node_path2.default.join(tempDir, ".npmrc"); - const userConfigFile = await callNpmCli("config", ["get", "userconfig"]); - const userConfig = await import_promises2.default.readFile(userConfigFile, "utf8").catch((error) => { - if (error.code === "ENOENT") - return ""; - throw error; - }); - const config = [ - `; copied from ${userConfig}`, - userConfig, - "; added by jsdevtools/npm-publish", - `registry=${registryUrl.value.href}`, - `//${registryUrl.value.hostname}/:authToken=\${NODE_AUTH_TOKEN}`, - "" - ].join(import_node_os.default.EOL); - const env = { npm_config_userconfig: tempConfigFile }; - if (token.value) { - env.NODE_AUTH_TOKEN = token.value; +// src/npm/get-publish-arguments.ts +function getPublishArguments(packageSpec, config) { + const { tag, access, dryRun } = config; + const publishArguments = []; + if (packageSpec.length > 0) { + publishArguments.push(packageSpec); } - await import_promises2.default.writeFile(tempConfigFile, config, "utf8"); - try { - return await task(env); - } finally { - await import_promises2.default.rm(tempDir, { force: true, recursive: true }); + if (!tag.isDefault) { + publishArguments.push("--tag", tag.value); } -} - -// src/npm/get-publish-args.ts -function getPublishArgs(config) { - const { packageSpec, tag, access, dryRun } = config; - return [ - packageSpec.value, - "--tag", - tag.value, - "--access", - access.value, - "--dry-run", - JSON.stringify(dryRun.value) - ]; + if (!access.isDefault && access.value) { + publishArguments.push("--access", access.value); + } + if (!dryRun.isDefault) { + publishArguments.push("--dry-run", JSON.stringify(dryRun.value)); + } + return publishArguments; } // src/npm/index.ts async function getVersions(packageName, authConfig) { - return useNpmEnv(authConfig, (env) => { + return useNpmEnvironment(authConfig, (environment) => { return callNpmCli( "view", [packageName, "dist-tags", "versions"], - { env, ifError: { e404: { "dist-tags": {}, versions: [] } } } + { environment, ifError: { e404: { "dist-tags": {}, versions: [] } } } ); }); } -async function publish(publishConfig, authConfig) { - const publishArgs = getPublishArgs(publishConfig); - return useNpmEnv(authConfig, (env) => { - return callNpmCli("publish", publishArgs, { env }); +async function publish(packageSpec, publishConfig, authConfig) { + const publishArguments = getPublishArguments(packageSpec, publishConfig); + return useNpmEnvironment(authConfig, (environment) => { + return callNpmCli("publish", publishArguments, { + environment + }); }); } // src/compare-versions.ts -function compareVersions(versions, publishConfig) { - throw new Error("ah"); +var import_semver2 = __toESM(require_semver2()); +var INITIAL = "initial"; +var DIFFERENT = "different"; +function compareVersions(version2, publishedVersions, publishConfig) { + const { versions: existingVersions, "dist-tags": tags } = publishedVersions; + const { strategy, tag: publishTag } = publishConfig; + const previousVersion = (0, import_semver2.valid)(tags[publishTag.value]) ?? void 0; + const isUnique = !existingVersions.includes(version2); + let releaseType; + if (isUnique) { + if (!previousVersion) { + releaseType = INITIAL; + } else if ((0, import_semver2.gt)(version2, previousVersion)) { + releaseType = (0, import_semver2.diff)(version2, previousVersion) ?? void 0; + } else if (strategy.value === STRATEGY_ALL) { + releaseType = DIFFERENT; + } + } + return { releaseType, previousVersion }; } // src/npm-publish.ts async function npmPublish(options) { - const manifest = await readManifest(options.package); + const { packageSpec, manifest } = await readManifest(options.package); const { authConfig, publishConfig } = normalizeOptions(options, manifest); const publishedVersions = await getVersions(manifest.name, authConfig); - const versionComparison = compareVersions(publishedVersions, publishConfig); + const versionComparison = compareVersions( + manifest.version, + publishedVersions, + publishConfig + ); let publishResult; if (versionComparison.releaseType !== void 0) { - publishResult = await publish(publishConfig, authConfig); + publishResult = await publish(packageSpec, publishConfig, authConfig); } return { id: publishResult == null ? void 0 : publishResult.id, @@ -2777,79 +4967,56 @@ async function npmPublish(options) { version: manifest.version, releaseType: versionComparison.releaseType, previousVersion: versionComparison.previousVersion, + registry: authConfig.registry.value, tag: publishConfig.tag.value, access: publishConfig.access.value, - dryRun: publishConfig.dryRun.value, - registryUrl: authConfig.registryUrl.value + strategy: publishConfig.strategy.value, + dryRun: publishConfig.dryRun.value }; } -// src/action/index.ts -async function main() { - var _a; - try { - process.on("uncaughtException", errorHandler); - process.on("unhandledRejection", errorHandler); - const options = { - token: getInput2("token", true), - package: getInput2("package"), - registryUrl: getInput2("registryUrl"), - tag: getInput2("tag"), - access: getInput2("access"), - strategy: getInput2("strategy"), - dryRun: ((_a = getInput2("dry-run")) == null ? void 0 : _a.toLowerCase()) === "true" - }; - let results = await npmPublish(options); - if (!results.releaseType) { - console.log( - ` -\u{1F4E6} ${results.name} v${results.version} is already published to ${results.registryUrl}` - ); - } - if (results.releaseType === "lower") { - console.log( - ` -\u{1F4E6} ${results.name} v${results.version} is lower than the version published to ${results.registryUrl}` - ); - } else if (results.dryRun) { - console.log( - ` -\u{1F4E6} ${results.name} v${results.version} was NOT actually published to ${results.registryUrl} (dry run)` - ); - } else { - console.log( - ` -\u{1F4E6} Successfully published ${results.name} v${results.version} to ${results.registryUrl}` - ); - } - setOutput2("id", results.id); - setOutput2("name", results.name); - setOutput2("version", results.version); - setOutput2("release-type", results.releaseType); - setOutput2("previous-version", results.previousVersion); - setOutput2("tag", results.tag); - setOutput2("access", results.access); - setOutput2("registry-url", results.registryUrl); - setOutput2("dry-run", results.dryRun); - } catch (error) { - errorHandler(error); - } +// src/action/core.ts +var import_core = __toESM(require_core()); +function getInput(name) { + const inputString = (0, import_core.getInput)(name); + return inputString.length > 0 ? inputString : void 0; } -function getInput2(name, required) { - const value = actionsCore.getInput(name, { required }); - return value === "" ? void 0 : value; +function getRequiredSecretInput(name) { + const inputString = (0, import_core.getInput)(name, { required: true }); + (0, import_core.setSecret)(inputString); + return inputString; } -function setOutput2(...args) { - if (process.env.NODE_ENV === "test") { - console.log(`TEST::set-output name=${args[0]}::${args[1]}`); - return; - } - return actionsCore.setOutput(...args); +function getBooleanInput(name) { + return (0, import_core.getInput)(name) === "true"; +} +function setOutput(name, value, defaultValue) { + (0, import_core.setOutput)(name, value ?? defaultValue); } -function errorHandler(error) { - let message = error.stack || error.message || String(error); - actionsCore.setFailed(message); - process.exit(); + +// src/action/run.ts +async function run() { + const options = { + token: getRequiredSecretInput("token"), + registry: getInput("registry"), + package: getInput("package"), + tag: getInput("tag"), + access: getInput("access"), + strategy: getInput("strategy"), + dryRun: getBooleanInput("dry-run") + }; + const results = await npmPublish(options); + setOutput("id", results.id, ""); + setOutput("name", results.name); + setOutput("version", results.version); + setOutput("type", results.releaseType, ""); + setOutput("old-version", results.previousVersion, ""); + setOutput("registry", results.registry.href); + setOutput("tag", results.tag); + setOutput("access", results.access, "default"); + setOutput("strategy", results.strategy); + setOutput("dry-run", results.dryRun); } -main(); + +// src/action/index.ts +run().catch((error) => (0, import_core2.setFailed)(error)); //# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map index b0732a2..35e0137 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1,7 +1,7 @@ { "version": 3, - "sources": ["../node_modules/@actions/core/src/utils.ts", "../node_modules/@actions/core/src/command.ts", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js", "../node_modules/@actions/core/src/file-command.ts", "../node_modules/@actions/http-client/src/proxy.ts", "../node_modules/tunnel/lib/tunnel.js", "../node_modules/tunnel/index.js", "../node_modules/@actions/http-client/src/index.ts", "../node_modules/@actions/http-client/src/auth.ts", "../node_modules/@actions/core/src/oidc-utils.ts", "../node_modules/@actions/core/src/summary.ts", "../node_modules/@actions/core/src/path-utils.ts", "../node_modules/@actions/core/src/core.ts", "../node_modules/@jsdevtools/ono/src/to-json.ts", "../node_modules/@jsdevtools/ono/src/isomorphic.node.ts", "../node_modules/@jsdevtools/ono/src/stack.ts", "../node_modules/@jsdevtools/ono/src/extend-error.ts", "../node_modules/@jsdevtools/ono/src/normalize.ts", "../node_modules/@jsdevtools/ono/src/constructor.ts", "../node_modules/@jsdevtools/ono/src/singleton.ts", "../node_modules/@jsdevtools/ono/src/types.ts", "../node_modules/@jsdevtools/ono/src/index.ts", "../src/action/index.ts", "../src/read-manifest.ts", "../src/errors.ts", "../src/normalize-options.ts", "../src/npm/use-npm-env.ts", "../src/npm/call-npm-cli.ts", "../src/npm/get-publish-args.ts", "../src/npm/index.ts", "../src/compare-versions.ts", "../src/npm-publish.ts"], - "sourcesContent": [null, null, "import crypto from 'crypto';\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\nexport default function rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n crypto.randomFillSync(rnds8Pool);\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}", "export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;", "import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;", "import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;", "import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;", "import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;", "import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}", "import crypto from 'crypto';\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('md5').update(bytes).digest();\n}\n\nexport default md5;", "import v35 from './v35.js';\nimport md5 from './md5.js';\nconst v3 = v35('v3', 0x30, md5);\nexport default v3;", "import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;", "import crypto from 'crypto';\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('sha1').update(bytes).digest();\n}\n\nexport default sha1;", "import v35 from './v35.js';\nimport sha1 from './sha1.js';\nconst v5 = v35('v5', 0x50, sha1);\nexport default v5;", "export default '00000000-0000-0000-0000-000000000000';", "import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;", "export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';", null, null, "'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n", "module.exports = require('./lib/tunnel');\n", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "import * as actionsCore from \"@actions/core\";\nimport { npmPublish } from \"../npm-publish\";\nimport type { Access, Options, Strategy } from \"../options\";\n\n/**\n * The main entry point of the GitHub Action\n *\n * @internal\n */\nasync function main(): Promise {\n try {\n // Setup global error handlers\n process.on(\"uncaughtException\", errorHandler);\n process.on(\"unhandledRejection\", errorHandler);\n\n // Get the GitHub Actions input options\n const options: Options = {\n token: getInput(\"token\", true),\n package: getInput(\"package\"),\n registryUrl: getInput(\"registryUrl\"),\n tag: getInput(\"tag\"),\n access: getInput(\"access\"),\n strategy: getInput(\"strategy\"),\n dryRun: getInput(\"dry-run\")?.toLowerCase() === \"true\",\n };\n\n // Publish to NPM\n let results = await npmPublish(options);\n\n if (!results.releaseType) {\n console.log(\n `\\n\uD83D\uDCE6 ${results.name} v${results.version} is already published to ${results.registryUrl}`\n );\n }\n if (results.releaseType === \"lower\") {\n console.log(\n `\\n\uD83D\uDCE6 ${results.name} v${results.version} is lower than the version published to ${results.registryUrl}`\n );\n } else if (results.dryRun) {\n console.log(\n `\\n\uD83D\uDCE6 ${results.name} v${results.version} was NOT actually published to ${results.registryUrl} (dry run)`\n );\n } else {\n console.log(\n `\\n\uD83D\uDCE6 Successfully published ${results.name} v${results.version} to ${results.registryUrl}`\n );\n }\n\n // Set the GitHub Actions output variables\n setOutput(\"id\", results.id);\n setOutput(\"name\", results.name);\n setOutput(\"version\", results.version);\n setOutput(\"release-type\", results.releaseType);\n setOutput(\"previous-version\", results.previousVersion);\n setOutput(\"tag\", results.tag);\n setOutput(\"access\", results.access);\n setOutput(\"registry-url\", results.registryUrl);\n setOutput(\"dry-run\", results.dryRun);\n } catch (error) {\n errorHandler(error as Error);\n }\n}\n\n/**\n * Get input.\n */\n\nfunction getInput(\n name: string,\n required?: TRequired\n): TRequired extends true ? ReturnT : ReturnT | undefined {\n const value = actionsCore.getInput(name, { required });\n return value === \"\" ? undefined : (value as any);\n}\n\n/**\n * Set output with logging to stdout for test support\n */\nfunction setOutput(...args: Parameters) {\n if (process.env.NODE_ENV === \"test\") {\n console.log(`TEST::set-output name=${args[0]}::${args[1]}`);\n return;\n }\n return actionsCore.setOutput(...args);\n}\n\n/**\n * Prints errors to the GitHub Actions console\n */\nfunction errorHandler(error: Error): void {\n let message = error.stack || error.message || String(error);\n actionsCore.setFailed(message);\n process.exit();\n}\n\n/**\n * Prints debug logs to the GitHub Actions console\n */\n// function debugHandler(message: string, data?: object) {\n// if (data) {\n// message += \"\\n\" + JSON.stringify(data, undefined, 2);\n// }\n\n// actionsCore.debug(message);\n// }\n\n// eslint-disable-next-line @typescript-eslint/no-floating-promises\nmain();\n", "import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { ono } from \"@jsdevtools/ono\";\n\n/**\n * A package manifest (package.json)\n *\n * @internal\n */\nexport interface Manifest {\n name: string;\n version: string;\n scope?: string;\n}\n\n/**\n * Reads the package manifest (package.json) and returns its parsed contents.\n *\n * @param packagePath The path to the package being published.\n * @returns The parsed package metadata.\n */\nexport async function readManifest(packagePath?: string): Promise {\n let manifestPath = packagePath;\n\n if (!manifestPath) {\n manifestPath = \"package.json\";\n } else if (path.extname(manifestPath) === \"\") {\n manifestPath = path.join(manifestPath, \"package.json\");\n }\n\n let json: string;\n\n try {\n json = await fs.readFile(manifestPath, \"utf8\");\n } catch (error) {\n throw ono(error, `Unable to read ${manifestPath}`);\n }\n\n try {\n const { name, version } = JSON.parse(json) as Record;\n\n if (typeof name !== \"string\" || name.trim().length === 0) {\n throw new TypeError(\"Invalid package name\");\n }\n\n if (typeof version !== \"string\" || version.trim().length === 0) {\n throw new TypeError(\"Invalid package version\");\n }\n\n return { name: name.trim(), version: version.trim() };\n } catch (error) {\n throw ono(error, `Unable to parse ${manifestPath}`);\n }\n}\n", "export class NpmPublishError extends Error {\n public originalError: Error | undefined;\n\n public constructor(message: string, originalError?: Error) {\n if (originalError) {\n super(`${message}\\n${originalError.message}`);\n } else {\n super(message);\n }\n\n this.name = \"NpmPublishError\";\n this.originalError = originalError;\n }\n}\n\nexport class InvalidRegistryUrlError extends TypeError {\n public constructor(value: unknown) {\n super(`The given value \"${String(value)}\" is not a valid registry URL`);\n this.name = \"InvalidRegistryUrlError\";\n }\n}\n\nexport class InvalidTokenError extends TypeError {\n public constructor() {\n super(\"The given value [omitted for security] is not a valid token\");\n this.name = \"InvalidTokenError\";\n }\n}\n", "import type { Options, Access, Strategy } from \"./options\";\nimport type { Manifest } from \"./read-manifest\";\nimport * as errors from \"./errors\";\n\nconst DEFAULT_REGISTRY_URL = new URL(\"https://registry.npmjs.org/\");\nconst DEFAULT_TAG = \"latest\";\nconst DEFAULT_ACCESS = \"public\";\nconst DEFAULT_ACCESS_SCOPED = \"restricted\";\nconst DEFAULT_STRATEGY = \"upgrade\";\n\n/**\n * Normalized and sanitized auth and publish configurations.\n */\nexport interface NormalizedOptions {\n authConfig: AuthConfig;\n publishConfig: PublishConfig;\n}\n\ninterface ConfigValue {\n value: TValue;\n isDefault: boolean;\n}\n\n/**\n * Normalized and sanitized auth configuration.\n */\nexport interface AuthConfig {\n registryUrl: ConfigValue;\n token: ConfigValue;\n}\n\n/**\n * Normalized and sanitized publish configuration.\n */\nexport interface PublishConfig {\n packageSpec: ConfigValue;\n tag: ConfigValue;\n access: ConfigValue;\n dryRun: ConfigValue;\n strategy: ConfigValue;\n}\n\nconst setValue = (\n value: T | undefined,\n defaultValue: T\n): ConfigValue => ({\n value: value ?? defaultValue,\n isDefault: value === undefined || value === defaultValue,\n});\n\nconst setUrlValue = (\n value: URL | undefined,\n defaultValue: URL\n): ConfigValue => ({\n value: value ?? defaultValue,\n isDefault: value === undefined || value?.href === defaultValue.href,\n});\n\n/**\n * Normalizes and sanitizes options, and fills-in any default values.\n */\nexport function normalizeOptions(\n options: Options,\n manifest: Manifest\n): NormalizedOptions {\n let defaultRegistryUrl = DEFAULT_REGISTRY_URL;\n let defaultTag = DEFAULT_TAG;\n let defaultAccess: Access = manifest.scope\n ? DEFAULT_ACCESS_SCOPED\n : DEFAULT_ACCESS;\n\n let registryUrl;\n\n if (options.registryUrl !== undefined) {\n try {\n registryUrl = new URL(options.registryUrl);\n } catch {\n throw new errors.InvalidRegistryUrlError(options.registryUrl);\n }\n }\n\n if (options.token !== undefined && typeof options.token !== \"string\") {\n throw new errors.InvalidTokenError();\n }\n\n const authConfig: AuthConfig = {\n token: { value: options.token, isDefault: false },\n registryUrl: setUrlValue(registryUrl, defaultRegistryUrl),\n };\n\n const publishConfig: PublishConfig = {\n packageSpec: setValue(undefined, \"\"),\n tag: setValue(undefined, defaultTag),\n access: setValue(undefined, defaultAccess),\n dryRun: setValue(undefined, false),\n strategy: setValue(undefined, DEFAULT_STRATEGY),\n };\n\n return { authConfig, publishConfig };\n}\n", "import fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\nimport type { AuthConfig } from \"../normalize-options\";\nimport { callNpmCli, type NpmCliEnv } from \"./call-npm-cli\";\n\nexport type NpmCliTask = (env: NpmCliEnv) => Promise;\n\n/**\n * Create a temporary .npmrc file with the given auth token,\n * and call a task with env vars set to use that .npmrc.\n *\n * @param auth Registry and token.\n * @param task A function called with the configured environment.\n * After the function resolves, the temporary .npmrc file will be removed.\n * @returns The resolved value of `task`\n */\nexport async function useNpmEnv(\n auth: AuthConfig,\n task: NpmCliTask\n): Promise {\n const { registryUrl, token } = auth;\n const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), \"npm-publish-\"));\n const tempConfigFile = path.join(tempDir, \".npmrc\");\n const userConfigFile = await callNpmCli(\"config\", [\"get\", \"userconfig\"]);\n\n const userConfig = await fs\n .readFile(userConfigFile, \"utf8\")\n .catch((error: NodeJS.ErrnoException) => {\n if (error.code === \"ENOENT\") return \"\";\n throw error;\n });\n\n const config = [\n `; copied from ${userConfig}`,\n userConfig,\n \"; added by jsdevtools/npm-publish\",\n `registry=${registryUrl.value.href}`,\n `//${registryUrl.value.hostname}/:authToken=\\${NODE_AUTH_TOKEN}`,\n \"\",\n ].join(os.EOL);\n\n const env: NpmCliEnv = { npm_config_userconfig: tempConfigFile };\n\n if (token.value) {\n env.NODE_AUTH_TOKEN = token.value;\n }\n\n await fs.writeFile(tempConfigFile, config, \"utf8\");\n\n try {\n return await task(env);\n } finally {\n await fs.rm(tempDir, { force: true, recursive: true });\n }\n}\n", "import childProcess from \"node:child_process\";\n\nexport type NpmCliEnv = Record;\n\nexport interface NpmCliOptions {\n env?: Record;\n ifError?: Record;\n}\n\nconst execProcess = (\n command: string,\n env: Record = {}\n): Promise<{ stdout: string; error: Error | null }> => {\n // strip Node.js environment and runtime options out of the call to NPM\n const {\n NODE_ENV: _NODE_ENV,\n NODE_OPTIONS: _NODE_OPTIONS,\n ...processEnv\n } = process.env;\n\n return new Promise((resolve) => {\n childProcess.exec(\n command,\n { env: { ...processEnv, ...env } },\n (error, stdout) => resolve({ stdout: stdout.trim(), error })\n );\n });\n};\n\nconst parseJson = (value: string): TParsed | undefined => {\n try {\n return JSON.parse(value) as TParsed;\n } catch {\n return undefined;\n }\n};\n\n/**\n * Call the NPM CLI in JSON mode.\n *\n * @param command The command of the NPM CLI to call\n * @param args Any arguments to send to the command\n * @param options Customize environment variables or add an error handler.\n * @returns The parsed JSON, or stdout if unparsable.\n */\nexport async function callNpmCli(\n command: string,\n args: string[],\n options: NpmCliOptions = {}\n): Promise {\n const { stdout, error } = await execProcess(\n [\"npm\", command, \"--ignore-scripts\", \"--json\", ...args].join(\" \"),\n options?.env\n );\n\n if (error) {\n const errorPayload = parseJson<{ error: { code?: string | null } }>(stdout);\n const errorCode = errorPayload?.error?.code?.toLowerCase();\n\n if (\n typeof errorCode === \"string\" &&\n options.ifError &&\n errorCode in options.ifError\n ) {\n return options.ifError[errorCode] as TReturn;\n }\n\n throw error;\n }\n\n return parseJson(stdout) ?? (stdout as unknown as TReturn);\n}\n", "import type { PublishConfig } from \"../normalize-options\";\n\n/**\n * Given a publish configuration, get the NPM CLI publish arguments.\n *\n * @param config Publish configuration\n * @returns Arguments to pass to the NPM CLI\n */\nexport function getPublishArgs(config: PublishConfig): string[] {\n const { packageSpec, tag, access, dryRun } = config;\n\n return [\n packageSpec.value,\n \"--tag\",\n tag.value,\n \"--access\",\n access.value,\n \"--dry-run\",\n JSON.stringify(dryRun.value),\n ];\n}\n", "import type { AuthConfig, PublishConfig } from \"../normalize-options\";\nimport { useNpmEnv } from \"./use-npm-env\";\nimport { callNpmCli } from \"./call-npm-cli\";\nimport { getPublishArgs } from \"./get-publish-args\";\n\nexport interface VersionsResult {\n \"dist-tags\": Record;\n versions: string[];\n}\n\nexport interface PublishResult {\n id: string;\n}\n\n/**\n * Get a package's published versions.\n *\n * @param packageName The name of the package to get published versions for.\n * @param authConfig Registry and auth token.\n * @returns All published versions and tags.\n */\nexport async function getVersions(\n packageName: string,\n authConfig: AuthConfig\n): Promise {\n return useNpmEnv(authConfig, (env) => {\n return callNpmCli(\n \"view\",\n [packageName, \"dist-tags\", \"versions\"],\n { env, ifError: { e404: { \"dist-tags\": {}, versions: [] } } }\n );\n });\n}\n\n/**\n * Publish a package.\n *\n * @param publishConfig Publish options.\n * @returns Release metadata.\n */\nexport async function publish(\n publishConfig: PublishConfig,\n authConfig: AuthConfig\n): Promise {\n const publishArgs = getPublishArgs(publishConfig);\n\n return useNpmEnv(authConfig, (env) => {\n return callNpmCli(\"publish\", publishArgs, { env });\n });\n}\n", "import type { ReleaseType as SemverReleaseType } from \"semver\";\n\nimport type { PublishConfig } from \"./normalize-options\";\nimport type { VersionsResult } from \"./npm\";\n\nexport type ReleaseType = SemverReleaseType | \"lower\";\n\nexport interface VersionComparison {\n releaseType: ReleaseType | undefined;\n previousVersion: string;\n}\n\nexport function compareVersions(\n versions: VersionsResult,\n publishConfig: PublishConfig\n): VersionComparison {\n void versions;\n void publishConfig;\n\n throw new Error(\"ah\");\n}\n", "import { readManifest } from \"./read-manifest\";\nimport { normalizeOptions } from \"./normalize-options\";\nimport { getVersions, publish } from \"./npm\";\nimport { compareVersions } from \"./compare-versions\";\nimport type { Options } from \"./options\";\nimport type { Results } from \"./results\";\n\n/**\n * Publishes a package to NPM, if its version has changed\n */\nexport async function npmPublish(options: Options): Promise {\n const manifest = await readManifest(options.package);\n const { authConfig, publishConfig } = normalizeOptions(options, manifest);\n const publishedVersions = await getVersions(manifest.name, authConfig);\n const versionComparison = compareVersions(publishedVersions, publishConfig);\n let publishResult;\n\n if (versionComparison.releaseType !== undefined) {\n publishResult = await publish(publishConfig, authConfig);\n }\n\n return {\n id: publishResult?.id,\n name: manifest.name,\n version: manifest.version,\n releaseType: versionComparison.releaseType,\n previousVersion: versionComparison.previousVersion,\n tag: publishConfig.tag.value,\n access: publishConfig.access.value,\n dryRun: publishConfig.dryRun.value,\n registryUrl: authConfig.registryUrl.value,\n };\n}\n"], - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,aAAgB,eAAe,OAAU;AACvC,UAAI,UAAU,QAAQ,UAAU,QAAW;AACzC,eAAO;iBACE,OAAO,UAAU,Y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M,QAAoB,qBAAS,MAAM,EAAE,SAAS,CAAC;AACrD,SAAO,UAAU,KAAK,SAAa;AACrC;AAKA,SAASC,cAAa,MAAgD;AACpE,MAAI,QAAQ,IAAI,aAAa,QAAQ;AACnC,YAAQ,IAAI,yBAAyB,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG;AAC1D;AAAA,EACF;AACA,SAAmB,sBAAU,GAAG,IAAI;AACtC;AAKA,SAAS,aAAa,OAAoB;AACxC,MAAI,UAAU,MAAM,SAAS,MAAM,WAAW,OAAO,KAAK;AAC1D,EAAY,sBAAU,OAAO;AAC7B,UAAQ,KAAK;AACf;AAcA,KAAK;", - "names": ["os", "crypto", "version", "URL", "crypto", "import_crypto", "crypto", "import_crypto", "fs", "os", "options", "socket", "require_tunnel", "module", "HttpCodes", "Headers", "MediaTypes", "path", "os", "path", "ExitCode", "getInput", "setOutput", "setFailed", "normalizeOptions", "ono", "ono", "module", "path", "fs", "version", "import_promises", "import_node_path", "childProcess", "fs", "path", "os", "getInput", "setOutput"] + "sources": ["../node_modules/@actions/core/src/utils.ts", "../node_modules/@actions/core/src/command.ts", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js", "../node_modules/@actions/core/src/file-command.ts", "../node_modules/@actions/http-client/src/proxy.ts", "../node_modules/tunnel/lib/tunnel.js", "../node_modules/tunnel/index.js", "../node_modules/@actions/http-client/src/index.ts", "../node_modules/@actions/http-client/src/auth.ts", "../node_modules/@actions/core/src/oidc-utils.ts", "../node_modules/@actions/core/src/summary.ts", "../node_modules/@actions/core/src/path-utils.ts", "../node_modules/@actions/core/src/core.ts", "../node_modules/semver/internal/constants.js", "../node_modules/semver/internal/debug.js", "../node_modules/semver/internal/re.js", "../node_modules/semver/internal/parse-options.js", "../node_modules/semver/internal/identifiers.js", "../node_modules/semver/classes/semver.js", "../node_modules/semver/functions/parse.js", "../node_modules/semver/functions/valid.js", "../node_modules/semver/functions/clean.js", "../node_modules/semver/functions/inc.js", "../node_modules/semver/functions/compare.js", "../node_modules/semver/functions/eq.js", "../node_modules/semver/functions/diff.js", "../node_modules/semver/functions/major.js", "../node_modules/semver/functions/minor.js", "../node_modules/semver/functions/patch.js", "../node_modules/semver/functions/prerelease.js", "../node_modules/semver/functions/rcompare.js", "../node_modules/semver/functions/compare-loose.js", "../node_modules/semver/functions/compare-build.js", "../node_modules/semver/functions/sort.js", "../node_modules/semver/functions/rsort.js", "../node_modules/semver/functions/gt.js", "../node_modules/semver/functions/lt.js", "../node_modules/semver/functions/neq.js", "../node_modules/semver/functions/gte.js", "../node_modules/semver/functions/lte.js", "../node_modules/semver/functions/cmp.js", "../node_modules/semver/functions/coerce.js", "../node_modules/semver/node_modules/yallist/iterator.js", "../node_modules/semver/node_modules/yallist/yallist.js", "../node_modules/semver/node_modules/lru-cache/index.js", "../node_modules/semver/classes/range.js", "../node_modules/semver/classes/comparator.js", "../node_modules/semver/functions/satisfies.js", "../node_modules/semver/ranges/to-comparators.js", "../node_modules/semver/ranges/max-satisfying.js", "../node_modules/semver/ranges/min-satisfying.js", "../node_modules/semver/ranges/min-version.js", "../node_modules/semver/ranges/valid.js", "../node_modules/semver/ranges/outside.js", "../node_modules/semver/ranges/gtr.js", "../node_modules/semver/ranges/ltr.js", "../node_modules/semver/ranges/intersects.js", "../node_modules/semver/ranges/simplify.js", "../node_modules/semver/ranges/subset.js", "../node_modules/semver/index.js", "../src/action/index.ts", "../src/options.ts", "../src/errors.ts", "../src/read-manifest.ts", "../src/normalize-options.ts", "../src/npm/use-npm-environment.ts", "../src/npm/call-npm-cli.ts", "../src/npm/get-publish-arguments.ts", "../src/npm/index.ts", "../src/compare-versions.ts", "../src/npm-publish.ts", "../src/action/core.ts", "../src/action/run.ts"], + "sourcesContent": [null, null, "import crypto from 'crypto';\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\nexport default function rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n crypto.randomFillSync(rnds8Pool);\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}", "export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;", "import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;", "import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;", "import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;", "import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;", "import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}", "import crypto from 'crypto';\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('md5').update(bytes).digest();\n}\n\nexport default md5;", "import v35 from './v35.js';\nimport md5 from './md5.js';\nconst v3 = v35('v3', 0x30, md5);\nexport default v3;", "import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;", "import crypto from 'crypto';\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('sha1').update(bytes).digest();\n}\n\nexport default sha1;", "import v35 from './v35.js';\nimport sha1 from './sha1.js';\nconst v5 = v35('v5', 0x50, sha1);\nexport default v5;", "export default '00000000-0000-0000-0000-000000000000';", "import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;", "export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';", null, null, "'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n", "module.exports = require('./lib/tunnel');\n", null, null, null, null, null, null, "// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n", "const debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n", "const { MAX_SAFE_COMPONENT_LENGTH } = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst src = exports.src = []\nconst t = exports.t = {}\nlet R = 0\n\nconst createToken = (name, value, isGlobal) => {\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '[0-9]+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', '\\\\d*[a-zA-Z-][a-zA-Z0-9-]*')\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+')\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCE', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n", "// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n", "const numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n", "const debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0)\n }\n }\n if (identifier) {\n const base = Number(identifierBase) ? 1 : 0\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, base]\n }\n } else {\n this.prerelease = [identifier, base]\n }\n }\n break\n\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.format()\n this.raw = this.version\n return this\n }\n}\n\nmodule.exports = SemVer\n", "const { MAX_LENGTH } = require('../internal/constants')\nconst SemVer = require('../classes/semver')\nconst parse = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n try {\n return new SemVer(version, options)\n } catch (er) {\n return null\n }\n}\n\nmodule.exports = parse\n", "const parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n", "const parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n", "const SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n", "const SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n", "const compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n", "const parse = require('./parse')\nconst eq = require('./eq')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1)\n const v2 = parse(version2)\n if (eq(v1, v2)) {\n return null\n } else {\n const hasPre = v1.prerelease.length || v2.prerelease.length\n const prefix = hasPre ? 'pre' : ''\n const defaultResult = hasPre ? 'prerelease' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n if (!v1.prerelease.length || !v2.prerelease.length) {\n if (v1.patch) {\n return 'patch'\n }\n if (v1.minor) {\n return 'minor'\n }\n if (v1.major) {\n return 'major'\n }\n }\n return defaultResult // may be undefined\n }\n}\nmodule.exports = diff\n", "const SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n", "const SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n", "const SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n", "const parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n", "const compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n", "const compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n", "const SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n", "const compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n", "const compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n", "const compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n", "const compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n", "const compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n", "const compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n", "const compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n", "const eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n", "const SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n let next\n while ((next = re[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n re[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)\n}\nmodule.exports = coerce\n", "'use strict'\nmodule.exports = function (Yallist) {\n Yallist.prototype[Symbol.iterator] = function* () {\n for (let walker = this.head; walker; walker = walker.next) {\n yield walker.value\n }\n }\n}\n", "'use strict'\nmodule.exports = Yallist\n\nYallist.Node = Node\nYallist.create = Yallist\n\nfunction Yallist (list) {\n var self = this\n if (!(self instanceof Yallist)) {\n self = new Yallist()\n }\n\n self.tail = null\n self.head = null\n self.length = 0\n\n if (list && typeof list.forEach === 'function') {\n list.forEach(function (item) {\n self.push(item)\n })\n } else if (arguments.length > 0) {\n for (var i = 0, l = arguments.length; i < l; i++) {\n self.push(arguments[i])\n }\n }\n\n return self\n}\n\nYallist.prototype.removeNode = function (node) {\n if (node.list !== this) {\n throw new Error('removing node which does not belong to this list')\n }\n\n var next = node.next\n var prev = node.prev\n\n if (next) {\n next.prev = prev\n }\n\n if (prev) {\n prev.next = next\n }\n\n if (node === this.head) {\n this.head = next\n }\n if (node === this.tail) {\n this.tail = prev\n }\n\n node.list.length--\n node.next = null\n node.prev = null\n node.list = null\n\n return next\n}\n\nYallist.prototype.unshiftNode = function (node) {\n if (node === this.head) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var head = this.head\n node.list = this\n node.next = head\n if (head) {\n head.prev = node\n }\n\n this.head = node\n if (!this.tail) {\n this.tail = node\n }\n this.length++\n}\n\nYallist.prototype.pushNode = function (node) {\n if (node === this.tail) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var tail = this.tail\n node.list = this\n node.prev = tail\n if (tail) {\n tail.next = node\n }\n\n this.tail = node\n if (!this.head) {\n this.head = node\n }\n this.length++\n}\n\nYallist.prototype.push = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n push(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.unshift = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n unshift(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.pop = function () {\n if (!this.tail) {\n return undefined\n }\n\n var res = this.tail.value\n this.tail = this.tail.prev\n if (this.tail) {\n this.tail.next = null\n } else {\n this.head = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.shift = function () {\n if (!this.head) {\n return undefined\n }\n\n var res = this.head.value\n this.head = this.head.next\n if (this.head) {\n this.head.prev = null\n } else {\n this.tail = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.forEach = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.head, i = 0; walker !== null; i++) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.next\n }\n}\n\nYallist.prototype.forEachReverse = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.prev\n }\n}\n\nYallist.prototype.get = function (n) {\n for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.next\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.getReverse = function (n) {\n for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.prev\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.map = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.head; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.next\n }\n return res\n}\n\nYallist.prototype.mapReverse = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.tail; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.prev\n }\n return res\n}\n\nYallist.prototype.reduce = function (fn, initial) {\n var acc\n var walker = this.head\n if (arguments.length > 1) {\n acc = initial\n } else if (this.head) {\n walker = this.head.next\n acc = this.head.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = 0; walker !== null; i++) {\n acc = fn(acc, walker.value, i)\n walker = walker.next\n }\n\n return acc\n}\n\nYallist.prototype.reduceReverse = function (fn, initial) {\n var acc\n var walker = this.tail\n if (arguments.length > 1) {\n acc = initial\n } else if (this.tail) {\n walker = this.tail.prev\n acc = this.tail.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = this.length - 1; walker !== null; i--) {\n acc = fn(acc, walker.value, i)\n walker = walker.prev\n }\n\n return acc\n}\n\nYallist.prototype.toArray = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.head; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.next\n }\n return arr\n}\n\nYallist.prototype.toArrayReverse = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.tail; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.prev\n }\n return arr\n}\n\nYallist.prototype.slice = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\n walker = walker.next\n }\n for (; walker !== null && i < to; i++, walker = walker.next) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.sliceReverse = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\n walker = walker.prev\n }\n for (; walker !== null && i > from; i--, walker = walker.prev) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.splice = function (start, deleteCount, ...nodes) {\n if (start > this.length) {\n start = this.length - 1\n }\n if (start < 0) {\n start = this.length + start;\n }\n\n for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\n walker = walker.next\n }\n\n var ret = []\n for (var i = 0; walker && i < deleteCount; i++) {\n ret.push(walker.value)\n walker = this.removeNode(walker)\n }\n if (walker === null) {\n walker = this.tail\n }\n\n if (walker !== this.head && walker !== this.tail) {\n walker = walker.prev\n }\n\n for (var i = 0; i < nodes.length; i++) {\n walker = insert(this, walker, nodes[i])\n }\n return ret;\n}\n\nYallist.prototype.reverse = function () {\n var head = this.head\n var tail = this.tail\n for (var walker = head; walker !== null; walker = walker.prev) {\n var p = walker.prev\n walker.prev = walker.next\n walker.next = p\n }\n this.head = tail\n this.tail = head\n return this\n}\n\nfunction insert (self, node, value) {\n var inserted = node === self.head ?\n new Node(value, null, node, self) :\n new Node(value, node, node.next, self)\n\n if (inserted.next === null) {\n self.tail = inserted\n }\n if (inserted.prev === null) {\n self.head = inserted\n }\n\n self.length++\n\n return inserted\n}\n\nfunction push (self, item) {\n self.tail = new Node(item, self.tail, null, self)\n if (!self.head) {\n self.head = self.tail\n }\n self.length++\n}\n\nfunction unshift (self, item) {\n self.head = new Node(item, null, self.head, self)\n if (!self.tail) {\n self.tail = self.head\n }\n self.length++\n}\n\nfunction Node (value, prev, next, list) {\n if (!(this instanceof Node)) {\n return new Node(value, prev, next, list)\n }\n\n this.list = list\n this.value = value\n\n if (prev) {\n prev.next = this\n this.prev = prev\n } else {\n this.prev = null\n }\n\n if (next) {\n next.prev = this\n this.next = next\n } else {\n this.next = null\n }\n}\n\ntry {\n // add if support for Symbol.iterator is present\n require('./iterator.js')(Yallist)\n} catch (er) {}\n", "'use strict'\n\n// A linked list to keep track of recently-used-ness\nconst Yallist = require('yallist')\n\nconst MAX = Symbol('max')\nconst LENGTH = Symbol('length')\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\nconst ALLOW_STALE = Symbol('allowStale')\nconst MAX_AGE = Symbol('maxAge')\nconst DISPOSE = Symbol('dispose')\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\nconst LRU_LIST = Symbol('lruList')\nconst CACHE = Symbol('cache')\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\n\nconst naiveLength = () => 1\n\n// lruList is a yallist where the head is the youngest\n// item, and the tail is the oldest. the list contains the Hit\n// objects as the entries.\n// Each Hit object has a reference to its Yallist.Node. This\n// never changes.\n//\n// cache is a Map (or PseudoMap) that matches the keys to\n// the Yallist.Node object.\nclass LRUCache {\n constructor (options) {\n if (typeof options === 'number')\n options = { max: options }\n\n if (!options)\n options = {}\n\n if (options.max && (typeof options.max !== 'number' || options.max < 0))\n throw new TypeError('max must be a non-negative number')\n // Kind of weird to have a default max of Infinity, but oh well.\n const max = this[MAX] = options.max || Infinity\n\n const lc = options.length || naiveLength\n this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\n this[ALLOW_STALE] = options.stale || false\n if (options.maxAge && typeof options.maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n this[MAX_AGE] = options.maxAge || 0\n this[DISPOSE] = options.dispose\n this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\n this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\n this.reset()\n }\n\n // resize the cache when the max changes.\n set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }\n get max () {\n return this[MAX]\n }\n\n set allowStale (allowStale) {\n this[ALLOW_STALE] = !!allowStale\n }\n get allowStale () {\n return this[ALLOW_STALE]\n }\n\n set maxAge (mA) {\n if (typeof mA !== 'number')\n throw new TypeError('maxAge must be a non-negative number')\n\n this[MAX_AGE] = mA\n trim(this)\n }\n get maxAge () {\n return this[MAX_AGE]\n }\n\n // resize the cache when the lengthCalculator changes.\n set lengthCalculator (lC) {\n if (typeof lC !== 'function')\n lC = naiveLength\n\n if (lC !== this[LENGTH_CALCULATOR]) {\n this[LENGTH_CALCULATOR] = lC\n this[LENGTH] = 0\n this[LRU_LIST].forEach(hit => {\n hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\n this[LENGTH] += hit.length\n })\n }\n trim(this)\n }\n get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n get length () { return this[LENGTH] }\n get itemCount () { return this[LRU_LIST].length }\n\n rforEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].tail; walker !== null;) {\n const prev = walker.prev\n forEachStep(this, fn, walker, thisp)\n walker = prev\n }\n }\n\n forEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].head; walker !== null;) {\n const next = walker.next\n forEachStep(this, fn, walker, thisp)\n walker = next\n }\n }\n\n keys () {\n return this[LRU_LIST].toArray().map(k => k.key)\n }\n\n values () {\n return this[LRU_LIST].toArray().map(k => k.value)\n }\n\n reset () {\n if (this[DISPOSE] &&\n this[LRU_LIST] &&\n this[LRU_LIST].length) {\n this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\n }\n\n this[CACHE] = new Map() // hash of items by key\n this[LRU_LIST] = new Yallist() // list of items in order of use recency\n this[LENGTH] = 0 // length of items in the list\n }\n\n dump () {\n return this[LRU_LIST].map(hit =>\n isStale(this, hit) ? false : {\n k: hit.key,\n v: hit.value,\n e: hit.now + (hit.maxAge || 0)\n }).toArray().filter(h => h)\n }\n\n dumpLru () {\n return this[LRU_LIST]\n }\n\n set (key, value, maxAge) {\n maxAge = maxAge || this[MAX_AGE]\n\n if (maxAge && typeof maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n\n const now = maxAge ? Date.now() : 0\n const len = this[LENGTH_CALCULATOR](value, key)\n\n if (this[CACHE].has(key)) {\n if (len > this[MAX]) {\n del(this, this[CACHE].get(key))\n return false\n }\n\n const node = this[CACHE].get(key)\n const item = node.value\n\n // dispose of the old one before overwriting\n // split out into 2 ifs for better coverage tracking\n if (this[DISPOSE]) {\n if (!this[NO_DISPOSE_ON_SET])\n this[DISPOSE](key, item.value)\n }\n\n item.now = now\n item.maxAge = maxAge\n item.value = value\n this[LENGTH] += len - item.length\n item.length = len\n this.get(key)\n trim(this)\n return true\n }\n\n const hit = new Entry(key, value, len, now, maxAge)\n\n // oversized objects fall out of cache automatically.\n if (hit.length > this[MAX]) {\n if (this[DISPOSE])\n this[DISPOSE](key, value)\n\n return false\n }\n\n this[LENGTH] += hit.length\n this[LRU_LIST].unshift(hit)\n this[CACHE].set(key, this[LRU_LIST].head)\n trim(this)\n return true\n }\n\n has (key) {\n if (!this[CACHE].has(key)) return false\n const hit = this[CACHE].get(key).value\n return !isStale(this, hit)\n }\n\n get (key) {\n return get(this, key, true)\n }\n\n peek (key) {\n return get(this, key, false)\n }\n\n pop () {\n const node = this[LRU_LIST].tail\n if (!node)\n return null\n\n del(this, node)\n return node.value\n }\n\n del (key) {\n del(this, this[CACHE].get(key))\n }\n\n load (arr) {\n // reset the cache\n this.reset()\n\n const now = Date.now()\n // A previous serialized cache has the most recent items first\n for (let l = arr.length - 1; l >= 0; l--) {\n const hit = arr[l]\n const expiresAt = hit.e || 0\n if (expiresAt === 0)\n // the item was created without expiration in a non aged cache\n this.set(hit.k, hit.v)\n else {\n const maxAge = expiresAt - now\n // dont add already expired items\n if (maxAge > 0) {\n this.set(hit.k, hit.v, maxAge)\n }\n }\n }\n }\n\n prune () {\n this[CACHE].forEach((value, key) => get(this, key, false))\n }\n}\n\nconst get = (self, key, doUse) => {\n const node = self[CACHE].get(key)\n if (node) {\n const hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n return undefined\n } else {\n if (doUse) {\n if (self[UPDATE_AGE_ON_GET])\n node.value.now = Date.now()\n self[LRU_LIST].unshiftNode(node)\n }\n }\n return hit.value\n }\n}\n\nconst isStale = (self, hit) => {\n if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n return false\n\n const diff = Date.now() - hit.now\n return hit.maxAge ? diff > hit.maxAge\n : self[MAX_AGE] && (diff > self[MAX_AGE])\n}\n\nconst trim = self => {\n if (self[LENGTH] > self[MAX]) {\n for (let walker = self[LRU_LIST].tail;\n self[LENGTH] > self[MAX] && walker !== null;) {\n // We know that we're about to delete this one, and also\n // what the next least recently used key will be, so just\n // go ahead and set it now.\n const prev = walker.prev\n del(self, walker)\n walker = prev\n }\n }\n}\n\nconst del = (self, node) => {\n if (node) {\n const hit = node.value\n if (self[DISPOSE])\n self[DISPOSE](hit.key, hit.value)\n\n self[LENGTH] -= hit.length\n self[CACHE].delete(hit.key)\n self[LRU_LIST].removeNode(node)\n }\n}\n\nclass Entry {\n constructor (key, value, length, now, maxAge) {\n this.key = key\n this.value = value\n this.length = length\n this.now = now\n this.maxAge = maxAge || 0\n }\n}\n\nconst forEachStep = (self, fn, node, thisp) => {\n let hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n hit = undefined\n }\n if (hit)\n fn.call(thisp, hit.value, hit.key, self)\n}\n\nmodule.exports = LRUCache\n", "// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.format()\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First, split based on boolean or ||\n this.raw = range\n this.set = range\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${range}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.format()\n }\n\n format () {\n this.range = this.set\n .map((comps) => {\n return comps.join(' ').trim()\n })\n .join('||')\n .trim()\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n range = range.trim()\n\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('lru-cache')\nconst cache = new LRU({ max: 1000 })\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) =>\n comp.trim().split(/\\s+/).map((c) => {\n return replaceTilde(c, options)\n }).join(' ')\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) =>\n comp.trim().split(/\\s+/).map((c) => {\n return replaceCaret(c, options)\n }).join(' ')\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map((c) => {\n return replaceXRange(c, options)\n }).join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp.trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return (`${from} ${to}`).trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n", "const ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n", "const Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n", "const Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n", "const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n", "const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n", "const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n", "const Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n", "const SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n", "// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n", "const outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n", "const Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n", "// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n", "const Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n", "// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n", "import { setFailed } from \"@actions/core\";\nimport { run } from \"./run.js\";\n\nrun().catch((error: Error) => setFailed(error));\n", "/**\n * The possible access levels for an NPM package\n */\nexport type Access = typeof ACCESS_PUBLIC | typeof ACCESS_RESTRICTED;\n\nexport const ACCESS_PUBLIC = \"public\";\nexport const ACCESS_RESTRICTED = \"restricted\";\n\n/**\n * Version check strategy.\n *\n * - `upgrade`: the package will only be published if its version\n * is higher than the existing version on the configured tag.\n * - `all`: the package will be published if its version\n * is not yet published, even if its lower that the existing tag.\n */\nexport type Strategy = typeof STRATEGY_UPGRADE | typeof STRATEGY_ALL;\n\nexport const STRATEGY_UPGRADE = \"upgrade\";\nexport const STRATEGY_ALL = \"all\";\n\n/**\n * A function that logs messages\n */\nexport type HandleLog = (message: string, data?: object) => void;\n\n/**\n * A level at which a log can occur.\n */\nexport type LogLevel = \"error\" | \"warn\" | \"info\" | \"debug\";\n\n/**\n * An object that can be used to log messages.\n */\nexport type Logger = Record;\n\n/**\n * Options that determine how/whether the package is published.\n */\nexport interface Options {\n /**\n * The NPM access token to use when publishing.\n */\n token: string;\n\n /**\n * The absolute or relative path of your package.\n *\n * Defaults to the package in the current working directory.\n */\n package?: string | undefined;\n\n /**\n * The NPM registry URL to use.\n *\n * Defaults to \"https://registry.npmjs.org/\".\n *\n * Can be overridden by the package.json's `publishConfig` field.\n */\n registry?: string | URL | undefined;\n\n /**\n * The tag to publish to.\n *\n * Defaults to \"latest\".\n *\n * Can be overridden by the package.json's `publishConfig` field.\n */\n tag?: string | undefined;\n\n /**\n * Package access.\n *\n * Determines whether the published package should be publicly visible,\n * or restricted to members of your NPM organization. This only applies\n * to scoped packages.\n *\n * Defaults to \"restricted\" for scoped packages, unless that package has been\n * previously published as `public`\n *\n * Can be overridden by the package.json's `publishConfig` field.\n */\n access?: Access | undefined;\n\n /**\n * Version check strategy.\n *\n * If \"upgrade\" (default), the package will only be published if its version\n * is higher than the existing version on the configured tag. If \"always\",\n * the package will be published if its version is simply not yet published.\n *\n * Defaults to `upgrade`.\n */\n strategy?: Strategy | undefined;\n\n /**\n * Pretend to publish, but don't actually upload to the registry.\n *\n * Defaults to `false`.\n */\n dryRun?: boolean | undefined;\n}\n", "import os from \"node:os\";\n\nimport {\n ACCESS_PUBLIC,\n ACCESS_RESTRICTED,\n STRATEGY_ALL,\n STRATEGY_UPGRADE,\n} from \"./options.js\";\n\nexport class NpmPublishError extends Error {\n public originalError: Error | undefined;\n\n public constructor(message: string, originalError?: Error) {\n if (originalError) {\n super(`${message}\\n${originalError.message}`);\n } else {\n super(message);\n }\n\n this.name = \"NpmPublishError\";\n this.originalError = originalError;\n }\n}\n\nexport class InvalidPackageError extends TypeError {\n public constructor(value: unknown) {\n super(\n `Package must be a directory or package.json file, got \"${String(value)}\"`\n );\n this.name = \"PackageJsonReadError\";\n }\n}\n\nexport class PackageJsonReadError extends Error {\n public constructor(manifestPath: string, originalError: unknown) {\n const message = [\n `Could not read package.json at ${manifestPath}`,\n originalError instanceof Error ? originalError.message : \"\",\n ].join(os.EOL);\n\n super(message);\n this.name = \"PackageJsonReadError\";\n }\n}\n\nexport class PackageJsonParseError extends SyntaxError {\n public constructor(manifestPath: string, originalError: unknown) {\n const message = [\n `Invalid JSON, could not parse package.json at ${manifestPath}`,\n originalError instanceof Error ? originalError.message : \"\",\n ].join(os.EOL);\n\n super(message);\n this.name = \"PackageJsonParseError\";\n }\n}\n\nexport class InvalidPackageNameError extends TypeError {\n public constructor(value: unknown) {\n super(`Package name must be a string, got \"${String(value)}\"`);\n this.name = \"InvalidPackageNameError\";\n }\n}\n\nexport class InvalidPackageVersionError extends TypeError {\n public constructor(value: unknown) {\n super(`Package version must be a string, got \"${String(value)}\"`);\n this.name = \"InvalidPackageVersionError\";\n }\n}\n\nexport class InvalidPackagePublishConfigError extends TypeError {\n public constructor(value: unknown) {\n super(`Publish config must be an object, got \"${String(value)}\"`);\n this.name = \"InvalidPackagePublishConfigError\";\n }\n}\n\nexport class InvalidRegistryUrlError extends TypeError {\n public constructor(value: unknown) {\n super(`Registry URL invalid, got \"${String(value)}\"`);\n this.name = \"InvalidRegistryUrlError\";\n }\n}\n\nexport class InvalidTokenError extends TypeError {\n public constructor() {\n super(\"Token must be a non-empty string.\");\n this.name = \"InvalidTokenError\";\n }\n}\n\nexport class InvalidAccessError extends TypeError {\n public constructor(value: unknown) {\n super(\n `Access must be \"${ACCESS_PUBLIC}\" or \"${ACCESS_RESTRICTED}\", got \"${String(\n value\n )}\".`\n );\n this.name = \"InvalidAccessError\";\n }\n}\n\nexport class InvalidStrategyError extends TypeError {\n public constructor(value: unknown) {\n super(\n `Strategy must be \"${STRATEGY_UPGRADE}\" or \"${STRATEGY_ALL}\", got \"${String(\n value\n )}\".`\n );\n this.name = \"InvalidStrategyError\";\n }\n}\n", "import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { valid as semverValid } from \"semver\";\n\nimport * as errors from \"./errors.js\";\n\n/**\n * The result of reading a package manifest\n */\nexport interface ManifestReadResult {\n packageSpec: string;\n manifest: PackageManifest;\n}\n\n/**\n * A package manifest (package.json)\n */\nexport interface PackageManifest {\n name: string;\n version: string;\n scope: string | undefined;\n publishConfig: PackagePublishConfig | undefined;\n}\n\n/**\n * Any publish configuration defined in package.json.\n */\nexport interface PackagePublishConfig {\n tag?: string;\n access?: string;\n registry?: string;\n}\n\nconst SCOPE_RE = /^(@.+)\\/.+$/u;\n\nconst MANIFEST_BASENAME = \"package.json\";\n\nconst isManifest = (name: unknown): name is string => {\n return typeof name === \"string\" && path.basename(name) === MANIFEST_BASENAME;\n};\n\nconst isDirectory = (name: unknown): name is string => {\n return typeof name === \"string\" && path.extname(name) === \"\";\n};\n\nconst isVersion = (version: unknown): version is string => {\n return semverValid(version as string) !== null;\n};\n\n/**\n * Reads the package manifest (package.json) and returns its parsed contents.\n *\n * @param packagePath The path to the package being published.\n * @returns The parsed package metadata.\n */\nexport async function readManifest(\n packagePath: unknown\n): Promise {\n let packageSpec: string | undefined;\n let manifestPath: string;\n\n if (!packagePath) {\n packageSpec = \"\";\n manifestPath = \"package.json\";\n } else if (isManifest(packagePath)) {\n packageSpec = path.dirname(packagePath);\n manifestPath = packagePath;\n } else if (isDirectory(packagePath)) {\n packageSpec = packagePath;\n manifestPath = path.join(packagePath, MANIFEST_BASENAME);\n } else {\n throw new errors.InvalidPackageError(packagePath);\n }\n\n let manifestContents: string;\n let manifestJson: Record;\n let name: unknown;\n let version: unknown;\n let publishConfig: unknown;\n\n try {\n manifestContents = await fs.readFile(manifestPath, \"utf8\");\n } catch (error) {\n throw new errors.PackageJsonReadError(manifestPath, error);\n }\n\n try {\n manifestJson = JSON.parse(manifestContents) as Record;\n name = manifestJson.name;\n version = manifestJson.version;\n publishConfig = manifestJson.publishConfig ?? {};\n } catch (error) {\n throw new errors.PackageJsonParseError(manifestPath, error);\n }\n\n if (typeof name !== \"string\" || name.length === 0) {\n throw new errors.InvalidPackageNameError(name);\n }\n\n if (!isVersion(version)) {\n throw new errors.InvalidPackageVersionError(version);\n }\n\n if (\n typeof publishConfig !== \"object\" ||\n Array.isArray(publishConfig) ||\n !publishConfig\n ) {\n throw new errors.InvalidPackagePublishConfigError(publishConfig);\n }\n\n return {\n packageSpec,\n manifest: { name, version, publishConfig, scope: SCOPE_RE.exec(name)?.[1] },\n };\n}\n", "import * as errors from \"./errors.js\";\nimport type { PackageManifest } from \"./read-manifest.js\";\nimport {\n ACCESS_PUBLIC,\n ACCESS_RESTRICTED,\n STRATEGY_UPGRADE,\n STRATEGY_ALL,\n type Access,\n type Strategy,\n type Options,\n} from \"./options.js\";\n\nconst DEFAULT_REGISTRY = \"https://registry.npmjs.org/\";\nconst DEFAULT_TAG = \"latest\";\n\n/**\n * Normalized and sanitized auth and publish configurations.\n */\nexport interface NormalizedOptions {\n authConfig: AuthConfig;\n publishConfig: PublishConfig;\n}\n\n/**\n * Normalized and sanitized auth configuration.\n */\nexport interface AuthConfig {\n registry: ConfigValue;\n token: ConfigValue;\n}\n\n/**\n * Normalized and sanitized publish configuration.\n */\nexport interface PublishConfig {\n tag: ConfigValue;\n access: ConfigValue;\n dryRun: ConfigValue;\n strategy: ConfigValue;\n}\n\n/**\n * A config value, and whether that value differs from default.\n */\nexport interface ConfigValue {\n value: TValue;\n isDefault: boolean;\n}\n\n/**\n * Normalizes and sanitizes options, and fills-in any default values.\n *\n * @param options User-input options.\n * @param manifest Package metadata from package.json.\n * @returns Validated auth and publish configuration.\n */\nexport function normalizeOptions(\n options: Options,\n manifest: PackageManifest\n): NormalizedOptions {\n const defaultTag = manifest.publishConfig?.tag ?? DEFAULT_TAG;\n\n const defaultRegistry = manifest.publishConfig?.registry ?? DEFAULT_REGISTRY;\n\n const defaultAccess =\n manifest.publishConfig?.access ??\n (manifest.scope === undefined ? ACCESS_PUBLIC : undefined);\n\n return {\n authConfig: {\n token: setValue(options.token, \"\", validateToken),\n registry: setValue(options.registry, defaultRegistry, validateRegistry),\n },\n publishConfig: {\n tag: setValue(options.tag, defaultTag, validateTag),\n access: setValue(options.access, defaultAccess, validateAccess),\n dryRun: setValue(options.dryRun, false, validateDryRun),\n strategy: setValue(options.strategy, STRATEGY_ALL, validateStrategy),\n },\n };\n}\n\nconst setValue = (\n value: unknown,\n defaultValue?: unknown,\n validate: (value: unknown) => TValue = (_) => _ as TValue\n): ConfigValue => ({\n value: validate(value ?? defaultValue),\n isDefault: value === undefined,\n});\n\nconst validateToken = (value: unknown): string => {\n if (typeof value === \"string\" && value.length > 0) {\n return value;\n }\n\n throw new errors.InvalidTokenError();\n};\n\nconst validateRegistry = (value: unknown): URL => {\n try {\n return new URL(value as string | URL);\n } catch {\n throw new errors.InvalidRegistryUrlError(value);\n }\n};\n\nconst validateTag = (value: unknown): string => {\n return value as string;\n};\n\nconst validateDryRun = (value: unknown): boolean => {\n return value as boolean;\n};\n\nconst validateAccess = (value: unknown): Access | undefined => {\n if (\n value === undefined ||\n value === ACCESS_PUBLIC ||\n value === ACCESS_RESTRICTED\n ) {\n return value;\n }\n\n throw new errors.InvalidAccessError(value);\n};\n\nconst validateStrategy = (value: unknown): Strategy => {\n if (value === STRATEGY_ALL || value === STRATEGY_UPGRADE) {\n return value;\n }\n\n throw new errors.InvalidStrategyError(value);\n};\n", "import fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\nimport type { AuthConfig } from \"../normalize-options.js\";\n\nexport type NpmCliEnvironment = Record;\n\nexport type NpmCliTask = (\n environment: NpmCliEnvironment\n) => Promise;\n\n/**\n * Create a temporary .npmrc file with the given auth token,\n * and call a task with env vars set to use that .npmrc.\n *\n * @param auth Registry and token.\n * @param task A function called with the configured environment.\n * After the function resolves, the temporary .npmrc file will be removed.\n * @returns The resolved value of `task`\n */\nexport async function useNpmEnvironment(\n auth: AuthConfig,\n task: NpmCliTask\n): Promise {\n const { registry, token } = auth;\n const npmrcDirectory = await fs.mkdtemp(\n path.join(os.tmpdir(), \"npm-publish-\")\n );\n const npmrc = path.join(npmrcDirectory, \".npmrc\");\n\n const config = [\n \"; created by jsdevtools/npm-publish\",\n `//${registry.value.hostname}/:authToken=\\${NODE_AUTH_TOKEN}`,\n registry.isDefault ? \"\" : `registry=${registry.value.href}`,\n \"\",\n ].join(os.EOL);\n\n await fs.writeFile(npmrc, config, \"utf8\");\n\n try {\n return await task({\n NODE_AUTH_TOKEN: token.value,\n npm_config_userconfig: npmrc,\n });\n } finally {\n await fs.rm(npmrcDirectory, { force: true, recursive: true });\n }\n}\n", "import childProcess from \"node:child_process\";\n\nimport type { NpmCliEnvironment } from \"./use-npm-environment.js\";\n\nexport interface NpmCliOptions {\n environment?: NpmCliEnvironment;\n ifError?: Record;\n}\n\nconst JSON_MATCH_RE = /(\\{[\\s\\S]*\\})/mu;\n\nconst execProcess = (\n command: string,\n environment: Record = {}\n): Promise<{ stdout: string; stderr: string; error: Error | null }> => {\n return new Promise((resolve) => {\n childProcess.exec(\n command,\n { env: { ...process.env, ...environment } },\n (error, stdout, stderr) => {\n return resolve({ stdout: stdout.trim(), stderr: stderr.trim(), error });\n }\n );\n });\n};\n\nconst parseJson = (...values: string[]): TParsed | undefined => {\n for (const value of values) {\n const jsonValue = JSON_MATCH_RE.exec(value)?.[1];\n\n if (jsonValue) {\n try {\n return JSON.parse(jsonValue) as TParsed;\n } catch {\n return undefined;\n }\n }\n }\n\n return undefined;\n};\n\n/**\n * Call the NPM CLI in JSON mode.\n *\n * @param command The command of the NPM CLI to call\n * @param cliArguments Any arguments to send to the command\n * @param options Customize environment variables or add an error handler.\n * @returns The parsed JSON, or stdout if unparsable.\n */\nexport async function callNpmCli(\n command: string,\n cliArguments: string[],\n options: NpmCliOptions = {}\n): Promise {\n const { stdout, stderr, error } = await execProcess(\n [\"npm\", command, \"--ignore-scripts\", \"--json\", ...cliArguments].join(\" \"),\n options.environment\n );\n\n if (error) {\n const errorPayload = parseJson<{ error?: { code?: string | null } }>(\n stdout,\n stderr\n );\n const errorCode = errorPayload?.error?.code?.toLowerCase();\n\n if (\n typeof errorCode === \"string\" &&\n options.ifError &&\n errorCode in options.ifError\n ) {\n return options.ifError[errorCode] as TReturn;\n }\n\n throw error;\n }\n\n return parseJson(stdout) ?? (stdout as unknown as TReturn);\n}\n", "import type { PublishConfig } from \"../normalize-options.js\";\n\n/**\n * Given a publish configuration, get the NPM CLI publish arguments.\n *\n * @param packageSpec Package specification path\n * @param config Publish configuration\n * @returns Arguments to pass to the NPM CLI\n */\nexport function getPublishArguments(\n packageSpec: string,\n config: PublishConfig\n): string[] {\n const { tag, access, dryRun } = config;\n const publishArguments = [];\n\n if (packageSpec.length > 0) {\n publishArguments.push(packageSpec);\n }\n\n if (!tag.isDefault) {\n publishArguments.push(\"--tag\", tag.value);\n }\n\n if (!access.isDefault && access.value) {\n publishArguments.push(\"--access\", access.value);\n }\n\n if (!dryRun.isDefault) {\n publishArguments.push(\"--dry-run\", JSON.stringify(dryRun.value));\n }\n\n return publishArguments;\n}\n", "import type { AuthConfig, PublishConfig } from \"../normalize-options.js\";\nimport { useNpmEnvironment } from \"./use-npm-environment.js\";\nimport { callNpmCli } from \"./call-npm-cli.js\";\nimport { getPublishArguments } from \"./get-publish-arguments.js\";\n\nexport interface PublishedVersions {\n \"dist-tags\": Record;\n versions: string[];\n}\n\nexport interface PublishResult {\n id: string;\n}\n\n/**\n * Get a package's published versions.\n *\n * @param packageName The name of the package to get published versions for.\n * @param authConfig Registry and auth token.\n * @returns All published versions and tags.\n */\nexport async function getVersions(\n packageName: string,\n authConfig: AuthConfig\n): Promise {\n return useNpmEnvironment(authConfig, (environment) => {\n return callNpmCli(\n \"view\",\n [packageName, \"dist-tags\", \"versions\"],\n { environment, ifError: { e404: { \"dist-tags\": {}, versions: [] } } }\n );\n });\n}\n\n/**\n * Publish a package.\n *\n * @param packageSpec Package specification to pass to npm.\n * @param publishConfig Publish configuration.\n * @param authConfig Registry and auth token.\n * @returns Release metadata.\n */\nexport async function publish(\n packageSpec: string,\n publishConfig: PublishConfig,\n authConfig: AuthConfig\n): Promise {\n const publishArguments = getPublishArguments(packageSpec, publishConfig);\n\n return useNpmEnvironment(authConfig, (environment) => {\n return callNpmCli(\"publish\", publishArguments, {\n environment,\n });\n });\n}\n", "import {\n valid as semverValid,\n gt as semverGreaterThan,\n diff as semverDifference,\n type ReleaseType as SemverReleaseType,\n} from \"semver\";\n\nimport { STRATEGY_ALL } from \"./options.js\";\nimport type { PublishConfig } from \"./normalize-options.js\";\nimport type { PublishedVersions } from \"./npm/index.js\";\n\nexport type ReleaseType = SemverReleaseType | typeof INITIAL | typeof DIFFERENT;\n\nexport interface VersionComparison {\n releaseType: ReleaseType | undefined;\n previousVersion: string | undefined;\n}\n\nconst INITIAL = \"initial\";\nconst DIFFERENT = \"different\";\n\n/**\n * Compare previously published versions with the package's current version.\n *\n * @param version The current package version.\n * @param publishedVersions The versions that have already been published.\n * @param publishConfig Tag and version comparison strategy.\n * @returns The release type and previous version.\n */\nexport function compareVersions(\n version: string,\n publishedVersions: PublishedVersions,\n publishConfig: PublishConfig\n): VersionComparison {\n const { versions: existingVersions, \"dist-tags\": tags } = publishedVersions;\n const { strategy, tag: publishTag } = publishConfig;\n const previousVersion = semverValid(tags[publishTag.value]) ?? undefined;\n const isUnique = !existingVersions.includes(version);\n let releaseType: ReleaseType | undefined;\n\n if (isUnique) {\n if (!previousVersion) {\n releaseType = INITIAL;\n } else if (semverGreaterThan(version, previousVersion)) {\n releaseType = semverDifference(version, previousVersion) ?? undefined;\n } else if (strategy.value === STRATEGY_ALL) {\n releaseType = DIFFERENT;\n }\n }\n\n return { releaseType, previousVersion };\n}\n", "import { readManifest } from \"./read-manifest.js\";\nimport { normalizeOptions } from \"./normalize-options.js\";\nimport { getVersions, publish } from \"./npm/index.js\";\nimport { compareVersions } from \"./compare-versions.js\";\nimport type { Options } from \"./options.js\";\nimport type { Results } from \"./results.js\";\n\n/**\n * Publishes a package to NPM, if its version has changed.\n *\n * @param options Publish options.\n * @returns Release metadata.\n */\nexport async function npmPublish(options: Options): Promise {\n const { packageSpec, manifest } = await readManifest(options.package);\n const { authConfig, publishConfig } = normalizeOptions(options, manifest);\n const publishedVersions = await getVersions(manifest.name, authConfig);\n const versionComparison = compareVersions(\n manifest.version,\n publishedVersions,\n publishConfig\n );\n\n let publishResult;\n\n if (versionComparison.releaseType !== undefined) {\n publishResult = await publish(packageSpec, publishConfig, authConfig);\n }\n\n return {\n id: publishResult?.id,\n name: manifest.name,\n version: manifest.version,\n releaseType: versionComparison.releaseType,\n previousVersion: versionComparison.previousVersion,\n registry: authConfig.registry.value,\n tag: publishConfig.tag.value,\n access: publishConfig.access.value,\n strategy: publishConfig.strategy.value,\n dryRun: publishConfig.dryRun.value,\n };\n}\n", "/**\n * Wrapper module for @actions/core\n */\nimport {\n getInput as ghGetInput,\n setOutput as ghSetOutput,\n setSecret as ghSetSecret,\n} from \"@actions/core\";\n\n/**\n * Get input by name.\n *\n * @param name Input name\n * @returns The input string value, or undefined if not set\n */\nexport function getInput(name: string): T | undefined {\n const inputString = ghGetInput(name);\n return inputString.length > 0 ? (inputString as T) : undefined;\n}\n\n/**\n * Get a required secret input by name.\n *\n * @param name Input name\n * @returns The input secret value.\n */\nexport function getRequiredSecretInput(name: string): string {\n const inputString = ghGetInput(name, { required: true });\n ghSetSecret(inputString);\n return inputString;\n}\n\n/**\n * Get a boolean input by name.\n *\n * @param name Input name\n * @returns True if value is \"true\", false if not\n */\nexport function getBooleanInput(name: string): boolean {\n return ghGetInput(name) === \"true\";\n}\n\n/**\n * Set an output by name.\n *\n * @param name Output name\n * @param value Output value\n */\nexport function setOutput(name: string, value: string | boolean): void;\n\n/**\n * Set an output by name.\n *\n * @param name Output name\n * @param value Output value\n * @param defaultValue Default value if value is undefined.\n */\nexport function setOutput(\n name: string,\n value: string | boolean | undefined,\n defaultValue: string | boolean\n): void;\n\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport function setOutput(\n name: string,\n value: string | boolean | undefined,\n defaultValue?: string | boolean | undefined\n): void {\n ghSetOutput(name, value ?? defaultValue);\n}\n", "import {\n npmPublish,\n type Access,\n type Strategy,\n type Options,\n} from \"../index.js\";\nimport * as core from \"./core.js\";\n\n/**\n * Run the action.\n */\nexport async function run(): Promise {\n const options: Options = {\n token: core.getRequiredSecretInput(\"token\"),\n registry: core.getInput(\"registry\"),\n package: core.getInput(\"package\"),\n tag: core.getInput(\"tag\"),\n access: core.getInput(\"access\"),\n strategy: core.getInput(\"strategy\"),\n dryRun: core.getBooleanInput(\"dry-run\"),\n };\n\n const results = await npmPublish(options);\n\n core.setOutput(\"id\", results.id, \"\");\n core.setOutput(\"name\", results.name);\n core.setOutput(\"version\", results.version);\n core.setOutput(\"type\", results.releaseType, \"\");\n core.setOutput(\"old-version\", results.previousVersion, \"\");\n core.setOutput(\"registry\", results.registry.href);\n core.setOutput(\"tag\", results.tag);\n core.setOutput(\"access\", results.access, \"default\");\n core.setOutput(\"strategy\", results.strategy);\n core.setOutput(\"dry-run\", results.dryRun);\n}\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,aAAgB,eAAe,OAAU;AACvC,UAAI,UAAU,QAAQ,UAAU,QAAW;AACzC,eAAO;iBACE,OAAO,UAAU,YAAY,iBAAiB,QAAQ;AAC/D,eAAO;;AAET,aA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AAI;AACnC,EAAK,UAAU,WAAW,QAAQ,OAAO;AACzC,EAAK,UAAU,QAAQ,QAAQ,aAAa,EAAE;AAC9C,EAAK,UAAU,eAAe,QAAQ,iBAAiB,EAAE;AACzD,EAAK,UAAU,YAAY,QAAQ,SAAS,IAAI;AAChD,EAAK,UAAU,OAAO,QAAQ,GAAG;AACjC,EAAK,UAAU,UAAU,QAAQ,QAAQ,SAAS;AAClD,EAAK,UAAU,YAAY,QAAQ,QAAQ;AAC3C,EAAK,UAAU,WAAW,QAAQ,MAAM;AAC1C;;;AZ/BA,IAAI,EAAE,MAAM,CAAC,cAAiB,wBAAU,KAAK,CAAC;", + "names": ["os", "crypto", "version", "URL", "crypto", "import_crypto", "crypto", "import_crypto", "fs", "os", "options", "socket", "require_tunnel", "module", "HttpCodes", "Headers", "MediaTypes", "path", "os", "path", "ExitCode", "getInput", "getBooleanInput", "setOutput", "setFailed", "module", "module", "module", "module", "module", "module", "version", "module", "parse", "version", "module", "parse", "version", "module", "parse", "version", "module", "version", "module", "module", "module", "parse", "v1", "module", "module", "module", "module", "parse", "version", "module", "module", "module", "module", "module", "module", "module", "module", "module", "module", "module", "module", "parse", "version", "module", "module", "module", "module", "version", "module", "version", "module", "version", "module", "module", "module", "module", "require_valid", "module", "module", "version", "module", "version", "module", "version", "module", "module", "version", "module", "require_semver", "module", "parse", "import_core", "os", "path", "version", "semverValid", "fs", "validate", "import_promises", "import_node_os", "import_node_path", "fs", "path", "os", "childProcess", "import_semver", "version", "semverValid", "semverGreaterThan", "semverDifference", "ghGetInput", "ghSetSecret", "ghSetOutput"] } diff --git a/package.json b/package.json index 5762963..a5f6d97 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "build:lib": "tsc", "test": "vitest src", "coverage": "vitest run --coverage src", - "_eslint": "eslint --quiet \"**/*.@(js|ts)\"", + "_eslint": "eslint \"**/*.@(js|ts)\"", "_prettier": "prettier \"**/*.@(js|ts|json|md|yml)\"" }, "engines": { diff --git a/src/__tests__/compare-versions.test.ts b/src/__tests__/compare-versions.test.ts new file mode 100644 index 0000000..248e27f --- /dev/null +++ b/src/__tests__/compare-versions.test.ts @@ -0,0 +1,93 @@ +import { describe, it, expect } from "vitest"; + +import * as subject from "../compare-versions.js"; +import type { PublishConfig } from "../normalize-options.js"; + +describe("compareVersions", () => { + it("should recognize initial release on a tag", () => { + const result = subject.compareVersions( + "0.0.0", + { versions: [], "dist-tags": {} }, + { tag: { value: "next" } } as PublishConfig + ); + + expect(result).toEqual({ + releaseType: "initial", + previousVersion: undefined, + }); + }); + + it("should recognize an unpublished release", () => { + const result = subject.compareVersions( + "0.0.0", + { versions: ["1.2.3", "4.5.6"], "dist-tags": { next: "1.2.3" } }, + { strategy: { value: "all" }, tag: { value: "next" } } as PublishConfig + ); + + expect(result).toEqual({ + releaseType: "different", + previousVersion: "1.2.3", + }); + }); + + it("should recognize an upgrade release", () => { + const result = subject.compareVersions( + "1.4.3", + { versions: ["1.2.3", "4.5.6"], "dist-tags": { next: "1.2.3" } }, + { + strategy: { value: "upgrade" }, + tag: { value: "next" }, + } as PublishConfig + ); + + expect(result).toEqual({ + releaseType: "minor", + previousVersion: "1.2.3", + }); + }); + + it("should not release if version already exists", () => { + const result = subject.compareVersions( + "4.5.6", + { versions: ["1.2.3", "4.5.6"], "dist-tags": { next: "4.5.6" } }, + { strategy: { value: "all" }, tag: { value: "next" } } as PublishConfig + ); + + expect(result).toEqual({ + releaseType: undefined, + previousVersion: "4.5.6", + }); + }); + + it("should not upgrade if version already exists", () => { + const result = subject.compareVersions( + "4.5.6", + { versions: ["1.2.3", "4.5.6"], "dist-tags": { next: "1.2.3" } }, + { + strategy: { value: "upgrade" }, + tag: { value: "next" }, + } as PublishConfig + ); + + expect(result).toEqual({ + releaseType: undefined, + previousVersion: "1.2.3", + }); + }); + + it("should not upgrade if not an upgrade", () => { + const result = subject.compareVersions( + "1.2.2", + { versions: ["1.2.3", "4.5.6"], "dist-tags": { next: "1.2.3" } }, + { + strategy: { value: "upgrade" }, + tag: { value: "next" }, + } as PublishConfig + ); + + expect(result).toEqual({ + releaseType: undefined, + previousVersion: "1.2.3", + }); + }); +}); diff --git a/src/__tests__/normalize-options.test.ts b/src/__tests__/normalize-options.test.ts index 0700abe..d8b103c 100644 --- a/src/__tests__/normalize-options.test.ts +++ b/src/__tests__/normalize-options.test.ts @@ -1,14 +1,14 @@ import { describe, it, expect } from "vitest"; -import * as subject from "../normalize-options"; -import * as errors from "../errors"; +import * as subject from "../normalize-options.js"; +import * as errors from "../errors.js"; describe("normalizeOptions", () => { - const manifest = { name: "cool-package", version: "1.2.3" }; - const scopedManifest = { - name: "@cool-org/cool-package", + const manifest = { + name: "cool-package", version: "1.2.3", - scope: "@cool-org", + scope: undefined, + publishConfig: undefined, }; describe("authConfig", () => { @@ -17,7 +17,7 @@ describe("normalizeOptions", () => { expect(result.authConfig).toEqual({ token: { value: "abc123", isDefault: false }, - registryUrl: { + registry: { value: new URL("https://registry.npmjs.org/"), isDefault: true, }, @@ -26,44 +26,65 @@ describe("normalizeOptions", () => { it("should normalize registry URL", () => { const result = subject.normalizeOptions( - { token: "abc123", registryUrl: "https://registry.npmjs.org/" }, + { token: "abc123", registry: "https://registry.npmjs.org/" }, manifest ); - expect(result.authConfig).toEqual({ - token: { value: "abc123", isDefault: false }, - registryUrl: { + expect(result.authConfig).toMatchObject({ + registry: { value: new URL("https://registry.npmjs.org/"), - isDefault: true, + isDefault: false, }, }); }); it("should normalize custom registry URL", () => { const result = subject.normalizeOptions( - { registryUrl: "https://example.com", token: "abc123" }, + { registry: "https://example.com", token: "abc123" }, manifest ); - expect(result.authConfig).toEqual({ - registryUrl: { + expect(result.authConfig).toMatchObject({ + registry: { value: new URL("https://example.com"), isDefault: false, }, - token: { value: "abc123", isDefault: false }, + }); + }); + + it("should take defaults from `pkg.publishConfig`", () => { + const result = subject.normalizeOptions( + { token: "abc123" }, + { + ...manifest, + publishConfig: { + registry: "https://example.com", + }, + } + ); + + expect(result.authConfig).toMatchObject({ + registry: { + value: new URL("https://example.com"), + isDefault: true, + }, }); }); it("should throw if registry URL invalid", () => { expect(() => { subject.normalizeOptions( - { token: "abc123", registryUrl: "hello world" }, + { token: "abc123", registry: "hello world" }, manifest ); }).toThrow(errors.InvalidRegistryUrlError); }); it("should throw if token invalid", () => { + expect(() => { + subject.normalizeOptions({ token: "" }, manifest); + }).toThrow(errors.InvalidTokenError); + expect(() => { // @ts-expect-error: intentionally mistyped for validation testing subject.normalizeOptions({ token: 42 }, manifest); @@ -76,27 +97,88 @@ describe("normalizeOptions", () => { const result = subject.normalizeOptions({ token: "abc123" }, manifest); expect(result.publishConfig).toEqual({ - packageSpec: { value: "", isDefault: true }, tag: { value: "latest", isDefault: true }, access: { value: "public", isDefault: true }, dryRun: { value: false, isDefault: true }, - strategy: { value: "upgrade", isDefault: true }, + strategy: { value: "all", isDefault: true }, }); }); it("should set publish config defaults for scoped package", () => { const result = subject.normalizeOptions( { token: "abc123" }, - scopedManifest + { ...manifest, scope: "@cool-scope" } + ); + + expect(result.publishConfig).toMatchObject({ + access: { value: undefined, isDefault: true }, + }); + }); + + it("should allow options to be overridden", () => { + const result = subject.normalizeOptions( + { + token: "abc123", + package: "./cool-package", + tag: "next", + access: "public", + dryRun: true, + strategy: "all", + }, + { ...manifest, scope: "@cool-scope" } ); expect(result.publishConfig).toEqual({ - packageSpec: { value: "", isDefault: true }, - tag: { value: "latest", isDefault: true }, - access: { value: "restricted", isDefault: true }, - dryRun: { value: false, isDefault: true }, - strategy: { value: "upgrade", isDefault: true }, + tag: { value: "next", isDefault: false }, + access: { value: "public", isDefault: false }, + dryRun: { value: true, isDefault: false }, + strategy: { value: "all", isDefault: false }, + }); + }); + + it("should take default configs from `pkg.publishConfig`", () => { + const result = subject.normalizeOptions( + { token: "abc123" }, + { + ...manifest, + scope: "@cool-scope", + publishConfig: { + tag: "next", + access: "public", + }, + } + ); + + expect(result.publishConfig).toMatchObject({ + tag: { value: "next", isDefault: true }, + access: { value: "public", isDefault: true }, }); }); + + it("should validate access value", () => { + expect(() => { + subject.normalizeOptions( + { + token: "abc123", + // @ts-expect-error: intentionally mistyped for validation testing + access: "NOT-VALID-ACCESS", + }, + manifest + ); + }).toThrow(errors.InvalidAccessError); + }); + + it("should validate strategy value", () => { + expect(() => { + subject.normalizeOptions( + { + token: "abc123", + // @ts-expect-error: intentionally mistyped for validation testing + strategy: "NOT-VALID-STRATEGY", + }, + manifest + ); + }).toThrow(errors.InvalidStrategyError); + }); }); }); diff --git a/src/__tests__/npm-publish.test.ts b/src/__tests__/npm-publish.test.ts index de3e07c..58aebeb 100644 --- a/src/__tests__/npm-publish.test.ts +++ b/src/__tests__/npm-publish.test.ts @@ -2,21 +2,24 @@ import { vi, describe, it, afterEach, expect } from "vitest"; import { imitateEsm, reset } from "testdouble-vitest"; import * as td from "testdouble"; -import * as subject from "../npm-publish"; -import { readManifest, type Manifest } from "../read-manifest"; +import * as subject from "../npm-publish.js"; +import { readManifest, type PackageManifest } from "../read-manifest.js"; import { normalizeOptions, type AuthConfig, type PublishConfig, -} from "../normalize-options"; +} from "../normalize-options.js"; import { getVersions, publish, - type VersionsResult, + type PublishedVersions, type PublishResult, -} from "../npm"; -import { compareVersions, type VersionComparison } from "../compare-versions"; -import type { Options } from "../options"; +} from "../npm/index.js"; +import { + compareVersions, + type VersionComparison, +} from "../compare-versions.js"; +import type { Options } from "../options.js"; vi.mock("../read-manifest", () => imitateEsm("../read-manifest")); vi.mock("../normalize-options", () => imitateEsm("../normalize-options")); @@ -30,30 +33,42 @@ describe("npmPublish", () => { it("should read the manifest, get publish config, compare, and publish", async () => { const options: Options = { package: "./cool-package", token: "abc123" }; - const manifest: Manifest = { name: "cool-package", version: "1.2.3" }; + const packageSpec = "."; + const manifest = { + name: "cool-package", + version: "1.2.3", + } as PackageManifest; const authConfig = { - registryUrl: { value: new URL("http://example.com") }, + registry: { value: new URL("http://example.com") }, } as AuthConfig; const publishConfig = { tag: { value: "latest" }, access: { value: "public" }, dryRun: { value: false }, + strategy: { value: "upgrade" }, } as PublishConfig; - const versions: VersionsResult = { "dist-tags": {}, versions: [] }; + const versions: PublishedVersions = { "dist-tags": {}, versions: [] }; const comparison: VersionComparison = { releaseType: "major", previousVersion: "0.1.2", }; const publishResult: PublishResult = { id: "cool-package@1.2.3" }; - td.when(readManifest("./cool-package")).thenResolve(manifest); + td.when(readManifest("./cool-package")).thenResolve({ + packageSpec, + manifest, + }); td.when(normalizeOptions(options, manifest)).thenReturn({ authConfig, publishConfig, }); td.when(getVersions("cool-package", authConfig)).thenResolve(versions); - td.when(compareVersions(versions, publishConfig)).thenReturn(comparison); - td.when(publish(publishConfig, authConfig)).thenResolve(publishResult); + td.when(compareVersions("1.2.3", versions, publishConfig)).thenReturn( + comparison + ); + td.when(publish(packageSpec, publishConfig, authConfig)).thenResolve( + publishResult + ); const result = await subject.npmPublish(options); @@ -64,40 +79,51 @@ describe("npmPublish", () => { previousVersion: "0.1.2", tag: "latest", access: "public", - registryUrl: new URL("http://example.com"), + registry: new URL("http://example.com"), releaseType: "major", + strategy: "upgrade", dryRun: false, }); }); it("should skip publish if not needed", async () => { const options: Options = { package: "./cool-package", token: "abc123" }; - const manifest: Manifest = { name: "cool-package", version: "1.2.3" }; + const packageSpec = "."; + const manifest = { + name: "cool-package", + version: "1.2.3", + } as PackageManifest; const authConfig = { - registryUrl: { value: new URL("http://example.com") }, + registry: { value: new URL("http://example.com") }, } as AuthConfig; const publishConfig = { tag: { value: "latest" }, access: { value: "public" }, dryRun: { value: false }, + strategy: { value: "upgrade" }, } as PublishConfig; - const versions: VersionsResult = { "dist-tags": {}, versions: [] }; + const versions: PublishedVersions = { "dist-tags": {}, versions: [] }; const comparison: VersionComparison = { releaseType: undefined, previousVersion: "0.1.2", }; - td.when(readManifest("./cool-package")).thenResolve(manifest); + td.when(readManifest("./cool-package")).thenResolve({ + packageSpec, + manifest, + }); td.when(normalizeOptions(options, manifest)).thenReturn({ authConfig, publishConfig, }); td.when(getVersions("cool-package", authConfig)).thenResolve(versions); - td.when(compareVersions(versions, publishConfig)).thenReturn(comparison); + td.when(compareVersions("1.2.3", versions, publishConfig)).thenReturn( + comparison + ); const result = await subject.npmPublish(options); - td.verify(publish(publishConfig, authConfig), { times: 0 }); + td.verify(publish(packageSpec, publishConfig, authConfig), { times: 0 }); expect(result).toEqual({ id: undefined, @@ -106,8 +132,9 @@ describe("npmPublish", () => { previousVersion: "0.1.2", tag: "latest", access: "public", - registryUrl: new URL("http://example.com"), + registry: new URL("http://example.com"), releaseType: undefined, + strategy: "upgrade", dryRun: false, }); }); diff --git a/src/__tests__/read-manifest.test.ts b/src/__tests__/read-manifest.test.ts index 0909bf9..1a0e9e4 100644 --- a/src/__tests__/read-manifest.test.ts +++ b/src/__tests__/read-manifest.test.ts @@ -3,48 +3,167 @@ import path from "node:path"; import os from "node:os"; import { describe, it, beforeEach, afterEach, expect } from "vitest"; -import * as subject from "../read-manifest"; +import * as subject from "../read-manifest.js"; +import * as errors from "../errors.js"; describe("readManifest", () => { - let tempDir: string; + let directory: string; beforeEach(async () => { - tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "read-manifest-test-")); + directory = await fs.mkdtemp(path.join(os.tmpdir(), "read-manifest-test-")); }); afterEach(async () => { - await fs.rm(tempDir, { recursive: true, force: true }); + await fs.rm(directory, { recursive: true, force: true }); }); it("should read a package.json file", async () => { await fs.writeFile( - path.join(tempDir, "package.json"), - JSON.stringify({ name: "cool-name", version: "cool-version" }), + path.join(directory, "package.json"), + JSON.stringify({ name: "cool-name", version: "1.2.3" }), "utf8" ); const result = await subject.readManifest( - path.join(tempDir, "package.json") + path.join(directory, "package.json") ); - expect(result).toEqual({ name: "cool-name", version: "cool-version" }); + expect(result).toEqual({ + packageSpec: directory, + manifest: { + name: "cool-name", + version: "1.2.3", + scope: undefined, + publishConfig: {}, + }, + }); }); it("should read a package.json file in a directory", async () => { await fs.writeFile( - path.join(tempDir, "package.json"), - JSON.stringify({ name: "cool-name", version: "cool-version" }), + path.join(directory, "package.json"), + JSON.stringify({ name: "cool-name", version: "1.2.3" }), "utf8" ); - const result = await subject.readManifest(tempDir); + const result = await subject.readManifest(directory); - expect(result).toEqual({ name: "cool-name", version: "cool-version" }); + expect(result).toMatchObject({ + packageSpec: directory, + manifest: { name: "cool-name" }, + }); }); it("should read a package.json file in the current working directory", async () => { - const result = await subject.readManifest(); + const result = await subject.readManifest(undefined); - expect(result).toMatchObject({ name: "@jsdevtools/npm-publish" }); + expect(result).toMatchObject({ + packageSpec: "", + manifest: { name: "@jsdevtools/npm-publish" }, + }); + }); + + it("should reject invalid packages", async () => { + await expect(subject.readManifest(42)).rejects.toThrow( + errors.InvalidPackageError + ); + await expect(subject.readManifest("./other.json")).rejects.toThrow( + errors.InvalidPackageError + ); + }); + + it("should read publish config", async () => { + await fs.writeFile( + path.join(directory, "package.json"), + JSON.stringify({ + name: "cool-name", + version: "1.2.3", + publishConfig: { access: "public" }, + }), + "utf8" + ); + + const result = await subject.readManifest(directory); + + expect(result.manifest).toMatchObject({ + publishConfig: { access: "public" }, + }); + }); + + it("should read scope", async () => { + await fs.writeFile( + path.join(directory, "package.json"), + JSON.stringify({ + name: "@cool-scope/cool-name", + version: "1.2.3", + }), + "utf8" + ); + + const result = await subject.readManifest(directory); + + expect(result.manifest).toMatchObject({ + scope: "@cool-scope", + }); + }); + + it("should error if package.json cannot be read", async () => { + const result = subject.readManifest(directory); + + await expect(result).rejects.toThrow(errors.PackageJsonReadError); + }); + + it("should error if package.json file is malformed", async () => { + await fs.writeFile( + path.join(directory, "package.json"), + "NOT JSON", + "utf8" + ); + + const result = subject.readManifest(directory); + + await expect(result).rejects.toThrow(errors.PackageJsonParseError); + }); + + it("should error if name is invalid", async () => { + await fs.writeFile( + path.join(directory, "package.json"), + JSON.stringify({ name: 42, version: "1.2.3" }), + "utf8" + ); + + const result = subject.readManifest(directory); + + await expect(result).rejects.toThrow(errors.InvalidPackageNameError); + }); + + it("should error if version is invalid", async () => { + await fs.writeFile( + path.join(directory, "package.json"), + JSON.stringify({ name: "cool-name", version: 42 }), + "utf8" + ); + + const result = subject.readManifest(directory); + + await expect(result).rejects.toThrow(errors.InvalidPackageVersionError); + }); + + it("should error if publishConfig is invalid", async () => { + await fs.writeFile( + path.join(directory, "package.json"), + JSON.stringify({ + name: "cool-name", + version: "1.2.3", + publishConfig: 42, + }), + "utf8" + ); + + const result = subject.readManifest(directory); + + await expect(result).rejects.toThrow( + errors.InvalidPackagePublishConfigError + ); }); }); diff --git a/src/action/__tests__/run.test.ts b/src/action/__tests__/run.test.ts new file mode 100644 index 0000000..2c0f098 --- /dev/null +++ b/src/action/__tests__/run.test.ts @@ -0,0 +1,62 @@ +import { vi, describe, it, afterEach, expect } from "vitest"; +import { imitateEsm, reset } from "testdouble-vitest"; +import * as td from "testdouble"; + +import { npmPublish } from "../../index.js"; +import * as core from "../core.js"; +import * as subject from "../run.js"; + +vi.mock("../../index", () => imitateEsm("../../index")); +vi.mock("../core", () => imitateEsm("../core")); + +describe("run", () => { + afterEach(() => { + reset(); + }); + + it("should pass input to options", async () => { + td.when(core.getRequiredSecretInput("token")).thenReturn("abc123"); + td.when(core.getInput("package")).thenReturn("./package.json"); + td.when(core.getInput("registry")).thenReturn("https://example.com"); + td.when(core.getInput("tag")).thenReturn("next"); + td.when(core.getInput("access")).thenReturn("restricted"); + td.when(core.getInput("strategy")).thenReturn("all"); + td.when(core.getBooleanInput("dry-run")).thenReturn(true); + + td.when( + npmPublish({ + token: "abc123", + package: "./package.json", + registry: "https://example.com", + tag: "next", + access: "restricted", + strategy: "all", + dryRun: true, + }) + ).thenResolve({ + id: "cool-package@1.2.3", + name: "cool-package", + version: "1.2.3", + releaseType: "major", + previousVersion: "0.1.2", + registry: new URL("https://example.com/registry"), + tag: "latest", + access: "public", + strategy: "upgrade", + dryRun: false, + }); + + await subject.run(); + + td.verify(core.setOutput("id", "cool-package@1.2.3", "")); + td.verify(core.setOutput("name", "cool-package")); + td.verify(core.setOutput("version", "1.2.3")); + td.verify(core.setOutput("type", "major", "")); + td.verify(core.setOutput("old-version", "0.1.2", "")); + td.verify(core.setOutput("registry", "https://example.com/registry")); + td.verify(core.setOutput("tag", "latest")); + td.verify(core.setOutput("access", "public", "default")); + td.verify(core.setOutput("strategy", "upgrade")); + td.verify(core.setOutput("dry-run", false)); + }); +}); diff --git a/src/action/core.ts b/src/action/core.ts new file mode 100644 index 0000000..cfa2a1f --- /dev/null +++ b/src/action/core.ts @@ -0,0 +1,71 @@ +/** + * Wrapper module for @actions/core + */ +import { + getInput as ghGetInput, + setOutput as ghSetOutput, + setSecret as ghSetSecret, +} from "@actions/core"; + +/** + * Get input by name. + * + * @param name Input name + * @returns The input string value, or undefined if not set + */ +export function getInput(name: string): T | undefined { + const inputString = ghGetInput(name); + return inputString.length > 0 ? (inputString as T) : undefined; +} + +/** + * Get a required secret input by name. + * + * @param name Input name + * @returns The input secret value. + */ +export function getRequiredSecretInput(name: string): string { + const inputString = ghGetInput(name, { required: true }); + ghSetSecret(inputString); + return inputString; +} + +/** + * Get a boolean input by name. + * + * @param name Input name + * @returns True if value is "true", false if not + */ +export function getBooleanInput(name: string): boolean { + return ghGetInput(name) === "true"; +} + +/** + * Set an output by name. + * + * @param name Output name + * @param value Output value + */ +export function setOutput(name: string, value: string | boolean): void; + +/** + * Set an output by name. + * + * @param name Output name + * @param value Output value + * @param defaultValue Default value if value is undefined. + */ +export function setOutput( + name: string, + value: string | boolean | undefined, + defaultValue: string | boolean +): void; + +// eslint-disable-next-line jsdoc/require-jsdoc +export function setOutput( + name: string, + value: string | boolean | undefined, + defaultValue?: string | boolean | undefined +): void { + ghSetOutput(name, value ?? defaultValue); +} diff --git a/src/action/index.ts b/src/action/index.ts index 179498b..b00abc3 100644 --- a/src/action/index.ts +++ b/src/action/index.ts @@ -1,108 +1,4 @@ -import * as actionsCore from "@actions/core"; -import { npmPublish } from "../npm-publish"; -import type { Access, Options, Strategy } from "../options"; +import { setFailed } from "@actions/core"; +import { run } from "./run.js"; -/** - * The main entry point of the GitHub Action - * - * @internal - */ -async function main(): Promise { - try { - // Setup global error handlers - process.on("uncaughtException", errorHandler); - process.on("unhandledRejection", errorHandler); - - // Get the GitHub Actions input options - const options: Options = { - token: getInput("token", true), - package: getInput("package"), - registryUrl: getInput("registryUrl"), - tag: getInput("tag"), - access: getInput("access"), - strategy: getInput("strategy"), - dryRun: getInput("dry-run")?.toLowerCase() === "true", - }; - - // Publish to NPM - let results = await npmPublish(options); - - if (!results.releaseType) { - console.log( - `\n📦 ${results.name} v${results.version} is already published to ${results.registryUrl}` - ); - } - if (results.releaseType === "lower") { - console.log( - `\n📦 ${results.name} v${results.version} is lower than the version published to ${results.registryUrl}` - ); - } else if (results.dryRun) { - console.log( - `\n📦 ${results.name} v${results.version} was NOT actually published to ${results.registryUrl} (dry run)` - ); - } else { - console.log( - `\n📦 Successfully published ${results.name} v${results.version} to ${results.registryUrl}` - ); - } - - // Set the GitHub Actions output variables - setOutput("id", results.id); - setOutput("name", results.name); - setOutput("version", results.version); - setOutput("release-type", results.releaseType); - setOutput("previous-version", results.previousVersion); - setOutput("tag", results.tag); - setOutput("access", results.access); - setOutput("registry-url", results.registryUrl); - setOutput("dry-run", results.dryRun); - } catch (error) { - errorHandler(error as Error); - } -} - -/** - * Get input. - */ - -function getInput( - name: string, - required?: TRequired -): TRequired extends true ? ReturnT : ReturnT | undefined { - const value = actionsCore.getInput(name, { required }); - return value === "" ? undefined : (value as any); -} - -/** - * Set output with logging to stdout for test support - */ -function setOutput(...args: Parameters) { - if (process.env.NODE_ENV === "test") { - console.log(`TEST::set-output name=${args[0]}::${args[1]}`); - return; - } - return actionsCore.setOutput(...args); -} - -/** - * Prints errors to the GitHub Actions console - */ -function errorHandler(error: Error): void { - let message = error.stack || error.message || String(error); - actionsCore.setFailed(message); - process.exit(); -} - -/** - * Prints debug logs to the GitHub Actions console - */ -// function debugHandler(message: string, data?: object) { -// if (data) { -// message += "\n" + JSON.stringify(data, undefined, 2); -// } - -// actionsCore.debug(message); -// } - -// eslint-disable-next-line @typescript-eslint/no-floating-promises -main(); +run().catch((error: Error) => setFailed(error)); diff --git a/src/action/run.ts b/src/action/run.ts new file mode 100644 index 0000000..d2a2071 --- /dev/null +++ b/src/action/run.ts @@ -0,0 +1,35 @@ +import { + npmPublish, + type Access, + type Strategy, + type Options, +} from "../index.js"; +import * as core from "./core.js"; + +/** + * Run the action. + */ +export async function run(): Promise { + const options: Options = { + token: core.getRequiredSecretInput("token"), + registry: core.getInput("registry"), + package: core.getInput("package"), + tag: core.getInput("tag"), + access: core.getInput("access"), + strategy: core.getInput("strategy"), + dryRun: core.getBooleanInput("dry-run"), + }; + + const results = await npmPublish(options); + + core.setOutput("id", results.id, ""); + core.setOutput("name", results.name); + core.setOutput("version", results.version); + core.setOutput("type", results.releaseType, ""); + core.setOutput("old-version", results.previousVersion, ""); + core.setOutput("registry", results.registry.href); + core.setOutput("tag", results.tag); + core.setOutput("access", results.access, "default"); + core.setOutput("strategy", results.strategy); + core.setOutput("dry-run", results.dryRun); +} diff --git a/src/cli/index.ts b/src/cli/index.ts index ad23cf9..5b600e5 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -1,9 +1,10 @@ -import { join } from "path"; -import { npmPublish } from "../npm-publish"; -import { readManifest } from "../read-manifest"; -import { ExitCode } from "./exit-code"; -import { usageText } from "./help"; -import { parseArgs } from "./parse-args"; +import { join } from "node:path"; + +import { npmPublish } from "../npm-publish.js"; +import { readManifest } from "../read-manifest.js"; +import { ExitCode } from "./exit-code.js"; +import { usageText } from "./help.js"; +import { parseArgs } from "./parse-args.js"; /** * The main entry point of the CLI diff --git a/src/cli/parse-args.ts b/src/cli/parse-args.ts index fc224a8..70f4164 100644 --- a/src/cli/parse-args.ts +++ b/src/cli/parse-args.ts @@ -1,7 +1,7 @@ import commandLineArgs from "command-line-args"; -import { Access, Options } from "../options"; -import { ExitCode } from "./exit-code"; -import { usageText } from "./help"; +import { Access, Options } from "../options.js"; +import { ExitCode } from "./exit-code.js"; +import { usageText } from "./help.js"; /** * The parsed command-line arguments diff --git a/src/compare-versions.ts b/src/compare-versions.ts index 65868c1..13c4cfb 100644 --- a/src/compare-versions.ts +++ b/src/compare-versions.ts @@ -1,21 +1,52 @@ -import type { ReleaseType as SemverReleaseType } from "semver"; +import { + valid as semverValid, + gt as semverGreaterThan, + diff as semverDifference, + type ReleaseType as SemverReleaseType, +} from "semver"; -import type { PublishConfig } from "./normalize-options"; -import type { VersionsResult } from "./npm"; +import { STRATEGY_ALL } from "./options.js"; +import type { PublishConfig } from "./normalize-options.js"; +import type { PublishedVersions } from "./npm/index.js"; -export type ReleaseType = SemverReleaseType | "lower"; +export type ReleaseType = SemverReleaseType | typeof INITIAL | typeof DIFFERENT; export interface VersionComparison { releaseType: ReleaseType | undefined; - previousVersion: string; + previousVersion: string | undefined; } +const INITIAL = "initial"; +const DIFFERENT = "different"; + +/** + * Compare previously published versions with the package's current version. + * + * @param version The current package version. + * @param publishedVersions The versions that have already been published. + * @param publishConfig Tag and version comparison strategy. + * @returns The release type and previous version. + */ export function compareVersions( - versions: VersionsResult, + version: string, + publishedVersions: PublishedVersions, publishConfig: PublishConfig ): VersionComparison { - void versions; - void publishConfig; + const { versions: existingVersions, "dist-tags": tags } = publishedVersions; + const { strategy, tag: publishTag } = publishConfig; + const previousVersion = semverValid(tags[publishTag.value]) ?? undefined; + const isUnique = !existingVersions.includes(version); + let releaseType: ReleaseType | undefined; + + if (isUnique) { + if (!previousVersion) { + releaseType = INITIAL; + } else if (semverGreaterThan(version, previousVersion)) { + releaseType = semverDifference(version, previousVersion) ?? undefined; + } else if (strategy.value === STRATEGY_ALL) { + releaseType = DIFFERENT; + } + } - throw new Error("ah"); + return { releaseType, previousVersion }; } diff --git a/src/errors.ts b/src/errors.ts index 07d3c2f..5540d2d 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -1,3 +1,12 @@ +import os from "node:os"; + +import { + ACCESS_PUBLIC, + ACCESS_RESTRICTED, + STRATEGY_ALL, + STRATEGY_UPGRADE, +} from "./options.js"; + export class NpmPublishError extends Error { public originalError: Error | undefined; @@ -13,16 +22,92 @@ export class NpmPublishError extends Error { } } +export class InvalidPackageError extends TypeError { + public constructor(value: unknown) { + super( + `Package must be a directory or package.json file, got "${String(value)}"` + ); + this.name = "PackageJsonReadError"; + } +} + +export class PackageJsonReadError extends Error { + public constructor(manifestPath: string, originalError: unknown) { + const message = [ + `Could not read package.json at ${manifestPath}`, + originalError instanceof Error ? originalError.message : "", + ].join(os.EOL); + + super(message); + this.name = "PackageJsonReadError"; + } +} + +export class PackageJsonParseError extends SyntaxError { + public constructor(manifestPath: string, originalError: unknown) { + const message = [ + `Invalid JSON, could not parse package.json at ${manifestPath}`, + originalError instanceof Error ? originalError.message : "", + ].join(os.EOL); + + super(message); + this.name = "PackageJsonParseError"; + } +} + +export class InvalidPackageNameError extends TypeError { + public constructor(value: unknown) { + super(`Package name must be a string, got "${String(value)}"`); + this.name = "InvalidPackageNameError"; + } +} + +export class InvalidPackageVersionError extends TypeError { + public constructor(value: unknown) { + super(`Package version must be a string, got "${String(value)}"`); + this.name = "InvalidPackageVersionError"; + } +} + +export class InvalidPackagePublishConfigError extends TypeError { + public constructor(value: unknown) { + super(`Publish config must be an object, got "${String(value)}"`); + this.name = "InvalidPackagePublishConfigError"; + } +} + export class InvalidRegistryUrlError extends TypeError { public constructor(value: unknown) { - super(`The given value "${String(value)}" is not a valid registry URL`); + super(`Registry URL invalid, got "${String(value)}"`); this.name = "InvalidRegistryUrlError"; } } export class InvalidTokenError extends TypeError { public constructor() { - super("The given value [omitted for security] is not a valid token"); + super("Token must be a non-empty string."); this.name = "InvalidTokenError"; } } + +export class InvalidAccessError extends TypeError { + public constructor(value: unknown) { + super( + `Access must be "${ACCESS_PUBLIC}" or "${ACCESS_RESTRICTED}", got "${String( + value + )}".` + ); + this.name = "InvalidAccessError"; + } +} + +export class InvalidStrategyError extends TypeError { + public constructor(value: unknown) { + super( + `Strategy must be "${STRATEGY_UPGRADE}" or "${STRATEGY_ALL}", got "${String( + value + )}".` + ); + this.name = "InvalidStrategyError"; + } +} diff --git a/src/index.ts b/src/index.ts index e999876..881f9e3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ // Export the external type definitions as named exports -export * from "./options"; -export * from "./results"; -export * from "./errors"; +export * from "./options.js"; +export * from "./results.js"; +export * from "./errors.js"; // Export `npmPublish` as a named export and the default export -export { npmPublish } from "./npm-publish"; +export { npmPublish } from "./npm-publish.js"; diff --git a/src/normalize-options.ts b/src/normalize-options.ts index f932d44..77ba380 100644 --- a/src/normalize-options.ts +++ b/src/normalize-options.ts @@ -1,12 +1,17 @@ -import type { Options, Access, Strategy } from "./options"; -import type { Manifest } from "./read-manifest"; -import * as errors from "./errors"; +import * as errors from "./errors.js"; +import type { PackageManifest } from "./read-manifest.js"; +import { + ACCESS_PUBLIC, + ACCESS_RESTRICTED, + STRATEGY_UPGRADE, + STRATEGY_ALL, + type Access, + type Strategy, + type Options, +} from "./options.js"; -const DEFAULT_REGISTRY_URL = new URL("https://registry.npmjs.org/"); +const DEFAULT_REGISTRY = "https://registry.npmjs.org/"; const DEFAULT_TAG = "latest"; -const DEFAULT_ACCESS = "public"; -const DEFAULT_ACCESS_SCOPED = "restricted"; -const DEFAULT_STRATEGY = "upgrade"; /** * Normalized and sanitized auth and publish configurations. @@ -16,16 +21,11 @@ export interface NormalizedOptions { publishConfig: PublishConfig; } -interface ConfigValue { - value: TValue; - isDefault: boolean; -} - /** * Normalized and sanitized auth configuration. */ export interface AuthConfig { - registryUrl: ConfigValue; + registry: ConfigValue; token: ConfigValue; } @@ -33,68 +33,102 @@ export interface AuthConfig { * Normalized and sanitized publish configuration. */ export interface PublishConfig { - packageSpec: ConfigValue; tag: ConfigValue; - access: ConfigValue; + access: ConfigValue; dryRun: ConfigValue; strategy: ConfigValue; } -const setValue = ( - value: T | undefined, - defaultValue: T -): ConfigValue => ({ - value: value ?? defaultValue, - isDefault: value === undefined || value === defaultValue, -}); - -const setUrlValue = ( - value: URL | undefined, - defaultValue: URL -): ConfigValue => ({ - value: value ?? defaultValue, - isDefault: value === undefined || value?.href === defaultValue.href, -}); +/** + * A config value, and whether that value differs from default. + */ +export interface ConfigValue { + value: TValue; + isDefault: boolean; +} /** * Normalizes and sanitizes options, and fills-in any default values. + * + * @param options User-input options. + * @param manifest Package metadata from package.json. + * @returns Validated auth and publish configuration. */ export function normalizeOptions( options: Options, - manifest: Manifest + manifest: PackageManifest ): NormalizedOptions { - let defaultRegistryUrl = DEFAULT_REGISTRY_URL; - let defaultTag = DEFAULT_TAG; - let defaultAccess: Access = manifest.scope - ? DEFAULT_ACCESS_SCOPED - : DEFAULT_ACCESS; - - let registryUrl; - - if (options.registryUrl !== undefined) { - try { - registryUrl = new URL(options.registryUrl); - } catch { - throw new errors.InvalidRegistryUrlError(options.registryUrl); - } + const defaultTag = manifest.publishConfig?.tag ?? DEFAULT_TAG; + + const defaultRegistry = manifest.publishConfig?.registry ?? DEFAULT_REGISTRY; + + const defaultAccess = + manifest.publishConfig?.access ?? + (manifest.scope === undefined ? ACCESS_PUBLIC : undefined); + + return { + authConfig: { + token: setValue(options.token, "", validateToken), + registry: setValue(options.registry, defaultRegistry, validateRegistry), + }, + publishConfig: { + tag: setValue(options.tag, defaultTag, validateTag), + access: setValue(options.access, defaultAccess, validateAccess), + dryRun: setValue(options.dryRun, false, validateDryRun), + strategy: setValue(options.strategy, STRATEGY_ALL, validateStrategy), + }, + }; +} + +const setValue = ( + value: unknown, + defaultValue?: unknown, + validate: (value: unknown) => TValue = (_) => _ as TValue +): ConfigValue => ({ + value: validate(value ?? defaultValue), + isDefault: value === undefined, +}); + +const validateToken = (value: unknown): string => { + if (typeof value === "string" && value.length > 0) { + return value; } - if (options.token !== undefined && typeof options.token !== "string") { - throw new errors.InvalidTokenError(); + throw new errors.InvalidTokenError(); +}; + +const validateRegistry = (value: unknown): URL => { + try { + return new URL(value as string | URL); + } catch { + throw new errors.InvalidRegistryUrlError(value); } +}; - const authConfig: AuthConfig = { - token: { value: options.token, isDefault: false }, - registryUrl: setUrlValue(registryUrl, defaultRegistryUrl), - }; +const validateTag = (value: unknown): string => { + return value as string; +}; - const publishConfig: PublishConfig = { - packageSpec: setValue(undefined, ""), - tag: setValue(undefined, defaultTag), - access: setValue(undefined, defaultAccess), - dryRun: setValue(undefined, false), - strategy: setValue(undefined, DEFAULT_STRATEGY), - }; +const validateDryRun = (value: unknown): boolean => { + return value as boolean; +}; - return { authConfig, publishConfig }; -} +const validateAccess = (value: unknown): Access | undefined => { + if ( + value === undefined || + value === ACCESS_PUBLIC || + value === ACCESS_RESTRICTED + ) { + return value; + } + + throw new errors.InvalidAccessError(value); +}; + +const validateStrategy = (value: unknown): Strategy => { + if (value === STRATEGY_ALL || value === STRATEGY_UPGRADE) { + return value; + } + + throw new errors.InvalidStrategyError(value); +}; diff --git a/src/npm-publish.ts b/src/npm-publish.ts index 87e7903..8eb1441 100644 --- a/src/npm-publish.ts +++ b/src/npm-publish.ts @@ -1,22 +1,30 @@ -import { readManifest } from "./read-manifest"; -import { normalizeOptions } from "./normalize-options"; -import { getVersions, publish } from "./npm"; -import { compareVersions } from "./compare-versions"; -import type { Options } from "./options"; -import type { Results } from "./results"; +import { readManifest } from "./read-manifest.js"; +import { normalizeOptions } from "./normalize-options.js"; +import { getVersions, publish } from "./npm/index.js"; +import { compareVersions } from "./compare-versions.js"; +import type { Options } from "./options.js"; +import type { Results } from "./results.js"; /** - * Publishes a package to NPM, if its version has changed + * Publishes a package to NPM, if its version has changed. + * + * @param options Publish options. + * @returns Release metadata. */ export async function npmPublish(options: Options): Promise { - const manifest = await readManifest(options.package); + const { packageSpec, manifest } = await readManifest(options.package); const { authConfig, publishConfig } = normalizeOptions(options, manifest); const publishedVersions = await getVersions(manifest.name, authConfig); - const versionComparison = compareVersions(publishedVersions, publishConfig); + const versionComparison = compareVersions( + manifest.version, + publishedVersions, + publishConfig + ); + let publishResult; if (versionComparison.releaseType !== undefined) { - publishResult = await publish(publishConfig, authConfig); + publishResult = await publish(packageSpec, publishConfig, authConfig); } return { @@ -25,9 +33,10 @@ export async function npmPublish(options: Options): Promise { version: manifest.version, releaseType: versionComparison.releaseType, previousVersion: versionComparison.previousVersion, + registry: authConfig.registry.value, tag: publishConfig.tag.value, access: publishConfig.access.value, + strategy: publishConfig.strategy.value, dryRun: publishConfig.dryRun.value, - registryUrl: authConfig.registryUrl.value, }; } diff --git a/src/npm/__tests__/call-npm-cli.test.ts b/src/npm/__tests__/call-npm-cli.test.ts index 93d0a62..0a1a60d 100644 --- a/src/npm/__tests__/call-npm-cli.test.ts +++ b/src/npm/__tests__/call-npm-cli.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect } from "vitest"; -import * as subject from "../call-npm-cli"; +import * as subject from "../call-npm-cli.js"; describe("callNpmCli", () => { it("should call the NPM CLI in JSON mode", async () => { @@ -37,7 +37,7 @@ describe("callNpmCli", () => { it("should allow the environment to be overriden", async () => { const result = await subject.callNpmCli("config", ["get", "userconfig"], { - env: { npm_config_userconfig: "/foo/bar/.npmrc" }, + environment: { npm_config_userconfig: "/foo/bar/.npmrc" }, }); expect(result).toEqual("/foo/bar/.npmrc"); diff --git a/src/npm/__tests__/get-publish-args.test.ts b/src/npm/__tests__/get-publish-args.test.ts deleted file mode 100644 index ec207e8..0000000 --- a/src/npm/__tests__/get-publish-args.test.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { describe, it, expect } from "vitest"; - -import * as subject from "../get-publish-args"; - -describe("getPublishArgs", () => { - it("should add the package spec positional argument", () => { - const result = subject.getPublishArgs({ - packageSpec: { value: "./cool-package", isDefault: false }, - tag: { value: "next", isDefault: false }, - access: { value: "restricted", isDefault: false }, - dryRun: { value: false, isDefault: false }, - strategy: { value: "upgrade", isDefault: true }, - }); - - expect(result).toEqual([ - "./cool-package", - "--tag", - "next", - "--access", - "restricted", - "--dry-run", - "false", - ]); - }); -}); diff --git a/src/npm/__tests__/get-publish-arguments.test.ts b/src/npm/__tests__/get-publish-arguments.test.ts new file mode 100644 index 0000000..9422220 --- /dev/null +++ b/src/npm/__tests__/get-publish-arguments.test.ts @@ -0,0 +1,52 @@ +import { describe, it, expect } from "vitest"; + +import * as subject from "../get-publish-arguments.js"; + +describe("getPublishArguments", () => { + it("should add explicit arguments", () => { + const result = subject.getPublishArguments("./cool-package", { + tag: { value: "next", isDefault: false }, + access: { value: "restricted", isDefault: false }, + dryRun: { value: false, isDefault: false }, + strategy: { value: "upgrade", isDefault: true }, + }); + + expect(result).toEqual([ + "./cool-package", + "--tag", + "next", + "--access", + "restricted", + "--dry-run", + "false", + ]); + }); + + it("should omit default arguments", () => { + const result = subject.getPublishArguments("./cool-package", { + tag: { value: "next", isDefault: true }, + access: { value: "restricted", isDefault: true }, + dryRun: { value: false, isDefault: true }, + strategy: { value: "upgrade", isDefault: true }, + }); + + expect(result).toEqual(["./cool-package"]); + }); + + it("should omit undefined arguments", () => { + const result = subject.getPublishArguments("./cool-package", { + tag: { value: "next", isDefault: false }, + access: { value: undefined, isDefault: false }, + dryRun: { value: false, isDefault: false }, + strategy: { value: "upgrade", isDefault: true }, + }); + + expect(result).toEqual([ + "./cool-package", + "--tag", + "next", + "--dry-run", + "false", + ]); + }); +}); diff --git a/src/npm/__tests__/npm.test.ts b/src/npm/__tests__/npm.test.ts index 1a2611f..25e1249 100644 --- a/src/npm/__tests__/npm.test.ts +++ b/src/npm/__tests__/npm.test.ts @@ -2,24 +2,26 @@ import { vi, describe, it, beforeEach, afterEach, expect } from "vitest"; import { imitateEsm, reset } from "testdouble-vitest"; import * as td from "testdouble"; -import type { AuthConfig, PublishConfig } from "../../normalize-options"; +import type { AuthConfig, PublishConfig } from "../../normalize-options.js"; -import * as subject from ".."; -import { useNpmEnv, type NpmCliTask } from "../use-npm-env"; -import { callNpmCli } from "../call-npm-cli"; -import { getPublishArgs } from "../get-publish-args"; +import * as subject from "../index.js"; +import { useNpmEnvironment, type NpmCliTask } from "../use-npm-environment.js"; +import { callNpmCli } from "../call-npm-cli.js"; +import { getPublishArguments } from "../get-publish-arguments.js"; -vi.mock("../use-npm-env", () => imitateEsm("../use-npm-env")); +vi.mock("../use-npm-environment", () => imitateEsm("../use-npm-environment")); vi.mock("../call-npm-cli", () => imitateEsm("../call-npm-cli")); -vi.mock("../get-publish-args", () => imitateEsm("../get-publish-args")); +vi.mock("../get-publish-arguments", () => + imitateEsm("../get-publish-arguments") +); describe("npm", () => { const authConfig = { token: { value: "abc123" } } as AuthConfig; - const cliEnv = { foo: "bar" }; + const environment = { foo: "bar" }; beforeEach(() => { - td.when(useNpmEnv(authConfig, td.matchers.isA(Function))).thenDo( - (_: unknown, task: NpmCliTask) => task(cliEnv) + td.when(useNpmEnvironment(authConfig, td.matchers.isA(Function))).thenDo( + (_: unknown, task: NpmCliTask) => task(environment) ); }); @@ -29,10 +31,10 @@ describe("npm", () => { it("should get existing versions", async () => { td.when( - callNpmCli( + callNpmCli( "view", ["@example/cool-package", "dist-tags", "versions"], - { env: cliEnv, ifError: { e404: { "dist-tags": {}, versions: [] } } } + { environment, ifError: { e404: { "dist-tags": {}, versions: [] } } } ) ).thenResolve({ "dist-tags": { latest: "1.2.3" }, @@ -53,14 +55,21 @@ describe("npm", () => { it("should publish a package", async () => { const publishConfig = { tag: { value: "next" } } as PublishConfig; - td.when(getPublishArgs(publishConfig)).thenReturn(["--tag", "next"]); + td.when(getPublishArguments("./package", publishConfig)).thenReturn([ + "--tag", + "next", + ]); td.when( callNpmCli("publish", ["--tag", "next"], { - env: cliEnv, + environment, }) ).thenResolve({ id: "@example/cool-package@1.2.3" }); - const result = await subject.publish(publishConfig, authConfig); + const result = await subject.publish( + "./package", + publishConfig, + authConfig + ); expect(result).toEqual({ id: "@example/cool-package@1.2.3" }); }); diff --git a/src/npm/call-npm-cli.ts b/src/npm/call-npm-cli.ts index af9174e..07ba9c2 100644 --- a/src/npm/call-npm-cli.ts +++ b/src/npm/call-npm-cli.ts @@ -1,60 +1,68 @@ import childProcess from "node:child_process"; -export type NpmCliEnv = Record; +import type { NpmCliEnvironment } from "./use-npm-environment.js"; export interface NpmCliOptions { - env?: Record; + environment?: NpmCliEnvironment; ifError?: Record; } +const JSON_MATCH_RE = /(\{[\s\S]*\})/mu; + const execProcess = ( command: string, - env: Record = {} -): Promise<{ stdout: string; error: Error | null }> => { - // strip Node.js environment and runtime options out of the call to NPM - const { - NODE_ENV: _NODE_ENV, - NODE_OPTIONS: _NODE_OPTIONS, - ...processEnv - } = process.env; - + environment: Record = {} +): Promise<{ stdout: string; stderr: string; error: Error | null }> => { return new Promise((resolve) => { childProcess.exec( command, - { env: { ...processEnv, ...env } }, - (error, stdout) => resolve({ stdout: stdout.trim(), error }) + { env: { ...process.env, ...environment } }, + (error, stdout, stderr) => { + return resolve({ stdout: stdout.trim(), stderr: stderr.trim(), error }); + } ); }); }; -const parseJson = (value: string): TParsed | undefined => { - try { - return JSON.parse(value) as TParsed; - } catch { - return undefined; +const parseJson = (...values: string[]): TParsed | undefined => { + for (const value of values) { + const jsonValue = JSON_MATCH_RE.exec(value)?.[1]; + + if (jsonValue) { + try { + return JSON.parse(jsonValue) as TParsed; + } catch { + return undefined; + } + } } + + return undefined; }; /** * Call the NPM CLI in JSON mode. * * @param command The command of the NPM CLI to call - * @param args Any arguments to send to the command + * @param cliArguments Any arguments to send to the command * @param options Customize environment variables or add an error handler. * @returns The parsed JSON, or stdout if unparsable. */ export async function callNpmCli( command: string, - args: string[], + cliArguments: string[], options: NpmCliOptions = {} ): Promise { - const { stdout, error } = await execProcess( - ["npm", command, "--ignore-scripts", "--json", ...args].join(" "), - options?.env + const { stdout, stderr, error } = await execProcess( + ["npm", command, "--ignore-scripts", "--json", ...cliArguments].join(" "), + options.environment ); if (error) { - const errorPayload = parseJson<{ error: { code?: string | null } }>(stdout); + const errorPayload = parseJson<{ error?: { code?: string | null } }>( + stdout, + stderr + ); const errorCode = errorPayload?.error?.code?.toLowerCase(); if ( diff --git a/src/npm/get-publish-args.ts b/src/npm/get-publish-args.ts deleted file mode 100644 index 2b69d8f..0000000 --- a/src/npm/get-publish-args.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { PublishConfig } from "../normalize-options"; - -/** - * Given a publish configuration, get the NPM CLI publish arguments. - * - * @param config Publish configuration - * @returns Arguments to pass to the NPM CLI - */ -export function getPublishArgs(config: PublishConfig): string[] { - const { packageSpec, tag, access, dryRun } = config; - - return [ - packageSpec.value, - "--tag", - tag.value, - "--access", - access.value, - "--dry-run", - JSON.stringify(dryRun.value), - ]; -} diff --git a/src/npm/get-publish-arguments.ts b/src/npm/get-publish-arguments.ts new file mode 100644 index 0000000..2399fb2 --- /dev/null +++ b/src/npm/get-publish-arguments.ts @@ -0,0 +1,34 @@ +import type { PublishConfig } from "../normalize-options.js"; + +/** + * Given a publish configuration, get the NPM CLI publish arguments. + * + * @param packageSpec Package specification path + * @param config Publish configuration + * @returns Arguments to pass to the NPM CLI + */ +export function getPublishArguments( + packageSpec: string, + config: PublishConfig +): string[] { + const { tag, access, dryRun } = config; + const publishArguments = []; + + if (packageSpec.length > 0) { + publishArguments.push(packageSpec); + } + + if (!tag.isDefault) { + publishArguments.push("--tag", tag.value); + } + + if (!access.isDefault && access.value) { + publishArguments.push("--access", access.value); + } + + if (!dryRun.isDefault) { + publishArguments.push("--dry-run", JSON.stringify(dryRun.value)); + } + + return publishArguments; +} diff --git a/src/npm/index.ts b/src/npm/index.ts index 3ae83c5..0d7d476 100644 --- a/src/npm/index.ts +++ b/src/npm/index.ts @@ -1,9 +1,9 @@ -import type { AuthConfig, PublishConfig } from "../normalize-options"; -import { useNpmEnv } from "./use-npm-env"; -import { callNpmCli } from "./call-npm-cli"; -import { getPublishArgs } from "./get-publish-args"; +import type { AuthConfig, PublishConfig } from "../normalize-options.js"; +import { useNpmEnvironment } from "./use-npm-environment.js"; +import { callNpmCli } from "./call-npm-cli.js"; +import { getPublishArguments } from "./get-publish-arguments.js"; -export interface VersionsResult { +export interface PublishedVersions { "dist-tags": Record; versions: string[]; } @@ -22,12 +22,12 @@ export interface PublishResult { export async function getVersions( packageName: string, authConfig: AuthConfig -): Promise { - return useNpmEnv(authConfig, (env) => { - return callNpmCli( +): Promise { + return useNpmEnvironment(authConfig, (environment) => { + return callNpmCli( "view", [packageName, "dist-tags", "versions"], - { env, ifError: { e404: { "dist-tags": {}, versions: [] } } } + { environment, ifError: { e404: { "dist-tags": {}, versions: [] } } } ); }); } @@ -35,16 +35,21 @@ export async function getVersions( /** * Publish a package. * - * @param publishConfig Publish options. + * @param packageSpec Package specification to pass to npm. + * @param publishConfig Publish configuration. + * @param authConfig Registry and auth token. * @returns Release metadata. */ export async function publish( + packageSpec: string, publishConfig: PublishConfig, authConfig: AuthConfig ): Promise { - const publishArgs = getPublishArgs(publishConfig); + const publishArguments = getPublishArguments(packageSpec, publishConfig); - return useNpmEnv(authConfig, (env) => { - return callNpmCli("publish", publishArgs, { env }); + return useNpmEnvironment(authConfig, (environment) => { + return callNpmCli("publish", publishArguments, { + environment, + }); }); } diff --git a/src/npm/use-npm-env.ts b/src/npm/use-npm-env.ts deleted file mode 100644 index f166fda..0000000 --- a/src/npm/use-npm-env.ts +++ /dev/null @@ -1,57 +0,0 @@ -import fs from "node:fs/promises"; -import os from "node:os"; -import path from "node:path"; - -import type { AuthConfig } from "../normalize-options"; -import { callNpmCli, type NpmCliEnv } from "./call-npm-cli"; - -export type NpmCliTask = (env: NpmCliEnv) => Promise; - -/** - * Create a temporary .npmrc file with the given auth token, - * and call a task with env vars set to use that .npmrc. - * - * @param auth Registry and token. - * @param task A function called with the configured environment. - * After the function resolves, the temporary .npmrc file will be removed. - * @returns The resolved value of `task` - */ -export async function useNpmEnv( - auth: AuthConfig, - task: NpmCliTask -): Promise { - const { registryUrl, token } = auth; - const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "npm-publish-")); - const tempConfigFile = path.join(tempDir, ".npmrc"); - const userConfigFile = await callNpmCli("config", ["get", "userconfig"]); - - const userConfig = await fs - .readFile(userConfigFile, "utf8") - .catch((error: NodeJS.ErrnoException) => { - if (error.code === "ENOENT") return ""; - throw error; - }); - - const config = [ - `; copied from ${userConfig}`, - userConfig, - "; added by jsdevtools/npm-publish", - `registry=${registryUrl.value.href}`, - `//${registryUrl.value.hostname}/:authToken=\${NODE_AUTH_TOKEN}`, - "", - ].join(os.EOL); - - const env: NpmCliEnv = { npm_config_userconfig: tempConfigFile }; - - if (token.value) { - env.NODE_AUTH_TOKEN = token.value; - } - - await fs.writeFile(tempConfigFile, config, "utf8"); - - try { - return await task(env); - } finally { - await fs.rm(tempDir, { force: true, recursive: true }); - } -} diff --git a/src/npm/use-npm-environment.ts b/src/npm/use-npm-environment.ts new file mode 100644 index 0000000..1771f85 --- /dev/null +++ b/src/npm/use-npm-environment.ts @@ -0,0 +1,49 @@ +import fs from "node:fs/promises"; +import os from "node:os"; +import path from "node:path"; + +import type { AuthConfig } from "../normalize-options.js"; + +export type NpmCliEnvironment = Record; + +export type NpmCliTask = ( + environment: NpmCliEnvironment +) => Promise; + +/** + * Create a temporary .npmrc file with the given auth token, + * and call a task with env vars set to use that .npmrc. + * + * @param auth Registry and token. + * @param task A function called with the configured environment. + * After the function resolves, the temporary .npmrc file will be removed. + * @returns The resolved value of `task` + */ +export async function useNpmEnvironment( + auth: AuthConfig, + task: NpmCliTask +): Promise { + const { registry, token } = auth; + const npmrcDirectory = await fs.mkdtemp( + path.join(os.tmpdir(), "npm-publish-") + ); + const npmrc = path.join(npmrcDirectory, ".npmrc"); + + const config = [ + "; created by jsdevtools/npm-publish", + `//${registry.value.hostname}/:authToken=\${NODE_AUTH_TOKEN}`, + registry.isDefault ? "" : `registry=${registry.value.href}`, + "", + ].join(os.EOL); + + await fs.writeFile(npmrc, config, "utf8"); + + try { + return await task({ + NODE_AUTH_TOKEN: token.value, + npm_config_userconfig: npmrc, + }); + } finally { + await fs.rm(npmrcDirectory, { force: true, recursive: true }); + } +} diff --git a/src/options.ts b/src/options.ts index 4a8567c..6362c91 100644 --- a/src/options.ts +++ b/src/options.ts @@ -1,17 +1,23 @@ /** * The possible access levels for an NPM package */ -export type Access = "public" | "restricted"; +export type Access = typeof ACCESS_PUBLIC | typeof ACCESS_RESTRICTED; + +export const ACCESS_PUBLIC = "public"; +export const ACCESS_RESTRICTED = "restricted"; /** * Version check strategy. * * - `upgrade`: the package will only be published if its version * is higher than the existing version on the configured tag. - * - `always`: the package will be published if its version + * - `all`: the package will be published if its version * is not yet published, even if its lower that the existing tag. */ -export type Strategy = "upgrade" | "always"; +export type Strategy = typeof STRATEGY_UPGRADE | typeof STRATEGY_ALL; + +export const STRATEGY_UPGRADE = "upgrade"; +export const STRATEGY_ALL = "all"; /** * A function that logs messages @@ -42,7 +48,7 @@ export interface Options { * * Defaults to the package in the current working directory. */ - package?: string; + package?: string | undefined; /** * The NPM registry URL to use. @@ -51,7 +57,7 @@ export interface Options { * * Can be overridden by the package.json's `publishConfig` field. */ - registryUrl?: string | URL; + registry?: string | URL | undefined; /** * The tag to publish to. @@ -60,7 +66,7 @@ export interface Options { * * Can be overridden by the package.json's `publishConfig` field. */ - tag?: string; + tag?: string | undefined; /** * Package access. @@ -74,7 +80,7 @@ export interface Options { * * Can be overridden by the package.json's `publishConfig` field. */ - access?: Access; + access?: Access | undefined; /** * Version check strategy. @@ -85,17 +91,12 @@ export interface Options { * * Defaults to `upgrade`. */ - strategy?: Strategy; + strategy?: Strategy | undefined; /** * Pretend to publish, but don't actually upload to the registry. * * Defaults to `false`. */ - dryRun?: boolean; - - /** - * An interface to log messages. - */ - logger?: Logger; + dryRun?: boolean | undefined; } diff --git a/src/read-manifest.ts b/src/read-manifest.ts index 8d7fe03..d43d826 100644 --- a/src/read-manifest.ts +++ b/src/read-manifest.ts @@ -1,54 +1,116 @@ import fs from "node:fs/promises"; import path from "node:path"; -import { ono } from "@jsdevtools/ono"; +import { valid as semverValid } from "semver"; + +import * as errors from "./errors.js"; + +/** + * The result of reading a package manifest + */ +export interface ManifestReadResult { + packageSpec: string; + manifest: PackageManifest; +} /** * A package manifest (package.json) - * - * @internal */ -export interface Manifest { +export interface PackageManifest { name: string; version: string; - scope?: string; + scope: string | undefined; + publishConfig: PackagePublishConfig | undefined; } +/** + * Any publish configuration defined in package.json. + */ +export interface PackagePublishConfig { + tag?: string; + access?: string; + registry?: string; +} + +const SCOPE_RE = /^(@.+)\/.+$/u; + +const MANIFEST_BASENAME = "package.json"; + +const isManifest = (name: unknown): name is string => { + return typeof name === "string" && path.basename(name) === MANIFEST_BASENAME; +}; + +const isDirectory = (name: unknown): name is string => { + return typeof name === "string" && path.extname(name) === ""; +}; + +const isVersion = (version: unknown): version is string => { + return semverValid(version as string) !== null; +}; + /** * Reads the package manifest (package.json) and returns its parsed contents. * * @param packagePath The path to the package being published. * @returns The parsed package metadata. */ -export async function readManifest(packagePath?: string): Promise { - let manifestPath = packagePath; +export async function readManifest( + packagePath: unknown +): Promise { + let packageSpec: string | undefined; + let manifestPath: string; - if (!manifestPath) { + if (!packagePath) { + packageSpec = ""; manifestPath = "package.json"; - } else if (path.extname(manifestPath) === "") { - manifestPath = path.join(manifestPath, "package.json"); + } else if (isManifest(packagePath)) { + packageSpec = path.dirname(packagePath); + manifestPath = packagePath; + } else if (isDirectory(packagePath)) { + packageSpec = packagePath; + manifestPath = path.join(packagePath, MANIFEST_BASENAME); + } else { + throw new errors.InvalidPackageError(packagePath); } - let json: string; + let manifestContents: string; + let manifestJson: Record; + let name: unknown; + let version: unknown; + let publishConfig: unknown; try { - json = await fs.readFile(manifestPath, "utf8"); + manifestContents = await fs.readFile(manifestPath, "utf8"); } catch (error) { - throw ono(error, `Unable to read ${manifestPath}`); + throw new errors.PackageJsonReadError(manifestPath, error); } try { - const { name, version } = JSON.parse(json) as Record; + manifestJson = JSON.parse(manifestContents) as Record; + name = manifestJson.name; + version = manifestJson.version; + publishConfig = manifestJson.publishConfig ?? {}; + } catch (error) { + throw new errors.PackageJsonParseError(manifestPath, error); + } - if (typeof name !== "string" || name.trim().length === 0) { - throw new TypeError("Invalid package name"); - } + if (typeof name !== "string" || name.length === 0) { + throw new errors.InvalidPackageNameError(name); + } - if (typeof version !== "string" || version.trim().length === 0) { - throw new TypeError("Invalid package version"); - } + if (!isVersion(version)) { + throw new errors.InvalidPackageVersionError(version); + } - return { name: name.trim(), version: version.trim() }; - } catch (error) { - throw ono(error, `Unable to parse ${manifestPath}`); + if ( + typeof publishConfig !== "object" || + Array.isArray(publishConfig) || + !publishConfig + ) { + throw new errors.InvalidPackagePublishConfigError(publishConfig); } + + return { + packageSpec, + manifest: { name, version, publishConfig, scope: SCOPE_RE.exec(name)?.[1] }, + }; } diff --git a/src/results.ts b/src/results.ts index 2ae638a..5482ab1 100644 --- a/src/results.ts +++ b/src/results.ts @@ -1,5 +1,5 @@ -import type { Access } from "./options"; -import type { ReleaseType } from "./compare-versions"; +import type { Access, Strategy } from "./options.js"; +import type { ReleaseType } from "./compare-versions.js"; /** * Results of the publish @@ -24,12 +24,17 @@ export interface Results { /** * The type of version change that occurred, if any. */ - releaseType: ReleaseType | undefined; + type: ReleaseType | undefined; /** - * The version number that was previously published to NPM + * The version number that was previously published to NPM, if any. */ - previousVersion: string; + oldVersion: string | undefined; + + /** + * The registry where the package was published + */ + registry: URL; /** * The tag that the package was published to. @@ -39,13 +44,17 @@ export interface Results { /** * Indicates whether the published package is publicly visible * or restricted to members of your NPM organization. + * + * If package is scoped, undefined means npm's scoped package defaults. + * If a scoped package has previously been published as public, + * the default is public. Otherwise, it is restricted. */ - access: Access; + access: Access | undefined; /** - * The registry where the NPM package was published + * Version check strategy used. */ - registryUrl: URL; + strategy: Strategy; /** * Whether this was a dry run (not published to NPM) diff --git a/tsconfig.json b/tsconfig.json index 71b6d67..925c398 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,11 +17,11 @@ "strict": true, "allowUnreachableCode": false, "allowUnusedLabels": false, - // "exactOptionalPropertyTypes": true, + "exactOptionalPropertyTypes": true, "noFallthroughCasesInSwitch": true, "noImplicitOverride": true, "noImplicitReturns": true, - // "noPropertyAccessFromIndexSignature": true, + "noPropertyAccessFromIndexSignature": true, "noUncheckedIndexedAccess": true, "noUnusedLocals": true, "noUnusedParameters": true, @@ -30,13 +30,8 @@ "declaration": true, "sourceMap": true, "rootDir": "src", - "outDir": "lib", - - // temporary overrides - // TODO(mc, 2023-04-12): fix errors and remove overrides - "useUnknownInCatchVariables": false, - "exactOptionalPropertyTypes": false, - "noPropertyAccessFromIndexSignature": false + "outDir": "lib" }, - "include": ["src/**/*.ts"] + "include": ["src/**/*.ts"], + "exclude": ["src/cli/**/*"] } From c3abcae939b58d19a24a4bc468919199d5e509f9 Mon Sep 17 00:00:00 2001 From: Michael Cousins Date: Mon, 17 Apr 2023 14:09:21 -0400 Subject: [PATCH 08/36] wip: let's see how this does --- .eslintrc.yml | 19 +- CONTRIBUTING.md | 13 +- action.yml | 29 +- bin/npm-publish.js | 12 +- dist/index.js.map | 7 - dist/{index.js => main.js} | 8430 +++++++++-------- package.json | 8 +- src/__tests__/compare-versions.test.ts | 24 +- src/__tests__/npm-publish.test.ts | 21 +- src/action/__tests__/run.test.ts | 7 +- src/action/core.ts | 13 + src/action/{index.ts => main.ts} | 2 +- src/action/run.ts | 5 +- src/cli/__tests__/cli.test.ts | 93 + src/cli/__tests__/parse-cli-arguments.test.ts | 90 + src/cli/exit-code.ts | 11 - src/cli/help.ts | 25 - src/cli/index.ts | 113 +- src/cli/parse-args.ts | 76 - src/cli/parse-cli-arguments.ts | 56 + src/compare-versions.ts | 20 +- src/errors.ts | 23 +- src/format-publish-result.ts | 40 + src/npm-publish.ts | 11 +- src/npm/__tests__/npm.test.ts | 15 +- src/npm/call-npm-cli.ts | 13 +- src/npm/index.ts | 22 +- src/npm/use-npm-environment.ts | 2 +- src/options.ts | 25 +- src/read-manifest.ts | 16 +- test/fixtures/bin/npm | 74 - test/fixtures/bin/npm.cmd | 7 - test/fixtures/chai.js | 5 - test/fixtures/mocha-hooks.js | 20 - test/fixtures/mock-npm.js | 26 - test/specs/action/failure.spec.js | 294 - test/specs/action/success.spec.js | 769 -- test/specs/cli/args.spec.js | 162 - test/specs/cli/failure.spec.js | 210 - test/specs/cli/success.spec.js | 579 -- test/specs/lib/exports.spec.js | 31 - test/specs/lib/failure.spec.js | 234 - test/specs/lib/success.spec.js | 604 -- test/utils/exec.js | 37 - test/utils/files.js | 48 - test/utils/npm.js | 83 - test/utils/paths.js | 52 - tsconfig.json | 3 +- vitest.config.ts | 1 + 49 files changed, 4743 insertions(+), 7737 deletions(-) delete mode 100644 dist/index.js.map rename dist/{index.js => main.js} (98%) rename src/action/{index.ts => main.ts} (65%) create mode 100644 src/cli/__tests__/cli.test.ts create mode 100644 src/cli/__tests__/parse-cli-arguments.test.ts delete mode 100644 src/cli/exit-code.ts delete mode 100644 src/cli/help.ts delete mode 100644 src/cli/parse-args.ts create mode 100644 src/cli/parse-cli-arguments.ts create mode 100644 src/format-publish-result.ts delete mode 100755 test/fixtures/bin/npm delete mode 100644 test/fixtures/bin/npm.cmd delete mode 100644 test/fixtures/chai.js delete mode 100644 test/fixtures/mocha-hooks.js delete mode 100644 test/fixtures/mock-npm.js delete mode 100644 test/specs/action/failure.spec.js delete mode 100644 test/specs/action/success.spec.js delete mode 100644 test/specs/cli/args.spec.js delete mode 100644 test/specs/cli/failure.spec.js delete mode 100644 test/specs/cli/success.spec.js delete mode 100644 test/specs/lib/exports.spec.js delete mode 100644 test/specs/lib/failure.spec.js delete mode 100644 test/specs/lib/success.spec.js delete mode 100644 test/utils/exec.js delete mode 100644 test/utils/files.js delete mode 100644 test/utils/npm.js delete mode 100644 test/utils/paths.js diff --git a/.eslintrc.yml b/.eslintrc.yml index d5258cb..53e7504 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -39,27 +39,10 @@ overrides: - files: ["**/__tests__/**/*"] rules: "@typescript-eslint/no-unsafe-argument": "off" + "@typescript-eslint/no-unsafe-assignment": "off" sonarjs/no-duplicate-string: "off" unicorn/no-useless-undefined: "off" - files: ["src/action/**/*"] rules: n/no-unpublished-import: "off" - - # temporary rule overrides - # TODO(mc, 2023-04-12): fix problems, remove overrides, and remove --quiet - - files: ["bin/**/*", "src/cli/**/*"] - rules: - n/no-process-exit: "warn" - unicorn/no-process-exit: "warn" - prefer-const: "warn" - unicorn/prevent-abbreviations: "warn" - unicorn/prefer-module: "warn" - unicorn/prefer-top-level-await: "warn" - "@typescript-eslint/no-floating-promises": "warn" - "@typescript-eslint/no-unsafe-call": "warn" - "@typescript-eslint/no-unsafe-member-access": "warn" - "@typescript-eslint/restrict-template-expressions": "warn" - jsdoc/require-jsdoc: "warn" - jsdoc/require-param: "warn" - jsdoc/require-returns: "warn" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8b18422..b43df0c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,16 +13,19 @@ git clone https://github.com/JS-DevTools/npm-publish.git # Install dependencies* npm install -# Build the code -npm run build - -# Run the tests -npm test +# Run all checks, builds, and unit tests +npm run all ``` There are also various code quality checks and tests you can run: ```shell +# Run builds and typechecking +npm run build + +# Run the unit tests in watch mode +npm run test + # Autoformat the code npm run format diff --git a/action.yml b/action.yml index 72d3e72..357237a 100644 --- a/action.yml +++ b/action.yml @@ -24,13 +24,14 @@ inputs: required: false access: - description: Determines whether the published package should be publicly - visible, or restricted to members of your NPM organization. This only - applies to scoped packages. + description: > + Determines whether the published package should be publicly visible, + or restricted to members of your NPM organization. required: false strategy: - description: Version check and release strategy. + description: > + Version check and release strategy. If "all" (default), package will be published if its version is simply not yet published. If "upgrade", package will be published if its version is higher than the existing tag, according to semantic versioning. @@ -43,12 +44,14 @@ inputs: outputs: id: - description: The identifier of the published package. + description: > + The identifier of the published package. If a release was published, format is `${name}@${version}. If no release occurred, will be an empty string. type: - description: The type of version change that occurred on the published tag. + description: > + The type of version change that occurred on the published tag. If release was an upgrade, will be a semver release type ("major", "minor", ...). If the published tag had no previous version, will be "initial". If version was change was not an upgrade, will be "different". @@ -61,7 +64,8 @@ outputs: description: Version of the package. old-version: - description: The previous version on the distribution tag. + description: > + The previous version on the distribution tag. If there was no previous version on the tag, will be an empty string. registry: @@ -71,11 +75,12 @@ outputs: description: The distribution tag used for version checking and publishing. access: - description: The package access setting used. - If configured by the action or package.json, will be "public" or "protected". - If not configured for a non-scoped package, will be "public". - If not configured for a scoped package, will be "default". + description: > + The package access setting used. + If configured by the action or package.json, will be "public" or "protected". + If not configured for a non-scoped package, will be "public". + If not configured for a scoped package, will be "default". runs: using: node16 - main: dist/index.js + main: dist/main.js diff --git a/bin/npm-publish.js b/bin/npm-publish.js index cd0bf1f..e9c11da 100644 --- a/bin/npm-publish.js +++ b/bin/npm-publish.js @@ -1,4 +1,12 @@ #!/usr/bin/env node +/* eslint-disable unicorn/prefer-module, unicorn/prefer-top-level-await */ "use strict"; -const { main } = require("../lib/cli"); -main(process.argv.slice(2)); + +const process = require("node:process"); +const { version } = require("../package.json"); +const { main } = require("../lib/cli/index.js"); + +main(process.argv.slice(2), version).catch((error) => { + console.log(error); + process.exitCode = 1; +}); diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 35e0137..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../node_modules/@actions/core/src/utils.ts", "../node_modules/@actions/core/src/command.ts", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js", "../node_modules/@actions/core/src/file-command.ts", "../node_modules/@actions/http-client/src/proxy.ts", "../node_modules/tunnel/lib/tunnel.js", "../node_modules/tunnel/index.js", "../node_modules/@actions/http-client/src/index.ts", "../node_modules/@actions/http-client/src/auth.ts", "../node_modules/@actions/core/src/oidc-utils.ts", "../node_modules/@actions/core/src/summary.ts", "../node_modules/@actions/core/src/path-utils.ts", "../node_modules/@actions/core/src/core.ts", "../node_modules/semver/internal/constants.js", "../node_modules/semver/internal/debug.js", "../node_modules/semver/internal/re.js", "../node_modules/semver/internal/parse-options.js", "../node_modules/semver/internal/identifiers.js", "../node_modules/semver/classes/semver.js", "../node_modules/semver/functions/parse.js", "../node_modules/semver/functions/valid.js", "../node_modules/semver/functions/clean.js", "../node_modules/semver/functions/inc.js", "../node_modules/semver/functions/compare.js", "../node_modules/semver/functions/eq.js", "../node_modules/semver/functions/diff.js", "../node_modules/semver/functions/major.js", "../node_modules/semver/functions/minor.js", "../node_modules/semver/functions/patch.js", "../node_modules/semver/functions/prerelease.js", "../node_modules/semver/functions/rcompare.js", "../node_modules/semver/functions/compare-loose.js", "../node_modules/semver/functions/compare-build.js", "../node_modules/semver/functions/sort.js", "../node_modules/semver/functions/rsort.js", "../node_modules/semver/functions/gt.js", "../node_modules/semver/functions/lt.js", "../node_modules/semver/functions/neq.js", "../node_modules/semver/functions/gte.js", "../node_modules/semver/functions/lte.js", "../node_modules/semver/functions/cmp.js", "../node_modules/semver/functions/coerce.js", "../node_modules/semver/node_modules/yallist/iterator.js", "../node_modules/semver/node_modules/yallist/yallist.js", "../node_modules/semver/node_modules/lru-cache/index.js", "../node_modules/semver/classes/range.js", "../node_modules/semver/classes/comparator.js", "../node_modules/semver/functions/satisfies.js", "../node_modules/semver/ranges/to-comparators.js", "../node_modules/semver/ranges/max-satisfying.js", "../node_modules/semver/ranges/min-satisfying.js", "../node_modules/semver/ranges/min-version.js", "../node_modules/semver/ranges/valid.js", "../node_modules/semver/ranges/outside.js", "../node_modules/semver/ranges/gtr.js", "../node_modules/semver/ranges/ltr.js", "../node_modules/semver/ranges/intersects.js", "../node_modules/semver/ranges/simplify.js", "../node_modules/semver/ranges/subset.js", "../node_modules/semver/index.js", "../src/action/index.ts", "../src/options.ts", "../src/errors.ts", "../src/read-manifest.ts", "../src/normalize-options.ts", "../src/npm/use-npm-environment.ts", "../src/npm/call-npm-cli.ts", "../src/npm/get-publish-arguments.ts", "../src/npm/index.ts", "../src/compare-versions.ts", "../src/npm-publish.ts", "../src/action/core.ts", "../src/action/run.ts"], - "sourcesContent": [null, null, "import crypto from 'crypto';\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\nexport default function rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n crypto.randomFillSync(rnds8Pool);\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}", "export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;", "import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;", "import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;", "import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;", "import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;", "import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}", "import crypto from 'crypto';\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('md5').update(bytes).digest();\n}\n\nexport default md5;", "import v35 from './v35.js';\nimport md5 from './md5.js';\nconst v3 = v35('v3', 0x30, md5);\nexport default v3;", "import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;", "import crypto from 'crypto';\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('sha1').update(bytes).digest();\n}\n\nexport default sha1;", "import v35 from './v35.js';\nimport sha1 from './sha1.js';\nconst v5 = v35('v5', 0x50, sha1);\nexport default v5;", "export default '00000000-0000-0000-0000-000000000000';", "import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;", "export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';", null, null, "'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n", "module.exports = require('./lib/tunnel');\n", null, null, null, null, null, null, "// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n", "const debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n", "const { MAX_SAFE_COMPONENT_LENGTH } = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst src = exports.src = []\nconst t = exports.t = {}\nlet R = 0\n\nconst createToken = (name, value, isGlobal) => {\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '[0-9]+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', '\\\\d*[a-zA-Z-][a-zA-Z0-9-]*')\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+')\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCE', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n", "// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n", "const numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n", "const debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0)\n }\n }\n if (identifier) {\n const base = Number(identifierBase) ? 1 : 0\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, base]\n }\n } else {\n this.prerelease = [identifier, base]\n }\n }\n break\n\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.format()\n this.raw = this.version\n return this\n }\n}\n\nmodule.exports = SemVer\n", "const { MAX_LENGTH } = require('../internal/constants')\nconst SemVer = require('../classes/semver')\nconst parse = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n try {\n return new SemVer(version, options)\n } catch (er) {\n return null\n }\n}\n\nmodule.exports = parse\n", "const parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n", "const parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n", "const SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n", "const SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n", "const compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n", "const parse = require('./parse')\nconst eq = require('./eq')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1)\n const v2 = parse(version2)\n if (eq(v1, v2)) {\n return null\n } else {\n const hasPre = v1.prerelease.length || v2.prerelease.length\n const prefix = hasPre ? 'pre' : ''\n const defaultResult = hasPre ? 'prerelease' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n if (!v1.prerelease.length || !v2.prerelease.length) {\n if (v1.patch) {\n return 'patch'\n }\n if (v1.minor) {\n return 'minor'\n }\n if (v1.major) {\n return 'major'\n }\n }\n return defaultResult // may be undefined\n }\n}\nmodule.exports = diff\n", "const SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n", "const SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n", "const SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n", "const parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n", "const compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n", "const compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n", "const SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n", "const compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n", "const compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n", "const compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n", "const compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n", "const compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n", "const compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n", "const compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n", "const eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n", "const SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n let next\n while ((next = re[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n re[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)\n}\nmodule.exports = coerce\n", "'use strict'\nmodule.exports = function (Yallist) {\n Yallist.prototype[Symbol.iterator] = function* () {\n for (let walker = this.head; walker; walker = walker.next) {\n yield walker.value\n }\n }\n}\n", "'use strict'\nmodule.exports = Yallist\n\nYallist.Node = Node\nYallist.create = Yallist\n\nfunction Yallist (list) {\n var self = this\n if (!(self instanceof Yallist)) {\n self = new Yallist()\n }\n\n self.tail = null\n self.head = null\n self.length = 0\n\n if (list && typeof list.forEach === 'function') {\n list.forEach(function (item) {\n self.push(item)\n })\n } else if (arguments.length > 0) {\n for (var i = 0, l = arguments.length; i < l; i++) {\n self.push(arguments[i])\n }\n }\n\n return self\n}\n\nYallist.prototype.removeNode = function (node) {\n if (node.list !== this) {\n throw new Error('removing node which does not belong to this list')\n }\n\n var next = node.next\n var prev = node.prev\n\n if (next) {\n next.prev = prev\n }\n\n if (prev) {\n prev.next = next\n }\n\n if (node === this.head) {\n this.head = next\n }\n if (node === this.tail) {\n this.tail = prev\n }\n\n node.list.length--\n node.next = null\n node.prev = null\n node.list = null\n\n return next\n}\n\nYallist.prototype.unshiftNode = function (node) {\n if (node === this.head) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var head = this.head\n node.list = this\n node.next = head\n if (head) {\n head.prev = node\n }\n\n this.head = node\n if (!this.tail) {\n this.tail = node\n }\n this.length++\n}\n\nYallist.prototype.pushNode = function (node) {\n if (node === this.tail) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var tail = this.tail\n node.list = this\n node.prev = tail\n if (tail) {\n tail.next = node\n }\n\n this.tail = node\n if (!this.head) {\n this.head = node\n }\n this.length++\n}\n\nYallist.prototype.push = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n push(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.unshift = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n unshift(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.pop = function () {\n if (!this.tail) {\n return undefined\n }\n\n var res = this.tail.value\n this.tail = this.tail.prev\n if (this.tail) {\n this.tail.next = null\n } else {\n this.head = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.shift = function () {\n if (!this.head) {\n return undefined\n }\n\n var res = this.head.value\n this.head = this.head.next\n if (this.head) {\n this.head.prev = null\n } else {\n this.tail = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.forEach = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.head, i = 0; walker !== null; i++) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.next\n }\n}\n\nYallist.prototype.forEachReverse = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.prev\n }\n}\n\nYallist.prototype.get = function (n) {\n for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.next\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.getReverse = function (n) {\n for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.prev\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.map = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.head; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.next\n }\n return res\n}\n\nYallist.prototype.mapReverse = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.tail; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.prev\n }\n return res\n}\n\nYallist.prototype.reduce = function (fn, initial) {\n var acc\n var walker = this.head\n if (arguments.length > 1) {\n acc = initial\n } else if (this.head) {\n walker = this.head.next\n acc = this.head.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = 0; walker !== null; i++) {\n acc = fn(acc, walker.value, i)\n walker = walker.next\n }\n\n return acc\n}\n\nYallist.prototype.reduceReverse = function (fn, initial) {\n var acc\n var walker = this.tail\n if (arguments.length > 1) {\n acc = initial\n } else if (this.tail) {\n walker = this.tail.prev\n acc = this.tail.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = this.length - 1; walker !== null; i--) {\n acc = fn(acc, walker.value, i)\n walker = walker.prev\n }\n\n return acc\n}\n\nYallist.prototype.toArray = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.head; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.next\n }\n return arr\n}\n\nYallist.prototype.toArrayReverse = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.tail; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.prev\n }\n return arr\n}\n\nYallist.prototype.slice = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\n walker = walker.next\n }\n for (; walker !== null && i < to; i++, walker = walker.next) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.sliceReverse = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\n walker = walker.prev\n }\n for (; walker !== null && i > from; i--, walker = walker.prev) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.splice = function (start, deleteCount, ...nodes) {\n if (start > this.length) {\n start = this.length - 1\n }\n if (start < 0) {\n start = this.length + start;\n }\n\n for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\n walker = walker.next\n }\n\n var ret = []\n for (var i = 0; walker && i < deleteCount; i++) {\n ret.push(walker.value)\n walker = this.removeNode(walker)\n }\n if (walker === null) {\n walker = this.tail\n }\n\n if (walker !== this.head && walker !== this.tail) {\n walker = walker.prev\n }\n\n for (var i = 0; i < nodes.length; i++) {\n walker = insert(this, walker, nodes[i])\n }\n return ret;\n}\n\nYallist.prototype.reverse = function () {\n var head = this.head\n var tail = this.tail\n for (var walker = head; walker !== null; walker = walker.prev) {\n var p = walker.prev\n walker.prev = walker.next\n walker.next = p\n }\n this.head = tail\n this.tail = head\n return this\n}\n\nfunction insert (self, node, value) {\n var inserted = node === self.head ?\n new Node(value, null, node, self) :\n new Node(value, node, node.next, self)\n\n if (inserted.next === null) {\n self.tail = inserted\n }\n if (inserted.prev === null) {\n self.head = inserted\n }\n\n self.length++\n\n return inserted\n}\n\nfunction push (self, item) {\n self.tail = new Node(item, self.tail, null, self)\n if (!self.head) {\n self.head = self.tail\n }\n self.length++\n}\n\nfunction unshift (self, item) {\n self.head = new Node(item, null, self.head, self)\n if (!self.tail) {\n self.tail = self.head\n }\n self.length++\n}\n\nfunction Node (value, prev, next, list) {\n if (!(this instanceof Node)) {\n return new Node(value, prev, next, list)\n }\n\n this.list = list\n this.value = value\n\n if (prev) {\n prev.next = this\n this.prev = prev\n } else {\n this.prev = null\n }\n\n if (next) {\n next.prev = this\n this.next = next\n } else {\n this.next = null\n }\n}\n\ntry {\n // add if support for Symbol.iterator is present\n require('./iterator.js')(Yallist)\n} catch (er) {}\n", "'use strict'\n\n// A linked list to keep track of recently-used-ness\nconst Yallist = require('yallist')\n\nconst MAX = Symbol('max')\nconst LENGTH = Symbol('length')\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\nconst ALLOW_STALE = Symbol('allowStale')\nconst MAX_AGE = Symbol('maxAge')\nconst DISPOSE = Symbol('dispose')\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\nconst LRU_LIST = Symbol('lruList')\nconst CACHE = Symbol('cache')\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\n\nconst naiveLength = () => 1\n\n// lruList is a yallist where the head is the youngest\n// item, and the tail is the oldest. the list contains the Hit\n// objects as the entries.\n// Each Hit object has a reference to its Yallist.Node. This\n// never changes.\n//\n// cache is a Map (or PseudoMap) that matches the keys to\n// the Yallist.Node object.\nclass LRUCache {\n constructor (options) {\n if (typeof options === 'number')\n options = { max: options }\n\n if (!options)\n options = {}\n\n if (options.max && (typeof options.max !== 'number' || options.max < 0))\n throw new TypeError('max must be a non-negative number')\n // Kind of weird to have a default max of Infinity, but oh well.\n const max = this[MAX] = options.max || Infinity\n\n const lc = options.length || naiveLength\n this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\n this[ALLOW_STALE] = options.stale || false\n if (options.maxAge && typeof options.maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n this[MAX_AGE] = options.maxAge || 0\n this[DISPOSE] = options.dispose\n this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\n this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\n this.reset()\n }\n\n // resize the cache when the max changes.\n set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }\n get max () {\n return this[MAX]\n }\n\n set allowStale (allowStale) {\n this[ALLOW_STALE] = !!allowStale\n }\n get allowStale () {\n return this[ALLOW_STALE]\n }\n\n set maxAge (mA) {\n if (typeof mA !== 'number')\n throw new TypeError('maxAge must be a non-negative number')\n\n this[MAX_AGE] = mA\n trim(this)\n }\n get maxAge () {\n return this[MAX_AGE]\n }\n\n // resize the cache when the lengthCalculator changes.\n set lengthCalculator (lC) {\n if (typeof lC !== 'function')\n lC = naiveLength\n\n if (lC !== this[LENGTH_CALCULATOR]) {\n this[LENGTH_CALCULATOR] = lC\n this[LENGTH] = 0\n this[LRU_LIST].forEach(hit => {\n hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\n this[LENGTH] += hit.length\n })\n }\n trim(this)\n }\n get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n get length () { return this[LENGTH] }\n get itemCount () { return this[LRU_LIST].length }\n\n rforEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].tail; walker !== null;) {\n const prev = walker.prev\n forEachStep(this, fn, walker, thisp)\n walker = prev\n }\n }\n\n forEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].head; walker !== null;) {\n const next = walker.next\n forEachStep(this, fn, walker, thisp)\n walker = next\n }\n }\n\n keys () {\n return this[LRU_LIST].toArray().map(k => k.key)\n }\n\n values () {\n return this[LRU_LIST].toArray().map(k => k.value)\n }\n\n reset () {\n if (this[DISPOSE] &&\n this[LRU_LIST] &&\n this[LRU_LIST].length) {\n this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\n }\n\n this[CACHE] = new Map() // hash of items by key\n this[LRU_LIST] = new Yallist() // list of items in order of use recency\n this[LENGTH] = 0 // length of items in the list\n }\n\n dump () {\n return this[LRU_LIST].map(hit =>\n isStale(this, hit) ? false : {\n k: hit.key,\n v: hit.value,\n e: hit.now + (hit.maxAge || 0)\n }).toArray().filter(h => h)\n }\n\n dumpLru () {\n return this[LRU_LIST]\n }\n\n set (key, value, maxAge) {\n maxAge = maxAge || this[MAX_AGE]\n\n if (maxAge && typeof maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n\n const now = maxAge ? Date.now() : 0\n const len = this[LENGTH_CALCULATOR](value, key)\n\n if (this[CACHE].has(key)) {\n if (len > this[MAX]) {\n del(this, this[CACHE].get(key))\n return false\n }\n\n const node = this[CACHE].get(key)\n const item = node.value\n\n // dispose of the old one before overwriting\n // split out into 2 ifs for better coverage tracking\n if (this[DISPOSE]) {\n if (!this[NO_DISPOSE_ON_SET])\n this[DISPOSE](key, item.value)\n }\n\n item.now = now\n item.maxAge = maxAge\n item.value = value\n this[LENGTH] += len - item.length\n item.length = len\n this.get(key)\n trim(this)\n return true\n }\n\n const hit = new Entry(key, value, len, now, maxAge)\n\n // oversized objects fall out of cache automatically.\n if (hit.length > this[MAX]) {\n if (this[DISPOSE])\n this[DISPOSE](key, value)\n\n return false\n }\n\n this[LENGTH] += hit.length\n this[LRU_LIST].unshift(hit)\n this[CACHE].set(key, this[LRU_LIST].head)\n trim(this)\n return true\n }\n\n has (key) {\n if (!this[CACHE].has(key)) return false\n const hit = this[CACHE].get(key).value\n return !isStale(this, hit)\n }\n\n get (key) {\n return get(this, key, true)\n }\n\n peek (key) {\n return get(this, key, false)\n }\n\n pop () {\n const node = this[LRU_LIST].tail\n if (!node)\n return null\n\n del(this, node)\n return node.value\n }\n\n del (key) {\n del(this, this[CACHE].get(key))\n }\n\n load (arr) {\n // reset the cache\n this.reset()\n\n const now = Date.now()\n // A previous serialized cache has the most recent items first\n for (let l = arr.length - 1; l >= 0; l--) {\n const hit = arr[l]\n const expiresAt = hit.e || 0\n if (expiresAt === 0)\n // the item was created without expiration in a non aged cache\n this.set(hit.k, hit.v)\n else {\n const maxAge = expiresAt - now\n // dont add already expired items\n if (maxAge > 0) {\n this.set(hit.k, hit.v, maxAge)\n }\n }\n }\n }\n\n prune () {\n this[CACHE].forEach((value, key) => get(this, key, false))\n }\n}\n\nconst get = (self, key, doUse) => {\n const node = self[CACHE].get(key)\n if (node) {\n const hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n return undefined\n } else {\n if (doUse) {\n if (self[UPDATE_AGE_ON_GET])\n node.value.now = Date.now()\n self[LRU_LIST].unshiftNode(node)\n }\n }\n return hit.value\n }\n}\n\nconst isStale = (self, hit) => {\n if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n return false\n\n const diff = Date.now() - hit.now\n return hit.maxAge ? diff > hit.maxAge\n : self[MAX_AGE] && (diff > self[MAX_AGE])\n}\n\nconst trim = self => {\n if (self[LENGTH] > self[MAX]) {\n for (let walker = self[LRU_LIST].tail;\n self[LENGTH] > self[MAX] && walker !== null;) {\n // We know that we're about to delete this one, and also\n // what the next least recently used key will be, so just\n // go ahead and set it now.\n const prev = walker.prev\n del(self, walker)\n walker = prev\n }\n }\n}\n\nconst del = (self, node) => {\n if (node) {\n const hit = node.value\n if (self[DISPOSE])\n self[DISPOSE](hit.key, hit.value)\n\n self[LENGTH] -= hit.length\n self[CACHE].delete(hit.key)\n self[LRU_LIST].removeNode(node)\n }\n}\n\nclass Entry {\n constructor (key, value, length, now, maxAge) {\n this.key = key\n this.value = value\n this.length = length\n this.now = now\n this.maxAge = maxAge || 0\n }\n}\n\nconst forEachStep = (self, fn, node, thisp) => {\n let hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n hit = undefined\n }\n if (hit)\n fn.call(thisp, hit.value, hit.key, self)\n}\n\nmodule.exports = LRUCache\n", "// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.format()\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First, split based on boolean or ||\n this.raw = range\n this.set = range\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${range}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.format()\n }\n\n format () {\n this.range = this.set\n .map((comps) => {\n return comps.join(' ').trim()\n })\n .join('||')\n .trim()\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n range = range.trim()\n\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('lru-cache')\nconst cache = new LRU({ max: 1000 })\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) =>\n comp.trim().split(/\\s+/).map((c) => {\n return replaceTilde(c, options)\n }).join(' ')\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) =>\n comp.trim().split(/\\s+/).map((c) => {\n return replaceCaret(c, options)\n }).join(' ')\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map((c) => {\n return replaceXRange(c, options)\n }).join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp.trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return (`${from} ${to}`).trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n", "const ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n", "const Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n", "const Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n", "const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n", "const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n", "const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n", "const Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n", "const SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n", "// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n", "const outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n", "const Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n", "// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n", "const Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n", "// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n", "import { setFailed } from \"@actions/core\";\nimport { run } from \"./run.js\";\n\nrun().catch((error: Error) => setFailed(error));\n", "/**\n * The possible access levels for an NPM package\n */\nexport type Access = typeof ACCESS_PUBLIC | typeof ACCESS_RESTRICTED;\n\nexport const ACCESS_PUBLIC = \"public\";\nexport const ACCESS_RESTRICTED = \"restricted\";\n\n/**\n * Version check strategy.\n *\n * - `upgrade`: the package will only be published if its version\n * is higher than the existing version on the configured tag.\n * - `all`: the package will be published if its version\n * is not yet published, even if its lower that the existing tag.\n */\nexport type Strategy = typeof STRATEGY_UPGRADE | typeof STRATEGY_ALL;\n\nexport const STRATEGY_UPGRADE = \"upgrade\";\nexport const STRATEGY_ALL = \"all\";\n\n/**\n * A function that logs messages\n */\nexport type HandleLog = (message: string, data?: object) => void;\n\n/**\n * A level at which a log can occur.\n */\nexport type LogLevel = \"error\" | \"warn\" | \"info\" | \"debug\";\n\n/**\n * An object that can be used to log messages.\n */\nexport type Logger = Record;\n\n/**\n * Options that determine how/whether the package is published.\n */\nexport interface Options {\n /**\n * The NPM access token to use when publishing.\n */\n token: string;\n\n /**\n * The absolute or relative path of your package.\n *\n * Defaults to the package in the current working directory.\n */\n package?: string | undefined;\n\n /**\n * The NPM registry URL to use.\n *\n * Defaults to \"https://registry.npmjs.org/\".\n *\n * Can be overridden by the package.json's `publishConfig` field.\n */\n registry?: string | URL | undefined;\n\n /**\n * The tag to publish to.\n *\n * Defaults to \"latest\".\n *\n * Can be overridden by the package.json's `publishConfig` field.\n */\n tag?: string | undefined;\n\n /**\n * Package access.\n *\n * Determines whether the published package should be publicly visible,\n * or restricted to members of your NPM organization. This only applies\n * to scoped packages.\n *\n * Defaults to \"restricted\" for scoped packages, unless that package has been\n * previously published as `public`\n *\n * Can be overridden by the package.json's `publishConfig` field.\n */\n access?: Access | undefined;\n\n /**\n * Version check strategy.\n *\n * If \"upgrade\" (default), the package will only be published if its version\n * is higher than the existing version on the configured tag. If \"always\",\n * the package will be published if its version is simply not yet published.\n *\n * Defaults to `upgrade`.\n */\n strategy?: Strategy | undefined;\n\n /**\n * Pretend to publish, but don't actually upload to the registry.\n *\n * Defaults to `false`.\n */\n dryRun?: boolean | undefined;\n}\n", "import os from \"node:os\";\n\nimport {\n ACCESS_PUBLIC,\n ACCESS_RESTRICTED,\n STRATEGY_ALL,\n STRATEGY_UPGRADE,\n} from \"./options.js\";\n\nexport class NpmPublishError extends Error {\n public originalError: Error | undefined;\n\n public constructor(message: string, originalError?: Error) {\n if (originalError) {\n super(`${message}\\n${originalError.message}`);\n } else {\n super(message);\n }\n\n this.name = \"NpmPublishError\";\n this.originalError = originalError;\n }\n}\n\nexport class InvalidPackageError extends TypeError {\n public constructor(value: unknown) {\n super(\n `Package must be a directory or package.json file, got \"${String(value)}\"`\n );\n this.name = \"PackageJsonReadError\";\n }\n}\n\nexport class PackageJsonReadError extends Error {\n public constructor(manifestPath: string, originalError: unknown) {\n const message = [\n `Could not read package.json at ${manifestPath}`,\n originalError instanceof Error ? originalError.message : \"\",\n ].join(os.EOL);\n\n super(message);\n this.name = \"PackageJsonReadError\";\n }\n}\n\nexport class PackageJsonParseError extends SyntaxError {\n public constructor(manifestPath: string, originalError: unknown) {\n const message = [\n `Invalid JSON, could not parse package.json at ${manifestPath}`,\n originalError instanceof Error ? originalError.message : \"\",\n ].join(os.EOL);\n\n super(message);\n this.name = \"PackageJsonParseError\";\n }\n}\n\nexport class InvalidPackageNameError extends TypeError {\n public constructor(value: unknown) {\n super(`Package name must be a string, got \"${String(value)}\"`);\n this.name = \"InvalidPackageNameError\";\n }\n}\n\nexport class InvalidPackageVersionError extends TypeError {\n public constructor(value: unknown) {\n super(`Package version must be a string, got \"${String(value)}\"`);\n this.name = \"InvalidPackageVersionError\";\n }\n}\n\nexport class InvalidPackagePublishConfigError extends TypeError {\n public constructor(value: unknown) {\n super(`Publish config must be an object, got \"${String(value)}\"`);\n this.name = \"InvalidPackagePublishConfigError\";\n }\n}\n\nexport class InvalidRegistryUrlError extends TypeError {\n public constructor(value: unknown) {\n super(`Registry URL invalid, got \"${String(value)}\"`);\n this.name = \"InvalidRegistryUrlError\";\n }\n}\n\nexport class InvalidTokenError extends TypeError {\n public constructor() {\n super(\"Token must be a non-empty string.\");\n this.name = \"InvalidTokenError\";\n }\n}\n\nexport class InvalidAccessError extends TypeError {\n public constructor(value: unknown) {\n super(\n `Access must be \"${ACCESS_PUBLIC}\" or \"${ACCESS_RESTRICTED}\", got \"${String(\n value\n )}\".`\n );\n this.name = \"InvalidAccessError\";\n }\n}\n\nexport class InvalidStrategyError extends TypeError {\n public constructor(value: unknown) {\n super(\n `Strategy must be \"${STRATEGY_UPGRADE}\" or \"${STRATEGY_ALL}\", got \"${String(\n value\n )}\".`\n );\n this.name = \"InvalidStrategyError\";\n }\n}\n", "import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { valid as semverValid } from \"semver\";\n\nimport * as errors from \"./errors.js\";\n\n/**\n * The result of reading a package manifest\n */\nexport interface ManifestReadResult {\n packageSpec: string;\n manifest: PackageManifest;\n}\n\n/**\n * A package manifest (package.json)\n */\nexport interface PackageManifest {\n name: string;\n version: string;\n scope: string | undefined;\n publishConfig: PackagePublishConfig | undefined;\n}\n\n/**\n * Any publish configuration defined in package.json.\n */\nexport interface PackagePublishConfig {\n tag?: string;\n access?: string;\n registry?: string;\n}\n\nconst SCOPE_RE = /^(@.+)\\/.+$/u;\n\nconst MANIFEST_BASENAME = \"package.json\";\n\nconst isManifest = (name: unknown): name is string => {\n return typeof name === \"string\" && path.basename(name) === MANIFEST_BASENAME;\n};\n\nconst isDirectory = (name: unknown): name is string => {\n return typeof name === \"string\" && path.extname(name) === \"\";\n};\n\nconst isVersion = (version: unknown): version is string => {\n return semverValid(version as string) !== null;\n};\n\n/**\n * Reads the package manifest (package.json) and returns its parsed contents.\n *\n * @param packagePath The path to the package being published.\n * @returns The parsed package metadata.\n */\nexport async function readManifest(\n packagePath: unknown\n): Promise {\n let packageSpec: string | undefined;\n let manifestPath: string;\n\n if (!packagePath) {\n packageSpec = \"\";\n manifestPath = \"package.json\";\n } else if (isManifest(packagePath)) {\n packageSpec = path.dirname(packagePath);\n manifestPath = packagePath;\n } else if (isDirectory(packagePath)) {\n packageSpec = packagePath;\n manifestPath = path.join(packagePath, MANIFEST_BASENAME);\n } else {\n throw new errors.InvalidPackageError(packagePath);\n }\n\n let manifestContents: string;\n let manifestJson: Record;\n let name: unknown;\n let version: unknown;\n let publishConfig: unknown;\n\n try {\n manifestContents = await fs.readFile(manifestPath, \"utf8\");\n } catch (error) {\n throw new errors.PackageJsonReadError(manifestPath, error);\n }\n\n try {\n manifestJson = JSON.parse(manifestContents) as Record;\n name = manifestJson.name;\n version = manifestJson.version;\n publishConfig = manifestJson.publishConfig ?? {};\n } catch (error) {\n throw new errors.PackageJsonParseError(manifestPath, error);\n }\n\n if (typeof name !== \"string\" || name.length === 0) {\n throw new errors.InvalidPackageNameError(name);\n }\n\n if (!isVersion(version)) {\n throw new errors.InvalidPackageVersionError(version);\n }\n\n if (\n typeof publishConfig !== \"object\" ||\n Array.isArray(publishConfig) ||\n !publishConfig\n ) {\n throw new errors.InvalidPackagePublishConfigError(publishConfig);\n }\n\n return {\n packageSpec,\n manifest: { name, version, publishConfig, scope: SCOPE_RE.exec(name)?.[1] },\n };\n}\n", "import * as errors from \"./errors.js\";\nimport type { PackageManifest } from \"./read-manifest.js\";\nimport {\n ACCESS_PUBLIC,\n ACCESS_RESTRICTED,\n STRATEGY_UPGRADE,\n STRATEGY_ALL,\n type Access,\n type Strategy,\n type Options,\n} from \"./options.js\";\n\nconst DEFAULT_REGISTRY = \"https://registry.npmjs.org/\";\nconst DEFAULT_TAG = \"latest\";\n\n/**\n * Normalized and sanitized auth and publish configurations.\n */\nexport interface NormalizedOptions {\n authConfig: AuthConfig;\n publishConfig: PublishConfig;\n}\n\n/**\n * Normalized and sanitized auth configuration.\n */\nexport interface AuthConfig {\n registry: ConfigValue;\n token: ConfigValue;\n}\n\n/**\n * Normalized and sanitized publish configuration.\n */\nexport interface PublishConfig {\n tag: ConfigValue;\n access: ConfigValue;\n dryRun: ConfigValue;\n strategy: ConfigValue;\n}\n\n/**\n * A config value, and whether that value differs from default.\n */\nexport interface ConfigValue {\n value: TValue;\n isDefault: boolean;\n}\n\n/**\n * Normalizes and sanitizes options, and fills-in any default values.\n *\n * @param options User-input options.\n * @param manifest Package metadata from package.json.\n * @returns Validated auth and publish configuration.\n */\nexport function normalizeOptions(\n options: Options,\n manifest: PackageManifest\n): NormalizedOptions {\n const defaultTag = manifest.publishConfig?.tag ?? DEFAULT_TAG;\n\n const defaultRegistry = manifest.publishConfig?.registry ?? DEFAULT_REGISTRY;\n\n const defaultAccess =\n manifest.publishConfig?.access ??\n (manifest.scope === undefined ? ACCESS_PUBLIC : undefined);\n\n return {\n authConfig: {\n token: setValue(options.token, \"\", validateToken),\n registry: setValue(options.registry, defaultRegistry, validateRegistry),\n },\n publishConfig: {\n tag: setValue(options.tag, defaultTag, validateTag),\n access: setValue(options.access, defaultAccess, validateAccess),\n dryRun: setValue(options.dryRun, false, validateDryRun),\n strategy: setValue(options.strategy, STRATEGY_ALL, validateStrategy),\n },\n };\n}\n\nconst setValue = (\n value: unknown,\n defaultValue?: unknown,\n validate: (value: unknown) => TValue = (_) => _ as TValue\n): ConfigValue => ({\n value: validate(value ?? defaultValue),\n isDefault: value === undefined,\n});\n\nconst validateToken = (value: unknown): string => {\n if (typeof value === \"string\" && value.length > 0) {\n return value;\n }\n\n throw new errors.InvalidTokenError();\n};\n\nconst validateRegistry = (value: unknown): URL => {\n try {\n return new URL(value as string | URL);\n } catch {\n throw new errors.InvalidRegistryUrlError(value);\n }\n};\n\nconst validateTag = (value: unknown): string => {\n return value as string;\n};\n\nconst validateDryRun = (value: unknown): boolean => {\n return value as boolean;\n};\n\nconst validateAccess = (value: unknown): Access | undefined => {\n if (\n value === undefined ||\n value === ACCESS_PUBLIC ||\n value === ACCESS_RESTRICTED\n ) {\n return value;\n }\n\n throw new errors.InvalidAccessError(value);\n};\n\nconst validateStrategy = (value: unknown): Strategy => {\n if (value === STRATEGY_ALL || value === STRATEGY_UPGRADE) {\n return value;\n }\n\n throw new errors.InvalidStrategyError(value);\n};\n", "import fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\nimport type { AuthConfig } from \"../normalize-options.js\";\n\nexport type NpmCliEnvironment = Record;\n\nexport type NpmCliTask = (\n environment: NpmCliEnvironment\n) => Promise;\n\n/**\n * Create a temporary .npmrc file with the given auth token,\n * and call a task with env vars set to use that .npmrc.\n *\n * @param auth Registry and token.\n * @param task A function called with the configured environment.\n * After the function resolves, the temporary .npmrc file will be removed.\n * @returns The resolved value of `task`\n */\nexport async function useNpmEnvironment(\n auth: AuthConfig,\n task: NpmCliTask\n): Promise {\n const { registry, token } = auth;\n const npmrcDirectory = await fs.mkdtemp(\n path.join(os.tmpdir(), \"npm-publish-\")\n );\n const npmrc = path.join(npmrcDirectory, \".npmrc\");\n\n const config = [\n \"; created by jsdevtools/npm-publish\",\n `//${registry.value.hostname}/:authToken=\\${NODE_AUTH_TOKEN}`,\n registry.isDefault ? \"\" : `registry=${registry.value.href}`,\n \"\",\n ].join(os.EOL);\n\n await fs.writeFile(npmrc, config, \"utf8\");\n\n try {\n return await task({\n NODE_AUTH_TOKEN: token.value,\n npm_config_userconfig: npmrc,\n });\n } finally {\n await fs.rm(npmrcDirectory, { force: true, recursive: true });\n }\n}\n", "import childProcess from \"node:child_process\";\n\nimport type { NpmCliEnvironment } from \"./use-npm-environment.js\";\n\nexport interface NpmCliOptions {\n environment?: NpmCliEnvironment;\n ifError?: Record;\n}\n\nconst JSON_MATCH_RE = /(\\{[\\s\\S]*\\})/mu;\n\nconst execProcess = (\n command: string,\n environment: Record = {}\n): Promise<{ stdout: string; stderr: string; error: Error | null }> => {\n return new Promise((resolve) => {\n childProcess.exec(\n command,\n { env: { ...process.env, ...environment } },\n (error, stdout, stderr) => {\n return resolve({ stdout: stdout.trim(), stderr: stderr.trim(), error });\n }\n );\n });\n};\n\nconst parseJson = (...values: string[]): TParsed | undefined => {\n for (const value of values) {\n const jsonValue = JSON_MATCH_RE.exec(value)?.[1];\n\n if (jsonValue) {\n try {\n return JSON.parse(jsonValue) as TParsed;\n } catch {\n return undefined;\n }\n }\n }\n\n return undefined;\n};\n\n/**\n * Call the NPM CLI in JSON mode.\n *\n * @param command The command of the NPM CLI to call\n * @param cliArguments Any arguments to send to the command\n * @param options Customize environment variables or add an error handler.\n * @returns The parsed JSON, or stdout if unparsable.\n */\nexport async function callNpmCli(\n command: string,\n cliArguments: string[],\n options: NpmCliOptions = {}\n): Promise {\n const { stdout, stderr, error } = await execProcess(\n [\"npm\", command, \"--ignore-scripts\", \"--json\", ...cliArguments].join(\" \"),\n options.environment\n );\n\n if (error) {\n const errorPayload = parseJson<{ error?: { code?: string | null } }>(\n stdout,\n stderr\n );\n const errorCode = errorPayload?.error?.code?.toLowerCase();\n\n if (\n typeof errorCode === \"string\" &&\n options.ifError &&\n errorCode in options.ifError\n ) {\n return options.ifError[errorCode] as TReturn;\n }\n\n throw error;\n }\n\n return parseJson(stdout) ?? (stdout as unknown as TReturn);\n}\n", "import type { PublishConfig } from \"../normalize-options.js\";\n\n/**\n * Given a publish configuration, get the NPM CLI publish arguments.\n *\n * @param packageSpec Package specification path\n * @param config Publish configuration\n * @returns Arguments to pass to the NPM CLI\n */\nexport function getPublishArguments(\n packageSpec: string,\n config: PublishConfig\n): string[] {\n const { tag, access, dryRun } = config;\n const publishArguments = [];\n\n if (packageSpec.length > 0) {\n publishArguments.push(packageSpec);\n }\n\n if (!tag.isDefault) {\n publishArguments.push(\"--tag\", tag.value);\n }\n\n if (!access.isDefault && access.value) {\n publishArguments.push(\"--access\", access.value);\n }\n\n if (!dryRun.isDefault) {\n publishArguments.push(\"--dry-run\", JSON.stringify(dryRun.value));\n }\n\n return publishArguments;\n}\n", "import type { AuthConfig, PublishConfig } from \"../normalize-options.js\";\nimport { useNpmEnvironment } from \"./use-npm-environment.js\";\nimport { callNpmCli } from \"./call-npm-cli.js\";\nimport { getPublishArguments } from \"./get-publish-arguments.js\";\n\nexport interface PublishedVersions {\n \"dist-tags\": Record;\n versions: string[];\n}\n\nexport interface PublishResult {\n id: string;\n}\n\n/**\n * Get a package's published versions.\n *\n * @param packageName The name of the package to get published versions for.\n * @param authConfig Registry and auth token.\n * @returns All published versions and tags.\n */\nexport async function getVersions(\n packageName: string,\n authConfig: AuthConfig\n): Promise {\n return useNpmEnvironment(authConfig, (environment) => {\n return callNpmCli(\n \"view\",\n [packageName, \"dist-tags\", \"versions\"],\n { environment, ifError: { e404: { \"dist-tags\": {}, versions: [] } } }\n );\n });\n}\n\n/**\n * Publish a package.\n *\n * @param packageSpec Package specification to pass to npm.\n * @param publishConfig Publish configuration.\n * @param authConfig Registry and auth token.\n * @returns Release metadata.\n */\nexport async function publish(\n packageSpec: string,\n publishConfig: PublishConfig,\n authConfig: AuthConfig\n): Promise {\n const publishArguments = getPublishArguments(packageSpec, publishConfig);\n\n return useNpmEnvironment(authConfig, (environment) => {\n return callNpmCli(\"publish\", publishArguments, {\n environment,\n });\n });\n}\n", "import {\n valid as semverValid,\n gt as semverGreaterThan,\n diff as semverDifference,\n type ReleaseType as SemverReleaseType,\n} from \"semver\";\n\nimport { STRATEGY_ALL } from \"./options.js\";\nimport type { PublishConfig } from \"./normalize-options.js\";\nimport type { PublishedVersions } from \"./npm/index.js\";\n\nexport type ReleaseType = SemverReleaseType | typeof INITIAL | typeof DIFFERENT;\n\nexport interface VersionComparison {\n releaseType: ReleaseType | undefined;\n previousVersion: string | undefined;\n}\n\nconst INITIAL = \"initial\";\nconst DIFFERENT = \"different\";\n\n/**\n * Compare previously published versions with the package's current version.\n *\n * @param version The current package version.\n * @param publishedVersions The versions that have already been published.\n * @param publishConfig Tag and version comparison strategy.\n * @returns The release type and previous version.\n */\nexport function compareVersions(\n version: string,\n publishedVersions: PublishedVersions,\n publishConfig: PublishConfig\n): VersionComparison {\n const { versions: existingVersions, \"dist-tags\": tags } = publishedVersions;\n const { strategy, tag: publishTag } = publishConfig;\n const previousVersion = semverValid(tags[publishTag.value]) ?? undefined;\n const isUnique = !existingVersions.includes(version);\n let releaseType: ReleaseType | undefined;\n\n if (isUnique) {\n if (!previousVersion) {\n releaseType = INITIAL;\n } else if (semverGreaterThan(version, previousVersion)) {\n releaseType = semverDifference(version, previousVersion) ?? undefined;\n } else if (strategy.value === STRATEGY_ALL) {\n releaseType = DIFFERENT;\n }\n }\n\n return { releaseType, previousVersion };\n}\n", "import { readManifest } from \"./read-manifest.js\";\nimport { normalizeOptions } from \"./normalize-options.js\";\nimport { getVersions, publish } from \"./npm/index.js\";\nimport { compareVersions } from \"./compare-versions.js\";\nimport type { Options } from \"./options.js\";\nimport type { Results } from \"./results.js\";\n\n/**\n * Publishes a package to NPM, if its version has changed.\n *\n * @param options Publish options.\n * @returns Release metadata.\n */\nexport async function npmPublish(options: Options): Promise {\n const { packageSpec, manifest } = await readManifest(options.package);\n const { authConfig, publishConfig } = normalizeOptions(options, manifest);\n const publishedVersions = await getVersions(manifest.name, authConfig);\n const versionComparison = compareVersions(\n manifest.version,\n publishedVersions,\n publishConfig\n );\n\n let publishResult;\n\n if (versionComparison.releaseType !== undefined) {\n publishResult = await publish(packageSpec, publishConfig, authConfig);\n }\n\n return {\n id: publishResult?.id,\n name: manifest.name,\n version: manifest.version,\n releaseType: versionComparison.releaseType,\n previousVersion: versionComparison.previousVersion,\n registry: authConfig.registry.value,\n tag: publishConfig.tag.value,\n access: publishConfig.access.value,\n strategy: publishConfig.strategy.value,\n dryRun: publishConfig.dryRun.value,\n };\n}\n", "/**\n * Wrapper module for @actions/core\n */\nimport {\n getInput as ghGetInput,\n setOutput as ghSetOutput,\n setSecret as ghSetSecret,\n} from \"@actions/core\";\n\n/**\n * Get input by name.\n *\n * @param name Input name\n * @returns The input string value, or undefined if not set\n */\nexport function getInput(name: string): T | undefined {\n const inputString = ghGetInput(name);\n return inputString.length > 0 ? (inputString as T) : undefined;\n}\n\n/**\n * Get a required secret input by name.\n *\n * @param name Input name\n * @returns The input secret value.\n */\nexport function getRequiredSecretInput(name: string): string {\n const inputString = ghGetInput(name, { required: true });\n ghSetSecret(inputString);\n return inputString;\n}\n\n/**\n * Get a boolean input by name.\n *\n * @param name Input name\n * @returns True if value is \"true\", false if not\n */\nexport function getBooleanInput(name: string): boolean {\n return ghGetInput(name) === \"true\";\n}\n\n/**\n * Set an output by name.\n *\n * @param name Output name\n * @param value Output value\n */\nexport function setOutput(name: string, value: string | boolean): void;\n\n/**\n * Set an output by name.\n *\n * @param name Output name\n * @param value Output value\n * @param defaultValue Default value if value is undefined.\n */\nexport function setOutput(\n name: string,\n value: string | boolean | undefined,\n defaultValue: string | boolean\n): void;\n\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport function setOutput(\n name: string,\n value: string | boolean | undefined,\n defaultValue?: string | boolean | undefined\n): void {\n ghSetOutput(name, value ?? defaultValue);\n}\n", "import {\n npmPublish,\n type Access,\n type Strategy,\n type Options,\n} from \"../index.js\";\nimport * as core from \"./core.js\";\n\n/**\n * Run the action.\n */\nexport async function run(): Promise {\n const options: Options = {\n token: core.getRequiredSecretInput(\"token\"),\n registry: core.getInput(\"registry\"),\n package: core.getInput(\"package\"),\n tag: core.getInput(\"tag\"),\n access: core.getInput(\"access\"),\n strategy: core.getInput(\"strategy\"),\n dryRun: core.getBooleanInput(\"dry-run\"),\n };\n\n const results = await npmPublish(options);\n\n core.setOutput(\"id\", results.id, \"\");\n core.setOutput(\"name\", results.name);\n core.setOutput(\"version\", results.version);\n core.setOutput(\"type\", results.releaseType, \"\");\n core.setOutput(\"old-version\", results.previousVersion, \"\");\n core.setOutput(\"registry\", results.registry.href);\n core.setOutput(\"tag\", results.tag);\n core.setOutput(\"access\", results.access, \"default\");\n core.setOutput(\"strategy\", results.strategy);\n core.setOutput(\"dry-run\", results.dryRun);\n}\n"], - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,aAAg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AAAA,EACxC;AAEA,QAAM,UAAU,MAAM,WAAW,OAAO;AAExC,EAAK,UAAU,MAAM,QAAQ,IAAI,EAAE;AACnC,EAAK,UAAU,QAAQ,QAAQ,IAAI;AACnC,EAAK,UAAU,WAAW,QAAQ,OAAO;AACzC,EAAK,UAAU,QAAQ,QAAQ,aAAa,EAAE;AAC9C,EAAK,UAAU,eAAe,QAAQ,iBAAiB,EAAE;AACzD,EAAK,UAAU,YAAY,QAAQ,SAAS,IAAI;AAChD,EAAK,UAAU,OAAO,QAAQ,GAAG;AACjC,EAAK,UAAU,UAAU,QAAQ,QAAQ,SAAS;AAClD,EAAK,UAAU,YAAY,QAAQ,QAAQ;AAC3C,EAAK,UAAU,WAAW,QAAQ,MAAM;AAC1C;;;AZ/BA,IAAI,EAAE,MAAM,CAAC,cAAiB,wBAAU,KAAK,CAAC;", - "names": ["os", "crypto", "version", "URL", "crypto", "import_crypto", "crypto", "import_crypto", "fs", "os", "options", "socket", "require_tunnel", "module", "HttpCodes", "Headers", "MediaTypes", "path", "os", "path", "ExitCode", "getInput", "getBooleanInput", "setOutput", "setFailed", "module", "module", "module", "module", "module", "module", "version", "module", "parse", "version", "module", "parse", "version", "module", "parse", "version", "module", "version", "module", "module", "module", "parse", "v1", "module", "module", "module", "module", "parse", "version", "module", "module", "module", "module", "module", "module", "module", "module", "module", "module", "module", "module", "parse", "version", "module", "module", "module", "module", "version", "module", "version", "module", "version", "module", "module", "module", "module", "require_valid", "module", "module", "version", "module", "version", "module", "version", "module", "module", "version", "module", "require_semver", "module", "parse", "import_core", "os", "path", "version", "semverValid", "fs", "validate", "import_promises", "import_node_os", "import_node_path", "fs", "path", "os", "childProcess", "import_semver", "version", "semverValid", "semverGreaterThan", "semverDifference", "ghGetInput", "ghSetSecret", "ghSetOutput"] -} diff --git a/dist/index.js b/dist/main.js similarity index 98% rename from dist/index.js rename to dist/main.js index b5a6f34..d91ac98 100644 --- a/dist/index.js +++ b/dist/main.js @@ -33,4577 +33,4574 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// node_modules/@actions/core/lib/utils.js -var require_utils = __commonJS({ - "node_modules/@actions/core/lib/utils.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.toCommandProperties = exports.toCommandValue = void 0; - function toCommandValue(input) { - if (input === null || input === void 0) { - return ""; - } else if (typeof input === "string" || input instanceof String) { - return input; - } - return JSON.stringify(input); - } - exports.toCommandValue = toCommandValue; - function toCommandProperties(annotationProperties) { - if (!Object.keys(annotationProperties).length) { - return {}; - } - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn - }; - } - exports.toCommandProperties = toCommandProperties; +// node_modules/semver/internal/constants.js +var require_constants = __commonJS({ + "node_modules/semver/internal/constants.js"(exports, module2) { + var SEMVER_SPEC_VERSION = "2.0.0"; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ + 9007199254740991; + var MAX_SAFE_COMPONENT_LENGTH = 16; + var RELEASE_TYPES = [ + "major", + "premajor", + "minor", + "preminor", + "patch", + "prepatch", + "prerelease" + ]; + module2.exports = { + MAX_LENGTH, + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_INTEGER, + RELEASE_TYPES, + SEMVER_SPEC_VERSION, + FLAG_INCLUDE_PRERELEASE: 1, + FLAG_LOOSE: 2 + }; } }); -// node_modules/@actions/core/lib/command.js -var require_command = __commonJS({ - "node_modules/@actions/core/lib/command.js"(exports) { - "use strict"; - var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) - k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - } : function(o, m, k, k2) { - if (k2 === void 0) - k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) - return mod; - var result = {}; - if (mod != null) { - for (var k in mod) - if (k !== "default" && Object.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - } - __setModuleDefault(result, mod); - return result; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.issue = exports.issueCommand = void 0; - var os3 = __importStar(require("os")); - var utils_1 = require_utils(); - function issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os3.EOL); - } - exports.issueCommand = issueCommand; - function issue(name, message = "") { - issueCommand(name, {}, message); - } - exports.issue = issue; - var CMD_STRING = "::"; - var Command = class { - constructor(command, properties, message) { - if (!command) { - command = "missing.command"; - } - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += " "; - let first = true; - for (const key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) { - first = false; - } else { - cmdStr += ","; - } - cmdStr += `${key}=${escapeProperty(val)}`; - } - } - } - } - cmdStr += `${CMD_STRING}${escapeData(this.message)}`; - return cmdStr; - } +// node_modules/semver/internal/debug.js +var require_debug = __commonJS({ + "node_modules/semver/internal/debug.js"(exports, module2) { + var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { }; - function escapeData(s) { - return utils_1.toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); - } - function escapeProperty(s) { - return utils_1.toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); - } + module2.exports = debug; } }); -// node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - import_crypto.default.randomFillSync(rnds8Pool); - poolPtr = 0; +// node_modules/semver/internal/re.js +var require_re = __commonJS({ + "node_modules/semver/internal/re.js"(exports, module2) { + var { MAX_SAFE_COMPONENT_LENGTH } = require_constants(); + var debug = require_debug(); + exports = module2.exports = {}; + var re = exports.re = []; + var src = exports.src = []; + var t = exports.t = {}; + var R = 0; + var createToken = (name, value, isGlobal) => { + const index = R++; + debug(name, index, value); + t[name] = index; + src[index] = value; + re[index] = new RegExp(value, isGlobal ? "g" : void 0); + }; + createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); + createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+"); + createToken("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*"); + createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); + createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`); + createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`); + createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); + createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); + createToken("BUILDIDENTIFIER", "[0-9A-Za-z-]+"); + createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); + createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); + createToken("FULL", `^${src[t.FULLPLAIN]}$`); + createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); + createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); + createToken("GTLT", "((?:<|>)?=?)"); + createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); + createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); + createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); + createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`); + createToken("COERCERTL", src[t.COERCE], true); + createToken("LONETILDE", "(?:~>?)"); + createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); + exports.tildeTrimReplace = "$1~"; + createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); + createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("LONECARET", "(?:\\^)"); + createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); + exports.caretTrimReplace = "$1^"; + createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); + createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); + createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); + createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); + exports.comparatorTrimReplace = "$1$2$3"; + createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); + createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); + createToken("STAR", "(<|>)?=?\\s*\\*"); + createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); + createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); } - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} -var import_crypto, rnds8Pool, poolPtr; -var init_rng = __esm({ - "node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js"() { - import_crypto = __toESM(require("crypto")); - rnds8Pool = new Uint8Array(256); - poolPtr = rnds8Pool.length; +}); + +// node_modules/semver/internal/parse-options.js +var require_parse_options = __commonJS({ + "node_modules/semver/internal/parse-options.js"(exports, module2) { + var looseOption = Object.freeze({ loose: true }); + var emptyOpts = Object.freeze({}); + var parseOptions = (options) => { + if (!options) { + return emptyOpts; + } + if (typeof options !== "object") { + return looseOption; + } + return options; + }; + module2.exports = parseOptions; } }); -// node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js -var regex_default; -var init_regex = __esm({ - "node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js"() { - regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +// node_modules/semver/internal/identifiers.js +var require_identifiers = __commonJS({ + "node_modules/semver/internal/identifiers.js"(exports, module2) { + var numeric = /^[0-9]+$/; + var compareIdentifiers = (a, b) => { + const anum = numeric.test(a); + const bnum = numeric.test(b); + if (anum && bnum) { + a = +a; + b = +b; + } + return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; + }; + var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); + module2.exports = { + compareIdentifiers, + rcompareIdentifiers + }; } }); -// node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js -function validate(uuid) { - return typeof uuid === "string" && regex_default.test(uuid); -} -var validate_default; -var init_validate = __esm({ - "node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js"() { - init_regex(); - validate_default = validate; - } -}); - -// node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js -function stringify(arr, offset = 0) { - const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); - if (!validate_default(uuid)) { - throw TypeError("Stringified UUID is invalid"); - } - return uuid; -} -var byteToHex, stringify_default; -var init_stringify = __esm({ - "node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js"() { - init_validate(); - byteToHex = []; - for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 256).toString(16).substr(1)); - } - stringify_default = stringify; - } -}); - -// node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq; - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || rng)(); - if (node == null) { - node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - if (clockseq == null) { - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383; - } - } - let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); - let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1; - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4; - if (dt < 0 && options.clockseq === void 0) { - clockseq = clockseq + 1 & 16383; - } - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) { - nsecs = 0; - } - if (nsecs >= 1e4) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - msecs += 122192928e5; - const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; - b[i++] = tl >>> 24 & 255; - b[i++] = tl >>> 16 & 255; - b[i++] = tl >>> 8 & 255; - b[i++] = tl & 255; - const tmh = msecs / 4294967296 * 1e4 & 268435455; - b[i++] = tmh >>> 8 & 255; - b[i++] = tmh & 255; - b[i++] = tmh >>> 24 & 15 | 16; - b[i++] = tmh >>> 16 & 255; - b[i++] = clockseq >>> 8 | 128; - b[i++] = clockseq & 255; - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - return buf || stringify_default(b); -} -var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default; -var init_v1 = __esm({ - "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js"() { - init_rng(); - init_stringify(); - _lastMSecs = 0; - _lastNSecs = 0; - v1_default = v1; - } -}); - -// node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js -function parse(uuid) { - if (!validate_default(uuid)) { - throw TypeError("Invalid UUID"); - } - let v; - const arr = new Uint8Array(16); - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 255; - arr[2] = v >>> 8 & 255; - arr[3] = v & 255; - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 255; - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 255; - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 255; - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; - arr[11] = v / 4294967296 & 255; - arr[12] = v >>> 24 & 255; - arr[13] = v >>> 16 & 255; - arr[14] = v >>> 8 & 255; - arr[15] = v & 255; - return arr; -} -var parse_default; -var init_parse = __esm({ - "node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js"() { - init_validate(); - parse_default = parse; - } -}); - -// node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); - const bytes = []; - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - return bytes; -} -function v35_default(name, version2, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === "string") { - value = stringToBytes(value); - } - if (typeof namespace === "string") { - namespace = parse_default(namespace); - } - if (namespace.length !== 16) { - throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); - } - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 15 | version2; - bytes[8] = bytes[8] & 63 | 128; - if (buf) { - offset = offset || 0; - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - return buf; - } - return stringify_default(bytes); - } - try { - generateUUID.name = name; - } catch (err) { - } - generateUUID.DNS = DNS; - generateUUID.URL = URL2; - return generateUUID; -} -var DNS, URL2; -var init_v35 = __esm({ - "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js"() { - init_stringify(); - init_parse(); - DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; - URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; - } -}); - -// node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === "string") { - bytes = Buffer.from(bytes, "utf8"); - } - return import_crypto2.default.createHash("md5").update(bytes).digest(); -} -var import_crypto2, md5_default; -var init_md5 = __esm({ - "node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js"() { - import_crypto2 = __toESM(require("crypto")); - md5_default = md5; - } -}); - -// node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js -var v3, v3_default; -var init_v3 = __esm({ - "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js"() { - init_v35(); - init_md5(); - v3 = v35_default("v3", 48, md5_default); - v3_default = v3; - } -}); - -// node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js -function v4(options, buf, offset) { - options = options || {}; - const rnds = options.random || (options.rng || rng)(); - rnds[6] = rnds[6] & 15 | 64; - rnds[8] = rnds[8] & 63 | 128; - if (buf) { - offset = offset || 0; - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - return buf; - } - return stringify_default(rnds); -} -var v4_default; -var init_v4 = __esm({ - "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js"() { - init_rng(); - init_stringify(); - v4_default = v4; - } -}); - -// node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === "string") { - bytes = Buffer.from(bytes, "utf8"); - } - return import_crypto3.default.createHash("sha1").update(bytes).digest(); -} -var import_crypto3, sha1_default; -var init_sha1 = __esm({ - "node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js"() { - import_crypto3 = __toESM(require("crypto")); - sha1_default = sha1; - } -}); - -// node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js -var v5, v5_default; -var init_v5 = __esm({ - "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js"() { - init_v35(); - init_sha1(); - v5 = v35_default("v5", 80, sha1_default); - v5_default = v5; - } -}); - -// node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js -var nil_default; -var init_nil = __esm({ - "node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js"() { - nil_default = "00000000-0000-0000-0000-000000000000"; - } -}); - -// node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js -function version(uuid) { - if (!validate_default(uuid)) { - throw TypeError("Invalid UUID"); - } - return parseInt(uuid.substr(14, 1), 16); -} -var version_default; -var init_version = __esm({ - "node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js"() { - init_validate(); - version_default = version; - } -}); - -// node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js -var esm_node_exports = {}; -__export(esm_node_exports, { - NIL: () => nil_default, - parse: () => parse_default, - stringify: () => stringify_default, - v1: () => v1_default, - v3: () => v3_default, - v4: () => v4_default, - v5: () => v5_default, - validate: () => validate_default, - version: () => version_default -}); -var init_esm_node = __esm({ - "node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js"() { - init_v1(); - init_v3(); - init_v4(); - init_v5(); - init_nil(); - init_version(); - init_validate(); - init_stringify(); - init_parse(); - } -}); - -// node_modules/@actions/core/lib/file-command.js -var require_file_command = __commonJS({ - "node_modules/@actions/core/lib/file-command.js"(exports) { - "use strict"; - var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) - k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - } : function(o, m, k, k2) { - if (k2 === void 0) - k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) - return mod; - var result = {}; - if (mod != null) { - for (var k in mod) - if (k !== "default" && Object.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - } - __setModuleDefault(result, mod); - return result; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; - var fs3 = __importStar(require("fs")); - var os3 = __importStar(require("os")); - var uuid_1 = (init_esm_node(), __toCommonJS(esm_node_exports)); - var utils_1 = require_utils(); - function issueFileCommand(command, message) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) { - throw new Error(`Unable to find environment variable for file command ${command}`); - } - if (!fs3.existsSync(filePath)) { - throw new Error(`Missing file at path: ${filePath}`); - } - fs3.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os3.EOL}`, { - encoding: "utf8" - }); - } - exports.issueFileCommand = issueFileCommand; - function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${uuid_1.v4()}`; - const convertedValue = utils_1.toCommandValue(value); - if (key.includes(delimiter)) { - throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); - } - if (convertedValue.includes(delimiter)) { - throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); - } - return `${key}<<${delimiter}${os3.EOL}${convertedValue}${os3.EOL}${delimiter}`; - } - exports.prepareKeyValueMessage = prepareKeyValueMessage; - } -}); - -// node_modules/@actions/http-client/lib/proxy.js -var require_proxy = __commonJS({ - "node_modules/@actions/http-client/lib/proxy.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.checkBypass = exports.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - return new URL(proxyVar); - } else { - return void 0; - } - } - exports.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperReqHosts.some((x) => x === upperNoProxyItem)) { - return true; - } - } - return false; - } - exports.checkBypass = checkBypass; - } -}); - -// node_modules/tunnel/lib/tunnel.js -var require_tunnel = __commonJS({ - "node_modules/tunnel/lib/tunnel.js"(exports) { - "use strict"; - var net = require("net"); - var tls = require("tls"); - var http = require("http"); - var https = require("https"); - var events = require("events"); - var assert = require("assert"); - var util = require("util"); - exports.httpOverHttp = httpOverHttp; - exports.httpsOverHttp = httpsOverHttp; - exports.httpOverHttps = httpOverHttps; - exports.httpsOverHttps = httpsOverHttps; - function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - return agent; - } - function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; - } - function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - return agent; - } - function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; - } - function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; - self.on("free", function onFree(socket, host, port, localAddress) { - var options2 = toOptions(host, port, localAddress); - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i]; - if (pending.host === options2.host && pending.port === options2.port) { - self.requests.splice(i, 1); - pending.request.onSocket(socket); - return; - } - } - socket.destroy(); - self.removeSocket(socket); - }); - } - util.inherits(TunnelingAgent, events.EventEmitter); - TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({ request: req }, self.options, toOptions(host, port, localAddress)); - if (self.sockets.length >= this.maxSockets) { - self.requests.push(options); - return; - } - self.createSocket(options, function(socket) { - socket.on("free", onFree); - socket.on("close", onCloseOrRemove); - socket.on("agentRemove", onCloseOrRemove); - req.onSocket(socket); - function onFree() { - self.emit("free", socket, options); - } - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener("free", onFree); - socket.removeListener("close", onCloseOrRemove); - socket.removeListener("agentRemove", onCloseOrRemove); - } - }); - }; - TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); - var connectOptions = mergeOptions({}, self.proxyOptions, { - method: "CONNECT", - path: options.host + ":" + options.port, - agent: false, - headers: { - host: options.host + ":" + options.port - } - }); - if (options.localAddress) { - connectOptions.localAddress = options.localAddress; - } - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); - } - debug("making CONNECT request"); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; - connectReq.once("response", onResponse); - connectReq.once("upgrade", onUpgrade); - connectReq.once("connect", onConnect); - connectReq.once("error", onError); - connectReq.end(); - function onResponse(res) { - res.upgrade = true; - } - function onUpgrade(res, socket, head) { - process.nextTick(function() { - onConnect(res, socket, head); - }); - } - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); - if (res.statusCode !== 200) { - debug( - "tunneling socket could not be established, statusCode=%d", - res.statusCode - ); - socket.destroy(); - var error = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); - error.code = "ECONNRESET"; - options.request.emit("error", error); - self.removeSocket(placeholder); - return; - } - if (head.length > 0) { - debug("got illegal response body from proxy"); - socket.destroy(); - var error = new Error("got illegal response body from proxy"); - error.code = "ECONNRESET"; - options.request.emit("error", error); - self.removeSocket(placeholder); - return; - } - debug("tunneling connection has established"); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - return cb(socket); - } - function onError(cause) { - connectReq.removeAllListeners(); - debug( - "tunneling socket could not be established, cause=%s\n", - cause.message, - cause.stack - ); - var error = new Error("tunneling socket could not be established, cause=" + cause.message); - error.code = "ECONNRESET"; - options.request.emit("error", error); - self.removeSocket(placeholder); - } - }; - TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket); - if (pos === -1) { - return; - } - this.sockets.splice(pos, 1); - var pending = this.requests.shift(); - if (pending) { - this.createSocket(pending, function(socket2) { - pending.request.onSocket(socket2); - }); - } - }; - function createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader("host"); - var tlsOptions = mergeOptions({}, self.options, { - socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, "") : options.host - }); - var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); - } - function toOptions(host, port, localAddress) { - if (typeof host === "string") { - return { - host, - port, - localAddress - }; - } - return host; - } - function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i]; - if (typeof overrides === "object") { - var keys = Object.keys(overrides); - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j]; - if (overrides[k] !== void 0) { - target[k] = overrides[k]; - } +// node_modules/semver/classes/semver.js +var require_semver = __commonJS({ + "node_modules/semver/classes/semver.js"(exports, module2) { + var debug = require_debug(); + var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(); + var { re, t } = require_re(); + var parseOptions = require_parse_options(); + var { compareIdentifiers } = require_identifiers(); + var SemVer = class { + constructor(version2, options) { + options = parseOptions(options); + if (version2 instanceof SemVer) { + if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) { + return version2; + } else { + version2 = version2.version; } + } else if (typeof version2 !== "string") { + throw new TypeError(`Invalid Version: ${version2}`); } - } - return target; - } - var debug; - if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === "string") { - args[0] = "TUNNEL: " + args[0]; - } else { - args.unshift("TUNNEL:"); + if (version2.length > MAX_LENGTH) { + throw new TypeError( + `version is longer than ${MAX_LENGTH} characters` + ); } - console.error.apply(console, args); - }; - } else { - debug = function() { - }; - } - exports.debug = debug; - } -}); - -// node_modules/tunnel/index.js -var require_tunnel2 = __commonJS({ - "node_modules/tunnel/index.js"(exports, module2) { - module2.exports = require_tunnel(); - } -}); - -// node_modules/@actions/http-client/lib/index.js -var require_lib = __commonJS({ - "node_modules/@actions/http-client/lib/index.js"(exports) { - "use strict"; - var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) - k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - } : function(o, m, k, k2) { - if (k2 === void 0) - k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) - return mod; - var result = {}; - if (mod != null) { - for (var k in mod) - if (k !== "default" && Object.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - } - __setModuleDefault(result, mod); - return result; - }; - var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } + debug("SemVer", version2, options); + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + const m = version2.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); + if (!m) { + throw new TypeError(`Invalid Version: ${version2}`); } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } + this.raw = version2; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError("Invalid major version"); } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError("Invalid minor version"); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; - var http = __importStar(require("http")); - var https = __importStar(require("https")); - var pm = __importStar(require_proxy()); - var tunnel = __importStar(require_tunnel2()); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers = exports.Headers || (exports.Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, HttpClientError.prototype); - } - }; - exports.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve(output.toString()); - }); - })); - }); - } - }; - exports.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports.isHttps = isHttps; - var HttpClient = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError("Invalid patch version"); + } + if (!m[4]) { + this.prerelease = []; + } else { + this.prerelease = m[4].split(".").map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num; + } + } + return id; + }); } + this.build = m[5] ? m[5].split(".") : []; + this.format(); } - options(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); + format() { + this.version = `${this.major}.${this.minor}.${this.patch}`; + if (this.prerelease.length) { + this.version += `-${this.prerelease.join(".")}`; + } + return this.version; } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); + toString() { + return this.version; } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); + compare(other) { + debug("SemVer.compare", this.version, this.options, other); + if (!(other instanceof SemVer)) { + if (typeof other === "string" && other === this.version) { + return 0; + } + other = new SemVer(other, this.options); + } + if (other.version === this.version) { + return 0; + } + return this.compareMain(other) || this.comparePre(other); } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); + 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); } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); + comparePre(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + if (this.prerelease.length && !other.prerelease.length) { + return -1; + } else if (!this.prerelease.length && other.prerelease.length) { + return 1; + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0; + } + let i = 0; + do { + const a = this.prerelease[i]; + const b = other.prerelease[i]; + debug("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); + compareBuild(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + let i = 0; + do { + const a = this.build[i]; + const b = other.build[i]; + debug("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); } - const parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } else { - return response; - } + } while (++i); + } + // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + inc(release, identifier, identifierBase) { + switch (release) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", identifier, identifierBase); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", identifier, identifierBase); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", identifier, identifierBase); + this.inc("pre", identifier, identifierBase); + break; + case "prerelease": + if (this.prerelease.length === 0) { + this.inc("patch", identifier, identifierBase); } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } + this.inc("pre", identifier, identifierBase); + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { + this.major++; + } + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++; + } + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) { + this.patch++; + } + this.prerelease = []; + break; + case "pre": + if (this.prerelease.length === 0) { + this.prerelease = [0]; + } else { + let i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === "number") { + this.prerelease[i]++; + i = -2; } } - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); + if (i === -1) { + this.prerelease.push(0); + } } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); + if (identifier) { + const base = Number(identifierBase) ? 1 : 0; + if (compareIdentifiers(this.prerelease[0], identifier) === 0) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, base]; + } } else { - resolve(res); + this.prerelease = [identifier, base]; } } - this.requestRawWithCallback(info, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - if (typeof data === "string") { - if (!info.options.headers) { - info.options.headers = {}; - } - info.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info.httpModule.request(info.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); + break; + default: + throw new Error(`invalid increment argument: ${release}`); } + this.format(); + this.raw = this.version; + return this; } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); + }; + module2.exports = SemVer; + } +}); + +// node_modules/semver/functions/parse.js +var require_parse = __commonJS({ + "node_modules/semver/functions/parse.js"(exports, module2) { + var { MAX_LENGTH } = require_constants(); + var SemVer = require_semver(); + var parse2 = (version2, options) => { + if (version2 instanceof SemVer) { + return version2; } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === "https:"; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port ? parseInt(info.parsedUrl.port) : defaultPort; - info.options.path = (info.parsedUrl.pathname || "") + (info.parsedUrl.search || ""); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info.options.headers["user-agent"] = this.userAgent; - } - info.options.agent = this._getAgent(info.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info.options); - } - } - return info; + if (typeof version2 !== "string") { + return null; } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); + if (version2.length > MAX_LENGTH) { + return null; } - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default; + try { + return new SemVer(version2, options); + } catch (er) { + return null; } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (this._keepAlive && !useProxy) { - agent = this._agent; + }; + module2.exports = parse2; + } +}); + +// node_modules/semver/functions/valid.js +var require_valid = __commonJS({ + "node_modules/semver/functions/valid.js"(exports, module2) { + var parse2 = require_parse(); + var valid = (version2, options) => { + const v = parse2(version2, options); + return v ? v.version : null; + }; + module2.exports = valid; + } +}); + +// node_modules/semver/functions/clean.js +var require_clean = __commonJS({ + "node_modules/semver/functions/clean.js"(exports, module2) { + var parse2 = require_parse(); + var clean = (version2, options) => { + const s = parse2(version2.trim().replace(/^[=v]+/, ""), options); + return s ? s.version : null; + }; + module2.exports = clean; + } +}); + +// node_modules/semver/functions/inc.js +var require_inc = __commonJS({ + "node_modules/semver/functions/inc.js"(exports, module2) { + var SemVer = require_semver(); + var inc = (version2, release, options, identifier, identifierBase) => { + if (typeof options === "string") { + identifierBase = identifier; + identifier = options; + options = void 0; + } + try { + return new SemVer( + version2 instanceof SemVer ? version2.version : version2, + options + ).inc(release, identifier, identifierBase).version; + } catch (er) { + return null; + } + }; + module2.exports = inc; + } +}); + +// node_modules/semver/functions/compare.js +var require_compare = __commonJS({ + "node_modules/semver/functions/compare.js"(exports, module2) { + var SemVer = require_semver(); + var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)); + module2.exports = compare; + } +}); + +// node_modules/semver/functions/eq.js +var require_eq = __commonJS({ + "node_modules/semver/functions/eq.js"(exports, module2) { + var compare = require_compare(); + var eq = (a, b, loose) => compare(a, b, loose) === 0; + module2.exports = eq; + } +}); + +// node_modules/semver/functions/diff.js +var require_diff = __commonJS({ + "node_modules/semver/functions/diff.js"(exports, module2) { + var parse2 = require_parse(); + var eq = require_eq(); + var diff = (version1, version2) => { + const v12 = parse2(version1); + const v2 = parse2(version2); + if (eq(v12, v2)) { + return null; + } else { + const hasPre = v12.prerelease.length || v2.prerelease.length; + const prefix = hasPre ? "pre" : ""; + const defaultResult = hasPre ? "prerelease" : ""; + if (v12.major !== v2.major) { + return prefix + "major"; } - if (agent) { - return agent; + if (v12.minor !== v2.minor) { + return prefix + "minor"; } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + if (v12.patch !== v2.patch) { + return prefix + "patch"; } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + if (!v12.prerelease.length || !v2.prerelease.length) { + if (v12.patch) { + return "patch"; + } + if (v12.minor) { + return "minor"; + } + if (v12.major) { + return "major"; } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (this._keepAlive && !agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (!agent) { - agent = usingSsl ? https.globalAgent : http.globalAgent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); } - return agent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve) => setTimeout(() => resolve(), ms)); - }); + return defaultResult; } - _processResponse(res, options) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve(response); - } - })); - }); + }; + module2.exports = diff; + } +}); + +// node_modules/semver/functions/major.js +var require_major = __commonJS({ + "node_modules/semver/functions/major.js"(exports, module2) { + var SemVer = require_semver(); + var major = (a, loose) => new SemVer(a, loose).major; + module2.exports = major; + } +}); + +// node_modules/semver/functions/minor.js +var require_minor = __commonJS({ + "node_modules/semver/functions/minor.js"(exports, module2) { + var SemVer = require_semver(); + var minor = (a, loose) => new SemVer(a, loose).minor; + module2.exports = minor; + } +}); + +// node_modules/semver/functions/patch.js +var require_patch = __commonJS({ + "node_modules/semver/functions/patch.js"(exports, module2) { + var SemVer = require_semver(); + var patch = (a, loose) => new SemVer(a, loose).patch; + module2.exports = patch; + } +}); + +// node_modules/semver/functions/prerelease.js +var require_prerelease = __commonJS({ + "node_modules/semver/functions/prerelease.js"(exports, module2) { + var parse2 = require_parse(); + var prerelease = (version2, options) => { + const parsed = parse2(version2, options); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + }; + module2.exports = prerelease; + } +}); + +// node_modules/semver/functions/rcompare.js +var require_rcompare = __commonJS({ + "node_modules/semver/functions/rcompare.js"(exports, module2) { + var compare = require_compare(); + var rcompare = (a, b, loose) => compare(b, a, loose); + module2.exports = rcompare; + } +}); + +// node_modules/semver/functions/compare-loose.js +var require_compare_loose = __commonJS({ + "node_modules/semver/functions/compare-loose.js"(exports, module2) { + var compare = require_compare(); + var compareLoose = (a, b) => compare(a, b, true); + module2.exports = compareLoose; + } +}); + +// node_modules/semver/functions/compare-build.js +var require_compare_build = __commonJS({ + "node_modules/semver/functions/compare-build.js"(exports, module2) { + var SemVer = require_semver(); + var compareBuild = (a, b, loose) => { + const versionA = new SemVer(a, loose); + const versionB = new SemVer(b, loose); + return versionA.compare(versionB) || versionA.compareBuild(versionB); + }; + module2.exports = compareBuild; + } +}); + +// node_modules/semver/functions/sort.js +var require_sort = __commonJS({ + "node_modules/semver/functions/sort.js"(exports, module2) { + var compareBuild = require_compare_build(); + var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)); + module2.exports = sort; + } +}); + +// node_modules/semver/functions/rsort.js +var require_rsort = __commonJS({ + "node_modules/semver/functions/rsort.js"(exports, module2) { + var compareBuild = require_compare_build(); + var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)); + module2.exports = rsort; + } +}); + +// node_modules/semver/functions/gt.js +var require_gt = __commonJS({ + "node_modules/semver/functions/gt.js"(exports, module2) { + var compare = require_compare(); + var gt = (a, b, loose) => compare(a, b, loose) > 0; + module2.exports = gt; + } +}); + +// node_modules/semver/functions/lt.js +var require_lt = __commonJS({ + "node_modules/semver/functions/lt.js"(exports, module2) { + var compare = require_compare(); + var lt = (a, b, loose) => compare(a, b, loose) < 0; + module2.exports = lt; + } +}); + +// node_modules/semver/functions/neq.js +var require_neq = __commonJS({ + "node_modules/semver/functions/neq.js"(exports, module2) { + var compare = require_compare(); + var neq = (a, b, loose) => compare(a, b, loose) !== 0; + module2.exports = neq; + } +}); + +// node_modules/semver/functions/gte.js +var require_gte = __commonJS({ + "node_modules/semver/functions/gte.js"(exports, module2) { + var compare = require_compare(); + var gte = (a, b, loose) => compare(a, b, loose) >= 0; + module2.exports = gte; + } +}); + +// node_modules/semver/functions/lte.js +var require_lte = __commonJS({ + "node_modules/semver/functions/lte.js"(exports, module2) { + var compare = require_compare(); + var lte = (a, b, loose) => compare(a, b, loose) <= 0; + module2.exports = lte; + } +}); + +// node_modules/semver/functions/cmp.js +var require_cmp = __commonJS({ + "node_modules/semver/functions/cmp.js"(exports, module2) { + var eq = require_eq(); + var neq = require_neq(); + var gt = require_gt(); + var gte = require_gte(); + var lt = require_lt(); + var lte = require_lte(); + var cmp = (a, op, b, loose) => { + switch (op) { + case "===": + if (typeof a === "object") { + a = a.version; + } + if (typeof b === "object") { + b = b.version; + } + return a === b; + case "!==": + if (typeof a === "object") { + a = a.version; + } + if (typeof b === "object") { + b = b.version; + } + return a !== b; + case "": + case "=": + case "==": + return eq(a, b, loose); + case "!=": + return neq(a, b, loose); + case ">": + return gt(a, b, loose); + case ">=": + return gte(a, b, loose); + case "<": + return lt(a, b, loose); + case "<=": + return lte(a, b, loose); + default: + throw new TypeError(`Invalid operator: ${op}`); } }; - exports.HttpClient = HttpClient; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + module2.exports = cmp; } }); -// node_modules/@actions/http-client/lib/auth.js -var require_auth = __commonJS({ - "node_modules/@actions/http-client/lib/auth.js"(exports) { - "use strict"; - var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); +// node_modules/semver/functions/coerce.js +var require_coerce = __commonJS({ + "node_modules/semver/functions/coerce.js"(exports, module2) { + var SemVer = require_semver(); + var parse2 = require_parse(); + var { re, t } = require_re(); + var coerce = (version2, options) => { + if (version2 instanceof SemVer) { + return version2; } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + if (typeof version2 === "number") { + version2 = String(version2); + } + if (typeof version2 !== "string") { + return null; + } + options = options || {}; + let match = null; + if (!options.rtl) { + match = version2.match(re[t.COERCE]); + } else { + let next; + while ((next = re[t.COERCERTL].exec(version2)) && (!match || match.index + match[0].length !== version2.length)) { + if (!match || next.index + next[0].length !== match.index + match[0].length) { + match = next; } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + re[t.COERCERTL].lastIndex = -1; + } + if (match === null) { + return null; + } + return parse2(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options); + }; + module2.exports = coerce; + } +}); + +// node_modules/semver/node_modules/yallist/iterator.js +var require_iterator = __commonJS({ + "node_modules/semver/node_modules/yallist/iterator.js"(exports, module2) { + "use strict"; + module2.exports = function(Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value; } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + }; }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; + } +}); + +// node_modules/semver/node_modules/yallist/yallist.js +var require_yallist = __commonJS({ + "node_modules/semver/node_modules/yallist/yallist.js"(exports, module2) { + "use strict"; + module2.exports = Yallist; + Yallist.Node = Node; + Yallist.create = Yallist; + function Yallist(list) { + var self = this; + if (!(self instanceof Yallist)) { + self = new Yallist(); } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); + self.tail = null; + self.head = null; + self.length = 0; + if (list && typeof list.forEach === "function") { + list.forEach(function(item) { + self.push(item); + }); + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]); } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; + return self; + } + Yallist.prototype.removeNode = function(node) { + if (node.list !== this) { + throw new Error("removing node which does not belong to this list"); } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); + var next = node.next; + var prev = node.prev; + if (next) { + next.prev = prev; + } + if (prev) { + prev.next = next; + } + if (node === this.head) { + this.head = next; + } + if (node === this.tail) { + this.tail = prev; } + node.list.length--; + node.next = null; + node.prev = null; + node.list = null; + return next; }; - exports.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; + Yallist.prototype.unshiftNode = function(node) { + if (node === this.head) { + return; } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; + if (node.list) { + node.list.removeNode(node); } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; + var head = this.head; + node.list = this; + node.next = head; + if (head) { + head.prev = node; } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); + this.head = node; + if (!this.tail) { + this.tail = node; + } + this.length++; + }; + Yallist.prototype.pushNode = function(node) { + if (node === this.tail) { + return; + } + if (node.list) { + node.list.removeNode(node); + } + var tail = this.tail; + node.list = this; + node.prev = tail; + if (tail) { + tail.next = node; + } + this.tail = node; + if (!this.head) { + this.head = node; + } + this.length++; + }; + Yallist.prototype.push = function() { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]); + } + return this.length; + }; + Yallist.prototype.unshift = function() { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]); + } + return this.length; + }; + Yallist.prototype.pop = function() { + if (!this.tail) { + return void 0; + } + var res = this.tail.value; + this.tail = this.tail.prev; + if (this.tail) { + this.tail.next = null; + } else { + this.head = null; } + this.length--; + return res; }; - exports.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + Yallist.prototype.shift = function() { + if (!this.head) { + return void 0; } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; + var res = this.head.value; + this.head = this.head.next; + if (this.head) { + this.head.prev = null; + } else { + this.tail = null; } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); + this.length--; + return res; + }; + Yallist.prototype.forEach = function(fn, thisp) { + thisp = thisp || this; + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this); + walker = walker.next; } }; - exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - -// node_modules/@actions/core/lib/oidc-utils.js -var require_oidc_utils = __commonJS({ - "node_modules/@actions/core/lib/oidc-utils.js"(exports) { - "use strict"; - var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); + Yallist.prototype.forEachReverse = function(fn, thisp) { + thisp = thisp || this; + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this); + walker = walker.prev; } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.OidcClient = void 0; - var http_client_1 = require_lib(); - var auth_1 = require_auth(); - var core_1 = require_core(); - var OidcClient = class { - static createHttpClient(allowRetry = true, maxRetry = 10) { - const requestOptions = { - allowRetries: allowRetry, - maxRetries: maxRetry - }; - return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); + Yallist.prototype.get = function(n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + walker = walker.next; } - static getRequestToken() { - const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; - if (!token) { - throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); - } - return token; + if (i === n && walker !== null) { + return walker.value; } - static getIDTokenUrl() { - const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; - if (!runtimeUrl) { - throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); - } - return runtimeUrl; + }; + Yallist.prototype.getReverse = function(n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + walker = walker.prev; } - static getCall(id_token_url) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - const httpclient = OidcClient.createHttpClient(); - const res = yield httpclient.getJson(id_token_url).catch((error) => { - throw new Error(`Failed to get ID Token. - - Error Code : ${error.statusCode} - - Error Message: ${error.result.message}`); - }); - const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; - if (!id_token) { - throw new Error("Response json body do not have ID Token field"); - } - return id_token; - }); + if (i === n && walker !== null) { + return walker.value; } - static getIDToken(audience) { - return __awaiter(this, void 0, void 0, function* () { - try { - let id_token_url = OidcClient.getIDTokenUrl(); - if (audience) { - const encodedAudience = encodeURIComponent(audience); - id_token_url = `${id_token_url}&audience=${encodedAudience}`; - } - core_1.debug(`ID token url is ${id_token_url}`); - const id_token = yield OidcClient.getCall(id_token_url); - core_1.setSecret(id_token); - return id_token; - } catch (error) { - throw new Error(`Error message: ${error.message}`); - } - }); + }; + Yallist.prototype.map = function(fn, thisp) { + thisp = thisp || this; + var res = new Yallist(); + for (var walker = this.head; walker !== null; ) { + res.push(fn.call(thisp, walker.value, this)); + walker = walker.next; } + return res; }; - exports.OidcClient = OidcClient; - } -}); - -// node_modules/@actions/core/lib/summary.js -var require_summary = __commonJS({ - "node_modules/@actions/core/lib/summary.js"(exports) { - "use strict"; - var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); + Yallist.prototype.mapReverse = function(fn, thisp) { + thisp = thisp || this; + var res = new Yallist(); + for (var walker = this.tail; walker !== null; ) { + res.push(fn.call(thisp, walker.value, this)); + walker = walker.prev; } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + return res; }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; - var os_1 = require("os"); - var fs_1 = require("fs"); - var { access, appendFile, writeFile } = fs_1.promises; - exports.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; - exports.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; - var Summary = class { - constructor() { - this._buffer = ""; + Yallist.prototype.reduce = function(fn, initial) { + var acc; + var walker = this.head; + if (arguments.length > 1) { + acc = initial; + } else if (this.head) { + walker = this.head.next; + acc = this.head.value; + } else { + throw new TypeError("Reduce of empty list with no initial value"); } - /** - * Finds the summary file path from the environment, rejects if env var is not found or file does not exist - * Also checks r/w permissions. - * - * @returns step summary file path - */ - filePath() { - return __awaiter(this, void 0, void 0, function* () { - if (this._filePath) { - return this._filePath; - } - const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; - if (!pathFromEnv) { - throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); - } - try { - yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); - } catch (_a) { - throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); - } - this._filePath = pathFromEnv; - return this._filePath; - }); + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i); + walker = walker.next; + } + return acc; + }; + Yallist.prototype.reduceReverse = function(fn, initial) { + var acc; + var walker = this.tail; + if (arguments.length > 1) { + acc = initial; + } else if (this.tail) { + walker = this.tail.prev; + acc = this.tail.value; + } else { + throw new TypeError("Reduce of empty list with no initial value"); + } + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i); + walker = walker.prev; } - /** - * Wraps content in an HTML tag, adding any HTML attributes - * - * @param {string} tag HTML tag to wrap - * @param {string | null} content content within the tag - * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add - * - * @returns {string} content wrapped in HTML element - */ - wrap(tag, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); - if (!content) { - return `<${tag}${htmlAttrs}>`; - } - return `<${tag}${htmlAttrs}>${content}`; + return acc; + }; + Yallist.prototype.toArray = function() { + var arr = new Array(this.length); + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value; + walker = walker.next; } - /** - * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. - * - * @param {SummaryWriteOptions} [options] (optional) options for write operation - * - * @returns {Promise} summary instance - */ - write(options) { - return __awaiter(this, void 0, void 0, function* () { - const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); - const filePath = yield this.filePath(); - const writeFunc = overwrite ? writeFile : appendFile; - yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); - return this.emptyBuffer(); - }); + return arr; + }; + Yallist.prototype.toArrayReverse = function() { + var arr = new Array(this.length); + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value; + walker = walker.prev; } - /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance - */ - clear() { - return __awaiter(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); - }); + return arr; + }; + Yallist.prototype.slice = function(from, to) { + to = to || this.length; + if (to < 0) { + to += this.length; } - /** - * Returns the current summary buffer as a string - * - * @returns {string} string of summary buffer - */ - stringify() { - return this._buffer; + from = from || 0; + if (from < 0) { + from += this.length; } - /** - * If the summary buffer is empty - * - * @returns {boolen} true if the buffer is empty - */ - isEmptyBuffer() { - return this._buffer.length === 0; + var ret = new Yallist(); + if (to < from || to < 0) { + return ret; } - /** - * Resets the summary buffer without writing to summary file - * - * @returns {Summary} summary instance - */ - emptyBuffer() { - this._buffer = ""; - return this; + if (from < 0) { + from = 0; } - /** - * Adds raw text to the summary buffer - * - * @param {string} text content to add - * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) - * - * @returns {Summary} summary instance - */ - addRaw(text, addEOL = false) { - this._buffer += text; - return addEOL ? this.addEOL() : this; + if (to > this.length) { + to = this.length; } - /** - * Adds the operating system-specific end-of-line marker to the buffer - * - * @returns {Summary} summary instance - */ - addEOL() { - return this.addRaw(os_1.EOL); + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next; } - /** - * Adds an HTML codeblock to the summary buffer - * - * @param {string} code content to render within fenced code block - * @param {string} lang (optional) language to syntax highlight code - * - * @returns {Summary} summary instance - */ - addCodeBlock(code, lang) { - const attrs = Object.assign({}, lang && { lang }); - const element = this.wrap("pre", this.wrap("code", code), attrs); - return this.addRaw(element).addEOL(); + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value); } - /** - * Adds an HTML list to the summary buffer - * - * @param {string[]} items list of items to render - * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) - * - * @returns {Summary} summary instance - */ - addList(items, ordered = false) { - const tag = ordered ? "ol" : "ul"; - const listItems = items.map((item) => this.wrap("li", item)).join(""); - const element = this.wrap(tag, listItems); - return this.addRaw(element).addEOL(); + return ret; + }; + Yallist.prototype.sliceReverse = function(from, to) { + to = to || this.length; + if (to < 0) { + to += this.length; } - /** - * Adds an HTML table to the summary buffer - * - * @param {SummaryTableCell[]} rows table rows - * - * @returns {Summary} summary instance - */ - addTable(rows) { - const tableBody = rows.map((row) => { - const cells = row.map((cell) => { - if (typeof cell === "string") { - return this.wrap("td", cell); - } - const { header, data, colspan, rowspan } = cell; - const tag = header ? "th" : "td"; - const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); - return this.wrap(tag, data, attrs); - }).join(""); - return this.wrap("tr", cells); - }).join(""); - const element = this.wrap("table", tableBody); - return this.addRaw(element).addEOL(); + from = from || 0; + if (from < 0) { + from += this.length; } - /** - * Adds a collapsable HTML details element to the summary buffer - * - * @param {string} label text for the closed state - * @param {string} content collapsable content - * - * @returns {Summary} summary instance - */ - addDetails(label, content) { - const element = this.wrap("details", this.wrap("summary", label) + content); - return this.addRaw(element).addEOL(); + var ret = new Yallist(); + if (to < from || to < 0) { + return ret; } - /** - * Adds an HTML image tag to the summary buffer - * - * @param {string} src path to the image you to embed - * @param {string} alt text description of the image - * @param {SummaryImageOptions} options (optional) addition image attributes - * - * @returns {Summary} summary instance - */ - addImage(src, alt, options) { - const { width, height } = options || {}; - const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); - const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); - return this.addRaw(element).addEOL(); + if (from < 0) { + from = 0; } - /** - * Adds an HTML section heading element - * - * @param {string} text heading text - * @param {number | string} [level=1] (optional) the heading level, default: 1 - * - * @returns {Summary} summary instance - */ - addHeading(text, level) { - const tag = `h${level}`; - const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; - const element = this.wrap(allowedTag, text); - return this.addRaw(element).addEOL(); + if (to > this.length) { + to = this.length; } - /** - * Adds an HTML thematic break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addSeparator() { - const element = this.wrap("hr", null); - return this.addRaw(element).addEOL(); + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev; } - /** - * Adds an HTML line break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addBreak() { - const element = this.wrap("br", null); - return this.addRaw(element).addEOL(); + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value); } - /** - * Adds an HTML blockquote to the summary buffer - * - * @param {string} text quote text - * @param {string} cite (optional) citation url - * - * @returns {Summary} summary instance - */ - addQuote(text, cite) { - const attrs = Object.assign({}, cite && { cite }); - const element = this.wrap("blockquote", text, attrs); - return this.addRaw(element).addEOL(); + return ret; + }; + Yallist.prototype.splice = function(start, deleteCount, ...nodes) { + if (start > this.length) { + start = this.length - 1; + } + if (start < 0) { + start = this.length + start; + } + for (var i = 0, walker = this.head; walker !== null && i < start; i++) { + walker = walker.next; } - /** - * Adds an HTML anchor tag to the summary buffer - * - * @param {string} text link text/content - * @param {string} href hyperlink - * - * @returns {Summary} summary instance - */ - addLink(text, href) { - const element = this.wrap("a", text, { href }); - return this.addRaw(element).addEOL(); + var ret = []; + for (var i = 0; walker && i < deleteCount; i++) { + ret.push(walker.value); + walker = this.removeNode(walker); } + if (walker === null) { + walker = this.tail; + } + if (walker !== this.head && walker !== this.tail) { + walker = walker.prev; + } + for (var i = 0; i < nodes.length; i++) { + walker = insert(this, walker, nodes[i]); + } + return ret; }; - var _summary = new Summary(); - exports.markdownSummary = _summary; - exports.summary = _summary; - } -}); - -// node_modules/@actions/core/lib/path-utils.js -var require_path_utils = __commonJS({ - "node_modules/@actions/core/lib/path-utils.js"(exports) { - "use strict"; - var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) - k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - } : function(o, m, k, k2) { - if (k2 === void 0) - k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) - return mod; - var result = {}; - if (mod != null) { - for (var k in mod) - if (k !== "default" && Object.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); + Yallist.prototype.reverse = function() { + var head = this.head; + var tail = this.tail; + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev; + walker.prev = walker.next; + walker.next = p; } - __setModuleDefault(result, mod); - return result; + this.head = tail; + this.tail = head; + return this; }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; - var path3 = __importStar(require("path")); - function toPosixPath(pth) { - return pth.replace(/[\\]/g, "/"); + function insert(self, node, value) { + var inserted = node === self.head ? new Node(value, null, node, self) : new Node(value, node, node.next, self); + if (inserted.next === null) { + self.tail = inserted; + } + if (inserted.prev === null) { + self.head = inserted; + } + self.length++; + return inserted; } - exports.toPosixPath = toPosixPath; - function toWin32Path(pth) { - return pth.replace(/[/]/g, "\\"); + function push(self, item) { + self.tail = new Node(item, self.tail, null, self); + if (!self.head) { + self.head = self.tail; + } + self.length++; } - exports.toWin32Path = toWin32Path; - function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path3.sep); + function unshift(self, item) { + self.head = new Node(item, null, self.head, self); + if (!self.tail) { + self.tail = self.head; + } + self.length++; + } + function Node(value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list); + } + this.list = list; + this.value = value; + if (prev) { + prev.next = this; + this.prev = prev; + } else { + this.prev = null; + } + if (next) { + next.prev = this; + this.next = next; + } else { + this.next = null; + } + } + try { + require_iterator()(Yallist); + } catch (er) { } - exports.toPlatformPath = toPlatformPath; } }); -// node_modules/@actions/core/lib/core.js -var require_core = __commonJS({ - "node_modules/@actions/core/lib/core.js"(exports) { +// node_modules/semver/node_modules/lru-cache/index.js +var require_lru_cache = __commonJS({ + "node_modules/semver/node_modules/lru-cache/index.js"(exports, module2) { "use strict"; - var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === void 0) - k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - } : function(o, m, k, k2) { - if (k2 === void 0) - k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) - return mod; - var result = {}; - if (mod != null) { - for (var k in mod) - if (k !== "default" && Object.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); + var Yallist = require_yallist(); + var MAX = Symbol("max"); + var LENGTH = Symbol("length"); + var LENGTH_CALCULATOR = Symbol("lengthCalculator"); + var ALLOW_STALE = Symbol("allowStale"); + var MAX_AGE = Symbol("maxAge"); + var DISPOSE = Symbol("dispose"); + var NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet"); + var LRU_LIST = Symbol("lruList"); + var CACHE = Symbol("cache"); + var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet"); + var naiveLength = () => 1; + var LRUCache = class { + constructor(options) { + if (typeof options === "number") + options = { max: options }; + if (!options) + options = {}; + if (options.max && (typeof options.max !== "number" || options.max < 0)) + throw new TypeError("max must be a non-negative number"); + const max = this[MAX] = options.max || Infinity; + const lc = options.length || naiveLength; + this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc; + this[ALLOW_STALE] = options.stale || false; + if (options.maxAge && typeof options.maxAge !== "number") + throw new TypeError("maxAge must be a number"); + this[MAX_AGE] = options.maxAge || 0; + this[DISPOSE] = options.dispose; + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false; + this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false; + this.reset(); } - __setModuleDefault(result, mod); - return result; - }; - var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); + // resize the cache when the max changes. + set max(mL) { + if (typeof mL !== "number" || mL < 0) + throw new TypeError("max must be a non-negative number"); + this[MAX] = mL || Infinity; + trim(this); } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } + get max() { + return this[MAX]; + } + set allowStale(allowStale) { + this[ALLOW_STALE] = !!allowStale; + } + get allowStale() { + return this[ALLOW_STALE]; + } + set maxAge(mA) { + if (typeof mA !== "number") + throw new TypeError("maxAge must be a non-negative number"); + this[MAX_AGE] = mA; + trim(this); + } + get maxAge() { + return this[MAX_AGE]; + } + // resize the cache when the lengthCalculator changes. + set lengthCalculator(lC) { + if (typeof lC !== "function") + lC = naiveLength; + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC; + this[LENGTH] = 0; + this[LRU_LIST].forEach((hit) => { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key); + this[LENGTH] += hit.length; + }); } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } + trim(this); + } + get lengthCalculator() { + return this[LENGTH_CALCULATOR]; + } + get length() { + return this[LENGTH]; + } + get itemCount() { + return this[LRU_LIST].length; + } + rforEach(fn, thisp) { + thisp = thisp || this; + for (let walker = this[LRU_LIST].tail; walker !== null; ) { + const prev = walker.prev; + forEachStep(this, fn, walker, thisp); + walker = prev; } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + forEach(fn, thisp) { + thisp = thisp || this; + for (let walker = this[LRU_LIST].head; walker !== null; ) { + const next = walker.next; + forEachStep(this, fn, walker, thisp); + walker = next; } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; - var command_1 = require_command(); - var file_command_1 = require_file_command(); - var utils_1 = require_utils(); - var os3 = __importStar(require("os")); - var path3 = __importStar(require("path")); - var oidc_utils_1 = require_oidc_utils(); - var ExitCode; - (function(ExitCode2) { - ExitCode2[ExitCode2["Success"] = 0] = "Success"; - ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; - })(ExitCode = exports.ExitCode || (exports.ExitCode = {})); - function exportVariable(name, val) { - const convertedVal = utils_1.toCommandValue(val); - process.env[name] = convertedVal; - const filePath = process.env["GITHUB_ENV"] || ""; - if (filePath) { - return file_command_1.issueFileCommand("ENV", file_command_1.prepareKeyValueMessage(name, val)); } - command_1.issueCommand("set-env", { name }, convertedVal); - } - exports.exportVariable = exportVariable; - function setSecret(secret) { - command_1.issueCommand("add-mask", {}, secret); - } - exports.setSecret = setSecret; - function addPath(inputPath) { - const filePath = process.env["GITHUB_PATH"] || ""; - if (filePath) { - file_command_1.issueFileCommand("PATH", inputPath); - } else { - command_1.issueCommand("add-path", {}, inputPath); + keys() { + return this[LRU_LIST].toArray().map((k) => k.key); } - process.env["PATH"] = `${inputPath}${path3.delimiter}${process.env["PATH"]}`; - } - exports.addPath = addPath; - function getInput2(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val) { - throw new Error(`Input required and not supplied: ${name}`); + values() { + return this[LRU_LIST].toArray().map((k) => k.value); } - if (options && options.trimWhitespace === false) { - return val; + reset() { + if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { + this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value)); + } + this[CACHE] = /* @__PURE__ */ new Map(); + this[LRU_LIST] = new Yallist(); + this[LENGTH] = 0; } - return val.trim(); - } - exports.getInput = getInput2; - function getMultilineInput(name, options) { - const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); - if (options && options.trimWhitespace === false) { - return inputs; + dump() { + return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + }).toArray().filter((h) => h); } - return inputs.map((input) => input.trim()); - } - exports.getMultilineInput = getMultilineInput; - function getBooleanInput2(name, options) { - const trueValue = ["true", "True", "TRUE"]; - const falseValue = ["false", "False", "FALSE"]; - const val = getInput2(name, options); - if (trueValue.includes(val)) - return true; - if (falseValue.includes(val)) - return false; - throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} -Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); - } - exports.getBooleanInput = getBooleanInput2; - function setOutput2(name, value) { - const filePath = process.env["GITHUB_OUTPUT"] || ""; - if (filePath) { - return file_command_1.issueFileCommand("OUTPUT", file_command_1.prepareKeyValueMessage(name, value)); + dumpLru() { + return this[LRU_LIST]; } - process.stdout.write(os3.EOL); - command_1.issueCommand("set-output", { name }, utils_1.toCommandValue(value)); - } - exports.setOutput = setOutput2; - function setCommandEcho(enabled) { - command_1.issue("echo", enabled ? "on" : "off"); - } - exports.setCommandEcho = setCommandEcho; - function setFailed2(message) { - process.exitCode = ExitCode.Failure; - error(message); - } - exports.setFailed = setFailed2; - function isDebug() { - return process.env["RUNNER_DEBUG"] === "1"; - } - exports.isDebug = isDebug; - function debug(message) { - command_1.issueCommand("debug", {}, message); - } - exports.debug = debug; - function error(message, properties = {}) { - command_1.issueCommand("error", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); - } - exports.error = error; - function warning(message, properties = {}) { - command_1.issueCommand("warning", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); - } - exports.warning = warning; - function notice(message, properties = {}) { - command_1.issueCommand("notice", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); - } - exports.notice = notice; - function info(message) { - process.stdout.write(message + os3.EOL); - } - exports.info = info; - function startGroup(name) { - command_1.issue("group", name); - } - exports.startGroup = startGroup; - function endGroup() { - command_1.issue("endgroup"); - } - exports.endGroup = endGroup; - function group(name, fn) { - return __awaiter(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } finally { - endGroup(); + set(key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE]; + if (maxAge && typeof maxAge !== "number") + throw new TypeError("maxAge must be a number"); + const now = maxAge ? Date.now() : 0; + const len = this[LENGTH_CALCULATOR](value, key); + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)); + return false; + } + const node = this[CACHE].get(key); + const item = node.value; + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) + this[DISPOSE](key, item.value); + } + item.now = now; + item.maxAge = maxAge; + item.value = value; + this[LENGTH] += len - item.length; + item.length = len; + this.get(key); + trim(this); + return true; } - return result; - }); - } - exports.group = group; - function saveState(name, value) { - const filePath = process.env["GITHUB_STATE"] || ""; - if (filePath) { - return file_command_1.issueFileCommand("STATE", file_command_1.prepareKeyValueMessage(name, value)); - } - command_1.issueCommand("save-state", { name }, utils_1.toCommandValue(value)); - } - exports.saveState = saveState; - function getState(name) { - return process.env[`STATE_${name}`] || ""; - } - exports.getState = getState; - function getIDToken(aud) { - return __awaiter(this, void 0, void 0, function* () { - return yield oidc_utils_1.OidcClient.getIDToken(aud); - }); - } - exports.getIDToken = getIDToken; - var summary_1 = require_summary(); - Object.defineProperty(exports, "summary", { enumerable: true, get: function() { - return summary_1.summary; - } }); - var summary_2 = require_summary(); - Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function() { - return summary_2.markdownSummary; - } }); - var path_utils_1 = require_path_utils(); - Object.defineProperty(exports, "toPosixPath", { enumerable: true, get: function() { - return path_utils_1.toPosixPath; - } }); - Object.defineProperty(exports, "toWin32Path", { enumerable: true, get: function() { - return path_utils_1.toWin32Path; - } }); - Object.defineProperty(exports, "toPlatformPath", { enumerable: true, get: function() { - return path_utils_1.toPlatformPath; - } }); - } -}); - -// node_modules/semver/internal/constants.js -var require_constants = __commonJS({ - "node_modules/semver/internal/constants.js"(exports, module2) { - var SEMVER_SPEC_VERSION = "2.0.0"; - var MAX_LENGTH = 256; - var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ - 9007199254740991; - var MAX_SAFE_COMPONENT_LENGTH = 16; - var RELEASE_TYPES = [ - "major", - "premajor", - "minor", - "preminor", - "patch", - "prepatch", - "prerelease" - ]; - module2.exports = { - MAX_LENGTH, - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_INTEGER, - RELEASE_TYPES, - SEMVER_SPEC_VERSION, - FLAG_INCLUDE_PRERELEASE: 1, - FLAG_LOOSE: 2 + const hit = new Entry(key, value, len, now, maxAge); + if (hit.length > this[MAX]) { + if (this[DISPOSE]) + this[DISPOSE](key, value); + return false; + } + this[LENGTH] += hit.length; + this[LRU_LIST].unshift(hit); + this[CACHE].set(key, this[LRU_LIST].head); + trim(this); + return true; + } + has(key) { + if (!this[CACHE].has(key)) + return false; + const hit = this[CACHE].get(key).value; + return !isStale(this, hit); + } + get(key) { + return get(this, key, true); + } + peek(key) { + return get(this, key, false); + } + pop() { + const node = this[LRU_LIST].tail; + if (!node) + return null; + del(this, node); + return node.value; + } + del(key) { + del(this, this[CACHE].get(key)); + } + load(arr) { + this.reset(); + const now = Date.now(); + for (let l = arr.length - 1; l >= 0; l--) { + const hit = arr[l]; + const expiresAt = hit.e || 0; + if (expiresAt === 0) + this.set(hit.k, hit.v); + else { + const maxAge = expiresAt - now; + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge); + } + } + } + } + prune() { + this[CACHE].forEach((value, key) => get(this, key, false)); + } }; - } -}); - -// node_modules/semver/internal/debug.js -var require_debug = __commonJS({ - "node_modules/semver/internal/debug.js"(exports, module2) { - var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { + var get = (self, key, doUse) => { + const node = self[CACHE].get(key); + if (node) { + const hit = node.value; + if (isStale(self, hit)) { + del(self, node); + if (!self[ALLOW_STALE]) + return void 0; + } else { + if (doUse) { + if (self[UPDATE_AGE_ON_GET]) + node.value.now = Date.now(); + self[LRU_LIST].unshiftNode(node); + } + } + return hit.value; + } }; - module2.exports = debug; - } -}); - -// node_modules/semver/internal/re.js -var require_re = __commonJS({ - "node_modules/semver/internal/re.js"(exports, module2) { - var { MAX_SAFE_COMPONENT_LENGTH } = require_constants(); - var debug = require_debug(); - exports = module2.exports = {}; - var re = exports.re = []; - var src = exports.src = []; - var t = exports.t = {}; - var R = 0; - var createToken = (name, value, isGlobal) => { - const index = R++; - debug(name, index, value); - t[name] = index; - src[index] = value; - re[index] = new RegExp(value, isGlobal ? "g" : void 0); + var isStale = (self, hit) => { + if (!hit || !hit.maxAge && !self[MAX_AGE]) + return false; + const diff = Date.now() - hit.now; + return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && diff > self[MAX_AGE]; }; - createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); - createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+"); - createToken("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*"); - createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); - createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); - createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`); - createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`); - createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); - createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); - createToken("BUILDIDENTIFIER", "[0-9A-Za-z-]+"); - createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); - createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); - createToken("FULL", `^${src[t.FULLPLAIN]}$`); - createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); - createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); - createToken("GTLT", "((?:<|>)?=?)"); - createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); - createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); - createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); - createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); - createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); - createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); - createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`); - createToken("COERCERTL", src[t.COERCE], true); - createToken("LONETILDE", "(?:~>?)"); - createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); - exports.tildeTrimReplace = "$1~"; - createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); - createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); - createToken("LONECARET", "(?:\\^)"); - createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); - exports.caretTrimReplace = "$1^"; - createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); - createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); - createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); - createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); - createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); - exports.comparatorTrimReplace = "$1$2$3"; - createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); - createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); - createToken("STAR", "(<|>)?=?\\s*\\*"); - createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); - createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); - } -}); - -// node_modules/semver/internal/parse-options.js -var require_parse_options = __commonJS({ - "node_modules/semver/internal/parse-options.js"(exports, module2) { - var looseOption = Object.freeze({ loose: true }); - var emptyOpts = Object.freeze({}); - var parseOptions = (options) => { - if (!options) { - return emptyOpts; + var trim = (self) => { + if (self[LENGTH] > self[MAX]) { + for (let walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null; ) { + const prev = walker.prev; + del(self, walker); + walker = prev; + } } - if (typeof options !== "object") { - return looseOption; + }; + var del = (self, node) => { + if (node) { + const hit = node.value; + if (self[DISPOSE]) + self[DISPOSE](hit.key, hit.value); + self[LENGTH] -= hit.length; + self[CACHE].delete(hit.key); + self[LRU_LIST].removeNode(node); } - return options; }; - module2.exports = parseOptions; - } -}); - -// node_modules/semver/internal/identifiers.js -var require_identifiers = __commonJS({ - "node_modules/semver/internal/identifiers.js"(exports, module2) { - var numeric = /^[0-9]+$/; - var compareIdentifiers = (a, b) => { - const anum = numeric.test(a); - const bnum = numeric.test(b); - if (anum && bnum) { - a = +a; - b = +b; + var Entry = class { + constructor(key, value, length, now, maxAge) { + this.key = key; + this.value = value; + this.length = length; + this.now = now; + this.maxAge = maxAge || 0; } - return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; }; - var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); - module2.exports = { - compareIdentifiers, - rcompareIdentifiers + var forEachStep = (self, fn, node, thisp) => { + let hit = node.value; + if (isStale(self, hit)) { + del(self, node); + if (!self[ALLOW_STALE]) + hit = void 0; + } + if (hit) + fn.call(thisp, hit.value, hit.key, self); }; + module2.exports = LRUCache; } }); -// node_modules/semver/classes/semver.js -var require_semver = __commonJS({ - "node_modules/semver/classes/semver.js"(exports, module2) { - var debug = require_debug(); - var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(); - var { re, t } = require_re(); - var parseOptions = require_parse_options(); - var { compareIdentifiers } = require_identifiers(); - var SemVer = class { - constructor(version2, options) { +// node_modules/semver/classes/range.js +var require_range = __commonJS({ + "node_modules/semver/classes/range.js"(exports, module2) { + var Range = class { + constructor(range, options) { options = parseOptions(options); - if (version2 instanceof SemVer) { - if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) { - return version2; + if (range instanceof Range) { + if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { + return range; } else { - version2 = version2.version; + return new Range(range.raw, options); } - } else if (typeof version2 !== "string") { - throw new TypeError(`Invalid Version: ${version2}`); } - if (version2.length > MAX_LENGTH) { - throw new TypeError( - `version is longer than ${MAX_LENGTH} characters` - ); + if (range instanceof Comparator) { + this.raw = range.value; + this.set = [[range]]; + this.format(); + return this; } - debug("SemVer", version2, options); this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; - const m = version2.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); - if (!m) { - throw new TypeError(`Invalid Version: ${version2}`); - } - this.raw = version2; - this.major = +m[1]; - this.minor = +m[2]; - this.patch = +m[3]; - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError("Invalid major version"); - } - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError("Invalid minor version"); - } - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError("Invalid patch version"); + this.raw = range; + this.set = range.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length); + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${range}`); } - if (!m[4]) { - this.prerelease = []; - } else { - this.prerelease = m[4].split(".").map((id) => { - if (/^[0-9]+$/.test(id)) { - const num = +id; - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num; + if (this.set.length > 1) { + const first = this.set[0]; + this.set = this.set.filter((c) => !isNullSet(c[0])); + if (this.set.length === 0) { + this.set = [first]; + } else if (this.set.length > 1) { + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c]; + break; } } - return id; - }); + } } - this.build = m[5] ? m[5].split(".") : []; this.format(); } format() { - this.version = `${this.major}.${this.minor}.${this.patch}`; - if (this.prerelease.length) { - this.version += `-${this.prerelease.join(".")}`; - } - return this.version; + this.range = this.set.map((comps) => { + return comps.join(" ").trim(); + }).join("||").trim(); + return this.range; } toString() { - return this.version; + return this.range; } - compare(other) { - debug("SemVer.compare", this.version, this.options, other); - if (!(other instanceof SemVer)) { - if (typeof other === "string" && other === this.version) { - return 0; + parseRange(range) { + range = range.trim(); + const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE); + const memoKey = memoOpts + ":" + range; + const cached = cache.get(memoKey); + if (cached) { + return cached; + } + const loose = this.options.loose; + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); + debug("hyphen replace", range); + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); + debug("comparator trim", range); + range = range.replace(re[t.TILDETRIM], tildeTrimReplace); + range = range.replace(re[t.CARETTRIM], caretTrimReplace); + range = range.split(/\s+/).join(" "); + let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); + if (loose) { + rangeList = rangeList.filter((comp) => { + debug("loose invalid filter", comp, this.options); + return !!comp.match(re[t.COMPARATORLOOSE]); + }); + } + debug("range list", rangeList); + const rangeMap = /* @__PURE__ */ new Map(); + const comparators = rangeList.map((comp) => new Comparator(comp, this.options)); + for (const comp of comparators) { + if (isNullSet(comp)) { + return [comp]; } - other = new SemVer(other, this.options); + rangeMap.set(comp.value, comp); } - if (other.version === this.version) { - return 0; + if (rangeMap.size > 1 && rangeMap.has("")) { + rangeMap.delete(""); } - return this.compareMain(other) || this.comparePre(other); + const result = [...rangeMap.values()]; + cache.set(memoKey, result); + return result; } - compareMain(other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options); + intersects(range, options) { + if (!(range instanceof Range)) { + throw new TypeError("a Range is required"); } - return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); + return this.set.some((thisComparators) => { + return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { + return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); } - comparePre(other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options); + // if ANY of the sets match ALL of its comparators, then pass + test(version2) { + if (!version2) { + return false; } - if (this.prerelease.length && !other.prerelease.length) { - return -1; - } else if (!this.prerelease.length && other.prerelease.length) { - return 1; - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0; + if (typeof version2 === "string") { + try { + version2 = new SemVer(version2, this.options); + } catch (er) { + return false; + } } - let i = 0; - do { - const a = this.prerelease[i]; - const b = other.prerelease[i]; - debug("prerelease compare", i, a, b); - if (a === void 0 && b === void 0) { - return 0; - } else if (b === void 0) { - return 1; - } else if (a === void 0) { - return -1; - } else if (a === b) { - continue; - } else { - return compareIdentifiers(a, b); + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version2, this.options)) { + return true; } - } while (++i); + } + return false; } - compareBuild(other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options); + }; + module2.exports = Range; + var LRU = require_lru_cache(); + var cache = new LRU({ max: 1e3 }); + var parseOptions = require_parse_options(); + var Comparator = require_comparator(); + var debug = require_debug(); + var SemVer = require_semver(); + var { + re, + t, + comparatorTrimReplace, + tildeTrimReplace, + caretTrimReplace + } = require_re(); + var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants(); + var isNullSet = (c) => c.value === "<0.0.0-0"; + var isAny = (c) => c.value === ""; + var isSatisfiable = (comparators, options) => { + let result = true; + const remainingComparators = comparators.slice(); + let testComparator = remainingComparators.pop(); + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options); + }); + testComparator = remainingComparators.pop(); + } + return result; + }; + var parseComparator = (comp, options) => { + debug("comp", comp, options); + comp = replaceCarets(comp, options); + debug("caret", comp); + comp = replaceTildes(comp, options); + debug("tildes", comp); + comp = replaceXRanges(comp, options); + debug("xrange", comp); + comp = replaceStars(comp, options); + debug("stars", comp); + return comp; + }; + var isX = (id) => !id || id.toLowerCase() === "x" || id === "*"; + var replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((c) => { + return replaceTilde(c, options); + }).join(" "); + var replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; + return comp.replace(r, (_, M, m, p, pr) => { + debug("tilde", comp, _, M, m, p, pr); + let ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = `>=${M}.0.0 <${+M + 1}.0.0-0`; + } else if (isX(p)) { + ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`; + } else if (pr) { + debug("replaceTilde pr", pr); + ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + } else { + ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; + } + debug("tilde return", ret); + return ret; + }); + }; + var replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((c) => { + return replaceCaret(c, options); + }).join(" "); + var replaceCaret = (comp, options) => { + debug("caret", comp, options); + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; + const z = options.includePrerelease ? "-0" : ""; + return comp.replace(r, (_, M, m, p, pr) => { + debug("caret", comp, _, M, m, p, pr); + let ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; + } else if (isX(p)) { + if (M === "0") { + ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; + } else { + ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`; + } + } else if (pr) { + debug("replaceCaret pr", pr); + if (M === "0") { + if (m === "0") { + ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`; + } else { + ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + } + } else { + ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`; + } + } else { + debug("no pr"); + if (M === "0") { + if (m === "0") { + ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`; + } else { + ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`; + } + } else { + ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; + } + } + debug("caret return", ret); + return ret; + }); + }; + var replaceXRanges = (comp, options) => { + debug("replaceXRanges", comp, options); + return comp.split(/\s+/).map((c) => { + return replaceXRange(c, options); + }).join(" "); + }; + var replaceXRange = (comp, options) => { + comp = comp.trim(); + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; + return comp.replace(r, (ret, gtlt, M, m, p, pr) => { + debug("xRange", comp, ret, gtlt, M, m, p, pr); + const xM = isX(M); + const xm = xM || isX(m); + const xp = xm || isX(p); + const anyX = xp; + if (gtlt === "=" && anyX) { + gtlt = ""; } - let i = 0; - do { - const a = this.build[i]; - const b = other.build[i]; - debug("prerelease compare", i, a, b); - if (a === void 0 && b === void 0) { - return 0; - } else if (b === void 0) { - return 1; - } else if (a === void 0) { - return -1; - } else if (a === b) { - continue; + pr = options.includePrerelease ? "-0" : ""; + if (xM) { + if (gtlt === ">" || gtlt === "<") { + ret = "<0.0.0-0"; } else { - return compareIdentifiers(a, b); + ret = "*"; } - } while (++i); - } - // preminor will bump the version up to the next minor release, and immediately - // down to pre-release. premajor and prepatch work the same way. - inc(release, identifier, identifierBase) { - switch (release) { - case "premajor": - this.prerelease.length = 0; - this.patch = 0; - this.minor = 0; - this.major++; - this.inc("pre", identifier, identifierBase); - break; - case "preminor": - this.prerelease.length = 0; - this.patch = 0; - this.minor++; - this.inc("pre", identifier, identifierBase); - break; - case "prepatch": - this.prerelease.length = 0; - this.inc("patch", identifier, identifierBase); - this.inc("pre", identifier, identifierBase); - break; - case "prerelease": - if (this.prerelease.length === 0) { - this.inc("patch", identifier, identifierBase); - } - this.inc("pre", identifier, identifierBase); - break; - case "major": - if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { - this.major++; - } - this.minor = 0; - this.patch = 0; - this.prerelease = []; - break; - case "minor": - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++; - } - this.patch = 0; - this.prerelease = []; - break; - case "patch": - if (this.prerelease.length === 0) { - this.patch++; - } - this.prerelease = []; - break; - case "pre": - if (this.prerelease.length === 0) { - this.prerelease = [0]; + } else if (gtlt && anyX) { + if (xm) { + m = 0; + } + p = 0; + if (gtlt === ">") { + gtlt = ">="; + if (xm) { + M = +M + 1; + m = 0; + p = 0; } else { - let i = this.prerelease.length; - while (--i >= 0) { - if (typeof this.prerelease[i] === "number") { - this.prerelease[i]++; - i = -2; - } - } - if (i === -1) { - this.prerelease.push(0); - } + m = +m + 1; + p = 0; } - if (identifier) { - const base = Number(identifierBase) ? 1 : 0; - if (compareIdentifiers(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, base]; - } - } else { - this.prerelease = [identifier, base]; - } + } else if (gtlt === "<=") { + gtlt = "<"; + if (xm) { + M = +M + 1; + } else { + m = +m + 1; } - break; - default: - throw new Error(`invalid increment argument: ${release}`); + } + if (gtlt === "<") { + pr = "-0"; + } + ret = `${gtlt + M}.${m}.${p}${pr}`; + } else if (xm) { + ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; + } else if (xp) { + ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; } - this.format(); - this.raw = this.version; - return this; - } + debug("xRange return", ret); + return ret; + }); }; - module2.exports = SemVer; - } -}); - -// node_modules/semver/functions/parse.js -var require_parse = __commonJS({ - "node_modules/semver/functions/parse.js"(exports, module2) { - var { MAX_LENGTH } = require_constants(); - var SemVer = require_semver(); - var parse2 = (version2, options) => { - if (version2 instanceof SemVer) { - return version2; - } - if (typeof version2 !== "string") { - return null; - } - if (version2.length > MAX_LENGTH) { - return null; - } - try { - return new SemVer(version2, options); - } catch (er) { - return null; - } + var replaceStars = (comp, options) => { + debug("replaceStars", comp, options); + return comp.trim().replace(re[t.STAR], ""); }; - module2.exports = parse2; - } -}); - -// node_modules/semver/functions/valid.js -var require_valid = __commonJS({ - "node_modules/semver/functions/valid.js"(exports, module2) { - var parse2 = require_parse(); - var valid = (version2, options) => { - const v = parse2(version2, options); - return v ? v.version : null; + var replaceGTE0 = (comp, options) => { + debug("replaceGTE0", comp, options); + return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); }; - module2.exports = valid; - } -}); - -// node_modules/semver/functions/clean.js -var require_clean = __commonJS({ - "node_modules/semver/functions/clean.js"(exports, module2) { - var parse2 = require_parse(); - var clean = (version2, options) => { - const s = parse2(version2.trim().replace(/^[=v]+/, ""), options); - return s ? s.version : null; + var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => { + if (isX(fM)) { + from = ""; + } else if (isX(fm)) { + from = `>=${fM}.0.0${incPr ? "-0" : ""}`; + } else if (isX(fp)) { + from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; + } else if (fpr) { + from = `>=${from}`; + } else { + from = `>=${from}${incPr ? "-0" : ""}`; + } + if (isX(tM)) { + to = ""; + } else if (isX(tm)) { + to = `<${+tM + 1}.0.0-0`; + } else if (isX(tp)) { + to = `<${tM}.${+tm + 1}.0-0`; + } else if (tpr) { + to = `<=${tM}.${tm}.${tp}-${tpr}`; + } else if (incPr) { + to = `<${tM}.${tm}.${+tp + 1}-0`; + } else { + to = `<=${to}`; + } + return `${from} ${to}`.trim(); }; - module2.exports = clean; - } -}); - -// node_modules/semver/functions/inc.js -var require_inc = __commonJS({ - "node_modules/semver/functions/inc.js"(exports, module2) { - var SemVer = require_semver(); - var inc = (version2, release, options, identifier, identifierBase) => { - if (typeof options === "string") { - identifierBase = identifier; - identifier = options; - options = void 0; + var testSet = (set, version2, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version2)) { + return false; + } } - try { - return new SemVer( - version2 instanceof SemVer ? version2.version : version2, - options - ).inc(release, identifier, identifierBase).version; - } catch (er) { - return null; + if (version2.prerelease.length && !options.includePrerelease) { + for (let i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === Comparator.ANY) { + continue; + } + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver; + if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) { + return true; + } + } + } + return false; } + return true; }; - module2.exports = inc; - } -}); - -// node_modules/semver/functions/compare.js -var require_compare = __commonJS({ - "node_modules/semver/functions/compare.js"(exports, module2) { - var SemVer = require_semver(); - var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)); - module2.exports = compare; } }); -// node_modules/semver/functions/eq.js -var require_eq = __commonJS({ - "node_modules/semver/functions/eq.js"(exports, module2) { - var compare = require_compare(); - var eq = (a, b, loose) => compare(a, b, loose) === 0; - module2.exports = eq; - } -}); - -// node_modules/semver/functions/diff.js -var require_diff = __commonJS({ - "node_modules/semver/functions/diff.js"(exports, module2) { - var parse2 = require_parse(); - var eq = require_eq(); - var diff = (version1, version2) => { - const v12 = parse2(version1); - const v2 = parse2(version2); - if (eq(v12, v2)) { - return null; - } else { - const hasPre = v12.prerelease.length || v2.prerelease.length; - const prefix = hasPre ? "pre" : ""; - const defaultResult = hasPre ? "prerelease" : ""; - if (v12.major !== v2.major) { - return prefix + "major"; +// node_modules/semver/classes/comparator.js +var require_comparator = __commonJS({ + "node_modules/semver/classes/comparator.js"(exports, module2) { + var ANY = Symbol("SemVer ANY"); + var Comparator = class { + static get ANY() { + return ANY; + } + constructor(comp, options) { + options = parseOptions(options); + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp; + } else { + comp = comp.value; + } } - if (v12.minor !== v2.minor) { - return prefix + "minor"; + debug("comparator", comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) { + this.value = ""; + } else { + this.value = this.operator + this.semver.version; } - if (v12.patch !== v2.patch) { - return prefix + "patch"; + debug("comp", this); + } + parse(comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; + const m = comp.match(r); + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`); } - if (!v12.prerelease.length || !v2.prerelease.length) { - if (v12.patch) { - return "patch"; + this.operator = m[1] !== void 0 ? m[1] : ""; + if (this.operator === "=") { + this.operator = ""; + } + if (!m[2]) { + this.semver = ANY; + } else { + this.semver = new SemVer(m[2], this.options.loose); + } + } + toString() { + return this.value; + } + test(version2) { + debug("Comparator.test", version2, this.options.loose); + if (this.semver === ANY || version2 === ANY) { + return true; + } + if (typeof version2 === "string") { + try { + version2 = new SemVer(version2, this.options); + } catch (er) { + return false; } - if (v12.minor) { - return "minor"; + } + return cmp(version2, this.operator, this.semver, this.options); + } + intersects(comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError("a Comparator is required"); + } + if (this.operator === "") { + if (this.value === "") { + return true; } - if (v12.major) { - return "major"; + return new Range(comp.value, options).test(this.value); + } else if (comp.operator === "") { + if (comp.value === "") { + return true; } + return new Range(this.value, options).test(comp.semver); } - return defaultResult; + options = parseOptions(options); + if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) { + return false; + } + if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) { + return false; + } + if (this.operator.startsWith(">") && comp.operator.startsWith(">")) { + return true; + } + if (this.operator.startsWith("<") && comp.operator.startsWith("<")) { + return true; + } + if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) { + return true; + } + if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) { + return true; + } + if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) { + return true; + } + return false; } }; - module2.exports = diff; - } -}); - -// node_modules/semver/functions/major.js -var require_major = __commonJS({ - "node_modules/semver/functions/major.js"(exports, module2) { - var SemVer = require_semver(); - var major = (a, loose) => new SemVer(a, loose).major; - module2.exports = major; - } -}); - -// node_modules/semver/functions/minor.js -var require_minor = __commonJS({ - "node_modules/semver/functions/minor.js"(exports, module2) { - var SemVer = require_semver(); - var minor = (a, loose) => new SemVer(a, loose).minor; - module2.exports = minor; - } -}); - -// node_modules/semver/functions/patch.js -var require_patch = __commonJS({ - "node_modules/semver/functions/patch.js"(exports, module2) { - var SemVer = require_semver(); - var patch = (a, loose) => new SemVer(a, loose).patch; - module2.exports = patch; - } -}); - -// node_modules/semver/functions/prerelease.js -var require_prerelease = __commonJS({ - "node_modules/semver/functions/prerelease.js"(exports, module2) { - var parse2 = require_parse(); - var prerelease = (version2, options) => { - const parsed = parse2(version2, options); - return parsed && parsed.prerelease.length ? parsed.prerelease : null; - }; - module2.exports = prerelease; - } -}); - -// node_modules/semver/functions/rcompare.js -var require_rcompare = __commonJS({ - "node_modules/semver/functions/rcompare.js"(exports, module2) { - var compare = require_compare(); - var rcompare = (a, b, loose) => compare(b, a, loose); - module2.exports = rcompare; - } -}); - -// node_modules/semver/functions/compare-loose.js -var require_compare_loose = __commonJS({ - "node_modules/semver/functions/compare-loose.js"(exports, module2) { - var compare = require_compare(); - var compareLoose = (a, b) => compare(a, b, true); - module2.exports = compareLoose; - } -}); - -// node_modules/semver/functions/compare-build.js -var require_compare_build = __commonJS({ - "node_modules/semver/functions/compare-build.js"(exports, module2) { + module2.exports = Comparator; + var parseOptions = require_parse_options(); + var { re, t } = require_re(); + var cmp = require_cmp(); + var debug = require_debug(); var SemVer = require_semver(); - var compareBuild = (a, b, loose) => { - const versionA = new SemVer(a, loose); - const versionB = new SemVer(b, loose); - return versionA.compare(versionB) || versionA.compareBuild(versionB); - }; - module2.exports = compareBuild; - } -}); - -// node_modules/semver/functions/sort.js -var require_sort = __commonJS({ - "node_modules/semver/functions/sort.js"(exports, module2) { - var compareBuild = require_compare_build(); - var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)); - module2.exports = sort; - } -}); - -// node_modules/semver/functions/rsort.js -var require_rsort = __commonJS({ - "node_modules/semver/functions/rsort.js"(exports, module2) { - var compareBuild = require_compare_build(); - var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)); - module2.exports = rsort; + var Range = require_range(); } }); -// node_modules/semver/functions/gt.js -var require_gt = __commonJS({ - "node_modules/semver/functions/gt.js"(exports, module2) { - var compare = require_compare(); - var gt = (a, b, loose) => compare(a, b, loose) > 0; - module2.exports = gt; +// node_modules/semver/functions/satisfies.js +var require_satisfies = __commonJS({ + "node_modules/semver/functions/satisfies.js"(exports, module2) { + var Range = require_range(); + var satisfies = (version2, range, options) => { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + return range.test(version2); + }; + module2.exports = satisfies; } }); -// node_modules/semver/functions/lt.js -var require_lt = __commonJS({ - "node_modules/semver/functions/lt.js"(exports, module2) { - var compare = require_compare(); - var lt = (a, b, loose) => compare(a, b, loose) < 0; - module2.exports = lt; +// node_modules/semver/ranges/to-comparators.js +var require_to_comparators = __commonJS({ + "node_modules/semver/ranges/to-comparators.js"(exports, module2) { + var Range = require_range(); + var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); + module2.exports = toComparators; } }); -// node_modules/semver/functions/neq.js -var require_neq = __commonJS({ - "node_modules/semver/functions/neq.js"(exports, module2) { - var compare = require_compare(); - var neq = (a, b, loose) => compare(a, b, loose) !== 0; - module2.exports = neq; +// node_modules/semver/ranges/max-satisfying.js +var require_max_satisfying = __commonJS({ + "node_modules/semver/ranges/max-satisfying.js"(exports, module2) { + var SemVer = require_semver(); + var Range = require_range(); + var maxSatisfying = (versions, range, options) => { + let max = null; + let maxSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!max || maxSV.compare(v) === -1) { + max = v; + maxSV = new SemVer(max, options); + } + } + }); + return max; + }; + module2.exports = maxSatisfying; } }); -// node_modules/semver/functions/gte.js -var require_gte = __commonJS({ - "node_modules/semver/functions/gte.js"(exports, module2) { - var compare = require_compare(); - var gte = (a, b, loose) => compare(a, b, loose) >= 0; - module2.exports = gte; +// node_modules/semver/ranges/min-satisfying.js +var require_min_satisfying = __commonJS({ + "node_modules/semver/ranges/min-satisfying.js"(exports, module2) { + var SemVer = require_semver(); + var Range = require_range(); + var minSatisfying = (versions, range, options) => { + let min = null; + let minSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!min || minSV.compare(v) === 1) { + min = v; + minSV = new SemVer(min, options); + } + } + }); + return min; + }; + module2.exports = minSatisfying; } }); -// node_modules/semver/functions/lte.js -var require_lte = __commonJS({ - "node_modules/semver/functions/lte.js"(exports, module2) { - var compare = require_compare(); - var lte = (a, b, loose) => compare(a, b, loose) <= 0; - module2.exports = lte; +// node_modules/semver/ranges/min-version.js +var require_min_version = __commonJS({ + "node_modules/semver/ranges/min-version.js"(exports, module2) { + var SemVer = require_semver(); + var Range = require_range(); + var gt = require_gt(); + var minVersion = (range, loose) => { + range = new Range(range, loose); + let minver = new SemVer("0.0.0"); + if (range.test(minver)) { + return minver; + } + minver = new SemVer("0.0.0-0"); + if (range.test(minver)) { + return minver; + } + minver = null; + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let setMin = null; + comparators.forEach((comparator) => { + const compver = new SemVer(comparator.semver.version); + switch (comparator.operator) { + case ">": + if (compver.prerelease.length === 0) { + compver.patch++; + } else { + compver.prerelease.push(0); + } + compver.raw = compver.format(); + case "": + case ">=": + if (!setMin || gt(compver, setMin)) { + setMin = compver; + } + break; + case "<": + case "<=": + break; + default: + throw new Error(`Unexpected operation: ${comparator.operator}`); + } + }); + if (setMin && (!minver || gt(minver, setMin))) { + minver = setMin; + } + } + if (minver && range.test(minver)) { + return minver; + } + return null; + }; + module2.exports = minVersion; } }); -// node_modules/semver/functions/cmp.js -var require_cmp = __commonJS({ - "node_modules/semver/functions/cmp.js"(exports, module2) { - var eq = require_eq(); - var neq = require_neq(); - var gt = require_gt(); - var gte = require_gte(); - var lt = require_lt(); - var lte = require_lte(); - var cmp = (a, op, b, loose) => { - switch (op) { - case "===": - if (typeof a === "object") { - a = a.version; - } - if (typeof b === "object") { - b = b.version; - } - return a === b; - case "!==": - if (typeof a === "object") { - a = a.version; - } - if (typeof b === "object") { - b = b.version; - } - return a !== b; - case "": - case "=": - case "==": - return eq(a, b, loose); - case "!=": - return neq(a, b, loose); - case ">": - return gt(a, b, loose); - case ">=": - return gte(a, b, loose); - case "<": - return lt(a, b, loose); - case "<=": - return lte(a, b, loose); - default: - throw new TypeError(`Invalid operator: ${op}`); +// node_modules/semver/ranges/valid.js +var require_valid2 = __commonJS({ + "node_modules/semver/ranges/valid.js"(exports, module2) { + var Range = require_range(); + var validRange = (range, options) => { + try { + return new Range(range, options).range || "*"; + } catch (er) { + return null; } }; - module2.exports = cmp; + module2.exports = validRange; } }); -// node_modules/semver/functions/coerce.js -var require_coerce = __commonJS({ - "node_modules/semver/functions/coerce.js"(exports, module2) { +// node_modules/semver/ranges/outside.js +var require_outside = __commonJS({ + "node_modules/semver/ranges/outside.js"(exports, module2) { var SemVer = require_semver(); - var parse2 = require_parse(); - var { re, t } = require_re(); - var coerce = (version2, options) => { - if (version2 instanceof SemVer) { - return version2; - } - if (typeof version2 === "number") { - version2 = String(version2); + var Comparator = require_comparator(); + var { ANY } = Comparator; + var Range = require_range(); + var satisfies = require_satisfies(); + var gt = require_gt(); + var lt = require_lt(); + var lte = require_lte(); + var gte = require_gte(); + var outside = (version2, range, hilo, options) => { + version2 = new SemVer(version2, options); + range = new Range(range, options); + let gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case ">": + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = ">"; + ecomp = ">="; + break; + case "<": + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = "<"; + ecomp = "<="; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); } - if (typeof version2 !== "string") { - return null; + if (satisfies(version2, range, options)) { + return false; } - options = options || {}; - let match = null; - if (!options.rtl) { - match = version2.match(re[t.COERCE]); - } else { - let next; - while ((next = re[t.COERCERTL].exec(version2)) && (!match || match.index + match[0].length !== version2.length)) { - if (!match || next.index + next[0].length !== match.index + match[0].length) { - match = next; + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let high = null; + let low = null; + comparators.forEach((comparator) => { + if (comparator.semver === ANY) { + comparator = new Comparator(">=0.0.0"); + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator; } - re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; + }); + if (high.operator === comp || high.operator === ecomp) { + return false; + } + if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version2, low.semver)) { + return false; } - re[t.COERCERTL].lastIndex = -1; - } - if (match === null) { - return null; } - return parse2(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options); + return true; }; - module2.exports = coerce; + module2.exports = outside; } }); -// node_modules/semver/node_modules/yallist/iterator.js -var require_iterator = __commonJS({ - "node_modules/semver/node_modules/yallist/iterator.js"(exports, module2) { - "use strict"; - module2.exports = function(Yallist) { - Yallist.prototype[Symbol.iterator] = function* () { - for (let walker = this.head; walker; walker = walker.next) { - yield walker.value; - } - }; +// node_modules/semver/ranges/gtr.js +var require_gtr = __commonJS({ + "node_modules/semver/ranges/gtr.js"(exports, module2) { + var outside = require_outside(); + var gtr = (version2, range, options) => outside(version2, range, ">", options); + module2.exports = gtr; + } +}); + +// node_modules/semver/ranges/ltr.js +var require_ltr = __commonJS({ + "node_modules/semver/ranges/ltr.js"(exports, module2) { + var outside = require_outside(); + var ltr = (version2, range, options) => outside(version2, range, "<", options); + module2.exports = ltr; + } +}); + +// node_modules/semver/ranges/intersects.js +var require_intersects = __commonJS({ + "node_modules/semver/ranges/intersects.js"(exports, module2) { + var Range = require_range(); + var intersects = (r1, r2, options) => { + r1 = new Range(r1, options); + r2 = new Range(r2, options); + return r1.intersects(r2, options); }; + module2.exports = intersects; } }); -// node_modules/semver/node_modules/yallist/yallist.js -var require_yallist = __commonJS({ - "node_modules/semver/node_modules/yallist/yallist.js"(exports, module2) { - "use strict"; - module2.exports = Yallist; - Yallist.Node = Node; - Yallist.create = Yallist; - function Yallist(list) { - var self = this; - if (!(self instanceof Yallist)) { - self = new Yallist(); - } - self.tail = null; - self.head = null; - self.length = 0; - if (list && typeof list.forEach === "function") { - list.forEach(function(item) { - self.push(item); - }); - } else if (arguments.length > 0) { - for (var i = 0, l = arguments.length; i < l; i++) { - self.push(arguments[i]); +// node_modules/semver/ranges/simplify.js +var require_simplify = __commonJS({ + "node_modules/semver/ranges/simplify.js"(exports, module2) { + var satisfies = require_satisfies(); + var compare = require_compare(); + module2.exports = (versions, range, options) => { + const set = []; + let first = null; + let prev = null; + const v = versions.sort((a, b) => compare(a, b, options)); + for (const version2 of v) { + const included = satisfies(version2, range, options); + if (included) { + prev = version2; + if (!first) { + first = version2; + } + } else { + if (prev) { + set.push([first, prev]); + } + prev = null; + first = null; } } - return self; - } - Yallist.prototype.removeNode = function(node) { - if (node.list !== this) { - throw new Error("removing node which does not belong to this list"); - } - var next = node.next; - var prev = node.prev; - if (next) { - next.prev = prev; - } - if (prev) { - prev.next = next; - } - if (node === this.head) { - this.head = next; - } - if (node === this.tail) { - this.tail = prev; - } - node.list.length--; - node.next = null; - node.prev = null; - node.list = null; - return next; - }; - Yallist.prototype.unshiftNode = function(node) { - if (node === this.head) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - var head = this.head; - node.list = this; - node.next = head; - if (head) { - head.prev = node; + if (first) { + set.push([first, null]); } - this.head = node; - if (!this.tail) { - this.tail = node; + const ranges = []; + for (const [min, max] of set) { + if (min === max) { + ranges.push(min); + } else if (!max && min === v[0]) { + ranges.push("*"); + } else if (!max) { + ranges.push(`>=${min}`); + } else if (min === v[0]) { + ranges.push(`<=${max}`); + } else { + ranges.push(`${min} - ${max}`); + } } - this.length++; + const simplified = ranges.join(" || "); + const original = typeof range.raw === "string" ? range.raw : String(range); + return simplified.length < original.length ? simplified : range; }; - Yallist.prototype.pushNode = function(node) { - if (node === this.tail) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - var tail = this.tail; - node.list = this; - node.prev = tail; - if (tail) { - tail.next = node; - } - this.tail = node; - if (!this.head) { - this.head = node; + } +}); + +// node_modules/semver/ranges/subset.js +var require_subset = __commonJS({ + "node_modules/semver/ranges/subset.js"(exports, module2) { + var Range = require_range(); + var Comparator = require_comparator(); + var { ANY } = Comparator; + var satisfies = require_satisfies(); + var compare = require_compare(); + var subset = (sub, dom, options = {}) => { + if (sub === dom) { + return true; } - this.length++; + sub = new Range(sub, options); + dom = new Range(dom, options); + let sawNonNull = false; + OUTER: + for (const simpleSub of sub.set) { + for (const simpleDom of dom.set) { + const isSub = simpleSubset(simpleSub, simpleDom, options); + sawNonNull = sawNonNull || isSub !== null; + if (isSub) { + continue OUTER; + } + } + if (sawNonNull) { + return false; + } + } + return true; }; - Yallist.prototype.push = function() { - for (var i = 0, l = arguments.length; i < l; i++) { - push(this, arguments[i]); + var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")]; + var minimumVersion = [new Comparator(">=0.0.0")]; + var simpleSubset = (sub, dom, options) => { + if (sub === dom) { + return true; } - return this.length; - }; - Yallist.prototype.unshift = function() { - for (var i = 0, l = arguments.length; i < l; i++) { - unshift(this, arguments[i]); + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) { + return true; + } else if (options.includePrerelease) { + sub = minimumVersionWithPreRelease; + } else { + sub = minimumVersion; + } } - return this.length; - }; - Yallist.prototype.pop = function() { - if (!this.tail) { - return void 0; + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) { + return true; + } else { + dom = minimumVersion; + } } - var res = this.tail.value; - this.tail = this.tail.prev; - if (this.tail) { - this.tail.next = null; - } else { - this.head = null; + const eqSet = /* @__PURE__ */ new Set(); + let gt, lt; + for (const c of sub) { + if (c.operator === ">" || c.operator === ">=") { + gt = higherGT(gt, c, options); + } else if (c.operator === "<" || c.operator === "<=") { + lt = lowerLT(lt, c, options); + } else { + eqSet.add(c.semver); + } } - this.length--; - return res; - }; - Yallist.prototype.shift = function() { - if (!this.head) { - return void 0; + if (eqSet.size > 1) { + return null; } - var res = this.head.value; - this.head = this.head.next; - if (this.head) { - this.head.prev = null; - } else { - this.tail = null; + let gtltComp; + if (gt && lt) { + gtltComp = compare(gt.semver, lt.semver, options); + if (gtltComp > 0) { + return null; + } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) { + return null; + } } - this.length--; - return res; - }; - Yallist.prototype.forEach = function(fn, thisp) { - thisp = thisp || this; - for (var walker = this.head, i = 0; walker !== null; i++) { - fn.call(thisp, walker.value, i, this); - walker = walker.next; + for (const eq of eqSet) { + if (gt && !satisfies(eq, String(gt), options)) { + return null; + } + if (lt && !satisfies(eq, String(lt), options)) { + return null; + } + for (const c of dom) { + if (!satisfies(eq, String(c), options)) { + return false; + } + } + return true; } - }; - Yallist.prototype.forEachReverse = function(fn, thisp) { - thisp = thisp || this; - for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { - fn.call(thisp, walker.value, i, this); - walker = walker.prev; + let higher, lower; + let hasDomLT, hasDomGT; + let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false; + let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false; + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) { + needDomLTPre = false; } - }; - Yallist.prototype.get = function(n) { - for (var i = 0, walker = this.head; walker !== null && i < n; i++) { - walker = walker.next; + for (const c of dom) { + hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">="; + hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<="; + if (gt) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) { + needDomGTPre = false; + } + } + if (c.operator === ">" || c.operator === ">=") { + higher = higherGT(gt, c, options); + if (higher === c && higher !== gt) { + return false; + } + } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) { + return false; + } + } + if (lt) { + if (needDomLTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) { + needDomLTPre = false; + } + } + if (c.operator === "<" || c.operator === "<=") { + lower = lowerLT(lt, c, options); + if (lower === c && lower !== lt) { + return false; + } + } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) { + return false; + } + } + if (!c.operator && (lt || gt) && gtltComp !== 0) { + return false; + } } - if (i === n && walker !== null) { - return walker.value; + if (gt && hasDomLT && !lt && gtltComp !== 0) { + return false; } - }; - Yallist.prototype.getReverse = function(n) { - for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { - walker = walker.prev; + if (lt && hasDomGT && !gt && gtltComp !== 0) { + return false; } - if (i === n && walker !== null) { - return walker.value; + if (needDomGTPre || needDomLTPre) { + return false; } + return true; }; - Yallist.prototype.map = function(fn, thisp) { - thisp = thisp || this; - var res = new Yallist(); - for (var walker = this.head; walker !== null; ) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.next; + var higherGT = (a, b, options) => { + if (!a) { + return b; } - return res; + const comp = compare(a.semver, b.semver, options); + return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a; }; - Yallist.prototype.mapReverse = function(fn, thisp) { - thisp = thisp || this; - var res = new Yallist(); - for (var walker = this.tail; walker !== null; ) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.prev; + var lowerLT = (a, b, options) => { + if (!a) { + return b; } - return res; + const comp = compare(a.semver, b.semver, options); + return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a; }; - Yallist.prototype.reduce = function(fn, initial) { - var acc; - var walker = this.head; - if (arguments.length > 1) { - acc = initial; - } else if (this.head) { - walker = this.head.next; - acc = this.head.value; - } else { - throw new TypeError("Reduce of empty list with no initial value"); + module2.exports = subset; + } +}); + +// node_modules/semver/index.js +var require_semver2 = __commonJS({ + "node_modules/semver/index.js"(exports, module2) { + var internalRe = require_re(); + var constants = require_constants(); + var SemVer = require_semver(); + var identifiers = require_identifiers(); + var parse2 = require_parse(); + var valid = require_valid(); + var clean = require_clean(); + var inc = require_inc(); + var diff = require_diff(); + var major = require_major(); + var minor = require_minor(); + var patch = require_patch(); + var prerelease = require_prerelease(); + var compare = require_compare(); + var rcompare = require_rcompare(); + var compareLoose = require_compare_loose(); + var compareBuild = require_compare_build(); + var sort = require_sort(); + var rsort = require_rsort(); + var gt = require_gt(); + var lt = require_lt(); + var eq = require_eq(); + var neq = require_neq(); + var gte = require_gte(); + var lte = require_lte(); + var cmp = require_cmp(); + var coerce = require_coerce(); + var Comparator = require_comparator(); + var Range = require_range(); + var satisfies = require_satisfies(); + var toComparators = require_to_comparators(); + var maxSatisfying = require_max_satisfying(); + var minSatisfying = require_min_satisfying(); + var minVersion = require_min_version(); + var validRange = require_valid2(); + var outside = require_outside(); + var gtr = require_gtr(); + var ltr = require_ltr(); + var intersects = require_intersects(); + var simplifyRange = require_simplify(); + var subset = require_subset(); + module2.exports = { + parse: parse2, + valid, + clean, + inc, + diff, + major, + minor, + patch, + prerelease, + compare, + rcompare, + compareLoose, + compareBuild, + sort, + rsort, + gt, + lt, + eq, + neq, + gte, + lte, + cmp, + coerce, + Comparator, + Range, + satisfies, + toComparators, + maxSatisfying, + minSatisfying, + minVersion, + validRange, + outside, + gtr, + ltr, + intersects, + simplifyRange, + subset, + SemVer, + re: internalRe.re, + src: internalRe.src, + tokens: internalRe.t, + SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, + RELEASE_TYPES: constants.RELEASE_TYPES, + compareIdentifiers: identifiers.compareIdentifiers, + rcompareIdentifiers: identifiers.rcompareIdentifiers + }; + } +}); + +// node_modules/@actions/core/lib/utils.js +var require_utils = __commonJS({ + "node_modules/@actions/core/lib/utils.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.toCommandProperties = exports.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; } - for (var i = 0; walker !== null; i++) { - acc = fn(acc, walker.value, i); - walker = walker.next; + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports.toCommandProperties = toCommandProperties; + } +}); + +// node_modules/@actions/core/lib/command.js +var require_command = __commonJS({ + "node_modules/@actions/core/lib/command.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding(result, mod, k); } - return acc; + __setModuleDefault(result, mod); + return result; }; - Yallist.prototype.reduceReverse = function(fn, initial) { - var acc; - var walker = this.tail; - if (arguments.length > 1) { - acc = initial; - } else if (this.tail) { - walker = this.tail.prev; - acc = this.tail.value; - } else { - throw new TypeError("Reduce of empty list with no initial value"); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.issue = exports.issueCommand = void 0; + var os4 = __importStar(require("os")); + var utils_1 = require_utils(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os4.EOL); + } + exports.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; } - for (var i = this.length - 1; walker !== null; i--) { - acc = fn(acc, walker.value, i); - walker = walker.prev; + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; } - return acc; }; - Yallist.prototype.toArray = function() { - var arr = new Array(this.length); - for (var i = 0, walker = this.head; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.next; + function escapeData(s) { + return utils_1.toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return utils_1.toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + import_crypto.default.randomFillSync(rnds8Pool); + poolPtr = 0; + } + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} +var import_crypto, rnds8Pool, poolPtr; +var init_rng = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js"() { + import_crypto = __toESM(require("crypto")); + rnds8Pool = new Uint8Array(256); + poolPtr = rnds8Pool.length; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js +var regex_default; +var init_regex = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js"() { + regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js +function validate(uuid) { + return typeof uuid === "string" && regex_default.test(uuid); +} +var validate_default; +var init_validate = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js"() { + init_regex(); + validate_default = validate; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js +function stringify(arr, offset = 0) { + const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); + if (!validate_default(uuid)) { + throw TypeError("Stringified UUID is invalid"); + } + return uuid; +} +var byteToHex, stringify_default; +var init_stringify = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js"() { + init_validate(); + byteToHex = []; + for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 256).toString(16).substr(1)); + } + stringify_default = stringify; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq; + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || rng)(); + if (node == null) { + node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + if (clockseq == null) { + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383; + } + } + let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); + let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1; + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4; + if (dt < 0 && options.clockseq === void 0) { + clockseq = clockseq + 1 & 16383; + } + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) { + nsecs = 0; + } + if (nsecs >= 1e4) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + msecs += 122192928e5; + const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; + b[i++] = tl >>> 24 & 255; + b[i++] = tl >>> 16 & 255; + b[i++] = tl >>> 8 & 255; + b[i++] = tl & 255; + const tmh = msecs / 4294967296 * 1e4 & 268435455; + b[i++] = tmh >>> 8 & 255; + b[i++] = tmh & 255; + b[i++] = tmh >>> 24 & 15 | 16; + b[i++] = tmh >>> 16 & 255; + b[i++] = clockseq >>> 8 | 128; + b[i++] = clockseq & 255; + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + return buf || stringify_default(b); +} +var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default; +var init_v1 = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js"() { + init_rng(); + init_stringify(); + _lastMSecs = 0; + _lastNSecs = 0; + v1_default = v1; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js +function parse(uuid) { + if (!validate_default(uuid)) { + throw TypeError("Invalid UUID"); + } + let v; + const arr = new Uint8Array(16); + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 255; + arr[2] = v >>> 8 & 255; + arr[3] = v & 255; + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 255; + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 255; + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 255; + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; + arr[11] = v / 4294967296 & 255; + arr[12] = v >>> 24 & 255; + arr[13] = v >>> 16 & 255; + arr[14] = v >>> 8 & 255; + arr[15] = v & 255; + return arr; +} +var parse_default; +var init_parse = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js"() { + init_validate(); + parse_default = parse; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); + const bytes = []; + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + return bytes; +} +function v35_default(name, version2, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === "string") { + value = stringToBytes(value); + } + if (typeof namespace === "string") { + namespace = parse_default(namespace); + } + if (namespace.length !== 16) { + throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); + } + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 15 | version2; + bytes[8] = bytes[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; } - return arr; - }; - Yallist.prototype.toArrayReverse = function() { - var arr = new Array(this.length); - for (var i = 0, walker = this.tail; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.prev; + return buf; + } + return stringify_default(bytes); + } + try { + generateUUID.name = name; + } catch (err) { + } + generateUUID.DNS = DNS; + generateUUID.URL = URL2; + return generateUUID; +} +var DNS, URL2; +var init_v35 = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js"() { + init_stringify(); + init_parse(); + DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; + URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto2.default.createHash("md5").update(bytes).digest(); +} +var import_crypto2, md5_default; +var init_md5 = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js"() { + import_crypto2 = __toESM(require("crypto")); + md5_default = md5; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js +var v3, v3_default; +var init_v3 = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js"() { + init_v35(); + init_md5(); + v3 = v35_default("v3", 48, md5_default); + v3_default = v3; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js +function v4(options, buf, offset) { + options = options || {}; + const rnds = options.random || (options.rng || rng)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + return buf; + } + return stringify_default(rnds); +} +var v4_default; +var init_v4 = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js"() { + init_rng(); + init_stringify(); + v4_default = v4; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto3.default.createHash("sha1").update(bytes).digest(); +} +var import_crypto3, sha1_default; +var init_sha1 = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js"() { + import_crypto3 = __toESM(require("crypto")); + sha1_default = sha1; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js +var v5, v5_default; +var init_v5 = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js"() { + init_v35(); + init_sha1(); + v5 = v35_default("v5", 80, sha1_default); + v5_default = v5; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js +var nil_default; +var init_nil = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js"() { + nil_default = "00000000-0000-0000-0000-000000000000"; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js +function version(uuid) { + if (!validate_default(uuid)) { + throw TypeError("Invalid UUID"); + } + return parseInt(uuid.substr(14, 1), 16); +} +var version_default; +var init_version = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js"() { + init_validate(); + version_default = version; + } +}); + +// node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js +var esm_node_exports = {}; +__export(esm_node_exports, { + NIL: () => nil_default, + parse: () => parse_default, + stringify: () => stringify_default, + v1: () => v1_default, + v3: () => v3_default, + v4: () => v4_default, + v5: () => v5_default, + validate: () => validate_default, + version: () => version_default +}); +var init_esm_node = __esm({ + "node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js"() { + init_v1(); + init_v3(); + init_v4(); + init_v5(); + init_nil(); + init_version(); + init_validate(); + init_stringify(); + init_parse(); + } +}); + +// node_modules/@actions/core/lib/file-command.js +var require_file_command = __commonJS({ + "node_modules/@actions/core/lib/file-command.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding(result, mod, k); } - return arr; + __setModuleDefault(result, mod); + return result; }; - Yallist.prototype.slice = function(from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; - } - from = from || 0; - if (from < 0) { - from += this.length; - } - var ret = new Yallist(); - if (to < from || to < 0) { - return ret; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; + var fs3 = __importStar(require("fs")); + var os4 = __importStar(require("os")); + var uuid_1 = (init_esm_node(), __toCommonJS(esm_node_exports)); + var utils_1 = require_utils(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); } - if (from < 0) { - from = 0; + if (!fs3.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); } - if (to > this.length) { - to = this.length; + fs3.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os4.EOL}`, { + encoding: "utf8" + }); + } + exports.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${uuid_1.v4()}`; + const convertedValue = utils_1.toCommandValue(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); } - for (var i = 0, walker = this.head; walker !== null && i < from; i++) { - walker = walker.next; + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - for (; walker !== null && i < to; i++, walker = walker.next) { - ret.push(walker.value); + return `${key}<<${delimiter}${os4.EOL}${convertedValue}${os4.EOL}${delimiter}`; + } + exports.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); + +// node_modules/@actions/http-client/lib/proxy.js +var require_proxy = __commonJS({ + "node_modules/@actions/http-client/lib/proxy.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.checkBypass = exports.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; } - return ret; - }; - Yallist.prototype.sliceReverse = function(from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + return new URL(proxyVar); + } else { + return void 0; } - from = from || 0; - if (from < 0) { - from += this.length; + } + exports.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; } - var ret = new Yallist(); - if (to < from || to < 0) { - return ret; + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; } - if (from < 0) { - from = 0; + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; } - if (to > this.length) { - to = this.length; + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); } - for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { - walker = walker.prev; + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperReqHosts.some((x) => x === upperNoProxyItem)) { + return true; + } } - for (; walker !== null && i > from; i--, walker = walker.prev) { - ret.push(walker.value); + return false; + } + exports.checkBypass = checkBypass; + } +}); + +// node_modules/tunnel/lib/tunnel.js +var require_tunnel = __commonJS({ + "node_modules/tunnel/lib/tunnel.js"(exports) { + "use strict"; + var net = require("net"); + var tls = require("tls"); + var http = require("http"); + var https = require("https"); + var events = require("events"); + var assert = require("assert"); + var util = require("util"); + exports.httpOverHttp = httpOverHttp; + exports.httpsOverHttp = httpsOverHttp; + exports.httpOverHttps = httpOverHttps; + exports.httpsOverHttps = httpsOverHttps; + function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + return agent; + } + function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; + } + function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + return agent; + } + function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; + } + function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + self.on("free", function onFree(socket, host, port, localAddress) { + var options2 = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options2.host && pending.port === options2.port) { + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); + } + util.inherits(TunnelingAgent, events.EventEmitter); + TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({ request: req }, self.options, toOptions(host, port, localAddress)); + if (self.sockets.length >= this.maxSockets) { + self.requests.push(options); + return; } - return ret; + self.createSocket(options, function(socket) { + socket.on("free", onFree); + socket.on("close", onCloseOrRemove); + socket.on("agentRemove", onCloseOrRemove); + req.onSocket(socket); + function onFree() { + self.emit("free", socket, options); + } + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener("free", onFree); + socket.removeListener("close", onCloseOrRemove); + socket.removeListener("agentRemove", onCloseOrRemove); + } + }); }; - Yallist.prototype.splice = function(start, deleteCount, ...nodes) { - if (start > this.length) { - start = this.length - 1; - } - if (start < 0) { - start = this.length + start; - } - for (var i = 0, walker = this.head; walker !== null && i < start; i++) { - walker = walker.next; + TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: "CONNECT", + path: options.host + ":" + options.port, + agent: false, + headers: { + host: options.host + ":" + options.port + } + }); + if (options.localAddress) { + connectOptions.localAddress = options.localAddress; } - var ret = []; - for (var i = 0; walker && i < deleteCount; i++) { - ret.push(walker.value); - walker = this.removeNode(walker); + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); } - if (walker === null) { - walker = this.tail; + debug("making CONNECT request"); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; + connectReq.once("response", onResponse); + connectReq.once("upgrade", onUpgrade); + connectReq.once("connect", onConnect); + connectReq.once("error", onError); + connectReq.end(); + function onResponse(res) { + res.upgrade = true; } - if (walker !== this.head && walker !== this.tail) { - walker = walker.prev; + function onUpgrade(res, socket, head) { + process.nextTick(function() { + onConnect(res, socket, head); + }); } - for (var i = 0; i < nodes.length; i++) { - walker = insert(this, walker, nodes[i]); + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + if (res.statusCode !== 200) { + debug( + "tunneling socket could not be established, statusCode=%d", + res.statusCode + ); + socket.destroy(); + var error = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug("got illegal response body from proxy"); + socket.destroy(); + var error = new Error("got illegal response body from proxy"); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + return; + } + debug("tunneling connection has established"); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); } - return ret; - }; - Yallist.prototype.reverse = function() { - var head = this.head; - var tail = this.tail; - for (var walker = head; walker !== null; walker = walker.prev) { - var p = walker.prev; - walker.prev = walker.next; - walker.next = p; + function onError(cause) { + connectReq.removeAllListeners(); + debug( + "tunneling socket could not be established, cause=%s\n", + cause.message, + cause.stack + ); + var error = new Error("tunneling socket could not be established, cause=" + cause.message); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); } - this.head = tail; - this.tail = head; - return this; }; - function insert(self, node, value) { - var inserted = node === self.head ? new Node(value, null, node, self) : new Node(value, node, node.next, self); - if (inserted.next === null) { - self.tail = inserted; - } - if (inserted.prev === null) { - self.head = inserted; + TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket); + if (pos === -1) { + return; } - self.length++; - return inserted; - } - function push(self, item) { - self.tail = new Node(item, self.tail, null, self); - if (!self.head) { - self.head = self.tail; + this.sockets.splice(pos, 1); + var pending = this.requests.shift(); + if (pending) { + this.createSocket(pending, function(socket2) { + pending.request.onSocket(socket2); + }); } - self.length++; + }; + function createSecureSocket(options, cb) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var hostHeader = options.request.getHeader("host"); + var tlsOptions = mergeOptions({}, self.options, { + socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, "") : options.host + }); + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); } - function unshift(self, item) { - self.head = new Node(item, null, self.head, self); - if (!self.tail) { - self.tail = self.head; + function toOptions(host, port, localAddress) { + if (typeof host === "string") { + return { + host, + port, + localAddress + }; } - self.length++; + return host; } - function Node(value, prev, next, list) { - if (!(this instanceof Node)) { - return new Node(value, prev, next, list); - } - this.list = list; - this.value = value; - if (prev) { - prev.next = this; - this.prev = prev; - } else { - this.prev = null; - } - if (next) { - next.prev = this; - this.next = next; - } else { - this.next = null; + function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === "object") { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== void 0) { + target[k] = overrides[k]; + } + } + } } + return target; } - try { - require_iterator()(Yallist); - } catch (er) { + var debug; + if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === "string") { + args[0] = "TUNNEL: " + args[0]; + } else { + args.unshift("TUNNEL:"); + } + console.error.apply(console, args); + }; + } else { + debug = function() { + }; } + exports.debug = debug; } }); -// node_modules/semver/node_modules/lru-cache/index.js -var require_lru_cache = __commonJS({ - "node_modules/semver/node_modules/lru-cache/index.js"(exports, module2) { +// node_modules/tunnel/index.js +var require_tunnel2 = __commonJS({ + "node_modules/tunnel/index.js"(exports, module2) { + module2.exports = require_tunnel(); + } +}); + +// node_modules/@actions/http-client/lib/index.js +var require_lib = __commonJS({ + "node_modules/@actions/http-client/lib/index.js"(exports) { "use strict"; - var Yallist = require_yallist(); - var MAX = Symbol("max"); - var LENGTH = Symbol("length"); - var LENGTH_CALCULATOR = Symbol("lengthCalculator"); - var ALLOW_STALE = Symbol("allowStale"); - var MAX_AGE = Symbol("maxAge"); - var DISPOSE = Symbol("dispose"); - var NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet"); - var LRU_LIST = Symbol("lruList"); - var CACHE = Symbol("cache"); - var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet"); - var naiveLength = () => 1; - var LRUCache = class { - constructor(options) { - if (typeof options === "number") - options = { max: options }; - if (!options) - options = {}; - if (options.max && (typeof options.max !== "number" || options.max < 0)) - throw new TypeError("max must be a non-negative number"); - const max = this[MAX] = options.max || Infinity; - const lc = options.length || naiveLength; - this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc; - this[ALLOW_STALE] = options.stale || false; - if (options.maxAge && typeof options.maxAge !== "number") - throw new TypeError("maxAge must be a number"); - this[MAX_AGE] = options.maxAge || 0; - this[DISPOSE] = options.dispose; - this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false; - this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false; - this.reset(); - } - // resize the cache when the max changes. - set max(mL) { - if (typeof mL !== "number" || mL < 0) - throw new TypeError("max must be a non-negative number"); - this[MAX] = mL || Infinity; - trim(this); - } - get max() { - return this[MAX]; - } - set allowStale(allowStale) { - this[ALLOW_STALE] = !!allowStale; - } - get allowStale() { - return this[ALLOW_STALE]; - } - set maxAge(mA) { - if (typeof mA !== "number") - throw new TypeError("maxAge must be a non-negative number"); - this[MAX_AGE] = mA; - trim(this); - } - get maxAge() { - return this[MAX_AGE]; - } - // resize the cache when the lengthCalculator changes. - set lengthCalculator(lC) { - if (typeof lC !== "function") - lC = naiveLength; - if (lC !== this[LENGTH_CALCULATOR]) { - this[LENGTH_CALCULATOR] = lC; - this[LENGTH] = 0; - this[LRU_LIST].forEach((hit) => { - hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key); - this[LENGTH] += hit.length; - }); - } - trim(this); - } - get lengthCalculator() { - return this[LENGTH_CALCULATOR]; - } - get length() { - return this[LENGTH]; - } - get itemCount() { - return this[LRU_LIST].length; - } - rforEach(fn, thisp) { - thisp = thisp || this; - for (let walker = this[LRU_LIST].tail; walker !== null; ) { - const prev = walker.prev; - forEachStep(this, fn, walker, thisp); - walker = prev; - } - } - forEach(fn, thisp) { - thisp = thisp || this; - for (let walker = this[LRU_LIST].head; walker !== null; ) { - const next = walker.next; - forEachStep(this, fn, walker, thisp); - walker = next; - } - } - keys() { - return this[LRU_LIST].toArray().map((k) => k.key); - } - values() { - return this[LRU_LIST].toArray().map((k) => k.value); - } - reset() { - if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { - this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value)); - } - this[CACHE] = /* @__PURE__ */ new Map(); - this[LRU_LIST] = new Yallist(); - this[LENGTH] = 0; - } - dump() { - return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : { - k: hit.key, - v: hit.value, - e: hit.now + (hit.maxAge || 0) - }).toArray().filter((h) => h); + var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding(result, mod, k); } - dumpLru() { - return this[LRU_LIST]; + __setModuleDefault(result, mod); + return result; + }; + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); } - set(key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE]; - if (maxAge && typeof maxAge !== "number") - throw new TypeError("maxAge must be a number"); - const now = maxAge ? Date.now() : 0; - const len = this[LENGTH_CALCULATOR](value, key); - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - del(this, this[CACHE].get(key)); - return false; + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); } - const node = this[CACHE].get(key); - const item = node.value; - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) - this[DISPOSE](key, item.value); + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); } - item.now = now; - item.maxAge = maxAge; - item.value = value; - this[LENGTH] += len - item.length; - item.length = len; - this.get(key); - trim(this); - return true; } - const hit = new Entry(key, value, len, now, maxAge); - if (hit.length > this[MAX]) { - if (this[DISPOSE]) - this[DISPOSE](key, value); - return false; + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - this[LENGTH] += hit.length; - this[LRU_LIST].unshift(hit); - this[CACHE].set(key, this[LRU_LIST].head); - trim(this); - return true; - } - has(key) { - if (!this[CACHE].has(key)) - return false; - const hit = this[CACHE].get(key).value; - return !isStale(this, hit); - } - get(key) { - return get(this, key, true); - } - peek(key) { - return get(this, key, false); - } - pop() { - const node = this[LRU_LIST].tail; - if (!node) - return null; - del(this, node); - return node.value; - } - del(key) { - del(this, this[CACHE].get(key)); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; + var http = __importStar(require("http")); + var https = __importStar(require("https")); + var pm = __importStar(require_proxy()); + var tunnel = __importStar(require_tunnel2()); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers = exports.Headers || (exports.Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); } - load(arr) { - this.reset(); - const now = Date.now(); - for (let l = arr.length - 1; l >= 0; l--) { - const hit = arr[l]; - const expiresAt = hit.e || 0; - if (expiresAt === 0) - this.set(hit.k, hit.v); - else { - const maxAge = expiresAt - now; - if (maxAge > 0) { - this.set(hit.k, hit.v, maxAge); - } - } - } + }; + exports.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; } - prune() { - this[CACHE].forEach((value, key) => get(this, key, false)); + readBody() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve(output.toString()); + }); + })); + }); } }; - var get = (self, key, doUse) => { - const node = self[CACHE].get(key); - if (node) { - const hit = node.value; - if (isStale(self, hit)) { - del(self, node); - if (!self[ALLOW_STALE]) - return void 0; - } else { - if (doUse) { - if (self[UPDATE_AGE_ON_GET]) - node.value.now = Date.now(); - self[LRU_LIST].unshiftNode(node); + exports.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports.isHttps = isHttps; + var HttpClient = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; } } - return hit.value; } - }; - var isStale = (self, hit) => { - if (!hit || !hit.maxAge && !self[MAX_AGE]) - return false; - const diff = Date.now() - hit.now; - return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && diff > self[MAX_AGE]; - }; - var trim = (self) => { - if (self[LENGTH] > self[MAX]) { - for (let walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null; ) { - const prev = walker.prev; - del(self, walker); - walker = prev; - } + options(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); } - }; - var del = (self, node) => { - if (node) { - const hit = node.value; - if (self[DISPOSE]) - self[DISPOSE](hit.key, hit.value); - self[LENGTH] -= hit.length; - self[CACHE].delete(hit.key); - self[LRU_LIST].removeNode(node); + get(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); } - }; - var Entry = class { - constructor(key, value, length, now, maxAge) { - this.key = key; - this.value = value; - this.length = length; - this.now = now; - this.maxAge = maxAge || 0; + del(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); } - }; - var forEachStep = (self, fn, node, thisp) => { - let hit = node.value; - if (isStale(self, hit)) { - del(self, node); - if (!self[ALLOW_STALE]) - hit = void 0; + post(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); } - if (hit) - fn.call(thisp, hit.value, hit.key, self); - }; - module2.exports = LRUCache; - } -}); - -// node_modules/semver/classes/range.js -var require_range = __commonJS({ - "node_modules/semver/classes/range.js"(exports, module2) { - var Range = class { - constructor(range, options) { - options = parseOptions(options); - if (range instanceof Range) { - if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { - return range; - } else { - return new Range(range.raw, options); - } - } - if (range instanceof Comparator) { - this.raw = range.value; - this.set = [[range]]; - this.format(); - return this; - } - this.options = options; - this.loose = !!options.loose; - this.includePrerelease = !!options.includePrerelease; - this.raw = range; - this.set = range.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length); - if (!this.set.length) { - throw new TypeError(`Invalid SemVer Range: ${range}`); - } - if (this.set.length > 1) { - const first = this.set[0]; - this.set = this.set.filter((c) => !isNullSet(c[0])); - if (this.set.length === 0) { - this.set = [first]; - } else if (this.set.length > 1) { - for (const c of this.set) { - if (c.length === 1 && isAny(c[0])) { - this.set = [c]; - break; - } - } - } - } - this.format(); + patch(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); } - format() { - this.range = this.set.map((comps) => { - return comps.join(" ").trim(); - }).join("||").trim(); - return this.range; + put(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); } - toString() { - return this.range; + head(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); } - parseRange(range) { - range = range.trim(); - const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE); - const memoKey = memoOpts + ":" + range; - const cached = cache.get(memoKey); - if (cached) { - return cached; - } - const loose = this.options.loose; - const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; - range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); - debug("hyphen replace", range); - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); - debug("comparator trim", range); - range = range.replace(re[t.TILDETRIM], tildeTrimReplace); - range = range.replace(re[t.CARETTRIM], caretTrimReplace); - range = range.split(/\s+/).join(" "); - let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); - if (loose) { - rangeList = rangeList.filter((comp) => { - debug("loose invalid filter", comp, this.options); - return !!comp.match(re[t.COMPARATORLOOSE]); - }); - } - debug("range list", rangeList); - const rangeMap = /* @__PURE__ */ new Map(); - const comparators = rangeList.map((comp) => new Comparator(comp, this.options)); - for (const comp of comparators) { - if (isNullSet(comp)) { - return [comp]; + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); } - rangeMap.set(comp.value, comp); - } - if (rangeMap.size > 1 && rangeMap.has("")) { - rangeMap.delete(""); - } - const result = [...rangeMap.values()]; - cache.set(memoKey, result); - return result; + const parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); } - intersects(range, options) { - if (!(range instanceof Range)) { - throw new TypeError("a Range is required"); + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); } - return this.set.some((thisComparators) => { - return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { - return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { - return rangeComparators.every((rangeComparator) => { - return thisComparator.intersects(rangeComparator, options); - }); - }); + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve(res); + } + } + this.requestRawWithCallback(info, data, callbackForResult); }); }); } - // if ANY of the sets match ALL of its comparators, then pass - test(version2) { - if (!version2) { - return false; + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + if (typeof data === "string") { + if (!info.options.headers) { + info.options.headers = {}; + } + info.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); } - if (typeof version2 === "string") { - try { - version2 = new SemVer(version2, this.options); - } catch (er) { - return false; + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); } } - for (let i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version2, this.options)) { - return true; + const req = info.httpModule.request(info.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); } + handleResult(new Error(`Request timeout: ${info.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); } - return false; } - }; - module2.exports = Range; - var LRU = require_lru_cache(); - var cache = new LRU({ max: 1e3 }); - var parseOptions = require_parse_options(); - var Comparator = require_comparator(); - var debug = require_debug(); - var SemVer = require_semver(); - var { - re, - t, - comparatorTrimReplace, - tildeTrimReplace, - caretTrimReplace - } = require_re(); - var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants(); - var isNullSet = (c) => c.value === "<0.0.0-0"; - var isAny = (c) => c.value === ""; - var isSatisfiable = (comparators, options) => { - let result = true; - const remainingComparators = comparators.slice(); - let testComparator = remainingComparators.pop(); - while (result && remainingComparators.length) { - result = remainingComparators.every((otherComparator) => { - return testComparator.intersects(otherComparator, options); - }); - testComparator = remainingComparators.pop(); + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); } - return result; - }; - var parseComparator = (comp, options) => { - debug("comp", comp, options); - comp = replaceCarets(comp, options); - debug("caret", comp); - comp = replaceTildes(comp, options); - debug("tildes", comp); - comp = replaceXRanges(comp, options); - debug("xrange", comp); - comp = replaceStars(comp, options); - debug("stars", comp); - return comp; - }; - var isX = (id) => !id || id.toLowerCase() === "x" || id === "*"; - var replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((c) => { - return replaceTilde(c, options); - }).join(" "); - var replaceTilde = (comp, options) => { - const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; - return comp.replace(r, (_, M, m, p, pr) => { - debug("tilde", comp, _, M, m, p, pr); - let ret; - if (isX(M)) { - ret = ""; - } else if (isX(m)) { - ret = `>=${M}.0.0 <${+M + 1}.0.0-0`; - } else if (isX(p)) { - ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`; - } else if (pr) { - debug("replaceTilde pr", pr); - ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; - } else { - ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === "https:"; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port ? parseInt(info.parsedUrl.port) : defaultPort; + info.options.path = (info.parsedUrl.pathname || "") + (info.parsedUrl.search || ""); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers["user-agent"] = this.userAgent; } - debug("tilde return", ret); - return ret; - }); - }; - var replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((c) => { - return replaceCaret(c, options); - }).join(" "); - var replaceCaret = (comp, options) => { - debug("caret", comp, options); - const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; - const z = options.includePrerelease ? "-0" : ""; - return comp.replace(r, (_, M, m, p, pr) => { - debug("caret", comp, _, M, m, p, pr); - let ret; - if (isX(M)) { - ret = ""; - } else if (isX(m)) { - ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; - } else if (isX(p)) { - if (M === "0") { - ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; - } else { - ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`; - } - } else if (pr) { - debug("replaceCaret pr", pr); - if (M === "0") { - if (m === "0") { - ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`; - } else { - ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; - } - } else { - ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`; - } - } else { - debug("no pr"); - if (M === "0") { - if (m === "0") { - ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`; - } else { - ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`; - } - } else { - ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; + info.options.agent = this._getAgent(info.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info.options); } } - debug("caret return", ret); - return ret; - }); - }; - var replaceXRanges = (comp, options) => { - debug("replaceXRanges", comp, options); - return comp.split(/\s+/).map((c) => { - return replaceXRange(c, options); - }).join(" "); - }; - var replaceXRange = (comp, options) => { - comp = comp.trim(); - const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; - return comp.replace(r, (ret, gtlt, M, m, p, pr) => { - debug("xRange", comp, ret, gtlt, M, m, p, pr); - const xM = isX(M); - const xm = xM || isX(m); - const xp = xm || isX(p); - const anyX = xp; - if (gtlt === "=" && anyX) { - gtlt = ""; + return info; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (this._keepAlive && !useProxy) { + agent = this._agent; } - pr = options.includePrerelease ? "-0" : ""; - if (xM) { - if (gtlt === ">" || gtlt === "<") { - ret = "<0.0.0-0"; + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; } else { - ret = "*"; - } - } else if (gtlt && anyX) { - if (xm) { - m = 0; + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; } - p = 0; - if (gtlt === ">") { - gtlt = ">="; - if (xm) { - M = +M + 1; - m = 0; - p = 0; - } else { - m = +m + 1; - p = 0; + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (this._keepAlive && !agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (!agent) { + agent = usingSsl ? https.globalAgent : http.globalAgent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve) => setTimeout(() => resolve(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve(response); } - } else if (gtlt === "<=") { - gtlt = "<"; - if (xm) { - M = +M + 1; + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); } else { - m = +m + 1; + resolve(response); } + })); + }); + } + }; + exports.HttpClient = HttpClient; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + } +}); + +// node_modules/@actions/http-client/lib/auth.js +var require_auth = __commonJS({ + "node_modules/@actions/http-client/lib/auth.js"(exports) { + "use strict"; + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); } - if (gtlt === "<") { - pr = "-0"; + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); } - ret = `${gtlt + M}.${m}.${p}${pr}`; - } else if (xm) { - ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; - } else if (xp) { - ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; } - debug("xRange return", ret); - return ret; + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var replaceStars = (comp, options) => { - debug("replaceStars", comp, options); - return comp.trim().replace(re[t.STAR], ""); - }; - var replaceGTE0 = (comp, options) => { - debug("replaceGTE0", comp, options); - return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } }; - var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => { - if (isX(fM)) { - from = ""; - } else if (isX(fm)) { - from = `>=${fM}.0.0${incPr ? "-0" : ""}`; - } else if (isX(fp)) { - from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; - } else if (fpr) { - from = `>=${from}`; - } else { - from = `>=${from}${incPr ? "-0" : ""}`; + exports.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; } - if (isX(tM)) { - to = ""; - } else if (isX(tm)) { - to = `<${+tM + 1}.0.0-0`; - } else if (isX(tp)) { - to = `<${tM}.${+tm + 1}.0-0`; - } else if (tpr) { - to = `<=${tM}.${tm}.${tp}-${tpr}`; - } else if (incPr) { - to = `<${tM}.${tm}.${+tp + 1}-0`; - } else { - to = `<=${to}`; + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); } - return `${from} ${to}`.trim(); }; - var testSet = (set, version2, options) => { - for (let i = 0; i < set.length; i++) { - if (!set[i].test(version2)) { - return false; - } + exports.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; } - if (version2.prerelease.length && !options.includePrerelease) { - for (let i = 0; i < set.length; i++) { - debug(set[i].semver); - if (set[i].semver === Comparator.ANY) { - continue; - } - if (set[i].semver.prerelease.length > 0) { - const allowed = set[i].semver; - if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) { - return true; - } - } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { return false; } - return true; + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } }; + exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; } }); -// node_modules/semver/classes/comparator.js -var require_comparator = __commonJS({ - "node_modules/semver/classes/comparator.js"(exports, module2) { - var ANY = Symbol("SemVer ANY"); - var Comparator = class { - static get ANY() { - return ANY; - } - constructor(comp, options) { - options = parseOptions(options); - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp; - } else { - comp = comp.value; - } - } - debug("comparator", comp, options); - this.options = options; - this.loose = !!options.loose; - this.parse(comp); - if (this.semver === ANY) { - this.value = ""; - } else { - this.value = this.operator + this.semver.version; - } - debug("comp", this); - } - parse(comp) { - const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; - const m = comp.match(r); - if (!m) { - throw new TypeError(`Invalid comparator: ${comp}`); - } - this.operator = m[1] !== void 0 ? m[1] : ""; - if (this.operator === "=") { - this.operator = ""; - } - if (!m[2]) { - this.semver = ANY; - } else { - this.semver = new SemVer(m[2], this.options.loose); - } - } - toString() { - return this.value; +// node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils = __commonJS({ + "node_modules/@actions/core/lib/oidc-utils.js"(exports) { + "use strict"; + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); } - test(version2) { - debug("Comparator.test", version2, this.options.loose); - if (this.semver === ANY || version2 === ANY) { - return true; - } - if (typeof version2 === "string") { + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { try { - version2 = new SemVer(version2, this.options); - } catch (er) { - return false; + step(generator.next(value)); + } catch (e) { + reject(e); } } - return cmp(version2, this.operator, this.semver, this.options); - } - intersects(comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError("a Comparator is required"); - } - if (this.operator === "") { - if (this.value === "") { - return true; - } - return new Range(comp.value, options).test(this.value); - } else if (comp.operator === "") { - if (comp.value === "") { - return true; + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); } - return new Range(this.value, options).test(comp.semver); - } - options = parseOptions(options); - if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) { - return false; - } - if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) { - return false; - } - if (this.operator.startsWith(">") && comp.operator.startsWith(">")) { - return true; - } - if (this.operator.startsWith("<") && comp.operator.startsWith("<")) { - return true; - } - if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) { - return true; } - if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) { - return true; + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) { - return true; + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.OidcClient = void 0; + var http_client_1 = require_lib(); + var auth_1 = require_auth(); + var core_1 = require_core(); + var OidcClient = class { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); } - return false; + return token; } - }; - module2.exports = Comparator; - var parseOptions = require_parse_options(); - var { re, t } = require_re(); - var cmp = require_cmp(); - var debug = require_debug(); - var SemVer = require_semver(); - var Range = require_range(); - } -}); - -// node_modules/semver/functions/satisfies.js -var require_satisfies = __commonJS({ - "node_modules/semver/functions/satisfies.js"(exports, module2) { - var Range = require_range(); - var satisfies = (version2, range, options) => { - try { - range = new Range(range, options); - } catch (er) { - return false; + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; } - return range.test(version2); - }; - module2.exports = satisfies; - } -}); - -// node_modules/semver/ranges/to-comparators.js -var require_to_comparators = __commonJS({ - "node_modules/semver/ranges/to-comparators.js"(exports, module2) { - var Range = require_range(); - var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); - module2.exports = toComparators; - } -}); - -// node_modules/semver/ranges/max-satisfying.js -var require_max_satisfying = __commonJS({ - "node_modules/semver/ranges/max-satisfying.js"(exports, module2) { - var SemVer = require_semver(); - var Range = require_range(); - var maxSatisfying = (versions, range, options) => { - let max = null; - let maxSV = null; - let rangeObj = null; - try { - rangeObj = new Range(range, options); - } catch (er) { - return null; + static getCall(id_token_url) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const httpclient = OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error.statusCode} + + Error Message: ${error.result.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); } - versions.forEach((v) => { - if (rangeObj.test(v)) { - if (!max || maxSV.compare(v) === -1) { - max = v; - maxSV = new SemVer(max, options); + static getIDToken(audience) { + return __awaiter(this, void 0, void 0, function* () { + try { + let id_token_url = OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + core_1.debug(`ID token url is ${id_token_url}`); + const id_token = yield OidcClient.getCall(id_token_url); + core_1.setSecret(id_token); + return id_token; + } catch (error) { + throw new Error(`Error message: ${error.message}`); } - } - }); - return max; + }); + } }; - module2.exports = maxSatisfying; + exports.OidcClient = OidcClient; } }); -// node_modules/semver/ranges/min-satisfying.js -var require_min_satisfying = __commonJS({ - "node_modules/semver/ranges/min-satisfying.js"(exports, module2) { - var SemVer = require_semver(); - var Range = require_range(); - var minSatisfying = (versions, range, options) => { - let min = null; - let minSV = null; - let rangeObj = null; - try { - rangeObj = new Range(range, options); - } catch (er) { - return null; +// node_modules/@actions/core/lib/summary.js +var require_summary = __commonJS({ + "node_modules/@actions/core/lib/summary.js"(exports) { + "use strict"; + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); } - versions.forEach((v) => { - if (rangeObj.test(v)) { - if (!min || minSV.compare(v) === 1) { - min = v; - minSV = new SemVer(min, options); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); } } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); }); - return min; }; - module2.exports = minSatisfying; - } -}); - -// node_modules/semver/ranges/min-version.js -var require_min_version = __commonJS({ - "node_modules/semver/ranges/min-version.js"(exports, module2) { - var SemVer = require_semver(); - var Range = require_range(); - var gt = require_gt(); - var minVersion = (range, loose) => { - range = new Range(range, loose); - let minver = new SemVer("0.0.0"); - if (range.test(minver)) { - return minver; - } - minver = new SemVer("0.0.0-0"); - if (range.test(minver)) { - return minver; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; } - minver = null; - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i]; - let setMin = null; - comparators.forEach((comparator) => { - const compver = new SemVer(comparator.semver.version); - switch (comparator.operator) { - case ">": - if (compver.prerelease.length === 0) { - compver.patch++; - } else { - compver.prerelease.push(0); - } - compver.raw = compver.format(); - case "": - case ">=": - if (!setMin || gt(compver, setMin)) { - setMin = compver; - } - break; - case "<": - case "<=": - break; - default: - throw new Error(`Unexpected operation: ${comparator.operator}`); + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); } + this._filePath = pathFromEnv; + return this._filePath; }); - if (setMin && (!minver || gt(minver, setMin))) { - minver = setMin; + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; } + return `<${tag}${htmlAttrs}>${content}`; } - if (minver && range.test(minver)) { - return minver; + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); } - return null; - }; - module2.exports = minVersion; - } -}); - -// node_modules/semver/ranges/valid.js -var require_valid2 = __commonJS({ - "node_modules/semver/ranges/valid.js"(exports, module2) { - var Range = require_range(); - var validRange = (range, options) => { - try { - return new Range(range, options).range || "*"; - } catch (er) { - return null; + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); } - }; - module2.exports = validRange; - } -}); - -// node_modules/semver/ranges/outside.js -var require_outside = __commonJS({ - "node_modules/semver/ranges/outside.js"(exports, module2) { - var SemVer = require_semver(); - var Comparator = require_comparator(); - var { ANY } = Comparator; - var Range = require_range(); - var satisfies = require_satisfies(); - var gt = require_gt(); - var lt = require_lt(); - var lte = require_lte(); - var gte = require_gte(); - var outside = (version2, range, hilo, options) => { - version2 = new SemVer(version2, options); - range = new Range(range, options); - let gtfn, ltefn, ltfn, comp, ecomp; - switch (hilo) { - case ">": - gtfn = gt; - ltefn = lte; - ltfn = lt; - comp = ">"; - ecomp = ">="; - break; - case "<": - gtfn = lt; - ltefn = gte; - ltfn = gt; - comp = "<"; - ecomp = "<="; - break; - default: - throw new TypeError('Must provide a hilo val of "<" or ">"'); + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); } - if (satisfies(version2, range, options)) { - return false; + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); } - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i]; - let high = null; - let low = null; - comparators.forEach((comparator) => { - if (comparator.semver === ANY) { - comparator = new Comparator(">=0.0.0"); - } - high = high || comparator; - low = low || comparator; - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator; - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator; - } - }); - if (high.operator === comp || high.operator === ecomp) { - return false; - } - if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) { - return false; - } else if (low.operator === ecomp && ltfn(version2, low.semver)) { - return false; - } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); } - return true; - }; - module2.exports = outside; - } -}); - -// node_modules/semver/ranges/gtr.js -var require_gtr = __commonJS({ - "node_modules/semver/ranges/gtr.js"(exports, module2) { - var outside = require_outside(); - var gtr = (version2, range, options) => outside(version2, range, ">", options); - module2.exports = gtr; - } -}); - -// node_modules/semver/ranges/ltr.js -var require_ltr = __commonJS({ - "node_modules/semver/ranges/ltr.js"(exports, module2) { - var outside = require_outside(); - var ltr = (version2, range, options) => outside(version2, range, "<", options); - module2.exports = ltr; - } -}); - -// node_modules/semver/ranges/intersects.js -var require_intersects = __commonJS({ - "node_modules/semver/ranges/intersects.js"(exports, module2) { - var Range = require_range(); - var intersects = (r1, r2, options) => { - r1 = new Range(r1, options); - r2 = new Range(r2, options); - return r1.intersects(r2, options); - }; - module2.exports = intersects; - } -}); - -// node_modules/semver/ranges/simplify.js -var require_simplify = __commonJS({ - "node_modules/semver/ranges/simplify.js"(exports, module2) { - var satisfies = require_satisfies(); - var compare = require_compare(); - module2.exports = (versions, range, options) => { - const set = []; - let first = null; - let prev = null; - const v = versions.sort((a, b) => compare(a, b, options)); - for (const version2 of v) { - const included = satisfies(version2, range, options); - if (included) { - prev = version2; - if (!first) { - first = version2; - } - } else { - if (prev) { - set.push([first, prev]); - } - prev = null; - first = null; - } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); } - if (first) { - set.push([first, null]); + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); } - const ranges = []; - for (const [min, max] of set) { - if (min === max) { - ranges.push(min); - } else if (!max && min === v[0]) { - ranges.push("*"); - } else if (!max) { - ranges.push(`>=${min}`); - } else if (min === v[0]) { - ranges.push(`<=${max}`); - } else { - ranges.push(`${min} - ${max}`); - } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); } - const simplified = ranges.join(" || "); - const original = typeof range.raw === "string" ? range.raw : String(range); - return simplified.length < original.length ? simplified : range; }; + var _summary = new Summary(); + exports.markdownSummary = _summary; + exports.summary = _summary; } }); -// node_modules/semver/ranges/subset.js -var require_subset = __commonJS({ - "node_modules/semver/ranges/subset.js"(exports, module2) { - var Range = require_range(); - var Comparator = require_comparator(); - var { ANY } = Comparator; - var satisfies = require_satisfies(); - var compare = require_compare(); - var subset = (sub, dom, options = {}) => { - if (sub === dom) { - return true; +// node_modules/@actions/core/lib/path-utils.js +var require_path_utils = __commonJS({ + "node_modules/@actions/core/lib/path-utils.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding(result, mod, k); } - sub = new Range(sub, options); - dom = new Range(dom, options); - let sawNonNull = false; - OUTER: - for (const simpleSub of sub.set) { - for (const simpleDom of dom.set) { - const isSub = simpleSubset(simpleSub, simpleDom, options); - sawNonNull = sawNonNull || isSub !== null; - if (isSub) { - continue OUTER; - } - } - if (sawNonNull) { - return false; - } - } - return true; + __setModuleDefault(result, mod); + return result; }; - var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")]; - var minimumVersion = [new Comparator(">=0.0.0")]; - var simpleSubset = (sub, dom, options) => { - if (sub === dom) { - return true; - } - if (sub.length === 1 && sub[0].semver === ANY) { - if (dom.length === 1 && dom[0].semver === ANY) { - return true; - } else if (options.includePrerelease) { - sub = minimumVersionWithPreRelease; - } else { - sub = minimumVersion; - } - } - if (dom.length === 1 && dom[0].semver === ANY) { - if (options.includePrerelease) { - return true; - } else { - dom = minimumVersion; - } - } - const eqSet = /* @__PURE__ */ new Set(); - let gt, lt; - for (const c of sub) { - if (c.operator === ">" || c.operator === ">=") { - gt = higherGT(gt, c, options); - } else if (c.operator === "<" || c.operator === "<=") { - lt = lowerLT(lt, c, options); - } else { - eqSet.add(c.semver); - } - } - if (eqSet.size > 1) { - return null; - } - let gtltComp; - if (gt && lt) { - gtltComp = compare(gt.semver, lt.semver, options); - if (gtltComp > 0) { - return null; - } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) { - return null; - } - } - for (const eq of eqSet) { - if (gt && !satisfies(eq, String(gt), options)) { - return null; - } - if (lt && !satisfies(eq, String(lt), options)) { - return null; - } - for (const c of dom) { - if (!satisfies(eq, String(c), options)) { - return false; - } - } - return true; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; + var path3 = __importStar(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path3.sep); + } + exports.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/core/lib/core.js +var require_core = __commonJS({ + "node_modules/@actions/core/lib/core.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.hasOwnProperty.call(mod, k)) + __createBinding(result, mod, k); } - let higher, lower; - let hasDomLT, hasDomGT; - let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false; - let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false; - if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) { - needDomLTPre = false; + __setModuleDefault(result, mod); + return result; + }; + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); } - for (const c of dom) { - hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">="; - hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<="; - if (gt) { - if (needDomGTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) { - needDomGTPre = false; - } - } - if (c.operator === ">" || c.operator === ">=") { - higher = higherGT(gt, c, options); - if (higher === c && higher !== gt) { - return false; - } - } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) { - return false; + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); } } - if (lt) { - if (needDomLTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) { - needDomLTPre = false; - } - } - if (c.operator === "<" || c.operator === "<=") { - lower = lowerLT(lt, c, options); - if (lower === c && lower !== lt) { - return false; - } - } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) { - return false; + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); } } - if (!c.operator && (lt || gt) && gtltComp !== 0) { - return false; + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; + var command_1 = require_command(); + var file_command_1 = require_file_command(); + var utils_1 = require_utils(); + var os4 = __importStar(require("os")); + var path3 = __importStar(require("path")); + var oidc_utils_1 = require_oidc_utils(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode = exports.ExitCode || (exports.ExitCode = {})); + function exportVariable(name, val) { + const convertedVal = utils_1.toCommandValue(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return file_command_1.issueFileCommand("ENV", file_command_1.prepareKeyValueMessage(name, val)); + } + command_1.issueCommand("set-env", { name }, convertedVal); + } + exports.exportVariable = exportVariable; + function setSecret(secret) { + command_1.issueCommand("add-mask", {}, secret); + } + exports.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + file_command_1.issueFileCommand("PATH", inputPath); + } else { + command_1.issueCommand("add-path", {}, inputPath); } - if (gt && hasDomLT && !lt && gtltComp !== 0) { - return false; + process.env["PATH"] = `${inputPath}${path3.delimiter}${process.env["PATH"]}`; + } + exports.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); } - if (lt && hasDomGT && !gt && gtltComp !== 0) { - return false; + if (options && options.trimWhitespace === false) { + return val; } - if (needDomGTPre || needDomLTPre) { - return false; + return val.trim(); + } + exports.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; } - return true; - }; - var higherGT = (a, b, options) => { - if (!a) { - return b; + return inputs.map((input) => input.trim()); + } + exports.getMultilineInput = getMultilineInput; + function getBooleanInput2(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports.getBooleanInput = getBooleanInput2; + function setOutput2(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return file_command_1.issueFileCommand("OUTPUT", file_command_1.prepareKeyValueMessage(name, value)); } - const comp = compare(a.semver, b.semver, options); - return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a; - }; - var lowerLT = (a, b, options) => { - if (!a) { - return b; + process.stdout.write(os4.EOL); + command_1.issueCommand("set-output", { name }, utils_1.toCommandValue(value)); + } + exports.setOutput = setOutput2; + function setCommandEcho(enabled) { + command_1.issue("echo", enabled ? "on" : "off"); + } + exports.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error(message); + } + exports.setFailed = setFailed2; + function isDebug() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports.isDebug = isDebug; + function debug(message) { + command_1.issueCommand("debug", {}, message); + } + exports.debug = debug; + function error(message, properties = {}) { + command_1.issueCommand("error", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); + } + exports.error = error; + function warning(message, properties = {}) { + command_1.issueCommand("warning", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); + } + exports.warning = warning; + function notice(message, properties = {}) { + command_1.issueCommand("notice", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); + } + exports.notice = notice; + function info(message) { + process.stdout.write(message + os4.EOL); + } + exports.info = info; + function startGroup(name) { + command_1.issue("group", name); + } + exports.startGroup = startGroup; + function endGroup() { + command_1.issue("endgroup"); + } + exports.endGroup = endGroup; + function group(name, fn) { + return __awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } finally { + endGroup(); + } + return result; + }); + } + exports.group = group; + function saveState(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return file_command_1.issueFileCommand("STATE", file_command_1.prepareKeyValueMessage(name, value)); } - const comp = compare(a.semver, b.semver, options); - return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a; - }; - module2.exports = subset; - } -}); - -// node_modules/semver/index.js -var require_semver2 = __commonJS({ - "node_modules/semver/index.js"(exports, module2) { - var internalRe = require_re(); - var constants = require_constants(); - var SemVer = require_semver(); - var identifiers = require_identifiers(); - var parse2 = require_parse(); - var valid = require_valid(); - var clean = require_clean(); - var inc = require_inc(); - var diff = require_diff(); - var major = require_major(); - var minor = require_minor(); - var patch = require_patch(); - var prerelease = require_prerelease(); - var compare = require_compare(); - var rcompare = require_rcompare(); - var compareLoose = require_compare_loose(); - var compareBuild = require_compare_build(); - var sort = require_sort(); - var rsort = require_rsort(); - var gt = require_gt(); - var lt = require_lt(); - var eq = require_eq(); - var neq = require_neq(); - var gte = require_gte(); - var lte = require_lte(); - var cmp = require_cmp(); - var coerce = require_coerce(); - var Comparator = require_comparator(); - var Range = require_range(); - var satisfies = require_satisfies(); - var toComparators = require_to_comparators(); - var maxSatisfying = require_max_satisfying(); - var minSatisfying = require_min_satisfying(); - var minVersion = require_min_version(); - var validRange = require_valid2(); - var outside = require_outside(); - var gtr = require_gtr(); - var ltr = require_ltr(); - var intersects = require_intersects(); - var simplifyRange = require_simplify(); - var subset = require_subset(); - module2.exports = { - parse: parse2, - valid, - clean, - inc, - diff, - major, - minor, - patch, - prerelease, - compare, - rcompare, - compareLoose, - compareBuild, - sort, - rsort, - gt, - lt, - eq, - neq, - gte, - lte, - cmp, - coerce, - Comparator, - Range, - satisfies, - toComparators, - maxSatisfying, - minSatisfying, - minVersion, - validRange, - outside, - gtr, - ltr, - intersects, - simplifyRange, - subset, - SemVer, - re: internalRe.re, - src: internalRe.src, - tokens: internalRe.t, - SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, - RELEASE_TYPES: constants.RELEASE_TYPES, - compareIdentifiers: identifiers.compareIdentifiers, - rcompareIdentifiers: identifiers.rcompareIdentifiers - }; + command_1.issueCommand("save-state", { name }, utils_1.toCommandValue(value)); + } + exports.saveState = saveState; + function getState(name) { + return process.env[`STATE_${name}`] || ""; + } + exports.getState = getState; + function getIDToken(aud) { + return __awaiter(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports.getIDToken = getIDToken; + var summary_1 = require_summary(); + Object.defineProperty(exports, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary(); + Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils(); + Object.defineProperty(exports, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); } }); -// src/action/index.ts -var import_core2 = __toESM(require_core()); - // src/options.ts var ACCESS_PUBLIC = "public"; var ACCESS_RESTRICTED = "restricted"; @@ -4625,7 +4622,7 @@ var PackageJsonReadError = class extends Error { const message = [ `Could not read package.json at ${manifestPath}`, originalError instanceof Error ? originalError.message : "" - ].join(import_node_os.default.EOL); + ].filter(Boolean).join(import_node_os.default.EOL); super(message); this.name = "PackageJsonReadError"; } @@ -4635,7 +4632,7 @@ var PackageJsonParseError = class extends SyntaxError { const message = [ `Invalid JSON, could not parse package.json at ${manifestPath}`, originalError instanceof Error ? originalError.message : "" - ].join(import_node_os.default.EOL); + ].filter(Boolean).join(import_node_os.default.EOL); super(message); this.name = "PackageJsonParseError"; } @@ -4712,13 +4709,13 @@ async function readManifest(packagePath) { let manifestPath; if (!packagePath) { packageSpec = ""; - manifestPath = "package.json"; + manifestPath = import_node_path.default.resolve(MANIFEST_BASENAME); } else if (isManifest(packagePath)) { - packageSpec = import_node_path.default.dirname(packagePath); - manifestPath = packagePath; + packageSpec = import_node_path.default.resolve(import_node_path.default.dirname(packagePath)); + manifestPath = import_node_path.default.resolve(packagePath); } else if (isDirectory(packagePath)) { - packageSpec = packagePath; - manifestPath = import_node_path.default.join(packagePath, MANIFEST_BASENAME); + packageSpec = import_node_path.default.resolve(packagePath); + manifestPath = import_node_path.default.resolve(packagePath, MANIFEST_BASENAME); } else { throw new InvalidPackageError(packagePath); } @@ -4734,9 +4731,9 @@ async function readManifest(packagePath) { } try { manifestJson = JSON.parse(manifestContents); - name = manifestJson.name; - version2 = manifestJson.version; - publishConfig = manifestJson.publishConfig ?? {}; + name = manifestJson["name"]; + version2 = manifestJson["version"]; + publishConfig = manifestJson["publishConfig"] ?? {}; } catch (error) { throw new PackageJsonParseError(manifestPath, error); } @@ -4825,7 +4822,7 @@ async function useNpmEnvironment(auth, task) { const config = [ "; created by jsdevtools/npm-publish", `//${registry.value.hostname}/:authToken=\${NODE_AUTH_TOKEN}`, - registry.isDefault ? "" : `registry=${registry.value.href}`, + `registry=${registry.value.href}`, "" ].join(import_node_os2.default.EOL); await import_promises2.default.writeFile(npmrc, config, "utf8"); @@ -4842,12 +4839,16 @@ async function useNpmEnvironment(auth, task) { // src/npm/call-npm-cli.ts var import_node_child_process = __toESM(require("node:child_process")); var JSON_MATCH_RE = /(\{[\s\S]*\})/mu; -var execProcess = (command, environment = {}) => { +var execProcess = (command, environment = {}, logger2) => { + logger2 == null ? void 0 : logger2.debug(`Running command: ${command}`); return new Promise((resolve) => { import_node_child_process.default.exec( command, { env: { ...process.env, ...environment } }, (error, stdout, stderr) => { + logger2 == null ? void 0 : logger2.debug(`exit code: ${(error == null ? void 0 : error.code) ?? 0}`); + logger2 == null ? void 0 : logger2.debug(`stdout: ${stdout.trim()}`); + logger2 == null ? void 0 : logger2.debug(`stderr: ${stderr.trim()}`); return resolve({ stdout: stdout.trim(), stderr: stderr.trim(), error }); } ); @@ -4871,7 +4872,8 @@ async function callNpmCli(command, cliArguments, options = {}) { var _a, _b; const { stdout, stderr, error } = await execProcess( ["npm", command, "--ignore-scripts", "--json", ...cliArguments].join(" "), - options.environment + options.environment, + options.logger ); if (error) { const errorPayload = parseJson( @@ -4907,19 +4909,24 @@ function getPublishArguments(packageSpec, config) { } // src/npm/index.ts -async function getVersions(packageName, authConfig) { +async function getVersions(packageName, authConfig, logger2) { return useNpmEnvironment(authConfig, (environment) => { return callNpmCli( "view", [packageName, "dist-tags", "versions"], - { environment, ifError: { e404: { "dist-tags": {}, versions: [] } } } + { + logger: logger2, + environment, + ifError: { e404: { "dist-tags": {}, versions: [] } } + } ); }); } -async function publish(packageSpec, publishConfig, authConfig) { +async function publish(packageSpec, publishConfig, authConfig, logger2) { const publishArguments = getPublishArguments(packageSpec, publishConfig); return useNpmEnvironment(authConfig, (environment) => { return callNpmCli("publish", publishArguments, { + logger: logger2, environment }); }); @@ -4932,23 +4939,46 @@ var DIFFERENT = "different"; function compareVersions(version2, publishedVersions, publishConfig) { const { versions: existingVersions, "dist-tags": tags } = publishedVersions; const { strategy, tag: publishTag } = publishConfig; - const previousVersion = (0, import_semver2.valid)(tags[publishTag.value]) ?? void 0; + const oldVersion = (0, import_semver2.valid)(tags[publishTag.value]) ?? void 0; const isUnique = !existingVersions.includes(version2); - let releaseType; + let type; if (isUnique) { - if (!previousVersion) { - releaseType = INITIAL; - } else if ((0, import_semver2.gt)(version2, previousVersion)) { - releaseType = (0, import_semver2.diff)(version2, previousVersion) ?? void 0; + if (!oldVersion) { + type = INITIAL; + } else if ((0, import_semver2.gt)(version2, oldVersion)) { + type = (0, import_semver2.diff)(version2, oldVersion) ?? DIFFERENT; } else if (strategy.value === STRATEGY_ALL) { - releaseType = DIFFERENT; + type = DIFFERENT; } } - return { releaseType, previousVersion }; + return { type, oldVersion }; +} + +// src/format-publish-result.ts +var import_node_os3 = __toESM(require("node:os")); +function formatPublishResult(manifest, publishConfig, results) { + if (results === void 0) { + return `\u{1F645}\u200D\u2640\uFE0F ${manifest.name}@${manifest.version} publish skipped.`; + } + return [ + `\u{1F4E6} ${results.id}${publishConfig.dryRun.value ? " (DRY RUN)" : ""}`, + "=== Contents ===", + ...results.files.map(({ path: path3, size }) => `${formatSize(size)} ${path3}`) + ].join(import_node_os3.default.EOL); } +var formatSize = (size) => { + if (size < 1e3) { + return `${size} B`; + } + if (size < 1e6) { + return `${(size / 1e3).toFixed(1)} kB`; + } + return `${(size / 1e6).toFixed(1)} mB`; +}; // src/npm-publish.ts async function npmPublish(options) { + var _a; const { packageSpec, manifest } = await readManifest(options.package); const { authConfig, publishConfig } = normalizeOptions(options, manifest); const publishedVersions = await getVersions(manifest.name, authConfig); @@ -4958,15 +4988,18 @@ async function npmPublish(options) { publishConfig ); let publishResult; - if (versionComparison.releaseType !== void 0) { + if (versionComparison.type !== void 0) { publishResult = await publish(packageSpec, publishConfig, authConfig); } + (_a = options.logger) == null ? void 0 : _a.info( + formatPublishResult(manifest, publishConfig, publishResult) + ); return { id: publishResult == null ? void 0 : publishResult.id, name: manifest.name, version: manifest.version, - releaseType: versionComparison.releaseType, - previousVersion: versionComparison.previousVersion, + type: versionComparison.type, + oldVersion: versionComparison.oldVersion, registry: authConfig.registry.value, tag: publishConfig.tag.value, access: publishConfig.access.value, @@ -4977,6 +5010,7 @@ async function npmPublish(options) { // src/action/core.ts var import_core = __toESM(require_core()); +var import_core2 = __toESM(require_core()); function getInput(name) { const inputString = (0, import_core.getInput)(name); return inputString.length > 0 ? inputString : void 0; @@ -4992,6 +5026,11 @@ function getBooleanInput(name) { function setOutput(name, value, defaultValue) { (0, import_core.setOutput)(name, value ?? defaultValue); } +var logger = { + debug: import_core.debug, + info: import_core.info, + error: import_core.error +}; // src/action/run.ts async function run() { @@ -5002,14 +5041,15 @@ async function run() { tag: getInput("tag"), access: getInput("access"), strategy: getInput("strategy"), - dryRun: getBooleanInput("dry-run") + dryRun: getBooleanInput("dry-run"), + logger }; const results = await npmPublish(options); setOutput("id", results.id, ""); setOutput("name", results.name); setOutput("version", results.version); - setOutput("type", results.releaseType, ""); - setOutput("old-version", results.previousVersion, ""); + setOutput("type", results.type, ""); + setOutput("old-version", results.oldVersion, ""); setOutput("registry", results.registry.href); setOutput("tag", results.tag); setOutput("access", results.access, "default"); @@ -5017,6 +5057,6 @@ async function run() { setOutput("dry-run", results.dryRun); } -// src/action/index.ts +// src/action/main.ts run().catch((error) => (0, import_core2.setFailed)(error)); -//# sourceMappingURL=index.js.map +//# sourceMappingURL=main.js.map diff --git a/package.json b/package.json index a5f6d97..7bac668 100644 --- a/package.json +++ b/package.json @@ -31,15 +31,15 @@ "!__tests__" ], "scripts": { - "all": "npm run clean && npm run lint && npm run build && npm run coverage", + "all": "npm run clean && npm run build && npm run lint && npm run coverage", "clean": "rimraf coverage lib dist e2e/fixture *.tgz", "lint": "npm run _eslint && npm run _prettier -- --check", "format": "npm run _eslint -- --fix && npm run _prettier -- --write", "build": "concurrently -g npm:build:*", - "build:dist": "esbuild src/action/index.ts --bundle --sourcemap --outdir=dist --platform=node --target=node16", + "build:dist": "esbuild src/action/main.ts --bundle --sourcemap --outdir=dist --platform=node --target=node16", "build:lib": "tsc", - "test": "vitest src", - "coverage": "vitest run --coverage src", + "test": "vitest", + "coverage": "vitest run --coverage", "_eslint": "eslint \"**/*.@(js|ts)\"", "_prettier": "prettier \"**/*.@(js|ts|json|md|yml)\"" }, diff --git a/src/__tests__/compare-versions.test.ts b/src/__tests__/compare-versions.test.ts index 248e27f..66b8145 100644 --- a/src/__tests__/compare-versions.test.ts +++ b/src/__tests__/compare-versions.test.ts @@ -12,8 +12,8 @@ describe("compareVersions", () => { ); expect(result).toEqual({ - releaseType: "initial", - previousVersion: undefined, + type: "initial", + oldVersion: undefined, }); }); @@ -25,8 +25,8 @@ describe("compareVersions", () => { ); expect(result).toEqual({ - releaseType: "different", - previousVersion: "1.2.3", + type: "different", + oldVersion: "1.2.3", }); }); @@ -41,8 +41,8 @@ describe("compareVersions", () => { ); expect(result).toEqual({ - releaseType: "minor", - previousVersion: "1.2.3", + type: "minor", + oldVersion: "1.2.3", }); }); @@ -54,8 +54,8 @@ describe("compareVersions", () => { ); expect(result).toEqual({ - releaseType: undefined, - previousVersion: "4.5.6", + type: undefined, + oldVersion: "4.5.6", }); }); @@ -70,8 +70,8 @@ describe("compareVersions", () => { ); expect(result).toEqual({ - releaseType: undefined, - previousVersion: "1.2.3", + type: undefined, + oldVersion: "1.2.3", }); }); @@ -86,8 +86,8 @@ describe("compareVersions", () => { ); expect(result).toEqual({ - releaseType: undefined, - previousVersion: "1.2.3", + type: undefined, + oldVersion: "1.2.3", }); }); }); diff --git a/src/__tests__/npm-publish.test.ts b/src/__tests__/npm-publish.test.ts index 58aebeb..86a6cde 100644 --- a/src/__tests__/npm-publish.test.ts +++ b/src/__tests__/npm-publish.test.ts @@ -49,10 +49,13 @@ describe("npmPublish", () => { } as PublishConfig; const versions: PublishedVersions = { "dist-tags": {}, versions: [] }; const comparison: VersionComparison = { - releaseType: "major", - previousVersion: "0.1.2", + type: "major", + oldVersion: "0.1.2", + }; + const publishResult: PublishResult = { + id: "cool-package@1.2.3", + files: [], }; - const publishResult: PublishResult = { id: "cool-package@1.2.3" }; td.when(readManifest("./cool-package")).thenResolve({ packageSpec, @@ -76,11 +79,11 @@ describe("npmPublish", () => { id: "cool-package@1.2.3", name: "cool-package", version: "1.2.3", - previousVersion: "0.1.2", + oldVersion: "0.1.2", tag: "latest", access: "public", registry: new URL("http://example.com"), - releaseType: "major", + type: "major", strategy: "upgrade", dryRun: false, }); @@ -104,8 +107,8 @@ describe("npmPublish", () => { } as PublishConfig; const versions: PublishedVersions = { "dist-tags": {}, versions: [] }; const comparison: VersionComparison = { - releaseType: undefined, - previousVersion: "0.1.2", + type: undefined, + oldVersion: "0.1.2", }; td.when(readManifest("./cool-package")).thenResolve({ @@ -129,11 +132,11 @@ describe("npmPublish", () => { id: undefined, name: "cool-package", version: "1.2.3", - previousVersion: "0.1.2", + oldVersion: "0.1.2", tag: "latest", access: "public", registry: new URL("http://example.com"), - releaseType: undefined, + type: undefined, strategy: "upgrade", dryRun: false, }); diff --git a/src/action/__tests__/run.test.ts b/src/action/__tests__/run.test.ts index 2c0f098..95ef30d 100644 --- a/src/action/__tests__/run.test.ts +++ b/src/action/__tests__/run.test.ts @@ -1,4 +1,4 @@ -import { vi, describe, it, afterEach, expect } from "vitest"; +import { vi, describe, it, afterEach } from "vitest"; import { imitateEsm, reset } from "testdouble-vitest"; import * as td from "testdouble"; @@ -32,13 +32,14 @@ describe("run", () => { access: "restricted", strategy: "all", dryRun: true, + logger: core.logger, }) ).thenResolve({ id: "cool-package@1.2.3", name: "cool-package", version: "1.2.3", - releaseType: "major", - previousVersion: "0.1.2", + type: "major", + oldVersion: "0.1.2", registry: new URL("https://example.com/registry"), tag: "latest", access: "public", diff --git a/src/action/core.ts b/src/action/core.ts index cfa2a1f..8eb895d 100644 --- a/src/action/core.ts +++ b/src/action/core.ts @@ -5,8 +5,15 @@ import { getInput as ghGetInput, setOutput as ghSetOutput, setSecret as ghSetSecret, + debug as ghLogDebug, + info as ghLogInfo, + error as ghLogError, } from "@actions/core"; +import type { Logger } from "../options.js"; + +export { setFailed } from "@actions/core"; + /** * Get input by name. * @@ -69,3 +76,9 @@ export function setOutput( ): void { ghSetOutput(name, value ?? defaultValue); } + +export const logger: Logger = { + debug: ghLogDebug, + info: ghLogInfo, + error: ghLogError, +}; diff --git a/src/action/index.ts b/src/action/main.ts similarity index 65% rename from src/action/index.ts rename to src/action/main.ts index b00abc3..069172a 100644 --- a/src/action/index.ts +++ b/src/action/main.ts @@ -1,4 +1,4 @@ -import { setFailed } from "@actions/core"; import { run } from "./run.js"; +import { setFailed } from "./core.js"; run().catch((error: Error) => setFailed(error)); diff --git a/src/action/run.ts b/src/action/run.ts index d2a2071..de51d92 100644 --- a/src/action/run.ts +++ b/src/action/run.ts @@ -18,6 +18,7 @@ export async function run(): Promise { access: core.getInput("access"), strategy: core.getInput("strategy"), dryRun: core.getBooleanInput("dry-run"), + logger: core.logger, }; const results = await npmPublish(options); @@ -25,8 +26,8 @@ export async function run(): Promise { core.setOutput("id", results.id, ""); core.setOutput("name", results.name); core.setOutput("version", results.version); - core.setOutput("type", results.releaseType, ""); - core.setOutput("old-version", results.previousVersion, ""); + core.setOutput("type", results.type, ""); + core.setOutput("old-version", results.oldVersion, ""); core.setOutput("registry", results.registry.href); core.setOutput("tag", results.tag); core.setOutput("access", results.access, "default"); diff --git a/src/cli/__tests__/cli.test.ts b/src/cli/__tests__/cli.test.ts new file mode 100644 index 0000000..10ed78b --- /dev/null +++ b/src/cli/__tests__/cli.test.ts @@ -0,0 +1,93 @@ +import { vi, describe, beforeEach, afterEach, it } from "vitest"; +import { imitateEsm, reset } from "testdouble-vitest"; +import * as td from "testdouble"; + +import { npmPublish, type Options } from "../../index.js"; +import * as subject from "../index.js"; +import { parseCliArguments } from "../parse-cli-arguments.js"; + +vi.mock("../../index", () => imitateEsm("../../index")); +vi.mock("../parse-cli-arguments", () => imitateEsm("../parse-cli-arguments")); + +describe("cli", () => { + beforeEach(() => { + vi.stubGlobal("console", td.object()); + }); + + afterEach(() => { + reset(); + vi.unstubAllGlobals(); + }); + + it("should parse arguments and pass them to npmPublish", async () => { + td.when(parseCliArguments(["--token", "abc123"])).thenReturn({ + help: false, + version: false, + quiet: false, + debug: false, + options: { token: "abc123" }, + }); + + await subject.main(["--token", "abc123"], "1.2.3"); + + td.verify( + npmPublish({ + token: "abc123", + logger: td.matchers.contains({ + error: console.error, + info: console.info, + debug: td.matchers.not(console.debug), + }), + }), + { times: 1 } + ); + }); + + it("should log the version", async () => { + td.when(parseCliArguments(["--version"])).thenReturn({ + help: false, + version: true, + options: {} as Options, + }); + + await subject.main(["--version"], "1.2.3"); + + td.verify(console.info("1.2.3"), { times: 1 }); + }); + + it("should log usage", async () => { + td.when(parseCliArguments(["--help"])).thenReturn({ + help: true, + version: false, + options: {} as Options, + }); + + await subject.main(["--help"], "1.2.3"); + + td.verify(console.info(td.matchers.contains("Usage:")), { times: 1 }); + }); + + it("should have quiet mode and debug mode", async () => { + td.when(parseCliArguments(["--token", "abc123"])).thenReturn({ + help: false, + version: false, + quiet: true, + debug: true, + options: { token: "abc123" }, + }); + + await subject.main(["--token", "abc123"], "1.2.3"); + + td.verify( + npmPublish({ + token: "abc123", + logger: td.matchers.contains({ + error: console.error, + info: td.matchers.not(console.info), + debug: console.debug, + }), + }), + { times: 1 } + ); + }); +}); diff --git a/src/cli/__tests__/parse-cli-arguments.test.ts b/src/cli/__tests__/parse-cli-arguments.test.ts new file mode 100644 index 0000000..bb453d5 --- /dev/null +++ b/src/cli/__tests__/parse-cli-arguments.test.ts @@ -0,0 +1,90 @@ +import { describe, it, expect } from "vitest"; + +import * as subject from "../parse-cli-arguments.js"; + +describe("parseCliArguments", () => { + it("should parse help and version options", () => { + expect(subject.parseCliArguments(["--help"])).toMatchObject({ help: true }); + expect(subject.parseCliArguments(["-h"])).toMatchObject({ help: true }); + expect(subject.parseCliArguments(["--version"])).toMatchObject({ + version: true, + }); + expect(subject.parseCliArguments(["-v"])).toMatchObject({ version: true }); + }); + + it("should parse token and package arguments", () => { + expect( + subject.parseCliArguments(["--token", "abc123", "--package", "./package"]) + ).toEqual({ + help: false, + version: false, + quiet: false, + debug: false, + options: { + token: "abc123", + package: "./package", + registry: undefined, + tag: undefined, + access: undefined, + strategy: undefined, + dryRun: undefined, + }, + }); + + expect( + subject.parseCliArguments(["--token", "abc123", "./package"]) + ).toEqual({ + help: false, + version: false, + quiet: false, + debug: false, + options: { + token: "abc123", + package: "./package", + registry: undefined, + tag: undefined, + access: undefined, + strategy: undefined, + dryRun: undefined, + }, + }); + }); + + it("should parse other options", () => { + expect( + subject.parseCliArguments( + [ + ["--token", "abc123"], + ["--package", "./package"], + ["--registry", "http://example.com"], + ["--tag", "next"], + ["--access", "restricted"], + ["--strategy", "upgrade"], + ["--dry-run"], + ["--quiet"], + ["--debug"], + ].flat() + ) + ).toEqual({ + help: false, + version: false, + quiet: true, + debug: true, + options: { + token: "abc123", + package: "./package", + registry: "http://example.com", + tag: "next", + access: "restricted", + strategy: "upgrade", + dryRun: true, + }, + }); + }); + + it("should reject unknown options", () => { + expect(() => subject.parseCliArguments(["--foobar"])).toThrow( + /Unknown option/ + ); + }); +}); diff --git a/src/cli/exit-code.ts b/src/cli/exit-code.ts deleted file mode 100644 index b77e14f..0000000 --- a/src/cli/exit-code.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * CLI exit codes. - * - * @see https://nodejs.org/api/process.html#process_exit_codes - * @internal - */ -export enum ExitCode { - Success = 0, - FatalError = 1, - InvalidArgument = 9, -} diff --git a/src/cli/help.ts b/src/cli/help.ts deleted file mode 100644 index 5f63986..0000000 --- a/src/cli/help.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Text explaining how to use the CLI - * - * @internal - */ -export const usageText = ` -Usage: npm-publish [options] [package_path] - -options: - --token The NPM access token to use when publishing - - --registry The NPM registry URL to use - - --debug, -d Enable debug mode, with increased logging - - --quiet, -q Suppress unnecessary output - - --version, -v Print the version number - - --help, -h Show help - -package_path The absolute or relative path of the NPM package to publish. - Can be a directory path, or the path of a package.json file. - Defaults to the current directory. -`; diff --git a/src/cli/index.ts b/src/cli/index.ts index 5b600e5..ba91540 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -1,68 +1,67 @@ -import { join } from "node:path"; +import { npmPublish, type Logger } from "../index.js"; +import { parseCliArguments } from "./parse-cli-arguments.js"; -import { npmPublish } from "../npm-publish.js"; -import { readManifest } from "../read-manifest.js"; -import { ExitCode } from "./exit-code.js"; -import { usageText } from "./help.js"; -import { parseArgs } from "./parse-args.js"; +export const USAGE = `Usage: + + npm-publish [package] + +Arguments: + + package The path to the package to publish. + May be a directory or package.json file. + Defaults to the package in the current directory. + +Options: + + --token (Required) npm authentication token. + + --registry Registry to read from and write to. + Defaults to "https://registry.npmjs.org/". + + --tag The distribution tag to check against and publish to. + Defaults to "latest". + + --access Package access, may be "public" or "restricted". + See documentation for details. + + --strategy Publish strategy, may be "all" or "upgrade". + Defaults to "all", see documentation for details. + + --dry-run Do not actually publish anything. + --quiet Only print errors. + --debug Print debug logs. + -v, --version Print the version number. + -h --help Show usage text. + +Examples: + + $ npm-publish --token abc123 ./my-package +`; /** * The main entry point of the CLI * - * @param args - The command-line arguments + * @param argv - The list of argument strings passed to the program. + * @param version - The version of this program. */ -export async function main(args: string[]): Promise { - try { - // Setup global error handlers - process.on("uncaughtException", errorHandler); - process.on("unhandledRejection", errorHandler); - - // Parse the command-line arguments - let { help, version, options } = parseArgs(args); - - if (help) { - // Show the help text and exit - console.log(usageText); - process.exit(ExitCode.Success); - } else if (version) { - // Show the version number and exit - let manifest = await readManifest(join(__dirname, "../../package.json")); - console.log(manifest.version.toString()); - process.exit(ExitCode.Success); - } else { - let results = await npmPublish(options); - - // if (!options.quiet) { - if (!results.releaseType) { - console.log( - `\n📦 ${results.name} v${results.version} is already published to ${results.registryUrl}` - ); - } else if (results.dryRun) { - console.log( - `\n📦 ${results.name} v${results.version} was NOT actually published to ${results.registryUrl} (dry run)` - ); - } else { - console.log( - `\n📦 Successfully published ${results.name} v${results.version} to ${results.registryUrl}` - ); - } - // } - } - } catch (error) { - errorHandler(error as Error); - } -} +export async function main(argv: string[], version: string): Promise { + const cliArguments = parseCliArguments(argv); -/** - * Prints errors to the console - */ -function errorHandler(error: Error): void { - let message = error.message || String(error); + if (cliArguments.help) { + console.info(USAGE); + return; + } - if (process.env.DEBUG || process.env.NODE_ENV === "development") { - message = error.stack || message; + if (cliArguments.version) { + console.info(version); + return; } - console.error(message); - process.exit(ExitCode.FatalError); + const logger: Logger = { + error: console.error, + info: cliArguments.quiet === false ? console.info : (m) => void m, + debug: cliArguments.debug === true ? console.debug : (m) => void m, + }; + + await npmPublish({ ...cliArguments.options, logger }); } diff --git a/src/cli/parse-args.ts b/src/cli/parse-args.ts deleted file mode 100644 index 70f4164..0000000 --- a/src/cli/parse-args.ts +++ /dev/null @@ -1,76 +0,0 @@ -import commandLineArgs from "command-line-args"; -import { Access, Options } from "../options.js"; -import { ExitCode } from "./exit-code.js"; -import { usageText } from "./help.js"; - -/** - * The parsed command-line arguments - * - * @internal - */ -export interface ParsedArgs { - help?: boolean; - version?: boolean; - options: Options; -} - -/** - * Parses the command-line arguments - * - * @internal - */ -export function parseArgs(argv: string[]): ParsedArgs { - try { - let args = commandLineArgs( - [ - { name: "token", type: String }, - { - name: "registry", - type: String, - defaultValue: "https://registry.npmjs.org/", - }, - { name: "package", type: String, defaultOption: true }, - { name: "tag", type: String }, - { name: "access", type: String }, - { name: "dry-run", type: Boolean }, - { name: "debug", alias: "d", type: Boolean }, - { name: "quiet", alias: "q", type: Boolean }, - { name: "version", alias: "v", type: Boolean }, - { name: "help", alias: "h", type: Boolean }, - ], - { argv } - ); - - if (args.token === null) { - throw new SyntaxError("The --token argument requires a value"); - } - - if (args.registry === null) { - throw new SyntaxError("The --registry argument requires a value"); - } - - let parsedArgs: ParsedArgs = { - help: args.help as boolean, - version: args.version as boolean, - options: { - token: args.token as string, - registryUrl: args.registry as string, - package: args.package as string, - tag: args.tag as string, - access: args.access as Access, - dryRun: args["dry-run"] as boolean, - }, - }; - - return parsedArgs; - } catch (error) { - // There was an error parsing the command-line args - return errorHandler(error as Error); - } -} - -function errorHandler(error: Error): never { - console.error(error.message); - console.error(usageText); - return process.exit(ExitCode.InvalidArgument); -} diff --git a/src/cli/parse-cli-arguments.ts b/src/cli/parse-cli-arguments.ts new file mode 100644 index 0000000..1d915d9 --- /dev/null +++ b/src/cli/parse-cli-arguments.ts @@ -0,0 +1,56 @@ +/** + * Wrapper module for command-line-args + */ + +import commandLineArgs from "command-line-args"; +import type { Options } from "../options.js"; + +const ARGUMENTS_OPTIONS = [ + { name: "token", type: String }, + { name: "registry", type: String }, + { name: "package", type: String, defaultOption: true }, + { name: "tag", type: String }, + { name: "access", type: String }, + { name: "strategy", type: String }, + { name: "dry-run", type: Boolean }, + { name: "quiet", type: Boolean }, + { name: "debug", type: Boolean }, + { name: "version", alias: "v", type: Boolean }, + { name: "help", alias: "h", type: Boolean }, +]; + +/** + * The parsed command-line arguments + */ +export interface ParsedArguments { + help?: boolean; + version?: boolean; + quiet?: boolean; + debug?: boolean; + options: Options; +} + +/** + * Parse the given command-line arguments. + * + * @param argv The list of argument strings passed to the program. + * @returns A parsed object of options. + */ +export function parseCliArguments(argv: string[]): ParsedArguments { + const { help, version, quiet, debug, ...rawOptions } = commandLineArgs( + ARGUMENTS_OPTIONS, + { argv, camelCase: true } + ); + + const options = Object.fromEntries( + Object.entries(rawOptions).map(([key, value]) => [key, value ?? undefined]) + ) as Options; + + return { + help: Boolean(help), + version: Boolean(version), + quiet: Boolean(quiet), + debug: Boolean(debug), + options, + }; +} diff --git a/src/compare-versions.ts b/src/compare-versions.ts index 13c4cfb..b19973f 100644 --- a/src/compare-versions.ts +++ b/src/compare-versions.ts @@ -12,8 +12,8 @@ import type { PublishedVersions } from "./npm/index.js"; export type ReleaseType = SemverReleaseType | typeof INITIAL | typeof DIFFERENT; export interface VersionComparison { - releaseType: ReleaseType | undefined; - previousVersion: string | undefined; + type: ReleaseType | undefined; + oldVersion: string | undefined; } const INITIAL = "initial"; @@ -34,19 +34,19 @@ export function compareVersions( ): VersionComparison { const { versions: existingVersions, "dist-tags": tags } = publishedVersions; const { strategy, tag: publishTag } = publishConfig; - const previousVersion = semverValid(tags[publishTag.value]) ?? undefined; + const oldVersion = semverValid(tags[publishTag.value]) ?? undefined; const isUnique = !existingVersions.includes(version); - let releaseType: ReleaseType | undefined; + let type: ReleaseType | undefined; if (isUnique) { - if (!previousVersion) { - releaseType = INITIAL; - } else if (semverGreaterThan(version, previousVersion)) { - releaseType = semverDifference(version, previousVersion) ?? undefined; + if (!oldVersion) { + type = INITIAL; + } else if (semverGreaterThan(version, oldVersion)) { + type = semverDifference(version, oldVersion) ?? DIFFERENT; } else if (strategy.value === STRATEGY_ALL) { - releaseType = DIFFERENT; + type = DIFFERENT; } } - return { releaseType, previousVersion }; + return { type, oldVersion }; } diff --git a/src/errors.ts b/src/errors.ts index 5540d2d..17805d9 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -7,21 +7,6 @@ import { STRATEGY_UPGRADE, } from "./options.js"; -export class NpmPublishError extends Error { - public originalError: Error | undefined; - - public constructor(message: string, originalError?: Error) { - if (originalError) { - super(`${message}\n${originalError.message}`); - } else { - super(message); - } - - this.name = "NpmPublishError"; - this.originalError = originalError; - } -} - export class InvalidPackageError extends TypeError { public constructor(value: unknown) { super( @@ -36,7 +21,9 @@ export class PackageJsonReadError extends Error { const message = [ `Could not read package.json at ${manifestPath}`, originalError instanceof Error ? originalError.message : "", - ].join(os.EOL); + ] + .filter(Boolean) + .join(os.EOL); super(message); this.name = "PackageJsonReadError"; @@ -48,7 +35,9 @@ export class PackageJsonParseError extends SyntaxError { const message = [ `Invalid JSON, could not parse package.json at ${manifestPath}`, originalError instanceof Error ? originalError.message : "", - ].join(os.EOL); + ] + .filter(Boolean) + .join(os.EOL); super(message); this.name = "PackageJsonParseError"; diff --git a/src/format-publish-result.ts b/src/format-publish-result.ts new file mode 100644 index 0000000..ea05e7d --- /dev/null +++ b/src/format-publish-result.ts @@ -0,0 +1,40 @@ +import os from "node:os"; + +import type { PublishResult } from "./npm/index.js"; +import type { PackageManifest } from "./read-manifest.js"; +import type { PublishConfig } from "./normalize-options.js"; + +/** + * Format publish results into a string. + * + * @param manifest Package manifest + * @param publishConfig Publish configuration. + * @param results Results from running npm publish. + * @returns Formatted string. + */ +export function formatPublishResult( + manifest: PackageManifest, + publishConfig: PublishConfig, + results?: PublishResult +): string { + if (results === undefined) { + return `🙅‍♀️ ${manifest.name}@${manifest.version} publish skipped.`; + } + + return [ + `📦 ${results.id}${publishConfig.dryRun.value ? " (DRY RUN)" : ""}`, + "=== Contents ===", + ...results.files.map(({ path, size }) => `${formatSize(size)}\t${path}`), + ].join(os.EOL); +} + +const formatSize = (size: number): string => { + if (size < 1000) { + return `${size} B`; + } + if (size < 1_000_000) { + return `${(size / 1000).toFixed(1)} kB`; + } + + return `${(size / 1_000_000).toFixed(1)} mB`; +}; diff --git a/src/npm-publish.ts b/src/npm-publish.ts index 8eb1441..e252421 100644 --- a/src/npm-publish.ts +++ b/src/npm-publish.ts @@ -2,6 +2,7 @@ import { readManifest } from "./read-manifest.js"; import { normalizeOptions } from "./normalize-options.js"; import { getVersions, publish } from "./npm/index.js"; import { compareVersions } from "./compare-versions.js"; +import { formatPublishResult } from "./format-publish-result.js"; import type { Options } from "./options.js"; import type { Results } from "./results.js"; @@ -23,16 +24,20 @@ export async function npmPublish(options: Options): Promise { let publishResult; - if (versionComparison.releaseType !== undefined) { + if (versionComparison.type !== undefined) { publishResult = await publish(packageSpec, publishConfig, authConfig); } + options.logger?.info( + formatPublishResult(manifest, publishConfig, publishResult) + ); + return { id: publishResult?.id, name: manifest.name, version: manifest.version, - releaseType: versionComparison.releaseType, - previousVersion: versionComparison.previousVersion, + type: versionComparison.type, + oldVersion: versionComparison.oldVersion, registry: authConfig.registry.value, tag: publishConfig.tag.value, access: publishConfig.access.value, diff --git a/src/npm/__tests__/npm.test.ts b/src/npm/__tests__/npm.test.ts index 25e1249..e6d4c3c 100644 --- a/src/npm/__tests__/npm.test.ts +++ b/src/npm/__tests__/npm.test.ts @@ -2,6 +2,7 @@ import { vi, describe, it, beforeEach, afterEach, expect } from "vitest"; import { imitateEsm, reset } from "testdouble-vitest"; import * as td from "testdouble"; +import type { Logger } from "../../options.js"; import type { AuthConfig, PublishConfig } from "../../normalize-options.js"; import * as subject from "../index.js"; @@ -18,6 +19,7 @@ vi.mock("../get-publish-arguments", () => describe("npm", () => { const authConfig = { token: { value: "abc123" } } as AuthConfig; const environment = { foo: "bar" }; + const logger = { debug: (message: string) => void message } as Logger; beforeEach(() => { td.when(useNpmEnvironment(authConfig, td.matchers.isA(Function))).thenDo( @@ -34,7 +36,11 @@ describe("npm", () => { callNpmCli( "view", ["@example/cool-package", "dist-tags", "versions"], - { environment, ifError: { e404: { "dist-tags": {}, versions: [] } } } + { + logger, + environment, + ifError: { e404: { "dist-tags": {}, versions: [] } }, + } ) ).thenResolve({ "dist-tags": { latest: "1.2.3" }, @@ -43,7 +49,8 @@ describe("npm", () => { const result = await subject.getVersions( "@example/cool-package", - authConfig + authConfig, + logger ); expect(result).toEqual({ @@ -62,13 +69,15 @@ describe("npm", () => { td.when( callNpmCli("publish", ["--tag", "next"], { environment, + logger, }) ).thenResolve({ id: "@example/cool-package@1.2.3" }); const result = await subject.publish( "./package", publishConfig, - authConfig + authConfig, + logger ); expect(result).toEqual({ id: "@example/cool-package@1.2.3" }); diff --git a/src/npm/call-npm-cli.ts b/src/npm/call-npm-cli.ts index 07ba9c2..2070d5d 100644 --- a/src/npm/call-npm-cli.ts +++ b/src/npm/call-npm-cli.ts @@ -1,23 +1,31 @@ import childProcess from "node:child_process"; +import type { Logger } from "../options.js"; import type { NpmCliEnvironment } from "./use-npm-environment.js"; export interface NpmCliOptions { environment?: NpmCliEnvironment; ifError?: Record; + logger?: Logger | undefined; } const JSON_MATCH_RE = /(\{[\s\S]*\})/mu; const execProcess = ( command: string, - environment: Record = {} + environment: Record = {}, + logger?: Logger ): Promise<{ stdout: string; stderr: string; error: Error | null }> => { + logger?.debug(`Running command: ${command}`); + return new Promise((resolve) => { childProcess.exec( command, { env: { ...process.env, ...environment } }, (error, stdout, stderr) => { + logger?.debug(`exit code: ${error?.code ?? 0}`); + logger?.debug(`stdout: ${stdout.trim()}`); + logger?.debug(`stderr: ${stderr.trim()}`); return resolve({ stdout: stdout.trim(), stderr: stderr.trim(), error }); } ); @@ -55,7 +63,8 @@ export async function callNpmCli( ): Promise { const { stdout, stderr, error } = await execProcess( ["npm", command, "--ignore-scripts", "--json", ...cliArguments].join(" "), - options.environment + options.environment, + options.logger ); if (error) { diff --git a/src/npm/index.ts b/src/npm/index.ts index 0d7d476..b0060ac 100644 --- a/src/npm/index.ts +++ b/src/npm/index.ts @@ -1,3 +1,4 @@ +import type { Logger } from "../options.js"; import type { AuthConfig, PublishConfig } from "../normalize-options.js"; import { useNpmEnvironment } from "./use-npm-environment.js"; import { callNpmCli } from "./call-npm-cli.js"; @@ -8,8 +9,14 @@ export interface PublishedVersions { versions: string[]; } +export interface PublishFile { + path: string; + size: number; +} + export interface PublishResult { id: string; + files: PublishFile[]; } /** @@ -17,17 +24,23 @@ export interface PublishResult { * * @param packageName The name of the package to get published versions for. * @param authConfig Registry and auth token. + * @param logger Optional logger. * @returns All published versions and tags. */ export async function getVersions( packageName: string, - authConfig: AuthConfig + authConfig: AuthConfig, + logger?: Logger ): Promise { return useNpmEnvironment(authConfig, (environment) => { return callNpmCli( "view", [packageName, "dist-tags", "versions"], - { environment, ifError: { e404: { "dist-tags": {}, versions: [] } } } + { + logger, + environment, + ifError: { e404: { "dist-tags": {}, versions: [] } }, + } ); }); } @@ -38,17 +51,20 @@ export async function getVersions( * @param packageSpec Package specification to pass to npm. * @param publishConfig Publish configuration. * @param authConfig Registry and auth token. + * @param logger Optional logger. * @returns Release metadata. */ export async function publish( packageSpec: string, publishConfig: PublishConfig, - authConfig: AuthConfig + authConfig: AuthConfig, + logger?: Logger ): Promise { const publishArguments = getPublishArguments(packageSpec, publishConfig); return useNpmEnvironment(authConfig, (environment) => { return callNpmCli("publish", publishArguments, { + logger, environment, }); }); diff --git a/src/npm/use-npm-environment.ts b/src/npm/use-npm-environment.ts index 1771f85..d968a5f 100644 --- a/src/npm/use-npm-environment.ts +++ b/src/npm/use-npm-environment.ts @@ -32,7 +32,7 @@ export async function useNpmEnvironment( const config = [ "; created by jsdevtools/npm-publish", `//${registry.value.hostname}/:authToken=\${NODE_AUTH_TOKEN}`, - registry.isDefault ? "" : `registry=${registry.value.href}`, + `registry=${registry.value.href}`, "", ].join(os.EOL); diff --git a/src/options.ts b/src/options.ts index 6362c91..5f3454c 100644 --- a/src/options.ts +++ b/src/options.ts @@ -2,7 +2,6 @@ * The possible access levels for an NPM package */ export type Access = typeof ACCESS_PUBLIC | typeof ACCESS_RESTRICTED; - export const ACCESS_PUBLIC = "public"; export const ACCESS_RESTRICTED = "restricted"; @@ -15,24 +14,17 @@ export const ACCESS_RESTRICTED = "restricted"; * is not yet published, even if its lower that the existing tag. */ export type Strategy = typeof STRATEGY_UPGRADE | typeof STRATEGY_ALL; - export const STRATEGY_UPGRADE = "upgrade"; export const STRATEGY_ALL = "all"; /** - * A function that logs messages - */ -export type HandleLog = (message: string, data?: object) => void; - -/** - * A level at which a log can occur. - */ -export type LogLevel = "error" | "warn" | "info" | "debug"; - -/** - * An object that can be used to log messages. + * An interface that can be used to log messages. */ -export type Logger = Record; +export interface Logger { + error: (message: string | Error) => void; + info: (message: string) => void; + debug: (message: string) => void; +} /** * Options that determine how/whether the package is published. @@ -99,4 +91,9 @@ export interface Options { * Defaults to `false`. */ dryRun?: boolean | undefined; + + /** + * Optional logger. + */ + logger?: Logger | undefined; } diff --git a/src/read-manifest.ts b/src/read-manifest.ts index d43d826..a080c04 100644 --- a/src/read-manifest.ts +++ b/src/read-manifest.ts @@ -61,13 +61,13 @@ export async function readManifest( if (!packagePath) { packageSpec = ""; - manifestPath = "package.json"; + manifestPath = path.resolve(MANIFEST_BASENAME); } else if (isManifest(packagePath)) { - packageSpec = path.dirname(packagePath); - manifestPath = packagePath; + packageSpec = path.resolve(path.dirname(packagePath)); + manifestPath = path.resolve(packagePath); } else if (isDirectory(packagePath)) { - packageSpec = packagePath; - manifestPath = path.join(packagePath, MANIFEST_BASENAME); + packageSpec = path.resolve(packagePath); + manifestPath = path.resolve(packagePath, MANIFEST_BASENAME); } else { throw new errors.InvalidPackageError(packagePath); } @@ -86,9 +86,9 @@ export async function readManifest( try { manifestJson = JSON.parse(manifestContents) as Record; - name = manifestJson.name; - version = manifestJson.version; - publishConfig = manifestJson.publishConfig ?? {}; + name = manifestJson["name"]; + version = manifestJson["version"]; + publishConfig = manifestJson["publishConfig"] ?? {}; } catch (error) { throw new errors.PackageJsonParseError(manifestPath, error); } diff --git a/test/fixtures/bin/npm b/test/fixtures/bin/npm deleted file mode 100755 index d8fc5c7..0000000 --- a/test/fixtures/bin/npm +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env node -"use strict"; - -/** - * - * This is a mock of the `npm` CLI, for testing purposes. - * It just records the CLI arguments in a JSON file. - * - */ - -const npm = require("../../utils/npm"); - -try { - // Get the args that NPM was called with - let argv = process.argv.slice(2); - - // Get the stub behavior that we should implement - let stub = npm.stub(); - - if (!stub) { - throw new Error( - "NPM was called when not expected:\n" + - "EXPECTED: \n" + - `ACTUAL: npm ${argv.join(" ")}\n` - ); - } - - // Ensure that we're running in the correct directory - if (process.cwd() !== stub.cwd) { - throw new Error( - "NPM was called with the wrong working directory:\n" + - `EXPECTED: ${stub.cwd}\n` + - `ACTUAL: ${process.cwd()}\n` - ); - } - - // Ensure that the input args match - for (let i = 0; i < Math.max(argv.length, stub.args.length); i++) { - if (argv[i] !== stub.args[i]) { - throw new Error( - "NPM was called with incorrect arguments:\n" + - `EXPECTED: npm ${stub.args.join(" ")}\n` + - `ACTUAL: npm ${argv.join(" ")}\n` - ); - } - } - - // Ensure that the environment variables match - for (let key of Object.keys(stub.env)) { - if (process.env[key] !== stub.env[key]) { - throw new Error( - "NPM was called with incorrect environment variables:\n" + - `EXPECTED: ${key} = ${stub.env[key]}\n` + - `ACTUAL: ${key} = ${process.env[key]}\n` - ); - } - } - - // Print the stub output - if (stub.stdout) { - process.stdout.write(stub.stdout); - } - - if (stub.stderr) { - process.stderr.write(stub.stderr); - } - - // Return the stub exit code - process.exit(stub.exitCode); -} -catch (error) { - console.error(error.message); - process.exit(1); -} diff --git a/test/fixtures/bin/npm.cmd b/test/fixtures/bin/npm.cmd deleted file mode 100644 index b1fb320..0000000 --- a/test/fixtures/bin/npm.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\npm" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\npm" %* -) diff --git a/test/fixtures/chai.js b/test/fixtures/chai.js deleted file mode 100644 index 3577700..0000000 --- a/test/fixtures/chai.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -const chai = require("chai"); - -chai.config.truncateThreshold = 0; diff --git a/test/fixtures/mocha-hooks.js b/test/fixtures/mocha-hooks.js deleted file mode 100644 index 3960284..0000000 --- a/test/fixtures/mocha-hooks.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; - -const { promises: fs } = require("fs"); -const paths = require("../utils/paths"); - -process.env.NODE_ENV = "test"; - -/** - * Re-create the .tmp directories before each test - */ -beforeEach("create fixture directories", async () => { - // Create the home and workspace directories - await fs.mkdir(paths.home, { recursive: true }); - await fs.mkdir(paths.workspace, { recursive: true }); -}); - -afterEach("clean the .tmp directory", async () => { - // Delete the .tmp directory, if it exists - await fs.rm(paths.tmp, { recursive: true, force: true }); -}); diff --git a/test/fixtures/mock-npm.js b/test/fixtures/mock-npm.js deleted file mode 100644 index 29369bf..0000000 --- a/test/fixtures/mock-npm.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; - -const fs = require("fs"); -const path = require("path"); -const paths = require("../utils/paths"); - -// Ensure that the mock NPM binary is executable -fs.chmodSync(paths.npm, "0777"); - -// Inject our bin directory path into the PATH variable, -// so that npm-publish runs our mock `npm` binaries instead of the real one. -let otherPaths = getEnvPath(); -process.env.PATH = paths.bin + path.delimiter + otherPaths; // eslint-disable-line no-path-concat - -/** - * Returns the PATH environment variable, case-insensitively - */ -function getEnvPath() { - let keys = Object.keys(process.env); - - for (let key of keys) { - if (key.toUpperCase() === "PATH") { - return process.env[key]; - } - } -} diff --git a/test/specs/action/failure.spec.js b/test/specs/action/failure.spec.js deleted file mode 100644 index dff5c2b..0000000 --- a/test/specs/action/failure.spec.js +++ /dev/null @@ -1,294 +0,0 @@ -"use strict"; - -const npm = require("../../utils/npm"); -const files = require("../../utils/files"); -const paths = require("../../utils/paths"); -const exec = require("../../utils/exec"); -const { expect } = require("chai"); -const { EOL } = require("os"); - -describe("GitHub Action - failure tests", () => { - it("should fail if the NPM token isn't set", () => { - files.create([{ path: "workspace/not-package.json", contents: {} }]); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include( - "::error::Error: Input required and not supplied: token" - ); - expect(cli).to.have.exitCode(1); - - files.assert.doesNotExist("home/.npmrc"); - files.assert.doesNotExist("workspace/package.json"); - npm.assert.didNotRun(); - }); - - it("should fail if the NPM registry URL is invalid", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "1.2.3" }, - }, - ]); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - INPUT_REGISTRY: "example.com", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include( - "::error::TypeError [ERR_INVALID_URL]: Invalid URL" - ); - expect(cli).to.have.exitCode(1); - - files.assert.doesNotExist("home/.npmrc"); - npm.assert.ran(0); - }); - - it("should fail if the package.json file does not exist", () => { - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include( - "::error::Error: Unable to read package.json %0AENOENT: no such file or directory" - ); - expect(cli).to.have.exitCode(1); - - files.assert.doesNotExist("home/.npmrc"); - files.assert.doesNotExist("workspace/package.json"); - npm.assert.didNotRun(); - }); - - it("should fail if the package.json file is invalid", () => { - files.create([ - { path: "workspace/package.json", contents: "hello, world" }, - ]); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include( - "::error::Error: Unable to parse package.json" - ); - expect(cli).stdout.to.include("Unexpected token h in JSON at position 0"); - expect(cli).to.have.exitCode(1); - - files.assert.doesNotExist("home/.npmrc"); - npm.assert.didNotRun(); - }); - - it("should fail if the package name is invalid", () => { - files.create([ - { path: "workspace/package.json", contents: { name: "\n \t" } }, - ]); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include( - "::error::Error: Unable to parse package.json" - ); - expect(cli).stdout.to.include("Invalid package name"); - expect(cli).to.have.exitCode(1); - - files.assert.doesNotExist("home/.npmrc"); - npm.assert.didNotRun(); - }); - - it("should fail if the package version is invalid", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "hello, world" }, - }, - ]); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include( - "::error::Error: Unable to parse package.json" - ); - expect(cli).stdout.to.include("Invalid Version: hello, world"); - expect(cli).to.have.exitCode(1); - - files.assert.doesNotExist("home/.npmrc"); - npm.assert.didNotRun(); - }); - - it('should fail if the "npm view" command errors', () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "2.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stderr: "BOOM!", - exitCode: 1, - }); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include( - "::error::Error: Unable to determine the current version of my-lib on NPM." - ); - expect(cli).stdout.to.include( - "npm view my-lib version exited with a status of 1" - ); - expect(cli).stdout.to.include("BOOM!"); - expect(cli).to.have.exitCode(1); - - npm.assert.ran(2); - }); - - it("should fail if the .npmrc file is invalid", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "2.0.0" }, - }, - { - path: "home/.npmrc/file.txt", - contents: "~/.npmrc is a directory, not a file", - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include( - "::error::Error: Unable to read the NPM config file: " - ); - expect(cli).stdout.to.include( - "Error: EISDIR: illegal operation on a directory, read" - ); - expect(cli).to.have.exitCode(1); - - npm.assert.ran(1); - }); - - it('should fail if the "npm config" command errors', () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "2.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stderr: "BOOM!", - exitCode: 1, - }); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include( - "::error::Error: Unable to determine the NPM config file path." - ); - expect(cli).stdout.to.include( - "npm config get userconfig exited with a status of 1" - ); - expect(cli).stdout.to.include("BOOM!"); - expect(cli).to.have.exitCode(1); - - npm.assert.ran(1); - }); - - it('should fail if the "npm publish" command errors', () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "2.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - stderr: "BOOM!", - exitCode: 1, - }); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - }, - }); - - expect(cli).to.have.stderr("BOOM!"); - expect(cli).stdout.to.include( - "::error::Error: Unable to publish my-lib v2.0.0 to https://registry.npmjs.org/." - ); - expect(cli).stdout.to.include("npm publish exited with a status of 1"); - expect(cli).stdout.not.to.include("BOOM!"); - expect(cli).to.have.exitCode(1); - - npm.assert.ran(4); - }); -}); diff --git a/test/specs/action/success.spec.js b/test/specs/action/success.spec.js deleted file mode 100644 index 0422e26..0000000 --- a/test/specs/action/success.spec.js +++ /dev/null @@ -1,769 +0,0 @@ -"use strict"; - -const npm = require("../../utils/npm"); -const files = require("../../utils/files"); -const paths = require("../../utils/paths"); -const exec = require("../../utils/exec"); -const { expect } = require("chai"); -const { EOL } = require("os"); -const { join } = require("path"); - -describe("GitHub Action - success tests", () => { - it("should publish a new version to NPM", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "2.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - env: { INPUT_TOKEN: "my-secret-token" }, - stdout: `my-lib 2.0.0${EOL}`, - }); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("my-lib 2.0.0"); - expect(cli).stdout.to.include( - "Successfully published my-lib v2.0.0 to https://registry.npmjs.org/" - ); - expect(cli).stdout.to.include("TEST::set-output name=type::major"); - expect(cli).stdout.to.include("TEST::set-output name=version::2.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=old-version::1.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=tag::latest"); - expect(cli).stdout.to.include("TEST::set-output name=access::public"); - expect(cli).stdout.to.include("TEST::set-output name=dry-run::false"); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should publish a new version to NPM if the version is lower", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "0.1.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - env: { INPUT_TOKEN: "my-secret-token" }, - stdout: `my-lib 0.1.0${EOL}`, - }); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("my-lib 0.1.0"); - expect(cli).stdout.to.include( - "Successfully published my-lib v0.1.0 to https://registry.npmjs.org/" - ); - expect(cli).stdout.to.include("TEST::set-output name=type::major"); - expect(cli).stdout.to.include("TEST::set-output name=version::0.1.0"); - expect(cli).stdout.to.include("TEST::set-output name=old-version::1.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=tag::latest"); - expect(cli).stdout.to.include("TEST::set-output name=access::public"); - expect(cli).stdout.to.include("TEST::set-output name=dry-run::false"); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should not publish a new version to NPM if the version is lower and greaterVersion flag is set", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "0.1.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - env: { INPUT_TOKEN: "my-secret-token" }, - stdout: `my-lib 0.1.0${EOL}`, - }); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - "INPUT_GREATER-VERSION-ONLY": "true", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include( - "my-lib v0.1.0 is lower than the version published to https://registry.npmjs.org/" - ); - expect(cli).stdout.to.include("TEST::set-output name=type::lower"); - expect(cli).stdout.to.include("TEST::set-output name=version::0.1.0"); - expect(cli).stdout.to.include("TEST::set-output name=old-version::1.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=tag::latest"); - expect(cli).stdout.to.include("TEST::set-output name=access::public"); - expect(cli).stdout.to.include("TEST::set-output name=dry-run::false"); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should publish a new version to NPM if no package exists", async () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "1.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `${EOL}`, - stderr: `npm ERR! code E404${EOL}`, - exitCode: 1, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - stdout: `my-lib 1.0.0${EOL}`, - }); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("my-lib 1.0.0"); - expect(cli).stdout.to.include( - "Successfully published my-lib v1.0.0 to https://registry.npmjs.org/" - ); - expect(cli).stdout.to.include("TEST::set-output name=type::major"); - expect(cli).stdout.to.include("TEST::set-output name=version::1.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=old-version::0.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=tag::latest"); - expect(cli).stdout.to.include("TEST::set-output name=access::public"); - expect(cli).stdout.to.include("TEST::set-output name=dry-run::false"); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should publish a new version to NPM if the tag does not exist", async () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "1.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib@my-tag", "version"], - stdout: `${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish", "--tag", "my-tag"], - stdout: `my-lib 1.0.0${EOL}`, - }); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - INPUT_TAG: "my-tag", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("my-lib 1.0.0"); - expect(cli).stdout.to.include( - "Successfully published my-lib v1.0.0 to https://registry.npmjs.org/" - ); - expect(cli).stdout.to.include("TEST::set-output name=type::major"); - expect(cli).stdout.to.include("TEST::set-output name=version::1.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=old-version::0.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=tag::my-tag"); - expect(cli).stdout.to.include("TEST::set-output name=access::public"); - expect(cli).stdout.to.include("TEST::set-output name=dry-run::false"); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should not publish a new version to NPM if the version number hasn't changed", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "1.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include( - "📦 my-lib v1.0.0 is already published to https://registry.npmjs.org/" - ); - expect(cli).stdout.to.include("TEST::set-output name=type::none"); - expect(cli).stdout.to.include("TEST::set-output name=version::1.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=old-version::1.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=tag::latest"); - expect(cli).stdout.to.include("TEST::set-output name=access::public"); - expect(cli).stdout.to.include("TEST::set-output name=dry-run::false"); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(2); - }); - - it("should append to an existing .npmrc file", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "1.1.0" }, - }, - { - path: "home/.npmrc", - contents: - "This is my NPM config.\nThere are many like it,\nbut this one is mine.", - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - env: { INPUT_TOKEN: "my-secret-token" }, - stdout: `my-lib 1.1.0${EOL}`, - }); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("my-lib 1.1.0"); - expect(cli).stdout.to.include( - "📦 Successfully published my-lib v1.1.0 to https://registry.npmjs.org/" - ); - expect(cli).stdout.to.include("TEST::set-output name=type::minor"); - expect(cli).stdout.to.include("TEST::set-output name=version::1.1.0"); - expect(cli).stdout.to.include("TEST::set-output name=old-version::1.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=tag::latest"); - expect(cli).stdout.to.include("TEST::set-output name=access::public"); - expect(cli).stdout.to.include("TEST::set-output name=dry-run::false"); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `This is my NPM config.${EOL}` + - `There are many like it,${EOL}` + - `but this one is mine.${EOL}` + - `${EOL}` + - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should update an existing .npmrc file's settings", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "1.0.1" }, - }, - { - path: "home/.npmrc", - contents: - "# Use the GitHub package registry\n" + - "registry=https://registry.github.com/\n" + - "https://registry.github.com/:_authToken=my-github-token\n" + - "\n" + - "# Use the NPM registry with no auth\n" + - "registry=https://registry.npmjs.org/\n" + - "\n" + - "# Use some other package registry\n" + - "registry=https://registry.example.com/\n", - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - env: { INPUT_TOKEN: "my-secret-token" }, - stdout: `my-lib 1.0.1${EOL}`, - }); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("my-lib 1.0.1"); - expect(cli).stdout.to.include( - "📦 Successfully published my-lib v1.0.1 to https://registry.npmjs.org/" - ); - expect(cli).stdout.to.include("TEST::set-output name=type::patch"); - expect(cli).stdout.to.include("TEST::set-output name=version::1.0.1"); - expect(cli).stdout.to.include("TEST::set-output name=old-version::1.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=tag::latest"); - expect(cli).stdout.to.include("TEST::set-output name=access::public"); - expect(cli).stdout.to.include("TEST::set-output name=dry-run::false"); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `# Use the GitHub package registry${EOL}` + - `${EOL}` + - `# Use the NPM registry with no auth${EOL}` + - `${EOL}` + - `# Use some other package registry${EOL}` + - `${EOL}` + - `${EOL}` + - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should publish a package that's not in the root of the workspace directory", () => { - files.create([ - { - path: "workspace/subdir/my-lib/package.json", - contents: { name: "my-lib", version: "1.0.1-beta" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - cwd: join(paths.workspace, "subdir/my-lib"), - env: { INPUT_TOKEN: "my-secret-token" }, - stdout: `my-lib 1.0.1-beta${EOL}`, - }); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - INPUT_PACKAGE: "subdir/my-lib/package.json", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("my-lib 1.0.1-beta"); - expect(cli).stdout.to.include( - "📦 Successfully published my-lib v1.0.1-beta to https://registry.npmjs.org/" - ); - expect(cli).stdout.to.include("TEST::set-output name=type::prepatch"); - expect(cli).stdout.to.include("TEST::set-output name=version::1.0.1-beta"); - expect(cli).stdout.to.include("TEST::set-output name=old-version::1.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=tag::latest"); - expect(cli).stdout.to.include("TEST::set-output name=access::public"); - expect(cli).stdout.to.include("TEST::set-output name=dry-run::false"); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should publish a scoped package", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "@my-scope/my-lib", version: "2.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "@my-scope/my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - env: { INPUT_TOKEN: "my-secret-token" }, - stdout: `@my-scope/my-lib 2.0.0${EOL}`, - }); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("@my-scope/my-lib 2.0.0"); - expect(cli).stdout.to.include( - "Successfully published @my-scope/my-lib v2.0.0 to https://registry.npmjs.org/" - ); - expect(cli).stdout.to.include("TEST::set-output name=type::major"); - expect(cli).stdout.to.include("TEST::set-output name=version::2.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=old-version::1.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=tag::latest"); - expect(cli).stdout.to.include("TEST::set-output name=access::restricted"); - expect(cli).stdout.to.include("TEST::set-output name=dry-run::false"); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should publish to a specific tag", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "2.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib@next", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish", "--tag", "next"], - env: { INPUT_TOKEN: "my-secret-token" }, - stdout: `my-lib 2.0.0${EOL}`, - }); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - INPUT_TAG: "next", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("my-lib 2.0.0"); - expect(cli).stdout.to.include( - "Successfully published my-lib v2.0.0 to https://registry.npmjs.org/" - ); - expect(cli).stdout.to.include("TEST::set-output name=type::major"); - expect(cli).stdout.to.include("TEST::set-output name=version::2.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=old-version::1.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=tag::next"); - expect(cli).stdout.to.include("TEST::set-output name=access::public"); - expect(cli).stdout.to.include("TEST::set-output name=dry-run::false"); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should publish a scoped package with public access", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "@my-scope/my-lib", version: "2.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "@my-scope/my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish", "--access", "public"], - env: { INPUT_TOKEN: "my-secret-token" }, - stdout: `@my-scope/my-lib 2.0.0${EOL}`, - }); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - INPUT_ACCESS: "public", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("@my-scope/my-lib 2.0.0"); - expect(cli).stdout.to.include( - "Successfully published @my-scope/my-lib v2.0.0 to https://registry.npmjs.org/" - ); - expect(cli).stdout.to.include("TEST::set-output name=type::major"); - expect(cli).stdout.to.include("TEST::set-output name=version::2.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=old-version::1.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=tag::latest"); - expect(cli).stdout.to.include("TEST::set-output name=access::public"); - expect(cli).stdout.to.include("TEST::set-output name=dry-run::false"); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should not publish a package if dryRun is true", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "1.1.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish", "--dry-run"], - env: { INPUT_TOKEN: "my-secret-token" }, - stdout: `my-lib 1.1.0${EOL}`, - }); - - let cli = exec.action({ - env: { - INPUT_TOKEN: "my-secret-token", - "INPUT_DRY-RUN": "true", - }, - }); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("TEST::set-output name=type::minor"); - expect(cli).stdout.to.include("TEST::set-output name=version::1.1.0"); - expect(cli).stdout.to.include("TEST::set-output name=old-version::1.0.0"); - expect(cli).stdout.to.include("TEST::set-output name=tag::latest"); - expect(cli).stdout.to.include("TEST::set-output name=access::public"); - expect(cli).stdout.to.include("TEST::set-output name=dry-run::true"); - expect(cli).stdout.to.include("my-lib 1.1.0"); - expect(cli).stdout.to.include( - "📦 my-lib v1.1.0 was NOT actually published to https://registry.npmjs.org/ (dry run)" - ); - expect(cli).to.have.exitCode(0); - - npm.assert.ran(4); - }); -}); diff --git a/test/specs/cli/args.spec.js b/test/specs/cli/args.spec.js deleted file mode 100644 index 030d876..0000000 --- a/test/specs/cli/args.spec.js +++ /dev/null @@ -1,162 +0,0 @@ -"use strict"; - -const npm = require("../../utils/npm"); -const files = require("../../utils/files"); -const exec = require("../../utils/exec"); -const { expect } = require("chai"); -const manifest = require("../../../package.json"); - -describe("CLI - argument tests", () => { - it("should error if an invalid argument is used", () => { - let cli = exec.cli("--debug", "--help", "--fizzbuzz", "--quiet"); - - expect(cli).to.have.exitCode(9); - expect(cli).to.have.stdout(""); - expect(cli.stderr).to.match( - /^Unknown option: --fizzbuzz\n\nUsage: npm-publish \[options\] \[package_path\]\n/ - ); - }); - - it("should error if an invalid shorthand argument is used", () => { - let cli = exec.cli("-dqzv"); - - expect(cli).to.have.exitCode(9); - expect(cli).to.have.stdout(""); - expect(cli.stderr).to.match( - /^Unknown option: -z\n\nUsage: npm-publish \[options\] \[package_path\]\n/ - ); - }); - - it("should print a more detailed error if DEBUG is set", () => { - process.env.DEBUG = "true"; - let cli = exec.cli(); - - expect(cli).to.have.stdout(""); - expect(cli).to.have.exitCode(1); - - expect(cli).to.have.stderr.that.matches( - /^Error: Unable to read package.json \nENOENT: no such file or directory/ - ); - expect(cli).to.have.stderr.that.matches(/\n at /); - - process.env.DEBUG = ""; - }); - - describe("npm-publish --help", () => { - it("should show usage text", () => { - let cli = exec.cli("--help"); - - expect(cli).to.have.exitCode(0); - expect(cli).to.have.stderr(""); - expect(cli.stdout).to.match( - /^\nUsage: npm-publish \[options\] \[package_path\]\n/ - ); - }); - - it("should support -h shorthand", () => { - let cli = exec.cli("-h"); - - expect(cli).to.have.exitCode(0); - expect(cli).to.have.stderr(""); - expect(cli.stdout).to.match( - /^\nUsage: npm-publish \[options\] \[package_path\]\n/ - ); - }); - - it("should ignore other arguments", () => { - let cli = exec.cli("--quiet", "--help", "--version"); - - expect(cli).to.have.exitCode(0); - expect(cli).to.have.stderr(""); - expect(cli.stdout).to.match( - /^\nUsage: npm-publish \[options\] \[package_path\]\n/ - ); - }); - - it("should ignore other shorthand arguments", () => { - let cli = exec.cli("-dhv"); - - expect(cli).to.have.exitCode(0); - expect(cli).to.have.stderr(""); - expect(cli.stdout).to.match( - /^\nUsage: npm-publish \[options\] \[package_path\]\n/ - ); - }); - }); - - describe("npm-publish --version", () => { - it("should show the version number", () => { - let cli = exec.cli("--version"); - - expect(cli).to.have.exitCode(0); - expect(cli).to.have.stderr(""); - expect(cli).to.have.stdout(manifest.version + "\n"); - }); - - it("should support -v shorthand", () => { - let cli = exec.cli("-v"); - - expect(cli).to.have.exitCode(0); - expect(cli).to.have.stderr(""); - expect(cli).to.have.stdout(manifest.version + "\n"); - }); - - it("should ignore other arguments", () => { - let cli = exec.cli("--quiet", "--version", "--debug"); - - expect(cli).to.have.exitCode(0); - expect(cli).to.have.stderr(""); - expect(cli).to.have.stdout(manifest.version + "\n"); - }); - - it("should ignore other shorthand arguments", () => { - let cli = exec.cli("-dvq"); - - expect(cli).to.have.exitCode(0); - expect(cli).to.have.stderr(""); - expect(cli).to.have.stdout(manifest.version + "\n"); - }); - }); - - describe("npm-publish --token", () => { - it("should error if the --token is missing its value", () => { - let cli = exec.cli("--quiet", "--token", "--version"); - - expect(cli).to.have.exitCode(9); - expect(cli).to.have.stdout(""); - expect(cli.stderr).to.match( - /^The --token argument requires a value\n\nUsage: npm-publish \[options\] \[package_path\]\n/ - ); - }); - }); - - describe("npm-publish --registry", () => { - it("should error if the --registry is missing its value", () => { - let cli = exec.cli("--quiet", "--registry", "--version"); - - expect(cli).to.have.exitCode(9); - expect(cli).to.have.stdout(""); - expect(cli.stderr).to.match( - /^The --registry argument requires a value\n\nUsage: npm-publish \[options\] \[package_path\]\n/ - ); - }); - - it("should fail if the NPM registry URL is invalid", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "1.2.3" }, - }, - ]); - - let cli = exec.cli("--registry", "example.com"); - - expect(cli).to.have.stdout(""); - expect(cli).stderr.to.include("Invalid URL"); - expect(cli).to.have.exitCode(1); - - files.assert.doesNotExist("home/.npmrc"); - npm.assert.ran(0); - }); - }); -}); diff --git a/test/specs/cli/failure.spec.js b/test/specs/cli/failure.spec.js deleted file mode 100644 index 82b06c7..0000000 --- a/test/specs/cli/failure.spec.js +++ /dev/null @@ -1,210 +0,0 @@ -"use strict"; - -const npm = require("../../utils/npm"); -const files = require("../../utils/files"); -const paths = require("../../utils/paths"); -const exec = require("../../utils/exec"); -const { expect } = require("chai"); -const { EOL } = require("os"); - -describe("CLI - failure tests", () => { - it("should fail if the package.json file does not exist", () => { - let cli = exec.cli(); - - expect(cli).to.have.stdout(""); - expect(cli).stderr.to.include( - "Unable to read package.json \nENOENT: no such file or directory" - ); - expect(cli).to.have.exitCode(1); - - files.assert.doesNotExist("home/.npmrc"); - files.assert.doesNotExist("workspace/package.json"); - npm.assert.didNotRun(); - }); - - it("should fail if the package.json file is invalid", () => { - files.create([ - { path: "workspace/package.json", contents: "hello, world" }, - ]); - - let cli = exec.cli(); - - expect(cli).to.have.stdout(""); - expect(cli).to.have.stderr( - "Unable to parse package.json \nUnexpected token h in JSON at position 0\n" - ); - expect(cli).to.have.exitCode(1); - - files.assert.doesNotExist("home/.npmrc"); - npm.assert.didNotRun(); - }); - - it("should fail if the package name is invalid", () => { - files.create([ - { path: "workspace/package.json", contents: { name: "\n \t" } }, - ]); - - let cli = exec.cli(); - - expect(cli).to.have.stdout(""); - expect(cli).to.have.stderr( - "Unable to parse package.json \nInvalid package name\n" - ); - expect(cli).to.have.exitCode(1); - - files.assert.doesNotExist("home/.npmrc"); - npm.assert.didNotRun(); - }); - - it("should fail if the package version is invalid", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "hello, world" }, - }, - ]); - - let cli = exec.cli(); - - expect(cli).to.have.stdout(""); - expect(cli).to.have.stderr( - "Unable to parse package.json \nInvalid Version: hello, world\n" - ); - expect(cli).to.have.exitCode(1); - - files.assert.doesNotExist("home/.npmrc"); - npm.assert.didNotRun(); - }); - - it('should fail if the "npm view" command errors', () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "2.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stderr: "BOOM!", - exitCode: 1, - }); - - let cli = exec.cli(); - - expect(cli).to.have.stdout(""); - expect(cli).to.have.stderr( - "Unable to determine the current version of my-lib on NPM. \n" + - "npm view my-lib version exited with a status of 1.\n\n" + - "BOOM!\n" - ); - expect(cli).to.have.exitCode(1); - - npm.assert.ran(2); - }); - - it("should fail if the .npmrc file is invalid", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "2.0.0" }, - }, - { - path: "home/.npmrc/file.txt", - contents: "~/.npmrc is a directory, not a file", - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - let cli = exec.cli(); - - expect(cli).to.have.stdout(""); - expect(cli).stderr.to.include("Unable to read the NPM config file: "); - expect(cli).stderr.to.include( - "EISDIR: illegal operation on a directory, read" - ); - expect(cli).to.have.exitCode(1); - - npm.assert.ran(1); - }); - - it('should fail if the "npm config" command errors', () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "2.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stderr: "BOOM!", - exitCode: 1, - }); - - let cli = exec.cli(); - - expect(cli).to.have.stdout(""); - expect(cli).stderr.to.include( - "Unable to determine the NPM config file path." - ); - expect(cli).stderr.to.include( - "npm config get userconfig exited with a status of 1" - ); - expect(cli).stderr.to.include("BOOM!"); - expect(cli).to.have.exitCode(1); - - npm.assert.ran(1); - }); - - it('should fail if the "npm publish" command errors', () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "2.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - stderr: "BOOM!", - exitCode: 1, - }); - - let cli = exec.cli(); - - expect(cli).to.have.stdout(""); - expect(cli).stderr.to.include( - "Unable to publish my-lib v2.0.0 to https://registry.npmjs.org/." - ); - expect(cli).stderr.to.include("npm publish exited with a status of 1"); - expect(cli).stderr.to.include("BOOM!"); - expect(cli).to.have.exitCode(1); - - npm.assert.ran(4); - }); -}); diff --git a/test/specs/cli/success.spec.js b/test/specs/cli/success.spec.js deleted file mode 100644 index f9372cd..0000000 --- a/test/specs/cli/success.spec.js +++ /dev/null @@ -1,579 +0,0 @@ -"use strict"; - -const npm = require("../../utils/npm"); -const files = require("../../utils/files"); -const paths = require("../../utils/paths"); -const exec = require("../../utils/exec"); -const { expect } = require("chai"); -const { EOL } = require("os"); -const { join } = require("path"); - -describe("CLI - success tests", () => { - it("should publish a new version to NPM", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "2.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - stdout: `my-lib 2.0.0${EOL}`, - }); - - let cli = exec.cli(); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("my-lib 2.0.0"); - expect(cli).stdout.to.include( - "Successfully published my-lib v2.0.0 to https://registry.npmjs.org/" - ); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should publish a new version to NPM if no package exists", async () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "1.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `${EOL}`, - stderr: `npm ERR! code E404${EOL}`, - exitCode: 1, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - stdout: `my-lib 1.0.0${EOL}`, - }); - - let cli = exec.cli(); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("my-lib 1.0.0"); - expect(cli).stdout.to.include( - "Successfully published my-lib v1.0.0 to https://registry.npmjs.org/" - ); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should publish a new version to NPM if the tag does not exist", async () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "1.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib@my-tag", "version"], - stdout: `${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish", "--tag", "my-tag"], - stdout: `my-lib 1.0.0${EOL}`, - }); - - let cli = exec.cli("--tag", "my-tag"); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("my-lib 1.0.0"); - expect(cli).stdout.to.include( - "Successfully published my-lib v1.0.0 to https://registry.npmjs.org/" - ); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should not publish a new version to NPM if the version number hasn't changed", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "1.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - let cli = exec.cli(); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include( - "📦 my-lib v1.0.0 is already published to https://registry.npmjs.org/" - ); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(2); - }); - - it("should use the specified NPM token to publish the package", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "2.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - env: { INPUT_TOKEN: "my-secret-token" }, - stdout: `my-lib 2.0.0${EOL}`, - }); - - let cli = exec.cli("--token", "my-secret-token"); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("my-lib 2.0.0"); - expect(cli).stdout.to.include( - "Successfully published my-lib v2.0.0 to https://registry.npmjs.org/" - ); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should append to an existing .npmrc file", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "1.1.0" }, - }, - { - path: "home/.npmrc", - contents: - "This is my NPM config.\nThere are many like it,\nbut this one is mine.", - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - stdout: `my-lib 1.1.0${EOL}`, - }); - - let cli = exec.cli(); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("my-lib 1.1.0"); - expect(cli).stdout.to.include( - "📦 Successfully published my-lib v1.1.0 to https://registry.npmjs.org/" - ); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `This is my NPM config.${EOL}` + - `There are many like it,${EOL}` + - `but this one is mine.${EOL}` + - `${EOL}` + - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should update an existing .npmrc file's settings", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "1.0.1" }, - }, - { - path: "home/.npmrc", - contents: - "# Use the GitHub package registry\n" + - "registry=https://registry.github.com/\n" + - "https://registry.github.com/:_authToken=my-github-token\n" + - "\n" + - "# Use the NPM registry with no auth\n" + - "registry=https://registry.npmjs.org/\n" + - "\n" + - "# Use some other package registry\n" + - "registry=https://registry.example.com/\n", - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - stdout: `my-lib 1.0.1${EOL}`, - }); - - let cli = exec.cli(); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("my-lib 1.0.1"); - expect(cli).stdout.to.include( - "📦 Successfully published my-lib v1.0.1 to https://registry.npmjs.org/" - ); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `# Use the GitHub package registry${EOL}` + - `${EOL}` + - `# Use the NPM registry with no auth${EOL}` + - `${EOL}` + - `# Use some other package registry${EOL}` + - `${EOL}` + - `${EOL}` + - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should publish a package that's not in the root of the workspace directory", () => { - files.create([ - { - path: "workspace/subdir/my-lib/package.json", - contents: { name: "my-lib", version: "1.0.1-beta" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - cwd: join(paths.workspace, "subdir/my-lib"), - stdout: `my-lib 1.0.1-beta${EOL}`, - }); - - let cli = exec.cli("subdir/my-lib/package.json"); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("my-lib 1.0.1-beta"); - expect(cli).stdout.to.include( - "📦 Successfully published my-lib v1.0.1-beta to https://registry.npmjs.org/" - ); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should publish a scoped package", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "@my-scope/my-lib", version: "2.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "@my-scope/my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - stdout: `@my-scope/my-lib 2.0.0${EOL}`, - }); - - let cli = exec.cli(); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("@my-scope/my-lib 2.0.0"); - expect(cli).stdout.to.include( - "Successfully published @my-scope/my-lib v2.0.0 to https://registry.npmjs.org/" - ); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should publish to a specific tag", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "2.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib@next", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish", "--tag", "next"], - stdout: `my-lib 2.0.0${EOL}`, - }); - - let cli = exec.cli("--tag", "next"); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("my-lib 2.0.0"); - expect(cli).stdout.to.include( - "Successfully published my-lib v2.0.0 to https://registry.npmjs.org/" - ); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should publish a scoped package with public access", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "@my-scope/my-lib", version: "2.0.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "@my-scope/my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish", "--access", "public"], - stdout: `@my-scope/my-lib 2.0.0${EOL}`, - }); - - let cli = exec.cli("--access", "public"); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("@my-scope/my-lib 2.0.0"); - expect(cli).stdout.to.include( - "Successfully published @my-scope/my-lib v2.0.0 to https://registry.npmjs.org/" - ); - expect(cli).to.have.exitCode(0); - - files.assert.contents( - "home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should not publish the package if publish is called with --dry-run", () => { - files.create([ - { - path: "workspace/package.json", - contents: { name: "my-lib", version: "1.1.0" }, - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish", "--dry-run"], - stdout: `my-lib 1.1.0${EOL}`, - }); - - let cli = exec.cli("--dry-run"); - - expect(cli).to.have.stderr(""); - expect(cli).stdout.to.include("my-lib 1.1.0"); - expect(cli).stdout.to.include( - "📦 my-lib v1.1.0 was NOT actually published to https://registry.npmjs.org/ (dry run)" - ); - expect(cli).to.have.exitCode(0); - - npm.assert.ran(4); - }); -}); diff --git a/test/specs/lib/exports.spec.js b/test/specs/lib/exports.spec.js deleted file mode 100644 index 77b00e3..0000000 --- a/test/specs/lib/exports.spec.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; - -const commonJSExport = require("../../../"); -const { expect } = require("chai"); -const { default: defaultExport, npmPublish: namedExport } = require("../../../"); - -describe("NPM package - exports", () => { - - it("should export the npmPublish() function as the default CommonJS export", () => { - expect(commonJSExport).to.be.a("function"); - expect(commonJSExport.name).to.equal("npmPublish"); - }); - - it("should export the npmPublish() function as the default ESM export", () => { - expect(defaultExport).to.be.a("function"); - expect(defaultExport).to.equal(commonJSExport); - }); - - it("should export the npmPublish() function as a named export", () => { - expect(namedExport).to.be.a("function"); - expect(namedExport).to.equal(commonJSExport); - }); - - it("should not export anything else", () => { - expect(Object.keys(commonJSExport)).to.have.same.members([ - "default", - "npmPublish", - ]); - }); - -}); diff --git a/test/specs/lib/failure.spec.js b/test/specs/lib/failure.spec.js deleted file mode 100644 index cbc247e..0000000 --- a/test/specs/lib/failure.spec.js +++ /dev/null @@ -1,234 +0,0 @@ -"use strict"; - -const npmPublish = require("../../../"); -const npm = require("../../utils/npm"); -const files = require("../../utils/files"); -const paths = require("../../utils/paths"); -const { expect, assert } = require("chai"); -const { EOL } = require("os"); - -describe("NPM package - failure tests", () => { - let previousCWD; - - beforeEach(() => { - previousCWD = process.cwd(); - process.chdir(paths.workspace); - }); - - afterEach(() => { - process.chdir(previousCWD); - }); - - it("should fail if the NPM registry URL is invalid", async () => { - files.create([ - { path: "workspace/package.json", contents: { name: "my-lib", version: "1.2.3" }}, - ]); - - try { - await npmPublish({ registry: "example.com" }); - assert.fail("An error should have been thrown!"); - } - catch (error) { - expect(error).to.be.an.instanceOf(TypeError); - expect(error.message).to.equal("Invalid URL"); - } - - files.assert.doesNotExist("home/.npmrc"); - npm.assert.ran(0); - }); - - it("should fail if the package.json file does not exist", async () => { - try { - await npmPublish(); - assert.fail("An error should have been thrown!"); - } - catch (error) { - expect(error).to.be.an.instanceOf(Error); - expect(error.message).to.include("Unable to read package.json \nENOENT: no such file or directory"); - } - - files.assert.doesNotExist("home/.npmrc"); - files.assert.doesNotExist("workspace/package.json"); - npm.assert.didNotRun(); - }); - - it("should fail if the package.json file is invalid", async () => { - files.create([ - { path: "workspace/package.json", contents: "hello, world" }, - ]); - - try { - await npmPublish(); - assert.fail("An error should have been thrown!"); - } - catch (error) { - expect(error).to.be.an.instanceOf(SyntaxError); - expect(error.message).to.equal("Unable to parse package.json \nUnexpected token h in JSON at position 0"); - } - - files.assert.doesNotExist("home/.npmrc"); - npm.assert.didNotRun(); - }); - - it("should fail if the package name is invalid", async () => { - files.create([ - { path: "workspace/package.json", contents: { name: "\n \t" }}, - ]); - - try { - await npmPublish(); - assert.fail("An error should have been thrown!"); - } - catch (error) { - expect(error).to.be.an.instanceOf(TypeError); - expect(error.message).to.equal("Unable to parse package.json \nInvalid package name"); - } - - files.assert.doesNotExist("home/.npmrc"); - npm.assert.didNotRun(); - }); - - it("should fail if the package version is invalid", async () => { - files.create([ - { path: "workspace/package.json", contents: { name: "my-lib", version: "hello, world" }}, - ]); - - try { - await npmPublish(); - assert.fail("An error should have been thrown!"); - } - catch (error) { - expect(error).to.be.an.instanceOf(TypeError); - expect(error.message).to.equal("Unable to parse package.json \nInvalid Version: hello, world"); - } - - files.assert.doesNotExist("home/.npmrc"); - npm.assert.didNotRun(); - }); - - it('should fail if the "npm view" command errors', async () => { - files.create([ - { path: "workspace/package.json", contents: { name: "my-lib", version: "2.0.0" }}, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stderr: "BOOM!", - exitCode: 1, - }); - - try { - await npmPublish(); - assert.fail("An error should have been thrown!"); - } - catch (error) { - expect(error).to.be.an.instanceOf(Error); - expect(error.message).to.equal( - "Unable to determine the current version of my-lib on NPM. \n" + - "npm view my-lib version exited with a status of 1.\n\n" + - "BOOM!" - ); - } - - npm.assert.ran(2); - }); - - it("should fail if the .npmrc file is invalid", async () => { - files.create([ - { path: "workspace/package.json", contents: { name: "my-lib", version: "2.0.0" }}, - { path: "home/.npmrc/file.txt", contents: "~/.npmrc is a directory, not a file" }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - try { - await npmPublish(); - assert.fail("An error should have been thrown!"); - } - catch (error) { - expect(error).to.be.an.instanceOf(Error); - expect(error.message).to.include("Unable to read the NPM config file: "); - expect(error.message).to.include("EISDIR: illegal operation on a directory, read"); - } - - npm.assert.ran(1); - }); - - it('should fail if the "npm config" command errors', async () => { - files.create([ - { path: "workspace/package.json", contents: { name: "my-lib", version: "2.0.0" }}, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stderr: "BOOM!", - exitCode: 1, - }); - - try { - await npmPublish(); - assert.fail("An error should have been thrown!"); - } - catch (error) { - expect(error).to.be.an.instanceOf(Error); - expect(error.message).to.equal( - "Unable to determine the NPM config file path. \n" + - "npm config get userconfig exited with a status of 1.\n\n" + - "BOOM!" - ); - } - - npm.assert.ran(1); - }); - - it('should fail if the "npm publish" command errors', async () => { - files.create([ - { path: "workspace/package.json", contents: { name: "my-lib", version: "2.0.0" }}, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - stderr: "BOOM!", - exitCode: 1, - }); - - try { - await npmPublish({ quiet: true }); - assert.fail("An error should have been thrown!"); - } - catch (error) { - expect(error).to.be.an.instanceOf(Error); - expect(error.message).to.equal( - "Unable to publish my-lib v2.0.0 to https://registry.npmjs.org/. \n" + - "npm publish exited with a status of 1.\n\n" + - "BOOM!" - ); - } - - npm.assert.ran(4); - }); - -}); diff --git a/test/specs/lib/success.spec.js b/test/specs/lib/success.spec.js deleted file mode 100644 index fec9fc9..0000000 --- a/test/specs/lib/success.spec.js +++ /dev/null @@ -1,604 +0,0 @@ -"use strict"; - -const npmPublish = require("../../../"); -const npm = require("../../utils/npm"); -const files = require("../../utils/files"); -const paths = require("../../utils/paths"); -const { expect } = require("chai"); -const { EOL } = require("os"); -const { join } = require("path"); - -describe("NPM package - success tests", () => { - let previousCWD; - - beforeEach(() => { - previousCWD = process.cwd(); - process.chdir(paths.workspace); - }); - - afterEach(() => { - process.chdir(previousCWD); - }); - - it("should publish a new version to NPM", async () => { - files.create([ - { path: "workspace/package.json", contents: { name: "my-lib", version: "2.0.0" }}, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - stdout: `my-lib 2.0.0${EOL}`, - }); - - let results = await npmPublish({ quiet: true }); - - expect(results).to.deep.equal({ - type: "major", - package: "my-lib", - registry: new URL("https://registry.npmjs.org/"), - version: "2.0.0", - oldVersion: "1.0.0", - tag: "latest", - access: "public", - dryRun: false, - }); - - files.assert.contents("home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should publish a new version to NPM if no package exists", async () => { - files.create([ - { path: "workspace/package.json", contents: { name: "my-lib", version: "1.0.0" }}, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `${EOL}`, - stderr: `npm ERR! code E404${EOL}`, - exitCode: 1, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - stdout: `my-lib 1.0.0${EOL}`, - }); - - let results = await npmPublish({ quiet: true }); - - expect(results).to.deep.equal({ - type: "major", - package: "my-lib", - registry: new URL("https://registry.npmjs.org/"), - version: "1.0.0", - oldVersion: "0.0.0", - tag: "latest", - access: "public", - dryRun: false, - }); - - files.assert.contents("home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should publish a new version to NPM if the tag does not exist", async () => { - files.create([ - { path: "workspace/package.json", contents: { name: "my-lib", version: "1.0.0" }}, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib@my-tag", "version"], - stdout: `${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish", "--tag", "my-tag"], - stdout: `my-lib 1.0.0${EOL}`, - }); - - let results = await npmPublish({ tag: "my-tag", quiet: true }); - - expect(results).to.deep.equal({ - type: "major", - package: "my-lib", - registry: new URL("https://registry.npmjs.org/"), - version: "1.0.0", - oldVersion: "0.0.0", - tag: "my-tag", - access: "public", - dryRun: false, - }); - - files.assert.contents("home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should not publish a new version to NPM if the version number hasn't changed", async () => { - files.create([ - { path: "workspace/package.json", contents: { name: "my-lib", version: "1.0.0" }}, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - let results = await npmPublish({ quiet: true }); - - expect(results).to.deep.equal({ - type: "none", - package: "my-lib", - registry: new URL("https://registry.npmjs.org/"), - version: "1.0.0", - oldVersion: "1.0.0", - tag: "latest", - access: "public", - dryRun: false, - }); - - files.assert.contents("home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(2); - }); - - it("should use the specified NPM token to publish the package", async () => { - files.create([ - { path: "workspace/package.json", contents: { name: "my-lib", version: "1.0.1-beta.1" }}, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - env: { INPUT_TOKEN: "my-secret-token" }, - stdout: `my-lib 1.0.1-beta.1${EOL}`, - }); - - let results = await npmPublish({ - quiet: true, - token: "my-secret-token", - }); - - expect(results).to.deep.equal({ - type: "prepatch", - package: "my-lib", - registry: new URL("https://registry.npmjs.org/"), - version: "1.0.1-beta.1", - oldVersion: "1.0.0", - tag: "latest", - access: "public", - dryRun: false, - }); - - files.assert.contents("home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should append to an existing .npmrc file", async () => { - files.create([ - { path: "workspace/package.json", contents: { name: "my-lib", version: "1.1.0" }}, - { path: "home/.npmrc", contents: "This is my NPM config.\nThere are many like it,\nbut this one is mine." }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - stdout: `my-lib 1.1.0${EOL}`, - }); - - let results = await npmPublish({ quiet: true }); - - expect(results).to.deep.equal({ - type: "minor", - package: "my-lib", - registry: new URL("https://registry.npmjs.org/"), - version: "1.1.0", - oldVersion: "1.0.0", - tag: "latest", - access: "public", - dryRun: false - }); - - files.assert.contents("home/.npmrc", - `This is my NPM config.${EOL}` + - `There are many like it,${EOL}` + - `but this one is mine.${EOL}` + - `${EOL}` + - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should update an existing .npmrc file's settings", async () => { - files.create([ - { path: "workspace/package.json", contents: { name: "my-lib", version: "1.0.1" }}, - { - path: "home/.npmrc", - contents: - "# Use the GitHub package registry\n" + - "registry=https://registry.github.com/\n" + - "https://registry.github.com/:_authToken=my-github-token\n" + - "\n" + - "# Use the NPM registry with no auth\n" + - "registry=https://registry.npmjs.org/\n" + - "\n" + - "# Use some other package registry\n" + - "registry=https://registry.example.com/\n" - }, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - stdout: `my-lib 1.0.1${EOL}`, - }); - - let results = await npmPublish({ quiet: true }); - - expect(results).to.deep.equal({ - type: "patch", - package: "my-lib", - registry: new URL("https://registry.npmjs.org/"), - version: "1.0.1", - oldVersion: "1.0.0", - tag: "latest", - access: "public", - dryRun: false - }); - - files.assert.contents("home/.npmrc", - `# Use the GitHub package registry${EOL}` + - `${EOL}` + - `# Use the NPM registry with no auth${EOL}` + - `${EOL}` + - `# Use some other package registry${EOL}` + - `${EOL}` + - `${EOL}` + - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should publish a package that's not in the root of the workspace directory", async () => { - files.create([ - { path: "workspace/subdir/my-lib/package.json", contents: { name: "my-lib", version: "1.0.1-beta" }}, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - cwd: join(paths.workspace, "subdir/my-lib"), - stdout: `my-lib 1.0.1-beta${EOL}`, - }); - - let results = await npmPublish({ - quiet: true, - package: "subdir/my-lib/package.json", - }); - - expect(results).to.deep.equal({ - type: "prepatch", - package: "my-lib", - registry: new URL("https://registry.npmjs.org/"), - version: "1.0.1-beta", - oldVersion: "1.0.0", - tag: "latest", - access: "public", - dryRun: false, - }); - - files.assert.contents("home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should publish a scoped package", async () => { - files.create([ - { path: "workspace/package.json", contents: { name: "@my-scope/my-lib", version: "2.0.0" }}, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "@my-scope/my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish"], - stdout: `@my-scope/my-lib 2.0.0${EOL}`, - }); - - let results = await npmPublish({ quiet: true }); - - expect(results).to.deep.equal({ - type: "major", - package: "@my-scope/my-lib", - registry: new URL("https://registry.npmjs.org/"), - version: "2.0.0", - oldVersion: "1.0.0", - tag: "latest", - access: "restricted", - dryRun: false, - }); - - files.assert.contents("home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should publish to a specific tag", async () => { - files.create([ - { path: "workspace/package.json", contents: { name: "my-lib", version: "2.0.0" }}, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib@next", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish", "--tag", "next"], - stdout: `my-lib 2.0.0${EOL}`, - }); - - let results = await npmPublish({ tag: "next", quiet: true }); - - expect(results).to.deep.equal({ - type: "major", - package: "my-lib", - registry: new URL("https://registry.npmjs.org/"), - version: "2.0.0", - oldVersion: "1.0.0", - tag: "next", - access: "public", - dryRun: false, - }); - - files.assert.contents("home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("should publish a scoped package with public access", async () => { - files.create([ - { path: "workspace/package.json", contents: { name: "@my-scope/my-lib", version: "2.0.0" }}, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "@my-scope/my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish", "--access", "public"], - stdout: `@my-scope/my-lib 2.0.0${EOL}`, - }); - - let results = await npmPublish({ access: "public", quiet: true }); - - expect(results).to.deep.equal({ - type: "major", - package: "@my-scope/my-lib", - registry: new URL("https://registry.npmjs.org/"), - version: "2.0.0", - oldVersion: "1.0.0", - tag: "latest", - access: "public", - dryRun: false, - }); - - files.assert.contents("home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - - it("results.dryRun should be true when called with --dry-run", async () => { - files.create([ - { path: "workspace/package.json", contents: { name: "my-lib", version: "1.1.0" }}, - ]); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["view", "my-lib", "version"], - stdout: `1.0.0${EOL}`, - }); - - npm.mock({ - args: ["config", "get", "userconfig"], - stdout: `${paths.npmrc}${EOL}`, - }); - - npm.mock({ - args: ["publish", "--dry-run"], - stdout: `my-lib 1.1.0${EOL}`, - }); - - let results = await npmPublish({ - quiet: true, - package: "package.json", - dryRun: true - }); - - expect(results).to.deep.equal({ - type: "minor", - package: "my-lib", - registry: new URL("https://registry.npmjs.org/"), - version: "1.1.0", - oldVersion: "1.0.0", - tag: "latest", - access: "public", - dryRun: true - }); - - files.assert.contents("home/.npmrc", - `//registry.npmjs.org/:_authToken=\${INPUT_TOKEN}${EOL}` + - `registry=https://registry.npmjs.org/${EOL}` - ); - - npm.assert.ran(4); - }); - -}); diff --git a/test/utils/exec.js b/test/utils/exec.js deleted file mode 100644 index 1a1090f..0000000 --- a/test/utils/exec.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; - -const chai = require("chai"); -const chaiExec = require("@jsdevtools/chai-exec"); -const paths = require("./paths"); - -chai.use(chaiExec); - -module.exports = { - /** - * Executes the GitHub Action with the specified options - */ - action(options) { - // Deep merge the options object, since Chai Exec only does a shallow merge - options = { - cwd: paths.workspace, - ...options, - env: { - ...process.env, - NODE_OPTIONS: "", - INPUT_REGISTRY: "https://registry.npmjs.org/", - INPUT_PACKAGE: "package.json", - "INPUT_CHECK-VERSION": "true", - ...options.env, - }, - }; - - return chaiExec("node", [paths.action], options); - }, - - /** - * Executes the CLI with the specified arguments - */ - cli(...args) { - return chaiExec("node", [paths.cli].concat(args), { cwd: paths.workspace }); - }, -}; diff --git a/test/utils/files.js b/test/utils/files.js deleted file mode 100644 index 97ceda3..0000000 --- a/test/utils/files.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; - -const fs = require("fs"); -const path = require("path"); -const paths = require("./paths"); -const { expect } = require("chai"); - -module.exports = { - /** - * Creates files in the temp directory - * - * @param entries {object[]} - * An array of files to create. Each file is an object with the following properties: - * - `path`: The relative path of the entry. - * - `contents`: The contents of the file, as a string or JSON object - */ - create(files = []) { - for (let file of files) { - file = typeof file === "string" ? { path: file } : file; - file.path = path.join(paths.tmp, file.path); - - if (typeof file.contents !== "string") { - file.contents = JSON.stringify(file.contents); - } - - fs.mkdirSync(path.dirname(file.path), { recursive: true }); - fs.writeFileSync(file.path, file.contents); - } - }, - - assert: { - /** - * Asserts the the specified file has the specified contents - */ - contents(p, expected) { - let actual = fs.readFileSync(path.join(paths.tmp, p), "utf8"); - expect(actual).to.equal(expected, `Incorrect file contents in ${p}`); - }, - - /** - * Asserts the the specified file does not exist - */ - doesNotExist(p) { - let exists = fs.existsSync(path.join(paths.tmp, p)); - expect(exists).to.equal(false, `File should not exist: ${p}`); - }, - }, -}; diff --git a/test/utils/npm.js b/test/utils/npm.js deleted file mode 100644 index 5a833f5..0000000 --- a/test/utils/npm.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; - -const fs = require("fs"); -const paths = require("./paths"); -const { expect } = require("chai"); - -module.exports = { - /** - * Adds a stub behavior for our mock NPM binary - */ - mock({ args, cwd, env, stdout, stderr, exitCode }) { - args = args || []; - cwd = cwd || paths.workspace; - env = env || {}; - stdout = stdout || ""; - stderr = stderr || ""; - exitCode = exitCode || 0; - - let mocks = readMocks(); - let stub = { args, cwd, env, stdout, stderr, exitCode }; - mocks.push(stub); - fs.writeFileSync(paths.mocks, JSON.stringify(mocks)); - }, - - /** - * Returns the next stub behavior for the mock NPM binary - * - * @returns {{ args: string[], cwd: string, env: object, stdout: string, stderr: string, exitCode: number }} - */ - stub() { - let mocks = readMocks(); - let stub = mocks.find((mock) => !mock.ran); - stub.ran = true; - fs.writeFileSync(paths.mocks, JSON.stringify(mocks)); - return stub; - }, - - assert: { - /** - * Asserts that NPM did not run - */ - didNotRun() { - let mocks = readMocks(); - expect(mocks).to.have.lengthOf(0, "NPM ran when it shouldn't have"); - }, - - /** - * Asserts that all mocks ran the specified number of times - */ - ran(times) { - let mocks = readMocks(); - - for (let [index, stub] of mocks.entries()) { - if (!stub.ran) { - throw new Error( - `NPM call #${index + 1} did not run:\n` + - `EXPECTED: npm ${stub.args.join(" ")}\n` + - "ACTUAL: \n" - ); - } - } - - expect(mocks).to.have.lengthOf( - times, - `Expected NPM to be run ${times} times` - ); - }, - }, -}; - -/** - * Returns the contents of the NPM mock config file - * - * @returns {object[]} - */ -function readMocks() { - try { - let json = fs.readFileSync(paths.mocks, "utf8"); - return JSON.parse(json); - } catch (_) { - return []; - } -} diff --git a/test/utils/paths.js b/test/utils/paths.js deleted file mode 100644 index 84bfa70..0000000 --- a/test/utils/paths.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; - -const path = require("path"); - -const ROOT_DIR = path.resolve(__dirname, "../.."); - -module.exports = { - /** - * The path of the GitHub Action JavaScript file - */ - action: path.join(ROOT_DIR, "dist/index.js"), - - /** - * The path of the CLI JavaScript file - */ - cli: path.join(ROOT_DIR, "bin/npm-publish.js"), - - /** - * The path of our mock bin directory - */ - bin: path.join(ROOT_DIR, "test/fixtures/bin"), - - /** - * The path of our mock NPM binary - */ - npm: path.join(ROOT_DIR, "test/fixtures/bin/npm"), - - /** - * The path of the user's .npmrc file - */ - npmrc: path.join(ROOT_DIR, "test/.tmp/home/.npmrc"), - - /** - * The path of the config file for the mock NPM binary - */ - mocks: path.join(ROOT_DIR, "test/.tmp/npm-mocks.json"), - - /** - * The temp directory used for files/folders that are created during tests - */ - tmp: path.join(ROOT_DIR, "test/.tmp"), - - /** - * The path used as the user's home directory, where the .npmrc file is located - */ - home: path.join(ROOT_DIR, "test/.tmp/home"), - - /** - * The path used as the user's workspace and CWD when running the GitHub Action - */ - workspace: path.join(ROOT_DIR, "test/.tmp/workspace"), -}; diff --git a/tsconfig.json b/tsconfig.json index 925c398..18ad981 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -32,6 +32,5 @@ "rootDir": "src", "outDir": "lib" }, - "include": ["src/**/*.ts"], - "exclude": ["src/cli/**/*"] + "include": ["src/**/*.ts"] } diff --git a/vitest.config.ts b/vitest.config.ts index e381fb2..ed1ce73 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -2,6 +2,7 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + include: ["src/**/__tests__/**/*.test.ts"], coverage: { provider: "istanbul", all: true, From b30569e83a06b39777b91c8b183523fba4845ed3 Mon Sep 17 00:00:00 2001 From: Michael Cousins Date: Mon, 17 Apr 2023 14:21:02 -0400 Subject: [PATCH 09/36] wip: fix up auth settings (thanks e2e tests) --- .eslintignore | 1 - .github/workflows/ci-cd.yml | 4 ++-- dist/main.js | 2 +- e2e/00-login.sh | 2 +- e2e/02-publish.sh | 2 +- src/npm/use-npm-environment.ts | 2 +- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.eslintignore b/.eslintignore index a245ef7..4bc4547 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,3 @@ dist lib coverage -test diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 37b0d2d..5b1fa17 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -161,9 +161,9 @@ jobs: token: ${{ steps.setup.outputs.token }} - name: Check action output - if: ${{ steps.action-no-publish.outputs.type != 'none' }} + if: ${{ steps.action-no-publish.outputs.type != '' }} run: | - echo "::error::Expected release type to be 'none', got '${{ steps.action-no-publish.outputs.type }}'" + echo "::error::Expected release type to be '', got '${{ steps.action-no-publish.outputs.type }}'" exit 1 - name: Create new version for Action end-to-end test diff --git a/dist/main.js b/dist/main.js index d91ac98..f7f6c9b 100644 --- a/dist/main.js +++ b/dist/main.js @@ -4821,7 +4821,7 @@ async function useNpmEnvironment(auth, task) { const npmrc = import_node_path2.default.join(npmrcDirectory, ".npmrc"); const config = [ "; created by jsdevtools/npm-publish", - `//${registry.value.hostname}/:authToken=\${NODE_AUTH_TOKEN}`, + `//${registry.value.host}/:_authToken=\${NODE_AUTH_TOKEN}`, `registry=${registry.value.href}`, "" ].join(import_node_os2.default.EOL); diff --git a/e2e/00-login.sh b/e2e/00-login.sh index f85954c..7aebb65 100755 --- a/e2e/00-login.sh +++ b/e2e/00-login.sh @@ -9,7 +9,7 @@ REGISTRY_HOSTNAME="localhost:4873" registry_url=http://${REGISTRY_HOSTNAME} token_matcher='^\/\/'${REGISTRY_HOSTNAME}'\/:_authToken="(.+)"$' temporary_dir=${RUNNER_TEMP:-${TMPDIR}} -npmrc=${temporary_dir}.npmrc-e2e +npmrc=${temporary_dir}/.npmrc-e2e { echo -e "test" diff --git a/e2e/02-publish.sh b/e2e/02-publish.sh index cf38104..4b67cf7 100755 --- a/e2e/02-publish.sh +++ b/e2e/02-publish.sh @@ -8,4 +8,4 @@ REGISTRY_URL="http://localhost:4873" PACKAGE_SPEC=$1 TOKEN=$2 -node ./bin/npm-publish --token=${TOKEN} --registry=${REGISTRY_URL} ${PACKAGE_SPEC}/package.json +node ./bin/npm-publish --token=${TOKEN} --registry=${REGISTRY_URL} ${PACKAGE_SPEC} diff --git a/src/npm/use-npm-environment.ts b/src/npm/use-npm-environment.ts index d968a5f..6445c9b 100644 --- a/src/npm/use-npm-environment.ts +++ b/src/npm/use-npm-environment.ts @@ -31,7 +31,7 @@ export async function useNpmEnvironment( const config = [ "; created by jsdevtools/npm-publish", - `//${registry.value.hostname}/:authToken=\${NODE_AUTH_TOKEN}`, + `//${registry.value.host}/:_authToken=\${NODE_AUTH_TOKEN}`, `registry=${registry.value.href}`, "", ].join(os.EOL); From e7698e75090434d0063102a2e67005e2f779b99b Mon Sep 17 00:00:00 2001 From: Michael Cousins Date: Mon, 17 Apr 2023 14:29:48 -0400 Subject: [PATCH 10/36] Test and CI fixes --- .github/workflows/ci-cd.yml | 5 ++++- e2e/03-verify.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 5b1fa17..0feeb74 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -25,7 +25,10 @@ jobs: - name: Install Node.js and dependencies uses: ./.github/actions/setup - - name: Run linters + - name: Build types + run: npm run build:lib + + - name: Run lints run: npm run lint test: diff --git a/e2e/03-verify.sh b/e2e/03-verify.sh index 6b1ae7e..a1782e2 100755 --- a/e2e/03-verify.sh +++ b/e2e/03-verify.sh @@ -10,4 +10,4 @@ PACKAGE_SPEC=$1 package_name=$(cd $1 && npm pkg get name | sed 's/"//g') package_version=$(cd $1 && npm pkg get version | sed 's/"//g') -npm view $package_name@$package_version +npm view --registry ${REGISTRY_URL} $package_name@$package_version From 8c6f5a27c10bc09ab899df8bfab5eb3d40897bca Mon Sep 17 00:00:00 2001 From: Michael Cousins Date: Mon, 17 Apr 2023 14:55:42 -0400 Subject: [PATCH 11/36] wip: e2e in matrix --- .github/workflows/ci-cd.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 0feeb74..7648ef2 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -107,10 +107,10 @@ jobs: matrix: os: - ubuntu-latest - # - macos-latest - # - windows-latest + - macos-latest + - windows-latest node-version: - # - 16 + - 16 - 18 services: From 3eab7216274de1e45938a262a2b2a7ba5b20b938 Mon Sep 17 00:00:00 2001 From: Michael Cousins Date: Mon, 17 Apr 2023 16:26:41 -0400 Subject: [PATCH 12/36] wip: e2e node 16 fixes --- .github/workflows/ci-cd.yml | 35 ++++++++++------------------------- e2e/00-login.sh | 6 ++++-- 2 files changed, 14 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 7648ef2..3880afd 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -13,31 +13,17 @@ on: - cron: "25 12 * * 1" jobs: - lint: - name: Lint - runs-on: ubuntu-latest - timeout-minutes: 10 - - steps: - - name: Checkout source - uses: actions/checkout@v3 - - - name: Install Node.js and dependencies - uses: ./.github/actions/setup - - - name: Build types - run: npm run build:lib - - - name: Run lints - run: npm run lint - test: - name: Run unit tests with Node.js ${{ matrix.node-version }} + name: Run unit tests with Node.js ${{ matrix.node-version }} on ${{ matrix.os }} runs-on: ubuntu-latest timeout-minutes: 10 strategy: fail-fast: false matrix: + os: + - ubuntu-latest + - macos-latest + - windows-latest node-version: - 16 - 18 @@ -76,7 +62,7 @@ jobs: parallel-finished: true build: - name: Build + name: Build and lint runs-on: ubuntu-latest timeout-minutes: 10 @@ -90,6 +76,9 @@ jobs: - name: Build run: npm run build + - name: Run lints + run: npm run lint + - name: Upload publish artifact uses: actions/upload-artifact@v3 with: @@ -97,7 +86,7 @@ jobs: path: lib e2e: - name: Run E2E tests with Node.js ${{ matrix.node-version }} on ${{ matrix.os }} + name: Run E2E tests with Node.js ${{ matrix.node-version }} runs-on: ${{ matrix.os }} timeout-minutes: 10 needs: build @@ -105,10 +94,6 @@ jobs: strategy: fail-fast: false matrix: - os: - - ubuntu-latest - - macos-latest - - windows-latest node-version: - 16 - 18 diff --git a/e2e/00-login.sh b/e2e/00-login.sh index 7aebb65..acc3483 100755 --- a/e2e/00-login.sh +++ b/e2e/00-login.sh @@ -2,7 +2,7 @@ # Login into the registry and extract the auth token # Usage: 00-login.sh -set -e +set -eo pipefail REGISTRY_HOSTNAME="localhost:4873" @@ -15,7 +15,9 @@ npmrc=${temporary_dir}/.npmrc-e2e echo -e "test" sleep 1 echo -e "test" -} | NPM_CONFIG_USERCONFIG=${npmrc} npm login --registry ${registry_url} > /dev/null 2>&1 +sleep 1 +echo -e "example@example.com" +} | NPM_CONFIG_USERCONFIG=${npmrc} npm login --registry ${registry_url} 1>/dev/null echo "DEBUG: wrote config to temporary file: ${npmrc}" 1>&2 From 2088119ad7e3122421fd92d6fcc7ff0a9e9bd100 Mon Sep 17 00:00:00 2001 From: Michael Cousins Date: Mon, 17 Apr 2023 16:27:40 -0400 Subject: [PATCH 13/36] wip: fix ci --- .github/workflows/ci-cd.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 3880afd..8cbb455 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -178,7 +178,6 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 needs: - - lint - test - build - e2e From d9fcce5f5688bdf5cdfa66874f28fa16124f2f85 Mon Sep 17 00:00:00 2001 From: Michael Cousins Date: Mon, 17 Apr 2023 16:31:07 -0400 Subject: [PATCH 14/36] wip: fix ci --- .github/workflows/ci-cd.yml | 2 +- README.md | 43 +++++++++++++++++++++---------------- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 8cbb455..b15e977 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -87,7 +87,7 @@ jobs: e2e: name: Run E2E tests with Node.js ${{ matrix.node-version }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest timeout-minutes: 10 needs: build diff --git a/README.md b/README.md index 0dc4581..f3f5a35 100644 --- a/README.md +++ b/README.md @@ -187,36 +187,41 @@ For security and safety, the `npm-publish` CLI uses a different, isolated config Run `npm-publish --help` to see the full list of options available. ``` -> npm-publish --help +Usage: -Usage: npm-publish [options] [package_path] + npm-publish [package] -options: - --token The NPM access token to use when publishing +Arguments: - --registry The NPM registry URL to use + package The path to the package to publish. + May be a directory or package.json file. + Defaults to the package in the current directory. - --tag The tag to publish to. Allows the package to be installed - using "npm install @" +Options: - --access "public" = The package will be publicly visible. - "restricted" = The package will only be visible to members - of your NPM organization. + --token (Required) npm authentication token. - --dry-run Don't actually publish to NPM, but report what would have - been published + --registry Registry to read from and write to. + Defaults to "https://registry.npmjs.org/". - --debug, -d Enable debug mode, with increased logging + --tag The distribution tag to check against and publish to. + Defaults to "latest". - --quiet, -q Suppress unnecessary output + --access Package access, may be "public" or "restricted". + See documentation for details. - --version, -v Print the version number + --strategy Publish strategy, may be "all" or "upgrade". + Defaults to "all", see documentation for details. - --help, -h Show help + --dry-run Do not actually publish anything. + --quiet Only print errors. + --debug Print debug logs. + -v, --version Print the version number. + -h --help Show usage text. -package_path The absolute or relative path of the NPM package to publish. - Can be a directory path, or the path of a package.json file. - Defaults to the current directory. +Examples: + + $ npm-publish --token abc123 ./my-package ``` ## License From 865edeebfe08e24e278673ed139906ca8aeab580 Mon Sep 17 00:00:00 2001 From: Michael Cousins Date: Mon, 17 Apr 2023 16:55:15 -0400 Subject: [PATCH 15/36] wip: e2e registry login --- dist/main.js | 132 ++++----- e2e/00-login.sh | 25 +- e2e/01-setup-package.sh | 2 +- e2e/02-publish.sh | 2 +- e2e/03-verify.sh | 2 +- package-lock.json | 573 ++++++++++++++++++++-------------------- package.json | 11 +- 7 files changed, 364 insertions(+), 383 deletions(-) diff --git a/dist/main.js b/dist/main.js index f7f6c9b..f7e46ce 100644 --- a/dist/main.js +++ b/dist/main.js @@ -191,7 +191,7 @@ var require_semver = __commonJS({ version2 = version2.version; } } else if (typeof version2 !== "string") { - throw new TypeError(`Invalid Version: ${version2}`); + throw new TypeError(`Invalid Version: ${require("util").inspect(version2)}`); } if (version2.length > MAX_LENGTH) { throw new TypeError( @@ -364,9 +364,13 @@ var require_semver = __commonJS({ } this.prerelease = []; break; - case "pre": + case "pre": { + const base = Number(identifierBase) ? 1 : 0; + if (!identifier && identifierBase === false) { + throw new Error("invalid increment argument: identifier is empty"); + } if (this.prerelease.length === 0) { - this.prerelease = [0]; + this.prerelease = [base]; } else { let i = this.prerelease.length; while (--i >= 0) { @@ -376,20 +380,27 @@ var require_semver = __commonJS({ } } if (i === -1) { - this.prerelease.push(0); + if (identifier === this.prerelease.join(".") && identifierBase === false) { + throw new Error("invalid increment argument: identifier already exists"); + } + this.prerelease.push(base); } } if (identifier) { - const base = Number(identifierBase) ? 1 : 0; + let prerelease = [identifier, base]; + if (identifierBase === false) { + prerelease = [identifier]; + } if (compareIdentifiers(this.prerelease[0], identifier) === 0) { if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, base]; + this.prerelease = prerelease; } } else { - this.prerelease = [identifier, base]; + this.prerelease = prerelease; } } break; + } default: throw new Error(`invalid increment argument: ${release}`); } @@ -405,22 +416,18 @@ var require_semver = __commonJS({ // node_modules/semver/functions/parse.js var require_parse = __commonJS({ "node_modules/semver/functions/parse.js"(exports, module2) { - var { MAX_LENGTH } = require_constants(); var SemVer = require_semver(); - var parse2 = (version2, options) => { + var parse2 = (version2, options, throwErrors = false) => { if (version2 instanceof SemVer) { return version2; } - if (typeof version2 !== "string") { - return null; - } - if (version2.length > MAX_LENGTH) { - return null; - } try { return new SemVer(version2, options); } catch (er) { - return null; + if (!throwErrors) { + return null; + } + throw er; } }; module2.exports = parse2; @@ -474,60 +481,41 @@ var require_inc = __commonJS({ } }); -// node_modules/semver/functions/compare.js -var require_compare = __commonJS({ - "node_modules/semver/functions/compare.js"(exports, module2) { - var SemVer = require_semver(); - var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)); - module2.exports = compare; - } -}); - -// node_modules/semver/functions/eq.js -var require_eq = __commonJS({ - "node_modules/semver/functions/eq.js"(exports, module2) { - var compare = require_compare(); - var eq = (a, b, loose) => compare(a, b, loose) === 0; - module2.exports = eq; - } -}); - // node_modules/semver/functions/diff.js var require_diff = __commonJS({ "node_modules/semver/functions/diff.js"(exports, module2) { var parse2 = require_parse(); - var eq = require_eq(); var diff = (version1, version2) => { - const v12 = parse2(version1); - const v2 = parse2(version2); - if (eq(v12, v2)) { + const v12 = parse2(version1, null, true); + const v2 = parse2(version2, null, true); + const comparison = v12.compare(v2); + if (comparison === 0) { return null; - } else { - const hasPre = v12.prerelease.length || v2.prerelease.length; - const prefix = hasPre ? "pre" : ""; - const defaultResult = hasPre ? "prerelease" : ""; - if (v12.major !== v2.major) { - return prefix + "major"; - } - if (v12.minor !== v2.minor) { - return prefix + "minor"; - } - if (v12.patch !== v2.patch) { - return prefix + "patch"; - } - if (!v12.prerelease.length || !v2.prerelease.length) { - if (v12.patch) { - return "patch"; - } - if (v12.minor) { - return "minor"; - } - if (v12.major) { - return "major"; - } - } - return defaultResult; } + const v1Higher = comparison > 0; + const highVersion = v1Higher ? v12 : v2; + const lowVersion = v1Higher ? v2 : v12; + const highHasPre = !!highVersion.prerelease.length; + const prefix = highHasPre ? "pre" : ""; + if (v12.major !== v2.major) { + return prefix + "major"; + } + if (v12.minor !== v2.minor) { + return prefix + "minor"; + } + if (v12.patch !== v2.patch) { + return prefix + "patch"; + } + if (highHasPre) { + return "prerelease"; + } + if (lowVersion.patch) { + return "patch"; + } + if (lowVersion.minor) { + return "minor"; + } + return "major"; }; module2.exports = diff; } @@ -572,6 +560,15 @@ var require_prerelease = __commonJS({ } }); +// node_modules/semver/functions/compare.js +var require_compare = __commonJS({ + "node_modules/semver/functions/compare.js"(exports, module2) { + var SemVer = require_semver(); + var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)); + module2.exports = compare; + } +}); + // node_modules/semver/functions/rcompare.js var require_rcompare = __commonJS({ "node_modules/semver/functions/rcompare.js"(exports, module2) { @@ -639,6 +636,15 @@ var require_lt = __commonJS({ } }); +// node_modules/semver/functions/eq.js +var require_eq = __commonJS({ + "node_modules/semver/functions/eq.js"(exports, module2) { + var compare = require_compare(); + var eq = (a, b, loose) => compare(a, b, loose) === 0; + module2.exports = eq; + } +}); + // node_modules/semver/functions/neq.js var require_neq = __commonJS({ "node_modules/semver/functions/neq.js"(exports, module2) { diff --git a/e2e/00-login.sh b/e2e/00-login.sh index acc3483..eb10378 100755 --- a/e2e/00-login.sh +++ b/e2e/00-login.sh @@ -2,29 +2,16 @@ # Login into the registry and extract the auth token # Usage: 00-login.sh -set -eo pipefail +set -euo pipefail -REGISTRY_HOSTNAME="localhost:4873" +REGISTRY_URL="http://localhost:4873" -registry_url=http://${REGISTRY_HOSTNAME} -token_matcher='^\/\/'${REGISTRY_HOSTNAME}'\/:_authToken="(.+)"$' -temporary_dir=${RUNNER_TEMP:-${TMPDIR}} -npmrc=${temporary_dir}/.npmrc-e2e +token_matcher='"token": ?"(.+)"' +create_user_response=$(curl -s -X PUT -H 'content-type: application/json' -d '{"name": "test", "password": "test"}' ${REGISTRY_URL}/-/user/org.couchdb.user:test) -{ -echo -e "test" -sleep 1 -echo -e "test" -sleep 1 -echo -e "example@example.com" -} | NPM_CONFIG_USERCONFIG=${npmrc} npm login --registry ${registry_url} 1>/dev/null +echo "DEBUG: Create user response - ${create_user_response}" 1>&2 -echo "DEBUG: wrote config to temporary file: ${npmrc}" 1>&2 - -npmrc_contents=$(<${npmrc}) -rm -f ${npmrc} - -if [[ "${npmrc_contents}" =~ ${token_matcher} ]]; then +if [[ "${create_user_response}" =~ ${token_matcher} ]]; then echo "${BASH_REMATCH[1]}" exit 0 fi diff --git a/e2e/01-setup-package.sh b/e2e/01-setup-package.sh index 4a37df2..09ed4d6 100755 --- a/e2e/01-setup-package.sh +++ b/e2e/01-setup-package.sh @@ -2,7 +2,7 @@ # Create a test fixture package # Usage: 01-setup-package.sh -set -e +set -euo pipefail PACKAGE_SPEC=$1 PACKAGE_VERSION=$2 diff --git a/e2e/02-publish.sh b/e2e/02-publish.sh index 4b67cf7..de549a5 100755 --- a/e2e/02-publish.sh +++ b/e2e/02-publish.sh @@ -2,7 +2,7 @@ # Publish a package to the registry using the CLI # Usage: 02-publish.sh -set -e +set -euo pipefail REGISTRY_URL="http://localhost:4873" PACKAGE_SPEC=$1 diff --git a/e2e/03-verify.sh b/e2e/03-verify.sh index a1782e2..d848398 100755 --- a/e2e/03-verify.sh +++ b/e2e/03-verify.sh @@ -2,7 +2,7 @@ # Verify that a package was published # Usage: 03-verify.sh -set -e +set -euo pipefail REGISTRY_URL="http://localhost:4873" PACKAGE_SPEC=$1 diff --git a/package-lock.json b/package-lock.json index 9cf37c7..81b9bbb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,10 +9,9 @@ "version": "1.4.3", "license": "MIT", "dependencies": { - "@jsdevtools/ono": "^7.1.3", "@types/semver": "^7.3.13", "command-line-args": "^5.1.1", - "semver": "^7.4.0" + "semver": "^7.5.0" }, "bin": { "npm-publish": "bin/npm-publish.js" @@ -21,16 +20,16 @@ "@actions/core": "^1.10.0", "@types/command-line-args": "^5.0.0", "@types/node": "^18.15.11", - "@typescript-eslint/eslint-plugin": "^5.58.0", - "@typescript-eslint/parser": "^5.58.0", + "@typescript-eslint/eslint-plugin": "^5.59.0", + "@typescript-eslint/parser": "^5.59.0", "@vitest/coverage-istanbul": "^0.30.1", "concurrently": "^8.0.1", - "esbuild": "0.17.16", + "esbuild": "0.17.17", "eslint": "^8.38.0", "eslint-config-prettier": "^8.8.0", "eslint-import-resolver-typescript": "^3.5.5", "eslint-plugin-import": "npm:eslint-plugin-i@^2.27.5-1", - "eslint-plugin-jsdoc": "^41.1.1", + "eslint-plugin-jsdoc": "^41.1.2", "eslint-plugin-n": "^15.7.0", "eslint-plugin-promise": "^6.1.1", "eslint-plugin-sonarjs": "^0.19.0", @@ -481,9 +480,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.16.tgz", - "integrity": "sha512-baLqRpLe4JnKrUXLJChoTN0iXZH7El/mu58GE3WIA6/H834k0XWvLRmGLG8y8arTRS9hJJibPnF0tiGhmWeZgw==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.17.tgz", + "integrity": "sha512-E6VAZwN7diCa3labs0GYvhEPL2M94WLF8A+czO8hfjREXxba8Ng7nM5VxV+9ihNXIY1iQO1XxUU4P7hbqbICxg==", "cpu": [ "arm" ], @@ -497,9 +496,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.16.tgz", - "integrity": "sha512-QX48qmsEZW+gcHgTmAj+x21mwTz8MlYQBnzF6861cNdQGvj2jzzFjqH0EBabrIa/WVZ2CHolwMoqxVryqKt8+Q==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.17.tgz", + "integrity": "sha512-jaJ5IlmaDLFPNttv0ofcwy/cfeY4bh/n705Tgh+eLObbGtQBK3EPAu+CzL95JVE4nFAliyrnEu0d32Q5foavqg==", "cpu": [ "arm64" ], @@ -513,9 +512,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.16.tgz", - "integrity": "sha512-G4wfHhrrz99XJgHnzFvB4UwwPxAWZaZBOFXh+JH1Duf1I4vIVfuYY9uVLpx4eiV2D/Jix8LJY+TAdZ3i40tDow==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.17.tgz", + "integrity": "sha512-446zpfJ3nioMC7ASvJB1pszHVskkw4u/9Eu8s5yvvsSDTzYh4p4ZIRj0DznSl3FBF0Z/mZfrKXTtt0QCoFmoHA==", "cpu": [ "x64" ], @@ -529,9 +528,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.16.tgz", - "integrity": "sha512-/Ofw8UXZxuzTLsNFmz1+lmarQI6ztMZ9XktvXedTbt3SNWDn0+ODTwxExLYQ/Hod91EZB4vZPQJLoqLF0jvEzA==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.17.tgz", + "integrity": "sha512-m/gwyiBwH3jqfUabtq3GH31otL/0sE0l34XKpSIqR7NjQ/XHQ3lpmQHLHbG8AHTGCw8Ao059GvV08MS0bhFIJQ==", "cpu": [ "arm64" ], @@ -545,9 +544,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.16.tgz", - "integrity": "sha512-SzBQtCV3Pdc9kyizh36Ol+dNVhkDyIrGb/JXZqFq8WL37LIyrXU0gUpADcNV311sCOhvY+f2ivMhb5Tuv8nMOQ==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.17.tgz", + "integrity": "sha512-4utIrsX9IykrqYaXR8ob9Ha2hAY2qLc6ohJ8c0CN1DR8yWeMrTgYFjgdeQ9LIoTOfLetXjuCu5TRPHT9yKYJVg==", "cpu": [ "x64" ], @@ -561,9 +560,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.16.tgz", - "integrity": "sha512-ZqftdfS1UlLiH1DnS2u3It7l4Bc3AskKeu+paJSfk7RNOMrOxmeFDhLTMQqMxycP1C3oj8vgkAT6xfAuq7ZPRA==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.17.tgz", + "integrity": "sha512-4PxjQII/9ppOrpEwzQ1b0pXCsFLqy77i0GaHodrmzH9zq2/NEhHMAMJkJ635Ns4fyJPFOlHMz4AsklIyRqFZWA==", "cpu": [ "arm64" ], @@ -577,9 +576,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.16.tgz", - "integrity": "sha512-rHV6zNWW1tjgsu0dKQTX9L0ByiJHHLvQKrWtnz8r0YYJI27FU3Xu48gpK2IBj1uCSYhJ+pEk6Y0Um7U3rIvV8g==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.17.tgz", + "integrity": "sha512-lQRS+4sW5S3P1sv0z2Ym807qMDfkmdhUYX30GRBURtLTrJOPDpoU0kI6pVz1hz3U0+YQ0tXGS9YWveQjUewAJw==", "cpu": [ "x64" ], @@ -593,9 +592,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.16.tgz", - "integrity": "sha512-n4O8oVxbn7nl4+m+ISb0a68/lcJClIbaGAoXwqeubj/D1/oMMuaAXmJVfFlRjJLu/ZvHkxoiFJnmbfp4n8cdSw==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.17.tgz", + "integrity": "sha512-biDs7bjGdOdcmIk6xU426VgdRUpGg39Yz6sT9Xp23aq+IEHDb/u5cbmu/pAANpDB4rZpY/2USPhCA+w9t3roQg==", "cpu": [ "arm" ], @@ -609,9 +608,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.16.tgz", - "integrity": "sha512-8yoZhGkU6aHu38WpaM4HrRLTFc7/VVD9Q2SvPcmIQIipQt2I/GMTZNdEHXoypbbGao5kggLcxg0iBKjo0SQYKA==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.17.tgz", + "integrity": "sha512-2+pwLx0whKY1/Vqt8lyzStyda1v0qjJ5INWIe+d8+1onqQxHLLi3yr5bAa4gvbzhZqBztifYEu8hh1La5+7sUw==", "cpu": [ "arm64" ], @@ -625,9 +624,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.16.tgz", - "integrity": "sha512-9ZBjlkdaVYxPNO8a7OmzDbOH9FMQ1a58j7Xb21UfRU29KcEEU3VTHk+Cvrft/BNv0gpWJMiiZ/f4w0TqSP0gLA==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.17.tgz", + "integrity": "sha512-IBTTv8X60dYo6P2t23sSUYym8fGfMAiuv7PzJ+0LcdAndZRzvke+wTVxJeCq4WgjppkOpndL04gMZIFvwoU34Q==", "cpu": [ "ia32" ], @@ -641,9 +640,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.16.tgz", - "integrity": "sha512-TIZTRojVBBzdgChY3UOG7BlPhqJz08AL7jdgeeu+kiObWMFzGnQD7BgBBkWRwOtKR1i2TNlO7YK6m4zxVjjPRQ==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.17.tgz", + "integrity": "sha512-WVMBtcDpATjaGfWfp6u9dANIqmU9r37SY8wgAivuKmgKHE+bWSuv0qXEFt/p3qXQYxJIGXQQv6hHcm7iWhWjiw==", "cpu": [ "loong64" ], @@ -657,9 +656,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.16.tgz", - "integrity": "sha512-UPeRuFKCCJYpBbIdczKyHLAIU31GEm0dZl1eMrdYeXDH+SJZh/i+2cAmD3A1Wip9pIc5Sc6Kc5cFUrPXtR0XHA==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.17.tgz", + "integrity": "sha512-2kYCGh8589ZYnY031FgMLy0kmE4VoGdvfJkxLdxP4HJvWNXpyLhjOvxVsYjYZ6awqY4bgLR9tpdYyStgZZhi2A==", "cpu": [ "mips64el" ], @@ -673,9 +672,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.16.tgz", - "integrity": "sha512-io6yShgIEgVUhExJejJ21xvO5QtrbiSeI7vYUnr7l+v/O9t6IowyhdiYnyivX2X5ysOVHAuyHW+Wyi7DNhdw6Q==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.17.tgz", + "integrity": "sha512-KIdG5jdAEeAKogfyMTcszRxy3OPbZhq0PPsW4iKKcdlbk3YE4miKznxV2YOSmiK/hfOZ+lqHri3v8eecT2ATwQ==", "cpu": [ "ppc64" ], @@ -689,9 +688,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.16.tgz", - "integrity": "sha512-WhlGeAHNbSdG/I2gqX2RK2gfgSNwyJuCiFHMc8s3GNEMMHUI109+VMBfhVqRb0ZGzEeRiibi8dItR3ws3Lk+cA==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.17.tgz", + "integrity": "sha512-Cj6uWLBR5LWhcD/2Lkfg2NrkVsNb2sFM5aVEfumKB2vYetkA/9Uyc1jVoxLZ0a38sUhFk4JOVKH0aVdPbjZQeA==", "cpu": [ "riscv64" ], @@ -705,9 +704,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.16.tgz", - "integrity": "sha512-gHRReYsJtViir63bXKoFaQ4pgTyah4ruiMRQ6im9YZuv+gp3UFJkNTY4sFA73YDynmXZA6hi45en4BGhNOJUsw==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.17.tgz", + "integrity": "sha512-lK+SffWIr0XsFf7E0srBjhpkdFVJf3HEgXCwzkm69kNbRar8MhezFpkIwpk0qo2IOQL4JE4mJPJI8AbRPLbuOQ==", "cpu": [ "s390x" ], @@ -721,9 +720,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.16.tgz", - "integrity": "sha512-mfiiBkxEbUHvi+v0P+TS7UnA9TeGXR48aK4XHkTj0ZwOijxexgMF01UDFaBX7Q6CQsB0d+MFNv9IiXbIHTNd4g==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.17.tgz", + "integrity": "sha512-XcSGTQcWFQS2jx3lZtQi7cQmDYLrpLRyz1Ns1DzZCtn898cWfm5Icx/DEWNcTU+T+tyPV89RQtDnI7qL2PObPg==", "cpu": [ "x64" ], @@ -737,9 +736,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.16.tgz", - "integrity": "sha512-n8zK1YRDGLRZfVcswcDMDM0j2xKYLNXqei217a4GyBxHIuPMGrrVuJ+Ijfpr0Kufcm7C1k/qaIrGy6eG7wvgmA==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.17.tgz", + "integrity": "sha512-RNLCDmLP5kCWAJR+ItLM3cHxzXRTe4N00TQyQiimq+lyqVqZWGPAvcyfUBM0isE79eEZhIuGN09rAz8EL5KdLA==", "cpu": [ "x64" ], @@ -753,9 +752,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.16.tgz", - "integrity": "sha512-lEEfkfsUbo0xC47eSTBqsItXDSzwzwhKUSsVaVjVji07t8+6KA5INp2rN890dHZeueXJAI8q0tEIfbwVRYf6Ew==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.17.tgz", + "integrity": "sha512-PAXswI5+cQq3Pann7FNdcpSUrhrql3wKjj3gVkmuz6OHhqqYxKvi6GgRBoaHjaG22HV/ZZEgF9TlS+9ftHVigA==", "cpu": [ "x64" ], @@ -769,9 +768,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.16.tgz", - "integrity": "sha512-jlRjsuvG1fgGwnE8Afs7xYDnGz0dBgTNZfgCK6TlvPH3Z13/P5pi6I57vyLE8qZYLrGVtwcm9UbUx1/mZ8Ukag==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.17.tgz", + "integrity": "sha512-V63egsWKnx/4V0FMYkr9NXWrKTB5qFftKGKuZKFIrAkO/7EWLFnbBZNM1CvJ6Sis+XBdPws2YQSHF1Gqf1oj/Q==", "cpu": [ "x64" ], @@ -785,9 +784,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.16.tgz", - "integrity": "sha512-TzoU2qwVe2boOHl/3KNBUv2PNUc38U0TNnzqOAcgPiD/EZxT2s736xfC2dYQbszAwo4MKzzwBV0iHjhfjxMimg==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.17.tgz", + "integrity": "sha512-YtUXLdVnd6YBSYlZODjWzH+KzbaubV0YVd6UxSfoFfa5PtNJNaW+1i+Hcmjpg2nEe0YXUCNF5bkKy1NnBv1y7Q==", "cpu": [ "arm64" ], @@ -801,9 +800,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.16.tgz", - "integrity": "sha512-B8b7W+oo2yb/3xmwk9Vc99hC9bNolvqjaTZYEfMQhzdpBsjTvZBlXQ/teUE55Ww6sg//wlcDjOaqldOKyigWdA==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.17.tgz", + "integrity": "sha512-yczSLRbDdReCO74Yfc5tKG0izzm+lPMYyO1fFTcn0QNwnKmc3K+HdxZWLGKg4pZVte7XVgcFku7TIZNbWEJdeQ==", "cpu": [ "ia32" ], @@ -817,9 +816,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.16.tgz", - "integrity": "sha512-xJ7OH/nanouJO9pf03YsL9NAFQBHd8AqfrQd7Pf5laGyyTt/gToul6QYOA/i5i/q8y9iaM5DQFNTgpi995VkOg==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.17.tgz", + "integrity": "sha512-FNZw7H3aqhF9OyRQbDDnzUApDXfC1N6fgBhkqEO2jvYCJ+DxMTfZVqg3AX0R1khg1wHTBRD5SdcibSJ+XF6bFg==", "cpu": [ "x64" ], @@ -1007,11 +1006,6 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@jsdevtools/ono": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", - "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==" - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1118,15 +1112,15 @@ "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.58.0.tgz", - "integrity": "sha512-vxHvLhH0qgBd3/tW6/VccptSfc8FxPQIkmNTVLWcCOVqSBvqpnKkBTYrhcGlXfSnd78azwe+PsjYFj0X34/njA==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.0.tgz", + "integrity": "sha512-p0QgrEyrxAWBecR56gyn3wkG15TJdI//eetInP3zYRewDh0XS+DhB3VUAd3QqvziFsfaQIoIuZMxZRB7vXYaYw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.58.0", - "@typescript-eslint/type-utils": "5.58.0", - "@typescript-eslint/utils": "5.58.0", + "@typescript-eslint/scope-manager": "5.59.0", + "@typescript-eslint/type-utils": "5.59.0", + "@typescript-eslint/utils": "5.59.0", "debug": "^4.3.4", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", @@ -1152,14 +1146,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.58.0.tgz", - "integrity": "sha512-ixaM3gRtlfrKzP8N6lRhBbjTow1t6ztfBvQNGuRM8qH1bjFFXIJ35XY+FC0RRBKn3C6cT+7VW1y8tNm7DwPHDQ==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.0.tgz", + "integrity": "sha512-qK9TZ70eJtjojSUMrrEwA9ZDQ4N0e/AuoOIgXuNBorXYcBDk397D2r5MIe1B3cok/oCtdNC5j+lUUpVB+Dpb+w==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.58.0", - "@typescript-eslint/types": "5.58.0", - "@typescript-eslint/typescript-estree": "5.58.0", + "@typescript-eslint/scope-manager": "5.59.0", + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/typescript-estree": "5.59.0", "debug": "^4.3.4" }, "engines": { @@ -1179,13 +1173,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.58.0.tgz", - "integrity": "sha512-b+w8ypN5CFvrXWQb9Ow9T4/6LC2MikNf1viLkYTiTbkQl46CnR69w7lajz1icW0TBsYmlpg+mRzFJ4LEJ8X9NA==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.0.tgz", + "integrity": "sha512-tsoldKaMh7izN6BvkK6zRMINj4Z2d6gGhO2UsI8zGZY3XhLq1DndP3Ycjhi1JwdwPRwtLMW4EFPgpuKhbCGOvQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.58.0", - "@typescript-eslint/visitor-keys": "5.58.0" + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/visitor-keys": "5.59.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1196,13 +1190,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.58.0.tgz", - "integrity": "sha512-FF5vP/SKAFJ+LmR9PENql7fQVVgGDOS+dq3j+cKl9iW/9VuZC/8CFmzIP0DLKXfWKpRHawJiG70rVH+xZZbp8w==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.0.tgz", + "integrity": "sha512-d/B6VSWnZwu70kcKQSCqjcXpVH+7ABKH8P1KNn4K7j5PXXuycZTPXF44Nui0TEm6rbWGi8kc78xRgOC4n7xFgA==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.58.0", - "@typescript-eslint/utils": "5.58.0", + "@typescript-eslint/typescript-estree": "5.59.0", + "@typescript-eslint/utils": "5.59.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -1223,9 +1217,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.58.0.tgz", - "integrity": "sha512-JYV4eITHPzVQMnHZcYJXl2ZloC7thuUHrcUmxtzvItyKPvQ50kb9QXBkgNAt90OYMqwaodQh2kHutWZl1fc+1g==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.0.tgz", + "integrity": "sha512-yR2h1NotF23xFFYKHZs17QJnB51J/s+ud4PYU4MqdZbzeNxpgUr05+dNeCN/bb6raslHvGdd6BFCkVhpPk/ZeA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1236,13 +1230,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.58.0.tgz", - "integrity": "sha512-cRACvGTodA+UxnYM2uwA2KCwRL7VAzo45syNysqlMyNyjw0Z35Icc9ihPJZjIYuA5bXJYiJ2YGUB59BqlOZT1Q==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.0.tgz", + "integrity": "sha512-sUNnktjmI8DyGzPdZ8dRwW741zopGxltGs/SAPgGL/AAgDpiLsCFLcMNSpbfXfmnNeHmK9h3wGmCkGRGAoUZAg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.58.0", - "@typescript-eslint/visitor-keys": "5.58.0", + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/visitor-keys": "5.59.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1292,17 +1286,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.58.0.tgz", - "integrity": "sha512-gAmLOTFXMXOC+zP1fsqm3VceKSBQJNzV385Ok3+yzlavNHZoedajjS4UyS21gabJYcobuigQPs/z71A9MdJFqQ==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.0.tgz", + "integrity": "sha512-GGLFd+86drlHSvPgN/el6dRQNYYGOvRSDVydsUaQluwIW3HvbXuxyuD5JETvBt/9qGYe+lOrDk6gRrWOHb/FvA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.58.0", - "@typescript-eslint/types": "5.58.0", - "@typescript-eslint/typescript-estree": "5.58.0", + "@typescript-eslint/scope-manager": "5.59.0", + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/typescript-estree": "5.59.0", "eslint-scope": "^5.1.1", "semver": "^7.3.7" }, @@ -1318,12 +1312,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.58.0.tgz", - "integrity": "sha512-/fBraTlPj0jwdyTwLyrRTxv/3lnU2H96pNTVM6z3esTWLtA5MZ9ghSMJ7Rb+TtUAdtEw9EyJzJ0EydIMKxQ9gA==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.0.tgz", + "integrity": "sha512-qZ3iXxQhanchCeaExlKPV3gDQFxMUmU35xfd5eCXB6+kUw1TUAbIy2n7QIrwz9s98DQLzNWyHp61fY0da4ZcbA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.58.0", + "@typescript-eslint/types": "5.59.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -2286,9 +2280,9 @@ } }, "node_modules/esbuild": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.16.tgz", - "integrity": "sha512-aeSuUKr9aFVY9Dc8ETVELGgkj4urg5isYx8pLf4wlGgB0vTFjxJQdHnNH6Shmx4vYYrOTLCHtRI5i1XZ9l2Zcg==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.17.tgz", + "integrity": "sha512-/jUywtAymR8jR4qsa2RujlAF7Krpt5VWi72Q2yuLD4e/hvtNcFQ0I1j8m/bxq238pf3/0KO5yuXNpuLx8BE1KA==", "dev": true, "hasInstallScript": true, "bin": { @@ -2298,28 +2292,28 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.17.16", - "@esbuild/android-arm64": "0.17.16", - "@esbuild/android-x64": "0.17.16", - "@esbuild/darwin-arm64": "0.17.16", - "@esbuild/darwin-x64": "0.17.16", - "@esbuild/freebsd-arm64": "0.17.16", - "@esbuild/freebsd-x64": "0.17.16", - "@esbuild/linux-arm": "0.17.16", - "@esbuild/linux-arm64": "0.17.16", - "@esbuild/linux-ia32": "0.17.16", - "@esbuild/linux-loong64": "0.17.16", - "@esbuild/linux-mips64el": "0.17.16", - "@esbuild/linux-ppc64": "0.17.16", - "@esbuild/linux-riscv64": "0.17.16", - "@esbuild/linux-s390x": "0.17.16", - "@esbuild/linux-x64": "0.17.16", - "@esbuild/netbsd-x64": "0.17.16", - "@esbuild/openbsd-x64": "0.17.16", - "@esbuild/sunos-x64": "0.17.16", - "@esbuild/win32-arm64": "0.17.16", - "@esbuild/win32-ia32": "0.17.16", - "@esbuild/win32-x64": "0.17.16" + "@esbuild/android-arm": "0.17.17", + "@esbuild/android-arm64": "0.17.17", + "@esbuild/android-x64": "0.17.17", + "@esbuild/darwin-arm64": "0.17.17", + "@esbuild/darwin-x64": "0.17.17", + "@esbuild/freebsd-arm64": "0.17.17", + "@esbuild/freebsd-x64": "0.17.17", + "@esbuild/linux-arm": "0.17.17", + "@esbuild/linux-arm64": "0.17.17", + "@esbuild/linux-ia32": "0.17.17", + "@esbuild/linux-loong64": "0.17.17", + "@esbuild/linux-mips64el": "0.17.17", + "@esbuild/linux-ppc64": "0.17.17", + "@esbuild/linux-riscv64": "0.17.17", + "@esbuild/linux-s390x": "0.17.17", + "@esbuild/linux-x64": "0.17.17", + "@esbuild/netbsd-x64": "0.17.17", + "@esbuild/openbsd-x64": "0.17.17", + "@esbuild/sunos-x64": "0.17.17", + "@esbuild/win32-arm64": "0.17.17", + "@esbuild/win32-ia32": "0.17.17", + "@esbuild/win32-x64": "0.17.17" } }, "node_modules/escalade": { @@ -2566,9 +2560,9 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "41.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-41.1.1.tgz", - "integrity": "sha512-dfH97DKLGtQ5dgEMzd+GSUuY+xX/yyAfjML3O0pEWmMMpylsG6Ro65s4ziYXKmixiENYK9CTQxCVRGqZUFN2Mw==", + "version": "41.1.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-41.1.2.tgz", + "integrity": "sha512-MePJXdGiPW7AG06CU5GbKzYtKpoHwTq1lKijjq+RwL/cQkZtBZ59Zbv5Ep0RVxSMnq6242249/n+w4XrTZ1Afg==", "dev": true, "dependencies": { "@es-joy/jsdoccomment": "~0.37.0", @@ -4887,9 +4881,9 @@ } }, "node_modules/semver": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.4.0.tgz", - "integrity": "sha512-RgOxM8Mw+7Zus0+zcLEUn8+JfoLpj/huFTItQy2hsM4khuC1HYRDp0cU482Ewn/Fcy6bCjufD8vAj7voC66KQw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -6116,156 +6110,156 @@ } }, "@esbuild/android-arm": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.16.tgz", - "integrity": "sha512-baLqRpLe4JnKrUXLJChoTN0iXZH7El/mu58GE3WIA6/H834k0XWvLRmGLG8y8arTRS9hJJibPnF0tiGhmWeZgw==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.17.tgz", + "integrity": "sha512-E6VAZwN7diCa3labs0GYvhEPL2M94WLF8A+czO8hfjREXxba8Ng7nM5VxV+9ihNXIY1iQO1XxUU4P7hbqbICxg==", "dev": true, "optional": true }, "@esbuild/android-arm64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.16.tgz", - "integrity": "sha512-QX48qmsEZW+gcHgTmAj+x21mwTz8MlYQBnzF6861cNdQGvj2jzzFjqH0EBabrIa/WVZ2CHolwMoqxVryqKt8+Q==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.17.tgz", + "integrity": "sha512-jaJ5IlmaDLFPNttv0ofcwy/cfeY4bh/n705Tgh+eLObbGtQBK3EPAu+CzL95JVE4nFAliyrnEu0d32Q5foavqg==", "dev": true, "optional": true }, "@esbuild/android-x64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.16.tgz", - "integrity": "sha512-G4wfHhrrz99XJgHnzFvB4UwwPxAWZaZBOFXh+JH1Duf1I4vIVfuYY9uVLpx4eiV2D/Jix8LJY+TAdZ3i40tDow==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.17.tgz", + "integrity": "sha512-446zpfJ3nioMC7ASvJB1pszHVskkw4u/9Eu8s5yvvsSDTzYh4p4ZIRj0DznSl3FBF0Z/mZfrKXTtt0QCoFmoHA==", "dev": true, "optional": true }, "@esbuild/darwin-arm64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.16.tgz", - "integrity": "sha512-/Ofw8UXZxuzTLsNFmz1+lmarQI6ztMZ9XktvXedTbt3SNWDn0+ODTwxExLYQ/Hod91EZB4vZPQJLoqLF0jvEzA==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.17.tgz", + "integrity": "sha512-m/gwyiBwH3jqfUabtq3GH31otL/0sE0l34XKpSIqR7NjQ/XHQ3lpmQHLHbG8AHTGCw8Ao059GvV08MS0bhFIJQ==", "dev": true, "optional": true }, "@esbuild/darwin-x64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.16.tgz", - "integrity": "sha512-SzBQtCV3Pdc9kyizh36Ol+dNVhkDyIrGb/JXZqFq8WL37LIyrXU0gUpADcNV311sCOhvY+f2ivMhb5Tuv8nMOQ==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.17.tgz", + "integrity": "sha512-4utIrsX9IykrqYaXR8ob9Ha2hAY2qLc6ohJ8c0CN1DR8yWeMrTgYFjgdeQ9LIoTOfLetXjuCu5TRPHT9yKYJVg==", "dev": true, "optional": true }, "@esbuild/freebsd-arm64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.16.tgz", - "integrity": "sha512-ZqftdfS1UlLiH1DnS2u3It7l4Bc3AskKeu+paJSfk7RNOMrOxmeFDhLTMQqMxycP1C3oj8vgkAT6xfAuq7ZPRA==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.17.tgz", + "integrity": "sha512-4PxjQII/9ppOrpEwzQ1b0pXCsFLqy77i0GaHodrmzH9zq2/NEhHMAMJkJ635Ns4fyJPFOlHMz4AsklIyRqFZWA==", "dev": true, "optional": true }, "@esbuild/freebsd-x64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.16.tgz", - "integrity": "sha512-rHV6zNWW1tjgsu0dKQTX9L0ByiJHHLvQKrWtnz8r0YYJI27FU3Xu48gpK2IBj1uCSYhJ+pEk6Y0Um7U3rIvV8g==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.17.tgz", + "integrity": "sha512-lQRS+4sW5S3P1sv0z2Ym807qMDfkmdhUYX30GRBURtLTrJOPDpoU0kI6pVz1hz3U0+YQ0tXGS9YWveQjUewAJw==", "dev": true, "optional": true }, "@esbuild/linux-arm": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.16.tgz", - "integrity": "sha512-n4O8oVxbn7nl4+m+ISb0a68/lcJClIbaGAoXwqeubj/D1/oMMuaAXmJVfFlRjJLu/ZvHkxoiFJnmbfp4n8cdSw==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.17.tgz", + "integrity": "sha512-biDs7bjGdOdcmIk6xU426VgdRUpGg39Yz6sT9Xp23aq+IEHDb/u5cbmu/pAANpDB4rZpY/2USPhCA+w9t3roQg==", "dev": true, "optional": true }, "@esbuild/linux-arm64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.16.tgz", - "integrity": "sha512-8yoZhGkU6aHu38WpaM4HrRLTFc7/VVD9Q2SvPcmIQIipQt2I/GMTZNdEHXoypbbGao5kggLcxg0iBKjo0SQYKA==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.17.tgz", + "integrity": "sha512-2+pwLx0whKY1/Vqt8lyzStyda1v0qjJ5INWIe+d8+1onqQxHLLi3yr5bAa4gvbzhZqBztifYEu8hh1La5+7sUw==", "dev": true, "optional": true }, "@esbuild/linux-ia32": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.16.tgz", - "integrity": "sha512-9ZBjlkdaVYxPNO8a7OmzDbOH9FMQ1a58j7Xb21UfRU29KcEEU3VTHk+Cvrft/BNv0gpWJMiiZ/f4w0TqSP0gLA==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.17.tgz", + "integrity": "sha512-IBTTv8X60dYo6P2t23sSUYym8fGfMAiuv7PzJ+0LcdAndZRzvke+wTVxJeCq4WgjppkOpndL04gMZIFvwoU34Q==", "dev": true, "optional": true }, "@esbuild/linux-loong64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.16.tgz", - "integrity": "sha512-TIZTRojVBBzdgChY3UOG7BlPhqJz08AL7jdgeeu+kiObWMFzGnQD7BgBBkWRwOtKR1i2TNlO7YK6m4zxVjjPRQ==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.17.tgz", + "integrity": "sha512-WVMBtcDpATjaGfWfp6u9dANIqmU9r37SY8wgAivuKmgKHE+bWSuv0qXEFt/p3qXQYxJIGXQQv6hHcm7iWhWjiw==", "dev": true, "optional": true }, "@esbuild/linux-mips64el": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.16.tgz", - "integrity": "sha512-UPeRuFKCCJYpBbIdczKyHLAIU31GEm0dZl1eMrdYeXDH+SJZh/i+2cAmD3A1Wip9pIc5Sc6Kc5cFUrPXtR0XHA==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.17.tgz", + "integrity": "sha512-2kYCGh8589ZYnY031FgMLy0kmE4VoGdvfJkxLdxP4HJvWNXpyLhjOvxVsYjYZ6awqY4bgLR9tpdYyStgZZhi2A==", "dev": true, "optional": true }, "@esbuild/linux-ppc64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.16.tgz", - "integrity": "sha512-io6yShgIEgVUhExJejJ21xvO5QtrbiSeI7vYUnr7l+v/O9t6IowyhdiYnyivX2X5ysOVHAuyHW+Wyi7DNhdw6Q==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.17.tgz", + "integrity": "sha512-KIdG5jdAEeAKogfyMTcszRxy3OPbZhq0PPsW4iKKcdlbk3YE4miKznxV2YOSmiK/hfOZ+lqHri3v8eecT2ATwQ==", "dev": true, "optional": true }, "@esbuild/linux-riscv64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.16.tgz", - "integrity": "sha512-WhlGeAHNbSdG/I2gqX2RK2gfgSNwyJuCiFHMc8s3GNEMMHUI109+VMBfhVqRb0ZGzEeRiibi8dItR3ws3Lk+cA==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.17.tgz", + "integrity": "sha512-Cj6uWLBR5LWhcD/2Lkfg2NrkVsNb2sFM5aVEfumKB2vYetkA/9Uyc1jVoxLZ0a38sUhFk4JOVKH0aVdPbjZQeA==", "dev": true, "optional": true }, "@esbuild/linux-s390x": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.16.tgz", - "integrity": "sha512-gHRReYsJtViir63bXKoFaQ4pgTyah4ruiMRQ6im9YZuv+gp3UFJkNTY4sFA73YDynmXZA6hi45en4BGhNOJUsw==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.17.tgz", + "integrity": "sha512-lK+SffWIr0XsFf7E0srBjhpkdFVJf3HEgXCwzkm69kNbRar8MhezFpkIwpk0qo2IOQL4JE4mJPJI8AbRPLbuOQ==", "dev": true, "optional": true }, "@esbuild/linux-x64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.16.tgz", - "integrity": "sha512-mfiiBkxEbUHvi+v0P+TS7UnA9TeGXR48aK4XHkTj0ZwOijxexgMF01UDFaBX7Q6CQsB0d+MFNv9IiXbIHTNd4g==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.17.tgz", + "integrity": "sha512-XcSGTQcWFQS2jx3lZtQi7cQmDYLrpLRyz1Ns1DzZCtn898cWfm5Icx/DEWNcTU+T+tyPV89RQtDnI7qL2PObPg==", "dev": true, "optional": true }, "@esbuild/netbsd-x64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.16.tgz", - "integrity": "sha512-n8zK1YRDGLRZfVcswcDMDM0j2xKYLNXqei217a4GyBxHIuPMGrrVuJ+Ijfpr0Kufcm7C1k/qaIrGy6eG7wvgmA==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.17.tgz", + "integrity": "sha512-RNLCDmLP5kCWAJR+ItLM3cHxzXRTe4N00TQyQiimq+lyqVqZWGPAvcyfUBM0isE79eEZhIuGN09rAz8EL5KdLA==", "dev": true, "optional": true }, "@esbuild/openbsd-x64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.16.tgz", - "integrity": "sha512-lEEfkfsUbo0xC47eSTBqsItXDSzwzwhKUSsVaVjVji07t8+6KA5INp2rN890dHZeueXJAI8q0tEIfbwVRYf6Ew==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.17.tgz", + "integrity": "sha512-PAXswI5+cQq3Pann7FNdcpSUrhrql3wKjj3gVkmuz6OHhqqYxKvi6GgRBoaHjaG22HV/ZZEgF9TlS+9ftHVigA==", "dev": true, "optional": true }, "@esbuild/sunos-x64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.16.tgz", - "integrity": "sha512-jlRjsuvG1fgGwnE8Afs7xYDnGz0dBgTNZfgCK6TlvPH3Z13/P5pi6I57vyLE8qZYLrGVtwcm9UbUx1/mZ8Ukag==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.17.tgz", + "integrity": "sha512-V63egsWKnx/4V0FMYkr9NXWrKTB5qFftKGKuZKFIrAkO/7EWLFnbBZNM1CvJ6Sis+XBdPws2YQSHF1Gqf1oj/Q==", "dev": true, "optional": true }, "@esbuild/win32-arm64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.16.tgz", - "integrity": "sha512-TzoU2qwVe2boOHl/3KNBUv2PNUc38U0TNnzqOAcgPiD/EZxT2s736xfC2dYQbszAwo4MKzzwBV0iHjhfjxMimg==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.17.tgz", + "integrity": "sha512-YtUXLdVnd6YBSYlZODjWzH+KzbaubV0YVd6UxSfoFfa5PtNJNaW+1i+Hcmjpg2nEe0YXUCNF5bkKy1NnBv1y7Q==", "dev": true, "optional": true }, "@esbuild/win32-ia32": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.16.tgz", - "integrity": "sha512-B8b7W+oo2yb/3xmwk9Vc99hC9bNolvqjaTZYEfMQhzdpBsjTvZBlXQ/teUE55Ww6sg//wlcDjOaqldOKyigWdA==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.17.tgz", + "integrity": "sha512-yczSLRbDdReCO74Yfc5tKG0izzm+lPMYyO1fFTcn0QNwnKmc3K+HdxZWLGKg4pZVte7XVgcFku7TIZNbWEJdeQ==", "dev": true, "optional": true }, "@esbuild/win32-x64": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.16.tgz", - "integrity": "sha512-xJ7OH/nanouJO9pf03YsL9NAFQBHd8AqfrQd7Pf5laGyyTt/gToul6QYOA/i5i/q8y9iaM5DQFNTgpi995VkOg==", + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.17.tgz", + "integrity": "sha512-FNZw7H3aqhF9OyRQbDDnzUApDXfC1N6fgBhkqEO2jvYCJ+DxMTfZVqg3AX0R1khg1wHTBRD5SdcibSJ+XF6bFg==", "dev": true, "optional": true }, @@ -6399,11 +6393,6 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "@jsdevtools/ono": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", - "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==" - }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -6497,15 +6486,15 @@ "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==" }, "@typescript-eslint/eslint-plugin": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.58.0.tgz", - "integrity": "sha512-vxHvLhH0qgBd3/tW6/VccptSfc8FxPQIkmNTVLWcCOVqSBvqpnKkBTYrhcGlXfSnd78azwe+PsjYFj0X34/njA==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.0.tgz", + "integrity": "sha512-p0QgrEyrxAWBecR56gyn3wkG15TJdI//eetInP3zYRewDh0XS+DhB3VUAd3QqvziFsfaQIoIuZMxZRB7vXYaYw==", "dev": true, "requires": { "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.58.0", - "@typescript-eslint/type-utils": "5.58.0", - "@typescript-eslint/utils": "5.58.0", + "@typescript-eslint/scope-manager": "5.59.0", + "@typescript-eslint/type-utils": "5.59.0", + "@typescript-eslint/utils": "5.59.0", "debug": "^4.3.4", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", @@ -6515,53 +6504,53 @@ } }, "@typescript-eslint/parser": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.58.0.tgz", - "integrity": "sha512-ixaM3gRtlfrKzP8N6lRhBbjTow1t6ztfBvQNGuRM8qH1bjFFXIJ35XY+FC0RRBKn3C6cT+7VW1y8tNm7DwPHDQ==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.0.tgz", + "integrity": "sha512-qK9TZ70eJtjojSUMrrEwA9ZDQ4N0e/AuoOIgXuNBorXYcBDk397D2r5MIe1B3cok/oCtdNC5j+lUUpVB+Dpb+w==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.58.0", - "@typescript-eslint/types": "5.58.0", - "@typescript-eslint/typescript-estree": "5.58.0", + "@typescript-eslint/scope-manager": "5.59.0", + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/typescript-estree": "5.59.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.58.0.tgz", - "integrity": "sha512-b+w8ypN5CFvrXWQb9Ow9T4/6LC2MikNf1viLkYTiTbkQl46CnR69w7lajz1icW0TBsYmlpg+mRzFJ4LEJ8X9NA==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.0.tgz", + "integrity": "sha512-tsoldKaMh7izN6BvkK6zRMINj4Z2d6gGhO2UsI8zGZY3XhLq1DndP3Ycjhi1JwdwPRwtLMW4EFPgpuKhbCGOvQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.58.0", - "@typescript-eslint/visitor-keys": "5.58.0" + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/visitor-keys": "5.59.0" } }, "@typescript-eslint/type-utils": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.58.0.tgz", - "integrity": "sha512-FF5vP/SKAFJ+LmR9PENql7fQVVgGDOS+dq3j+cKl9iW/9VuZC/8CFmzIP0DLKXfWKpRHawJiG70rVH+xZZbp8w==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.0.tgz", + "integrity": "sha512-d/B6VSWnZwu70kcKQSCqjcXpVH+7ABKH8P1KNn4K7j5PXXuycZTPXF44Nui0TEm6rbWGi8kc78xRgOC4n7xFgA==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "5.58.0", - "@typescript-eslint/utils": "5.58.0", + "@typescript-eslint/typescript-estree": "5.59.0", + "@typescript-eslint/utils": "5.59.0", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.58.0.tgz", - "integrity": "sha512-JYV4eITHPzVQMnHZcYJXl2ZloC7thuUHrcUmxtzvItyKPvQ50kb9QXBkgNAt90OYMqwaodQh2kHutWZl1fc+1g==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.0.tgz", + "integrity": "sha512-yR2h1NotF23xFFYKHZs17QJnB51J/s+ud4PYU4MqdZbzeNxpgUr05+dNeCN/bb6raslHvGdd6BFCkVhpPk/ZeA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.58.0.tgz", - "integrity": "sha512-cRACvGTodA+UxnYM2uwA2KCwRL7VAzo45syNysqlMyNyjw0Z35Icc9ihPJZjIYuA5bXJYiJ2YGUB59BqlOZT1Q==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.0.tgz", + "integrity": "sha512-sUNnktjmI8DyGzPdZ8dRwW741zopGxltGs/SAPgGL/AAgDpiLsCFLcMNSpbfXfmnNeHmK9h3wGmCkGRGAoUZAg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.58.0", - "@typescript-eslint/visitor-keys": "5.58.0", + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/visitor-keys": "5.59.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -6592,28 +6581,28 @@ } }, "@typescript-eslint/utils": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.58.0.tgz", - "integrity": "sha512-gAmLOTFXMXOC+zP1fsqm3VceKSBQJNzV385Ok3+yzlavNHZoedajjS4UyS21gabJYcobuigQPs/z71A9MdJFqQ==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.0.tgz", + "integrity": "sha512-GGLFd+86drlHSvPgN/el6dRQNYYGOvRSDVydsUaQluwIW3HvbXuxyuD5JETvBt/9qGYe+lOrDk6gRrWOHb/FvA==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.58.0", - "@typescript-eslint/types": "5.58.0", - "@typescript-eslint/typescript-estree": "5.58.0", + "@typescript-eslint/scope-manager": "5.59.0", + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/typescript-estree": "5.59.0", "eslint-scope": "^5.1.1", "semver": "^7.3.7" } }, "@typescript-eslint/visitor-keys": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.58.0.tgz", - "integrity": "sha512-/fBraTlPj0jwdyTwLyrRTxv/3lnU2H96pNTVM6z3esTWLtA5MZ9ghSMJ7Rb+TtUAdtEw9EyJzJ0EydIMKxQ9gA==", + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.0.tgz", + "integrity": "sha512-qZ3iXxQhanchCeaExlKPV3gDQFxMUmU35xfd5eCXB6+kUw1TUAbIy2n7QIrwz9s98DQLzNWyHp61fY0da4ZcbA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.58.0", + "@typescript-eslint/types": "5.59.0", "eslint-visitor-keys": "^3.3.0" }, "dependencies": { @@ -7321,33 +7310,33 @@ } }, "esbuild": { - "version": "0.17.16", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.16.tgz", - "integrity": "sha512-aeSuUKr9aFVY9Dc8ETVELGgkj4urg5isYx8pLf4wlGgB0vTFjxJQdHnNH6Shmx4vYYrOTLCHtRI5i1XZ9l2Zcg==", - "dev": true, - "requires": { - "@esbuild/android-arm": "0.17.16", - "@esbuild/android-arm64": "0.17.16", - "@esbuild/android-x64": "0.17.16", - "@esbuild/darwin-arm64": "0.17.16", - "@esbuild/darwin-x64": "0.17.16", - "@esbuild/freebsd-arm64": "0.17.16", - "@esbuild/freebsd-x64": "0.17.16", - "@esbuild/linux-arm": "0.17.16", - "@esbuild/linux-arm64": "0.17.16", - "@esbuild/linux-ia32": "0.17.16", - "@esbuild/linux-loong64": "0.17.16", - "@esbuild/linux-mips64el": "0.17.16", - "@esbuild/linux-ppc64": "0.17.16", - "@esbuild/linux-riscv64": "0.17.16", - "@esbuild/linux-s390x": "0.17.16", - "@esbuild/linux-x64": "0.17.16", - "@esbuild/netbsd-x64": "0.17.16", - "@esbuild/openbsd-x64": "0.17.16", - "@esbuild/sunos-x64": "0.17.16", - "@esbuild/win32-arm64": "0.17.16", - "@esbuild/win32-ia32": "0.17.16", - "@esbuild/win32-x64": "0.17.16" + "version": "0.17.17", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.17.tgz", + "integrity": "sha512-/jUywtAymR8jR4qsa2RujlAF7Krpt5VWi72Q2yuLD4e/hvtNcFQ0I1j8m/bxq238pf3/0KO5yuXNpuLx8BE1KA==", + "dev": true, + "requires": { + "@esbuild/android-arm": "0.17.17", + "@esbuild/android-arm64": "0.17.17", + "@esbuild/android-x64": "0.17.17", + "@esbuild/darwin-arm64": "0.17.17", + "@esbuild/darwin-x64": "0.17.17", + "@esbuild/freebsd-arm64": "0.17.17", + "@esbuild/freebsd-x64": "0.17.17", + "@esbuild/linux-arm": "0.17.17", + "@esbuild/linux-arm64": "0.17.17", + "@esbuild/linux-ia32": "0.17.17", + "@esbuild/linux-loong64": "0.17.17", + "@esbuild/linux-mips64el": "0.17.17", + "@esbuild/linux-ppc64": "0.17.17", + "@esbuild/linux-riscv64": "0.17.17", + "@esbuild/linux-s390x": "0.17.17", + "@esbuild/linux-x64": "0.17.17", + "@esbuild/netbsd-x64": "0.17.17", + "@esbuild/openbsd-x64": "0.17.17", + "@esbuild/sunos-x64": "0.17.17", + "@esbuild/win32-arm64": "0.17.17", + "@esbuild/win32-ia32": "0.17.17", + "@esbuild/win32-x64": "0.17.17" } }, "escalade": { @@ -7582,9 +7571,9 @@ } }, "eslint-plugin-jsdoc": { - "version": "41.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-41.1.1.tgz", - "integrity": "sha512-dfH97DKLGtQ5dgEMzd+GSUuY+xX/yyAfjML3O0pEWmMMpylsG6Ro65s4ziYXKmixiENYK9CTQxCVRGqZUFN2Mw==", + "version": "41.1.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-41.1.2.tgz", + "integrity": "sha512-MePJXdGiPW7AG06CU5GbKzYtKpoHwTq1lKijjq+RwL/cQkZtBZ59Zbv5Ep0RVxSMnq6242249/n+w4XrTZ1Afg==", "dev": true, "requires": { "@es-joy/jsdoccomment": "~0.37.0", @@ -9175,9 +9164,9 @@ } }, "semver": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.4.0.tgz", - "integrity": "sha512-RgOxM8Mw+7Zus0+zcLEUn8+JfoLpj/huFTItQy2hsM4khuC1HYRDp0cU482Ewn/Fcy6bCjufD8vAj7voC66KQw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", "requires": { "lru-cache": "^6.0.0" }, diff --git a/package.json b/package.json index 7bac668..552611f 100644 --- a/package.json +++ b/package.json @@ -50,16 +50,16 @@ "@actions/core": "^1.10.0", "@types/command-line-args": "^5.0.0", "@types/node": "^18.15.11", - "@typescript-eslint/eslint-plugin": "^5.58.0", - "@typescript-eslint/parser": "^5.58.0", + "@typescript-eslint/eslint-plugin": "^5.59.0", + "@typescript-eslint/parser": "^5.59.0", "@vitest/coverage-istanbul": "^0.30.1", "concurrently": "^8.0.1", - "esbuild": "0.17.16", + "esbuild": "0.17.17", "eslint": "^8.38.0", "eslint-config-prettier": "^8.8.0", "eslint-import-resolver-typescript": "^3.5.5", "eslint-plugin-import": "npm:eslint-plugin-i@^2.27.5-1", - "eslint-plugin-jsdoc": "^41.1.1", + "eslint-plugin-jsdoc": "^41.1.2", "eslint-plugin-n": "^15.7.0", "eslint-plugin-promise": "^6.1.1", "eslint-plugin-sonarjs": "^0.19.0", @@ -72,9 +72,8 @@ "vitest": "^0.30.1" }, "dependencies": { - "@jsdevtools/ono": "^7.1.3", "@types/semver": "^7.3.13", "command-line-args": "^5.1.1", - "semver": "^7.4.0" + "semver": "^7.5.0" } } From 18f4a9dc45bb9b7b603523bc7084dbf436614aeb Mon Sep 17 00:00:00 2001 From: Michael Cousins Date: Mon, 17 Apr 2023 17:43:35 -0400 Subject: [PATCH 16/36] wip: simplify normalized options --- README.md | 20 ++-- dist/main.js | 108 +++++++++--------- src/__tests__/compare-versions.test.ts | 20 ++-- src/__tests__/normalize-options.test.ts | 72 ++++++------ src/__tests__/npm-publish.test.ts | 49 ++++---- src/action/__tests__/run.test.ts | 7 +- src/action/run.ts | 1 + src/compare-versions.ts | 8 +- src/format-publish-result.ts | 8 +- src/normalize-options.ts | 43 +++---- src/npm-publish.ts | 22 ++-- .../__tests__/get-publish-arguments.test.ts | 7 +- src/npm/__tests__/npm.test.ts | 23 +--- src/npm/get-publish-arguments.ts | 12 +- src/npm/index.ts | 27 ++--- src/npm/use-npm-environment.ts | 18 +-- src/options.ts | 7 ++ 17 files changed, 222 insertions(+), 230 deletions(-) diff --git a/README.md b/README.md index f3f5a35..93ded12 100644 --- a/README.md +++ b/README.md @@ -131,15 +131,17 @@ As shown in the example above, you should pass an options object to the `npmPubl import type { Options } from "@jsdevtools/npm-publish"; ``` -| Name | Type | Default | Description | -| ---------- | ---------------------- | ------------------------------ | ----------------------------------------------------------------------------- | -| `token` | string | **required** | The authentication token to use with npm. | -| `registry` | string, `URL` | `https://registry.npmjs.org/` | The registry URL to read and write to. | -| `package` | string | Current working directory | The path to the package or its package.json file. | -| `tag` | string | `latest` | The [distribution tag][npm-tag] to publish to. | -| `access` | `public`, `restricted` | [Use npm defaults][npm-access] | Whether the package should be publicly visible or restricted. | -| `strategy` | `all`, `upgrade` | `all` | Use `all` to publish all unique versions, `upgrade` for only semver upgrades. | -| `dryRun` | boolean | `false` | Run `npm publish` with the `--dry-run` flag to prevent publication. | +| Name | Type | Default | Description | +| -------------------- | ---------------------- | ------------------------------ | ----------------------------------------------------------------------------- | +| `token` | string | **required** | The authentication token to use with npm. | +| `registry` | string, `URL` | `https://registry.npmjs.org/` | The registry URL to read and write to. | +| `package` | string | Current working directory | The path to the package or its package.json file. | +| `tag` | string | `latest` | The [distribution tag][npm-tag] to publish to. | +| `access` | `public`, `restricted` | [Use npm defaults][npm-access] | Whether the package should be publicly visible or restricted. | +| `strategy` | `all`, `upgrade` | `all` | Use `all` to publish all unique versions, `upgrade` for only semver upgrades. | +| `dryRun` | boolean | `false` | Run `npm publish` with the `--dry-run` flag to prevent publication. | +| `logger` | object | `undefined` | A logging interface with `debug`, `info`, and `error` log methods. | +| `temporaryDirectory` | string | `os.tmpdir()` | A temporary directory to hold a generated `.npmrc` file | ### Output diff --git a/dist/main.js b/dist/main.js index f7e46ce..077ab22 100644 --- a/dist/main.js +++ b/dist/main.js @@ -2507,11 +2507,11 @@ var require_command = __commonJS({ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.issue = exports.issueCommand = void 0; - var os4 = __importStar(require("os")); + var os5 = __importStar(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os4.EOL); + process.stdout.write(cmd.toString() + os5.EOL); } exports.issueCommand = issueCommand; function issue(name, message = "") { @@ -2928,7 +2928,7 @@ var require_file_command = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; var fs3 = __importStar(require("fs")); - var os4 = __importStar(require("os")); + var os5 = __importStar(require("os")); var uuid_1 = (init_esm_node(), __toCommonJS(esm_node_exports)); var utils_1 = require_utils(); function issueFileCommand(command, message) { @@ -2939,7 +2939,7 @@ var require_file_command = __commonJS({ if (!fs3.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs3.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os4.EOL}`, { + fs3.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os5.EOL}`, { encoding: "utf8" }); } @@ -2953,7 +2953,7 @@ var require_file_command = __commonJS({ if (convertedValue.includes(delimiter)) { throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return `${key}<<${delimiter}${os4.EOL}${convertedValue}${os4.EOL}${delimiter}`; + return `${key}<<${delimiter}${os5.EOL}${convertedValue}${os5.EOL}${delimiter}`; } exports.prepareKeyValueMessage = prepareKeyValueMessage; } @@ -4442,7 +4442,7 @@ var require_core = __commonJS({ var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os4 = __importStar(require("os")); + var os5 = __importStar(require("os")); var path3 = __importStar(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; @@ -4510,7 +4510,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); if (filePath) { return file_command_1.issueFileCommand("OUTPUT", file_command_1.prepareKeyValueMessage(name, value)); } - process.stdout.write(os4.EOL); + process.stdout.write(os5.EOL); command_1.issueCommand("set-output", { name }, utils_1.toCommandValue(value)); } exports.setOutput = setOutput2; @@ -4544,7 +4544,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports.notice = notice; function info(message) { - process.stdout.write(message + os4.EOL); + process.stdout.write(message + os5.EOL); } exports.info = info; function startGroup(name) { @@ -4759,6 +4759,7 @@ async function readManifest(packagePath) { } // src/normalize-options.ts +var import_node_os2 = __toESM(require("node:os")); var DEFAULT_REGISTRY = "https://registry.npmjs.org/"; var DEFAULT_TAG = "latest"; function normalizeOptions(options, manifest) { @@ -4767,16 +4768,14 @@ function normalizeOptions(options, manifest) { const defaultRegistry = ((_b = manifest.publishConfig) == null ? void 0 : _b.registry) ?? DEFAULT_REGISTRY; const defaultAccess = ((_c = manifest.publishConfig) == null ? void 0 : _c.access) ?? (manifest.scope === void 0 ? ACCESS_PUBLIC : void 0); return { - authConfig: { - token: setValue(options.token, "", validateToken), - registry: setValue(options.registry, defaultRegistry, validateRegistry) - }, - publishConfig: { - tag: setValue(options.tag, defaultTag, validateTag), - access: setValue(options.access, defaultAccess, validateAccess), - dryRun: setValue(options.dryRun, false, validateDryRun), - strategy: setValue(options.strategy, STRATEGY_ALL, validateStrategy) - } + token: validateToken(options.token), + registry: validateRegistry(options.registry ?? defaultRegistry), + tag: setValue(options.tag, defaultTag, validateTag), + access: setValue(options.access, defaultAccess, validateAccess), + dryRun: setValue(options.dryRun, false, validateDryRun), + strategy: setValue(options.strategy, STRATEGY_ALL, validateStrategy), + logger: options.logger, + temporaryDirectory: options.temporaryDirectory ?? import_node_os2.default.tmpdir() }; } var setValue = (value, defaultValue, validate2 = (_) => _) => ({ @@ -4817,24 +4816,26 @@ var validateStrategy = (value) => { // src/npm/use-npm-environment.ts var import_promises2 = __toESM(require("node:fs/promises")); -var import_node_os2 = __toESM(require("node:os")); +var import_node_os3 = __toESM(require("node:os")); var import_node_path2 = __toESM(require("node:path")); -async function useNpmEnvironment(auth, task) { - const { registry, token } = auth; +async function useNpmEnvironment(options, task) { + const { registry, token, logger: logger2, temporaryDirectory } = options; const npmrcDirectory = await import_promises2.default.mkdtemp( - import_node_path2.default.join(import_node_os2.default.tmpdir(), "npm-publish-") + import_node_path2.default.join(temporaryDirectory, "npm-publish-") ); const npmrc = import_node_path2.default.join(npmrcDirectory, ".npmrc"); const config = [ "; created by jsdevtools/npm-publish", - `//${registry.value.host}/:_authToken=\${NODE_AUTH_TOKEN}`, - `registry=${registry.value.href}`, + `//${registry.host}/:_authToken=\${NODE_AUTH_TOKEN}`, + `registry=${registry.href}`, "" - ].join(import_node_os2.default.EOL); + ].join(import_node_os3.default.EOL); await import_promises2.default.writeFile(npmrc, config, "utf8"); + logger2 == null ? void 0 : logger2.debug(`Temporary .npmrc created at ${npmrc} +${config}`); try { return await task({ - NODE_AUTH_TOKEN: token.value, + NODE_AUTH_TOKEN: token, npm_config_userconfig: npmrc }); } finally { @@ -4896,8 +4897,8 @@ async function callNpmCli(command, cliArguments, options = {}) { } // src/npm/get-publish-arguments.ts -function getPublishArguments(packageSpec, config) { - const { tag, access, dryRun } = config; +function getPublishArguments(packageSpec, options) { + const { tag, access, dryRun } = options; const publishArguments = []; if (packageSpec.length > 0) { publishArguments.push(packageSpec); @@ -4915,24 +4916,24 @@ function getPublishArguments(packageSpec, config) { } // src/npm/index.ts -async function getVersions(packageName, authConfig, logger2) { - return useNpmEnvironment(authConfig, (environment) => { +async function getVersions(packageName, options) { + return useNpmEnvironment(options, (environment) => { return callNpmCli( "view", [packageName, "dist-tags", "versions"], { - logger: logger2, + logger: options.logger, environment, ifError: { e404: { "dist-tags": {}, versions: [] } } } ); }); } -async function publish(packageSpec, publishConfig, authConfig, logger2) { - const publishArguments = getPublishArguments(packageSpec, publishConfig); - return useNpmEnvironment(authConfig, (environment) => { +async function publish(packageSpec, options) { + const publishArguments = getPublishArguments(packageSpec, options); + return useNpmEnvironment(options, (environment) => { return callNpmCli("publish", publishArguments, { - logger: logger2, + logger: options.logger, environment }); }); @@ -4942,9 +4943,9 @@ async function publish(packageSpec, publishConfig, authConfig, logger2) { var import_semver2 = __toESM(require_semver2()); var INITIAL = "initial"; var DIFFERENT = "different"; -function compareVersions(version2, publishedVersions, publishConfig) { +function compareVersions(version2, publishedVersions, options) { const { versions: existingVersions, "dist-tags": tags } = publishedVersions; - const { strategy, tag: publishTag } = publishConfig; + const { strategy, tag: publishTag } = options; const oldVersion = (0, import_semver2.valid)(tags[publishTag.value]) ?? void 0; const isUnique = !existingVersions.includes(version2); let type; @@ -4961,16 +4962,16 @@ function compareVersions(version2, publishedVersions, publishConfig) { } // src/format-publish-result.ts -var import_node_os3 = __toESM(require("node:os")); -function formatPublishResult(manifest, publishConfig, results) { +var import_node_os4 = __toESM(require("node:os")); +function formatPublishResult(manifest, options, results) { if (results === void 0) { return `\u{1F645}\u200D\u2640\uFE0F ${manifest.name}@${manifest.version} publish skipped.`; } return [ - `\u{1F4E6} ${results.id}${publishConfig.dryRun.value ? " (DRY RUN)" : ""}`, + `\u{1F4E6} ${results.id}${options.dryRun.value ? " (DRY RUN)" : ""}`, "=== Contents ===", ...results.files.map(({ path: path3, size }) => `${formatSize(size)} ${path3}`) - ].join(import_node_os3.default.EOL); + ].join(import_node_os4.default.EOL); } var formatSize = (size) => { if (size < 1e3) { @@ -4986,19 +4987,19 @@ var formatSize = (size) => { async function npmPublish(options) { var _a; const { packageSpec, manifest } = await readManifest(options.package); - const { authConfig, publishConfig } = normalizeOptions(options, manifest); - const publishedVersions = await getVersions(manifest.name, authConfig); + const normalizedOptions = normalizeOptions(options, manifest); + const publishedVersions = await getVersions(manifest.name, normalizedOptions); const versionComparison = compareVersions( manifest.version, publishedVersions, - publishConfig + normalizedOptions ); let publishResult; if (versionComparison.type !== void 0) { - publishResult = await publish(packageSpec, publishConfig, authConfig); + publishResult = await publish(packageSpec, normalizedOptions); } - (_a = options.logger) == null ? void 0 : _a.info( - formatPublishResult(manifest, publishConfig, publishResult) + (_a = normalizedOptions.logger) == null ? void 0 : _a.info( + formatPublishResult(manifest, normalizedOptions, publishResult) ); return { id: publishResult == null ? void 0 : publishResult.id, @@ -5006,11 +5007,11 @@ async function npmPublish(options) { version: manifest.version, type: versionComparison.type, oldVersion: versionComparison.oldVersion, - registry: authConfig.registry.value, - tag: publishConfig.tag.value, - access: publishConfig.access.value, - strategy: publishConfig.strategy.value, - dryRun: publishConfig.dryRun.value + registry: normalizedOptions.registry, + tag: normalizedOptions.tag.value, + access: normalizedOptions.access.value, + strategy: normalizedOptions.strategy.value, + dryRun: normalizedOptions.dryRun.value }; } @@ -5048,7 +5049,8 @@ async function run() { access: getInput("access"), strategy: getInput("strategy"), dryRun: getBooleanInput("dry-run"), - logger + logger, + temporaryDirectory: process.env["RUNNER_TEMP"] }; const results = await npmPublish(options); setOutput("id", results.id, ""); diff --git a/src/__tests__/compare-versions.test.ts b/src/__tests__/compare-versions.test.ts index 66b8145..334732a 100644 --- a/src/__tests__/compare-versions.test.ts +++ b/src/__tests__/compare-versions.test.ts @@ -1,14 +1,14 @@ import { describe, it, expect } from "vitest"; import * as subject from "../compare-versions.js"; -import type { PublishConfig } from "../normalize-options.js"; +import type { NormalizedOptions } from "../normalize-options.js"; describe("compareVersions", () => { it("should recognize initial release on a tag", () => { const result = subject.compareVersions( "0.0.0", { versions: [], "dist-tags": {} }, - { tag: { value: "next" } } as PublishConfig + { tag: { value: "next" } } as NormalizedOptions ); expect(result).toEqual({ @@ -21,7 +21,10 @@ describe("compareVersions", () => { const result = subject.compareVersions( "0.0.0", { versions: ["1.2.3", "4.5.6"], "dist-tags": { next: "1.2.3" } }, - { strategy: { value: "all" }, tag: { value: "next" } } as PublishConfig + { + strategy: { value: "all" }, + tag: { value: "next" }, + } as NormalizedOptions ); expect(result).toEqual({ @@ -37,7 +40,7 @@ describe("compareVersions", () => { { strategy: { value: "upgrade" }, tag: { value: "next" }, - } as PublishConfig + } as NormalizedOptions ); expect(result).toEqual({ @@ -50,7 +53,10 @@ describe("compareVersions", () => { const result = subject.compareVersions( "4.5.6", { versions: ["1.2.3", "4.5.6"], "dist-tags": { next: "4.5.6" } }, - { strategy: { value: "all" }, tag: { value: "next" } } as PublishConfig + { + strategy: { value: "all" }, + tag: { value: "next" }, + } as NormalizedOptions ); expect(result).toEqual({ @@ -66,7 +72,7 @@ describe("compareVersions", () => { { strategy: { value: "upgrade" }, tag: { value: "next" }, - } as PublishConfig + } as NormalizedOptions ); expect(result).toEqual({ @@ -82,7 +88,7 @@ describe("compareVersions", () => { { strategy: { value: "upgrade" }, tag: { value: "next" }, - } as PublishConfig + } as NormalizedOptions ); expect(result).toEqual({ diff --git a/src/__tests__/normalize-options.test.ts b/src/__tests__/normalize-options.test.ts index d8b103c..5650bc6 100644 --- a/src/__tests__/normalize-options.test.ts +++ b/src/__tests__/normalize-options.test.ts @@ -1,7 +1,9 @@ +import os from "node:os"; import { describe, it, expect } from "vitest"; import * as subject from "../normalize-options.js"; import * as errors from "../errors.js"; +import type { Logger } from "../options.js"; describe("normalizeOptions", () => { const manifest = { @@ -15,40 +17,20 @@ describe("normalizeOptions", () => { it("should set auth config defaults", () => { const result = subject.normalizeOptions({ token: "abc123" }, manifest); - expect(result.authConfig).toEqual({ - token: { value: "abc123", isDefault: false }, - registry: { - value: new URL("https://registry.npmjs.org/"), - isDefault: true, - }, + expect(result).toMatchObject({ + token: "abc123", + registry: new URL("https://registry.npmjs.org/"), }); }); it("should normalize registry URL", () => { const result = subject.normalizeOptions( - { token: "abc123", registry: "https://registry.npmjs.org/" }, - manifest - ); - - expect(result.authConfig).toMatchObject({ - registry: { - value: new URL("https://registry.npmjs.org/"), - isDefault: false, - }, - }); - }); - - it("should normalize custom registry URL", () => { - const result = subject.normalizeOptions( - { registry: "https://example.com", token: "abc123" }, + { token: "abc123", registry: "https://example.com" }, manifest ); - expect(result.authConfig).toMatchObject({ - registry: { - value: new URL("https://example.com"), - isDefault: false, - }, + expect(result).toMatchObject({ + registry: new URL("https://example.com"), }); }); @@ -63,11 +45,8 @@ describe("normalizeOptions", () => { } ); - expect(result.authConfig).toMatchObject({ - registry: { - value: new URL("https://example.com"), - isDefault: true, - }, + expect(result).toMatchObject({ + registry: new URL("https://example.com"), }); }); @@ -96,7 +75,7 @@ describe("normalizeOptions", () => { it("should set publish config defaults", () => { const result = subject.normalizeOptions({ token: "abc123" }, manifest); - expect(result.publishConfig).toEqual({ + expect(result).toMatchObject({ tag: { value: "latest", isDefault: true }, access: { value: "public", isDefault: true }, dryRun: { value: false, isDefault: true }, @@ -110,7 +89,7 @@ describe("normalizeOptions", () => { { ...manifest, scope: "@cool-scope" } ); - expect(result.publishConfig).toMatchObject({ + expect(result).toMatchObject({ access: { value: undefined, isDefault: true }, }); }); @@ -128,7 +107,7 @@ describe("normalizeOptions", () => { { ...manifest, scope: "@cool-scope" } ); - expect(result.publishConfig).toEqual({ + expect(result).toMatchObject({ tag: { value: "next", isDefault: false }, access: { value: "public", isDefault: false }, dryRun: { value: true, isDefault: false }, @@ -149,7 +128,7 @@ describe("normalizeOptions", () => { } ); - expect(result.publishConfig).toMatchObject({ + expect(result).toMatchObject({ tag: { value: "next", isDefault: true }, access: { value: "public", isDefault: true }, }); @@ -181,4 +160,27 @@ describe("normalizeOptions", () => { }).toThrow(errors.InvalidStrategyError); }); }); + + describe("runtime config", () => { + it("should have no logger and set a temporary directory by default", () => { + const result = subject.normalizeOptions({ token: "abc123" }, manifest); + + expect(result).toMatchObject({ + logger: undefined, + temporaryDirectory: os.tmpdir(), + }); + }); + + it("should pass through the logger and a temporary directory", () => { + const logger = { debug: (message) => void message } as Logger; + const temporaryDirectory = "/some/temp/dir"; + + const result = subject.normalizeOptions( + { token: "abc123", logger, temporaryDirectory }, + manifest + ); + + expect(result).toMatchObject({ logger, temporaryDirectory }); + }); + }); }); diff --git a/src/__tests__/npm-publish.test.ts b/src/__tests__/npm-publish.test.ts index 86a6cde..9779c78 100644 --- a/src/__tests__/npm-publish.test.ts +++ b/src/__tests__/npm-publish.test.ts @@ -6,8 +6,7 @@ import * as subject from "../npm-publish.js"; import { readManifest, type PackageManifest } from "../read-manifest.js"; import { normalizeOptions, - type AuthConfig, - type PublishConfig, + type NormalizedOptions, } from "../normalize-options.js"; import { getVersions, @@ -38,15 +37,13 @@ describe("npmPublish", () => { name: "cool-package", version: "1.2.3", } as PackageManifest; - const authConfig = { - registry: { value: new URL("http://example.com") }, - } as AuthConfig; - const publishConfig = { + const normalizedOptions = { + registry: new URL("http://example.com"), tag: { value: "latest" }, access: { value: "public" }, dryRun: { value: false }, strategy: { value: "upgrade" }, - } as PublishConfig; + } as NormalizedOptions; const versions: PublishedVersions = { "dist-tags": {}, versions: [] }; const comparison: VersionComparison = { type: "major", @@ -61,17 +58,14 @@ describe("npmPublish", () => { packageSpec, manifest, }); - td.when(normalizeOptions(options, manifest)).thenReturn({ - authConfig, - publishConfig, - }); - td.when(getVersions("cool-package", authConfig)).thenResolve(versions); - td.when(compareVersions("1.2.3", versions, publishConfig)).thenReturn( - comparison + td.when(normalizeOptions(options, manifest)).thenReturn(normalizedOptions); + td.when(getVersions("cool-package", normalizedOptions)).thenResolve( + versions ); - td.when(publish(packageSpec, publishConfig, authConfig)).thenResolve( - publishResult + td.when(compareVersions("1.2.3", versions, normalizedOptions)).thenReturn( + comparison ); + td.when(publish(packageSpec, normalizedOptions)).thenResolve(publishResult); const result = await subject.npmPublish(options); @@ -96,15 +90,13 @@ describe("npmPublish", () => { name: "cool-package", version: "1.2.3", } as PackageManifest; - const authConfig = { - registry: { value: new URL("http://example.com") }, - } as AuthConfig; - const publishConfig = { + const normalizedOptions = { + registry: new URL("http://example.com"), tag: { value: "latest" }, access: { value: "public" }, dryRun: { value: false }, strategy: { value: "upgrade" }, - } as PublishConfig; + } as NormalizedOptions; const versions: PublishedVersions = { "dist-tags": {}, versions: [] }; const comparison: VersionComparison = { type: undefined, @@ -115,18 +107,19 @@ describe("npmPublish", () => { packageSpec, manifest, }); - td.when(normalizeOptions(options, manifest)).thenReturn({ - authConfig, - publishConfig, - }); - td.when(getVersions("cool-package", authConfig)).thenResolve(versions); - td.when(compareVersions("1.2.3", versions, publishConfig)).thenReturn( + td.when(normalizeOptions(options, manifest)).thenReturn(normalizedOptions); + td.when(getVersions("cool-package", normalizedOptions)).thenResolve( + versions + ); + td.when(compareVersions("1.2.3", versions, normalizedOptions)).thenReturn( comparison ); const result = await subject.npmPublish(options); - td.verify(publish(packageSpec, publishConfig, authConfig), { times: 0 }); + td.verify(publish(packageSpec, normalizedOptions), { + times: 0, + }); expect(result).toEqual({ id: undefined, diff --git a/src/action/__tests__/run.test.ts b/src/action/__tests__/run.test.ts index 95ef30d..cdad8a0 100644 --- a/src/action/__tests__/run.test.ts +++ b/src/action/__tests__/run.test.ts @@ -1,4 +1,4 @@ -import { vi, describe, it, afterEach } from "vitest"; +import { vi, describe, it, beforeEach, afterEach } from "vitest"; import { imitateEsm, reset } from "testdouble-vitest"; import * as td from "testdouble"; @@ -10,6 +10,10 @@ vi.mock("../../index", () => imitateEsm("../../index")); vi.mock("../core", () => imitateEsm("../core")); describe("run", () => { + beforeEach(() => { + vi.stubEnv("RUNNER_TEMP", "/path/to/temp"); + }); + afterEach(() => { reset(); }); @@ -33,6 +37,7 @@ describe("run", () => { strategy: "all", dryRun: true, logger: core.logger, + temporaryDirectory: "/path/to/temp", }) ).thenResolve({ id: "cool-package@1.2.3", diff --git a/src/action/run.ts b/src/action/run.ts index de51d92..b1873bd 100644 --- a/src/action/run.ts +++ b/src/action/run.ts @@ -19,6 +19,7 @@ export async function run(): Promise { strategy: core.getInput("strategy"), dryRun: core.getBooleanInput("dry-run"), logger: core.logger, + temporaryDirectory: process.env["RUNNER_TEMP"], }; const results = await npmPublish(options); diff --git a/src/compare-versions.ts b/src/compare-versions.ts index b19973f..e62e9f7 100644 --- a/src/compare-versions.ts +++ b/src/compare-versions.ts @@ -6,7 +6,7 @@ import { } from "semver"; import { STRATEGY_ALL } from "./options.js"; -import type { PublishConfig } from "./normalize-options.js"; +import type { NormalizedOptions } from "./normalize-options.js"; import type { PublishedVersions } from "./npm/index.js"; export type ReleaseType = SemverReleaseType | typeof INITIAL | typeof DIFFERENT; @@ -24,16 +24,16 @@ const DIFFERENT = "different"; * * @param version The current package version. * @param publishedVersions The versions that have already been published. - * @param publishConfig Tag and version comparison strategy. + * @param options Configuration options * @returns The release type and previous version. */ export function compareVersions( version: string, publishedVersions: PublishedVersions, - publishConfig: PublishConfig + options: NormalizedOptions ): VersionComparison { const { versions: existingVersions, "dist-tags": tags } = publishedVersions; - const { strategy, tag: publishTag } = publishConfig; + const { strategy, tag: publishTag } = options; const oldVersion = semverValid(tags[publishTag.value]) ?? undefined; const isUnique = !existingVersions.includes(version); let type: ReleaseType | undefined; diff --git a/src/format-publish-result.ts b/src/format-publish-result.ts index ea05e7d..d7ce79b 100644 --- a/src/format-publish-result.ts +++ b/src/format-publish-result.ts @@ -2,19 +2,19 @@ import os from "node:os"; import type { PublishResult } from "./npm/index.js"; import type { PackageManifest } from "./read-manifest.js"; -import type { PublishConfig } from "./normalize-options.js"; +import type { NormalizedOptions } from "./normalize-options.js"; /** * Format publish results into a string. * * @param manifest Package manifest - * @param publishConfig Publish configuration. + * @param options Configuration options. * @param results Results from running npm publish. * @returns Formatted string. */ export function formatPublishResult( manifest: PackageManifest, - publishConfig: PublishConfig, + options: NormalizedOptions, results?: PublishResult ): string { if (results === undefined) { @@ -22,7 +22,7 @@ export function formatPublishResult( } return [ - `📦 ${results.id}${publishConfig.dryRun.value ? " (DRY RUN)" : ""}`, + `📦 ${results.id}${options.dryRun.value ? " (DRY RUN)" : ""}`, "=== Contents ===", ...results.files.map(({ path, size }) => `${formatSize(size)}\t${path}`), ].join(os.EOL); diff --git a/src/normalize-options.ts b/src/normalize-options.ts index 77ba380..a4db072 100644 --- a/src/normalize-options.ts +++ b/src/normalize-options.ts @@ -1,3 +1,5 @@ +import os from "node:os"; + import * as errors from "./errors.js"; import type { PackageManifest } from "./read-manifest.js"; import { @@ -8,35 +10,24 @@ import { type Access, type Strategy, type Options, + type Logger, } from "./options.js"; const DEFAULT_REGISTRY = "https://registry.npmjs.org/"; const DEFAULT_TAG = "latest"; /** - * Normalized and sanitized auth and publish configurations. + * Normalized and sanitized auth, publish, and runtime configurations. */ export interface NormalizedOptions { - authConfig: AuthConfig; - publishConfig: PublishConfig; -} - -/** - * Normalized and sanitized auth configuration. - */ -export interface AuthConfig { - registry: ConfigValue; - token: ConfigValue; -} - -/** - * Normalized and sanitized publish configuration. - */ -export interface PublishConfig { + registry: URL; + token: string; tag: ConfigValue; access: ConfigValue; dryRun: ConfigValue; strategy: ConfigValue; + logger: Logger | undefined; + temporaryDirectory: string; } /** @@ -67,16 +58,14 @@ export function normalizeOptions( (manifest.scope === undefined ? ACCESS_PUBLIC : undefined); return { - authConfig: { - token: setValue(options.token, "", validateToken), - registry: setValue(options.registry, defaultRegistry, validateRegistry), - }, - publishConfig: { - tag: setValue(options.tag, defaultTag, validateTag), - access: setValue(options.access, defaultAccess, validateAccess), - dryRun: setValue(options.dryRun, false, validateDryRun), - strategy: setValue(options.strategy, STRATEGY_ALL, validateStrategy), - }, + token: validateToken(options.token), + registry: validateRegistry(options.registry ?? defaultRegistry), + tag: setValue(options.tag, defaultTag, validateTag), + access: setValue(options.access, defaultAccess, validateAccess), + dryRun: setValue(options.dryRun, false, validateDryRun), + strategy: setValue(options.strategy, STRATEGY_ALL, validateStrategy), + logger: options.logger, + temporaryDirectory: options.temporaryDirectory ?? os.tmpdir(), }; } diff --git a/src/npm-publish.ts b/src/npm-publish.ts index e252421..325f05a 100644 --- a/src/npm-publish.ts +++ b/src/npm-publish.ts @@ -14,22 +14,22 @@ import type { Results } from "./results.js"; */ export async function npmPublish(options: Options): Promise { const { packageSpec, manifest } = await readManifest(options.package); - const { authConfig, publishConfig } = normalizeOptions(options, manifest); - const publishedVersions = await getVersions(manifest.name, authConfig); + const normalizedOptions = normalizeOptions(options, manifest); + const publishedVersions = await getVersions(manifest.name, normalizedOptions); const versionComparison = compareVersions( manifest.version, publishedVersions, - publishConfig + normalizedOptions ); let publishResult; if (versionComparison.type !== undefined) { - publishResult = await publish(packageSpec, publishConfig, authConfig); + publishResult = await publish(packageSpec, normalizedOptions); } - options.logger?.info( - formatPublishResult(manifest, publishConfig, publishResult) + normalizedOptions.logger?.info( + formatPublishResult(manifest, normalizedOptions, publishResult) ); return { @@ -38,10 +38,10 @@ export async function npmPublish(options: Options): Promise { version: manifest.version, type: versionComparison.type, oldVersion: versionComparison.oldVersion, - registry: authConfig.registry.value, - tag: publishConfig.tag.value, - access: publishConfig.access.value, - strategy: publishConfig.strategy.value, - dryRun: publishConfig.dryRun.value, + registry: normalizedOptions.registry, + tag: normalizedOptions.tag.value, + access: normalizedOptions.access.value, + strategy: normalizedOptions.strategy.value, + dryRun: normalizedOptions.dryRun.value, }; } diff --git a/src/npm/__tests__/get-publish-arguments.test.ts b/src/npm/__tests__/get-publish-arguments.test.ts index 9422220..73ed67e 100644 --- a/src/npm/__tests__/get-publish-arguments.test.ts +++ b/src/npm/__tests__/get-publish-arguments.test.ts @@ -1,6 +1,7 @@ import { describe, it, expect } from "vitest"; import * as subject from "../get-publish-arguments.js"; +import type { NormalizedOptions } from "../../normalize-options.js"; describe("getPublishArguments", () => { it("should add explicit arguments", () => { @@ -9,7 +10,7 @@ describe("getPublishArguments", () => { access: { value: "restricted", isDefault: false }, dryRun: { value: false, isDefault: false }, strategy: { value: "upgrade", isDefault: true }, - }); + } as NormalizedOptions); expect(result).toEqual([ "./cool-package", @@ -28,7 +29,7 @@ describe("getPublishArguments", () => { access: { value: "restricted", isDefault: true }, dryRun: { value: false, isDefault: true }, strategy: { value: "upgrade", isDefault: true }, - }); + } as NormalizedOptions); expect(result).toEqual(["./cool-package"]); }); @@ -39,7 +40,7 @@ describe("getPublishArguments", () => { access: { value: undefined, isDefault: false }, dryRun: { value: false, isDefault: false }, strategy: { value: "upgrade", isDefault: true }, - }); + } as NormalizedOptions); expect(result).toEqual([ "./cool-package", diff --git a/src/npm/__tests__/npm.test.ts b/src/npm/__tests__/npm.test.ts index e6d4c3c..cdb28d3 100644 --- a/src/npm/__tests__/npm.test.ts +++ b/src/npm/__tests__/npm.test.ts @@ -3,7 +3,7 @@ import { imitateEsm, reset } from "testdouble-vitest"; import * as td from "testdouble"; import type { Logger } from "../../options.js"; -import type { AuthConfig, PublishConfig } from "../../normalize-options.js"; +import type { NormalizedOptions } from "../../normalize-options.js"; import * as subject from "../index.js"; import { useNpmEnvironment, type NpmCliTask } from "../use-npm-environment.js"; @@ -17,12 +17,12 @@ vi.mock("../get-publish-arguments", () => ); describe("npm", () => { - const authConfig = { token: { value: "abc123" } } as AuthConfig; const environment = { foo: "bar" }; const logger = { debug: (message: string) => void message } as Logger; + const options = { token: "abc123", logger } as NormalizedOptions; beforeEach(() => { - td.when(useNpmEnvironment(authConfig, td.matchers.isA(Function))).thenDo( + td.when(useNpmEnvironment(options, td.matchers.isA(Function))).thenDo( (_: unknown, task: NpmCliTask) => task(environment) ); }); @@ -47,11 +47,7 @@ describe("npm", () => { versions: ["1.2.3", "4.5.6"], }); - const result = await subject.getVersions( - "@example/cool-package", - authConfig, - logger - ); + const result = await subject.getVersions("@example/cool-package", options); expect(result).toEqual({ "dist-tags": { latest: "1.2.3" }, @@ -60,9 +56,7 @@ describe("npm", () => { }); it("should publish a package", async () => { - const publishConfig = { tag: { value: "next" } } as PublishConfig; - - td.when(getPublishArguments("./package", publishConfig)).thenReturn([ + td.when(getPublishArguments("./package", options)).thenReturn([ "--tag", "next", ]); @@ -73,12 +67,7 @@ describe("npm", () => { }) ).thenResolve({ id: "@example/cool-package@1.2.3" }); - const result = await subject.publish( - "./package", - publishConfig, - authConfig, - logger - ); + const result = await subject.publish("./package", options); expect(result).toEqual({ id: "@example/cool-package@1.2.3" }); }); diff --git a/src/npm/get-publish-arguments.ts b/src/npm/get-publish-arguments.ts index 2399fb2..b191492 100644 --- a/src/npm/get-publish-arguments.ts +++ b/src/npm/get-publish-arguments.ts @@ -1,17 +1,17 @@ -import type { PublishConfig } from "../normalize-options.js"; +import type { NormalizedOptions } from "../normalize-options.js"; /** * Given a publish configuration, get the NPM CLI publish arguments. * - * @param packageSpec Package specification path - * @param config Publish configuration - * @returns Arguments to pass to the NPM CLI + * @param packageSpec Package specification path. + * @param options Publish configuration. + * @returns Arguments to pass to the NPM CLI. */ export function getPublishArguments( packageSpec: string, - config: PublishConfig + options: NormalizedOptions ): string[] { - const { tag, access, dryRun } = config; + const { tag, access, dryRun } = options; const publishArguments = []; if (packageSpec.length > 0) { diff --git a/src/npm/index.ts b/src/npm/index.ts index b0060ac..af18e91 100644 --- a/src/npm/index.ts +++ b/src/npm/index.ts @@ -1,5 +1,4 @@ -import type { Logger } from "../options.js"; -import type { AuthConfig, PublishConfig } from "../normalize-options.js"; +import type { NormalizedOptions } from "../normalize-options.js"; import { useNpmEnvironment } from "./use-npm-environment.js"; import { callNpmCli } from "./call-npm-cli.js"; import { getPublishArguments } from "./get-publish-arguments.js"; @@ -23,21 +22,19 @@ export interface PublishResult { * Get a package's published versions. * * @param packageName The name of the package to get published versions for. - * @param authConfig Registry and auth token. - * @param logger Optional logger. + * @param options Configuration options. * @returns All published versions and tags. */ export async function getVersions( packageName: string, - authConfig: AuthConfig, - logger?: Logger + options: NormalizedOptions ): Promise { - return useNpmEnvironment(authConfig, (environment) => { + return useNpmEnvironment(options, (environment) => { return callNpmCli( "view", [packageName, "dist-tags", "versions"], { - logger, + logger: options.logger, environment, ifError: { e404: { "dist-tags": {}, versions: [] } }, } @@ -49,22 +46,18 @@ export async function getVersions( * Publish a package. * * @param packageSpec Package specification to pass to npm. - * @param publishConfig Publish configuration. - * @param authConfig Registry and auth token. - * @param logger Optional logger. + * @param options Configuration options. * @returns Release metadata. */ export async function publish( packageSpec: string, - publishConfig: PublishConfig, - authConfig: AuthConfig, - logger?: Logger + options: NormalizedOptions ): Promise { - const publishArguments = getPublishArguments(packageSpec, publishConfig); + const publishArguments = getPublishArguments(packageSpec, options); - return useNpmEnvironment(authConfig, (environment) => { + return useNpmEnvironment(options, (environment) => { return callNpmCli("publish", publishArguments, { - logger, + logger: options.logger, environment, }); }); diff --git a/src/npm/use-npm-environment.ts b/src/npm/use-npm-environment.ts index 6445c9b..2a21612 100644 --- a/src/npm/use-npm-environment.ts +++ b/src/npm/use-npm-environment.ts @@ -2,7 +2,7 @@ import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; -import type { AuthConfig } from "../normalize-options.js"; +import type { NormalizedOptions } from "../normalize-options.js"; export type NpmCliEnvironment = Record; @@ -14,33 +14,35 @@ export type NpmCliTask = ( * Create a temporary .npmrc file with the given auth token, * and call a task with env vars set to use that .npmrc. * - * @param auth Registry and token. + * @param options Configuration options. * @param task A function called with the configured environment. * After the function resolves, the temporary .npmrc file will be removed. * @returns The resolved value of `task` */ export async function useNpmEnvironment( - auth: AuthConfig, + options: NormalizedOptions, task: NpmCliTask ): Promise { - const { registry, token } = auth; + const { registry, token, logger, temporaryDirectory } = options; const npmrcDirectory = await fs.mkdtemp( - path.join(os.tmpdir(), "npm-publish-") + path.join(temporaryDirectory, "npm-publish-") ); const npmrc = path.join(npmrcDirectory, ".npmrc"); const config = [ "; created by jsdevtools/npm-publish", - `//${registry.value.host}/:_authToken=\${NODE_AUTH_TOKEN}`, - `registry=${registry.value.href}`, + `//${registry.host}/:_authToken=\${NODE_AUTH_TOKEN}`, + `registry=${registry.href}`, "", ].join(os.EOL); await fs.writeFile(npmrc, config, "utf8"); + logger?.debug(`Temporary .npmrc created at ${npmrc}\n${config}`); + try { return await task({ - NODE_AUTH_TOKEN: token.value, + NODE_AUTH_TOKEN: token, npm_config_userconfig: npmrc, }); } finally { diff --git a/src/options.ts b/src/options.ts index 5f3454c..9102d44 100644 --- a/src/options.ts +++ b/src/options.ts @@ -96,4 +96,11 @@ export interface Options { * Optional logger. */ logger?: Logger | undefined; + + /** + * Temporary directory. + * + * Defaults to os.tmpdir() + */ + temporaryDirectory?: string | undefined; } From b7b2dc907829af411c5aef8b0c5e4cc802497e9d Mon Sep 17 00:00:00 2001 From: Michael Cousins Date: Tue, 18 Apr 2023 17:13:57 -0400 Subject: [PATCH 17/36] fixup: test improvements --- .eslintrc.yml | 2 + .prettierrc.yml | 3 + dist/main.js | 22 +- package-lock.json | 1034 ++++++++++++++++- package.json | 3 +- src/__tests__/format-publish-result.test.ts | 47 + .../__tests__/{run.test.ts => main.test.ts} | 35 +- src/action/core.ts | 27 +- src/action/main.ts | 33 +- src/action/run.ts | 37 - src/cli/index.ts | 4 +- src/cli/parse-cli-arguments.ts | 16 +- src/format-publish-result.ts | 2 +- src/normalize-options.ts | 12 +- src/npm-publish.ts | 2 +- src/npm/__tests__/use-npm-environment.test.ts | 51 + src/npm/call-npm-cli.ts | 8 +- src/npm/index.ts | 4 +- src/npm/use-npm-environment.ts | 10 +- src/options.ts | 42 +- src/read-manifest.ts | 12 +- src/results.ts | 50 +- 22 files changed, 1280 insertions(+), 176 deletions(-) create mode 100644 src/__tests__/format-publish-result.test.ts rename src/action/__tests__/{run.test.ts => main.test.ts} (67%) delete mode 100644 src/action/run.ts create mode 100644 src/npm/__tests__/use-npm-environment.test.ts diff --git a/.eslintrc.yml b/.eslintrc.yml index 53e7504..1e43d32 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -29,6 +29,7 @@ env: rules: unicorn/prefer-top-level-await: "off" + jsdoc/tag-lines: "off" overrides: - files: ["**/*.js"] @@ -38,6 +39,7 @@ overrides: - files: ["**/__tests__/**/*"] rules: + "@typescript-eslint/no-non-null-assertion": "off" "@typescript-eslint/no-unsafe-argument": "off" "@typescript-eslint/no-unsafe-assignment": "off" sonarjs/no-duplicate-string: "off" diff --git a/.prettierrc.yml b/.prettierrc.yml index e69de29..9698338 100644 --- a/.prettierrc.yml +++ b/.prettierrc.yml @@ -0,0 +1,3 @@ +plugins: + - prettier-plugin-jsdoc +tsdoc: true diff --git a/dist/main.js b/dist/main.js index 077ab22..2c5ee2a 100644 --- a/dist/main.js +++ b/dist/main.js @@ -4778,7 +4778,7 @@ function normalizeOptions(options, manifest) { temporaryDirectory: options.temporaryDirectory ?? import_node_os2.default.tmpdir() }; } -var setValue = (value, defaultValue, validate2 = (_) => _) => ({ +var setValue = (value, defaultValue, validate2) => ({ value: validate2(value ?? defaultValue), isDefault: value === void 0 }); @@ -4819,6 +4819,7 @@ var import_promises2 = __toESM(require("node:fs/promises")); var import_node_os3 = __toESM(require("node:os")); var import_node_path2 = __toESM(require("node:path")); async function useNpmEnvironment(options, task) { + var _a; const { registry, token, logger: logger2, temporaryDirectory } = options; const npmrcDirectory = await import_promises2.default.mkdtemp( import_node_path2.default.join(temporaryDirectory, "npm-publish-") @@ -4831,7 +4832,7 @@ async function useNpmEnvironment(options, task) { "" ].join(import_node_os3.default.EOL); await import_promises2.default.writeFile(npmrc, config, "utf8"); - logger2 == null ? void 0 : logger2.debug(`Temporary .npmrc created at ${npmrc} + (_a = logger2 == null ? void 0 : logger2.debug) == null ? void 0 : _a.call(logger2, `Temporary .npmrc created at ${npmrc} ${config}`); try { return await task({ @@ -4847,15 +4848,17 @@ ${config}`); var import_node_child_process = __toESM(require("node:child_process")); var JSON_MATCH_RE = /(\{[\s\S]*\})/mu; var execProcess = (command, environment = {}, logger2) => { - logger2 == null ? void 0 : logger2.debug(`Running command: ${command}`); + var _a; + (_a = logger2 == null ? void 0 : logger2.debug) == null ? void 0 : _a.call(logger2, `Running command: ${command}`); return new Promise((resolve) => { import_node_child_process.default.exec( command, { env: { ...process.env, ...environment } }, (error, stdout, stderr) => { - logger2 == null ? void 0 : logger2.debug(`exit code: ${(error == null ? void 0 : error.code) ?? 0}`); - logger2 == null ? void 0 : logger2.debug(`stdout: ${stdout.trim()}`); - logger2 == null ? void 0 : logger2.debug(`stderr: ${stderr.trim()}`); + var _a2, _b, _c; + (_a2 = logger2 == null ? void 0 : logger2.debug) == null ? void 0 : _a2.call(logger2, `exit code: ${(error == null ? void 0 : error.code) ?? 0}`); + (_b = logger2 == null ? void 0 : logger2.debug) == null ? void 0 : _b.call(logger2, `stdout: ${stdout.trim()}`); + (_c = logger2 == null ? void 0 : logger2.debug) == null ? void 0 : _c.call(logger2, `stderr: ${stderr.trim()}`); return resolve({ stdout: stdout.trim(), stderr: stderr.trim(), error }); } ); @@ -4980,12 +4983,12 @@ var formatSize = (size) => { if (size < 1e6) { return `${(size / 1e3).toFixed(1)} kB`; } - return `${(size / 1e6).toFixed(1)} mB`; + return `${(size / 1e6).toFixed(1)} MB`; }; // src/npm-publish.ts async function npmPublish(options) { - var _a; + var _a, _b; const { packageSpec, manifest } = await readManifest(options.package); const normalizedOptions = normalizeOptions(options, manifest); const publishedVersions = await getVersions(manifest.name, normalizedOptions); @@ -4998,7 +5001,8 @@ async function npmPublish(options) { if (versionComparison.type !== void 0) { publishResult = await publish(packageSpec, normalizedOptions); } - (_a = normalizedOptions.logger) == null ? void 0 : _a.info( + (_b = (_a = normalizedOptions.logger) == null ? void 0 : _a.info) == null ? void 0 : _b.call( + _a, formatPublishResult(manifest, normalizedOptions, publishResult) ); return { diff --git a/package-lock.json b/package-lock.json index 81b9bbb..3862608 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,12 +29,13 @@ "eslint-config-prettier": "^8.8.0", "eslint-import-resolver-typescript": "^3.5.5", "eslint-plugin-import": "npm:eslint-plugin-i@^2.27.5-1", - "eslint-plugin-jsdoc": "^41.1.2", + "eslint-plugin-jsdoc": "^43.0.5", "eslint-plugin-n": "^15.7.0", "eslint-plugin-promise": "^6.1.1", "eslint-plugin-sonarjs": "^0.19.0", "eslint-plugin-unicorn": "^46.0.0", "prettier": "^2.8.7", + "prettier-plugin-jsdoc": "^0.4.2", "rimraf": "^5.0.0", "testdouble": "^3.17.2", "testdouble-vitest": "^0.1.2", @@ -1088,12 +1089,36 @@ "integrity": "sha512-UuKzKpJJ/Ief6ufIaIzr3A/0XnluX7RvFgwkV89Yzvm77wCh1kFaFmqN8XEnGcN62EuHdedQjEMb8mYxFLGPyA==", "dev": true }, + "node_modules/@types/debug": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", + "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", + "dev": true, + "dependencies": { + "@types/ms": "*" + } + }, "node_modules/@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, + "node_modules/@types/mdast": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.11.tgz", + "integrity": "sha512-Y/uImid8aAwrEA24/1tcRZwpxX3pIFTSilcNDKSPn+Y2iDywSEachzRuvgAYYLR3wpGXAsMbv5lvKLDZLeYPAw==", + "dev": true, + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/ms": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==", + "dev": true + }, "node_modules/@types/node": { "version": "18.15.11", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz", @@ -1111,6 +1136,12 @@ "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==" }, + "node_modules/@types/unist": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", + "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==", + "dev": true + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "5.59.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.0.tgz", @@ -1657,6 +1688,12 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/binary-searching": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/binary-searching/-/binary-searching-2.0.5.tgz", + "integrity": "sha512-v4N2l3RxL+m4zDxyxz3Ne2aTmiPn8ZUpKFpdPtO+ItW1NcTCXA7JeHG5GMBSvoKSkQZ9ycS+EouDVxYB9ufKWA==", + "dev": true + }, "node_modules/blueimp-md5": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.19.0.tgz", @@ -1816,6 +1853,16 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/character-entities": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", + "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/check-error": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", @@ -2090,6 +2137,19 @@ } } }, + "node_modules/decode-named-character-reference": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz", + "integrity": "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==", + "dev": true, + "dependencies": { + "character-entities": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/deep-eql": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", @@ -2133,6 +2193,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/diff": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -2560,9 +2638,9 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "41.1.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-41.1.2.tgz", - "integrity": "sha512-MePJXdGiPW7AG06CU5GbKzYtKpoHwTq1lKijjq+RwL/cQkZtBZ59Zbv5Ep0RVxSMnq6242249/n+w4XrTZ1Afg==", + "version": "43.0.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-43.0.5.tgz", + "integrity": "sha512-4+hN5jrwcElXwK+J6GiUYbgHl+C063lu1gR2ajUA1L4bs+rBsAoV37dP2gISfqzoU83VsY1/sSD4wvH87JHCsQ==", "dev": true, "dependencies": { "@es-joy/jsdoccomment": "~0.37.0", @@ -2571,11 +2649,11 @@ "debug": "^4.3.4", "escape-string-regexp": "^4.0.0", "esquery": "^1.5.0", - "semver": "^7.3.8", + "semver": "^7.5.0", "spdx-expression-parse": "^3.0.1" }, "engines": { - "node": "^14 || ^16 || ^17 || ^18 || ^19" + "node": "^14 || ^16 || ^17 || ^18 || ^19 || ^20" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0" @@ -3892,6 +3970,15 @@ "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", "dev": true }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -4021,6 +4108,43 @@ "node": ">=8" } }, + "node_modules/mdast-util-from-markdown": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.0.tgz", + "integrity": "sha512-HN3W1gRIuN/ZW295c7zi7g9lVBllMgZE40RxCX37wrTPWXCWtpvOZdfnuK+1WNpvZje6XuJeI3Wnb4TJEUem+g==", + "dev": true, + "dependencies": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "decode-named-character-reference": "^1.0.0", + "mdast-util-to-string": "^3.1.0", + "micromark": "^3.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-decode-string": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "unist-util-stringify-position": "^3.0.0", + "uvu": "^0.5.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.2.0.tgz", + "integrity": "sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==", + "dev": true, + "dependencies": { + "@types/mdast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -4030,6 +4154,449 @@ "node": ">= 8" } }, + "node_modules/micromark": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-3.1.0.tgz", + "integrity": "sha512-6Mj0yHLdUZjHnOPgr5xfWIMqMWS12zDN6iws9SLuSz76W8jTtAv24MN4/CL7gJrl5vtxGInkkqDv/JIoRsQOvA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "@types/debug": "^4.0.0", + "debug": "^4.0.0", + "decode-named-character-reference": "^1.0.0", + "micromark-core-commonmark": "^1.0.1", + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-chunked": "^1.0.0", + "micromark-util-combine-extensions": "^1.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-encode": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-resolve-all": "^1.0.0", + "micromark-util-sanitize-uri": "^1.0.0", + "micromark-util-subtokenize": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.1", + "uvu": "^0.5.0" + } + }, + "node_modules/micromark-core-commonmark": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.0.6.tgz", + "integrity": "sha512-K+PkJTxqjFfSNkfAhp4GB+cZPfQd6dxtTXnf+RjZOV7T4EEXnvgzOcnp+eSTmpGk9d1S9sL6/lqrgSNn/s0HZA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "micromark-factory-destination": "^1.0.0", + "micromark-factory-label": "^1.0.0", + "micromark-factory-space": "^1.0.0", + "micromark-factory-title": "^1.0.0", + "micromark-factory-whitespace": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-chunked": "^1.0.0", + "micromark-util-classify-character": "^1.0.0", + "micromark-util-html-tag-name": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-resolve-all": "^1.0.0", + "micromark-util-subtokenize": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.1", + "uvu": "^0.5.0" + } + }, + "node_modules/micromark-factory-destination": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz", + "integrity": "sha512-eUBA7Rs1/xtTVun9TmV3gjfPz2wEwgK5R5xcbIM5ZYAtvGF6JkyaDsj0agx8urXnO31tEO6Ug83iVH3tdedLnw==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-factory-label": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-1.0.2.tgz", + "integrity": "sha512-CTIwxlOnU7dEshXDQ+dsr2n+yxpP0+fn271pu0bwDIS8uqfFcumXpj5mLn3hSC8iw2MUr6Gx8EcKng1dD7i6hg==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + } + }, + "node_modules/micromark-factory-space": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-1.0.0.tgz", + "integrity": "sha512-qUmqs4kj9a5yBnk3JMLyjtWYN6Mzfcx8uJfi5XAveBniDevmZasdGBba5b4QsvRcAkmvGo5ACmSUmyGiKTLZew==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-factory-title": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-1.0.2.tgz", + "integrity": "sha512-zily+Nr4yFqgMGRKLpTVsNl5L4PMu485fGFDOQJQBl2NFpjGte1e86zC0da93wf97jrc4+2G2GQudFMHn3IX+A==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + } + }, + "node_modules/micromark-factory-whitespace": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-1.0.0.tgz", + "integrity": "sha512-Qx7uEyahU1lt1RnsECBiuEbfr9INjQTGa6Err+gF3g0Tx4YEviPbqqGKNv/NrBaE7dVHdn1bVZKM/n5I/Bak7A==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-character": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-1.1.0.tgz", + "integrity": "sha512-agJ5B3unGNJ9rJvADMJ5ZiYjBRyDpzKAOk01Kpi1TKhlT1APx3XZk6eN7RtSz1erbWHC2L8T3xLZ81wdtGRZzg==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-chunked": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-1.0.0.tgz", + "integrity": "sha512-5e8xTis5tEZKgesfbQMKRCyzvffRRUX+lK/y+DvsMFdabAicPkkZV6gO+FEWi9RfuKKoxxPwNL+dFF0SMImc1g==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-classify-character": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-1.0.0.tgz", + "integrity": "sha512-F8oW2KKrQRb3vS5ud5HIqBVkCqQi224Nm55o5wYLzY/9PwHGXC01tr3d7+TqHHz6zrKQ72Okwtvm/xQm6OVNZA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-combine-extensions": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.0.0.tgz", + "integrity": "sha512-J8H058vFBdo/6+AsjHp2NF7AJ02SZtWaVUjsayNFeAiydTxUwViQPxN0Hf8dp4FmCQi0UUFovFsEyRSUmFH3MA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-chunked": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-decode-numeric-character-reference": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.0.0.tgz", + "integrity": "sha512-OzO9AI5VUtrTD7KSdagf4MWgHMtET17Ua1fIpXTpuhclCqD8egFWo85GxSGvxgkGS74bEahvtM0WP0HjvV0e4w==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-decode-string": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-1.0.2.tgz", + "integrity": "sha512-DLT5Ho02qr6QWVNYbRZ3RYOSSWWFuH3tJexd3dgN1odEuPNxCngTCXJum7+ViRAd9BbdxCvMToPOD/IvVhzG6Q==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-encode": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-1.0.1.tgz", + "integrity": "sha512-U2s5YdnAYexjKDel31SVMPbfi+eF8y1U4pfiRW/Y8EFVCy/vgxk/2wWTxzcqE71LHtCuCzlBDRU2a5CQ5j+mQA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromark-util-html-tag-name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.1.0.tgz", + "integrity": "sha512-BKlClMmYROy9UiV03SwNmckkjn8QHVaWkqoAqzivabvdGcwNGMMMH/5szAnywmsTBUzDsU57/mFi0sp4BQO6dA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromark-util-normalize-identifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.0.0.tgz", + "integrity": "sha512-yg+zrL14bBTFrQ7n35CmByWUTFsgst5JhA4gJYoty4Dqzj4Z4Fr/DHekSS5aLfH9bdlfnSvKAWsAgJhIbogyBg==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-resolve-all": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-1.0.0.tgz", + "integrity": "sha512-CB/AGk98u50k42kvgaMM94wzBqozSzDDaonKU7P7jwQIuH2RU0TeBqGYJz2WY1UdihhjweivStrJ2JdkdEmcfw==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-types": "^1.0.0" + } + }, + "node_modules/micromark-util-sanitize-uri": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.1.0.tgz", + "integrity": "sha512-RoxtuSCX6sUNtxhbmsEFQfWzs8VN7cTctmBPvYivo98xb/kDEoTCtJQX5wyzIYEmk/lvNFTat4hL8oW0KndFpg==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^1.0.0", + "micromark-util-encode": "^1.0.0", + "micromark-util-symbol": "^1.0.0" + } + }, + "node_modules/micromark-util-subtokenize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-1.0.2.tgz", + "integrity": "sha512-d90uqCnXp/cy4G881Ub4psE57Sf8YD0pim9QdjCRNjfas2M1u6Lbt+XZK9gnHL2XFhnozZiEdCa9CNfXSfQ6xA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-chunked": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + } + }, + "node_modules/micromark-util-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-1.0.1.tgz", + "integrity": "sha512-oKDEMK2u5qqAptasDAwWDXq0tG9AssVwAx3E9bBF3t/shRIGsWIRG+cGafs2p/SnDSOecnt6hZPCE2o6lHfFmQ==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromark-util-types": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-1.0.2.tgz", + "integrity": "sha512-DCfg/T8fcrhrRKTPjRrw/5LLvdGV7BHySf/1LOZx7TzWZdYRjogNtyNq885z3nNallwr3QUKARjqvHqX1/7t+w==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, "node_modules/micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -4085,6 +4652,15 @@ "ufo": "^1.1.1" } }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -4472,6 +5048,23 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prettier-plugin-jsdoc": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/prettier-plugin-jsdoc/-/prettier-plugin-jsdoc-0.4.2.tgz", + "integrity": "sha512-w2jnAQm3z0GAG0bhzVJeehzDtrhGMSxJjit5ApCc2oxWfc7+jmLAkbtdOXaSpfwZz3IWkk+PiQPeRrLNpbM+Mw==", + "dev": true, + "dependencies": { + "binary-searching": "^2.0.5", + "comment-parser": "^1.3.1", + "mdast-util-from-markdown": "^1.2.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "prettier": ">=2.1.2" + } + }, "node_modules/pretty-format": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", @@ -4851,6 +5444,18 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/sade": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", + "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", + "dev": true, + "dependencies": { + "mri": "^1.1.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -5467,6 +6072,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -5476,6 +6094,24 @@ "punycode": "^2.1.0" } }, + "node_modules/uvu": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.5.6.tgz", + "integrity": "sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==", + "dev": true, + "dependencies": { + "dequal": "^2.0.0", + "diff": "^5.0.0", + "kleur": "^4.0.3", + "sade": "^1.7.3" + }, + "bin": { + "uvu": "bin.js" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -6462,12 +7098,36 @@ "integrity": "sha512-UuKzKpJJ/Ief6ufIaIzr3A/0XnluX7RvFgwkV89Yzvm77wCh1kFaFmqN8XEnGcN62EuHdedQjEMb8mYxFLGPyA==", "dev": true }, + "@types/debug": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", + "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", + "dev": true, + "requires": { + "@types/ms": "*" + } + }, "@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, + "@types/mdast": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.11.tgz", + "integrity": "sha512-Y/uImid8aAwrEA24/1tcRZwpxX3pIFTSilcNDKSPn+Y2iDywSEachzRuvgAYYLR3wpGXAsMbv5lvKLDZLeYPAw==", + "dev": true, + "requires": { + "@types/unist": "*" + } + }, + "@types/ms": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==", + "dev": true + }, "@types/node": { "version": "18.15.11", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz", @@ -6485,6 +7145,12 @@ "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==" }, + "@types/unist": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", + "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==", + "dev": true + }, "@typescript-eslint/eslint-plugin": { "version": "5.59.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.0.tgz", @@ -6848,6 +7514,12 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "binary-searching": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/binary-searching/-/binary-searching-2.0.5.tgz", + "integrity": "sha512-v4N2l3RxL+m4zDxyxz3Ne2aTmiPn8ZUpKFpdPtO+ItW1NcTCXA7JeHG5GMBSvoKSkQZ9ycS+EouDVxYB9ufKWA==", + "dev": true + }, "blueimp-md5": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.19.0.tgz", @@ -6954,6 +7626,12 @@ "supports-color": "^7.1.0" } }, + "character-entities": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", + "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", + "dev": true + }, "check-error": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", @@ -7156,6 +7834,15 @@ "ms": "2.1.2" } }, + "decode-named-character-reference": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz", + "integrity": "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==", + "dev": true, + "requires": { + "character-entities": "^2.0.0" + } + }, "deep-eql": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", @@ -7187,6 +7874,18 @@ "object-keys": "^1.1.1" } }, + "dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true + }, + "diff": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "dev": true + }, "dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -7571,9 +8270,9 @@ } }, "eslint-plugin-jsdoc": { - "version": "41.1.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-41.1.2.tgz", - "integrity": "sha512-MePJXdGiPW7AG06CU5GbKzYtKpoHwTq1lKijjq+RwL/cQkZtBZ59Zbv5Ep0RVxSMnq6242249/n+w4XrTZ1Afg==", + "version": "43.0.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-43.0.5.tgz", + "integrity": "sha512-4+hN5jrwcElXwK+J6GiUYbgHl+C063lu1gR2ajUA1L4bs+rBsAoV37dP2gISfqzoU83VsY1/sSD4wvH87JHCsQ==", "dev": true, "requires": { "@es-joy/jsdoccomment": "~0.37.0", @@ -7582,7 +8281,7 @@ "debug": "^4.3.4", "escape-string-regexp": "^4.0.0", "esquery": "^1.5.0", - "semver": "^7.3.8", + "semver": "^7.5.0", "spdx-expression-parse": "^3.0.1" } }, @@ -8469,6 +9168,12 @@ "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", "dev": true }, + "kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true + }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -8567,12 +9272,274 @@ "blueimp-md5": "^2.10.0" } }, + "mdast-util-from-markdown": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.0.tgz", + "integrity": "sha512-HN3W1gRIuN/ZW295c7zi7g9lVBllMgZE40RxCX37wrTPWXCWtpvOZdfnuK+1WNpvZje6XuJeI3Wnb4TJEUem+g==", + "dev": true, + "requires": { + "@types/mdast": "^3.0.0", + "@types/unist": "^2.0.0", + "decode-named-character-reference": "^1.0.0", + "mdast-util-to-string": "^3.1.0", + "micromark": "^3.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-decode-string": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "unist-util-stringify-position": "^3.0.0", + "uvu": "^0.5.0" + } + }, + "mdast-util-to-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.2.0.tgz", + "integrity": "sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==", + "dev": true, + "requires": { + "@types/mdast": "^3.0.0" + } + }, "merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true }, + "micromark": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-3.1.0.tgz", + "integrity": "sha512-6Mj0yHLdUZjHnOPgr5xfWIMqMWS12zDN6iws9SLuSz76W8jTtAv24MN4/CL7gJrl5vtxGInkkqDv/JIoRsQOvA==", + "dev": true, + "requires": { + "@types/debug": "^4.0.0", + "debug": "^4.0.0", + "decode-named-character-reference": "^1.0.0", + "micromark-core-commonmark": "^1.0.1", + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-chunked": "^1.0.0", + "micromark-util-combine-extensions": "^1.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-encode": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-resolve-all": "^1.0.0", + "micromark-util-sanitize-uri": "^1.0.0", + "micromark-util-subtokenize": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.1", + "uvu": "^0.5.0" + } + }, + "micromark-core-commonmark": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.0.6.tgz", + "integrity": "sha512-K+PkJTxqjFfSNkfAhp4GB+cZPfQd6dxtTXnf+RjZOV7T4EEXnvgzOcnp+eSTmpGk9d1S9sL6/lqrgSNn/s0HZA==", + "dev": true, + "requires": { + "decode-named-character-reference": "^1.0.0", + "micromark-factory-destination": "^1.0.0", + "micromark-factory-label": "^1.0.0", + "micromark-factory-space": "^1.0.0", + "micromark-factory-title": "^1.0.0", + "micromark-factory-whitespace": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-chunked": "^1.0.0", + "micromark-util-classify-character": "^1.0.0", + "micromark-util-html-tag-name": "^1.0.0", + "micromark-util-normalize-identifier": "^1.0.0", + "micromark-util-resolve-all": "^1.0.0", + "micromark-util-subtokenize": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.1", + "uvu": "^0.5.0" + } + }, + "micromark-factory-destination": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz", + "integrity": "sha512-eUBA7Rs1/xtTVun9TmV3gjfPz2wEwgK5R5xcbIM5ZYAtvGF6JkyaDsj0agx8urXnO31tEO6Ug83iVH3tdedLnw==", + "dev": true, + "requires": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "micromark-factory-label": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-1.0.2.tgz", + "integrity": "sha512-CTIwxlOnU7dEshXDQ+dsr2n+yxpP0+fn271pu0bwDIS8uqfFcumXpj5mLn3hSC8iw2MUr6Gx8EcKng1dD7i6hg==", + "dev": true, + "requires": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + } + }, + "micromark-factory-space": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-1.0.0.tgz", + "integrity": "sha512-qUmqs4kj9a5yBnk3JMLyjtWYN6Mzfcx8uJfi5XAveBniDevmZasdGBba5b4QsvRcAkmvGo5ACmSUmyGiKTLZew==", + "dev": true, + "requires": { + "micromark-util-character": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "micromark-factory-title": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-1.0.2.tgz", + "integrity": "sha512-zily+Nr4yFqgMGRKLpTVsNl5L4PMu485fGFDOQJQBl2NFpjGte1e86zC0da93wf97jrc4+2G2GQudFMHn3IX+A==", + "dev": true, + "requires": { + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + } + }, + "micromark-factory-whitespace": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-1.0.0.tgz", + "integrity": "sha512-Qx7uEyahU1lt1RnsECBiuEbfr9INjQTGa6Err+gF3g0Tx4YEviPbqqGKNv/NrBaE7dVHdn1bVZKM/n5I/Bak7A==", + "dev": true, + "requires": { + "micromark-factory-space": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "micromark-util-character": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-1.1.0.tgz", + "integrity": "sha512-agJ5B3unGNJ9rJvADMJ5ZiYjBRyDpzKAOk01Kpi1TKhlT1APx3XZk6eN7RtSz1erbWHC2L8T3xLZ81wdtGRZzg==", + "dev": true, + "requires": { + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "micromark-util-chunked": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-1.0.0.tgz", + "integrity": "sha512-5e8xTis5tEZKgesfbQMKRCyzvffRRUX+lK/y+DvsMFdabAicPkkZV6gO+FEWi9RfuKKoxxPwNL+dFF0SMImc1g==", + "dev": true, + "requires": { + "micromark-util-symbol": "^1.0.0" + } + }, + "micromark-util-classify-character": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-1.0.0.tgz", + "integrity": "sha512-F8oW2KKrQRb3vS5ud5HIqBVkCqQi224Nm55o5wYLzY/9PwHGXC01tr3d7+TqHHz6zrKQ72Okwtvm/xQm6OVNZA==", + "dev": true, + "requires": { + "micromark-util-character": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "micromark-util-combine-extensions": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.0.0.tgz", + "integrity": "sha512-J8H058vFBdo/6+AsjHp2NF7AJ02SZtWaVUjsayNFeAiydTxUwViQPxN0Hf8dp4FmCQi0UUFovFsEyRSUmFH3MA==", + "dev": true, + "requires": { + "micromark-util-chunked": "^1.0.0", + "micromark-util-types": "^1.0.0" + } + }, + "micromark-util-decode-numeric-character-reference": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.0.0.tgz", + "integrity": "sha512-OzO9AI5VUtrTD7KSdagf4MWgHMtET17Ua1fIpXTpuhclCqD8egFWo85GxSGvxgkGS74bEahvtM0WP0HjvV0e4w==", + "dev": true, + "requires": { + "micromark-util-symbol": "^1.0.0" + } + }, + "micromark-util-decode-string": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-1.0.2.tgz", + "integrity": "sha512-DLT5Ho02qr6QWVNYbRZ3RYOSSWWFuH3tJexd3dgN1odEuPNxCngTCXJum7+ViRAd9BbdxCvMToPOD/IvVhzG6Q==", + "dev": true, + "requires": { + "decode-named-character-reference": "^1.0.0", + "micromark-util-character": "^1.0.0", + "micromark-util-decode-numeric-character-reference": "^1.0.0", + "micromark-util-symbol": "^1.0.0" + } + }, + "micromark-util-encode": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-1.0.1.tgz", + "integrity": "sha512-U2s5YdnAYexjKDel31SVMPbfi+eF8y1U4pfiRW/Y8EFVCy/vgxk/2wWTxzcqE71LHtCuCzlBDRU2a5CQ5j+mQA==", + "dev": true + }, + "micromark-util-html-tag-name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.1.0.tgz", + "integrity": "sha512-BKlClMmYROy9UiV03SwNmckkjn8QHVaWkqoAqzivabvdGcwNGMMMH/5szAnywmsTBUzDsU57/mFi0sp4BQO6dA==", + "dev": true + }, + "micromark-util-normalize-identifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.0.0.tgz", + "integrity": "sha512-yg+zrL14bBTFrQ7n35CmByWUTFsgst5JhA4gJYoty4Dqzj4Z4Fr/DHekSS5aLfH9bdlfnSvKAWsAgJhIbogyBg==", + "dev": true, + "requires": { + "micromark-util-symbol": "^1.0.0" + } + }, + "micromark-util-resolve-all": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-1.0.0.tgz", + "integrity": "sha512-CB/AGk98u50k42kvgaMM94wzBqozSzDDaonKU7P7jwQIuH2RU0TeBqGYJz2WY1UdihhjweivStrJ2JdkdEmcfw==", + "dev": true, + "requires": { + "micromark-util-types": "^1.0.0" + } + }, + "micromark-util-sanitize-uri": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.1.0.tgz", + "integrity": "sha512-RoxtuSCX6sUNtxhbmsEFQfWzs8VN7cTctmBPvYivo98xb/kDEoTCtJQX5wyzIYEmk/lvNFTat4hL8oW0KndFpg==", + "dev": true, + "requires": { + "micromark-util-character": "^1.0.0", + "micromark-util-encode": "^1.0.0", + "micromark-util-symbol": "^1.0.0" + } + }, + "micromark-util-subtokenize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-1.0.2.tgz", + "integrity": "sha512-d90uqCnXp/cy4G881Ub4psE57Sf8YD0pim9QdjCRNjfas2M1u6Lbt+XZK9gnHL2XFhnozZiEdCa9CNfXSfQ6xA==", + "dev": true, + "requires": { + "micromark-util-chunked": "^1.0.0", + "micromark-util-symbol": "^1.0.0", + "micromark-util-types": "^1.0.0", + "uvu": "^0.5.0" + } + }, + "micromark-util-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-1.0.1.tgz", + "integrity": "sha512-oKDEMK2u5qqAptasDAwWDXq0tG9AssVwAx3E9bBF3t/shRIGsWIRG+cGafs2p/SnDSOecnt6hZPCE2o6lHfFmQ==", + "dev": true + }, + "micromark-util-types": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-1.0.2.tgz", + "integrity": "sha512-DCfg/T8fcrhrRKTPjRrw/5LLvdGV7BHySf/1LOZx7TzWZdYRjogNtyNq885z3nNallwr3QUKARjqvHqX1/7t+w==", + "dev": true + }, "micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -8616,6 +9583,12 @@ "ufo": "^1.1.1" } }, + "mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -8886,6 +9859,17 @@ "integrity": "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==", "dev": true }, + "prettier-plugin-jsdoc": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/prettier-plugin-jsdoc/-/prettier-plugin-jsdoc-0.4.2.tgz", + "integrity": "sha512-w2jnAQm3z0GAG0bhzVJeehzDtrhGMSxJjit5ApCc2oxWfc7+jmLAkbtdOXaSpfwZz3IWkk+PiQPeRrLNpbM+Mw==", + "dev": true, + "requires": { + "binary-searching": "^2.0.5", + "comment-parser": "^1.3.1", + "mdast-util-from-markdown": "^1.2.0" + } + }, "pretty-format": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", @@ -9137,6 +10121,15 @@ "queue-microtask": "^1.2.2" } }, + "sade": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", + "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", + "dev": true, + "requires": { + "mri": "^1.1.0" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -9607,6 +10600,15 @@ "which-boxed-primitive": "^1.0.2" } }, + "unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0" + } + }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -9616,6 +10618,18 @@ "punycode": "^2.1.0" } }, + "uvu": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.5.6.tgz", + "integrity": "sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==", + "dev": true, + "requires": { + "dequal": "^2.0.0", + "diff": "^5.0.0", + "kleur": "^4.0.3", + "sade": "^1.7.3" + } + }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", diff --git a/package.json b/package.json index 552611f..c8ab2a9 100644 --- a/package.json +++ b/package.json @@ -59,12 +59,13 @@ "eslint-config-prettier": "^8.8.0", "eslint-import-resolver-typescript": "^3.5.5", "eslint-plugin-import": "npm:eslint-plugin-i@^2.27.5-1", - "eslint-plugin-jsdoc": "^41.1.2", + "eslint-plugin-jsdoc": "^43.0.5", "eslint-plugin-n": "^15.7.0", "eslint-plugin-promise": "^6.1.1", "eslint-plugin-sonarjs": "^0.19.0", "eslint-plugin-unicorn": "^46.0.0", "prettier": "^2.8.7", + "prettier-plugin-jsdoc": "^0.4.2", "rimraf": "^5.0.0", "testdouble": "^3.17.2", "testdouble-vitest": "^0.1.2", diff --git a/src/__tests__/format-publish-result.test.ts b/src/__tests__/format-publish-result.test.ts new file mode 100644 index 0000000..7d2afb5 --- /dev/null +++ b/src/__tests__/format-publish-result.test.ts @@ -0,0 +1,47 @@ +import { describe, it, expect } from "vitest"; + +import * as subject from "../format-publish-result.js"; +import type { PackageManifest } from "../read-manifest.js"; +import type { NormalizedOptions } from "../normalize-options.js"; + +describe("formatPublishResult", () => { + it("should say if a publish was skipped", () => { + const result = subject.formatPublishResult( + { name: "cool-package", version: "1.2.3" } as PackageManifest, + {} as NormalizedOptions + ); + + expect(result).toMatch(/cool-package@1\.2\.3.+skipped/); + }); + + it("should say if a publish was a dry run", () => { + const result = subject.formatPublishResult( + { name: "cool-package", version: "1.2.3" } as PackageManifest, + { dryRun: { value: true } } as NormalizedOptions, + { id: "cool-package@1.2.3", files: [] } + ); + + expect(result).toMatch(/cool-package@1\.2\.3.+DRY RUN/); + }); + + it("should print files", () => { + const result = subject.formatPublishResult( + { name: "cool-package", version: "1.2.3" } as PackageManifest, + { dryRun: { value: false } } as NormalizedOptions, + { + id: "cool-package@1.2.3", + files: [ + { path: "cool-file-1", size: 1 }, + { path: "cool-file-2", size: 1234 }, + { path: "cool-file-3", size: 5_678_910 }, + ], + } + ); + + expect(result).not.toMatch(/DRY RUN/); + expect(result).toContain("cool-package@1.2.3"); + expect(result).toMatch(/1 B.+cool-file-1/); + expect(result).toMatch(/1.2 kB.+cool-file-2/); + expect(result).toMatch(/5.7 MB.+cool-file-3/); + }); +}); diff --git a/src/action/__tests__/run.test.ts b/src/action/__tests__/main.test.ts similarity index 67% rename from src/action/__tests__/run.test.ts rename to src/action/__tests__/main.test.ts index cdad8a0..ce27ebb 100644 --- a/src/action/__tests__/run.test.ts +++ b/src/action/__tests__/main.test.ts @@ -4,7 +4,6 @@ import * as td from "testdouble"; import { npmPublish } from "../../index.js"; import * as core from "../core.js"; -import * as subject from "../run.js"; vi.mock("../../index", () => imitateEsm("../../index")); vi.mock("../core", () => imitateEsm("../core")); @@ -15,6 +14,8 @@ describe("run", () => { }); afterEach(() => { + vi.unstubAllEnvs(); + vi.resetModules(); reset(); }); @@ -52,7 +53,7 @@ describe("run", () => { dryRun: false, }); - await subject.run(); + await import("../main.js"); td.verify(core.setOutput("id", "cool-package@1.2.3", "")); td.verify(core.setOutput("name", "cool-package")); @@ -65,4 +66,34 @@ describe("run", () => { td.verify(core.setOutput("strategy", "upgrade")); td.verify(core.setOutput("dry-run", false)); }); + + it("should fail the action if something raises", async () => { + const error = new Error("oh no"); + + td.when(core.getRequiredSecretInput("token")).thenReturn("abc123"); + td.when(core.getInput("package")).thenReturn("./package.json"); + td.when(core.getInput("registry")).thenReturn("https://example.com"); + td.when(core.getInput("tag")).thenReturn("next"); + td.when(core.getInput("access")).thenReturn("restricted"); + td.when(core.getInput("strategy")).thenReturn("all"); + td.when(core.getBooleanInput("dry-run")).thenReturn(true); + + td.when( + npmPublish({ + token: "abc123", + package: "./package.json", + registry: "https://example.com", + tag: "next", + access: "restricted", + strategy: "all", + dryRun: true, + logger: core.logger, + temporaryDirectory: "/path/to/temp", + }) + ).thenReject(error); + + await import("../main.js"); + + td.verify(core.setFailed(error), { times: 1 }); + }); }); diff --git a/src/action/core.ts b/src/action/core.ts index 8eb895d..737b845 100644 --- a/src/action/core.ts +++ b/src/action/core.ts @@ -1,10 +1,9 @@ -/** - * Wrapper module for @actions/core - */ +/** Wrapper module for @actions/core */ import { getInput as ghGetInput, setOutput as ghSetOutput, setSecret as ghSetSecret, + setFailed as ghSetFailed, debug as ghLogDebug, info as ghLogInfo, error as ghLogError, @@ -12,7 +11,12 @@ import { import type { Logger } from "../options.js"; -export { setFailed } from "@actions/core"; +/** Logger using the methods from @actions/core. */ +export const logger: Logger = { + debug: ghLogDebug, + info: ghLogInfo, + error: ghLogError, +}; /** * Get input by name. @@ -47,6 +51,15 @@ export function getBooleanInput(name: string): boolean { return ghGetInput(name) === "true"; } +/** + * Set the action as failed due to an error. + * + * @param error An value from a `catch` + */ +export function setFailed(error: unknown) { + ghSetFailed(error as Error); +} + /** * Set an output by name. * @@ -76,9 +89,3 @@ export function setOutput( ): void { ghSetOutput(name, value ?? defaultValue); } - -export const logger: Logger = { - debug: ghLogDebug, - info: ghLogInfo, - error: ghLogError, -}; diff --git a/src/action/main.ts b/src/action/main.ts index 069172a..b160ca5 100644 --- a/src/action/main.ts +++ b/src/action/main.ts @@ -1,4 +1,31 @@ -import { run } from "./run.js"; -import { setFailed } from "./core.js"; +/** Action entry point */ +import { npmPublish } from "../index.js"; +import * as core from "./core.js"; -run().catch((error: Error) => setFailed(error)); +/** Run the action. */ +async function run(): Promise { + const results = await npmPublish({ + token: core.getRequiredSecretInput("token"), + registry: core.getInput("registry"), + package: core.getInput("package"), + tag: core.getInput("tag"), + access: core.getInput("access"), + strategy: core.getInput("strategy"), + dryRun: core.getBooleanInput("dry-run"), + logger: core.logger, + temporaryDirectory: process.env["RUNNER_TEMP"], + }); + + core.setOutput("id", results.id, ""); + core.setOutput("name", results.name); + core.setOutput("version", results.version); + core.setOutput("type", results.type, ""); + core.setOutput("old-version", results.oldVersion, ""); + core.setOutput("registry", results.registry.href); + core.setOutput("tag", results.tag); + core.setOutput("access", results.access, "default"); + core.setOutput("strategy", results.strategy); + core.setOutput("dry-run", results.dryRun); +} + +run().catch((error: Error) => core.setFailed(error)); diff --git a/src/action/run.ts b/src/action/run.ts deleted file mode 100644 index b1873bd..0000000 --- a/src/action/run.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { - npmPublish, - type Access, - type Strategy, - type Options, -} from "../index.js"; -import * as core from "./core.js"; - -/** - * Run the action. - */ -export async function run(): Promise { - const options: Options = { - token: core.getRequiredSecretInput("token"), - registry: core.getInput("registry"), - package: core.getInput("package"), - tag: core.getInput("tag"), - access: core.getInput("access"), - strategy: core.getInput("strategy"), - dryRun: core.getBooleanInput("dry-run"), - logger: core.logger, - temporaryDirectory: process.env["RUNNER_TEMP"], - }; - - const results = await npmPublish(options); - - core.setOutput("id", results.id, ""); - core.setOutput("name", results.name); - core.setOutput("version", results.version); - core.setOutput("type", results.type, ""); - core.setOutput("old-version", results.oldVersion, ""); - core.setOutput("registry", results.registry.href); - core.setOutput("tag", results.tag); - core.setOutput("access", results.access, "default"); - core.setOutput("strategy", results.strategy); - core.setOutput("dry-run", results.dryRun); -} diff --git a/src/cli/index.ts b/src/cli/index.ts index ba91540..6a426a0 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -59,8 +59,8 @@ export async function main(argv: string[], version: string): Promise { const logger: Logger = { error: console.error, - info: cliArguments.quiet === false ? console.info : (m) => void m, - debug: cliArguments.debug === true ? console.debug : (m) => void m, + info: cliArguments.quiet === false ? console.info : undefined, + debug: cliArguments.debug === true ? console.debug : undefined, }; await npmPublish({ ...cliArguments.options, logger }); diff --git a/src/cli/parse-cli-arguments.ts b/src/cli/parse-cli-arguments.ts index 1d915d9..f98ea07 100644 --- a/src/cli/parse-cli-arguments.ts +++ b/src/cli/parse-cli-arguments.ts @@ -1,6 +1,4 @@ -/** - * Wrapper module for command-line-args - */ +/** Wrapper module for command-line-args */ import commandLineArgs from "command-line-args"; import type { Options } from "../options.js"; @@ -19,9 +17,7 @@ const ARGUMENTS_OPTIONS = [ { name: "help", alias: "h", type: Boolean }, ]; -/** - * The parsed command-line arguments - */ +/** The parsed command-line arguments */ export interface ParsedArguments { help?: boolean; version?: boolean; @@ -37,20 +33,16 @@ export interface ParsedArguments { * @returns A parsed object of options. */ export function parseCliArguments(argv: string[]): ParsedArguments { - const { help, version, quiet, debug, ...rawOptions } = commandLineArgs( + const { help, version, quiet, debug, ...options } = commandLineArgs( ARGUMENTS_OPTIONS, { argv, camelCase: true } ); - const options = Object.fromEntries( - Object.entries(rawOptions).map(([key, value]) => [key, value ?? undefined]) - ) as Options; - return { help: Boolean(help), version: Boolean(version), quiet: Boolean(quiet), debug: Boolean(debug), - options, + options: options as Options, }; } diff --git a/src/format-publish-result.ts b/src/format-publish-result.ts index d7ce79b..8d70be6 100644 --- a/src/format-publish-result.ts +++ b/src/format-publish-result.ts @@ -36,5 +36,5 @@ const formatSize = (size: number): string => { return `${(size / 1000).toFixed(1)} kB`; } - return `${(size / 1_000_000).toFixed(1)} mB`; + return `${(size / 1_000_000).toFixed(1)} MB`; }; diff --git a/src/normalize-options.ts b/src/normalize-options.ts index a4db072..8947225 100644 --- a/src/normalize-options.ts +++ b/src/normalize-options.ts @@ -16,9 +16,7 @@ import { const DEFAULT_REGISTRY = "https://registry.npmjs.org/"; const DEFAULT_TAG = "latest"; -/** - * Normalized and sanitized auth, publish, and runtime configurations. - */ +/** Normalized and sanitized auth, publish, and runtime configurations. */ export interface NormalizedOptions { registry: URL; token: string; @@ -30,9 +28,7 @@ export interface NormalizedOptions { temporaryDirectory: string; } -/** - * A config value, and whether that value differs from default. - */ +/** A config value, and whether that value differs from default. */ export interface ConfigValue { value: TValue; isDefault: boolean; @@ -71,8 +67,8 @@ export function normalizeOptions( const setValue = ( value: unknown, - defaultValue?: unknown, - validate: (value: unknown) => TValue = (_) => _ as TValue + defaultValue: unknown, + validate: (value: unknown) => TValue ): ConfigValue => ({ value: validate(value ?? defaultValue), isDefault: value === undefined, diff --git a/src/npm-publish.ts b/src/npm-publish.ts index 325f05a..ad5a071 100644 --- a/src/npm-publish.ts +++ b/src/npm-publish.ts @@ -28,7 +28,7 @@ export async function npmPublish(options: Options): Promise { publishResult = await publish(packageSpec, normalizedOptions); } - normalizedOptions.logger?.info( + normalizedOptions.logger?.info?.( formatPublishResult(manifest, normalizedOptions, publishResult) ); diff --git a/src/npm/__tests__/use-npm-environment.test.ts b/src/npm/__tests__/use-npm-environment.test.ts new file mode 100644 index 0000000..686039d --- /dev/null +++ b/src/npm/__tests__/use-npm-environment.test.ts @@ -0,0 +1,51 @@ +import fs from "node:fs/promises"; +import os from "node:os"; +import path from "node:path"; + +import { describe, beforeEach, afterEach, it, expect } from "vitest"; + +import type { NormalizedOptions } from "../../normalize-options.js"; +import * as subject from "../use-npm-environment.js"; + +describe("useNpmEnvironment", () => { + let directory: string; + + beforeEach(async () => { + directory = await fs.mkdtemp(path.join(os.tmpdir(), "read-manifest-test-")); + }); + + afterEach(async () => { + await fs.rm(directory, { recursive: true, force: true }); + }); + + it("create an npmrc file ", async () => { + let result: subject.NpmCliEnvironment | undefined; + let npmrcPath: string | undefined; + let npmrcContents: string | undefined; + + await subject.useNpmEnvironment( + { + token: "abc123", + registry: new URL("http://example.com/cool-registry/"), + temporaryDirectory: directory, + } as NormalizedOptions, + async (environment) => { + result = environment; + npmrcPath = result["npm_config_userconfig"]!; + npmrcContents = await fs.readFile(npmrcPath, "utf8"); + } + ); + + expect(result).toEqual({ + NODE_AUTH_TOKEN: "abc123", + npm_config_userconfig: npmrcPath, + }); + expect(npmrcContents).toContain( + "//example.com/:_authToken=${NODE_AUTH_TOKEN}" + ); + expect(npmrcContents).toContain( + "registry=http://example.com/cool-registry/" + ); + await expect(fs.access(npmrcPath!)).rejects.toThrow(/ENOENT/); + }); +}); diff --git a/src/npm/call-npm-cli.ts b/src/npm/call-npm-cli.ts index 2070d5d..d92163b 100644 --- a/src/npm/call-npm-cli.ts +++ b/src/npm/call-npm-cli.ts @@ -16,16 +16,16 @@ const execProcess = ( environment: Record = {}, logger?: Logger ): Promise<{ stdout: string; stderr: string; error: Error | null }> => { - logger?.debug(`Running command: ${command}`); + logger?.debug?.(`Running command: ${command}`); return new Promise((resolve) => { childProcess.exec( command, { env: { ...process.env, ...environment } }, (error, stdout, stderr) => { - logger?.debug(`exit code: ${error?.code ?? 0}`); - logger?.debug(`stdout: ${stdout.trim()}`); - logger?.debug(`stderr: ${stderr.trim()}`); + logger?.debug?.(`exit code: ${error?.code ?? 0}`); + logger?.debug?.(`stdout: ${stdout.trim()}`); + logger?.debug?.(`stderr: ${stderr.trim()}`); return resolve({ stdout: stdout.trim(), stderr: stderr.trim(), error }); } ); diff --git a/src/npm/index.ts b/src/npm/index.ts index af18e91..4d58656 100644 --- a/src/npm/index.ts +++ b/src/npm/index.ts @@ -19,7 +19,7 @@ export interface PublishResult { } /** - * Get a package's published versions. + * Get a package's published versions. * * @param packageName The name of the package to get published versions for. * @param options Configuration options. @@ -43,7 +43,7 @@ export async function getVersions( } /** - * Publish a package. + * Publish a package. * * @param packageSpec Package specification to pass to npm. * @param options Configuration options. diff --git a/src/npm/use-npm-environment.ts b/src/npm/use-npm-environment.ts index 2a21612..bc8f1f5 100644 --- a/src/npm/use-npm-environment.ts +++ b/src/npm/use-npm-environment.ts @@ -11,12 +11,12 @@ export type NpmCliTask = ( ) => Promise; /** - * Create a temporary .npmrc file with the given auth token, - * and call a task with env vars set to use that .npmrc. + * Create a temporary .npmrc file with the given auth token, and call a task + * with env vars set to use that .npmrc. * * @param options Configuration options. - * @param task A function called with the configured environment. - * After the function resolves, the temporary .npmrc file will be removed. + * @param task A function called with the configured environment. After the + * function resolves, the temporary .npmrc file will be removed. * @returns The resolved value of `task` */ export async function useNpmEnvironment( @@ -38,7 +38,7 @@ export async function useNpmEnvironment( await fs.writeFile(npmrc, config, "utf8"); - logger?.debug(`Temporary .npmrc created at ${npmrc}\n${config}`); + logger?.debug?.(`Temporary .npmrc created at ${npmrc}\n${config}`); try { return await task({ diff --git a/src/options.ts b/src/options.ts index 9102d44..72c83a8 100644 --- a/src/options.ts +++ b/src/options.ts @@ -1,6 +1,4 @@ -/** - * The possible access levels for an NPM package - */ +/** The possible access levels for an NPM package */ export type Access = typeof ACCESS_PUBLIC | typeof ACCESS_RESTRICTED; export const ACCESS_PUBLIC = "public"; export const ACCESS_RESTRICTED = "restricted"; @@ -8,31 +6,25 @@ export const ACCESS_RESTRICTED = "restricted"; /** * Version check strategy. * - * - `upgrade`: the package will only be published if its version - * is higher than the existing version on the configured tag. - * - `all`: the package will be published if its version - * is not yet published, even if its lower that the existing tag. + * - `upgrade`: the package will only be published if its version is higher than + * the existing version on the configured tag. + * - `all`: the package will be published if its version is not yet published, + * even if its lower that the existing tag. */ export type Strategy = typeof STRATEGY_UPGRADE | typeof STRATEGY_ALL; export const STRATEGY_UPGRADE = "upgrade"; export const STRATEGY_ALL = "all"; -/** - * An interface that can be used to log messages. - */ +/** An interface that can be used to log messages. */ export interface Logger { error: (message: string | Error) => void; - info: (message: string) => void; - debug: (message: string) => void; + info?: undefined | ((message: string) => void); + debug?: undefined | ((message: string) => void); } -/** - * Options that determine how/whether the package is published. - */ +/** Options that determine how/whether the package is published. */ export interface Options { - /** - * The NPM access token to use when publishing. - */ + /** The NPM access token to use when publishing. */ token: string; /** @@ -63,9 +55,9 @@ export interface Options { /** * Package access. * - * Determines whether the published package should be publicly visible, - * or restricted to members of your NPM organization. This only applies - * to scoped packages. + * Determines whether the published package should be publicly visible, or + * restricted to members of your NPM organization. This only applies to scoped + * packages. * * Defaults to "restricted" for scoped packages, unless that package has been * previously published as `public` @@ -78,8 +70,8 @@ export interface Options { * Version check strategy. * * If "upgrade" (default), the package will only be published if its version - * is higher than the existing version on the configured tag. If "always", - * the package will be published if its version is simply not yet published. + * is higher than the existing version on the configured tag. If "always", the + * package will be published if its version is simply not yet published. * * Defaults to `upgrade`. */ @@ -92,9 +84,7 @@ export interface Options { */ dryRun?: boolean | undefined; - /** - * Optional logger. - */ + /** Optional logger. */ logger?: Logger | undefined; /** diff --git a/src/read-manifest.ts b/src/read-manifest.ts index a080c04..0a7f0f2 100644 --- a/src/read-manifest.ts +++ b/src/read-manifest.ts @@ -4,17 +4,13 @@ import { valid as semverValid } from "semver"; import * as errors from "./errors.js"; -/** - * The result of reading a package manifest - */ +/** The result of reading a package manifest */ export interface ManifestReadResult { packageSpec: string; manifest: PackageManifest; } -/** - * A package manifest (package.json) - */ +/** A package manifest (package.json) */ export interface PackageManifest { name: string; version: string; @@ -22,9 +18,7 @@ export interface PackageManifest { publishConfig: PackagePublishConfig | undefined; } -/** - * Any publish configuration defined in package.json. - */ +/** Any publish configuration defined in package.json. */ export interface PackagePublishConfig { tag?: string; access?: string; diff --git a/src/results.ts b/src/results.ts index 5482ab1..9537a43 100644 --- a/src/results.ts +++ b/src/results.ts @@ -1,63 +1,45 @@ import type { Access, Strategy } from "./options.js"; import type { ReleaseType } from "./compare-versions.js"; -/** - * Results of the publish - */ +/** Results of the publish */ export interface Results { /** - * The identifier of the published package, if published. - * Format is `${packageName}@${version}` + * The identifier of the published package, if published. Format is + * `${packageName}@${version}` */ id: string | undefined; - /** - * The name of the NPM package that was published - */ + /** The name of the NPM package that was published */ name: string; - /** - * The version that was published - */ + /** The version that was published */ version: string; - /** - * The type of version change that occurred, if any. - */ + /** The type of version change that occurred, if any. */ type: ReleaseType | undefined; - /** - * The version number that was previously published to NPM, if any. - */ + /** The version number that was previously published to NPM, if any. */ oldVersion: string | undefined; - /** - * The registry where the package was published - */ + /** The registry where the package was published */ registry: URL; - /** - * The tag that the package was published to. - */ + /** The tag that the package was published to. */ tag: string; /** - * Indicates whether the published package is publicly visible - * or restricted to members of your NPM organization. + * Indicates whether the published package is publicly visible or restricted + * to members of your NPM organization. * - * If package is scoped, undefined means npm's scoped package defaults. - * If a scoped package has previously been published as public, - * the default is public. Otherwise, it is restricted. + * If package is scoped, undefined means npm's scoped package defaults. If a + * scoped package has previously been published as public, the default is + * public. Otherwise, it is restricted. */ access: Access | undefined; - /** - * Version check strategy used. - */ + /** Version check strategy used. */ strategy: Strategy; - /** - * Whether this was a dry run (not published to NPM) - */ + /** Whether this was a dry run (not published to NPM) */ dryRun: boolean; } From 28e946717590a841c8aa831f4c2518f8af4aa15d Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Tue, 18 Apr 2023 19:18:56 -0400 Subject: [PATCH 18/36] wip: revert docs changes for separate PR --- README.md | 193 +++++++++++++++++++++++++----------------------------- 1 file changed, 88 insertions(+), 105 deletions(-) diff --git a/README.md b/README.md index 93ded12..3f23b70 100644 --- a/README.md +++ b/README.md @@ -12,16 +12,16 @@ ## Features - 🧠 **Smart**
- Only publishes if the version number in `package.json` differs from the latest on NPM. + Only publishes if the version number in `package.json` differs from the latest on NPM - 🛠 **Configurable**
- Customize the version-checking behavior, the registry URL, and path of your package. + Customize the version-checking behavior, the registry URL, and path of your package - 🔐 **Secure**
- Keeps your NPM access token secret. Doesn't write it to `~/.npmrc`. + Keeps your NPM access token secret. Doesn't write it to `~/.npmrc` - ⚡ **Fast**
- 100% JavaScript (which is faster than Docker) and bundled to optimize loading time. + 100% JavaScript (which is faster than Docker) and bundled to optimize loading time - 📤 **Outputs**
Exposes the old and new version numbers, and the type of change (major, minor, patch, etc.) as variables that you can use in your workflow. @@ -58,26 +58,22 @@ jobs: token: ${{ secrets.NPM_TOKEN }} ``` -For security and safety, the `JS-DevTools/npm-publish` action uses a different, isolated configuration than calling `npm` directly. Auth settings for `npm` will not affect `npm-publish`, nor vice-versa. +## Input Parameters -### Usage +You can set any or all of the following input parameters: -You can set any or all of the following input parameters using `with`: +| Name | Type | Default | Description | +| ---------------------- | ------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `token` | string | **required** | The NPM auth token to use for publishing | +| `registry` | string | https://registry.npmjs.org/ | The NPM registry URL to use | +| `package` | string | ./package.json | The path of your package.json file | +| `tag` | string | "latest" | The tag to publish to. This allows people to install the package using `npm install @`. | +| `access` | string | "public" for non-scoped packages. "restricted" for scoped packages. | Determines whether the published package should be publicly visible, or restricted to members of your NPM organization. | +| `dry-run` | boolean | false | Run NPM publish with the `--dry-run` flag to prevent publication | +| `check-version` | boolean | true | Only publish to NPM if the version number in `package.json` differs from the latest on NPM | +| `greater-version-only` | boolean | false | Only publish to NPM if the version number in `package.json` is greater than the latest on NPM | -| Name | Type | Default | Description | -| ---------- | ---------------------- | ------------------------------ | ----------------------------------------------------------------------------- | -| `token` | string | **required** | The authentication token to use with npm. | -| `registry` | string | `https://registry.npmjs.org/` | The registry URL to read and write to. | -| `package` | string | Current working directory | The path to the package or its package.json file. | -| `tag` | string | `latest` | The [distribution tag][npm-tag] to publish to. | -| `access` | `public`, `restricted` | [Use npm defaults][npm-access] | Whether the package should be publicly visible or restricted. | -| `strategy` | `all`, `upgrade` | `all` | Use `all` to publish all unique versions, `upgrade` for only semver upgrades. | -| `dry-run` | boolean | `false` | Run `npm publish` with the `--dry-run` flag to prevent publication. | - -[npm-tag]: https://docs.npmjs.com/cli/v9/commands/npm-publish#tag -[npm-access]: https://docs.npmjs.com/cli/v9/commands/npm-publish#access - -### Output +## Output Variables npm-publish exposes some output variables, which you can use in later steps of your workflow. To access the output variables, you'll need to set an `id` for the npm-publish step. @@ -88,142 +84,129 @@ steps: with: token: ${{ secrets.NPM_TOKEN }} - - if: ${{ steps.publish.outputs.type }} + - if: steps.publish.outputs.type != 'none' run: | echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}" ``` -| Name | Type | Description | -| ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------ | -| `id` | string | Package identifier of the release: `${name}@${version}` or empty if no release. | -| `type` | string | Semver upgrade (`major`, `minor`, ...), `initial` if first release, `different` if other change, or empty if no release. | -| `name` | string | The name of the package. | -| `version` | string | The version of the package. | -| `old-version` | string | The previously published version on `tag` or empty if no previous version on tag. | -| `tag` | string | The [distribution tag][npm-tag] that the package was published to. | -| `access` | string | The [access level][npm-access] the package was published with, or `default` if scoped-package defaults were used. | -| `dry-run` | boolean | Indicates whether `npm publish` was run in "dry run" mode. | +| Variable | Type | Description | +| ------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | string | The type of version change that occurred ("major", "minor", "patch", etc.). If there was no version change, then type will be "none". If `greater-version-only` is set and the version is lower, then type will be "lower". | +| `version` | string | The version that was published | +| `old-version` | string | The version number that was previously published to NPM | +| `tag` | string | The tag that the package was published to. | +| `access` | string | Indicates whether the published package is publicly visible or restricted to members of your NPM organization. | +| `dry-run` | boolean | Indicates whether NPM was run in "dry run" mode | ## JavaScript Function -To use npm-package in your JavaScript code, you'll need to install it using [npm](https://docs.npmjs.com/about-npm/) or other package manager of choice: +To use npm-package in your JavaScript code, you'll need to install it using [NPM](https://docs.npmjs.com/about-npm/): ```bash -npm install --save-dev @jsdevtools/npm-publish +npm install @jsdevtools/npm-publish ``` You can then import it and use it in your code like this: ```javascript -import { npmPublish } from "@jsdevtools/npm-publish"; +const npmPublish = require("@jsdevtools/npm-publish"); // Run npm-publish with all defaults -await npmPublish({ token: "YOUR_NPM_AUTH_TOKEN_HERE" }); -``` - -For security and safety, the `npmPublish` function uses a different, isolated configuration than calling `npm` directly. Auth settings for `npm` will not affect `npmPublish`, nor vice-versa. +await npmPublish(); -### Usage - -As shown in the example above, you should pass an options object to the `npmPublish` function. In TypeScript, the `Options` interface is available as an import. - -```ts -import type { Options } from "@jsdevtools/npm-publish"; +// Run npm-publish with options +await npmPublish({ + package: "./path/to/package.json", + token: "YOUR_NPM_AUTH_TOKEN_HERE", +}); ``` -| Name | Type | Default | Description | -| -------------------- | ---------------------- | ------------------------------ | ----------------------------------------------------------------------------- | -| `token` | string | **required** | The authentication token to use with npm. | -| `registry` | string, `URL` | `https://registry.npmjs.org/` | The registry URL to read and write to. | -| `package` | string | Current working directory | The path to the package or its package.json file. | -| `tag` | string | `latest` | The [distribution tag][npm-tag] to publish to. | -| `access` | `public`, `restricted` | [Use npm defaults][npm-access] | Whether the package should be publicly visible or restricted. | -| `strategy` | `all`, `upgrade` | `all` | Use `all` to publish all unique versions, `upgrade` for only semver upgrades. | -| `dryRun` | boolean | `false` | Run `npm publish` with the `--dry-run` flag to prevent publication. | -| `logger` | object | `undefined` | A logging interface with `debug`, `info`, and `error` log methods. | -| `temporaryDirectory` | string | `os.tmpdir()` | A temporary directory to hold a generated `.npmrc` file | - -### Output - -The `npmPublish()` function returns a promise of a `Results` object. In TypeScript, the `Results` interface is available as an import. - -```ts -import type { Results } from "@jsdevtools/npm-publish"; -``` +### Options -| Name | Type | Description | -| ------------ | --------------- | ------------------------------------------------------------------------------------------------------------------------------ | -| `id` | Optional string | Package identifier of the release: `${name}@${version}` or `undefined` if no release. | -| `type` | Optional string | Semver upgrade (`major`, `minor`, ...), `initial` if first release, `different` if other change, or `undefined` if no release. | -| `name` | string | The name of the package. | -| `version` | string | The version of the package. | -| `oldVersion` | Optional string | The previously published version on `tag` or `undefined` if no previous version. | -| `tag` | string | The [distribution tag][npm-tag] that the package was published to. | -| `access` | Optional string | The [access level][npm-access] the package was published with, or `undefined` if scoped-package defaults were used. | -| `dryRun` | boolean | Indicates whether `npm publish` was run in "dry run" mode. | +As shown in the example above, you can pass options to the `npmPublish()` function. Here are the available options: + +| Name | Type | Default | Description | +| -------------------- | -------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `token` | string | NPM's default credentials | The NPM auth token to use for publishing. If not set, then NPM will | +| `registry` | string | https://registry.npmjs.org/ | The NPM registry URL to use | +| `package` | string | ./package.json | The path of your package.json file | +| `tag` | string | "latest" | The tag to publish to. This allows people to install the package using `npm install @`. | +| `access` | string | "public" for non-scoped packages. "restricted" for scoped packages. | Determines whether the published package should be publicly visible, or restricted to members of your NPM organization. | +| `dryRun` | boolean | false | Run NPM publish with the `--dry-run` flag to prevent publication | +| `checkVersion` | boolean | true | Only publish to NPM if the version number in `package.json` differs from the latest on NPM | +| `greaterVersionOnly` | boolean | false | Only publish to NPM if the version number in `package.json` is greater then the latest on NPM | +| `quiet` | boolean | false | Suppress console output from NPM and npm-publish | +| `debug` | function | no-op | A function to log debug messages. You can set this to a custom function to receive debug messages, or just set it to `console.debug` to print debug messages to the console. | + +### Return Value + +The `npmPublish()` function asynchronously returns an object with the following properties: + +| Name | Type | Description | +| ------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | string | The type of version change that occurred ("major", "minor", "patch", etc.) If there was no version change, then the the type is "none". If `greater-version-only` is set and the version is lower, then type will be "lower". | +| `package` | string | The name of the NPM package that was published | +| `version` | string | The version number that was published | +| `oldVersion` | string | The version number that was previously published to NPM | +| `tag` | string | The tag that the package was published to. | +| `access` | string | Indicates whether the published package is publicly visible or restricted to members of your NPM organization. | +| `dryRun` | boolean | Indicates whether NPM was run in "dry run" mode | ## Command Line Interface -You can also use `npm-publish` as a command-line tool in your terminal. +To use npm-package from as a command-line tool in your terminal, you'll need to install it globally using [NPM](https://docs.npmjs.com/about-npm/): ```bash -npm install --save-dev @jsdevtools/npm-publish +npm install -g @jsdevtools/npm-publish ``` -You can then use it in your terminal or in `npm run` scripts. +You can then use it in your terminal or in Bash scripts. You can call it without any arguments, and it will publish the current directory using NPM's default credentials. ```bash -npx npm-publish --token YOUR_NPM_AUTH_TOKEN_HERE +npm-publish ``` Or you can call it with arguments to explicitly set the NPM auth token, registry, package path, etc. ```bash -npm-publish --token YOUR_NPM_AUTH_TOKEN_HERE --package ./path/to/package +npm-publish --token=YOUR_NPM_AUTH_TOKEN_HERE ./path/to/package.json ``` -For security and safety, the `npm-publish` CLI uses a different, isolated configuration than calling `npm` directly. Auth settings for `npm` will not affect `npm-publish`, nor vice-versa. - ### Options Run `npm-publish --help` to see the full list of options available. ``` -Usage: - - npm-publish [package] +> npm-publish --help -Arguments: +Usage: npm-publish [options] [package_path] - package The path to the package to publish. - May be a directory or package.json file. - Defaults to the package in the current directory. +options: + --token The NPM access token to use when publishing -Options: + --registry The NPM registry URL to use - --token (Required) npm authentication token. + --tag The tag to publish to. Allows the package to be installed + using "npm install @" - --registry Registry to read from and write to. - Defaults to "https://registry.npmjs.org/". + --access "public" = The package will be publicly visible. + "restricted" = The package will only be visible to members + of your NPM organization. - --tag The distribution tag to check against and publish to. - Defaults to "latest". + --dry-run Don't actually publish to NPM, but report what would have + been published - --access Package access, may be "public" or "restricted". - See documentation for details. + --debug, -d Enable debug mode, with increased logging - --strategy Publish strategy, may be "all" or "upgrade". - Defaults to "all", see documentation for details. + --quiet, -q Suppress unnecessary output - --dry-run Do not actually publish anything. - --quiet Only print errors. - --debug Print debug logs. - -v, --version Print the version number. - -h --help Show usage text. + --version, -v Print the version number -Examples: + --help, -h Show help - $ npm-publish --token abc123 ./my-package +package_path The absolute or relative path of the NPM package to publish. + Can be a directory path, or the path of a package.json file. + Defaults to the current directory. ``` ## License From 55ed2ee5194136fe6a24e0a7cc9c967033f8670d Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Tue, 18 Apr 2023 21:53:13 -0400 Subject: [PATCH 19/36] fixup: build updates --- dist/main.js | 25 ++++++++++++------------- package-lock.json | 36 ++++++++++++++++++------------------ package.json | 2 +- 3 files changed, 31 insertions(+), 32 deletions(-) diff --git a/dist/main.js b/dist/main.js index 2c5ee2a..f090bc8 100644 --- a/dist/main.js +++ b/dist/main.js @@ -5021,7 +5021,11 @@ async function npmPublish(options) { // src/action/core.ts var import_core = __toESM(require_core()); -var import_core2 = __toESM(require_core()); +var logger = { + debug: import_core.debug, + info: import_core.info, + error: import_core.error +}; function getInput(name) { const inputString = (0, import_core.getInput)(name); return inputString.length > 0 ? inputString : void 0; @@ -5034,18 +5038,16 @@ function getRequiredSecretInput(name) { function getBooleanInput(name) { return (0, import_core.getInput)(name) === "true"; } +function setFailed(error) { + (0, import_core.setFailed)(error); +} function setOutput(name, value, defaultValue) { (0, import_core.setOutput)(name, value ?? defaultValue); } -var logger = { - debug: import_core.debug, - info: import_core.info, - error: import_core.error -}; -// src/action/run.ts +// src/action/main.ts async function run() { - const options = { + const results = await npmPublish({ token: getRequiredSecretInput("token"), registry: getInput("registry"), package: getInput("package"), @@ -5055,8 +5057,7 @@ async function run() { dryRun: getBooleanInput("dry-run"), logger, temporaryDirectory: process.env["RUNNER_TEMP"] - }; - const results = await npmPublish(options); + }); setOutput("id", results.id, ""); setOutput("name", results.name); setOutput("version", results.version); @@ -5068,7 +5069,5 @@ async function run() { setOutput("strategy", results.strategy); setOutput("dry-run", results.dryRun); } - -// src/action/main.ts -run().catch((error) => (0, import_core2.setFailed)(error)); +run().catch((error) => setFailed(error)); //# sourceMappingURL=main.js.map diff --git a/package-lock.json b/package-lock.json index 3862608..c8a2155 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "eslint-config-prettier": "^8.8.0", "eslint-import-resolver-typescript": "^3.5.5", "eslint-plugin-import": "npm:eslint-plugin-i@^2.27.5-1", - "eslint-plugin-jsdoc": "^43.0.5", + "eslint-plugin-jsdoc": "^43.0.6", "eslint-plugin-n": "^15.7.0", "eslint-plugin-promise": "^6.1.1", "eslint-plugin-sonarjs": "^0.19.0", @@ -467,17 +467,17 @@ } }, "node_modules/@es-joy/jsdoccomment": { - "version": "0.37.0", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.37.0.tgz", - "integrity": "sha512-hjK0wnsPCYLlF+HHB4R/RbUjOWeLW2SlarB67+Do5WsKILOkmIZvvPJFbtWSmbypxcjpoECLAMzoao0D4Bg5ZQ==", + "version": "0.37.1", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.37.1.tgz", + "integrity": "sha512-5vxWJ1gEkEF0yRd0O+uK6dHJf7adrxwQSX8PuRiPfFSAbNLnY0ZJfXaZucoz14Jj2N11xn2DnlEPwWRpYpvRjg==", "dev": true, "dependencies": { "comment-parser": "1.3.1", - "esquery": "^1.4.0", + "esquery": "^1.5.0", "jsdoc-type-pratt-parser": "~4.0.0" }, "engines": { - "node": "^14 || ^16 || ^17 || ^18 || ^19" + "node": "^14 || ^16 || ^17 || ^18 || ^19 || ^20" } }, "node_modules/@esbuild/android-arm": { @@ -2638,12 +2638,12 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "43.0.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-43.0.5.tgz", - "integrity": "sha512-4+hN5jrwcElXwK+J6GiUYbgHl+C063lu1gR2ajUA1L4bs+rBsAoV37dP2gISfqzoU83VsY1/sSD4wvH87JHCsQ==", + "version": "43.0.6", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-43.0.6.tgz", + "integrity": "sha512-EJyrcIY4e/e51yzLLBpYX7/Ld1+08Bl/XparwHFTmQ8gUfir4wEmY2c/lj91k9+/8auKeNA5ejbyaOl42xX0AQ==", "dev": true, "dependencies": { - "@es-joy/jsdoccomment": "~0.37.0", + "@es-joy/jsdoccomment": "~0.37.1", "are-docs-informative": "^0.0.2", "comment-parser": "1.3.1", "debug": "^4.3.4", @@ -6735,13 +6735,13 @@ } }, "@es-joy/jsdoccomment": { - "version": "0.37.0", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.37.0.tgz", - "integrity": "sha512-hjK0wnsPCYLlF+HHB4R/RbUjOWeLW2SlarB67+Do5WsKILOkmIZvvPJFbtWSmbypxcjpoECLAMzoao0D4Bg5ZQ==", + "version": "0.37.1", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.37.1.tgz", + "integrity": "sha512-5vxWJ1gEkEF0yRd0O+uK6dHJf7adrxwQSX8PuRiPfFSAbNLnY0ZJfXaZucoz14Jj2N11xn2DnlEPwWRpYpvRjg==", "dev": true, "requires": { "comment-parser": "1.3.1", - "esquery": "^1.4.0", + "esquery": "^1.5.0", "jsdoc-type-pratt-parser": "~4.0.0" } }, @@ -8270,12 +8270,12 @@ } }, "eslint-plugin-jsdoc": { - "version": "43.0.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-43.0.5.tgz", - "integrity": "sha512-4+hN5jrwcElXwK+J6GiUYbgHl+C063lu1gR2ajUA1L4bs+rBsAoV37dP2gISfqzoU83VsY1/sSD4wvH87JHCsQ==", + "version": "43.0.6", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-43.0.6.tgz", + "integrity": "sha512-EJyrcIY4e/e51yzLLBpYX7/Ld1+08Bl/XparwHFTmQ8gUfir4wEmY2c/lj91k9+/8auKeNA5ejbyaOl42xX0AQ==", "dev": true, "requires": { - "@es-joy/jsdoccomment": "~0.37.0", + "@es-joy/jsdoccomment": "~0.37.1", "are-docs-informative": "^0.0.2", "comment-parser": "1.3.1", "debug": "^4.3.4", diff --git a/package.json b/package.json index c8ab2a9..e0c3c4d 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "eslint-config-prettier": "^8.8.0", "eslint-import-resolver-typescript": "^3.5.5", "eslint-plugin-import": "npm:eslint-plugin-i@^2.27.5-1", - "eslint-plugin-jsdoc": "^43.0.5", + "eslint-plugin-jsdoc": "^43.0.6", "eslint-plugin-n": "^15.7.0", "eslint-plugin-promise": "^6.1.1", "eslint-plugin-sonarjs": "^0.19.0", From 7b421088d48040e5e423e38bb783415fce02d2a7 Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Tue, 18 Apr 2023 21:57:55 -0400 Subject: [PATCH 20/36] fixup: cli usage typo --- src/cli/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cli/index.ts b/src/cli/index.ts index 6a426a0..36671dc 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -1,7 +1,8 @@ import { npmPublish, type Logger } from "../index.js"; import { parseCliArguments } from "./parse-cli-arguments.js"; -export const USAGE = `Usage: +export const USAGE = ` +Usage: npm-publish [package] @@ -30,8 +31,9 @@ Options: --dry-run Do not actually publish anything. --quiet Only print errors. --debug Print debug logs. + -v, --version Print the version number. - -h --help Show usage text. + -h, --help Show usage text. Examples: From 409c72f76ab7940bbb96f0b6a5a9959378dfbac8 Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Wed, 19 Apr 2023 09:53:55 -0400 Subject: [PATCH 21/36] fixup: fix package paths with spaces --- dist/main.js | 15 ++++++++------- e2e/01-setup-package.sh | 12 ++++++------ e2e/02-publish.sh | 2 +- e2e/03-verify.sh | 4 ++-- e2e/README.md | 2 +- src/cli/parse-cli-arguments.ts | 2 +- src/npm/call-npm-cli.ts | 17 +++++++++-------- 7 files changed, 28 insertions(+), 26 deletions(-) diff --git a/dist/main.js b/dist/main.js index f090bc8..376b60a 100644 --- a/dist/main.js +++ b/dist/main.js @@ -4847,16 +4847,17 @@ ${config}`); // src/npm/call-npm-cli.ts var import_node_child_process = __toESM(require("node:child_process")); var JSON_MATCH_RE = /(\{[\s\S]*\})/mu; -var execProcess = (command, environment = {}, logger2) => { +var execNpm = (commandArguments, environment = {}, logger2) => { var _a; - (_a = logger2 == null ? void 0 : logger2.debug) == null ? void 0 : _a.call(logger2, `Running command: ${command}`); + (_a = logger2 == null ? void 0 : logger2.debug) == null ? void 0 : _a.call(logger2, `Running command: npm ${commandArguments.join(" ")}`); return new Promise((resolve) => { - import_node_child_process.default.exec( - command, + const child = import_node_child_process.default.execFile( + "npm", + commandArguments, { env: { ...process.env, ...environment } }, (error, stdout, stderr) => { var _a2, _b, _c; - (_a2 = logger2 == null ? void 0 : logger2.debug) == null ? void 0 : _a2.call(logger2, `exit code: ${(error == null ? void 0 : error.code) ?? 0}`); + (_a2 = logger2 == null ? void 0 : logger2.debug) == null ? void 0 : _a2.call(logger2, `exit code: ${child.exitCode ?? 0}`); (_b = logger2 == null ? void 0 : logger2.debug) == null ? void 0 : _b.call(logger2, `stdout: ${stdout.trim()}`); (_c = logger2 == null ? void 0 : logger2.debug) == null ? void 0 : _c.call(logger2, `stderr: ${stderr.trim()}`); return resolve({ stdout: stdout.trim(), stderr: stderr.trim(), error }); @@ -4880,8 +4881,8 @@ var parseJson = (...values) => { }; async function callNpmCli(command, cliArguments, options = {}) { var _a, _b; - const { stdout, stderr, error } = await execProcess( - ["npm", command, "--ignore-scripts", "--json", ...cliArguments].join(" "), + const { stdout, stderr, error } = await execNpm( + [command, "--ignore-scripts", "--json", ...cliArguments], options.environment, options.logger ); diff --git a/e2e/01-setup-package.sh b/e2e/01-setup-package.sh index 09ed4d6..b2b392c 100755 --- a/e2e/01-setup-package.sh +++ b/e2e/01-setup-package.sh @@ -7,14 +7,14 @@ set -euo pipefail PACKAGE_SPEC=$1 PACKAGE_VERSION=$2 -package_manifest=${PACKAGE_SPEC}/package.json +package_manifest="${PACKAGE_SPEC}/package.json" -mkdir -p ${PACKAGE_SPEC} +mkdir -p "${PACKAGE_SPEC}" -echo "{" > ${package_manifest} -echo " \"name\": \"@jsdevtools/fixture\"," >> ${package_manifest} -echo " \"version\": \"${PACKAGE_VERSION}\"" >> ${package_manifest} -echo "}" >> ${package_manifest} +echo "{" > "${package_manifest}" +echo " \"name\": \"@jsdevtools/fixture\"," >> "${package_manifest}" +echo " \"version\": \"${PACKAGE_VERSION}\"" >> "${package_manifest}" +echo "}" >> "${package_manifest}" echo "DEBUG: wrote ${package_manifest}" 1>&2 echo ${PACKAGE_SPEC} diff --git a/e2e/02-publish.sh b/e2e/02-publish.sh index de549a5..6d78dfe 100755 --- a/e2e/02-publish.sh +++ b/e2e/02-publish.sh @@ -8,4 +8,4 @@ REGISTRY_URL="http://localhost:4873" PACKAGE_SPEC=$1 TOKEN=$2 -node ./bin/npm-publish --token=${TOKEN} --registry=${REGISTRY_URL} ${PACKAGE_SPEC} +node ./bin/npm-publish --token=${TOKEN} --registry=${REGISTRY_URL} "${PACKAGE_SPEC}" diff --git a/e2e/03-verify.sh b/e2e/03-verify.sh index d848398..4551586 100755 --- a/e2e/03-verify.sh +++ b/e2e/03-verify.sh @@ -7,7 +7,7 @@ set -euo pipefail REGISTRY_URL="http://localhost:4873" PACKAGE_SPEC=$1 -package_name=$(cd $1 && npm pkg get name | sed 's/"//g') -package_version=$(cd $1 && npm pkg get version | sed 's/"//g') +package_name=$(cd "$1" && npm pkg get name | sed 's/"//g') +package_version=$(cd "$1" && npm pkg get version | sed 's/"//g') npm view --registry ${REGISTRY_URL} $package_name@$package_version diff --git a/e2e/README.md b/e2e/README.md index b56edb0..5476018 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -22,7 +22,7 @@ Login to the local registry and create a fixture package. ```shell export TOKEN=$(./e2e/00-login.sh) -export PACKAGE=$(./e2e/01-setup-package.sh ./e2e/fixture 0.0.1) +export PACKAGE=$(./e2e/01-setup-package.sh "./e2e/fixture/cool package" 0.0.1) ``` ### Test the CLI diff --git a/src/cli/parse-cli-arguments.ts b/src/cli/parse-cli-arguments.ts index f98ea07..dfe49a7 100644 --- a/src/cli/parse-cli-arguments.ts +++ b/src/cli/parse-cli-arguments.ts @@ -4,9 +4,9 @@ import commandLineArgs from "command-line-args"; import type { Options } from "../options.js"; const ARGUMENTS_OPTIONS = [ + { name: "package", type: String, defaultOption: true }, { name: "token", type: String }, { name: "registry", type: String }, - { name: "package", type: String, defaultOption: true }, { name: "tag", type: String }, { name: "access", type: String }, { name: "strategy", type: String }, diff --git a/src/npm/call-npm-cli.ts b/src/npm/call-npm-cli.ts index d92163b..d817ccb 100644 --- a/src/npm/call-npm-cli.ts +++ b/src/npm/call-npm-cli.ts @@ -11,19 +11,20 @@ export interface NpmCliOptions { const JSON_MATCH_RE = /(\{[\s\S]*\})/mu; -const execProcess = ( - command: string, +const execNpm = ( + commandArguments: string[], environment: Record = {}, logger?: Logger ): Promise<{ stdout: string; stderr: string; error: Error | null }> => { - logger?.debug?.(`Running command: ${command}`); + logger?.debug?.(`Running command: npm ${commandArguments.join(" ")}`); return new Promise((resolve) => { - childProcess.exec( - command, + const child = childProcess.execFile( + "npm", + commandArguments, { env: { ...process.env, ...environment } }, (error, stdout, stderr) => { - logger?.debug?.(`exit code: ${error?.code ?? 0}`); + logger?.debug?.(`exit code: ${child.exitCode ?? 0}`); logger?.debug?.(`stdout: ${stdout.trim()}`); logger?.debug?.(`stderr: ${stderr.trim()}`); return resolve({ stdout: stdout.trim(), stderr: stderr.trim(), error }); @@ -61,8 +62,8 @@ export async function callNpmCli( cliArguments: string[], options: NpmCliOptions = {} ): Promise { - const { stdout, stderr, error } = await execProcess( - ["npm", command, "--ignore-scripts", "--json", ...cliArguments].join(" "), + const { stdout, stderr, error } = await execNpm( + [command, "--ignore-scripts", "--json", ...cliArguments], options.environment, options.logger ); From 7cd2fda341b7287346ea910f63e2d86e21630c39 Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Wed, 19 Apr 2023 16:21:38 -0400 Subject: [PATCH 22/36] fixup: swap minimist for command-line-args due to windows path bugs --- dist/main.js | 4 +- package-lock.json | 108 +++++------------- package.json | 4 +- src/cli/__tests__/parse-cli-arguments.test.ts | 17 ++- src/cli/parse-cli-arguments.ts | 83 ++++++++++---- .../__tests__/get-publish-arguments.test.ts | 13 +-- src/npm/get-publish-arguments.ts | 4 +- 7 files changed, 108 insertions(+), 125 deletions(-) diff --git a/dist/main.js b/dist/main.js index 376b60a..563a159 100644 --- a/dist/main.js +++ b/dist/main.js @@ -4913,8 +4913,8 @@ function getPublishArguments(packageSpec, options) { if (!access.isDefault && access.value) { publishArguments.push("--access", access.value); } - if (!dryRun.isDefault) { - publishArguments.push("--dry-run", JSON.stringify(dryRun.value)); + if (dryRun.value) { + publishArguments.push("--dry-run"); } return publishArguments; } diff --git a/package-lock.json b/package-lock.json index c8a2155..ef99014 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@types/semver": "^7.3.13", - "command-line-args": "^5.1.1", + "minimist": "^1.2.8", "semver": "^7.5.0" }, "bin": { @@ -19,6 +19,7 @@ "devDependencies": { "@actions/core": "^1.10.0", "@types/command-line-args": "^5.0.0", + "@types/minimist": "^1.2.2", "@types/node": "^18.15.11", "@typescript-eslint/eslint-plugin": "^5.59.0", "@typescript-eslint/parser": "^5.59.0", @@ -1113,6 +1114,12 @@ "@types/unist": "*" } }, + "node_modules/@types/minimist": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", + "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", + "dev": true + }, "node_modules/@types/ms": { "version": "0.7.31", "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", @@ -1576,14 +1583,6 @@ "node": ">=14" } }, - "node_modules/array-back": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", - "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", - "engines": { - "node": ">=6" - } - }, "node_modules/array-buffer-byte-length": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", @@ -1926,20 +1925,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/command-line-args": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", - "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", - "dependencies": { - "array-back": "^3.1.0", - "find-replace": "^3.0.0", - "lodash.camelcase": "^4.3.0", - "typical": "^4.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/comment-parser": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.3.1.tgz", @@ -3046,17 +3031,6 @@ "node": ">=8" } }, - "node_modules/find-replace": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", - "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", - "dependencies": { - "array-back": "^3.0.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -4031,11 +4005,6 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" - }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -4631,6 +4600,14 @@ "node": "*" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/minipass": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", @@ -6043,14 +6020,6 @@ "node": ">=12.20" } }, - "node_modules/typical": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", - "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", - "engines": { - "node": ">=8" - } - }, "node_modules/ufo": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.1.1.tgz", @@ -7122,6 +7091,12 @@ "@types/unist": "*" } }, + "@types/minimist": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", + "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", + "dev": true + }, "@types/ms": { "version": "0.7.31", "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", @@ -7438,11 +7413,6 @@ "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", "dev": true }, - "array-back": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", - "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==" - }, "array-buffer-byte-length": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", @@ -7676,17 +7646,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "command-line-args": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", - "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", - "requires": { - "array-back": "^3.1.0", - "find-replace": "^3.0.0", - "lodash.camelcase": "^4.3.0", - "typical": "^4.0.0" - } - }, "comment-parser": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.3.1.tgz", @@ -8518,14 +8477,6 @@ "to-regex-range": "^5.0.1" } }, - "find-replace": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", - "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", - "requires": { - "array-back": "^3.0.1" - } - }, "find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -9211,11 +9162,6 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" - }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -9565,6 +9511,11 @@ "brace-expansion": "^1.1.7" } }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" + }, "minipass": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", @@ -10577,11 +10528,6 @@ "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", "dev": true }, - "typical": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", - "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==" - }, "ufo": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.1.1.tgz", diff --git a/package.json b/package.json index e0c3c4d..fbc6016 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ }, "devDependencies": { "@actions/core": "^1.10.0", - "@types/command-line-args": "^5.0.0", + "@types/minimist": "^1.2.2", "@types/node": "^18.15.11", "@typescript-eslint/eslint-plugin": "^5.59.0", "@typescript-eslint/parser": "^5.59.0", @@ -74,7 +74,7 @@ }, "dependencies": { "@types/semver": "^7.3.13", - "command-line-args": "^5.1.1", + "minimist": "^1.2.8", "semver": "^7.5.0" } } diff --git a/src/cli/__tests__/parse-cli-arguments.test.ts b/src/cli/__tests__/parse-cli-arguments.test.ts index bb453d5..ae17c6d 100644 --- a/src/cli/__tests__/parse-cli-arguments.test.ts +++ b/src/cli/__tests__/parse-cli-arguments.test.ts @@ -27,7 +27,7 @@ describe("parseCliArguments", () => { tag: undefined, access: undefined, strategy: undefined, - dryRun: undefined, + dryRun: false, }, }); @@ -45,7 +45,7 @@ describe("parseCliArguments", () => { tag: undefined, access: undefined, strategy: undefined, - dryRun: undefined, + dryRun: false, }, }); }); @@ -84,7 +84,18 @@ describe("parseCliArguments", () => { it("should reject unknown options", () => { expect(() => subject.parseCliArguments(["--foobar"])).toThrow( - /Unknown option/ + /unknown option/iu ); }); + + it("should reject too many packages", () => { + expect(() => + subject.parseCliArguments([ + "--token", + "abc123", + "./package1", + "./package2", + ]) + ).toThrow(/too many positional arguments/iu); + }); }); diff --git a/src/cli/parse-cli-arguments.ts b/src/cli/parse-cli-arguments.ts index dfe49a7..6df19c9 100644 --- a/src/cli/parse-cli-arguments.ts +++ b/src/cli/parse-cli-arguments.ts @@ -1,21 +1,27 @@ /** Wrapper module for command-line-args */ -import commandLineArgs from "command-line-args"; -import type { Options } from "../options.js"; - -const ARGUMENTS_OPTIONS = [ - { name: "package", type: String, defaultOption: true }, - { name: "token", type: String }, - { name: "registry", type: String }, - { name: "tag", type: String }, - { name: "access", type: String }, - { name: "strategy", type: String }, - { name: "dry-run", type: Boolean }, - { name: "quiet", type: Boolean }, - { name: "debug", type: Boolean }, - { name: "version", alias: "v", type: Boolean }, - { name: "help", alias: "h", type: Boolean }, -]; +import minimist from "minimist"; +import type { Options, Access, Strategy } from "../options.js"; + +export class UsageError extends TypeError { + public constructor(message: string) { + super(message); + this.name = "UsageError"; + } +} + +const ARGUMENTS_OPTIONS = { + string: ["package", "token", "registry", "tag", "access", "strategy"], + boolean: ["dry-run", "quiet", "debug", "version", "help"], + alias: { h: "help", v: "version" }, +}; + +const KNOWN_KEYS = new Set([ + "_", + ...ARGUMENTS_OPTIONS.string, + ...ARGUMENTS_OPTIONS.boolean, + ...Object.keys(ARGUMENTS_OPTIONS.alias), +]); /** The parsed command-line arguments */ export interface ParsedArguments { @@ -33,16 +39,43 @@ export interface ParsedArguments { * @returns A parsed object of options. */ export function parseCliArguments(argv: string[]): ParsedArguments { - const { help, version, quiet, debug, ...options } = commandLineArgs( - ARGUMENTS_OPTIONS, - { argv, camelCase: true } - ); + const parsed = minimist(argv, ARGUMENTS_OPTIONS); + + for (const option of Object.keys(parsed)) { + if (!KNOWN_KEYS.has(option)) { + throw new UsageError(`Unknown option: ${option}`); + } + } + + if (parsed._.length > 1) { + throw new Error(`Too many positional arguments: ${parsed._.join(" ")}`); + } + + const help = parsed["help"] as boolean; + const version = parsed["version"] as boolean; + const quiet = parsed["quiet"] as boolean; + const debug = parsed["debug"] as boolean; + const packageSpec = (parsed["package"] as string | undefined) ?? parsed._[0]; + const token = parsed["token"] as string; + const registry = parsed["registry"] as string; + const tag = parsed["tag"] as string; + const access = parsed["access"] as Access; + const strategy = parsed["strategy"] as Strategy; + const dryRun = parsed["dry-run"] as boolean; return { - help: Boolean(help), - version: Boolean(version), - quiet: Boolean(quiet), - debug: Boolean(debug), - options: options as Options, + help, + version, + quiet, + debug, + options: { + package: packageSpec, + token, + registry, + tag, + access, + strategy, + dryRun, + }, }; } diff --git a/src/npm/__tests__/get-publish-arguments.test.ts b/src/npm/__tests__/get-publish-arguments.test.ts index 73ed67e..030fa94 100644 --- a/src/npm/__tests__/get-publish-arguments.test.ts +++ b/src/npm/__tests__/get-publish-arguments.test.ts @@ -8,7 +8,7 @@ describe("getPublishArguments", () => { const result = subject.getPublishArguments("./cool-package", { tag: { value: "next", isDefault: false }, access: { value: "restricted", isDefault: false }, - dryRun: { value: false, isDefault: false }, + dryRun: { value: true, isDefault: false }, strategy: { value: "upgrade", isDefault: true }, } as NormalizedOptions); @@ -19,7 +19,6 @@ describe("getPublishArguments", () => { "--access", "restricted", "--dry-run", - "false", ]); }); @@ -34,7 +33,7 @@ describe("getPublishArguments", () => { expect(result).toEqual(["./cool-package"]); }); - it("should omit undefined arguments", () => { + it("should omit undefined string arguments and false boolean arguments", () => { const result = subject.getPublishArguments("./cool-package", { tag: { value: "next", isDefault: false }, access: { value: undefined, isDefault: false }, @@ -42,12 +41,6 @@ describe("getPublishArguments", () => { strategy: { value: "upgrade", isDefault: true }, } as NormalizedOptions); - expect(result).toEqual([ - "./cool-package", - "--tag", - "next", - "--dry-run", - "false", - ]); + expect(result).toEqual(["./cool-package", "--tag", "next"]); }); }); diff --git a/src/npm/get-publish-arguments.ts b/src/npm/get-publish-arguments.ts index b191492..cbae648 100644 --- a/src/npm/get-publish-arguments.ts +++ b/src/npm/get-publish-arguments.ts @@ -26,8 +26,8 @@ export function getPublishArguments( publishArguments.push("--access", access.value); } - if (!dryRun.isDefault) { - publishArguments.push("--dry-run", JSON.stringify(dryRun.value)); + if (dryRun.value) { + publishArguments.push("--dry-run"); } return publishArguments; From 21f93b95a240c0e7519fdf5034b3f97a0eeacdb0 Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Wed, 19 Apr 2023 17:29:00 -0400 Subject: [PATCH 23/36] =?UTF-8?q?fixup:=20revert,=20it=20was=20a=20powersh?= =?UTF-8?q?ell=20bug=20=F0=9F=A4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 108 +++++++++++++----- package.json | 4 +- src/cli/__tests__/parse-cli-arguments.test.ts | 17 +-- src/cli/parse-cli-arguments.ts | 83 ++++---------- 4 files changed, 111 insertions(+), 101 deletions(-) diff --git a/package-lock.json b/package-lock.json index ef99014..c8a2155 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@types/semver": "^7.3.13", - "minimist": "^1.2.8", + "command-line-args": "^5.1.1", "semver": "^7.5.0" }, "bin": { @@ -19,7 +19,6 @@ "devDependencies": { "@actions/core": "^1.10.0", "@types/command-line-args": "^5.0.0", - "@types/minimist": "^1.2.2", "@types/node": "^18.15.11", "@typescript-eslint/eslint-plugin": "^5.59.0", "@typescript-eslint/parser": "^5.59.0", @@ -1114,12 +1113,6 @@ "@types/unist": "*" } }, - "node_modules/@types/minimist": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", - "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", - "dev": true - }, "node_modules/@types/ms": { "version": "0.7.31", "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", @@ -1583,6 +1576,14 @@ "node": ">=14" } }, + "node_modules/array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "engines": { + "node": ">=6" + } + }, "node_modules/array-buffer-byte-length": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", @@ -1925,6 +1926,20 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/command-line-args": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", + "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", + "dependencies": { + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/comment-parser": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.3.1.tgz", @@ -3031,6 +3046,17 @@ "node": ">=8" } }, + "node_modules/find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "dependencies": { + "array-back": "^3.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -4005,6 +4031,11 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -4600,14 +4631,6 @@ "node": "*" } }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/minipass": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", @@ -6020,6 +6043,14 @@ "node": ">=12.20" } }, + "node_modules/typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", + "engines": { + "node": ">=8" + } + }, "node_modules/ufo": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.1.1.tgz", @@ -7091,12 +7122,6 @@ "@types/unist": "*" } }, - "@types/minimist": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", - "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", - "dev": true - }, "@types/ms": { "version": "0.7.31", "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", @@ -7413,6 +7438,11 @@ "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", "dev": true }, + "array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==" + }, "array-buffer-byte-length": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", @@ -7646,6 +7676,17 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "command-line-args": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", + "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", + "requires": { + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" + } + }, "comment-parser": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.3.1.tgz", @@ -8477,6 +8518,14 @@ "to-regex-range": "^5.0.1" } }, + "find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "requires": { + "array-back": "^3.0.1" + } + }, "find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -9162,6 +9211,11 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" + }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -9511,11 +9565,6 @@ "brace-expansion": "^1.1.7" } }, - "minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" - }, "minipass": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", @@ -10528,6 +10577,11 @@ "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", "dev": true }, + "typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==" + }, "ufo": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.1.1.tgz", diff --git a/package.json b/package.json index fbc6016..e0c3c4d 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ }, "devDependencies": { "@actions/core": "^1.10.0", - "@types/minimist": "^1.2.2", + "@types/command-line-args": "^5.0.0", "@types/node": "^18.15.11", "@typescript-eslint/eslint-plugin": "^5.59.0", "@typescript-eslint/parser": "^5.59.0", @@ -74,7 +74,7 @@ }, "dependencies": { "@types/semver": "^7.3.13", - "minimist": "^1.2.8", + "command-line-args": "^5.1.1", "semver": "^7.5.0" } } diff --git a/src/cli/__tests__/parse-cli-arguments.test.ts b/src/cli/__tests__/parse-cli-arguments.test.ts index ae17c6d..bb453d5 100644 --- a/src/cli/__tests__/parse-cli-arguments.test.ts +++ b/src/cli/__tests__/parse-cli-arguments.test.ts @@ -27,7 +27,7 @@ describe("parseCliArguments", () => { tag: undefined, access: undefined, strategy: undefined, - dryRun: false, + dryRun: undefined, }, }); @@ -45,7 +45,7 @@ describe("parseCliArguments", () => { tag: undefined, access: undefined, strategy: undefined, - dryRun: false, + dryRun: undefined, }, }); }); @@ -84,18 +84,7 @@ describe("parseCliArguments", () => { it("should reject unknown options", () => { expect(() => subject.parseCliArguments(["--foobar"])).toThrow( - /unknown option/iu + /Unknown option/ ); }); - - it("should reject too many packages", () => { - expect(() => - subject.parseCliArguments([ - "--token", - "abc123", - "./package1", - "./package2", - ]) - ).toThrow(/too many positional arguments/iu); - }); }); diff --git a/src/cli/parse-cli-arguments.ts b/src/cli/parse-cli-arguments.ts index 6df19c9..dfe49a7 100644 --- a/src/cli/parse-cli-arguments.ts +++ b/src/cli/parse-cli-arguments.ts @@ -1,27 +1,21 @@ /** Wrapper module for command-line-args */ -import minimist from "minimist"; -import type { Options, Access, Strategy } from "../options.js"; - -export class UsageError extends TypeError { - public constructor(message: string) { - super(message); - this.name = "UsageError"; - } -} - -const ARGUMENTS_OPTIONS = { - string: ["package", "token", "registry", "tag", "access", "strategy"], - boolean: ["dry-run", "quiet", "debug", "version", "help"], - alias: { h: "help", v: "version" }, -}; - -const KNOWN_KEYS = new Set([ - "_", - ...ARGUMENTS_OPTIONS.string, - ...ARGUMENTS_OPTIONS.boolean, - ...Object.keys(ARGUMENTS_OPTIONS.alias), -]); +import commandLineArgs from "command-line-args"; +import type { Options } from "../options.js"; + +const ARGUMENTS_OPTIONS = [ + { name: "package", type: String, defaultOption: true }, + { name: "token", type: String }, + { name: "registry", type: String }, + { name: "tag", type: String }, + { name: "access", type: String }, + { name: "strategy", type: String }, + { name: "dry-run", type: Boolean }, + { name: "quiet", type: Boolean }, + { name: "debug", type: Boolean }, + { name: "version", alias: "v", type: Boolean }, + { name: "help", alias: "h", type: Boolean }, +]; /** The parsed command-line arguments */ export interface ParsedArguments { @@ -39,43 +33,16 @@ export interface ParsedArguments { * @returns A parsed object of options. */ export function parseCliArguments(argv: string[]): ParsedArguments { - const parsed = minimist(argv, ARGUMENTS_OPTIONS); - - for (const option of Object.keys(parsed)) { - if (!KNOWN_KEYS.has(option)) { - throw new UsageError(`Unknown option: ${option}`); - } - } - - if (parsed._.length > 1) { - throw new Error(`Too many positional arguments: ${parsed._.join(" ")}`); - } - - const help = parsed["help"] as boolean; - const version = parsed["version"] as boolean; - const quiet = parsed["quiet"] as boolean; - const debug = parsed["debug"] as boolean; - const packageSpec = (parsed["package"] as string | undefined) ?? parsed._[0]; - const token = parsed["token"] as string; - const registry = parsed["registry"] as string; - const tag = parsed["tag"] as string; - const access = parsed["access"] as Access; - const strategy = parsed["strategy"] as Strategy; - const dryRun = parsed["dry-run"] as boolean; + const { help, version, quiet, debug, ...options } = commandLineArgs( + ARGUMENTS_OPTIONS, + { argv, camelCase: true } + ); return { - help, - version, - quiet, - debug, - options: { - package: packageSpec, - token, - registry, - tag, - access, - strategy, - dryRun, - }, + help: Boolean(help), + version: Boolean(version), + quiet: Boolean(quiet), + debug: Boolean(debug), + options: options as Options, }; } From 3b10db5c03da85e10fd35e3d45307cc0aa018557 Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Wed, 19 Apr 2023 17:34:07 -0400 Subject: [PATCH 24/36] fixup: update e2e test to use spaces in package name --- .github/workflows/ci-cd.yml | 14 +++++++------- e2e/00-login.sh | 2 +- e2e/01-setup-package.sh | 6 +++--- e2e/02-publish.sh | 4 ++-- e2e/README.md | 12 ++++++------ 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index b15e977..8c2c34c 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -125,7 +125,7 @@ jobs: shell: bash run: | echo "token=$(./e2e/00-login.sh)" >> "$GITHUB_OUTPUT" - echo "package=$(./e2e/01-setup-package.sh ./e2e/fixture 0.0.1)" >> "$GITHUB_OUTPUT" + echo "package=$(./e2e/01-setup-package.sh ./e2e/fixture/cool\ package 0.0.1)" >> "$GITHUB_OUTPUT" - name: Run CLI end-to-end test shell: bash @@ -133,12 +133,12 @@ jobs: TOKEN: ${{ steps.setup.outputs.token }} PACKAGE: ${{ steps.setup.outputs.package }} run: | - ./e2e/02-publish.sh ${PACKAGE} ${TOKEN} - ./e2e/03-verify.sh ${PACKAGE} - ./e2e/02-publish.sh ${PACKAGE} ${TOKEN} - ./e2e/01-setup-package.sh ${PACKAGE} 0.0.2 - ./e2e/02-publish.sh ${PACKAGE} ${TOKEN} - ./e2e/03-verify.sh ${PACKAGE} + ./e2e/02-publish.sh "${PACKAGE}" ${TOKEN} + ./e2e/03-verify.sh "${PACKAGE}" + ./e2e/02-publish.sh "${PACKAGE}" ${TOKEN} + ./e2e/01-setup-package.sh "${PACKAGE}" 0.0.2 + ./e2e/02-publish.sh "${PACKAGE}" ${TOKEN} + ./e2e/03-verify.sh "${PACKAGE}" - id: action-no-publish name: Publish with already published version diff --git a/e2e/00-login.sh b/e2e/00-login.sh index eb10378..23ddff6 100755 --- a/e2e/00-login.sh +++ b/e2e/00-login.sh @@ -11,7 +11,7 @@ create_user_response=$(curl -s -X PUT -H 'content-type: application/json' -d '{" echo "DEBUG: Create user response - ${create_user_response}" 1>&2 -if [[ "${create_user_response}" =~ ${token_matcher} ]]; then +if [[ ${create_user_response} =~ ${token_matcher} ]]; then echo "${BASH_REMATCH[1]}" exit 0 fi diff --git a/e2e/01-setup-package.sh b/e2e/01-setup-package.sh index b2b392c..5f00e11 100755 --- a/e2e/01-setup-package.sh +++ b/e2e/01-setup-package.sh @@ -4,8 +4,8 @@ set -euo pipefail -PACKAGE_SPEC=$1 -PACKAGE_VERSION=$2 +PACKAGE_SPEC="$1" +PACKAGE_VERSION="$2" package_manifest="${PACKAGE_SPEC}/package.json" @@ -17,4 +17,4 @@ echo " \"version\": \"${PACKAGE_VERSION}\"" >> "${package_manifest}" echo "}" >> "${package_manifest}" echo "DEBUG: wrote ${package_manifest}" 1>&2 -echo ${PACKAGE_SPEC} +echo "${PACKAGE_SPEC}" diff --git a/e2e/02-publish.sh b/e2e/02-publish.sh index 6d78dfe..d9d6875 100755 --- a/e2e/02-publish.sh +++ b/e2e/02-publish.sh @@ -5,7 +5,7 @@ set -euo pipefail REGISTRY_URL="http://localhost:4873" -PACKAGE_SPEC=$1 -TOKEN=$2 +PACKAGE_SPEC="$1" +TOKEN="$2" node ./bin/npm-publish --token=${TOKEN} --registry=${REGISTRY_URL} "${PACKAGE_SPEC}" diff --git a/e2e/README.md b/e2e/README.md index 5476018..679731d 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -35,10 +35,10 @@ export PACKAGE=$(./e2e/01-setup-package.sh "./e2e/fixture/cool package" 0.0.1) 6. Verify the new version was published. ```shell -./e2e/02-publish.sh ${PACKAGE} ${TOKEN} -./e2e/03-verify.sh ${PACKAGE} -./e2e/02-publish.sh ${PACKAGE} ${TOKEN} -./e2e/01-setup-package.sh ${PACKAGE} 0.0.2 -./e2e/02-publish.sh ${PACKAGE} ${TOKEN} -./e2e/03-verify.sh ${PACKAGE} +./e2e/02-publish.sh "${PACKAGE}" ${TOKEN} +./e2e/03-verify.sh "${PACKAGE}" +./e2e/02-publish.sh "${PACKAGE}" ${TOKEN} +./e2e/01-setup-package.sh "${PACKAGE}" 0.0.2 +./e2e/02-publish.sh "${PACKAGE}" ${TOKEN} +./e2e/03-verify.sh "${PACKAGE}" ``` From 87ee5abf1d64f8ab76c467ed9437c2a07bc0784e Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Wed, 19 Apr 2023 17:58:01 -0400 Subject: [PATCH 25/36] fixup: what if I was better at shell? --- .github/workflows/ci-cd.yml | 12 ++++++------ e2e/README.md | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 8c2c34c..7268ae0 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -133,12 +133,12 @@ jobs: TOKEN: ${{ steps.setup.outputs.token }} PACKAGE: ${{ steps.setup.outputs.package }} run: | - ./e2e/02-publish.sh "${PACKAGE}" ${TOKEN} - ./e2e/03-verify.sh "${PACKAGE}" - ./e2e/02-publish.sh "${PACKAGE}" ${TOKEN} - ./e2e/01-setup-package.sh "${PACKAGE}" 0.0.2 - ./e2e/02-publish.sh "${PACKAGE}" ${TOKEN} - ./e2e/03-verify.sh "${PACKAGE}" + ./e2e/02-publish.sh ${PACKAGE} ${TOKEN} + ./e2e/03-verify.sh ${PACKAGE} + ./e2e/02-publish.sh ${PACKAGE} ${TOKEN} + ./e2e/01-setup-package.sh ${PACKAGE} 0.0.2 + ./e2e/02-publish.sh ${PACKAGE} ${TOKEN} + ./e2e/03-verify.sh ${PACKAGE} - id: action-no-publish name: Publish with already published version diff --git a/e2e/README.md b/e2e/README.md index 679731d..5476018 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -35,10 +35,10 @@ export PACKAGE=$(./e2e/01-setup-package.sh "./e2e/fixture/cool package" 0.0.1) 6. Verify the new version was published. ```shell -./e2e/02-publish.sh "${PACKAGE}" ${TOKEN} -./e2e/03-verify.sh "${PACKAGE}" -./e2e/02-publish.sh "${PACKAGE}" ${TOKEN} -./e2e/01-setup-package.sh "${PACKAGE}" 0.0.2 -./e2e/02-publish.sh "${PACKAGE}" ${TOKEN} -./e2e/03-verify.sh "${PACKAGE}" +./e2e/02-publish.sh ${PACKAGE} ${TOKEN} +./e2e/03-verify.sh ${PACKAGE} +./e2e/02-publish.sh ${PACKAGE} ${TOKEN} +./e2e/01-setup-package.sh ${PACKAGE} 0.0.2 +./e2e/02-publish.sh ${PACKAGE} ${TOKEN} +./e2e/03-verify.sh ${PACKAGE} ``` From 28c3b35987151962e96631423912f42eefbc963d Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Wed, 19 Apr 2023 18:31:16 -0400 Subject: [PATCH 26/36] fixup: spawn might be a better choice for windows --- src/errors.ts | 12 +++++++++ src/npm/__tests__/call-npm-cli.test.ts | 3 ++- src/npm/call-npm-cli.ts | 36 +++++++++++++++----------- 3 files changed, 35 insertions(+), 16 deletions(-) diff --git a/src/errors.ts b/src/errors.ts index 17805d9..7b3a684 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -100,3 +100,15 @@ export class InvalidStrategyError extends TypeError { this.name = "InvalidStrategyError"; } } + +export class NpmCalError extends Error { + public constructor(command: string, exitCode: number, stderr: string) { + super( + [ + `Call to "npm ${command}" exited with non-zero exit code ${exitCode}`, + stderr, + ].join(os.EOL) + ); + this.name = "NpmCalError"; + } +} diff --git a/src/npm/__tests__/call-npm-cli.test.ts b/src/npm/__tests__/call-npm-cli.test.ts index 0a1a60d..3452680 100644 --- a/src/npm/__tests__/call-npm-cli.test.ts +++ b/src/npm/__tests__/call-npm-cli.test.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from "vitest"; +import * as errors from "../../errors.js"; import * as subject from "../call-npm-cli.js"; describe("callNpmCli", () => { @@ -18,7 +19,7 @@ describe("callNpmCli", () => { it("should raise if error", async () => { const result = subject.callNpmCli("explain", ["not-a-real-package"]); - await expect(result).rejects.toThrow(/No dependencies found/); + await expect(result).rejects.toThrow(errors.NpmCalError); }); it("should map an error code to a return value", async () => { diff --git a/src/npm/call-npm-cli.ts b/src/npm/call-npm-cli.ts index d817ccb..91aa479 100644 --- a/src/npm/call-npm-cli.ts +++ b/src/npm/call-npm-cli.ts @@ -1,5 +1,6 @@ import childProcess from "node:child_process"; +import * as errors from "../errors.js"; import type { Logger } from "../options.js"; import type { NpmCliEnvironment } from "./use-npm-environment.js"; @@ -15,21 +16,26 @@ const execNpm = ( commandArguments: string[], environment: Record = {}, logger?: Logger -): Promise<{ stdout: string; stderr: string; error: Error | null }> => { +): Promise<{ stdout: string; stderr: string; exitCode: number }> => { logger?.debug?.(`Running command: npm ${commandArguments.join(" ")}`); return new Promise((resolve) => { - const child = childProcess.execFile( - "npm", - commandArguments, - { env: { ...process.env, ...environment } }, - (error, stdout, stderr) => { - logger?.debug?.(`exit code: ${child.exitCode ?? 0}`); - logger?.debug?.(`stdout: ${stdout.trim()}`); - logger?.debug?.(`stderr: ${stderr.trim()}`); - return resolve({ stdout: stdout.trim(), stderr: stderr.trim(), error }); - } - ); + let stdout = ""; + let stderr = ""; + + const npm = childProcess.spawn("npm", commandArguments, { + env: { ...process.env, ...environment }, + }); + + npm.stdout.on("data", (data) => (stdout += data)); + npm.stderr.on("data", (data) => (stderr += data)); + npm.on("close", (code) => { + resolve({ + stdout: stdout.trim(), + stderr: stderr.trim(), + exitCode: code ?? 0, + }); + }); }); }; @@ -62,13 +68,13 @@ export async function callNpmCli( cliArguments: string[], options: NpmCliOptions = {} ): Promise { - const { stdout, stderr, error } = await execNpm( + const { stdout, stderr, exitCode } = await execNpm( [command, "--ignore-scripts", "--json", ...cliArguments], options.environment, options.logger ); - if (error) { + if (exitCode !== 0) { const errorPayload = parseJson<{ error?: { code?: string | null } }>( stdout, stderr @@ -83,7 +89,7 @@ export async function callNpmCli( return options.ifError[errorCode] as TReturn; } - throw error; + throw new errors.NpmCalError(command, exitCode, stderr); } return parseJson(stdout) ?? (stdout as unknown as TReturn); From bb42c2de833565d28ea042c0317858cbb1e23230 Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Wed, 19 Apr 2023 19:15:29 -0400 Subject: [PATCH 27/36] fixup: more windows work --- dist/main.js | 67 +++++++++++++++++++++++++---------------- src/npm/call-npm-cli.ts | 6 ++-- 2 files changed, 45 insertions(+), 28 deletions(-) diff --git a/dist/main.js b/dist/main.js index 563a159..8079ef6 100644 --- a/dist/main.js +++ b/dist/main.js @@ -2507,11 +2507,11 @@ var require_command = __commonJS({ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.issue = exports.issueCommand = void 0; - var os5 = __importStar(require("os")); + var os6 = __importStar(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os5.EOL); + process.stdout.write(cmd.toString() + os6.EOL); } exports.issueCommand = issueCommand; function issue(name, message = "") { @@ -2928,7 +2928,7 @@ var require_file_command = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; var fs3 = __importStar(require("fs")); - var os5 = __importStar(require("os")); + var os6 = __importStar(require("os")); var uuid_1 = (init_esm_node(), __toCommonJS(esm_node_exports)); var utils_1 = require_utils(); function issueFileCommand(command, message) { @@ -2939,7 +2939,7 @@ var require_file_command = __commonJS({ if (!fs3.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs3.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os5.EOL}`, { + fs3.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os6.EOL}`, { encoding: "utf8" }); } @@ -2953,7 +2953,7 @@ var require_file_command = __commonJS({ if (convertedValue.includes(delimiter)) { throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return `${key}<<${delimiter}${os5.EOL}${convertedValue}${os5.EOL}${delimiter}`; + return `${key}<<${delimiter}${os6.EOL}${convertedValue}${os6.EOL}${delimiter}`; } exports.prepareKeyValueMessage = prepareKeyValueMessage; } @@ -4442,7 +4442,7 @@ var require_core = __commonJS({ var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os5 = __importStar(require("os")); + var os6 = __importStar(require("os")); var path3 = __importStar(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; @@ -4510,7 +4510,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); if (filePath) { return file_command_1.issueFileCommand("OUTPUT", file_command_1.prepareKeyValueMessage(name, value)); } - process.stdout.write(os5.EOL); + process.stdout.write(os6.EOL); command_1.issueCommand("set-output", { name }, utils_1.toCommandValue(value)); } exports.setOutput = setOutput2; @@ -4544,7 +4544,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports.notice = notice; function info(message) { - process.stdout.write(message + os5.EOL); + process.stdout.write(message + os6.EOL); } exports.info = info; function startGroup(name) { @@ -4693,6 +4693,17 @@ var InvalidStrategyError = class extends TypeError { this.name = "InvalidStrategyError"; } }; +var NpmCalError = class extends Error { + constructor(command, exitCode, stderr) { + super( + [ + `Call to "npm ${command}" exited with non-zero exit code ${exitCode}`, + stderr + ].join(import_node_os.default.EOL) + ); + this.name = "NpmCalError"; + } +}; // src/read-manifest.ts var import_promises = __toESM(require("node:fs/promises")); @@ -4846,23 +4857,27 @@ ${config}`); // src/npm/call-npm-cli.ts var import_node_child_process = __toESM(require("node:child_process")); +var import_node_os4 = __toESM(require("node:os")); +var NPM = import_node_os4.default.platform() === "win32" ? "npm.cmd" : "npm"; var JSON_MATCH_RE = /(\{[\s\S]*\})/mu; var execNpm = (commandArguments, environment = {}, logger2) => { var _a; - (_a = logger2 == null ? void 0 : logger2.debug) == null ? void 0 : _a.call(logger2, `Running command: npm ${commandArguments.join(" ")}`); + (_a = logger2 == null ? void 0 : logger2.debug) == null ? void 0 : _a.call(logger2, `Running command: ${NPM} ${commandArguments.join(" ")}`); return new Promise((resolve) => { - const child = import_node_child_process.default.execFile( - "npm", - commandArguments, - { env: { ...process.env, ...environment } }, - (error, stdout, stderr) => { - var _a2, _b, _c; - (_a2 = logger2 == null ? void 0 : logger2.debug) == null ? void 0 : _a2.call(logger2, `exit code: ${child.exitCode ?? 0}`); - (_b = logger2 == null ? void 0 : logger2.debug) == null ? void 0 : _b.call(logger2, `stdout: ${stdout.trim()}`); - (_c = logger2 == null ? void 0 : logger2.debug) == null ? void 0 : _c.call(logger2, `stderr: ${stderr.trim()}`); - return resolve({ stdout: stdout.trim(), stderr: stderr.trim(), error }); - } - ); + let stdout = ""; + let stderr = ""; + const npm = import_node_child_process.default.spawn(NPM, commandArguments, { + env: { ...process.env, ...environment } + }); + npm.stdout.on("data", (data) => stdout += data); + npm.stderr.on("data", (data) => stderr += data); + npm.on("close", (code) => { + resolve({ + stdout: stdout.trim(), + stderr: stderr.trim(), + exitCode: code ?? 0 + }); + }); }); }; var parseJson = (...values) => { @@ -4881,12 +4896,12 @@ var parseJson = (...values) => { }; async function callNpmCli(command, cliArguments, options = {}) { var _a, _b; - const { stdout, stderr, error } = await execNpm( + const { stdout, stderr, exitCode } = await execNpm( [command, "--ignore-scripts", "--json", ...cliArguments], options.environment, options.logger ); - if (error) { + if (exitCode !== 0) { const errorPayload = parseJson( stdout, stderr @@ -4895,7 +4910,7 @@ async function callNpmCli(command, cliArguments, options = {}) { if (typeof errorCode === "string" && options.ifError && errorCode in options.ifError) { return options.ifError[errorCode]; } - throw error; + throw new NpmCalError(command, exitCode, stderr); } return parseJson(stdout) ?? stdout; } @@ -4966,7 +4981,7 @@ function compareVersions(version2, publishedVersions, options) { } // src/format-publish-result.ts -var import_node_os4 = __toESM(require("node:os")); +var import_node_os5 = __toESM(require("node:os")); function formatPublishResult(manifest, options, results) { if (results === void 0) { return `\u{1F645}\u200D\u2640\uFE0F ${manifest.name}@${manifest.version} publish skipped.`; @@ -4975,7 +4990,7 @@ function formatPublishResult(manifest, options, results) { `\u{1F4E6} ${results.id}${options.dryRun.value ? " (DRY RUN)" : ""}`, "=== Contents ===", ...results.files.map(({ path: path3, size }) => `${formatSize(size)} ${path3}`) - ].join(import_node_os4.default.EOL); + ].join(import_node_os5.default.EOL); } var formatSize = (size) => { if (size < 1e3) { diff --git a/src/npm/call-npm-cli.ts b/src/npm/call-npm-cli.ts index 91aa479..476674f 100644 --- a/src/npm/call-npm-cli.ts +++ b/src/npm/call-npm-cli.ts @@ -1,4 +1,5 @@ import childProcess from "node:child_process"; +import os from "node:os"; import * as errors from "../errors.js"; import type { Logger } from "../options.js"; @@ -10,6 +11,7 @@ export interface NpmCliOptions { logger?: Logger | undefined; } +const NPM = os.platform() === "win32" ? "npm.cmd" : "npm"; const JSON_MATCH_RE = /(\{[\s\S]*\})/mu; const execNpm = ( @@ -17,13 +19,13 @@ const execNpm = ( environment: Record = {}, logger?: Logger ): Promise<{ stdout: string; stderr: string; exitCode: number }> => { - logger?.debug?.(`Running command: npm ${commandArguments.join(" ")}`); + logger?.debug?.(`Running command: ${NPM} ${commandArguments.join(" ")}`); return new Promise((resolve) => { let stdout = ""; let stderr = ""; - const npm = childProcess.spawn("npm", commandArguments, { + const npm = childProcess.spawn(NPM, commandArguments, { env: { ...process.env, ...environment }, }); From 7dda521f3f266551d0b4a57a63cd7b96da95b5ac Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Wed, 19 Apr 2023 21:36:34 -0400 Subject: [PATCH 28/36] fixup: keep trying to get these e2e tests to work with spaced package path --- .github/workflows/ci-cd.yml | 12 ++++++------ e2e/02-publish.sh | 2 ++ e2e/README.md | 14 +++++++------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 7268ae0..8c2c34c 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -133,12 +133,12 @@ jobs: TOKEN: ${{ steps.setup.outputs.token }} PACKAGE: ${{ steps.setup.outputs.package }} run: | - ./e2e/02-publish.sh ${PACKAGE} ${TOKEN} - ./e2e/03-verify.sh ${PACKAGE} - ./e2e/02-publish.sh ${PACKAGE} ${TOKEN} - ./e2e/01-setup-package.sh ${PACKAGE} 0.0.2 - ./e2e/02-publish.sh ${PACKAGE} ${TOKEN} - ./e2e/03-verify.sh ${PACKAGE} + ./e2e/02-publish.sh "${PACKAGE}" ${TOKEN} + ./e2e/03-verify.sh "${PACKAGE}" + ./e2e/02-publish.sh "${PACKAGE}" ${TOKEN} + ./e2e/01-setup-package.sh "${PACKAGE}" 0.0.2 + ./e2e/02-publish.sh "${PACKAGE}" ${TOKEN} + ./e2e/03-verify.sh "${PACKAGE}" - id: action-no-publish name: Publish with already published version diff --git a/e2e/02-publish.sh b/e2e/02-publish.sh index d9d6875..bddc052 100755 --- a/e2e/02-publish.sh +++ b/e2e/02-publish.sh @@ -8,4 +8,6 @@ REGISTRY_URL="http://localhost:4873" PACKAGE_SPEC="$1" TOKEN="$2" +echo "DEBUG: publishing ${PACKAGE_SPEC} to ${REGISTRY_URL}" 1>&2 + node ./bin/npm-publish --token=${TOKEN} --registry=${REGISTRY_URL} "${PACKAGE_SPEC}" diff --git a/e2e/README.md b/e2e/README.md index 5476018..412eafe 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -22,7 +22,7 @@ Login to the local registry and create a fixture package. ```shell export TOKEN=$(./e2e/00-login.sh) -export PACKAGE=$(./e2e/01-setup-package.sh "./e2e/fixture/cool package" 0.0.1) +export PACKAGE=$(./e2e/01-setup-package.sh ./e2e/fixture/cool\ package 0.0.1) ``` ### Test the CLI @@ -35,10 +35,10 @@ export PACKAGE=$(./e2e/01-setup-package.sh "./e2e/fixture/cool package" 0.0.1) 6. Verify the new version was published. ```shell -./e2e/02-publish.sh ${PACKAGE} ${TOKEN} -./e2e/03-verify.sh ${PACKAGE} -./e2e/02-publish.sh ${PACKAGE} ${TOKEN} -./e2e/01-setup-package.sh ${PACKAGE} 0.0.2 -./e2e/02-publish.sh ${PACKAGE} ${TOKEN} -./e2e/03-verify.sh ${PACKAGE} +./e2e/02-publish.sh "${PACKAGE}" ${TOKEN} +./e2e/03-verify.sh "${PACKAGE}" +./e2e/02-publish.sh "${PACKAGE}" ${TOKEN} +./e2e/01-setup-package.sh "${PACKAGE}" 0.0.2 +./e2e/02-publish.sh "${PACKAGE}" ${TOKEN} +./e2e/03-verify.sh "${PACKAGE}" ``` From 9f02b380bbf2cc0ceeba2b550a8212a1808a1020 Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Wed, 19 Apr 2023 21:40:17 -0400 Subject: [PATCH 29/36] fixup: think I got it this time --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 8c2c34c..a52ea69 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -156,7 +156,7 @@ jobs: - name: Create new version for Action end-to-end test shell: bash - run: ./e2e/01-setup-package.sh ${{ steps.setup.outputs.package }} 0.0.3 + run: ./e2e/01-setup-package.sh "${{ steps.setup.outputs.package }}" 0.0.3 - id: action-publish name: Publish a new version From 676a76bfc09558571cfe7ee1884b16abf69b2214 Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Wed, 19 Apr 2023 21:41:25 -0400 Subject: [PATCH 30/36] fixup: actually run these tests on different os's --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index a52ea69..c5e245e 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -15,7 +15,7 @@ on: jobs: test: name: Run unit tests with Node.js ${{ matrix.node-version }} on ${{ matrix.os }} - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} timeout-minutes: 10 strategy: fail-fast: false From c71a30b50ba4ea2de9f2e56ff401a4a7143d235a Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Wed, 19 Apr 2023 21:46:28 -0400 Subject: [PATCH 31/36] fixup: fix environment test on windows --- .github/workflows/ci-cd.yml | 2 +- src/npm/__tests__/call-npm-cli.test.ts | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index c5e245e..95a30af 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -149,7 +149,7 @@ jobs: token: ${{ steps.setup.outputs.token }} - name: Check action output - if: ${{ steps.action-no-publish.outputs.type != '' }} + if: ${{ steps.action-no-publish.outputs.type }} run: | echo "::error::Expected release type to be '', got '${{ steps.action-no-publish.outputs.type }}'" exit 1 diff --git a/src/npm/__tests__/call-npm-cli.test.ts b/src/npm/__tests__/call-npm-cli.test.ts index 3452680..29ea5b0 100644 --- a/src/npm/__tests__/call-npm-cli.test.ts +++ b/src/npm/__tests__/call-npm-cli.test.ts @@ -1,3 +1,5 @@ +import os from "node:os"; +import path from "node:path"; import { describe, it, expect } from "vitest"; import * as errors from "../../errors.js"; @@ -37,10 +39,14 @@ describe("callNpmCli", () => { }); it("should allow the environment to be overriden", async () => { + const customPath = path.join(os.homedir(), "foo", ".npmrc"); + const result = await subject.callNpmCli("config", ["get", "userconfig"], { - environment: { npm_config_userconfig: "/foo/bar/.npmrc" }, + environment: { + npm_config_userconfig: customPath, + }, }); - expect(result).toEqual("/foo/bar/.npmrc"); + expect(result).toEqual(customPath); }); }); From 8578e2b058283d6922b0229faf64dda98d7aa907 Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Wed, 19 Apr 2023 21:49:40 -0400 Subject: [PATCH 32/36] fixup: check name tweaks --- .github/workflows/ci-cd.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 95a30af..7658404 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -14,7 +14,7 @@ on: jobs: test: - name: Run unit tests with Node.js ${{ matrix.node-version }} on ${{ matrix.os }} + name: Unit tests / Node.js ${{ matrix.node-version }} / ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 10 strategy: @@ -86,7 +86,7 @@ jobs: path: lib e2e: - name: Run E2E tests with Node.js ${{ matrix.node-version }} + name: E2E tests / Node.js ${{ matrix.node-version }} runs-on: ubuntu-latest timeout-minutes: 10 needs: build @@ -174,7 +174,7 @@ jobs: deploy: if: ${{ github.ref == 'refs/heads/main' }} - name: Publish to NPM + name: Publish runs-on: ubuntu-latest timeout-minutes: 10 needs: From 255f0da875673682ff0787dd36273ec0e50efe29 Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Wed, 19 Apr 2023 21:56:28 -0400 Subject: [PATCH 33/36] fixup: error name typo --- src/errors.ts | 4 ++-- src/npm/__tests__/call-npm-cli.test.ts | 2 +- src/npm/call-npm-cli.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/errors.ts b/src/errors.ts index 7b3a684..aa24ec6 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -101,7 +101,7 @@ export class InvalidStrategyError extends TypeError { } } -export class NpmCalError extends Error { +export class NpmCallError extends Error { public constructor(command: string, exitCode: number, stderr: string) { super( [ @@ -109,6 +109,6 @@ export class NpmCalError extends Error { stderr, ].join(os.EOL) ); - this.name = "NpmCalError"; + this.name = "NpmCallError"; } } diff --git a/src/npm/__tests__/call-npm-cli.test.ts b/src/npm/__tests__/call-npm-cli.test.ts index 29ea5b0..9d97aa3 100644 --- a/src/npm/__tests__/call-npm-cli.test.ts +++ b/src/npm/__tests__/call-npm-cli.test.ts @@ -21,7 +21,7 @@ describe("callNpmCli", () => { it("should raise if error", async () => { const result = subject.callNpmCli("explain", ["not-a-real-package"]); - await expect(result).rejects.toThrow(errors.NpmCalError); + await expect(result).rejects.toThrow(errors.NpmCallError); }); it("should map an error code to a return value", async () => { diff --git a/src/npm/call-npm-cli.ts b/src/npm/call-npm-cli.ts index 476674f..0d74583 100644 --- a/src/npm/call-npm-cli.ts +++ b/src/npm/call-npm-cli.ts @@ -91,7 +91,7 @@ export async function callNpmCli( return options.ifError[errorCode] as TReturn; } - throw new errors.NpmCalError(command, exitCode, stderr); + throw new errors.NpmCallError(command, exitCode, stderr); } return parseJson(stdout) ?? (stdout as unknown as TReturn); From 2ec381c641192af4b135d4400f277b8e49207327 Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Wed, 19 Apr 2023 22:09:37 -0400 Subject: [PATCH 34/36] fixup: build after typo fixes --- dist/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/main.js b/dist/main.js index 8079ef6..054c3fa 100644 --- a/dist/main.js +++ b/dist/main.js @@ -4693,7 +4693,7 @@ var InvalidStrategyError = class extends TypeError { this.name = "InvalidStrategyError"; } }; -var NpmCalError = class extends Error { +var NpmCallError = class extends Error { constructor(command, exitCode, stderr) { super( [ @@ -4701,7 +4701,7 @@ var NpmCalError = class extends Error { stderr ].join(import_node_os.default.EOL) ); - this.name = "NpmCalError"; + this.name = "NpmCallError"; } }; @@ -4910,7 +4910,7 @@ async function callNpmCli(command, cliArguments, options = {}) { if (typeof errorCode === "string" && options.ifError && errorCode in options.ifError) { return options.ifError[errorCode]; } - throw new NpmCalError(command, exitCode, stderr); + throw new NpmCallError(command, exitCode, stderr); } return parseJson(stdout) ?? stdout; } From bca9d6621cbe4bd3d55b0094411efb5a25046e16 Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Wed, 19 Apr 2023 22:21:23 -0400 Subject: [PATCH 35/36] fixup: ci tweaks --- .github/workflows/ci-cd.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 7658404..a9c3be9 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -37,9 +37,6 @@ jobs: with: node-version: ${{ matrix.node-version }} - - name: Build the code - run: npm run build - - name: Run tests run: npm run coverage @@ -76,6 +73,11 @@ jobs: - name: Build run: npm run build + - name: Verify no un-staged changes + run: | + git status --porcelain + git diff-files --quiet + - name: Run lints run: npm run lint From 2cb1fd691518c70f8517b23306017d802d99b855 Mon Sep 17 00:00:00 2001 From: Mike Cousins Date: Wed, 19 Apr 2023 22:25:50 -0400 Subject: [PATCH 36/36] fixup: add missing sourcemap --- dist/main.js.map | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 dist/main.js.map diff --git a/dist/main.js.map b/dist/main.js.map new file mode 100644 index 0000000..41fc205 --- /dev/null +++ b/dist/main.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../node_modules/semver/internal/constants.js", "../node_modules/semver/internal/debug.js", "../node_modules/semver/internal/re.js", "../node_modules/semver/internal/parse-options.js", "../node_modules/semver/internal/identifiers.js", "../node_modules/semver/classes/semver.js", "../node_modules/semver/functions/parse.js", "../node_modules/semver/functions/valid.js", "../node_modules/semver/functions/clean.js", "../node_modules/semver/functions/inc.js", "../node_modules/semver/functions/diff.js", "../node_modules/semver/functions/major.js", "../node_modules/semver/functions/minor.js", "../node_modules/semver/functions/patch.js", "../node_modules/semver/functions/prerelease.js", "../node_modules/semver/functions/compare.js", "../node_modules/semver/functions/rcompare.js", "../node_modules/semver/functions/compare-loose.js", "../node_modules/semver/functions/compare-build.js", "../node_modules/semver/functions/sort.js", "../node_modules/semver/functions/rsort.js", "../node_modules/semver/functions/gt.js", "../node_modules/semver/functions/lt.js", "../node_modules/semver/functions/eq.js", "../node_modules/semver/functions/neq.js", "../node_modules/semver/functions/gte.js", "../node_modules/semver/functions/lte.js", "../node_modules/semver/functions/cmp.js", "../node_modules/semver/functions/coerce.js", "../node_modules/semver/node_modules/yallist/iterator.js", "../node_modules/semver/node_modules/yallist/yallist.js", "../node_modules/semver/node_modules/lru-cache/index.js", "../node_modules/semver/classes/range.js", "../node_modules/semver/classes/comparator.js", "../node_modules/semver/functions/satisfies.js", "../node_modules/semver/ranges/to-comparators.js", "../node_modules/semver/ranges/max-satisfying.js", "../node_modules/semver/ranges/min-satisfying.js", "../node_modules/semver/ranges/min-version.js", "../node_modules/semver/ranges/valid.js", "../node_modules/semver/ranges/outside.js", "../node_modules/semver/ranges/gtr.js", "../node_modules/semver/ranges/ltr.js", "../node_modules/semver/ranges/intersects.js", "../node_modules/semver/ranges/simplify.js", "../node_modules/semver/ranges/subset.js", "../node_modules/semver/index.js", "../node_modules/@actions/core/src/utils.ts", "../node_modules/@actions/core/src/command.ts", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js", "../node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js", "../node_modules/@actions/core/src/file-command.ts", "../node_modules/@actions/http-client/src/proxy.ts", "../node_modules/tunnel/lib/tunnel.js", "../node_modules/tunnel/index.js", "../node_modules/@actions/http-client/src/index.ts", "../node_modules/@actions/http-client/src/auth.ts", "../node_modules/@actions/core/src/oidc-utils.ts", "../node_modules/@actions/core/src/summary.ts", "../node_modules/@actions/core/src/path-utils.ts", "../node_modules/@actions/core/src/core.ts", "../src/options.ts", "../src/errors.ts", "../src/read-manifest.ts", "../src/normalize-options.ts", "../src/npm/use-npm-environment.ts", "../src/npm/call-npm-cli.ts", "../src/npm/get-publish-arguments.ts", "../src/npm/index.ts", "../src/compare-versions.ts", "../src/format-publish-result.ts", "../src/npm-publish.ts", "../src/action/core.ts", "../src/action/main.ts"], + "sourcesContent": ["// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n", "const debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n", "const { MAX_SAFE_COMPONENT_LENGTH } = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst src = exports.src = []\nconst t = exports.t = {}\nlet R = 0\n\nconst createToken = (name, value, isGlobal) => {\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '[0-9]+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', '\\\\d*[a-zA-Z-][a-zA-Z0-9-]*')\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+')\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCE', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n", "// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n", "const numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n", "const debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid Version: ${require('util').inspect(version)}`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre': {\n const base = Number(identifierBase) ? 1 : 0\n\n if (!identifier && identifierBase === false) {\n throw new Error('invalid increment argument: identifier is empty')\n }\n\n if (this.prerelease.length === 0) {\n this.prerelease = [base]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n if (identifier === this.prerelease.join('.') && identifierBase === false) {\n throw new Error('invalid increment argument: identifier already exists')\n }\n this.prerelease.push(base)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n let prerelease = [identifier, base]\n if (identifierBase === false) {\n prerelease = [identifier]\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease\n }\n } else {\n this.prerelease = prerelease\n }\n }\n break\n }\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.format()\n this.raw = this.version\n return this\n }\n}\n\nmodule.exports = SemVer\n", "const SemVer = require('../classes/semver')\nconst parse = (version, options, throwErrors = false) => {\n if (version instanceof SemVer) {\n return version\n }\n try {\n return new SemVer(version, options)\n } catch (er) {\n if (!throwErrors) {\n return null\n }\n throw er\n }\n}\n\nmodule.exports = parse\n", "const parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n", "const parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n", "const SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n", "const parse = require('./parse.js')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1, null, true)\n const v2 = parse(version2, null, true)\n const comparison = v1.compare(v2)\n\n if (comparison === 0) {\n return null\n }\n\n const v1Higher = comparison > 0\n const highVersion = v1Higher ? v1 : v2\n const lowVersion = v1Higher ? v2 : v1\n const highHasPre = !!highVersion.prerelease.length\n\n // add the `pre` prefix if we are going to a prerelease version\n const prefix = highHasPre ? 'pre' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n // at this point we know stable versions match but overall versions are not equal,\n // so either they are both prereleases, or the lower version is a prerelease\n\n if (highHasPre) {\n // high and low are preleases\n return 'prerelease'\n }\n\n if (lowVersion.patch) {\n // anything higher than a patch bump would result in the wrong version\n return 'patch'\n }\n\n if (lowVersion.minor) {\n // anything higher than a minor bump would result in the wrong version\n return 'minor'\n }\n\n // bumping major/minor/patch all have same result\n return 'major'\n}\n\nmodule.exports = diff\n", "const SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n", "const SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n", "const SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n", "const parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n", "const SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n", "const compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n", "const compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n", "const SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n", "const compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n", "const compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n", "const compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n", "const compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n", "const compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n", "const compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n", "const compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n", "const compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n", "const eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n", "const SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n let next\n while ((next = re[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n re[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)\n}\nmodule.exports = coerce\n", "'use strict'\nmodule.exports = function (Yallist) {\n Yallist.prototype[Symbol.iterator] = function* () {\n for (let walker = this.head; walker; walker = walker.next) {\n yield walker.value\n }\n }\n}\n", "'use strict'\nmodule.exports = Yallist\n\nYallist.Node = Node\nYallist.create = Yallist\n\nfunction Yallist (list) {\n var self = this\n if (!(self instanceof Yallist)) {\n self = new Yallist()\n }\n\n self.tail = null\n self.head = null\n self.length = 0\n\n if (list && typeof list.forEach === 'function') {\n list.forEach(function (item) {\n self.push(item)\n })\n } else if (arguments.length > 0) {\n for (var i = 0, l = arguments.length; i < l; i++) {\n self.push(arguments[i])\n }\n }\n\n return self\n}\n\nYallist.prototype.removeNode = function (node) {\n if (node.list !== this) {\n throw new Error('removing node which does not belong to this list')\n }\n\n var next = node.next\n var prev = node.prev\n\n if (next) {\n next.prev = prev\n }\n\n if (prev) {\n prev.next = next\n }\n\n if (node === this.head) {\n this.head = next\n }\n if (node === this.tail) {\n this.tail = prev\n }\n\n node.list.length--\n node.next = null\n node.prev = null\n node.list = null\n\n return next\n}\n\nYallist.prototype.unshiftNode = function (node) {\n if (node === this.head) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var head = this.head\n node.list = this\n node.next = head\n if (head) {\n head.prev = node\n }\n\n this.head = node\n if (!this.tail) {\n this.tail = node\n }\n this.length++\n}\n\nYallist.prototype.pushNode = function (node) {\n if (node === this.tail) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var tail = this.tail\n node.list = this\n node.prev = tail\n if (tail) {\n tail.next = node\n }\n\n this.tail = node\n if (!this.head) {\n this.head = node\n }\n this.length++\n}\n\nYallist.prototype.push = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n push(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.unshift = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n unshift(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.pop = function () {\n if (!this.tail) {\n return undefined\n }\n\n var res = this.tail.value\n this.tail = this.tail.prev\n if (this.tail) {\n this.tail.next = null\n } else {\n this.head = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.shift = function () {\n if (!this.head) {\n return undefined\n }\n\n var res = this.head.value\n this.head = this.head.next\n if (this.head) {\n this.head.prev = null\n } else {\n this.tail = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.forEach = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.head, i = 0; walker !== null; i++) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.next\n }\n}\n\nYallist.prototype.forEachReverse = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.prev\n }\n}\n\nYallist.prototype.get = function (n) {\n for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.next\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.getReverse = function (n) {\n for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.prev\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.map = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.head; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.next\n }\n return res\n}\n\nYallist.prototype.mapReverse = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.tail; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.prev\n }\n return res\n}\n\nYallist.prototype.reduce = function (fn, initial) {\n var acc\n var walker = this.head\n if (arguments.length > 1) {\n acc = initial\n } else if (this.head) {\n walker = this.head.next\n acc = this.head.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = 0; walker !== null; i++) {\n acc = fn(acc, walker.value, i)\n walker = walker.next\n }\n\n return acc\n}\n\nYallist.prototype.reduceReverse = function (fn, initial) {\n var acc\n var walker = this.tail\n if (arguments.length > 1) {\n acc = initial\n } else if (this.tail) {\n walker = this.tail.prev\n acc = this.tail.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = this.length - 1; walker !== null; i--) {\n acc = fn(acc, walker.value, i)\n walker = walker.prev\n }\n\n return acc\n}\n\nYallist.prototype.toArray = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.head; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.next\n }\n return arr\n}\n\nYallist.prototype.toArrayReverse = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.tail; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.prev\n }\n return arr\n}\n\nYallist.prototype.slice = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\n walker = walker.next\n }\n for (; walker !== null && i < to; i++, walker = walker.next) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.sliceReverse = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\n walker = walker.prev\n }\n for (; walker !== null && i > from; i--, walker = walker.prev) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.splice = function (start, deleteCount, ...nodes) {\n if (start > this.length) {\n start = this.length - 1\n }\n if (start < 0) {\n start = this.length + start;\n }\n\n for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\n walker = walker.next\n }\n\n var ret = []\n for (var i = 0; walker && i < deleteCount; i++) {\n ret.push(walker.value)\n walker = this.removeNode(walker)\n }\n if (walker === null) {\n walker = this.tail\n }\n\n if (walker !== this.head && walker !== this.tail) {\n walker = walker.prev\n }\n\n for (var i = 0; i < nodes.length; i++) {\n walker = insert(this, walker, nodes[i])\n }\n return ret;\n}\n\nYallist.prototype.reverse = function () {\n var head = this.head\n var tail = this.tail\n for (var walker = head; walker !== null; walker = walker.prev) {\n var p = walker.prev\n walker.prev = walker.next\n walker.next = p\n }\n this.head = tail\n this.tail = head\n return this\n}\n\nfunction insert (self, node, value) {\n var inserted = node === self.head ?\n new Node(value, null, node, self) :\n new Node(value, node, node.next, self)\n\n if (inserted.next === null) {\n self.tail = inserted\n }\n if (inserted.prev === null) {\n self.head = inserted\n }\n\n self.length++\n\n return inserted\n}\n\nfunction push (self, item) {\n self.tail = new Node(item, self.tail, null, self)\n if (!self.head) {\n self.head = self.tail\n }\n self.length++\n}\n\nfunction unshift (self, item) {\n self.head = new Node(item, null, self.head, self)\n if (!self.tail) {\n self.tail = self.head\n }\n self.length++\n}\n\nfunction Node (value, prev, next, list) {\n if (!(this instanceof Node)) {\n return new Node(value, prev, next, list)\n }\n\n this.list = list\n this.value = value\n\n if (prev) {\n prev.next = this\n this.prev = prev\n } else {\n this.prev = null\n }\n\n if (next) {\n next.prev = this\n this.next = next\n } else {\n this.next = null\n }\n}\n\ntry {\n // add if support for Symbol.iterator is present\n require('./iterator.js')(Yallist)\n} catch (er) {}\n", "'use strict'\n\n// A linked list to keep track of recently-used-ness\nconst Yallist = require('yallist')\n\nconst MAX = Symbol('max')\nconst LENGTH = Symbol('length')\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\nconst ALLOW_STALE = Symbol('allowStale')\nconst MAX_AGE = Symbol('maxAge')\nconst DISPOSE = Symbol('dispose')\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\nconst LRU_LIST = Symbol('lruList')\nconst CACHE = Symbol('cache')\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\n\nconst naiveLength = () => 1\n\n// lruList is a yallist where the head is the youngest\n// item, and the tail is the oldest. the list contains the Hit\n// objects as the entries.\n// Each Hit object has a reference to its Yallist.Node. This\n// never changes.\n//\n// cache is a Map (or PseudoMap) that matches the keys to\n// the Yallist.Node object.\nclass LRUCache {\n constructor (options) {\n if (typeof options === 'number')\n options = { max: options }\n\n if (!options)\n options = {}\n\n if (options.max && (typeof options.max !== 'number' || options.max < 0))\n throw new TypeError('max must be a non-negative number')\n // Kind of weird to have a default max of Infinity, but oh well.\n const max = this[MAX] = options.max || Infinity\n\n const lc = options.length || naiveLength\n this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\n this[ALLOW_STALE] = options.stale || false\n if (options.maxAge && typeof options.maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n this[MAX_AGE] = options.maxAge || 0\n this[DISPOSE] = options.dispose\n this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\n this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\n this.reset()\n }\n\n // resize the cache when the max changes.\n set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }\n get max () {\n return this[MAX]\n }\n\n set allowStale (allowStale) {\n this[ALLOW_STALE] = !!allowStale\n }\n get allowStale () {\n return this[ALLOW_STALE]\n }\n\n set maxAge (mA) {\n if (typeof mA !== 'number')\n throw new TypeError('maxAge must be a non-negative number')\n\n this[MAX_AGE] = mA\n trim(this)\n }\n get maxAge () {\n return this[MAX_AGE]\n }\n\n // resize the cache when the lengthCalculator changes.\n set lengthCalculator (lC) {\n if (typeof lC !== 'function')\n lC = naiveLength\n\n if (lC !== this[LENGTH_CALCULATOR]) {\n this[LENGTH_CALCULATOR] = lC\n this[LENGTH] = 0\n this[LRU_LIST].forEach(hit => {\n hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\n this[LENGTH] += hit.length\n })\n }\n trim(this)\n }\n get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n get length () { return this[LENGTH] }\n get itemCount () { return this[LRU_LIST].length }\n\n rforEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].tail; walker !== null;) {\n const prev = walker.prev\n forEachStep(this, fn, walker, thisp)\n walker = prev\n }\n }\n\n forEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].head; walker !== null;) {\n const next = walker.next\n forEachStep(this, fn, walker, thisp)\n walker = next\n }\n }\n\n keys () {\n return this[LRU_LIST].toArray().map(k => k.key)\n }\n\n values () {\n return this[LRU_LIST].toArray().map(k => k.value)\n }\n\n reset () {\n if (this[DISPOSE] &&\n this[LRU_LIST] &&\n this[LRU_LIST].length) {\n this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\n }\n\n this[CACHE] = new Map() // hash of items by key\n this[LRU_LIST] = new Yallist() // list of items in order of use recency\n this[LENGTH] = 0 // length of items in the list\n }\n\n dump () {\n return this[LRU_LIST].map(hit =>\n isStale(this, hit) ? false : {\n k: hit.key,\n v: hit.value,\n e: hit.now + (hit.maxAge || 0)\n }).toArray().filter(h => h)\n }\n\n dumpLru () {\n return this[LRU_LIST]\n }\n\n set (key, value, maxAge) {\n maxAge = maxAge || this[MAX_AGE]\n\n if (maxAge && typeof maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n\n const now = maxAge ? Date.now() : 0\n const len = this[LENGTH_CALCULATOR](value, key)\n\n if (this[CACHE].has(key)) {\n if (len > this[MAX]) {\n del(this, this[CACHE].get(key))\n return false\n }\n\n const node = this[CACHE].get(key)\n const item = node.value\n\n // dispose of the old one before overwriting\n // split out into 2 ifs for better coverage tracking\n if (this[DISPOSE]) {\n if (!this[NO_DISPOSE_ON_SET])\n this[DISPOSE](key, item.value)\n }\n\n item.now = now\n item.maxAge = maxAge\n item.value = value\n this[LENGTH] += len - item.length\n item.length = len\n this.get(key)\n trim(this)\n return true\n }\n\n const hit = new Entry(key, value, len, now, maxAge)\n\n // oversized objects fall out of cache automatically.\n if (hit.length > this[MAX]) {\n if (this[DISPOSE])\n this[DISPOSE](key, value)\n\n return false\n }\n\n this[LENGTH] += hit.length\n this[LRU_LIST].unshift(hit)\n this[CACHE].set(key, this[LRU_LIST].head)\n trim(this)\n return true\n }\n\n has (key) {\n if (!this[CACHE].has(key)) return false\n const hit = this[CACHE].get(key).value\n return !isStale(this, hit)\n }\n\n get (key) {\n return get(this, key, true)\n }\n\n peek (key) {\n return get(this, key, false)\n }\n\n pop () {\n const node = this[LRU_LIST].tail\n if (!node)\n return null\n\n del(this, node)\n return node.value\n }\n\n del (key) {\n del(this, this[CACHE].get(key))\n }\n\n load (arr) {\n // reset the cache\n this.reset()\n\n const now = Date.now()\n // A previous serialized cache has the most recent items first\n for (let l = arr.length - 1; l >= 0; l--) {\n const hit = arr[l]\n const expiresAt = hit.e || 0\n if (expiresAt === 0)\n // the item was created without expiration in a non aged cache\n this.set(hit.k, hit.v)\n else {\n const maxAge = expiresAt - now\n // dont add already expired items\n if (maxAge > 0) {\n this.set(hit.k, hit.v, maxAge)\n }\n }\n }\n }\n\n prune () {\n this[CACHE].forEach((value, key) => get(this, key, false))\n }\n}\n\nconst get = (self, key, doUse) => {\n const node = self[CACHE].get(key)\n if (node) {\n const hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n return undefined\n } else {\n if (doUse) {\n if (self[UPDATE_AGE_ON_GET])\n node.value.now = Date.now()\n self[LRU_LIST].unshiftNode(node)\n }\n }\n return hit.value\n }\n}\n\nconst isStale = (self, hit) => {\n if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n return false\n\n const diff = Date.now() - hit.now\n return hit.maxAge ? diff > hit.maxAge\n : self[MAX_AGE] && (diff > self[MAX_AGE])\n}\n\nconst trim = self => {\n if (self[LENGTH] > self[MAX]) {\n for (let walker = self[LRU_LIST].tail;\n self[LENGTH] > self[MAX] && walker !== null;) {\n // We know that we're about to delete this one, and also\n // what the next least recently used key will be, so just\n // go ahead and set it now.\n const prev = walker.prev\n del(self, walker)\n walker = prev\n }\n }\n}\n\nconst del = (self, node) => {\n if (node) {\n const hit = node.value\n if (self[DISPOSE])\n self[DISPOSE](hit.key, hit.value)\n\n self[LENGTH] -= hit.length\n self[CACHE].delete(hit.key)\n self[LRU_LIST].removeNode(node)\n }\n}\n\nclass Entry {\n constructor (key, value, length, now, maxAge) {\n this.key = key\n this.value = value\n this.length = length\n this.now = now\n this.maxAge = maxAge || 0\n }\n}\n\nconst forEachStep = (self, fn, node, thisp) => {\n let hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n hit = undefined\n }\n if (hit)\n fn.call(thisp, hit.value, hit.key, self)\n}\n\nmodule.exports = LRUCache\n", "// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.format()\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First, split based on boolean or ||\n this.raw = range\n this.set = range\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${range}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.format()\n }\n\n format () {\n this.range = this.set\n .map((comps) => {\n return comps.join(' ').trim()\n })\n .join('||')\n .trim()\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n range = range.trim()\n\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('lru-cache')\nconst cache = new LRU({ max: 1000 })\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) =>\n comp.trim().split(/\\s+/).map((c) => {\n return replaceTilde(c, options)\n }).join(' ')\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) =>\n comp.trim().split(/\\s+/).map((c) => {\n return replaceCaret(c, options)\n }).join(' ')\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map((c) => {\n return replaceXRange(c, options)\n }).join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp.trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return (`${from} ${to}`).trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n", "const ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n", "const Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n", "const Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n", "const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n", "const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n", "const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n", "const Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n", "const SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n", "// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n", "const outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n", "const Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n", "// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n", "const Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n", "// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n", null, null, "import crypto from 'crypto';\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\nexport default function rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n crypto.randomFillSync(rnds8Pool);\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}", "export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;", "import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;", "import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;", "import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;", "import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;", "import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}", "import crypto from 'crypto';\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('md5').update(bytes).digest();\n}\n\nexport default md5;", "import v35 from './v35.js';\nimport md5 from './md5.js';\nconst v3 = v35('v3', 0x30, md5);\nexport default v3;", "import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;", "import crypto from 'crypto';\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('sha1').update(bytes).digest();\n}\n\nexport default sha1;", "import v35 from './v35.js';\nimport sha1 from './sha1.js';\nconst v5 = v35('v5', 0x50, sha1);\nexport default v5;", "export default '00000000-0000-0000-0000-000000000000';", "import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;", "export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';", null, null, "'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n", "module.exports = require('./lib/tunnel');\n", null, null, null, null, null, null, "/** The possible access levels for an NPM package */\nexport type Access = typeof ACCESS_PUBLIC | typeof ACCESS_RESTRICTED;\nexport const ACCESS_PUBLIC = \"public\";\nexport const ACCESS_RESTRICTED = \"restricted\";\n\n/**\n * Version check strategy.\n *\n * - `upgrade`: the package will only be published if its version is higher than\n * the existing version on the configured tag.\n * - `all`: the package will be published if its version is not yet published,\n * even if its lower that the existing tag.\n */\nexport type Strategy = typeof STRATEGY_UPGRADE | typeof STRATEGY_ALL;\nexport const STRATEGY_UPGRADE = \"upgrade\";\nexport const STRATEGY_ALL = \"all\";\n\n/** An interface that can be used to log messages. */\nexport interface Logger {\n error: (message: string | Error) => void;\n info?: undefined | ((message: string) => void);\n debug?: undefined | ((message: string) => void);\n}\n\n/** Options that determine how/whether the package is published. */\nexport interface Options {\n /** The NPM access token to use when publishing. */\n token: string;\n\n /**\n * The absolute or relative path of your package.\n *\n * Defaults to the package in the current working directory.\n */\n package?: string | undefined;\n\n /**\n * The NPM registry URL to use.\n *\n * Defaults to \"https://registry.npmjs.org/\".\n *\n * Can be overridden by the package.json's `publishConfig` field.\n */\n registry?: string | URL | undefined;\n\n /**\n * The tag to publish to.\n *\n * Defaults to \"latest\".\n *\n * Can be overridden by the package.json's `publishConfig` field.\n */\n tag?: string | undefined;\n\n /**\n * Package access.\n *\n * Determines whether the published package should be publicly visible, or\n * restricted to members of your NPM organization. This only applies to scoped\n * packages.\n *\n * Defaults to \"restricted\" for scoped packages, unless that package has been\n * previously published as `public`\n *\n * Can be overridden by the package.json's `publishConfig` field.\n */\n access?: Access | undefined;\n\n /**\n * Version check strategy.\n *\n * If \"upgrade\" (default), the package will only be published if its version\n * is higher than the existing version on the configured tag. If \"always\", the\n * package will be published if its version is simply not yet published.\n *\n * Defaults to `upgrade`.\n */\n strategy?: Strategy | undefined;\n\n /**\n * Pretend to publish, but don't actually upload to the registry.\n *\n * Defaults to `false`.\n */\n dryRun?: boolean | undefined;\n\n /** Optional logger. */\n logger?: Logger | undefined;\n\n /**\n * Temporary directory.\n *\n * Defaults to os.tmpdir()\n */\n temporaryDirectory?: string | undefined;\n}\n", "import os from \"node:os\";\n\nimport {\n ACCESS_PUBLIC,\n ACCESS_RESTRICTED,\n STRATEGY_ALL,\n STRATEGY_UPGRADE,\n} from \"./options.js\";\n\nexport class InvalidPackageError extends TypeError {\n public constructor(value: unknown) {\n super(\n `Package must be a directory or package.json file, got \"${String(value)}\"`\n );\n this.name = \"PackageJsonReadError\";\n }\n}\n\nexport class PackageJsonReadError extends Error {\n public constructor(manifestPath: string, originalError: unknown) {\n const message = [\n `Could not read package.json at ${manifestPath}`,\n originalError instanceof Error ? originalError.message : \"\",\n ]\n .filter(Boolean)\n .join(os.EOL);\n\n super(message);\n this.name = \"PackageJsonReadError\";\n }\n}\n\nexport class PackageJsonParseError extends SyntaxError {\n public constructor(manifestPath: string, originalError: unknown) {\n const message = [\n `Invalid JSON, could not parse package.json at ${manifestPath}`,\n originalError instanceof Error ? originalError.message : \"\",\n ]\n .filter(Boolean)\n .join(os.EOL);\n\n super(message);\n this.name = \"PackageJsonParseError\";\n }\n}\n\nexport class InvalidPackageNameError extends TypeError {\n public constructor(value: unknown) {\n super(`Package name must be a string, got \"${String(value)}\"`);\n this.name = \"InvalidPackageNameError\";\n }\n}\n\nexport class InvalidPackageVersionError extends TypeError {\n public constructor(value: unknown) {\n super(`Package version must be a string, got \"${String(value)}\"`);\n this.name = \"InvalidPackageVersionError\";\n }\n}\n\nexport class InvalidPackagePublishConfigError extends TypeError {\n public constructor(value: unknown) {\n super(`Publish config must be an object, got \"${String(value)}\"`);\n this.name = \"InvalidPackagePublishConfigError\";\n }\n}\n\nexport class InvalidRegistryUrlError extends TypeError {\n public constructor(value: unknown) {\n super(`Registry URL invalid, got \"${String(value)}\"`);\n this.name = \"InvalidRegistryUrlError\";\n }\n}\n\nexport class InvalidTokenError extends TypeError {\n public constructor() {\n super(\"Token must be a non-empty string.\");\n this.name = \"InvalidTokenError\";\n }\n}\n\nexport class InvalidAccessError extends TypeError {\n public constructor(value: unknown) {\n super(\n `Access must be \"${ACCESS_PUBLIC}\" or \"${ACCESS_RESTRICTED}\", got \"${String(\n value\n )}\".`\n );\n this.name = \"InvalidAccessError\";\n }\n}\n\nexport class InvalidStrategyError extends TypeError {\n public constructor(value: unknown) {\n super(\n `Strategy must be \"${STRATEGY_UPGRADE}\" or \"${STRATEGY_ALL}\", got \"${String(\n value\n )}\".`\n );\n this.name = \"InvalidStrategyError\";\n }\n}\n\nexport class NpmCallError extends Error {\n public constructor(command: string, exitCode: number, stderr: string) {\n super(\n [\n `Call to \"npm ${command}\" exited with non-zero exit code ${exitCode}`,\n stderr,\n ].join(os.EOL)\n );\n this.name = \"NpmCallError\";\n }\n}\n", "import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { valid as semverValid } from \"semver\";\n\nimport * as errors from \"./errors.js\";\n\n/** The result of reading a package manifest */\nexport interface ManifestReadResult {\n packageSpec: string;\n manifest: PackageManifest;\n}\n\n/** A package manifest (package.json) */\nexport interface PackageManifest {\n name: string;\n version: string;\n scope: string | undefined;\n publishConfig: PackagePublishConfig | undefined;\n}\n\n/** Any publish configuration defined in package.json. */\nexport interface PackagePublishConfig {\n tag?: string;\n access?: string;\n registry?: string;\n}\n\nconst SCOPE_RE = /^(@.+)\\/.+$/u;\n\nconst MANIFEST_BASENAME = \"package.json\";\n\nconst isManifest = (name: unknown): name is string => {\n return typeof name === \"string\" && path.basename(name) === MANIFEST_BASENAME;\n};\n\nconst isDirectory = (name: unknown): name is string => {\n return typeof name === \"string\" && path.extname(name) === \"\";\n};\n\nconst isVersion = (version: unknown): version is string => {\n return semverValid(version as string) !== null;\n};\n\n/**\n * Reads the package manifest (package.json) and returns its parsed contents.\n *\n * @param packagePath The path to the package being published.\n * @returns The parsed package metadata.\n */\nexport async function readManifest(\n packagePath: unknown\n): Promise {\n let packageSpec: string | undefined;\n let manifestPath: string;\n\n if (!packagePath) {\n packageSpec = \"\";\n manifestPath = path.resolve(MANIFEST_BASENAME);\n } else if (isManifest(packagePath)) {\n packageSpec = path.resolve(path.dirname(packagePath));\n manifestPath = path.resolve(packagePath);\n } else if (isDirectory(packagePath)) {\n packageSpec = path.resolve(packagePath);\n manifestPath = path.resolve(packagePath, MANIFEST_BASENAME);\n } else {\n throw new errors.InvalidPackageError(packagePath);\n }\n\n let manifestContents: string;\n let manifestJson: Record;\n let name: unknown;\n let version: unknown;\n let publishConfig: unknown;\n\n try {\n manifestContents = await fs.readFile(manifestPath, \"utf8\");\n } catch (error) {\n throw new errors.PackageJsonReadError(manifestPath, error);\n }\n\n try {\n manifestJson = JSON.parse(manifestContents) as Record;\n name = manifestJson[\"name\"];\n version = manifestJson[\"version\"];\n publishConfig = manifestJson[\"publishConfig\"] ?? {};\n } catch (error) {\n throw new errors.PackageJsonParseError(manifestPath, error);\n }\n\n if (typeof name !== \"string\" || name.length === 0) {\n throw new errors.InvalidPackageNameError(name);\n }\n\n if (!isVersion(version)) {\n throw new errors.InvalidPackageVersionError(version);\n }\n\n if (\n typeof publishConfig !== \"object\" ||\n Array.isArray(publishConfig) ||\n !publishConfig\n ) {\n throw new errors.InvalidPackagePublishConfigError(publishConfig);\n }\n\n return {\n packageSpec,\n manifest: { name, version, publishConfig, scope: SCOPE_RE.exec(name)?.[1] },\n };\n}\n", "import os from \"node:os\";\n\nimport * as errors from \"./errors.js\";\nimport type { PackageManifest } from \"./read-manifest.js\";\nimport {\n ACCESS_PUBLIC,\n ACCESS_RESTRICTED,\n STRATEGY_UPGRADE,\n STRATEGY_ALL,\n type Access,\n type Strategy,\n type Options,\n type Logger,\n} from \"./options.js\";\n\nconst DEFAULT_REGISTRY = \"https://registry.npmjs.org/\";\nconst DEFAULT_TAG = \"latest\";\n\n/** Normalized and sanitized auth, publish, and runtime configurations. */\nexport interface NormalizedOptions {\n registry: URL;\n token: string;\n tag: ConfigValue;\n access: ConfigValue;\n dryRun: ConfigValue;\n strategy: ConfigValue;\n logger: Logger | undefined;\n temporaryDirectory: string;\n}\n\n/** A config value, and whether that value differs from default. */\nexport interface ConfigValue {\n value: TValue;\n isDefault: boolean;\n}\n\n/**\n * Normalizes and sanitizes options, and fills-in any default values.\n *\n * @param options User-input options.\n * @param manifest Package metadata from package.json.\n * @returns Validated auth and publish configuration.\n */\nexport function normalizeOptions(\n options: Options,\n manifest: PackageManifest\n): NormalizedOptions {\n const defaultTag = manifest.publishConfig?.tag ?? DEFAULT_TAG;\n\n const defaultRegistry = manifest.publishConfig?.registry ?? DEFAULT_REGISTRY;\n\n const defaultAccess =\n manifest.publishConfig?.access ??\n (manifest.scope === undefined ? ACCESS_PUBLIC : undefined);\n\n return {\n token: validateToken(options.token),\n registry: validateRegistry(options.registry ?? defaultRegistry),\n tag: setValue(options.tag, defaultTag, validateTag),\n access: setValue(options.access, defaultAccess, validateAccess),\n dryRun: setValue(options.dryRun, false, validateDryRun),\n strategy: setValue(options.strategy, STRATEGY_ALL, validateStrategy),\n logger: options.logger,\n temporaryDirectory: options.temporaryDirectory ?? os.tmpdir(),\n };\n}\n\nconst setValue = (\n value: unknown,\n defaultValue: unknown,\n validate: (value: unknown) => TValue\n): ConfigValue => ({\n value: validate(value ?? defaultValue),\n isDefault: value === undefined,\n});\n\nconst validateToken = (value: unknown): string => {\n if (typeof value === \"string\" && value.length > 0) {\n return value;\n }\n\n throw new errors.InvalidTokenError();\n};\n\nconst validateRegistry = (value: unknown): URL => {\n try {\n return new URL(value as string | URL);\n } catch {\n throw new errors.InvalidRegistryUrlError(value);\n }\n};\n\nconst validateTag = (value: unknown): string => {\n return value as string;\n};\n\nconst validateDryRun = (value: unknown): boolean => {\n return value as boolean;\n};\n\nconst validateAccess = (value: unknown): Access | undefined => {\n if (\n value === undefined ||\n value === ACCESS_PUBLIC ||\n value === ACCESS_RESTRICTED\n ) {\n return value;\n }\n\n throw new errors.InvalidAccessError(value);\n};\n\nconst validateStrategy = (value: unknown): Strategy => {\n if (value === STRATEGY_ALL || value === STRATEGY_UPGRADE) {\n return value;\n }\n\n throw new errors.InvalidStrategyError(value);\n};\n", "import fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\nimport type { NormalizedOptions } from \"../normalize-options.js\";\n\nexport type NpmCliEnvironment = Record;\n\nexport type NpmCliTask = (\n environment: NpmCliEnvironment\n) => Promise;\n\n/**\n * Create a temporary .npmrc file with the given auth token, and call a task\n * with env vars set to use that .npmrc.\n *\n * @param options Configuration options.\n * @param task A function called with the configured environment. After the\n * function resolves, the temporary .npmrc file will be removed.\n * @returns The resolved value of `task`\n */\nexport async function useNpmEnvironment(\n options: NormalizedOptions,\n task: NpmCliTask\n): Promise {\n const { registry, token, logger, temporaryDirectory } = options;\n const npmrcDirectory = await fs.mkdtemp(\n path.join(temporaryDirectory, \"npm-publish-\")\n );\n const npmrc = path.join(npmrcDirectory, \".npmrc\");\n\n const config = [\n \"; created by jsdevtools/npm-publish\",\n `//${registry.host}/:_authToken=\\${NODE_AUTH_TOKEN}`,\n `registry=${registry.href}`,\n \"\",\n ].join(os.EOL);\n\n await fs.writeFile(npmrc, config, \"utf8\");\n\n logger?.debug?.(`Temporary .npmrc created at ${npmrc}\\n${config}`);\n\n try {\n return await task({\n NODE_AUTH_TOKEN: token,\n npm_config_userconfig: npmrc,\n });\n } finally {\n await fs.rm(npmrcDirectory, { force: true, recursive: true });\n }\n}\n", "import childProcess from \"node:child_process\";\nimport os from \"node:os\";\n\nimport * as errors from \"../errors.js\";\nimport type { Logger } from \"../options.js\";\nimport type { NpmCliEnvironment } from \"./use-npm-environment.js\";\n\nexport interface NpmCliOptions {\n environment?: NpmCliEnvironment;\n ifError?: Record;\n logger?: Logger | undefined;\n}\n\nconst NPM = os.platform() === \"win32\" ? \"npm.cmd\" : \"npm\";\nconst JSON_MATCH_RE = /(\\{[\\s\\S]*\\})/mu;\n\nconst execNpm = (\n commandArguments: string[],\n environment: Record = {},\n logger?: Logger\n): Promise<{ stdout: string; stderr: string; exitCode: number }> => {\n logger?.debug?.(`Running command: ${NPM} ${commandArguments.join(\" \")}`);\n\n return new Promise((resolve) => {\n let stdout = \"\";\n let stderr = \"\";\n\n const npm = childProcess.spawn(NPM, commandArguments, {\n env: { ...process.env, ...environment },\n });\n\n npm.stdout.on(\"data\", (data) => (stdout += data));\n npm.stderr.on(\"data\", (data) => (stderr += data));\n npm.on(\"close\", (code) => {\n resolve({\n stdout: stdout.trim(),\n stderr: stderr.trim(),\n exitCode: code ?? 0,\n });\n });\n });\n};\n\nconst parseJson = (...values: string[]): TParsed | undefined => {\n for (const value of values) {\n const jsonValue = JSON_MATCH_RE.exec(value)?.[1];\n\n if (jsonValue) {\n try {\n return JSON.parse(jsonValue) as TParsed;\n } catch {\n return undefined;\n }\n }\n }\n\n return undefined;\n};\n\n/**\n * Call the NPM CLI in JSON mode.\n *\n * @param command The command of the NPM CLI to call\n * @param cliArguments Any arguments to send to the command\n * @param options Customize environment variables or add an error handler.\n * @returns The parsed JSON, or stdout if unparsable.\n */\nexport async function callNpmCli(\n command: string,\n cliArguments: string[],\n options: NpmCliOptions = {}\n): Promise {\n const { stdout, stderr, exitCode } = await execNpm(\n [command, \"--ignore-scripts\", \"--json\", ...cliArguments],\n options.environment,\n options.logger\n );\n\n if (exitCode !== 0) {\n const errorPayload = parseJson<{ error?: { code?: string | null } }>(\n stdout,\n stderr\n );\n const errorCode = errorPayload?.error?.code?.toLowerCase();\n\n if (\n typeof errorCode === \"string\" &&\n options.ifError &&\n errorCode in options.ifError\n ) {\n return options.ifError[errorCode] as TReturn;\n }\n\n throw new errors.NpmCallError(command, exitCode, stderr);\n }\n\n return parseJson(stdout) ?? (stdout as unknown as TReturn);\n}\n", "import type { NormalizedOptions } from \"../normalize-options.js\";\n\n/**\n * Given a publish configuration, get the NPM CLI publish arguments.\n *\n * @param packageSpec Package specification path.\n * @param options Publish configuration.\n * @returns Arguments to pass to the NPM CLI.\n */\nexport function getPublishArguments(\n packageSpec: string,\n options: NormalizedOptions\n): string[] {\n const { tag, access, dryRun } = options;\n const publishArguments = [];\n\n if (packageSpec.length > 0) {\n publishArguments.push(packageSpec);\n }\n\n if (!tag.isDefault) {\n publishArguments.push(\"--tag\", tag.value);\n }\n\n if (!access.isDefault && access.value) {\n publishArguments.push(\"--access\", access.value);\n }\n\n if (dryRun.value) {\n publishArguments.push(\"--dry-run\");\n }\n\n return publishArguments;\n}\n", "import type { NormalizedOptions } from \"../normalize-options.js\";\nimport { useNpmEnvironment } from \"./use-npm-environment.js\";\nimport { callNpmCli } from \"./call-npm-cli.js\";\nimport { getPublishArguments } from \"./get-publish-arguments.js\";\n\nexport interface PublishedVersions {\n \"dist-tags\": Record;\n versions: string[];\n}\n\nexport interface PublishFile {\n path: string;\n size: number;\n}\n\nexport interface PublishResult {\n id: string;\n files: PublishFile[];\n}\n\n/**\n * Get a package's published versions.\n *\n * @param packageName The name of the package to get published versions for.\n * @param options Configuration options.\n * @returns All published versions and tags.\n */\nexport async function getVersions(\n packageName: string,\n options: NormalizedOptions\n): Promise {\n return useNpmEnvironment(options, (environment) => {\n return callNpmCli(\n \"view\",\n [packageName, \"dist-tags\", \"versions\"],\n {\n logger: options.logger,\n environment,\n ifError: { e404: { \"dist-tags\": {}, versions: [] } },\n }\n );\n });\n}\n\n/**\n * Publish a package.\n *\n * @param packageSpec Package specification to pass to npm.\n * @param options Configuration options.\n * @returns Release metadata.\n */\nexport async function publish(\n packageSpec: string,\n options: NormalizedOptions\n): Promise {\n const publishArguments = getPublishArguments(packageSpec, options);\n\n return useNpmEnvironment(options, (environment) => {\n return callNpmCli(\"publish\", publishArguments, {\n logger: options.logger,\n environment,\n });\n });\n}\n", "import {\n valid as semverValid,\n gt as semverGreaterThan,\n diff as semverDifference,\n type ReleaseType as SemverReleaseType,\n} from \"semver\";\n\nimport { STRATEGY_ALL } from \"./options.js\";\nimport type { NormalizedOptions } from \"./normalize-options.js\";\nimport type { PublishedVersions } from \"./npm/index.js\";\n\nexport type ReleaseType = SemverReleaseType | typeof INITIAL | typeof DIFFERENT;\n\nexport interface VersionComparison {\n type: ReleaseType | undefined;\n oldVersion: string | undefined;\n}\n\nconst INITIAL = \"initial\";\nconst DIFFERENT = \"different\";\n\n/**\n * Compare previously published versions with the package's current version.\n *\n * @param version The current package version.\n * @param publishedVersions The versions that have already been published.\n * @param options Configuration options\n * @returns The release type and previous version.\n */\nexport function compareVersions(\n version: string,\n publishedVersions: PublishedVersions,\n options: NormalizedOptions\n): VersionComparison {\n const { versions: existingVersions, \"dist-tags\": tags } = publishedVersions;\n const { strategy, tag: publishTag } = options;\n const oldVersion = semverValid(tags[publishTag.value]) ?? undefined;\n const isUnique = !existingVersions.includes(version);\n let type: ReleaseType | undefined;\n\n if (isUnique) {\n if (!oldVersion) {\n type = INITIAL;\n } else if (semverGreaterThan(version, oldVersion)) {\n type = semverDifference(version, oldVersion) ?? DIFFERENT;\n } else if (strategy.value === STRATEGY_ALL) {\n type = DIFFERENT;\n }\n }\n\n return { type, oldVersion };\n}\n", "import os from \"node:os\";\n\nimport type { PublishResult } from \"./npm/index.js\";\nimport type { PackageManifest } from \"./read-manifest.js\";\nimport type { NormalizedOptions } from \"./normalize-options.js\";\n\n/**\n * Format publish results into a string.\n *\n * @param manifest Package manifest\n * @param options Configuration options.\n * @param results Results from running npm publish.\n * @returns Formatted string.\n */\nexport function formatPublishResult(\n manifest: PackageManifest,\n options: NormalizedOptions,\n results?: PublishResult\n): string {\n if (results === undefined) {\n return `\uD83D\uDE45\u200D\u2640\uFE0F ${manifest.name}@${manifest.version} publish skipped.`;\n }\n\n return [\n `\uD83D\uDCE6 ${results.id}${options.dryRun.value ? \" (DRY RUN)\" : \"\"}`,\n \"=== Contents ===\",\n ...results.files.map(({ path, size }) => `${formatSize(size)}\\t${path}`),\n ].join(os.EOL);\n}\n\nconst formatSize = (size: number): string => {\n if (size < 1000) {\n return `${size} B`;\n }\n if (size < 1_000_000) {\n return `${(size / 1000).toFixed(1)} kB`;\n }\n\n return `${(size / 1_000_000).toFixed(1)} MB`;\n};\n", "import { readManifest } from \"./read-manifest.js\";\nimport { normalizeOptions } from \"./normalize-options.js\";\nimport { getVersions, publish } from \"./npm/index.js\";\nimport { compareVersions } from \"./compare-versions.js\";\nimport { formatPublishResult } from \"./format-publish-result.js\";\nimport type { Options } from \"./options.js\";\nimport type { Results } from \"./results.js\";\n\n/**\n * Publishes a package to NPM, if its version has changed.\n *\n * @param options Publish options.\n * @returns Release metadata.\n */\nexport async function npmPublish(options: Options): Promise {\n const { packageSpec, manifest } = await readManifest(options.package);\n const normalizedOptions = normalizeOptions(options, manifest);\n const publishedVersions = await getVersions(manifest.name, normalizedOptions);\n const versionComparison = compareVersions(\n manifest.version,\n publishedVersions,\n normalizedOptions\n );\n\n let publishResult;\n\n if (versionComparison.type !== undefined) {\n publishResult = await publish(packageSpec, normalizedOptions);\n }\n\n normalizedOptions.logger?.info?.(\n formatPublishResult(manifest, normalizedOptions, publishResult)\n );\n\n return {\n id: publishResult?.id,\n name: manifest.name,\n version: manifest.version,\n type: versionComparison.type,\n oldVersion: versionComparison.oldVersion,\n registry: normalizedOptions.registry,\n tag: normalizedOptions.tag.value,\n access: normalizedOptions.access.value,\n strategy: normalizedOptions.strategy.value,\n dryRun: normalizedOptions.dryRun.value,\n };\n}\n", "/** Wrapper module for @actions/core */\nimport {\n getInput as ghGetInput,\n setOutput as ghSetOutput,\n setSecret as ghSetSecret,\n setFailed as ghSetFailed,\n debug as ghLogDebug,\n info as ghLogInfo,\n error as ghLogError,\n} from \"@actions/core\";\n\nimport type { Logger } from \"../options.js\";\n\n/** Logger using the methods from @actions/core. */\nexport const logger: Logger = {\n debug: ghLogDebug,\n info: ghLogInfo,\n error: ghLogError,\n};\n\n/**\n * Get input by name.\n *\n * @param name Input name\n * @returns The input string value, or undefined if not set\n */\nexport function getInput(name: string): T | undefined {\n const inputString = ghGetInput(name);\n return inputString.length > 0 ? (inputString as T) : undefined;\n}\n\n/**\n * Get a required secret input by name.\n *\n * @param name Input name\n * @returns The input secret value.\n */\nexport function getRequiredSecretInput(name: string): string {\n const inputString = ghGetInput(name, { required: true });\n ghSetSecret(inputString);\n return inputString;\n}\n\n/**\n * Get a boolean input by name.\n *\n * @param name Input name\n * @returns True if value is \"true\", false if not\n */\nexport function getBooleanInput(name: string): boolean {\n return ghGetInput(name) === \"true\";\n}\n\n/**\n * Set the action as failed due to an error.\n *\n * @param error An value from a `catch`\n */\nexport function setFailed(error: unknown) {\n ghSetFailed(error as Error);\n}\n\n/**\n * Set an output by name.\n *\n * @param name Output name\n * @param value Output value\n */\nexport function setOutput(name: string, value: string | boolean): void;\n\n/**\n * Set an output by name.\n *\n * @param name Output name\n * @param value Output value\n * @param defaultValue Default value if value is undefined.\n */\nexport function setOutput(\n name: string,\n value: string | boolean | undefined,\n defaultValue: string | boolean\n): void;\n\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport function setOutput(\n name: string,\n value: string | boolean | undefined,\n defaultValue?: string | boolean | undefined\n): void {\n ghSetOutput(name, value ?? defaultValue);\n}\n", "/** Action entry point */\nimport { npmPublish } from \"../index.js\";\nimport * as core from \"./core.js\";\n\n/** Run the action. */\nasync function run(): Promise {\n const results = await npmPublish({\n token: core.getRequiredSecretInput(\"token\"),\n registry: core.getInput(\"registry\"),\n package: core.getInput(\"package\"),\n tag: core.getInput(\"tag\"),\n access: core.getInput(\"access\"),\n strategy: core.getInput(\"strategy\"),\n dryRun: core.getBooleanInput(\"dry-run\"),\n logger: core.logger,\n temporaryDirectory: process.env[\"RUNNER_TEMP\"],\n });\n\n core.setOutput(\"id\", results.id, \"\");\n core.setOutput(\"name\", results.name);\n core.setOutput(\"version\", results.version);\n core.setOutput(\"type\", results.type, \"\");\n core.setOutput(\"old-version\", results.oldVersion, \"\");\n core.setOutput(\"registry\", results.registry.href);\n core.setOutput(\"tag\", results.tag);\n core.setOutput(\"access\", results.access, \"default\");\n core.setOutput(\"strategy\", results.strategy);\n core.setOutput(\"dry-run\", results.dryRun);\n}\n\nrun().catch((error: Error) => core.setFailed(error));\n"], + "mappings": ";;;;;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,UAAU,KAAK,CAAC;", + "names": ["module", "module", "module", "module", "module", "module", "version", "module", "parse", "version", "module", "parse", "version", "module", "parse", "version", "module", "version", "module", "parse", "v1", "module", "module", "module", "module", "parse", "version", "module", "module", "module", "module", "module", "module", "module", "module", "module", "module", "module", "module", "module", "module", "parse", "version", "module", "module", "module", "module", "version", "module", "version", "module", "version", "module", "module", "module", "module", "require_valid", "module", "module", "version", "module", "version", "module", "version", "module", "module", "version", "module", "require_semver", "module", "parse", "os", "crypto", "version", "URL", "crypto", "import_crypto", "crypto", "import_crypto", "fs", "os", "options", "socket", "require_tunnel", "module", "HttpCodes", "Headers", "MediaTypes", "path", "os", "path", "ExitCode", "getInput", "getBooleanInput", "setOutput", "setFailed", "os", "path", "version", "semverValid", "fs", "import_node_os", "os", "validate", "import_promises", "import_node_os", "import_node_path", "logger", "fs", "path", "os", "import_node_os", "os", "logger", "childProcess", "import_semver", "version", "semverValid", "semverGreaterThan", "semverDifference", "import_node_os", "path", "os", "ghLogDebug", "ghLogInfo", "ghLogError", "ghGetInput", "ghSetSecret", "ghSetFailed", "ghSetOutput"] +}