Skip to content

Commit 016425a

Browse files
authored
Merge pull request #64 from ChiefOfGxBxL/release-4.0
Release 4.0
2 parents afc13a5 + 3a724a4 commit 016425a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+21334
-201845
lines changed

.codeclimate.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
plugins:
2-
tslint:
3-
enabled: true
4-
config: tslint.json
5-
fixme:
6-
enabled: true
7-
ratings:
8-
paths:
9-
- "**.ts"
10-
- "**.tsx"
11-
exclude_paths:
12-
- examples/
13-
- test/
1+
plugins:
2+
tslint:
3+
enabled: true
4+
config: tslint.json
5+
fixme:
6+
enabled: true
7+
ratings:
8+
paths:
9+
- "**.ts"
10+
- "**.tsx"
11+
exclude_paths:
12+
- test/

.eslintignore

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
/.git/*
2-
/.nyc_output/*
3-
/coverage/*
4-
/examples/*
5-
/node_modules/*
6-
/test/*
1+
/.git/*
2+
/.nyc_output/*
3+
/coverage/*
4+
/node_modules/*
5+
/test/*

.gitignore

Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,34 @@
1-
#
2-
# NodeJS
3-
#
4-
node_modules
5-
examples/jsonToWar/output/war3*
6-
examples/warToJson/files/output/*.json
7-
examples/warToJson/files/output/object/*.json
8-
examples/warToJson/files/output/other/*.json
9-
10-
#
11-
# Build, testing, and coverage
12-
#
13-
coverage/
14-
.nyc_output/
15-
test/.output
16-
17-
#
18-
# TypeScript
19-
#
20-
**/*d.ts
21-
**/*d.ts.map
22-
**/*js.map
23-
**/*.js
24-
.tsbuildinfo
25-
26-
27-
#
28-
# VisualStudioCode
29-
#
30-
.vscode
31-
.history
32-
33-
#
34-
# macOS
35-
#
36-
.DS_Store
37-
.AppleDouble
1+
#
2+
# NodeJS
3+
#
4+
node_modules
5+
6+
#
7+
# Build, testing, and coverage
8+
#
9+
coverage/
10+
.nyc_output/
11+
test/.output
12+
13+
#
14+
# TypeScript
15+
#
16+
**/*d.ts
17+
**/*d.ts.map
18+
**/*js.map
19+
**/*.js
20+
.tsbuildinfo
21+
22+
23+
#
24+
# VisualStudioCode
25+
#
26+
.vscode
27+
.history
28+
29+
#
30+
# macOS
31+
#
32+
.DS_Store
33+
.AppleDouble
3834
.LSOverride

.nycrc

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
{
2-
"extends": "@istanbuljs/nyc-config-typescript",
3-
"check-coverage": true,
4-
"per-file": true,
5-
"extension": [
6-
".ts",
7-
".tsx"
8-
],
9-
"exclude": [
10-
"**/*.d.ts",
11-
"**/coverage/**",
12-
"**/examples/**"
13-
],
14-
"reporter": [
15-
"lcov",
16-
"text-summary"
17-
],
18-
"all": true
19-
}
1+
{
2+
"extends": "@istanbuljs/nyc-config-typescript",
3+
"check-coverage": true,
4+
"per-file": true,
5+
"extension": [
6+
".ts",
7+
".tsx"
8+
],
9+
"exclude": [
10+
"**/*.d.ts",
11+
"**/coverage/**"
12+
],
13+
"reporter": [
14+
"lcov",
15+
"text-summary"
16+
],
17+
"all": true
18+
}

.travis.yml

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
# Modeled after: https://travis-ci.org/microsoft/TypeScript/jobs/625136191/config
2-
3-
language: node_js
4-
5-
# Run build on Node v8
6-
node_js:
7-
- "8"
8-
9-
branches:
10-
only:
11-
- master
12-
13-
install:
14-
- npm uninstall typescript --no-save
15-
- npm install
16-
17-
cache:
18-
directories:
19-
- node_modules
20-
21-
script: "npm run-script test-travis"
22-
23-
# Send coverage data to Coveralls
1+
# Modeled after: https://travis-ci.org/microsoft/TypeScript/jobs/625136191/config
2+
3+
language: node_js
4+
5+
node_js:
6+
- "14"
7+
8+
branches:
9+
only:
10+
- master
11+
12+
install:
13+
- npm uninstall typescript --no-save
14+
- npm install
15+
16+
cache:
17+
directories:
18+
- node_modules
19+
20+
script: "npm run-script test-travis"
21+
22+
# Send coverage data to Coveralls
2423
after_script: "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"

CHANGELOG.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# 4.0.0 (2021-02-28)
2+
## SUMMARY
3+
**🔥 Breaking changes**
4+
5+
This major release significantly overhauls WC3MapTranslator since the release of WarCraft III: Reforged. There are a few breaking changes in this release.
6+
7+
The two largest changes include a new usage contract and changes to the terrain `.json` format, both of which are detailed below. This release also integrates the latest file formats, after a few changes to the war3map formats to support Reforged.
8+
9+
The old usage contract meant that developers had to instantiate translators, which didn't make much sense. Now translators are static classes that can be used directly after importing.
10+
11+
The `.json` format for terrain gets rid of the bulky `tile` objects and returns to a one-dimensional mask array for things like ground height, boundary flags, etc. In an older version of WC3MapTranslator, terrain used to be a multi-dimensional array of rows, followed by the `tile` object format. The problems with the `tile` object format were two-fold: (1) file size would blow up (e.g. a 29kB `.w3e` file would become a 1199kB `.json` terrain file); and (2) the bulky `tile` objects did not lend themselves to the spirit of having a diff-able JSON file. We believe that a single-dimensional array will allow developers to more easily see differences between JSONs.
12+
13+
Another exciting change is a new [WC3MapSpecification](https://github.com/ChiefOfGxBxL/WC3MapSpecification) repository for documenting the war3map specifications. This is a living document, meaning it may be updated in-place as our understanding of the file formats improves!
14+
15+
## FEATURES
16+
* 🔥 Improve usage contract:
17+
* Translators are now exported by this library (e.g. `import { ObjectTranslator } from 'wc3maptranslator'`)
18+
* Translators no longer need to be instantiated to be used
19+
* 🔥 Change terrain format:
20+
* Tiles are now defined via "masks", for ground height, texture, variation, etc.
21+
* Before: `tiles` is an array of objects... `{ groundHeight, waterHeight, boundaryFlag, flags, groundTexture, groundVariation, cliffVariation, cliffTexture, layerHeight }`
22+
* After: a one-dimensional array for each of the above fields... e.g. for a 64x64 map, `groundHeight` is an array of 65*65=4225 tile points
23+
* Some fields have been renamed into camelCase for consistency:
24+
* `customtileset` -> `customTileset`
25+
* `tilepalette` -> `tilePalette`
26+
* `clifftilepalette` -> `cliffTilePalette`
27+
* Upgrade to latest file formats
28+
* Sounds version upgraded from `1` -> `3`
29+
* Info version upgraded from `25` -> `31`
30+
* Add more type safety:
31+
* Translator results from `jsonToWar()` and `warToJson()` are now typed by `WarResult` and `JsonResult`, respectively
32+
* `JsonResult` is generically typed to describe what it contains (e.g. `Sound[]`)
33+
* Introduced new `angle` type, which is an alias for `number`; `angle`'s should always be specified in degrees, not radians
34+
## FIXES
35+
* Resolve `[DEP0005] DeprecationWarning: Buffer()` warning in `HexBuffer.ts`
36+
* Fix scoping issues on `*Translator.ts`, `HexBuffer.ts` and `W3Buffer.ts` where certain fields that should be `private` were marked as `public`
37+
* Fix InfoTranslator reading random item table ID length as 1 instead of 4
38+
* Fix potential null-terminator errors related to string or character-array fields
39+
## MAINTENANCE
40+
* Upgrade to Node 14.x LTS
41+
* Upgrade to npm 7.x
42+
* Upgrade `round-to` 4.1.0 -> 5.0.0
43+
* Upgrade `@types/fs-extra` 8.1.0 -> 9.0.7
44+
* Upgrade `@types/mocha` 7.0.1 -> 8.2.1
45+
* Upgrade `@types/node` 12.12.28 -> 14.14.31
46+
* Upgrade `fs-extra` 8.1.0 -> 9.1.0
47+
* Upgrade `mocha` 7.0.1 -> 8.3.0
48+
* Upgrade `nyc` 15.0.0 -> 15.1.0
49+
* Upgrade `ts-node` 8.6.2 -> 9.1.1
50+
* Upgrade `tslint` 6.0.0 -> 6.1.3
51+
* Upgrade `typescript` 3.8.2 -> 4.2.2
52+
* The project structure has changed:
53+
* `examples` sub-project directory is removed
54+
* Refer to `USAGE.md` for how to use the code
55+
* Add all contributors to `package.json`
56+
* Resolve all security issues via `npm audit fix` (5 low, 1 high, 1 critical)
57+
## TESTING
58+
* Travis CI will now use Node 14 LTS to build the project
59+
* `test` directory now contains the WC3 and JSON data files the tests require
60+
* Implement the StringsTranslator test
61+
* Resolve all broken unit tests, most of them being reversion tests
62+
<!--
63+
# x.y.z (YYYY-MM-DD)
64+
## SUMMARY
65+
**🔥 Breaking changes**
66+
## FEATURES
67+
## FIXES
68+
## MAINTENANCE
69+
## TESTING
70+
-->
71+
72+
# Previous versions
73+
The `CHANGELOG.md` file was introduced with the 4.x release. For details on previous changes, please refer to https://github.com/ChiefOfGxBxL/WC3MapTranslator/releases.

0 commit comments

Comments
 (0)