Skip to content

Commit 0200d49

Browse files
committed
1.4.0
1 parent 181d2df commit 0200d49

File tree

5 files changed

+28
-44
lines changed

5 files changed

+28
-44
lines changed

changelog.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Changelog
22

3-
## Next
3+
## 1.4.0
44
- Added `release` and `snapshot` to exported object `LATEST` which denotes the latest known released versions.
5-
- Added basic message when no arguments are given.
65
- Changed output of `getVersions` to return `null` instead of `''` when a version is not present.
76
- Changed output of `getVersions` to replace '`.x`' with the actual game version.
87
- Changed CLI output of `--list` to present the versions in prose instead of JSON.
9-
- Changed help message.
8+
- Changed CLI output to display a basic message when no arguments are given.
9+
- Changed CLI help message.
1010

1111
## 1.3.16
1212
- Updated resource pack format to `36`.

license.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ISC License
22

3-
Copyright © Nixinova 2021–2022
3+
Copyright © Nixinova 2021–2024
44

55
Permission to use, copy, modify, and/or distribute this software for any
66
purpose with or without fee is hereby granted, provided that the above

package-lock.json

Lines changed: 13 additions & 33 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
@@ -1,6 +1,6 @@
11
{
22
"name": "pack-format",
3-
"version": "1.3.16",
3+
"version": "1.4.0",
44
"description": "Returns the pack_format of any Minecraft version, including snapshots",
55
"scripts": {
66
"prepublish": "tsc",

src/cli.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ import { getPackFormat, getPackFormats, getVersions, LATEST } from './index'
22
import { FormatResult } from './types'
33
const VERSION = require('../package.json').version
44

5-
const indent = (n: number): string => ' '.repeat(n * 4)
5+
const indent = (n: number): string => ' '.repeat(n * 2)
66
const log = function ([argFull, argShort]: string[], desc: string[], example: string): void {
7-
console.log('\n')
8-
console.log(`${indent(1)}${argFull}`)
7+
console.log()
8+
console.log(`${indent(2)}${argFull}`)
99
if (argShort)
10-
console.log(`${indent(1)}${argShort}`)
10+
console.log(`${indent(2)}${argShort}`)
11+
console.log()
1112
for (let i in desc)
12-
console.log(indent(2) + desc[i])
13-
console.log(`${indent(3)}Example: ${example}`)
13+
console.log(indent(2) + indent(2) + desc[i])
14+
console.log(indent(2) + indent(3) + 'Example: ' + example)
15+
console.log()
1416
}
1517

1618
const rawArgs = process.argv.slice(2)
@@ -27,6 +29,8 @@ const ver = args._[0]
2729

2830
// Print the help message
2931
if (args.help) {
32+
console.log()
33+
console.log(`\n${indent(1)}pack-format\n`)
3034
log(
3135
[
3236
'<version>',

0 commit comments

Comments
 (0)