From 8eb9ba957bf46ad4660d9c8ded5a5225f5597db4 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 15 Jul 2025 23:56:33 +0200 Subject: [PATCH] [ts] Update main dependencies, add formatting script, add Biome for linting, temporary commit --- .gitignore | 1 + spine-ts/biome.json | 11 + spine-ts/package-lock.json | 1013 +++++++++++++++-- spine-ts/package.json | 15 +- spine-ts/scripts/format.ts | 38 + spine-ts/scripts/tsconfig.json | 12 + spine-ts/spine-core/tests/HeadlessTest.ts | 264 ++--- .../example/typescript/index.ts | 36 +- spine-ts/spine-phaser-v3/src/mixins.ts | 4 +- .../example/typescript/index.ts | 36 +- spine-ts/spine-phaser-v4/src/mixins.ts | 4 +- .../spine-pixi-v7/example/typescript/index.ts | 56 +- .../{atlasLoader.ts => Atlas-Loader.ts} | 10 +- .../{skeletonLoader.ts => Skeleton-Loader.ts} | 10 +- .../src/darkTintMesh/DarkTintBatchGeom.ts | 2 +- .../src/darkTintMesh/DarkTintGeom.ts | 2 +- .../src/darkTintMesh/DarkTintMaterial.ts | 24 +- .../src/darkTintMesh/DarkTintMesh.ts | 10 +- .../src/darkTintMesh/DarkTintRenderer.ts | 4 +- spine-ts/spine-pixi-v7/src/index.ts | 8 +- .../spine-pixi-v8/example/typescript/index.ts | 64 +- .../{atlasLoader.ts => Atlas-Loader.ts} | 0 .../{skeletonLoader.ts => Skeleton-Loader.ts} | 0 spine-ts/spine-pixi-v8/src/index.ts | 8 +- .../spine-threejs/example/typescript/index.ts | 176 +-- tests/biome.json | 11 + tests/package.json | 8 +- tests/tsfmt.json | 24 + 28 files changed, 1418 insertions(+), 433 deletions(-) create mode 100644 spine-ts/biome.json create mode 100644 spine-ts/scripts/format.ts create mode 100644 spine-ts/scripts/tsconfig.json rename spine-ts/spine-pixi-v7/src/assets/{atlasLoader.ts => Atlas-Loader.ts} (95%) rename spine-ts/spine-pixi-v7/src/assets/{skeletonLoader.ts => Skeleton-Loader.ts} (91%) rename spine-ts/spine-pixi-v8/src/assets/{atlasLoader.ts => Atlas-Loader.ts} (100%) rename spine-ts/spine-pixi-v8/src/assets/{skeletonLoader.ts => Skeleton-Loader.ts} (100%) create mode 100644 tests/biome.json create mode 100644 tests/tsfmt.json diff --git a/.gitignore b/.gitignore index a13dd6fed..e7ca0f590 100644 --- a/.gitignore +++ b/.gitignore @@ -251,3 +251,4 @@ spine-libgdx/.factorypath spine-libgdx/.project .clang-format spine-c/codegen/spine-cpp-types.json +spine-flutter/example/devtools_options.yaml diff --git a/spine-ts/biome.json b/spine-ts/biome.json new file mode 100644 index 000000000..fb8fcc747 --- /dev/null +++ b/spine-ts/biome.json @@ -0,0 +1,11 @@ +{ + "formatter": { + "enabled": false + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true + } + } +} \ No newline at end of file diff --git a/spine-ts/package-lock.json b/spine-ts/package-lock.json index ffcbbcb4b..eac7b52dc 100644 --- a/spine-ts/package-lock.json +++ b/spine-ts/package-lock.json @@ -22,28 +22,88 @@ "spine-webcomponents" ], "devDependencies": { - "@types/offscreencanvas": "^2019.6.4", + "@types/offscreencanvas": "^2019.7.3", "alive-server": "^1.3.0", - "concurrently": "^7.6.0", + "concurrently": "^9.2.0", "copyfiles": "^2.4.1", - "esbuild": "^0.25.4", - "rimraf": "^3.0.2", - "typescript": "5.6.2" + "esbuild": "^0.25.6", + "rimraf": "^6.0.1", + "typescript": "^5.8.3", + "typescript-formatter": "^7.2.2" } }, - "node_modules/@babel/runtime": { - "version": "7.27.0", + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.6.tgz", + "integrity": "sha512-ShbM/3XxwuxjFiuVBHA+d3j5dyac0aEVVq1oluIDf71hUw0aRF59dV/efUsIwFnR6m8JNM2FjZOzmaZ8yG61kw==", + "cpu": [ + "ppc64" + ], "dev": true, "license": "MIT", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, + "optional": true, + "os": [ + "aix" + ], "engines": { - "node": ">=6.9.0" + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.6.tgz", + "integrity": "sha512-S8ToEOVfg++AU/bHwdksHNnyLyVM+eMVAOf6yRKFitnwnbwwPNqKr3srzFRe7nzV69RQKb5DgchIX5pt3L53xg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.6.tgz", + "integrity": "sha512-hd5zdUarsK6strW+3Wxi5qWws+rJhCCbMiC9QZyzoxfk5uHRIE8T287giQxzVpEvCwuJ9Qjg6bEjcRJcgfLqoA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.6.tgz", + "integrity": "sha512-0Z7KpHSr3VBIO9A/1wcT3NTy7EB4oNC4upJ5ye3R7taCc2GUdeynSLArnon5G8scPwaU866d3H4BCrE5xLW25A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.4", + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.6.tgz", + "integrity": "sha512-FFCssz3XBavjxcFxKsGy2DYK5VSvJqa6y5HXljKzhRZ87LvEi13brPrf/wdyl/BbpbMKJNOr1Sd0jtW4Ge1pAA==", "cpu": [ "arm64" ], @@ -57,6 +117,363 @@ "node": ">=18" } }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.6.tgz", + "integrity": "sha512-GfXs5kry/TkGM2vKqK2oyiLFygJRqKVhawu3+DOCk7OxLy/6jYkWXhlHwOoTb0WqGnWGAS7sooxbZowy+pK9Yg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.6.tgz", + "integrity": "sha512-aoLF2c3OvDn2XDTRvn8hN6DRzVVpDlj2B/F66clWd/FHLiHaG3aVZjxQX2DYphA5y/evbdGvC6Us13tvyt4pWg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.6.tgz", + "integrity": "sha512-2SkqTjTSo2dYi/jzFbU9Plt1vk0+nNg8YC8rOXXea+iA3hfNJWebKYPs3xnOUf9+ZWhKAaxnQNUf2X9LOpeiMQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.6.tgz", + "integrity": "sha512-SZHQlzvqv4Du5PrKE2faN0qlbsaW/3QQfUUc6yO2EjFcA83xnwm91UbEEVx4ApZ9Z5oG8Bxz4qPE+HFwtVcfyw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.6.tgz", + "integrity": "sha512-b967hU0gqKd9Drsh/UuAm21Khpoh6mPBSgz8mKRq4P5mVK8bpA+hQzmm/ZwGVULSNBzKdZPQBRT3+WuVavcWsQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.6.tgz", + "integrity": "sha512-aHWdQ2AAltRkLPOsKdi3xv0mZ8fUGPdlKEjIEhxCPm5yKEThcUjHpWB1idN74lfXGnZ5SULQSgtr5Qos5B0bPw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.6.tgz", + "integrity": "sha512-VgKCsHdXRSQ7E1+QXGdRPlQ/e08bN6WMQb27/TMfV+vPjjTImuT9PmLXupRlC90S1JeNNW5lzkAEO/McKeJ2yg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.6.tgz", + "integrity": "sha512-WViNlpivRKT9/py3kCmkHnn44GkGXVdXfdc4drNmRl15zVQ2+D2uFwdlGh6IuK5AAnGTo2qPB1Djppj+t78rzw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.6.tgz", + "integrity": "sha512-wyYKZ9NTdmAMb5730I38lBqVu6cKl4ZfYXIs31Baf8aoOtB4xSGi3THmDYt4BTFHk7/EcVixkOV2uZfwU3Q2Jw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.6.tgz", + "integrity": "sha512-KZh7bAGGcrinEj4qzilJ4hqTY3Dg2U82c8bv+e1xqNqZCrCyc+TL9AUEn5WGKDzm3CfC5RODE/qc96OcbIe33w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.6.tgz", + "integrity": "sha512-9N1LsTwAuE9oj6lHMyyAM+ucxGiVnEqUdp4v7IaMmrwb06ZTEVCIs3oPPplVsnjPfyjmxwHxHMF8b6vzUVAUGw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.6.tgz", + "integrity": "sha512-A6bJB41b4lKFWRKNrWoP2LHsjVzNiaurf7wyj/XtFNTsnPuxwEBWHLty+ZE0dWBKuSK1fvKgrKaNjBS7qbFKig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.6.tgz", + "integrity": "sha512-IjA+DcwoVpjEvyxZddDqBY+uJ2Snc6duLpjmkXm/v4xuS3H+3FkLZlDm9ZsAbF9rsfP3zeA0/ArNDORZgrxR/Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.6.tgz", + "integrity": "sha512-dUXuZr5WenIDlMHdMkvDc1FAu4xdWixTCRgP7RQLBOkkGgwuuzaGSYcOpW4jFxzpzL1ejb8yF620UxAqnBrR9g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.6.tgz", + "integrity": "sha512-l8ZCvXP0tbTJ3iaqdNf3pjaOSd5ex/e6/omLIQCVBLmHTlfXW3zAxQ4fnDmPLOB1x9xrcSi/xtCWFwCZRIaEwg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.6.tgz", + "integrity": "sha512-hKrmDa0aOFOr71KQ/19JC7az1P0GWtCN1t2ahYAf4O007DHZt/dW8ym5+CUdJhQ/qkZmI1HAF8KkJbEFtCL7gw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.6.tgz", + "integrity": "sha512-+SqBcAWoB1fYKmpWoQP4pGtx+pUUC//RNYhFdbcSA16617cchuryuhOCRpPsjCblKukAckWsV+aQ3UKT/RMPcA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.6.tgz", + "integrity": "sha512-dyCGxv1/Br7MiSC42qinGL8KkG4kX0pEsdb0+TKhmJZgCUDBGmyo1/ArCjNGiOLiIAgdbWgmWgib4HoCi5t7kA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.6.tgz", + "integrity": "sha512-42QOgcZeZOvXfsCBJF5Afw73t4veOId//XD3i+/9gSkhSV6Gk3VPlWncctI+JcOyERv85FUo7RxuxGy+z8A43Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.6.tgz", + "integrity": "sha512-4AWhgXmDuYN7rJI6ORB+uU9DHLq/erBbuMoAuB4VWJTu5KtCgcKYPynF0YI1VkBNuEfjNlLrFr9KZPJzrtLkrQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.6.tgz", + "integrity": "sha512-NgJPHHbEpLQgDH2MjQu90pzW/5vvXIZ7KOnPyNBm92A6WgZ/7b6fJyUBjoumLqeOQQGqY2QjQxRo97ah4Sj0cA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esotericsoftware/spine-canvas": { "resolved": "spine-canvas", "link": true @@ -101,6 +518,132 @@ "resolved": "spine-webgl", "link": true }, + "node_modules/@isaacs/balanced-match": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", + "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/brace-expansion": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", + "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@isaacs/balanced-match": "^4.0.1" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@pdf-lib/upng": { "version": "1.0.1", "dev": true, @@ -727,32 +1270,46 @@ "node": ">=0.1.90" } }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/commandpost": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/commandpost/-/commandpost-1.4.0.tgz", + "integrity": "sha512-aE2Y4MTFJ870NuB/+2z1cXBhSBBzRydVVjzhFC4gtenEhpnj15yu0qptWGJsO9YGrcPZ3ezX8AWb1VA391MKpQ==", + "dev": true, + "license": "MIT" + }, "node_modules/concat-map": { "version": "0.0.1", "dev": true, "license": "MIT" }, "node_modules/concurrently": { - "version": "7.6.0", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.2.0.tgz", + "integrity": "sha512-IsB/fiXTupmagMW4MNp2lx2cdSN2FfZq78vF90LBB+zZHArbIQZjQtzXCiXnvTxCZSvXanTqFLWBjw2UkLx1SQ==", "dev": true, "license": "MIT", "dependencies": { - "chalk": "^4.1.0", - "date-fns": "^2.29.1", + "chalk": "^4.1.2", "lodash": "^4.17.21", - "rxjs": "^7.0.0", - "shell-quote": "^1.7.3", - "spawn-command": "^0.0.2-1", - "supports-color": "^8.1.0", + "rxjs": "^7.8.1", + "shell-quote": "^1.8.1", + "supports-color": "^8.1.1", "tree-kill": "^1.2.2", - "yargs": "^17.3.1" + "yargs": "^17.7.2" }, "bin": { "conc": "dist/bin/concurrently.js", "concurrently": "dist/bin/concurrently.js" }, "engines": { - "node": "^12.20.0 || ^14.13.0 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" @@ -842,19 +1399,19 @@ "node": ">= 0.10" } }, - "node_modules/date-fns": { - "version": "2.30.0", + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/runtime": "^7.21.0" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": ">=0.11" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" + "node": ">= 8" } }, "node_modules/debug": { @@ -913,6 +1470,29 @@ "license": "ISC", "peer": true }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/editorconfig": { + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz", + "integrity": "sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==", + "dev": true, + "license": "MIT", + "dependencies": { + "commander": "^2.19.0", + "lru-cache": "^4.1.5", + "semver": "^5.6.0", + "sigmund": "^1.0.1" + }, + "bin": { + "editorconfig": "bin/editorconfig" + } + }, "node_modules/ee-first": { "version": "1.1.1", "dev": true, @@ -959,7 +1539,9 @@ } }, "node_modules/esbuild": { - "version": "0.25.4", + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.6.tgz", + "integrity": "sha512-GVuzuUwtdsghE3ocJ9Bs8PNoF13HNQ5TXbEi2AhvVb8xU1Iwt9Fos9FEamfoee+u/TOsn7GUWc04lz46n2bbTg==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -970,31 +1552,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.4", - "@esbuild/android-arm": "0.25.4", - "@esbuild/android-arm64": "0.25.4", - "@esbuild/android-x64": "0.25.4", - "@esbuild/darwin-arm64": "0.25.4", - "@esbuild/darwin-x64": "0.25.4", - "@esbuild/freebsd-arm64": "0.25.4", - "@esbuild/freebsd-x64": "0.25.4", - "@esbuild/linux-arm": "0.25.4", - "@esbuild/linux-arm64": "0.25.4", - "@esbuild/linux-ia32": "0.25.4", - "@esbuild/linux-loong64": "0.25.4", - "@esbuild/linux-mips64el": "0.25.4", - "@esbuild/linux-ppc64": "0.25.4", - "@esbuild/linux-riscv64": "0.25.4", - "@esbuild/linux-s390x": "0.25.4", - "@esbuild/linux-x64": "0.25.4", - "@esbuild/netbsd-arm64": "0.25.4", - "@esbuild/netbsd-x64": "0.25.4", - "@esbuild/openbsd-arm64": "0.25.4", - "@esbuild/openbsd-x64": "0.25.4", - "@esbuild/sunos-x64": "0.25.4", - "@esbuild/win32-arm64": "0.25.4", - "@esbuild/win32-ia32": "0.25.4", - "@esbuild/win32-x64": "0.25.4" + "@esbuild/aix-ppc64": "0.25.6", + "@esbuild/android-arm": "0.25.6", + "@esbuild/android-arm64": "0.25.6", + "@esbuild/android-x64": "0.25.6", + "@esbuild/darwin-arm64": "0.25.6", + "@esbuild/darwin-x64": "0.25.6", + "@esbuild/freebsd-arm64": "0.25.6", + "@esbuild/freebsd-x64": "0.25.6", + "@esbuild/linux-arm": "0.25.6", + "@esbuild/linux-arm64": "0.25.6", + "@esbuild/linux-ia32": "0.25.6", + "@esbuild/linux-loong64": "0.25.6", + "@esbuild/linux-mips64el": "0.25.6", + "@esbuild/linux-ppc64": "0.25.6", + "@esbuild/linux-riscv64": "0.25.6", + "@esbuild/linux-s390x": "0.25.6", + "@esbuild/linux-x64": "0.25.6", + "@esbuild/netbsd-arm64": "0.25.6", + "@esbuild/netbsd-x64": "0.25.6", + "@esbuild/openbsd-arm64": "0.25.6", + "@esbuild/openbsd-x64": "0.25.6", + "@esbuild/openharmony-arm64": "0.25.6", + "@esbuild/sunos-x64": "0.25.6", + "@esbuild/win32-arm64": "0.25.6", + "@esbuild/win32-ia32": "0.25.6", + "@esbuild/win32-x64": "0.25.6" } }, "node_modules/escalade": { @@ -1056,6 +1639,23 @@ "node": ">= 0.8" } }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/fresh": { "version": "0.5.2", "dev": true, @@ -1289,11 +1889,34 @@ "dev": true, "license": "MIT" }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, "node_modules/ismobilejs": { "version": "1.1.1", "license": "MIT", "peer": true }, + "node_modules/jackspeak": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", + "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/js-binary-schema-parser": { "version": "2.0.3", "license": "MIT", @@ -1304,6 +1927,17 @@ "dev": true, "license": "MIT" }, + "node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "license": "ISC", + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, "node_modules/math-intrinsics": { "version": "1.1.0", "license": "MIT", @@ -1358,6 +1992,16 @@ "node": "*" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mkdirp": { "version": "1.0.4", "dev": true, @@ -1487,6 +2131,13 @@ "node": ">=8" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/pako": { "version": "1.0.11", "dev": true, @@ -1513,6 +2164,43 @@ "node": ">=0.10.0" } }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz", + "integrity": "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, "node_modules/pause-stream": { "version": "0.0.11", "dev": true, @@ -1588,6 +2276,13 @@ "node": ">=0.8.0" } }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "dev": true, + "license": "ISC" + }, "node_modules/punycode": { "version": "1.4.1", "license": "MIT", @@ -1626,11 +2321,6 @@ "string_decoder": "~0.10.x" } }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "dev": true, - "license": "MIT" - }, "node_modules/require-directory": { "version": "2.1.1", "dev": true, @@ -1640,14 +2330,60 @@ } }, "node_modules/rimraf": { - "version": "3.0.2", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.0.1.tgz", + "integrity": "sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==", "dev": true, "license": "ISC", "dependencies": { - "glob": "^7.1.3" + "glob": "^11.0.0", + "package-json-from-dist": "^1.0.0" }, "bin": { - "rimraf": "bin.js" + "rimraf": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.3.tgz", + "integrity": "sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.3.1", + "jackspeak": "^4.1.1", + "minimatch": "^10.0.3", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz", + "integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==", + "dev": true, + "license": "ISC", + "dependencies": { + "@isaacs/brace-expansion": "^5.0.0" + }, + "engines": { + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -1666,6 +2402,16 @@ "dev": true, "license": "MIT" }, + "node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, "node_modules/send": { "version": "0.18.0", "dev": true, @@ -1767,6 +2513,29 @@ "dev": true, "license": "ISC" }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/shell-quote": { "version": "1.8.2", "dev": true, @@ -1846,9 +2615,25 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/spawn-command": { - "version": "0.0.2", - "dev": true + "node_modules/sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==", + "dev": true, + "license": "ISC" + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/statuses": { "version": "1.5.0", @@ -1876,6 +2661,22 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "dev": true, @@ -1887,6 +2688,20 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/supports-color": { "version": "8.1.1", "dev": true, @@ -1969,7 +2784,9 @@ "license": "0BSD" }, "node_modules/typescript": { - "version": "5.6.2", + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -1980,6 +2797,26 @@ "node": ">=14.17" } }, + "node_modules/typescript-formatter": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/typescript-formatter/-/typescript-formatter-7.2.2.tgz", + "integrity": "sha512-V7vfI9XArVhriOTYHPzMU2WUnm5IMdu9X/CPxs8mIMGxmTBFpDABlbkBka64PZJ9/xgQeRpK8KzzAG4MPzxBDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "commandpost": "^1.0.0", + "editorconfig": "^0.15.0" + }, + "bin": { + "tsfmt": "bin/tsfmt" + }, + "engines": { + "node": ">= 4.2.0" + }, + "peerDependencies": { + "typescript": "^2.1.6 || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev" + } + }, "node_modules/undici-types": { "version": "5.26.5", "dev": true, @@ -2060,6 +2897,22 @@ "node": ">=0.8.0" } }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "dev": true, @@ -2076,6 +2929,25 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "dev": true, @@ -2097,6 +2969,13 @@ "node": ">=10" } }, + "node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "dev": true, + "license": "ISC" + }, "node_modules/yargs": { "version": "17.7.2", "dev": true, diff --git a/spine-ts/package.json b/spine-ts/package.json index 96412c8da..181587cdf 100644 --- a/spine-ts/package.json +++ b/spine-ts/package.json @@ -10,6 +10,8 @@ "prepublish": "npm run clean && npm run build", "clean": "npx rimraf spine-core/dist spine-canvas/dist spine-canvaskit/dist spine-webgl/dist spine-phaser-v3/dist spine-phaser-v4/dist spine-player/dist spine-threejs/dist spine-pixi-v7/dist spine-pixi-v8/dist spine-webcomponents/dist", "build": "npm run clean && npm run build:modules && concurrently 'npm run build:core:iife' 'npm run build:core:esm' 'npm run build:canvas:iife' 'npm run build:canvas:esm' 'npm run build:canvaskit:iife' 'npm run build:canvaskit:esm' 'npm run build:webgl:iife' 'npm run build:webgl:esm' 'npm run build:phaser-v3:iife' 'npm run build:phaser-v4:iife' 'npm run build:phaser-v3:esm' 'npm run build:phaser-v4:esm' 'npm run build:player:iife' 'npm run build:player:esm' 'npm run build:player:css' 'npm run build:threejs:iife' 'npm run build:threejs:esm' 'npm run build:pixi-v7:iife' 'npm run build:pixi-v7:esm' 'npm run build:pixi-v8:iife' 'npm run build:pixi-v8:esm' 'npm run build:webcomponents:iife' 'npm run build:webcomponents:esm'", + "format": "npx tsx scripts/format.ts", + "lint": "npx biome lint .", "postbuild": "npm run minify", "build:modules": "npx tsc -b -clean && npx tsc -b", "build:core:iife": "npx esbuild --bundle spine-core/src/index.ts --tsconfig=spine-core/tsconfig.json --sourcemap --outfile=spine-core/dist/iife/spine-core.js --format=iife --global-name=spine", @@ -82,12 +84,15 @@ "spine-webcomponents" ], "devDependencies": { - "@types/offscreencanvas": "^2019.6.4", - "concurrently": "^7.6.0", + "@types/offscreencanvas": "^2019.7.3", + "concurrently": "^9.2.0", "copyfiles": "^2.4.1", - "esbuild": "^0.25.4", + "esbuild": "^0.25.6", "alive-server": "^1.3.0", - "rimraf": "^3.0.2", - "typescript": "5.6.2" + "rimraf": "^6.0.1", + "typescript": "^5.8.3", + "typescript-formatter": "^7.2.2", + "@biomejs/biome": "^2.1.1", + "tsx": "^4.19.2" } } diff --git a/spine-ts/scripts/format.ts b/spine-ts/scripts/format.ts new file mode 100644 index 000000000..0f322ce1f --- /dev/null +++ b/spine-ts/scripts/format.ts @@ -0,0 +1,38 @@ +import { execSync } from 'node:child_process'; +import * as fs from 'node:fs'; +import * as path from 'node:path'; + +function findTypeScriptFiles(dir: string, files: string[] = []): string[] { + if (!fs.existsSync(dir)) return files; + + fs.readdirSync(dir).forEach(name => { + const filePath = path.join(dir, name); + const stat = fs.statSync(filePath); + + if (stat.isDirectory()) { + // Skip node_modules and dist directories + if (name !== 'node_modules' && name !== 'dist') { + findTypeScriptFiles(filePath, files); + } + } else if (name.endsWith('.ts') && !name.endsWith('.d.ts')) { + files.push(filePath); + } + }); + + return files; +} + +// Find all TypeScript files in spine-* directories +const allFiles: string[] = []; +fs.readdirSync('.').forEach(name => { + if (name.startsWith('spine-') && fs.statSync(name).isDirectory()) { + findTypeScriptFiles(name, allFiles); + } +}); + +if (allFiles.length > 0) { + console.log(`Formatting ${allFiles.length} TypeScript files...`); + execSync(`npx tsfmt -r ${allFiles.join(' ')}`, { stdio: 'inherit' }); +} else { + console.log('No TypeScript files found to format.'); +} \ No newline at end of file diff --git a/spine-ts/scripts/tsconfig.json b/spine-ts/scripts/tsconfig.json new file mode 100644 index 000000000..8369279b5 --- /dev/null +++ b/spine-ts/scripts/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "lib": ["ES2020"], + "moduleResolution": "node", + "esModuleInterop": true, + "skipLibCheck": true, + "strict": true + }, + "include": ["*.ts"] +} \ No newline at end of file diff --git a/spine-ts/spine-core/tests/HeadlessTest.ts b/spine-ts/spine-core/tests/HeadlessTest.ts index 8485aee69..d5eaa3ac0 100755 --- a/spine-ts/spine-core/tests/HeadlessTest.ts +++ b/spine-ts/spine-core/tests/HeadlessTest.ts @@ -32,178 +32,178 @@ import { promises as fs } from 'fs'; import * as path from 'path'; import { - AnimationState, - AnimationStateData, - AtlasAttachmentLoader, - Physics, - Skeleton, - SkeletonBinary, - SkeletonData, - SkeletonJson, - TextureAtlas + AnimationState, + AnimationStateData, + AtlasAttachmentLoader, + Physics, + Skeleton, + SkeletonBinary, + SkeletonData, + SkeletonJson, + TextureAtlas } from '../src/index.js'; // Printer class for hierarchical output class Printer { - private indentLevel = 0; - private readonly INDENT = " "; + private indentLevel = 0; + private readonly INDENT = " "; - print(text: string): void { - const indent = this.INDENT.repeat(this.indentLevel); - console.log(indent + text); - } + print (text: string): void { + const indent = this.INDENT.repeat(this.indentLevel); + console.log(indent + text); + } - indent(): void { - this.indentLevel++; - } + indent (): void { + this.indentLevel++; + } - unindent(): void { - this.indentLevel--; - } + unindent (): void { + this.indentLevel--; + } - printSkeletonData(data: SkeletonData): void { - this.print("SkeletonData {"); - this.indent(); + printSkeletonData (data: SkeletonData): void { + this.print("SkeletonData {"); + this.indent(); - this.print(`name: "${data.name || ""}"`); - this.print(`version: ${data.version ? `"${data.version}"` : "null"}`); - this.print(`hash: ${data.hash ? `"${data.hash}"` : "null"}`); - this.print(`x: ${this.formatFloat(data.x)}`); - this.print(`y: ${this.formatFloat(data.y)}`); - this.print(`width: ${this.formatFloat(data.width)}`); - this.print(`height: ${this.formatFloat(data.height)}`); - this.print(`referenceScale: ${this.formatFloat(data.referenceScale)}`); - this.print(`fps: ${this.formatFloat(data.fps || 0)}`); - this.print(`imagesPath: ${data.imagesPath ? `"${data.imagesPath}"` : "null"}`); - this.print(`audioPath: ${data.audioPath ? `"${data.audioPath}"` : "null"}`); + this.print(`name: "${data.name || ""}"`); + this.print(`version: ${data.version ? `"${data.version}"` : "null"}`); + this.print(`hash: ${data.hash ? `"${data.hash}"` : "null"}`); + this.print(`x: ${this.formatFloat(data.x)}`); + this.print(`y: ${this.formatFloat(data.y)}`); + this.print(`width: ${this.formatFloat(data.width)}`); + this.print(`height: ${this.formatFloat(data.height)}`); + this.print(`referenceScale: ${this.formatFloat(data.referenceScale)}`); + this.print(`fps: ${this.formatFloat(data.fps || 0)}`); + this.print(`imagesPath: ${data.imagesPath ? `"${data.imagesPath}"` : "null"}`); + this.print(`audioPath: ${data.audioPath ? `"${data.audioPath}"` : "null"}`); - // TODO: Add bones, slots, skins, animations, etc. in future expansion + // TODO: Add bones, slots, skins, animations, etc. in future expansion - this.unindent(); - this.print("}"); - } + this.unindent(); + this.print("}"); + } - printSkeleton(skeleton: Skeleton): void { - this.print("Skeleton {"); - this.indent(); + printSkeleton (skeleton: Skeleton): void { + this.print("Skeleton {"); + this.indent(); - this.print(`x: ${this.formatFloat(skeleton.x)}`); - this.print(`y: ${this.formatFloat(skeleton.y)}`); - this.print(`scaleX: ${this.formatFloat(skeleton.scaleX)}`); - this.print(`scaleY: ${this.formatFloat(skeleton.scaleY)}`); - this.print(`time: ${this.formatFloat(skeleton.time)}`); + this.print(`x: ${this.formatFloat(skeleton.x)}`); + this.print(`y: ${this.formatFloat(skeleton.y)}`); + this.print(`scaleX: ${this.formatFloat(skeleton.scaleX)}`); + this.print(`scaleY: ${this.formatFloat(skeleton.scaleY)}`); + this.print(`time: ${this.formatFloat(skeleton.time)}`); - // TODO: Add runtime state (bones, slots, etc.) in future expansion + // TODO: Add runtime state (bones, slots, etc.) in future expansion - this.unindent(); - this.print("}"); - } + this.unindent(); + this.print("}"); + } - private formatFloat(value: number): string { - // Format to 6 decimal places, matching Java/C++ output - return value.toFixed(6).replace(',', '.'); - } + private formatFloat (value: number): string { + // Format to 6 decimal places, matching Java/C++ output + return value.toFixed(6).replace(',', '.'); + } } // Main DebugPrinter class class DebugPrinter { - static async main(args: string[]): Promise { - if (args.length < 2) { - console.error("Usage: DebugPrinter [animation-name]"); - process.exit(1); - } + static async main (args: string[]): Promise { + if (args.length < 2) { + console.error("Usage: DebugPrinter [animation-name]"); + process.exit(1); + } - const skeletonPath = args[0]; - const atlasPath = args[1]; - const animationName = args.length >= 3 ? args[2] : null; + const skeletonPath = args[0]; + const atlasPath = args[1]; + const animationName = args.length >= 3 ? args[2] : null; - try { - // Load atlas - const atlasData = await fs.readFile(atlasPath, 'utf8'); - const atlas = new TextureAtlas(atlasData); + try { + // Load atlas + const atlasData = await fs.readFile(atlasPath, 'utf8'); + const atlas = new TextureAtlas(atlasData); - // Load skeleton data - const skeletonData = await this.loadSkeletonData(skeletonPath, atlas); + // Load skeleton data + const skeletonData = await this.loadSkeletonData(skeletonPath, atlas); - // Print skeleton data - const printer = new Printer(); - console.log("=== SKELETON DATA ==="); - printer.printSkeletonData(skeletonData); + // Print skeleton data + const printer = new Printer(); + console.log("=== SKELETON DATA ==="); + printer.printSkeletonData(skeletonData); - // Create skeleton and animation state - const skeleton = new Skeleton(skeletonData); - const stateData = new AnimationStateData(skeletonData); - const state = new AnimationState(stateData); + // Create skeleton and animation state + const skeleton = new Skeleton(skeletonData); + const stateData = new AnimationStateData(skeletonData); + const state = new AnimationState(stateData); - skeleton.setupPose(); + skeleton.setupPose(); - // Set animation or setup pose - if (animationName) { - // Find and set animation - const animation = skeletonData.findAnimation(animationName); - if (!animation) { - console.error(`Animation not found: ${animationName}`); - process.exit(1); - } - state.setAnimation(0, animationName, true); - // Update and apply - state.update(0.016); - state.apply(skeleton); - } + // Set animation or setup pose + if (animationName) { + // Find and set animation + const animation = skeletonData.findAnimation(animationName); + if (!animation) { + console.error(`Animation not found: ${animationName}`); + process.exit(1); + } + state.setAnimation(0, animationName, true); + // Update and apply + state.update(0.016); + state.apply(skeleton); + } - skeleton.updateWorldTransform(Physics.update); + skeleton.updateWorldTransform(Physics.update); - // Print skeleton state - console.log("\n=== SKELETON STATE ==="); - printer.printSkeleton(skeleton); + // Print skeleton state + console.log("\n=== SKELETON STATE ==="); + printer.printSkeleton(skeleton); - } catch (error) { - console.error("Error:", error); - process.exit(1); - } - } + } catch (error) { + console.error("Error:", error); + process.exit(1); + } + } - private static async loadSkeletonData(skeletonPath: string, atlas: TextureAtlas): Promise { - const attachmentLoader = new AtlasAttachmentLoader(atlas); - const ext = path.extname(skeletonPath).toLowerCase(); + private static async loadSkeletonData (skeletonPath: string, atlas: TextureAtlas): Promise { + const attachmentLoader = new AtlasAttachmentLoader(atlas); + const ext = path.extname(skeletonPath).toLowerCase(); - if (ext === '.json') { - const jsonData = await fs.readFile(skeletonPath, 'utf8'); - const json = new SkeletonJson(attachmentLoader); - json.scale = 1; - const skeletonData = json.readSkeletonData(jsonData); + if (ext === '.json') { + const jsonData = await fs.readFile(skeletonPath, 'utf8'); + const json = new SkeletonJson(attachmentLoader); + json.scale = 1; + const skeletonData = json.readSkeletonData(jsonData); - // Set name from filename if not already set - if (!skeletonData.name) { - const basename = path.basename(skeletonPath); - const nameWithoutExt = basename.substring(0, basename.lastIndexOf('.')) || basename; - skeletonData.name = nameWithoutExt; - } + // Set name from filename if not already set + if (!skeletonData.name) { + const basename = path.basename(skeletonPath); + const nameWithoutExt = basename.substring(0, basename.lastIndexOf('.')) || basename; + skeletonData.name = nameWithoutExt; + } - return skeletonData; - } else if (ext === '.skel') { - const binaryData = await fs.readFile(skeletonPath); - const binary = new SkeletonBinary(attachmentLoader); - binary.scale = 1; - const skeletonData = binary.readSkeletonData(new Uint8Array(binaryData)); + return skeletonData; + } else if (ext === '.skel') { + const binaryData = await fs.readFile(skeletonPath); + const binary = new SkeletonBinary(attachmentLoader); + binary.scale = 1; + const skeletonData = binary.readSkeletonData(new Uint8Array(binaryData)); - // Set name from filename if not already set - if (!skeletonData.name) { - const basename = path.basename(skeletonPath); - const nameWithoutExt = basename.substring(0, basename.lastIndexOf('.')) || basename; - skeletonData.name = nameWithoutExt; - } + // Set name from filename if not already set + if (!skeletonData.name) { + const basename = path.basename(skeletonPath); + const nameWithoutExt = basename.substring(0, basename.lastIndexOf('.')) || basename; + skeletonData.name = nameWithoutExt; + } - return skeletonData; - } else { - throw new Error(`Unsupported skeleton file format: ${ext}`); - } - } + return skeletonData; + } else { + throw new Error(`Unsupported skeleton file format: ${ext}`); + } + } } // Run if called directly if (import.meta.url === `file://${process.argv[1]}`) { - DebugPrinter.main(process.argv.slice(2)); + DebugPrinter.main(process.argv.slice(2)); } export default DebugPrinter; \ No newline at end of file diff --git a/spine-ts/spine-phaser-v3/example/typescript/index.ts b/spine-ts/spine-phaser-v3/example/typescript/index.ts index 71a6f315a..8e4954b11 100644 --- a/spine-ts/spine-phaser-v3/example/typescript/index.ts +++ b/spine-ts/spine-phaser-v3/example/typescript/index.ts @@ -2,28 +2,28 @@ import * as Phaser from "phaser" import * as spine from "@esotericsoftware/spine-phaser-v3" class SpineDemo extends Phaser.Scene { - preload() { - this.load.spineBinary("spineboy-data", "/assets/spineboy-pro.skel"); - this.load.spineAtlas("spineboy-atlas", "/assets/spineboy-pma.atlas"); - } + preload () { + this.load.spineBinary("spineboy-data", "/assets/spineboy-pro.skel"); + this.load.spineAtlas("spineboy-atlas", "/assets/spineboy-pma.atlas"); + } - create() { - const spineboy = this.add.spine(400, 500, 'spineboy-data', "spineboy-atlas"); - spineboy.scale = 0.5; - spineboy.animationState.setAnimation(0, "walk", true); - } + create () { + const spineboy = this.add.spine(400, 500, 'spineboy-data', "spineboy-atlas"); + spineboy.scale = 0.5; + spineboy.animationState.setAnimation(0, "walk", true); + } } const config = { - width: 800, - height: 600, - type: Phaser.WEBGL, - scene: [SpineDemo], - plugins: { - scene: [ - { key: "spine.SpinePlugin", plugin: spine.SpinePlugin, mapping: "spine" } - ] - } + width: 800, + height: 600, + type: Phaser.WEBGL, + scene: [SpineDemo], + plugins: { + scene: [ + { key: "spine.SpinePlugin", plugin: spine.SpinePlugin, mapping: "spine" } + ] + } }; new Phaser.Game(config); \ No newline at end of file diff --git a/spine-ts/spine-phaser-v3/src/mixins.ts b/spine-ts/spine-phaser-v3/src/mixins.ts index 7f12789b0..836d41c3a 100644 --- a/spine-ts/spine-phaser-v3/src/mixins.ts +++ b/spine-ts/spine-phaser-v3/src/mixins.ts @@ -37,13 +37,13 @@ export const Alpha = components.Alpha; export interface Type< T, P extends any[] = any[] - > extends Function { +> extends Function { new(...args: P): T; } export type Mixin = < GameObjectType extends Type - >( +>( BaseGameObject: GameObjectType ) => GameObjectType & Type; diff --git a/spine-ts/spine-phaser-v4/example/typescript/index.ts b/spine-ts/spine-phaser-v4/example/typescript/index.ts index 0ff8b9272..51b4cb398 100644 --- a/spine-ts/spine-phaser-v4/example/typescript/index.ts +++ b/spine-ts/spine-phaser-v4/example/typescript/index.ts @@ -2,28 +2,28 @@ import * as Phaser from "phaser" import * as spine from "@esotericsoftware/spine-phaser-v4" class SpineDemo extends Phaser.Scene { - preload() { - this.load.spineBinary("spineboy-data", "/assets/spineboy-pro.skel"); - this.load.spineAtlas("spineboy-atlas", "/assets/spineboy-pma.atlas"); - } + preload () { + this.load.spineBinary("spineboy-data", "/assets/spineboy-pro.skel"); + this.load.spineAtlas("spineboy-atlas", "/assets/spineboy-pma.atlas"); + } - create() { - const spineboy = this.add.spine(400, 500, 'spineboy-data', "spineboy-atlas"); - spineboy.scale = 0.5; - spineboy.animationState.setAnimation(0, "walk", true); - } + create () { + const spineboy = this.add.spine(400, 500, 'spineboy-data', "spineboy-atlas"); + spineboy.scale = 0.5; + spineboy.animationState.setAnimation(0, "walk", true); + } } const config = { - width: 800, - height: 600, - type: Phaser.WEBGL, - scene: [SpineDemo], - plugins: { - scene: [ - { key: "spine.SpinePlugin", plugin: spine.SpinePlugin, mapping: "spine" } - ] - } + width: 800, + height: 600, + type: Phaser.WEBGL, + scene: [SpineDemo], + plugins: { + scene: [ + { key: "spine.SpinePlugin", plugin: spine.SpinePlugin, mapping: "spine" } + ] + } }; new Phaser.Game(config); \ No newline at end of file diff --git a/spine-ts/spine-phaser-v4/src/mixins.ts b/spine-ts/spine-phaser-v4/src/mixins.ts index 7f12789b0..836d41c3a 100644 --- a/spine-ts/spine-phaser-v4/src/mixins.ts +++ b/spine-ts/spine-phaser-v4/src/mixins.ts @@ -37,13 +37,13 @@ export const Alpha = components.Alpha; export interface Type< T, P extends any[] = any[] - > extends Function { +> extends Function { new(...args: P): T; } export type Mixin = < GameObjectType extends Type - >( +>( BaseGameObject: GameObjectType ) => GameObjectType & Type; diff --git a/spine-ts/spine-pixi-v7/example/typescript/index.ts b/spine-ts/spine-pixi-v7/example/typescript/index.ts index 9931e143d..df3d8237b 100644 --- a/spine-ts/spine-pixi-v7/example/typescript/index.ts +++ b/spine-ts/spine-pixi-v7/example/typescript/index.ts @@ -3,43 +3,43 @@ import { Spine } from '@esotericsoftware/spine-pixi-v7'; /** The PixiJS app Application instance, shared across the project */ export const app = new Application({ - width: window.innerWidth, - height: window.innerHeight, - resolution: window.devicePixelRatio || 1, - autoDensity: true, - resizeTo: window, - backgroundColor: 0x2c3e50, - hello: true, + width: window.innerWidth, + height: window.innerHeight, + resolution: window.devicePixelRatio || 1, + autoDensity: true, + resizeTo: window, + backgroundColor: 0x2c3e50, + hello: true, }); /** Setup app and initialise assets */ -async function init() { - // Add pixi canvas element (app.view) to the document's body - document.body.appendChild(app.view); +async function init () { + // Add pixi canvas element (app.view) to the document's body + document.body.appendChild(app.view); - // Pre-load the skeleton data and atlas. You can also load .json skeleton data. - Assets.add({ alias: "spineboyData", src: "assets/spineboy-pro.skel" }); - Assets.add({ alias: "spineboyAtlas", src: "assets/spineboy-pma.atlas" }); - await Assets.load(["spineboyData", "spineboyAtlas"]); + // Pre-load the skeleton data and atlas. You can also load .json skeleton data. + Assets.add({ alias: "spineboyData", src: "assets/spineboy-pro.skel" }); + Assets.add({ alias: "spineboyAtlas", src: "assets/spineboy-pma.atlas" }); + await Assets.load(["spineboyData", "spineboyAtlas"]); - // Create the spine display object - const spineboy = Spine.from("spineboyData", "spineboyAtlas", { - scale: 0.5, - }); + // Create the spine display object + const spineboy = Spine.from("spineboyData", "spineboyAtlas", { + scale: 0.5, + }); - // Set the default mix time to use when transitioning - // from one animation to the next. - spineboy.state.data.defaultMix = 0.2; + // Set the default mix time to use when transitioning + // from one animation to the next. + spineboy.state.data.defaultMix = 0.2; - // Center the spine object on screen. - spineboy.x = window.innerWidth / 2; - spineboy.y = window.innerHeight / 2 + spineboy.getBounds().height / 2; + // Center the spine object on screen. + spineboy.x = window.innerWidth / 2; + spineboy.y = window.innerHeight / 2 + spineboy.getBounds().height / 2; - // Set animation "cape-follow-example" on track 0, looped. - spineboy.state.setAnimation(0, "run", true); + // Set animation "cape-follow-example" on track 0, looped. + spineboy.state.setAnimation(0, "run", true); - // Add the display object to the stage. - app.stage.addChild(spineboy); + // Add the display object to the stage. + app.stage.addChild(spineboy); } // Init everything diff --git a/spine-ts/spine-pixi-v7/src/assets/atlasLoader.ts b/spine-ts/spine-pixi-v7/src/assets/Atlas-Loader.ts similarity index 95% rename from spine-ts/spine-pixi-v7/src/assets/atlasLoader.ts rename to spine-ts/spine-pixi-v7/src/assets/Atlas-Loader.ts index 1f6ef7694..7ff61ba14 100644 --- a/spine-ts/spine-pixi-v7/src/assets/atlasLoader.ts +++ b/spine-ts/spine-pixi-v7/src/assets/Atlas-Loader.ts @@ -62,11 +62,11 @@ const spineTextureAtlasLoader: AssetExtension { + async load (url: string): Promise { const response = await settings.ADAPTER.fetch(url); const txt = await response.text(); @@ -74,7 +74,7 @@ const spineTextureAtlasLoader: AssetExtension { + testParse (asset: unknown, options: ResolvedAsset): Promise { const isExtensionRight = checkExtension(options.src!, ".atlas"); const isString = typeof asset === "string"; const isExplicitLoadParserSet = options.loadParser === loaderName; @@ -82,11 +82,11 @@ const spineTextureAtlasLoader: AssetExtension { + async parse (asset: RawAtlas, options: { src: string, data: ISpineAtlasMetadata }, loader: Loader): Promise { const metadata: ISpineAtlasMetadata = options.data || {}; let basePath = utils.path.dirname(options.src); diff --git a/spine-ts/spine-pixi-v7/src/assets/skeletonLoader.ts b/spine-ts/spine-pixi-v7/src/assets/Skeleton-Loader.ts similarity index 91% rename from spine-ts/spine-pixi-v7/src/assets/skeletonLoader.ts rename to spine-ts/spine-pixi-v7/src/assets/Skeleton-Loader.ts index 610ef120a..46b6cd759 100644 --- a/spine-ts/spine-pixi-v7/src/assets/skeletonLoader.ts +++ b/spine-ts/spine-pixi-v7/src/assets/Skeleton-Loader.ts @@ -36,11 +36,11 @@ type SkeletonBinaryAsset = Uint8Array; const loaderName = "spineSkeletonLoader"; -function isJson(resource: any): resource is SkeletonJsonAsset { +function isJson (resource: any): resource is SkeletonJsonAsset { return resource.hasOwnProperty("bones"); } -function isBuffer(resource: any): resource is SkeletonBinaryAsset { +function isBuffer (resource: any): resource is SkeletonBinaryAsset { return resource instanceof Uint8Array; } @@ -55,18 +55,18 @@ const spineLoaderExtension: AssetExtension { + async load (url: string): Promise { const response = await settings.ADAPTER.fetch(url); const buffer = new Uint8Array(await response.arrayBuffer()); return buffer; }, - testParse(asset: unknown, options: ResolvedAsset): Promise { + testParse (asset: unknown, options: ResolvedAsset): Promise { const isJsonSpineModel = checkExtension(options.src!, ".json") && isJson(asset); const isBinarySpineModel = checkExtension(options.src!, ".skel") && isBuffer(asset); const isExplicitLoadParserSet = options.loadParser === loaderName; diff --git a/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintBatchGeom.ts b/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintBatchGeom.ts index 814699d76..5b2c66fad 100644 --- a/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintBatchGeom.ts +++ b/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintBatchGeom.ts @@ -44,7 +44,7 @@ export class DarkTintBatchGeometry extends Geometry { * @param {boolean} [_static=false] - Optimization flag, where `false` * is updated every frame, `true` doesn't change frame-to-frame. */ - constructor(_static = false) { + constructor (_static = false) { super(); this._buffer = new Buffer(undefined, _static, false); diff --git a/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintGeom.ts b/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintGeom.ts index 3b365be7e..097d5c1ad 100644 --- a/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintGeom.ts +++ b/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintGeom.ts @@ -38,7 +38,7 @@ export class DarkTintGeometry extends Geometry { * @param {boolean} [_static=false] - Optimization flag, where `false` * is updated every frame, `true` doesn't change frame-to-frame. */ - constructor(_static = false) { + constructor (_static = false) { super(); const verticesBuffer = new Buffer(undefined); diff --git a/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintMaterial.ts b/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintMaterial.ts index fc8a3edd7..fddce1254 100644 --- a/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintMaterial.ts +++ b/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintMaterial.ts @@ -94,7 +94,7 @@ export class DarkTintMaterial extends Shader { private _tintColor: Color; private _darkTintColor: Color; - constructor(texture?: Texture) { + constructor (texture?: Texture) { const uniforms = { uSampler: texture ?? Texture.EMPTY, alpha: 1, @@ -127,10 +127,10 @@ export class DarkTintMaterial extends Shader { this._colorDirty = true; } - public get texture(): Texture { + public get texture (): Texture { return this.uniforms.uSampler; } - public set texture(value: Texture) { + public set texture (value: Texture) { if (this.uniforms.uSampler !== value) { if (!this.uniforms.uSampler.baseTexture.alphaMode !== !value.baseTexture.alphaMode) { this._colorDirty = true; @@ -141,7 +141,7 @@ export class DarkTintMaterial extends Shader { } } - public set alpha(value: number) { + public set alpha (value: number) { if (value === this._alpha) { return; } @@ -149,11 +149,11 @@ export class DarkTintMaterial extends Shader { this._alpha = value; this._colorDirty = true; } - public get alpha(): number { + public get alpha (): number { return this._alpha; } - public set tint(value: ColorSource) { + public set tint (value: ColorSource) { if (value === this.tint) { return; } @@ -162,11 +162,11 @@ export class DarkTintMaterial extends Shader { this._tintRGB = this._tintColor.toLittleEndianNumber(); this._colorDirty = true; } - public get tint(): ColorSource { + public get tint (): ColorSource { return this._tintColor.value!; } - public set darkTint(value: ColorSource) { + public set darkTint (value: ColorSource) { if (value === this.darkTint) { return; } @@ -175,20 +175,20 @@ export class DarkTintMaterial extends Shader { this._darkTintRGB = this._darkTintColor.toLittleEndianNumber(); this._colorDirty = true; } - public get darkTint(): ColorSource { + public get darkTint (): ColorSource { return this._darkTintColor.value!; } - public get tintValue(): number { + public get tintValue (): number { return this._tintColor.toNumber(); } - public get darkTintValue(): number { + public get darkTintValue (): number { return this._darkTintColor.toNumber(); } /** Gets called automatically by the Mesh. Intended to be overridden for custom {@link PIXI.MeshMaterial} objects. */ - public update(): void { + public update (): void { if (this._colorDirty) { this._colorDirty = false; Color.shared.setValue(this._tintColor).premultiply(this._alpha, true).toArray(this.uniforms.uColor); diff --git a/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintMesh.ts b/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintMesh.ts index fb5fafe8b..d5508b3db 100644 --- a/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintMesh.ts +++ b/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintMesh.ts @@ -51,24 +51,24 @@ export class DarkTintMesh extends Mesh { // eslint-disable-next-line @typescript-eslint/naming-convention public _darkTintRGB: number = 0; - constructor(texture?: Texture) { + constructor (texture?: Texture) { super(new DarkTintGeometry(), new DarkTintMaterial(texture), undefined, undefined); } - public get darkTint(): ColorSource | null { + public get darkTint (): ColorSource | null { return "darkTint" in this.shader ? (this.shader as unknown as DarkTintMaterial).darkTint : null; } - public set darkTint(value: ColorSource | null) { + public set darkTint (value: ColorSource | null) { (this.shader as unknown as DarkTintMaterial).darkTint = value!; } - public get darkTintValue(): number { + public get darkTintValue (): number { return (this.shader as unknown as DarkTintMaterial).darkTintValue; } // eslint-disable-next-line @typescript-eslint/naming-convention - protected override _renderToBatch(renderer: Renderer): void { + protected override _renderToBatch (renderer: Renderer): void { const geometry = this.geometry; const shader = this.shader; diff --git a/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintRenderer.ts b/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintRenderer.ts index 8b54373d5..40632d5be 100644 --- a/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintRenderer.ts +++ b/spine-ts/spine-pixi-v7/src/darkTintMesh/DarkTintRenderer.ts @@ -83,7 +83,7 @@ export class DarkTintRenderer extends BatchRenderer { type: ExtensionType.RendererPlugin, }; - constructor(renderer: Renderer) { + constructor (renderer: Renderer) { super(renderer); this.shaderGenerator = new BatchShaderGenerator(vertex, fragment); this.geometryClass = DarkTintBatchGeometry; @@ -91,7 +91,7 @@ export class DarkTintRenderer extends BatchRenderer { this.vertexSize = 7; } - public override packInterleavedGeometry(element: IDarkTintElement, attributeBuffer: ViewableBuffer, indexBuffer: Uint16Array, aIndex: number, iIndex: number): void { + public override packInterleavedGeometry (element: IDarkTintElement, attributeBuffer: ViewableBuffer, indexBuffer: Uint16Array, aIndex: number, iIndex: number): void { const { uint32View, float32View } = attributeBuffer; const packedVertices = aIndex / this.vertexSize; const uvs = element.uvs; diff --git a/spine-ts/spine-pixi-v7/src/index.ts b/spine-ts/spine-pixi-v7/src/index.ts index 5bed4e3b3..cbbcd3781 100644 --- a/spine-ts/spine-pixi-v7/src/index.ts +++ b/spine-ts/spine-pixi-v7/src/index.ts @@ -4,8 +4,8 @@ export * from './SpineDebugRenderer.js'; export * from './SpineTexture.js'; export * from './SlotMesh.js'; export * from './DarkSlotMesh.js'; -export * from './assets/atlasLoader.js'; -export * from './assets/skeletonLoader.js'; +export * from './assets/Atlas-Loader.js'; +export * from './assets/Skeleton-Loader.js'; export * from './darkTintMesh/DarkTintBatchGeom.js'; export * from './darkTintMesh/DarkTintGeom.js'; export * from './darkTintMesh/DarkTintMaterial.js'; @@ -14,5 +14,5 @@ export * from './darkTintMesh/DarkTintRenderer.js'; export * from "@esotericsoftware/spine-core"; -import './assets/atlasLoader.js'; // Side effects install the loaders into pixi -import './assets/skeletonLoader.js'; // Side effects install the loaders into pixi +import './assets/Atlas-Loader.js'; // Side effects install the loaders into pixi +import './assets/Skeleton-Loader.js'; // Side effects install the loaders into pixi diff --git a/spine-ts/spine-pixi-v8/example/typescript/index.ts b/spine-ts/spine-pixi-v8/example/typescript/index.ts index 29956e1d9..62ebaff78 100644 --- a/spine-ts/spine-pixi-v8/example/typescript/index.ts +++ b/spine-ts/spine-pixi-v8/example/typescript/index.ts @@ -5,45 +5,45 @@ import { Spine } from '@esotericsoftware/spine-pixi-v8'; export const app = new Application(); /** Setup app and initialise assets */ -async function init() { - await app.init({ - width: window.innerWidth, - height: window.innerHeight, - resolution: window.devicePixelRatio || 1, - autoDensity: true, - resizeTo: window, - backgroundColor: 0x2c3e50, - hello: true, - }) +async function init () { + await app.init({ + width: window.innerWidth, + height: window.innerHeight, + resolution: window.devicePixelRatio || 1, + autoDensity: true, + resizeTo: window, + backgroundColor: 0x2c3e50, + hello: true, + }) - // Add pixi canvas element (app.view) to the document's body - document.body.appendChild(app.canvas); + // Add pixi canvas element (app.view) to the document's body + document.body.appendChild(app.canvas); - // Pre-load the skeleton data and atlas. You can also load .json skeleton data. - Assets.add({ alias: "spineboyData", src: "assets/spineboy-pro.skel" }); - Assets.add({ alias: "spineboyAtlas", src: "assets/spineboy-pma.atlas" }); - await Assets.load(["spineboyData", "spineboyAtlas"]); + // Pre-load the skeleton data and atlas. You can also load .json skeleton data. + Assets.add({ alias: "spineboyData", src: "assets/spineboy-pro.skel" }); + Assets.add({ alias: "spineboyAtlas", src: "assets/spineboy-pma.atlas" }); + await Assets.load(["spineboyData", "spineboyAtlas"]); - // Create the spine display object - const spineboy = Spine.from({ - atlas: "spineboyAtlas", - skeleton: "spineboyData", - scale: 0.5, - }); + // Create the spine display object + const spineboy = Spine.from({ + atlas: "spineboyAtlas", + skeleton: "spineboyData", + scale: 0.5, + }); - // Set the default mix time to use when transitioning - // from one animation to the next. - spineboy.state.data.defaultMix = 0.2; + // Set the default mix time to use when transitioning + // from one animation to the next. + spineboy.state.data.defaultMix = 0.2; - // Center the spine object on screen. - spineboy.x = window.innerWidth / 2; - spineboy.y = window.innerHeight / 2 + spineboy.getBounds().height / 2; + // Center the spine object on screen. + spineboy.x = window.innerWidth / 2; + spineboy.y = window.innerHeight / 2 + spineboy.getBounds().height / 2; - // Set animation "cape-follow-example" on track 0, looped. - spineboy.state.setAnimation(0, "run", true); + // Set animation "cape-follow-example" on track 0, looped. + spineboy.state.setAnimation(0, "run", true); - // Add the display object to the stage. - app.stage.addChild(spineboy); + // Add the display object to the stage. + app.stage.addChild(spineboy); } // Init everything diff --git a/spine-ts/spine-pixi-v8/src/assets/atlasLoader.ts b/spine-ts/spine-pixi-v8/src/assets/Atlas-Loader.ts similarity index 100% rename from spine-ts/spine-pixi-v8/src/assets/atlasLoader.ts rename to spine-ts/spine-pixi-v8/src/assets/Atlas-Loader.ts diff --git a/spine-ts/spine-pixi-v8/src/assets/skeletonLoader.ts b/spine-ts/spine-pixi-v8/src/assets/Skeleton-Loader.ts similarity index 100% rename from spine-ts/spine-pixi-v8/src/assets/skeletonLoader.ts rename to spine-ts/spine-pixi-v8/src/assets/Skeleton-Loader.ts diff --git a/spine-ts/spine-pixi-v8/src/index.ts b/spine-ts/spine-pixi-v8/src/index.ts index 921bab630..30c4f250b 100644 --- a/spine-ts/spine-pixi-v8/src/index.ts +++ b/spine-ts/spine-pixi-v8/src/index.ts @@ -28,13 +28,13 @@ *****************************************************************************/ import './require-shim.js'; // Side effects add require pixi.js to global scope -import './assets/atlasLoader.js'; // Side effects install the loaders into pixi -import './assets/skeletonLoader.js'; // Side effects install the loaders into pixi +import './assets/Atlas-Loader.js'; // Side effects install the loaders into pixi +import './assets/Skeleton-Loader.js'; // Side effects install the loaders into pixi import './darktint/DarkTintBatcher.js'; // Side effects install the batcher into pixi import './SpinePipe.js'; -export * from './assets/atlasLoader.js'; -export * from './assets/skeletonLoader.js'; +export * from './assets/Atlas-Loader.js'; +export * from './assets/Skeleton-Loader.js'; export * from './require-shim.js'; export * from './Spine.js'; export * from './SpineDebugRenderer.js'; diff --git a/spine-ts/spine-threejs/example/typescript/index.ts b/spine-ts/spine-threejs/example/typescript/index.ts index 56a44ca09..e2a4726e2 100644 --- a/spine-ts/spine-threejs/example/typescript/index.ts +++ b/spine-ts/spine-threejs/example/typescript/index.ts @@ -16,120 +16,120 @@ let lastFrameTime = Date.now() / 1000; let baseUrl = "/assets/"; let skeletonFile = "raptor-pro.json"; let atlasFile = skeletonFile - .replace("-pro", "") - .replace("-ess", "") - .replace(".json", ".atlas"); + .replace("-pro", "") + .replace("-ess", "") + .replace(".json", ".atlas"); let animation = "walk"; -function init() { - // create the THREE.JS camera, scene and renderer (WebGL) - let width = window.innerWidth, - height = window.innerHeight; - camera = new THREE.PerspectiveCamera(75, width / height, 1, 3000); - camera.position.y = 100; - camera.position.z = 400; - scene = new THREE.Scene(); - renderer = new THREE.WebGLRenderer(); - renderer.setSize(width, height); - document.body.appendChild(renderer.domElement); - canvas = renderer.domElement; - controls = new OrbitControls(camera, renderer.domElement); +function init () { + // create the THREE.JS camera, scene and renderer (WebGL) + let width = window.innerWidth, + height = window.innerHeight; + camera = new THREE.PerspectiveCamera(75, width / height, 1, 3000); + camera.position.y = 100; + camera.position.z = 400; + scene = new THREE.Scene(); + renderer = new THREE.WebGLRenderer(); + renderer.setSize(width, height); + document.body.appendChild(renderer.domElement); + canvas = renderer.domElement; + controls = new OrbitControls(camera, renderer.domElement); - // LIGHTS - Ambient - const ambientLight = new THREE.AmbientLight(0xffffff, 7.0) - scene.add(ambientLight) + // LIGHTS - Ambient + const ambientLight = new THREE.AmbientLight(0xffffff, 7.0) + scene.add(ambientLight) - // LIGHTS - spotLight - const spotLight = new THREE.SpotLight(0xffffff, 5, 1200, Math.PI / 4, 0, 0) - spotLight.position.set(0, 1000, 0) - spotLight.castShadow = true - spotLight.shadow.mapSize.set(8192, 8192) - spotLight.shadow.bias = -0.00001; - scene.add(spotLight) + // LIGHTS - spotLight + const spotLight = new THREE.SpotLight(0xffffff, 5, 1200, Math.PI / 4, 0, 0) + spotLight.position.set(0, 1000, 0) + spotLight.castShadow = true + spotLight.shadow.mapSize.set(8192, 8192) + spotLight.shadow.bias = -0.00001; + scene.add(spotLight) - // load the assets required to display the Raptor model - assetManager = new spine.AssetManager(baseUrl); - assetManager.loadText(skeletonFile); - assetManager.loadTextureAtlas(atlasFile); + // load the assets required to display the Raptor model + assetManager = new spine.AssetManager(baseUrl); + assetManager.loadText(skeletonFile); + assetManager.loadTextureAtlas(atlasFile); - requestAnimationFrame(load); + requestAnimationFrame(load); } -function load() { - if (assetManager.isLoadingComplete()) { - // Add a box to the scene to which we attach the skeleton mesh - geometry = new THREE.BoxGeometry(200, 200, 200); - material = new THREE.MeshBasicMaterial({ - color: 0xff0000, - wireframe: true, - }); - mesh = new THREE.Mesh(geometry, material); - scene.add(mesh); +function load () { + if (assetManager.isLoadingComplete()) { + // Add a box to the scene to which we attach the skeleton mesh + geometry = new THREE.BoxGeometry(200, 200, 200); + material = new THREE.MeshBasicMaterial({ + color: 0xff0000, + wireframe: true, + }); + mesh = new THREE.Mesh(geometry, material); + scene.add(mesh); - // Load the texture atlas using name.atlas and name.png from the AssetManager. - // The function passed to TextureAtlas is used to resolve relative paths. - atlas = assetManager.require(atlasFile); + // Load the texture atlas using name.atlas and name.png from the AssetManager. + // The function passed to TextureAtlas is used to resolve relative paths. + atlas = assetManager.require(atlasFile); - // Create a AtlasAttachmentLoader that resolves region, mesh, boundingbox and path attachments - atlasLoader = new spine.AtlasAttachmentLoader(atlas); + // Create a AtlasAttachmentLoader that resolves region, mesh, boundingbox and path attachments + atlasLoader = new spine.AtlasAttachmentLoader(atlas); - // Create a SkeletonJson instance for parsing the .json file. - let skeletonJson = new spine.SkeletonJson(atlasLoader); + // Create a SkeletonJson instance for parsing the .json file. + let skeletonJson = new spine.SkeletonJson(atlasLoader); - // Set the scale to apply during parsing, parse the file, and create a new skeleton. - skeletonJson.scale = 0.4; - let skeletonData = skeletonJson.readSkeletonData( - assetManager.require(skeletonFile) - ); + // Set the scale to apply during parsing, parse the file, and create a new skeleton. + skeletonJson.scale = 0.4; + let skeletonData = skeletonJson.readSkeletonData( + assetManager.require(skeletonFile) + ); - // Create a SkeletonMesh from the data and attach it to the scene - skeletonMesh = new spine.SkeletonMesh({ - skeletonData, - materialFactory(parameters) { - return new THREE.MeshStandardMaterial({ ...parameters, metalness: .5 }); - }, - }); - skeletonMesh.state.setAnimation(0, animation, true); - mesh.add(skeletonMesh); + // Create a SkeletonMesh from the data and attach it to the scene + skeletonMesh = new spine.SkeletonMesh({ + skeletonData, + materialFactory (parameters) { + return new THREE.MeshStandardMaterial({ ...parameters, metalness: .5 }); + }, + }); + skeletonMesh.state.setAnimation(0, animation, true); + mesh.add(skeletonMesh); - requestAnimationFrame(render); - } else requestAnimationFrame(load); + requestAnimationFrame(render); + } else requestAnimationFrame(load); } let lastTime = Date.now(); -function render() { - // calculate delta time for animation purposes - let now = Date.now() / 1000; - let delta = now - lastFrameTime; - lastFrameTime = now; +function render () { + // calculate delta time for animation purposes + let now = Date.now() / 1000; + let delta = now - lastFrameTime; + lastFrameTime = now; - // resize canvas to use full page, adjust camera/renderer - resize(); + // resize canvas to use full page, adjust camera/renderer + resize(); - // Update orbital controls - controls.update(); + // Update orbital controls + controls.update(); - // update the animation - skeletonMesh.update(delta); + // update the animation + skeletonMesh.update(delta); - // render the scene - renderer.render(scene, camera); + // render the scene + renderer.render(scene, camera); - requestAnimationFrame(render); + requestAnimationFrame(render); } -function resize() { - let w = window.innerWidth; - let h = window.innerHeight; - if (canvas.width != w || canvas.height != h) { - canvas.width = w; - canvas.height = h; - } +function resize () { + let w = window.innerWidth; + let h = window.innerHeight; + if (canvas.width != w || canvas.height != h) { + canvas.width = w; + canvas.height = h; + } - camera.aspect = w / h; - camera.updateProjectionMatrix(); + camera.aspect = w / h; + camera.updateProjectionMatrix(); - renderer.setSize(w, h); + renderer.setSize(w, h); } init(); \ No newline at end of file diff --git a/tests/biome.json b/tests/biome.json new file mode 100644 index 000000000..fb8fcc747 --- /dev/null +++ b/tests/biome.json @@ -0,0 +1,11 @@ +{ + "formatter": { + "enabled": false + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true + } + } +} \ No newline at end of file diff --git a/tests/package.json b/tests/package.json index a22d15c52..4f9bb19e9 100644 --- a/tests/package.json +++ b/tests/package.json @@ -3,11 +3,15 @@ "type": "module", "private": true, "scripts": { - "compare": "tsx compare-with-reference-impl.ts" + "compare": "tsx compare-with-reference-impl.ts", + "format": "npx tsfmt -r ./**/*.ts", + "lint": "npx biome lint ." }, "devDependencies": { "@types/node": "^20.0.0", - "tsx": "^4.0.0" + "tsx": "^4.0.0", + "typescript-formatter": "^7.2.2", + "@biomejs/biome": "^2.1.1" }, "dependencies": { "@mariozechner/lsp-cli": "^0.1.3" diff --git a/tests/tsfmt.json b/tests/tsfmt.json new file mode 100644 index 000000000..6b24a3b02 --- /dev/null +++ b/tests/tsfmt.json @@ -0,0 +1,24 @@ +{ + "baseIndentSize": 0, + "indentSize": 4, + "tabSize": 4, + "indentStyle": 2, + "newLineCharacter": "\n", + "convertTabsToSpaces": false, + "insertSpaceAfterCommaDelimiter": true, + "insertSpaceAfterSemicolonInForStatements": true, + "insertSpaceBeforeAndAfterBinaryOperators": true, + "insertSpaceAfterConstructor": true, + "insertSpaceAfterKeywordsInControlFlowStatements": true, + "insertSpaceAfterFunctionKeywordForAnonymousFunctions": true, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true, + "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false, + "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false, + "insertSpaceAfterTypeAssertion": false, + "insertSpaceBeforeFunctionParenthesis": true, + "insertSpaceBeforeTypeAnnotation": false, + "placeOpenBraceOnNewLineForFunctions": false, + "placeOpenBraceOnNewLineForControlBlocks": false +} \ No newline at end of file