Skip to content

Commit

Permalink
Update pack formats to 49 (R) / 64 (D)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nixinova committed Jan 24, 2025
1 parent 3304672 commit 4198723
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# Changelog

## Next
- Updated resource pack format to `49`.
- Updated data pack format to `64`.

## 1.4.0
- Added `release` and `snapshot` to exported object `LATEST` which denotes the latest known released versions.
- Changed output of `getVersions` to return `null` instead of `''` when a version is not present.
- Changed output of `getVersions` to replace '`.x`' with the actual game version.
- Changed CLI output of `--list` to present the versions in prose instead of JSON.
- Changed CLI output to display a basic message when no arguments are given.
- Changed CLI help message.
- Updated resource pack format to `43`.
- Updated data pack format to `58`.

## 1.3.16
- Updated resource pack format to `36`.
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const packFormat = require('pack-format')
packFormat('1.14.4') // 4
packFormat('1.16.2-pre1', 'resource') // 5
packFormat('20w45a', 'data') // 6
packFormat.LATEST.data // 58
packFormat.LATEST.version // 1.21.2
packFormat.LATEST.data // 64
packFormat.LATEST.version // 1.21.4
```

Retrieve a list of versions corresponding to a specific `pack_format`, again optionally specifying resource/data pack version.
Expand Down
10 changes: 9 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ const START_RELEASES: Record<VersionName, Record<PackType, FormatResult>> = {
'1.20.6': { resource: 32, data: 41 },
'1.21': { resource: 34, data: 48 },
'1.21.2': { resource: 42, data: 57 },
'1.21.4': { resource: 46, data: 61 },
'1.21.5': { resource: undefined, data: undefined },
'1.22.x': { resource: undefined, data: undefined },
}
const START_SNAPSHOTS: Record<string, Record<PackType, FormatResult>> = {
Expand Down Expand Up @@ -89,9 +91,14 @@ const START_SNAPSHOTS: Record<string, Record<PackType, FormatResult>> = {
'24w39a': { resource: 39, data: 55 },
'24w40a': { resource: 40, data: 56 },
'24w44a': { resource: 43, data: 58 },
'24w45a': { resource: 44, data: 59 },
'24w46a': { resource: 45, data: 60 },
'25w02a': { resource: 47, data: 62 },
'25w03a': { resource: 48, data: 63 },
'25w04a': { resource: 49, data: 64 },

// The below should be the last released snapshot + 1 week
['24w45a']: { resource: undefined, data: undefined },
['25w05a']: { resource: undefined, data: undefined },
}

const SPECIAL: Record<PackType, Record<number, string[]>> = {
Expand Down Expand Up @@ -120,6 +127,7 @@ const SPECIAL: Record<PackType, Record<number, string[]>> = {
47: ['1.21-pre2'],
48: ['1.21-pre3'],
57: ['1.21.2-pre'],
60: ['1.21.4-pre1'],
},
}

Expand Down
8 changes: 8 additions & 0 deletions test/pack-formats-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ Types:
"1.21.1" (r,d) 34,48
"1.21.2" (r,d) 42,57
"1.21.3" (r,d) 42,57
"1.21.4" (r,d) 46,61
"1.21.5" (r) none
"1.22" (d) none

=== Pre-releases ===

Expand Down Expand Up @@ -81,6 +84,9 @@ Types:
"1.21.2-pre3" (r,d) 42,57
"1.21.2-rc1" (r,d) 42,57
"1.21.2-rc2" (r,d) 42,57
"1.21.4-pre1" (r,d) 46,60
"1.21.4-pre2" (r,d) 46,61
"1.21.4-rc1" (r,d) 46,61

=== Snapshots ===

Expand Down Expand Up @@ -139,6 +145,8 @@ Types:
"24w39a" (r,d) 39,55
"24w40a" (r,d) 40,56
"24w44a" (r,d) 43,58
"24w45a" (r,d) 44,59
"24w46a" (r,d) 45,60

=== Special cases ===

Expand Down

0 comments on commit 4198723

Please sign in to comment.