Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bump jsr.json & jsr.jsonc by default #27

Merged
merged 1 commit into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/cli/parse-args.ts
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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