@onlyworlds/sdk 4.53.1 → 4.53.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ earlier history lives in git log only.
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [4.53.2] - 2026-10-22
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **A `mimetype` marker with a byte order mark is refused** (`marker`, spec §4.7 OW-6). The reader compared the entry as decoded text, and `TextDecoder`'s default strips a leading BOM, so a marker of BOM plus the media type passed; the spec says bytes exactly. Found by the Python package's port of the reader (`onlyworlds` 0.17.0), which refused it. No fixture carries the case yet (proposed for the conformance set).
|
|
13
|
+
|
|
8
14
|
## [4.53.1] - 2026-10-22
|
|
9
15
|
|
|
10
16
|
### Changed
|
package/dist/index.js
CHANGED
|
@@ -2906,7 +2906,7 @@ function readWorldFile(bytes, opts = {}) {
|
|
|
2906
2906
|
const names = new Set(files.map((e) => e.name));
|
|
2907
2907
|
checkFileAndFolder(names);
|
|
2908
2908
|
const marker = files.find((e) => e.name === MARKER_NAME);
|
|
2909
|
-
if (marker && new TextDecoder().decode(inflateEntry(bytes, marker)) !== WORLD_FILE_MEDIA_TYPE) {
|
|
2909
|
+
if (marker && new TextDecoder("utf-8", { ignoreBOM: true }).decode(inflateEntry(bytes, marker)) !== WORLD_FILE_MEDIA_TYPE) {
|
|
2910
2910
|
refuse("marker", "The mimetype entry holds other bytes than the OnlyWorlds media type.");
|
|
2911
2911
|
}
|
|
2912
2912
|
const candidates = [...names].filter((n) => n !== MARKER_NAME && !isJunk(n));
|