Skip to content

Commit ae64720

Browse files
authoredMar 3, 2024
feat: bump jsr.json & jsr.jsonc by default (#27)
1 parent ba39e94 commit ae64720

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed
 

‎src/cli/parse-args.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,13 @@ export async function parseArgs(): Promise<ParsedArgs> {
8484
console.log(c.yellow('The --recursive option is ignored when files are specified'))
8585
}
8686
else {
87-
parsedArgs.options.files = ['package.json', 'package-lock.json', 'packages/**/package.json']
87+
parsedArgs.options.files = [
88+
'package.json',
89+
'package-lock.json',
90+
'packages/**/package.json',
91+
'jsr.json',
92+
'jsr.jsonc',
93+
]
8894

8995
// check if pnpm-workspace.yaml exists, if so, add all workspaces to files
9096
if (fsSync.existsSync('pnpm-workspace.yaml')) {

‎src/normalize-options.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export async function normalizeOptions(raw: VersionBumpOptions): Promise<Normali
102102
const files = await fg(
103103
raw.files?.length
104104
? raw.files
105-
: ['package.json', 'package-lock.json'],
105+
: ['package.json', 'package-lock.json', 'jsr.json', 'jsr.jsonc'],
106106
{
107107
cwd,
108108
onlyFiles: true,

‎src/types/version-bump-options.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export interface VersionBumpOptions {
7878
* (ReadMe files, config files, source code, etc.) it will simply do a global replacement
7979
* of the old version number with the new version number.
8080
*
81-
* Defaults to ["package.json", "package-lock.json"]
81+
* Defaults to ["package.json", "package-lock.json", "jsr.json", "jsr.jsonc"]
8282
*/
8383
files?: string[]
8484

‎src/update-files.ts

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ async function updateFile(relPath: string, operation: Operation): Promise<boolea
4343
case 'package-lock.json':
4444
case 'bower.json':
4545
case 'component.json':
46+
case 'jsr.json':
4647
return updateManifestFile(relPath, operation)
4748

4849
default:

0 commit comments

Comments
 (0)
Please sign in to comment.