Skip to content

Commit 2235c29

Browse files
committed
Upgrade typescript-json-schema.
Cannot leave lone @ in jsdoc comment in typescript-json-schema >= v0.60.0. See: YousefED/typescript-json-schema#568
1 parent 8ed0580 commit 2235c29

File tree

7 files changed

+17
-24
lines changed

7 files changed

+17
-24
lines changed

.ncurc.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,5 @@ module.exports = {
99
'untildify',
1010
// major changes required to upgrade to v3
1111
'spawn-please',
12-
// v0.60.0 breaks cli option description output
13-
// https://github.com/YousefED/typescript-json-schema/issues/568
14-
'typescript-json-schema',
1512
],
1613
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ Options that take no arguments can be negated by prefixing them with `--no-`, e.
344344
</tr>
345345
<tr>
346346
<td><a href="#target">-t, --target &lt;value&gt;</a></td>
347-
<td>Determines the version to upgrade to: latest, newest, greatest, minor, patch, semver, @[tag], or [function]. (default: latest)</td>
347+
<td>Determines the version to upgrade to: latest, newest, greatest, minor, patch, semver, <code>@[tag]<code>, or [function]. (default: latest)</td>
348348
</tr>
349349
<tr>
350350
<td>--timeout &lt;ms&gt;</td>
@@ -715,7 +715,7 @@ The predicate function is only available in .ncurc.js or when importing npm-chec
715715
(See: https://git.coolaj86.com/coolaj86/semver-utils.js#semverutils-parse-semverstring)
716716
@returns True if the package should be excluded, false if it should be included.
717717
*/
718-
filterVersionFunction: (name, semver) => {
718+
rejectVersionFunction: (name, semver) => {
719719
if (name.startsWith('@myorg/') && parseInt(semver[0]?.major) > 5) {
720720
return true
721721
}

package-lock.json

Lines changed: 9 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
"strip-ansi": "^7.1.0",
142142
"ts-node": "^10.9.2",
143143
"typescript": "^5.4.2",
144-
"typescript-json-schema": "^0.57.0",
144+
"typescript-json-schema": "^0.63.0",
145145
"yarn": "^1.22.22"
146146
},
147147
"files": [

src/cli-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ const cliOptions: CLIOption[] = [
842842
long: 'target',
843843
short: 't',
844844
arg: 'value',
845-
description: `Determines the version to upgrade to: latest, newest, greatest, minor, patch, semver, @[tag], or [function]. (default: latest)`,
845+
description: `Determines the version to upgrade to: latest, newest, greatest, minor, patch, semver, \`@[tag]\`, or [function]. (default: latest)`,
846846
help: extendedHelpTarget,
847847
// eslint-disable-next-line no-template-curly-in-string
848848
type: `${supportedVersionTargets.map(s => `'${s}'`).join(' | ')} | ${'`@${string}`'} | TargetFunction`,

src/types/RunOptions.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -474,10 +474,8 @@
474474
"target": {
475475
"anyOf": [
476476
{
477-
"items": {
478-
"type": "string"
479-
},
480-
"type": "array"
477+
"pattern": "^@.*$",
478+
"type": "string"
481479
},
482480
{
483481
"description": "A function that can be provided to the --target option for custom filtering.",
@@ -488,7 +486,7 @@
488486
"type": "string"
489487
}
490488
],
491-
"description": "Determines the version to upgrade to: latest, newest, greatest, minor, patch, semver, @[tag], or [function]. (default: latest) Run \"ncu --help --target\" for details."
489+
"description": "Determines the version to upgrade to: latest, newest, greatest, minor, patch, semver, `@[tag]`, or [function]. (default: latest) Run \"ncu --help --target\" for details."
492490
},
493491
"timeout": {
494492
"description": "Global timeout in milliseconds. (default: no global timeout and 30 seconds per npm-registry-fetch)",

src/types/RunOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export interface RunOptions {
172172
/** Read package.json from stdin. */
173173
stdin?: string
174174

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

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

0 commit comments

Comments
 (0)