Skip to content

Commit

Permalink
Upgrade typescript-json-schema.
Browse files Browse the repository at this point in the history
Cannot leave lone @ in jsdoc comment in typescript-json-schema >= v0.60.0.

See: YousefED/typescript-json-schema#568
  • Loading branch information
raineorshine committed Mar 14, 2024
1 parent 8ed0580 commit 2235c29
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 24 deletions.
3 changes: 0 additions & 3 deletions .ncurc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,5 @@ module.exports = {
'untildify',
// major changes required to upgrade to v3
'spawn-please',
// v0.60.0 breaks cli option description output
// https://github.com/YousefED/typescript-json-schema/issues/568
'typescript-json-schema',
],
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ Options that take no arguments can be negated by prefixing them with `--no-`, e.
</tr>
<tr>
<td><a href="#target">-t, --target &lt;value&gt;</a></td>
<td>Determines the version to upgrade to: latest, newest, greatest, minor, patch, semver, @[tag], or [function]. (default: latest)</td>
<td>Determines the version to upgrade to: latest, newest, greatest, minor, patch, semver, <code>@[tag]<code>, or [function]. (default: latest)</td>
</tr>
<tr>
<td>--timeout &lt;ms&gt;</td>
Expand Down Expand Up @@ -715,7 +715,7 @@ The predicate function is only available in .ncurc.js or when importing npm-chec
(See: https://git.coolaj86.com/coolaj86/semver-utils.js#semverutils-parse-semverstring)
@returns True if the package should be excluded, false if it should be included.
*/
filterVersionFunction: (name, semver) => {
rejectVersionFunction: (name, semver) => {
if (name.startsWith('@myorg/') && parseInt(semver[0]?.major) > 5) {
return true
}
Expand Down
20 changes: 9 additions & 11 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
"strip-ansi": "^7.1.0",
"ts-node": "^10.9.2",
"typescript": "^5.4.2",
"typescript-json-schema": "^0.57.0",
"typescript-json-schema": "^0.63.0",
"yarn": "^1.22.22"
},
"files": [
Expand Down
2 changes: 1 addition & 1 deletion src/cli-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ const cliOptions: CLIOption[] = [
long: 'target',
short: 't',
arg: 'value',
description: `Determines the version to upgrade to: latest, newest, greatest, minor, patch, semver, @[tag], or [function]. (default: latest)`,
description: `Determines the version to upgrade to: latest, newest, greatest, minor, patch, semver, \`@[tag]\`, or [function]. (default: latest)`,
help: extendedHelpTarget,
// eslint-disable-next-line no-template-curly-in-string
type: `${supportedVersionTargets.map(s => `'${s}'`).join(' | ')} | ${'`@${string}`'} | TargetFunction`,
Expand Down
8 changes: 3 additions & 5 deletions src/types/RunOptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,8 @@
"target": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
"pattern": "^@.*$",
"type": "string"
},
{
"description": "A function that can be provided to the --target option for custom filtering.",
Expand All @@ -488,7 +486,7 @@
"type": "string"
}
],
"description": "Determines the version to upgrade to: latest, newest, greatest, minor, patch, semver, @[tag], or [function]. (default: latest) Run \"ncu --help --target\" for details."
"description": "Determines the version to upgrade to: latest, newest, greatest, minor, patch, semver, `@[tag]`, or [function]. (default: latest) Run \"ncu --help --target\" for details."
},
"timeout": {
"description": "Global timeout in milliseconds. (default: no global timeout and 30 seconds per npm-registry-fetch)",
Expand Down
2 changes: 1 addition & 1 deletion src/types/RunOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export interface RunOptions {
/** Read package.json from stdin. */
stdin?: string

/** Determines the version to upgrade to: latest, newest, greatest, minor, patch, semver, @[tag], or [function]. (default: latest) Run "ncu --help --target" for details. */
/** Determines the version to upgrade to: latest, newest, greatest, minor, patch, semver, `@[tag]`, or [function]. (default: latest) Run "ncu --help --target" for details. */
target?: 'latest' | 'newest' | 'greatest' | 'minor' | 'patch' | 'semver' | `@${string}` | TargetFunction

/** Global timeout in milliseconds. (default: no global timeout and 30 seconds per npm-registry-fetch) */
Expand Down

0 comments on commit 2235c29

Please sign in to comment.