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

Updated packages and fixed smaller problems #43

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"typescriptreact"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"[javascript]": {
"editor.formatOnSave": false
Expand Down
98 changes: 49 additions & 49 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,69 +4,69 @@
"private": true,
"license": "AGPLv3",
"dependencies": {
"async-lock": "^1.2.2",
"async-lock": "^1.4.1",
"btoa": "^1.2.1",
"escape-string-regexp": "^2.0.0",
"filer.js": "^0.4.5",
"iconv-lite": "^0.5.0",
"escape-string-regexp": "^5.0.0",
"filer.js": "0.4.5",
"iconv-lite": "^0.6.3",
"idb.filesystem.js": "^0.0.8",
"jszip": "^3.2.2",
"lamejs": "^1.2.0",
"loglevel": "^1.6.4",
"jszip": "^3.10.1",
"lamejs": "^1.2.1",
"loglevel": "^1.9.1",
"pixi-sound": "^3.0.4",
"pixi-viewport": "^4.5.0",
"pixi.js": "^5.2.0",
"react": "^16.11.0",
"react-dom": "^16.11.0",
"rxjs": "^6.5.3",
"smart-buffer": "^4.1.0",
"pixi.js": "^5.3.12",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"rxjs": "^7.8.1",
"smart-buffer": "^4.2.0",
"smk2mp4": "cmfcmf/smk2mp4",
"upng-js": "^2.1.0",
"wavefile": "^8.4.6",
"wavefile": "^11.0.0",
"xml": "^1.0.1"
},
"devDependencies": {
"@babel/core": "^7.6.4",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-numeric-separator": "^7.2.0",
"@babel/preset-env": "^7.6.3",
"@babel/preset-react": "^7.6.3",
"@babel/preset-typescript": "^7.6.0",
"@types/async-lock": "^1.1.1",
"@types/jest": "^24.0.21",
"@types/jszip": "^3.1.6",
"@types/pngjs": "^3.3.1",
"@babel/core": "^7.24.9",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-numeric-separator": "^7.18.6",
"@babel/preset-env": "^7.24.8",
"@babel/preset-react": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@types/async-lock": "^1.4.2",
"@types/jest": "^29.5.12",
"@types/jszip": "^3.4.1",
"@types/pngjs": "^6.0.5",
"@types/react": "^16.9.11",
"@types/react-dom": "^16.9.3",
"@types/webpack": "^4.39.8",
"@types/xml": "^1.0.3",
"@typescript-eslint/eslint-plugin": "^2.13.0",
"@typescript-eslint/parser": "^2.13.0",
"babel-loader": "^8.0.6",
"@types/xml": "^1.0.11",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"babel-loader": "^9.1.3",
"copy-webpack-plugin": "^5.1.1",
"core-js": "^3.3.6",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.8.0",
"eslint-plugin-prettier": "^3.1.2",
"fork-ts-checker-webpack-plugin": "^3.0.1",
"core-js": "^3.37.1",
"eslint": "^9.7.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"fork-ts-checker-webpack-plugin": "^5.2.0",
"git-revision-webpack-plugin": "^3.0.4",
"html-webpack-plugin": "^3.2.0",
"husky": "^3.0.9",
"jest": "^25.1.0",
"jest-canvas-mock": "^2.1.2",
"license-checker-webpack-plugin": "^0.1.4",
"patch-package": "^6.2.0",
"postinstall-postinstall": "^2.0.0",
"prettier": "1.18.2",
"regenerator-runtime": "^0.13.3",
"terser-webpack-plugin": "^2.3.4",
"ts-jest": "^25.2.0",
"ts-loader": "^6.2.1",
"ts-node": "^8.4.1",
"typescript": "^3.6.4",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.10.3",
"html-webpack-plugin": "^4.5.2",
"husky": "^9.1.1",
"jest": "^29.7.0",
"jest-canvas-mock": "^2.5.2",
"license-checker-webpack-plugin": "^0.2.1",
"patch-package": "^8.0.0",
"postinstall-postinstall": "^2.1.0",
"prettier": "3.3.3",
"regenerator-runtime": "^0.14.1",
"terser-webpack-plugin": "^4.2.3",
"ts-jest": "^29.2.3",
"ts-loader": "^8.4.0",
"ts-node": "^8.10.2",
"typescript": "^5.5.3",
"webpack": "^4.47.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^4.2.2"
},
"scripts": {
Expand Down
45 changes: 0 additions & 45 deletions patches/license-checker-webpack-plugin+0.1.4.patch

This file was deleted.

66 changes: 0 additions & 66 deletions patches/pixi.js+5.2.0.patch

This file was deleted.

13 changes: 0 additions & 13 deletions patches/wavefile+8.4.6.patch

This file was deleted.

2 changes: 1 addition & 1 deletion src/game/gad-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export default class GADRenderer {
);

const text = new BitmapText(config.texts[id] || "???", {
font: { name: font.name, size: font.size }
fontName: font.name, fontSize: font.size
});
text.position.set(position.x, position.y);
text.pivot.set(0, font.size);
Expand Down
6 changes: 3 additions & 3 deletions src/game/game-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -646,17 +646,17 @@ export default class GameRenderer {

private zoom(zoom: number) {
const center = this.viewport.center;
this.viewport.scale.set(1.0 / zoom);
this.viewport.scaled = (1.0 / zoom);
this.viewport.moveCenter(center.x, center.y);
}

public zoomIn() {
const currentZoom = 1.0 / this.viewport.scale.x;
const currentZoom = 1.0 / this.viewport.scaled;
this.zoom(Math.max(1, currentZoom - 1));
}

public zoomOut() {
const currentZoom = 1.0 / this.viewport.scale.x;
const currentZoom = 1.0 / this.viewport.scaled;
this.zoom(currentZoom + 1);
}

Expand Down
2 changes: 1 addition & 1 deletion src/parsers/WAV/wav-parser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import WaveFile from "wavefile";
import { WaveFile } from "wavefile";

interface ADPCMChannelStatus {
predictor: number;
Expand Down
4 changes: 1 addition & 3 deletions src/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ import BitmapFontGenerator from "./parsers/ZEI/bitmap-font-generator";
import parseTranslations from "./translation/translation-parser";
import UploadInfo from "./uploadInfo";
import { findRootInZip } from "./util/util";

// eslint-disable-next-line @typescript-eslint/no-var-requires
const escapeStringRegexp = require("escape-string-regexp");
import escapeStringRegexp from "escape-string-regexp";

export interface UploadLogger {
readonly info: (msg: string) => void;
Expand Down
14 changes: 7 additions & 7 deletions src/util/util.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ test("finds root in zip with __MACOS", () => {
test("finds root in nested zip 1 level", () => {
const zip = new JSZip();
const annoFolder = zip.folder("Anno 1602");
annoFolder.folder("GFX");
annoFolder.folder("MGFX");
annoFolder.folder("SAVEGAME");
annoFolder?.folder("GFX");
annoFolder?.folder("MGFX");
annoFolder?.folder("SAVEGAME");

// @ts-ignore
expect(findRootInZip(zip).root).toEqual("Anno 1602/");
Expand All @@ -34,10 +34,10 @@ test("finds root in nested zip 1 level", () => {
test("finds root in nested zip 2 level", () => {
const zip = new JSZip();
const folderA = zip.folder("anno");
const folderB = folderA.folder("1602");
folderB.folder("GFX");
folderB.folder("MGFX");
folderB.folder("SAVEGAME");
const folderB = folderA?.folder("1602");
folderB?.folder("GFX");
folderB?.folder("MGFX");
folderB?.folder("SAVEGAME");

// @ts-ignore
expect(findRootInZip(zip).root).toEqual("anno/1602/");
Expand Down
10 changes: 6 additions & 4 deletions webpack.dev.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
const merge = require("webpack-merge");
const common = require("./webpack.common.js");
const webpack = require("webpack");
const path = require('path');
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");

module.exports = merge(common, {
devServer: {
contentBase: false,
hot: true
},
devtool: "inline-source-map",
Expand All @@ -28,7 +27,10 @@ module.exports = merge(common, {
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new ForkTsCheckerWebpackPlugin({ tsconfig: "tsconfig.browser.json" })
new ForkTsCheckerWebpackPlugin({
typescript: {
configFile: path.join(__dirname, 'tsconfig.browser.json'),
},
}),
]
});
Loading