refactor(options): remove unknown min versions (#786)

* refactor(options): use undefined for unknown min versions

* refactor(options): remove unknown min versions
This commit is contained in:
Frazer Smith
2026-05-13 14:51:50 +01:00
committed by GitHub
parent f2e0d06205
commit 7788e69374
5 changed files with 80 additions and 74 deletions
+5 -5
View File
@@ -13,10 +13,10 @@
/** @type {Record<keyof PdfFontsOptions, import("../index").OptionDetails>} */
module.exports = {
firstPageToExamine: { arg: "-f", type: "number", minVersion: "0.1.0" },
lastPageToExamine: { arg: "-l", type: "number", minVersion: "0.1.0" },
firstPageToExamine: { arg: "-f", type: "number" },
lastPageToExamine: { arg: "-l", type: "number" },
listSubstitutes: { arg: "-subst", type: "boolean", minVersion: "0.19.0" },
ownerPassword: { arg: "-opw", type: "string", minVersion: "0.1.0" },
printVersionInfo: { arg: "-v", type: "boolean", minVersion: "0.1.0" },
userPassword: { arg: "-upw", type: "string", minVersion: "0.1.0" },
ownerPassword: { arg: "-opw", type: "string" },
printVersionInfo: { arg: "-v", type: "boolean" },
userPassword: { arg: "-upw", type: "string" },
};
+12 -12
View File
@@ -25,24 +25,24 @@
/** @type {Record<keyof PdfImagesOptions, import("../index").OptionDetails>} */
module.exports = {
allFiles: { arg: "-all", type: "boolean", minVersion: "0.1.0" },
ccittFile: { arg: "-ccitt", type: "boolean", minVersion: "0.1.0" },
firstPageToConvert: { arg: "-f", type: "number", minVersion: "0.1.0" },
lastPageToConvert: { arg: "-l", type: "number", minVersion: "0.1.0" },
jbig2File: { arg: "-jbig2", type: "boolean", minVersion: "0.1.0" },
jpeg2000File: { arg: "-jp2", type: "boolean", minVersion: "0.1.0" },
jpegFile: { arg: "-j", type: "boolean", minVersion: "0.1.0" },
allFiles: { arg: "-all", type: "boolean" },
ccittFile: { arg: "-ccitt", type: "boolean" },
firstPageToConvert: { arg: "-f", type: "number" },
lastPageToConvert: { arg: "-l", type: "number" },
jbig2File: { arg: "-jbig2", type: "boolean" },
jpeg2000File: { arg: "-jp2", type: "boolean" },
jpegFile: { arg: "-j", type: "boolean" },
list: { arg: "-list", type: "boolean", minVersion: "0.19.0" },
outputPageNumbers: { arg: "-p", type: "boolean", minVersion: "0.15.2" },
ownerPassword: { arg: "-opw", type: "string", minVersion: "0.1.0" },
pngFile: { arg: "-png", type: "boolean", minVersion: "0.1.0" },
ownerPassword: { arg: "-opw", type: "string" },
pngFile: { arg: "-png", type: "boolean" },
printFilenames: {
arg: "-print-filenames",
type: "boolean",
minVersion: "24.03.0",
},
printVersionInfo: { arg: "-v", type: "boolean", minVersion: "0.1.0" },
quiet: { arg: "-q", type: "boolean", minVersion: "0.1.0" },
printVersionInfo: { arg: "-v", type: "boolean" },
quiet: { arg: "-q", type: "boolean" },
tiffFile: { arg: "-tiff", type: "boolean", minVersion: "0.53.0" },
userPassword: { arg: "-upw", type: "string", minVersion: "0.1.0" },
userPassword: { arg: "-upw", type: "string" },
};
+22 -19
View File
@@ -34,35 +34,38 @@
/** @type {Record<keyof PdfToHtmlOptions, import("../index").OptionDetails>} */
module.exports = {
complexOutput: { arg: "-c", type: "boolean", minVersion: "0.1.0" },
complexOutput: { arg: "-c", type: "boolean" },
dataUrls: { arg: "-dataurls", type: "boolean", minVersion: "0.75.0" },
exchangePdfLinks: { arg: "-p", type: "boolean", minVersion: "0.1.0" },
extractHidden: { arg: "-hidden", type: "boolean", minVersion: "0.1.0" },
firstPageToConvert: { arg: "-f", type: "number", minVersion: "0.1.0" },
exchangePdfLinks: { arg: "-p", type: "boolean" },
extractHidden: { arg: "-hidden", type: "boolean" },
firstPageToConvert: { arg: "-f", type: "number" },
fontFullName: {
arg: "-fontfullname",
type: "boolean",
minVersion: "0.21.0",
},
ignoreImages: { arg: "-i", type: "boolean", minVersion: "0.1.0" },
imageFormat: { arg: "-fmt", type: "string", minVersion: "0.1.0" },
lastPageToConvert: { arg: "-l", type: "number", minVersion: "0.1.0" },
noDrm: { arg: "-nodrm", type: "boolean", minVersion: "0.1.0" },
noFrames: { arg: "-noframes", type: "boolean", minVersion: "0.1.0" },
noMergeParagraph: { arg: "-nomerge", type: "boolean", minVersion: "0.1.0" },
ignoreImages: { arg: "-i", type: "boolean" },
imageFormat: { arg: "-fmt", type: "string" },
lastPageToConvert: { arg: "-l", type: "number" },
noDrm: { arg: "-nodrm", type: "boolean" },
noFrames: { arg: "-noframes", type: "boolean" },
noMergeParagraph: {
arg: "-nomerge",
type: "boolean",
},
noRoundedCoordinates: {
arg: "-noroundcoord",
type: "boolean",
minVersion: "0.68.0",
},
outputEncoding: { arg: "-enc", type: "string", minVersion: "0.1.0" },
ownerPassword: { arg: "-opw", type: "string", minVersion: "0.1.0" },
printVersionInfo: { arg: "-v", type: "boolean", minVersion: "0.1.0" },
quiet: { arg: "-q", type: "boolean", minVersion: "0.1.0" },
outputEncoding: { arg: "-enc", type: "string" },
ownerPassword: { arg: "-opw", type: "string" },
printVersionInfo: { arg: "-v", type: "boolean" },
quiet: { arg: "-q", type: "boolean" },
singlePage: { arg: "-s", type: "boolean", minVersion: "0.15.1" },
stdout: { arg: "-stdout", type: "boolean", minVersion: "0.1.0" },
userPassword: { arg: "-upw", type: "string", minVersion: "0.1.0" },
wordBreakThreshold: { arg: "-wbt", type: "number", minVersion: "0.1.0" },
xmlOutput: { arg: "-xml", type: "boolean", minVersion: "0.1.0" },
zoom: { arg: "-zoom", type: "number", minVersion: "0.1.0" },
stdout: { arg: "-stdout", type: "boolean" },
userPassword: { arg: "-upw", type: "string" },
wordBreakThreshold: { arg: "-wbt", type: "number" },
xmlOutput: { arg: "-xml", type: "boolean" },
zoom: { arg: "-zoom", type: "number" },
};
+24 -23
View File
@@ -79,14 +79,17 @@
/** @type {Record<keyof PdfToPpmOptions, import("../index").OptionDetails>} */
module.exports = {
antialiasFonts: { arg: "-aa", type: "string", minVersion: "0.1.0" },
antialiasVectors: { arg: "-aaVector", type: "string", minVersion: "0.1.0" },
antialiasFonts: { arg: "-aa", type: "string" },
antialiasVectors: {
arg: "-aaVector",
type: "string",
},
cropBox: { arg: "-cropbox", type: "boolean", minVersion: "0.11.0" },
cropHeight: { arg: "-H", type: "number", minVersion: "0.1.0" },
cropSize: { arg: "-sz", type: "number", minVersion: "0.1.0" },
cropWidth: { arg: "-W", type: "number", minVersion: "0.1.0" },
cropXAxis: { arg: "-x", type: "number", minVersion: "0.1.0" },
cropYAxis: { arg: "-y", type: "number", minVersion: "0.1.0" },
cropHeight: { arg: "-H", type: "number" },
cropSize: { arg: "-sz", type: "number" },
cropWidth: { arg: "-W", type: "number" },
cropXAxis: { arg: "-x", type: "number" },
cropYAxis: { arg: "-y", type: "number" },
defaultCmykProfile: {
arg: "-defaultcmykprofile",
type: "string",
@@ -108,14 +111,14 @@ module.exports = {
minVersion: "0.90.0",
},
evenPagesOnly: { arg: "-e", type: "boolean", minVersion: "0.13.3" },
firstPageToConvert: { arg: "-f", type: "number", minVersion: "0.1.0" },
firstPageToConvert: { arg: "-f", type: "number" },
forcePageNumber: {
arg: "-forcenum",
type: "boolean",
minVersion: "0.75.0",
},
freetype: { arg: "-freetype", type: "string", minVersion: "0.1.0" },
grayscaleFile: { arg: "-gray", type: "boolean", minVersion: "0.1.0" },
freetype: { arg: "-freetype", type: "string" },
grayscaleFile: { arg: "-gray", type: "boolean" },
hideAnnotations: {
arg: "-hide-annotations",
type: "boolean",
@@ -123,33 +126,31 @@ module.exports = {
},
jpegFile: { arg: "-jpeg", type: "boolean", minVersion: "0.13.0" },
jpegOptions: { arg: "-jpegopt", type: "string", minVersion: "0.58.0" },
lastPageToConvert: { arg: "-l", type: "number", minVersion: "0.1.0" },
monochromeFile: { arg: "-mono", type: "boolean", minVersion: "0.1.0" },
lastPageToConvert: { arg: "-l", type: "number" },
monochromeFile: { arg: "-mono", type: "boolean" },
oddPagesOnly: { arg: "-o", type: "boolean", minVersion: "0.13.3" },
overprint: { arg: "-overprint", type: "boolean", minVersion: "0.1.0" },
ownerPassword: { arg: "-opw", type: "string", minVersion: "0.1.0" },
overprint: { arg: "-overprint", type: "boolean" },
ownerPassword: { arg: "-opw", type: "string" },
pngFile: { arg: "-png", type: "boolean", minVersion: "0.11.3" },
printProgress: { arg: "-progress", type: "boolean", minVersion: "21.03.0" },
printVersionInfo: { arg: "-v", type: "boolean", minVersion: "0.1.0" },
quiet: { arg: "-q", type: "boolean", minVersion: "0.1.0" },
resolutionXAxis: { arg: "-rx", type: "number", minVersion: "0.1.0" },
resolutionXYAxis: { arg: "-r", type: "number", minVersion: "0.1.0" },
resolutionYAxis: { arg: "-ry", type: "number", minVersion: "0.1.0" },
printVersionInfo: { arg: "-v", type: "boolean" },
quiet: { arg: "-q", type: "boolean" },
resolutionXAxis: { arg: "-rx", type: "number" },
resolutionXYAxis: { arg: "-r", type: "number" },
resolutionYAxis: { arg: "-ry", type: "number" },
scaleDimensionBeforeRotation: {
arg: "-scale-dimension-before-rotation",
type: "boolean",
minVersion: "0.84.0",
},
scalePageTo: { arg: "-scale-to", type: "number", minVersion: "0.1.0" },
scalePageTo: { arg: "-scale-to", type: "number" },
scalePageToXAxis: {
arg: "-scale-to-x",
type: "number",
minVersion: "0.1.0",
},
scalePageToYAxis: {
arg: "-scale-to-y",
type: "number",
minVersion: "0.1.0",
},
separator: { arg: "-sep", type: "string", minVersion: "0.75.0" },
singleFile: { arg: "-singlefile", type: "boolean", minVersion: "0.17.0" },
@@ -164,5 +165,5 @@ module.exports = {
minVersion: "0.17.0",
},
tiffFile: { arg: "-tiff", type: "boolean", minVersion: "0.17.0" },
userPassword: { arg: "-upw", type: "string", minVersion: "0.1.0" },
userPassword: { arg: "-upw", type: "string" },
};
+17 -15
View File
@@ -55,35 +55,37 @@ module.exports = {
type: "boolean",
minVersion: "0.36.0",
},
columnSpacing: { arg: "-colspacing", type: "number", minVersion: "0.1.0" },
columnSpacing: {
arg: "-colspacing",
type: "number",
},
cropBox: { arg: "-cropbox", type: "boolean", minVersion: "21.03.0" },
cropHeight: { arg: "-H", type: "number", minVersion: "0.11.0" },
cropWidth: { arg: "-W", type: "number", minVersion: "0.11.0" },
cropXAxis: { arg: "-x", type: "number", minVersion: "0.11.0" },
cropYAxis: { arg: "-y", type: "number", minVersion: "0.11.0" },
eolConvention: { arg: "-eol", type: "string", minVersion: "0.1.0" },
firstPageToConvert: { arg: "-f", type: "number", minVersion: "0.1.0" },
fixedWidthLayout: { arg: "-fixed", type: "number", minVersion: "0.1.0" },
eolConvention: { arg: "-eol", type: "string" },
firstPageToConvert: { arg: "-f", type: "number" },
fixedWidthLayout: { arg: "-fixed", type: "number" },
generateHtmlMetaFile: {
arg: "-htmlmeta",
type: "boolean",
minVersion: "0.1.0",
},
generateTsvFile: { arg: "-tsv", type: "boolean", minVersion: "22.05.0" },
lastPageToConvert: { arg: "-l", type: "number", minVersion: "0.1.0" },
lastPageToConvert: { arg: "-l", type: "number" },
listEncodingOptions: {
arg: "-listenc",
type: "boolean",
minVersion: "0.9.0",
},
maintainLayout: { arg: "-layout", type: "boolean", minVersion: "0.1.0" },
maintainLayout: { arg: "-layout", type: "boolean" },
noDiagonalText: { arg: "-nodiag", type: "boolean", minVersion: "0.80.0" },
noPageBreaks: { arg: "-nopgbrk", type: "boolean", minVersion: "0.1.0" },
outputEncoding: { arg: "-enc", type: "string", minVersion: "0.1.0" },
ownerPassword: { arg: "-opw", type: "string", minVersion: "0.1.0" },
printVersionInfo: { arg: "-v", type: "boolean", minVersion: "0.1.0" },
quiet: { arg: "-q", type: "boolean", minVersion: "0.1.0" },
rawLayout: { arg: "-raw", type: "boolean", minVersion: "0.1.0" },
resolution: { arg: "-r", type: "number", minVersion: "0.1.0" },
userPassword: { arg: "-upw", type: "string", minVersion: "0.1.0" },
noPageBreaks: { arg: "-nopgbrk", type: "boolean" },
outputEncoding: { arg: "-enc", type: "string" },
ownerPassword: { arg: "-opw", type: "string" },
printVersionInfo: { arg: "-v", type: "boolean" },
quiet: { arg: "-q", type: "boolean" },
rawLayout: { arg: "-raw", type: "boolean" },
resolution: { arg: "-r", type: "number" },
userPassword: { arg: "-upw", type: "string" },
};