Skip to content

Commit

Permalink
feat: bump jsr.json & jsr.jsonc by default (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Mar 3, 2024
1 parent ba39e94 commit ae64720
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/cli/parse-args.ts
Expand Up @@ -84,7 +84,13 @@ export async function parseArgs(): Promise<ParsedArgs> {
console.log(c.yellow('The --recursive option is ignored when files are specified'))
}
else {
parsedArgs.options.files = ['package.json', 'package-lock.json', 'packages/**/package.json']
parsedArgs.options.files = [
'package.json',
'package-lock.json',
'packages/**/package.json',
'jsr.json',
'jsr.jsonc',
]

// check if pnpm-workspace.yaml exists, if so, add all workspaces to files
if (fsSync.existsSync('pnpm-workspace.yaml')) {
Expand Down
2 changes: 1 addition & 1 deletion src/normalize-options.ts
Expand Up @@ -102,7 +102,7 @@ export async function normalizeOptions(raw: VersionBumpOptions): Promise<Normali
const files = await fg(
raw.files?.length
? raw.files
: ['package.json', 'package-lock.json'],
: ['package.json', 'package-lock.json', 'jsr.json', 'jsr.jsonc'],
{
cwd,
onlyFiles: true,
Expand Down
2 changes: 1 addition & 1 deletion src/types/version-bump-options.ts
Expand Up @@ -78,7 +78,7 @@ export interface VersionBumpOptions {
* (ReadMe files, config files, source code, etc.) it will simply do a global replacement
* of the old version number with the new version number.
*
* Defaults to ["package.json", "package-lock.json"]
* Defaults to ["package.json", "package-lock.json", "jsr.json", "jsr.jsonc"]
*/
files?: string[]

Expand Down
1 change: 1 addition & 0 deletions src/update-files.ts
Expand Up @@ -43,6 +43,7 @@ async function updateFile(relPath: string, operation: Operation): Promise<boolea
case 'package-lock.json':
case 'bower.json':
case 'component.json':
case 'jsr.json':
return updateManifestFile(relPath, operation)

default:
Expand Down

0 comments on commit ae64720

Please sign in to comment.