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AmC,EAAgB,EAAc,GAE/E,MAAM,EAAQ,CACb,EAAe,IAAK,GAAe,kBAAkB,GAAY,UAE5D,GAAsB,EAAe,SAAS,eAIpD,IAAI,EAA2B,OAAO,QAEtC,EAAa,KAAM,EAAqB,cAAgB,eAExD,IAAK,MAAM,KAAc,EACpB,GAAsB,IAA6B,EAAW,OACjE,EAAM,KAAK,KAAK,SAAS,UAAU,EAAW,MAAQ,SAAS,KAAK,eAEpE,EAA2B,EAAW,MAGvC,EAAM,KAAK,WAEV,MAAM,EAAyB,CAAC,EAEhC,OAAO,QAAQ,IAAI,EAAe,IAAI,MAAO,GAAe,kBAAkB,GAAY,SAAS,EAAY,EAAS,IACxH,EALU,IAQZ,QAAQ,OAAO,MAAM,CAEpB,oBAAoB,QAAQ,IAAI,IAChC,GACA,SAAS,UAAU,gBACnB,GAAG,SAAS,OAAO,iDACnB,GAAG,SAAS,KAAK,gDACjB,GAAG,SAAS,MAAM,iDAClB,GAAG,SAAS,IAAI,gFAChB,GACA,IACC,KAAK,MACR,CAiBA,SAAS,wCAAyC,EAAc,GAC/D,GAAK,EAAQ,eAIb,IAAK,MAAM,KAAkB,EAAQ,eAAgB,CACpD,MAAM,EAAY,sBAAsB,GAExC,GAAkB,OAAd,EAAoB,CACvB,MAAM,EAAa,EAAa,KAAK,EAAG,UAAW,IAAS,EAAU,MAElE,IAAe,cAAc,kBAAkB,EAAY,GAAU,EAAU,UAClF,QAAQ,OAAO,MAAM,iCAAiC,yBAAuC,EAAQ,aAAe,SAAW,uBAAwB,kBAAkB,EAAY,UAEvL,CACD,CACD","file":"/npm/check-outdated@3.0.0/check-outdated.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.48.0.\n * Original file: /npm/check-outdated@3.0.0/check-outdated.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","#!/usr/bin/env node\n\n/**\n * @file The CLI entry point.\n */\n\n/**\n * @external NodeModule\n */\n\nconst parseArguments = require('./helper/args');\nconst colorize = require('./helper/colorize');\nconst { getOutdatedDependencies, getWantedOrLatest, compareByName, compareByType } = require('./helper/dependencies');\nconst { clearFileCache, getChangelogPath, getDependencyPackageJSON, getParentPackageJSONPath, parsePackageJSON, readFileCached } = require('./helper/files');\nconst { getFilteredDependencies } = require('./helper/filter');\nconst generateKeyValueList = require('./helper/list');\nconst { applyMinAgeFilter } = require('./helper/min-age');\nconst { getOutdatedPinnedDependencies } = require('./helper/overrides');\nconst splitPackageSpecifier = require('./helper/package-specifier');\nconst { getRegExpPosition, escapeRegExp } = require('./helper/regexp');\nconst { semverDiff, semverDiffType, semverInRange } = require('./helper/semver');\nconst prettifyTable = require('./helper/table');\nconst { getNpmJSLink, getPackageAuthor, getPackageHomepage, getPackageRepository } = require('./helper/urls');\nconst pkg = require('./package.json');\n\n/**\n * @typedef {import('./helper/dependencies').NpmOptions} NpmOptions\n * @typedef {import('./helper/dependencies').OutdatedDependencies} OutdatedDependencies\n * @typedef {import('./helper/dependencies').OutdatedDependency} OutdatedDependency\n * @typedef {import('./helper/files').PackageJSON} PackageJSON\n * @typedef {import('./helper/table').Table} Table\n * @typedef {import('./helper/table').TableColumn} TableColumn\n * @typedef {import('./helper/args').AvailableArguments} AvailableArguments\n */\n\n/**\n * The options based on the CLI arguments.\n *\n * @typedef {object} CheckOutdatedOptions\n * @property {string[]} [ignorePackages]\n * @property {boolean} [ignoreDevDependencies]\n * @property {boolean} [ignoreResolutionDependencies]\n * @property {boolean} [ignoreLinkedPackages]\n * @property {boolean} [ignorePreReleases]\n * @property {boolean} [preferWanted]\n * @property {string[]} [columns]\n * @property {string[]} [types]\n * @property {number} [minAge]\n * @property {number} [minAgePatch]\n */\n\n/** @typedef {CheckOutdatedOptions & NpmOptions} Options */\n\n/**\n * Array of outdated dependencies.\n *\n * @typedef {OutdatedDependency[]} Dependencies\n */\n\n/**\n * The details change can be used to share data between columns.\n * For example, if the first column reads the package.json, the next column can rely of this data, without to acquire it again.\n *\n * @typedef {object} DependencyDetailsCache\n * @property {PackageJSON} [packageJSON]\n */\n\nconst DEFAULT_COLUMNS = ['package', 'current', 'wanted', 'latest', 'reference', 'changes', 'location'];\n\n/**\n * @typedef {object} Column\n * @property {TableColumn | string} caption;\n * @property {(dependency: OutdatedDependency, options: Options, detailsCache: DependencyDetailsCache) => Promise<TableColumn | string>} getValue\n */\n\n/** @type {{ readonly [columnName: string]: Column; }} */\nconst AVAILABLE_COLUMNS = {\n\tpackage: {\n\t\tcaption: colorize.underline('Package'),\n\t\tgetValue: async (dependency, options) => {\n\t\t\tswitch (semverDiffType(dependency.current, getWantedOrLatest(dependency, options))) {\n\t\t\t\tcase 'major':\n\t\t\t\t\treturn colorize.yellow(dependency.name);\n\n\t\t\t\tcase 'minor':\n\t\t\t\t\treturn colorize.cyan(dependency.name);\n\n\t\t\t\tcase 'patch':\n\t\t\t\t\treturn colorize.green(dependency.name);\n\n\t\t\t\tcase 'reverted':\n\t\t\t\t\treturn colorize.red(dependency.name);\n\n\t\t\t\tdefault:\n\t\t\t\t\treturn dependency.name;\n\t\t\t}\n\t\t}\n\t},\n\tcurrent: {\n\t\tcaption: {\n\t\t\ttext: colorize.underline('Current'),\n\t\t\talignRight: true\n\t\t},\n\t\tgetValue: async (dependency, options) => {\n\t\t\tif (dependency.current === '') {\n\t\t\t\treturn {\n\t\t\t\t\ttext: colorize.gray('-'),\n\t\t\t\t\talignRight: true\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst diff = semverDiff(\n\t\t\t\t[dependency.current, getWantedOrLatest(dependency, options)],\n\t\t\t\t[colorize, colorize.magenta],\n\t\t\t\t[colorize.underline, colorize.magenta.underline]\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\ttext: diff[0],\n\t\t\t\talignRight: true\n\t\t\t};\n\t\t}\n\t},\n\twanted: {\n\t\tcaption: {\n\t\t\ttext: colorize.underline('Wanted'),\n\t\t\talignRight: true\n\t\t},\n\t\tgetValue: async (dependency) => {\n\t\t\tif (dependency.wanted === '') {\n\t\t\t\treturn {\n\t\t\t\t\ttext: colorize.gray('-'),\n\t\t\t\t\talignRight: true\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst diff = semverDiff(\n\t\t\t\t[dependency.current, dependency.wanted],\n\t\t\t\t[colorize, colorize.green],\n\t\t\t\t[colorize.underline, colorize.green.underline]\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\ttext: diff[1],\n\t\t\t\talignRight: true\n\t\t\t};\n\t\t}\n\t},\n\tlatest: {\n\t\tcaption: {\n\t\t\ttext: colorize.underline('Latest'),\n\t\t\talignRight: true\n\t\t},\n\t\tgetValue: async (dependency) => {\n\t\t\tif (dependency.latest === '') {\n\t\t\t\treturn {\n\t\t\t\t\ttext: colorize.gray('-'),\n\t\t\t\t\talignRight: true\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst diff = semverDiff(\n\t\t\t\t[dependency.current, dependency.latest],\n\t\t\t\t[colorize, colorize.magenta],\n\t\t\t\t[colorize.underline, colorize.magenta.underline]\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\ttext: diff[1],\n\t\t\t\talignRight: true\n\t\t\t};\n\t\t}\n\t},\n\ttype: {\n\t\tcaption: colorize.underline('Type'),\n\t\tgetValue: async (dependency, options) => (semverDiffType(dependency.current, getWantedOrLatest(dependency, options)) || colorize.gray('-'))\n\t},\n\tlocation: {\n\t\tcaption: colorize.underline('Location'),\n\t\tgetValue: async (dependency) => (dependency.location || colorize.gray('-'))\n\t},\n\tpackageType: {\n\t\tcaption: colorize.underline('Package Type'),\n\t\tgetValue: async (dependency) => (dependency.type || colorize.gray('-'))\n\t},\n\treference: {\n\t\tcaption: colorize.underline('Reference'),\n\t\tgetValue: async (dependency) => {\n\t\t\tconst filePath = getParentPackageJSONPath(dependency.location);\n\t\t\tconst fileContent = readFileCached(filePath);\n\n\t\t\tif (fileContent !== undefined) {\n\t\t\t\t// For \"overrides\"/\"resolutions\" entries, the literal key and value are known, which also resolves keys that differ from the package name (e.g. the glob path of a Yarn resolution)\n\t\t\t\tconst searchKey = (dependency.specKey !== undefined ? dependency.specKey : dependency.name);\n\t\t\t\tlet actualVersion = dependency.spec;\n\n\t\t\t\tif (actualVersion === undefined) {\n\t\t\t\t\t// If the file is unparsable (e.g. empty, malformed or BOM-prefixed), the text search below still works without the version\n\t\t\t\t\tconst json = parsePackageJSON(fileContent);\n\n\t\t\t\t\tactualVersion = ((json !== undefined && dependency.type && dependency.type in json) ? json[dependency.type][dependency.name] : undefined);\n\t\t\t\t}\n\n\t\t\t\tconst needle = new RegExp(`\"${escapeRegExp(searchKey)}\"[^:]*:[^\"]*\"[^\"]*${(actualVersion ? escapeRegExp(actualVersion) : '')}\"`, 'u');\n\t\t\t\tconst [line, column] = getRegExpPosition(fileContent, needle);\n\n\t\t\t\tif (line && column) {\n\t\t\t\t\treturn `${filePath}:${line}:${column}`;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn colorize.gray('-');\n\t\t}\n\t},\n\tchanges: {\n\t\tcaption: colorize.underline('Changes'),\n\t\tgetValue: async (dependency, _options, detailsCache) => {\n\t\t\tdetailsCache.packageJSON = (detailsCache.packageJSON || getDependencyPackageJSON(dependency.location));\n\n\t\t\treturn (\n\t\t\t\tawait getPackageRepository(detailsCache.packageJSON, true) ||\n\t\t\t\tgetPackageHomepage(detailsCache.packageJSON) ||\n\t\t\t\tgetNpmJSLink(dependency.resolvedName) ||\n\t\t\t\tcolorize.gray('-')\n\t\t\t);\n\t\t}\n\t},\n\tchangesPreferLocal: {\n\t\tcaption: colorize.underline('Changes'),\n\t\tgetValue: async (dependency, _options, detailsCache) => {\n\t\t\tconst changelogFile = getChangelogPath(dependency.location);\n\n\t\t\tif (changelogFile) {\n\t\t\t\treturn changelogFile;\n\t\t\t}\n\n\t\t\tdetailsCache.packageJSON = (detailsCache.packageJSON || getDependencyPackageJSON(dependency.location));\n\n\t\t\treturn (\n\t\t\t\tawait getPackageRepository(detailsCache.packageJSON, true) ||\n\t\t\t\tgetPackageHomepage(detailsCache.packageJSON) ||\n\t\t\t\tgetNpmJSLink(dependency.resolvedName) ||\n\t\t\t\tcolorize.gray('-')\n\t\t\t);\n\t\t}\n\t},\n\thomepage: {\n\t\tcaption: colorize.underline('Homepage'),\n\t\tgetValue: async (dependency, _options, detailsCache) => {\n\t\t\tdetailsCache.packageJSON = (detailsCache.packageJSON || getDependencyPackageJSON(dependency.location));\n\n\t\t\treturn (\n\t\t\t\tdependency.homepage ||\n\t\t\t\tgetPackageHomepage(detailsCache.packageJSON) ||\n\t\t\t\tawait getPackageRepository(detailsCache.packageJSON) ||\n\t\t\t\tgetPackageAuthor(detailsCache.packageJSON) ||\n\t\t\t\tgetNpmJSLink(dependency.resolvedName) ||\n\t\t\t\tcolorize.gray('-')\n\t\t\t);\n\t\t}\n\t},\n\tnpmjs: {\n\t\tcaption: colorize.underline('npmjs.com'),\n\t\tgetValue: async (dependency) => (getNpmJSLink(dependency.resolvedName) || colorize.gray('-'))\n\t}\n};\n\n/**\n * @deprecated `name` has been replaced by `package` in version 2.8.0.\n */\n// @ts-expect-error -- The type marks the table as readonly, but the deprecated alias must be attached after the declaration\nAVAILABLE_COLUMNS.name = { ...AVAILABLE_COLUMNS.package };\n\n/** @type {AvailableArguments} */\nconst AVAILABLE_ARGUMENTS = {\n\t'--help': () => help(),\n\t'-h': () => help(),\n\t'--ignore-pre-releases': {\n\t\tignorePreReleases: true\n\t},\n\t'--ignore-dev-dependencies': {\n\t\tignoreDevDependencies: true\n\t},\n\t'--ignore-resolution-dependencies': {\n\t\tignoreResolutionDependencies: true\n\t},\n\t'--ignore-linked-packages': {\n\t\tignoreLinkedPackages: true\n\t},\n\t'--ignore-packages': (value) => {\n\t\tconst ignorePackages = value.split(',');\n\n\t\tif (ignorePackages.length === 1 && (ignorePackages[0] === '' || ignorePackages[0].startsWith('-'))) {\n\t\t\treturn help('Invalid value of --ignore-packages');\n\t\t}\n\n\t\treturn { ignorePackages };\n\t},\n\t'--prefer-wanted': {\n\t\tpreferWanted: true\n\t},\n\t'--columns': (value) => {\n\t\tconst columns = value.split(',').filter((name) => name !== '');\n\t\tconst availableColumnsNames = Object.keys(AVAILABLE_COLUMNS);\n\n\t\tif (columns.length === 0 || (columns.length === 1 && columns[0].startsWith('-'))) {\n\t\t\treturn help('Invalid value of --columns');\n\t\t}\n\n\t\tconst invalidColumn = columns.find((name) => !availableColumnsNames.includes(name));\n\n\t\tif (invalidColumn !== undefined) {\n\t\t\treturn help(`Invalid column name \"${invalidColumn}\" in --columns\\nAvailable columns are:\\n${availableColumnsNames.join(', ')}`);\n\t\t}\n\n\t\treturn { columns };\n\t},\n\t'--types': (value) => {\n\t\tconst types = value.split(',').filter((name) => name !== '');\n\t\tconst availableTypesNames = ['major', 'minor', 'patch', 'prerelease', 'build', 'reverted'];\n\n\t\tif (types.length === 0 || (types.length === 1 && types[0].startsWith('-'))) {\n\t\t\treturn help('Invalid value of --types');\n\t\t}\n\n\t\tconst invalidType = types.find((name) => !availableTypesNames.includes(name));\n\n\t\tif (invalidType !== undefined) {\n\t\t\treturn help(`Invalid type name \"${invalidType}\" in --types\\nAvailable types are:\\n${availableTypesNames.join(', ')}`);\n\t\t}\n\n\t\treturn { types };\n\t},\n\t'--global': {\n\t\tglobal: true\n\t},\n\t'--depth': (value) => {\n\t\tconst depth = Number.parseInt(value, 10);\n\n\t\tif (!Number.isFinite(depth) || depth < 0) {\n\t\t\treturn help('Invalid value of --depth (must be a non-negative integer)');\n\t\t}\n\n\t\treturn { depth };\n\t},\n\t'--min-age': (value) => {\n\t\tconst minAge = Number.parseInt(value, 10);\n\n\t\tif (!Number.isFinite(minAge) || minAge < 0) {\n\t\t\treturn help('Invalid value of --min-age (must be a non-negative integer)');\n\t\t}\n\n\t\treturn { minAge };\n\t},\n\t'--min-age-patch': (value) => {\n\t\tconst minAgePatch = Number.parseInt(value, 10);\n\n\t\tif (!Number.isFinite(minAgePatch) || minAgePatch < 0) {\n\t\t\treturn help('Invalid value of --min-age-patch (must be a non-negative integer)');\n\t\t}\n\n\t\treturn { minAgePatch };\n\t}\n};\n\nif (require.main === /** @type {NodeModule} */(/** @type {any} */(module))) {\n\tprocess.title = pkg.name;\n\n\tconst argv = process.argv.slice(2);\n\n\tvoid (async () => {\n\t\tprocess.exitCode = await checkOutdated(argv);\n\t})().catch((/** @type {unknown} */ error) => {\n\t\t// A tool whose purpose is its exit code must never exit with 0 on an unexpected error (unhandled rejections do on Node.js 10 to 14)\n\t\tprocess.stdout.write(`${colorize.red('Unexpected error:')} ${(error instanceof Error ? error.message : String(error))}\\n`);\n\n\t\tprocess.exitCode = 1;\n\t});\n}\nelse {\n\tmodule.exports = checkOutdated;\n}\n\n/**\n * The main functionality of the tool.\n *\n * @public\n * @param {string[]} argv - Arguments given in the command line (`process.argv.slice(2)`).\n * @returns {Promise<number>} A number which shall used as process exit code.\n */\nasync function checkOutdated (argv) {\n\t/** @type {Options | string} */\n\tlet args;\n\n\ttry {\n\t\targs = /** @type {Options | string} */(parseArguments(argv, AVAILABLE_ARGUMENTS));\n\t}\n\tcatch (error) {\n\t\tif (error instanceof Error) {\n\t\t\targs = help(error.message);\n\t\t}\n\t\telse {\n\t\t\targs = help();\n\t\t}\n\t}\n\n\tif (typeof args === 'string') {\n\t\tprocess.stdout.write(args);\n\n\t\treturn 1;\n\t}\n\n\tif (args.minAgePatch !== undefined && args.minAge === undefined) {\n\t\tprocess.stdout.write(help('The argument --min-age-patch requires the argument --min-age'));\n\n\t\treturn 1;\n\t}\n\n\tif (args.minAge !== undefined && args.minAgePatch !== undefined && args.minAgePatch > args.minAge) {\n\t\tprocess.stdout.write(help('The value of --min-age-patch must not be greater than the value of --min-age'));\n\n\t\treturn 1;\n\t}\n\n\t// The cache shall only avoid repeated reads within one run, not across multiple runs of a long-running module consumer\n\tclearFileCache();\n\n\ttry {\n\t\tconst [outdatedResponse, pinnedResult] = await Promise.all([\n\t\t\tgetOutdatedDependencies(args),\n\t\t\tgetOutdatedPinnedDependencies(args)\n\t\t]);\n\n\t\t// Version pins of packages which are also reported by `npm outdated` (e.g. direct dependencies with a matching override) are not reported twice\n\t\tconst reportedNames = new Set(outdatedResponse.map(({ name }) => name));\n\t\tconst pinnedDependencies = pinnedResult.dependencies.filter((dependency) => !reportedNames.has(dependency.name));\n\t\tconst outdatedDependencies = outdatedResponse.concat(pinnedDependencies);\n\n\t\tif (pinnedResult.warnings.length > 0) {\n\t\t\tprocess.stdout.write(`${pinnedResult.warnings.map((warning) => `${colorize.yellow('Warning:')} ${warning}`).join('\\n')}\\n\\n`);\n\t\t}\n\n\t\t// Apply min-age filter before other filters, as it modifies the `latest` and `wanted` fields\n\t\tlet ageFilteredDependencies = outdatedDependencies;\n\n\t\tif (args.minAge !== undefined) {\n\t\t\tconst minAgeResult = await applyMinAgeFilter(outdatedDependencies, args.minAge, args.minAgePatch);\n\n\t\t\tageFilteredDependencies = minAgeResult.dependencies;\n\n\t\t\tif (minAgeResult.warnings.length > 0) {\n\t\t\t\tprocess.stdout.write(`${minAgeResult.warnings.map((warning) => `${colorize.yellow('Warning:')} ${warning}`).join('\\n')}\\n\\n`);\n\t\t\t}\n\t\t}\n\n\t\tconst filteredDependencies = getFilteredDependencies(ageFilteredDependencies, args);\n\n\t\tif (filteredDependencies.length === 0) {\n\t\t\tprocess.stdout.write('All dependencies are up-to-date.\\n');\n\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (filteredDependencies.length === 1) {\n\t\t\tprocess.stdout.write('1 outdated dependency found:\\n\\n');\n\t\t}\n\t\telse {\n\t\t\tprocess.stdout.write(`${filteredDependencies.length} outdated dependencies found:\\n\\n`);\n\t\t}\n\n\t\tconst visibleColumns = ((args.columns === undefined || args.columns.length === 0) ? DEFAULT_COLUMNS : args.columns);\n\n\t\tawait writeOutdatedDependenciesToStdout(visibleColumns, filteredDependencies, args);\n\n\t\twriteUnnecessaryIgnoredPackagesToStdout(ageFilteredDependencies, args);\n\t}\n\tcatch (error) {\n\t\tif (typeof error === 'object' && error !== null) {\n\t\t\t// Required for TypeScript to ensure the type is an `object` instead of `unknown`.\n\t\t\t/** @type {Record<string, any>} */\n\t\t\tconst errorObject = error;\n\n\t\t\tconst out = generateKeyValueList(Object.getOwnPropertyNames(errorObject).map((property) => [colorize.magenta(property), errorObject[property]]));\n\n\t\t\tprocess.stdout.write(`${colorize.red('Error while gathering outdated dependencies:')}\\n\\n${out}\\n`);\n\t\t}\n\t\telse {\n\t\t\tprocess.stdout.write(`${colorize.red('Unknown error while gathering outdated dependencies.')}\\n`);\n\t\t}\n\t}\n\n\treturn 1;\n}\n\n/**\n * Returns the help text of the CLI tool.\n *\n * @private\n * @param {string[]} additionalLines - Additional text (error messages etc.) which shall be shown after the help.\n * @returns {string} Multiline text containing the whole help text.\n */\nfunction help (...additionalLines) {\n\treturn [\n\t\t`${pkg.name} v${pkg.version} - ${pkg.description}`,\n\t\t'Usage: ',\n\t\t[\n\t\t\t'[--ignore-pre-releases]',\n\t\t\t'[--ignore-dev-dependencies]',\n\t\t\t'[--ignore-resolution-dependencies]',\n\t\t\t'[--ignore-linked-packages]',\n\t\t\t'[--ignore-packages <comma-separated-list-of-package-names>]',\n\t\t\t'[--prefer-wanted]',\n\t\t\t'[--columns <comma-separated-list-of-columns>]',\n\t\t\t'[--types <comma-separated-list-of-update-types>]',\n\t\t\t'[--global]',\n\t\t\t'[--depth <number>]',\n\t\t\t'[--min-age <days>]',\n\t\t\t'[--min-age-patch <days>]'\n\t\t].join(' '),\n\t\t'',\n\t\t'Arguments:',\n\t\tprettifyTable([\n\t\t\t[\n\t\t\t\t'--help, -h',\n\t\t\t\t'Show this help.'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'--ignore-pre-releases',\n\t\t\t\t'Don\\'t recommend to update to pre-release versions (e.g. \"2.1.0-alpha\", \"2.1.0-beta\", \"2.1.0-rc.1\").'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'--ignore-dev-dependencies',\n\t\t\t\t'Do not warn if devDependencies are outdated.'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'--ignore-resolution-dependencies',\n\t\t\t\t'Do not check the version pins in the \"overrides\" and \"resolutions\" fields of the package.json.'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'--ignore-linked-packages',\n\t\t\t\t'Do not warn if linked packages are outdated (e.g. workspaces of a monorepo, or packages added with npm link).'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'--ignore-packages <comma-separated-list-of-package-names>',\n\t\t\t\t'Ignore the listed packages, even if they are outdated.'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'--prefer-wanted',\n\t\t\t\t'Compare the \"Current\" version to the \"Wanted\" version, instead of the \"Latest\" version.'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'--columns <comma-separated-list-of-columns>',\n\t\t\t\t'Defines which columns should be shown in which order.'\n\t\t\t],\n\t\t\t[\n\t\t\t\t// Follow-up line for '--columns' description\n\t\t\t\t'',\n\t\t\t\t`Possible values: ${Object.keys(AVAILABLE_COLUMNS).join(',')}`\n\t\t\t],\n\t\t\t[\n\t\t\t\t'--types <comma-separated-list-of-update-types>',\n\t\t\t\t'Restrict the update type (e.g. only show minor updates, or reverted versions)'\n\t\t\t],\n\t\t\t[\n\t\t\t\t// Follow-up line for '--types' description\n\t\t\t\t'',\n\t\t\t\t'Possible values: major,minor,patch,prerelease,build,reverted'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'--global',\n\t\t\t\t'Check packages in the global install prefix instead of in the current project (equal to the npm outdated-option).'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'--depth <number>',\n\t\t\t\t'Max depth for checking dependency tree (equal to the npm outdated-option).'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'--min-age <days>',\n\t\t\t\t'Only recommend release lines (Major.Minor) with at least one version published <days> days ago.'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'--min-age-patch <days>',\n\t\t\t\t'Min age for patches within the --min-age release line (requires --min-age; default: 0, must not be greater than --min-age). Allows newer bug fixes.'\n\t\t\t]\n\t\t]),\n\t\t// The separating blank line is only needed if there are additional lines (error messages etc.)\n\t\t...(additionalLines.length > 0 ? [''].concat(additionalLines) : []),\n\t\t''\n\t].join('\\n');\n}\n\n/**\n * Show the version information of outdated dependencies in a styled way on the terminal (stdout).\n *\n * @private\n * @param {string[]} visibleColumns - The columns which should be shown in the given order.\n * @param {Dependencies} dependencies - Array of dependency objects, which shall be formatted and shown in the terminal.\n * @param {Options} options - The arguments which the user provided.\n * @returns {Promise<void>}\n */\nasync function writeOutdatedDependenciesToStdout (visibleColumns, dependencies, options) {\n\t/** @type {(string | (string | TableColumn)[] | Promise<string | (string | TableColumn)[]>)[]} */\n\tconst table = [\n\t\tvisibleColumns.map((columnName) => AVAILABLE_COLUMNS[columnName].caption)\n\t];\n\tconst groupByPackageType = !visibleColumns.includes('packageType');\n\n\t// The initial value must not be undefined, since a dependency without a type would collide with it and suppress its group header\n\t/** @type {undefined | string | symbol} */\n\tlet previousPackageTypeGroup = Symbol('none');\n\n\tdependencies.sort((groupByPackageType ? compareByType : compareByName));\n\n\tfor (const dependency of dependencies) {\n\t\tif (groupByPackageType && previousPackageTypeGroup !== dependency.type) {\n\t\t\ttable.push(`\\n${colorize.underline(dependency.type || colorize.gray('unknown'))}`);\n\n\t\t\tpreviousPackageTypeGroup = dependency.type;\n\t\t}\n\n\t\ttable.push((async () => {\n\t\t\t/** @type {DependencyDetailsCache} */\n\t\t\tconst dependencyDetailsCache = {};\n\n\t\t\treturn Promise.all(visibleColumns.map(async (columnName) => AVAILABLE_COLUMNS[columnName].getValue(dependency, options, dependencyDetailsCache)));\n\t\t})());\n\t}\n\n\tprocess.stdout.write([\n\t\t// eslint-disable-next-line @typescript-eslint/await-thenable -- `table` can be either synchronous or asynchronous.\n\t\tprettifyTable(await Promise.all(table)),\n\t\t'',\n\t\tcolorize.underline('Color legend'),\n\t\t`${colorize.yellow('Major update')}: backward-incompatible updates`,\n\t\t`${colorize.cyan('Minor update')}: backward-compatible features`,\n\t\t`${colorize.green('Patch update')}: backward-compatible bug fixes`,\n\t\t`${colorize.red('Reverted')}:     latest available version is lower than the installed version`,\n\t\t'',\n\t\t''\n\t].join('\\n'));\n}\n\n/**\n * Show information about packages which are ignored by `--ignore-packages` with version number, but where the recommended version differs.\n *\n * Example:\n * Current \"module\" version: 2.0.0\n * Latest \"module\" version: 2.0.2\n * --ignore-packages module@^1\n * --ignore-packages module@2.0.1\n * In these cases, the ignore-statements have no effect, because version ^1 and 2.0.1 are outdated. That means, the ignore-statement can be removed.\n *\n * @private\n * @param {Dependencies} dependencies - Array of outdated dependency objects, before the filters are applied.\n * @param {Options} options - The arguments which the user provided.\n * @returns {void}\n */\nfunction writeUnnecessaryIgnoredPackagesToStdout (dependencies, options) {\n\tif (!options.ignorePackages) {\n\t\treturn;\n\t}\n\n\tfor (const ignoredPackage of options.ignorePackages) {\n\t\tconst specifier = splitPackageSpecifier(ignoredPackage);\n\n\t\tif (specifier !== null) {\n\t\t\tconst dependency = dependencies.find(({ name }) => name === specifier.name);\n\n\t\t\tif (dependency && !semverInRange(getWantedOrLatest(dependency, options), specifier.version)) {\n\t\t\t\tprocess.stdout.write(`The --ignore-packages filter \"${ignoredPackage}\" has no effect, the ${(options.preferWanted ? 'wanted' : 'latest')} version is ${getWantedOrLatest(dependency, options)}.\\n\\n`);\n\t\t\t}\n\t\t}\n\t}\n}\n"]}