From c7d91a4dc9489772ead18878836341d4533f83c7 Mon Sep 17 00:00:00 2001 From: waynemwashuma <94756970+waynemwashuma@users.noreply.github.com> Date: Fri, 24 Jul 2026 18:24:02 +0300 Subject: [PATCH 1/6] Update build configuration --- .config/vite.config.js | 128 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 121 insertions(+), 7 deletions(-) diff --git a/.config/vite.config.js b/.config/vite.config.js index 8028dff5..88877822 100644 --- a/.config/vite.config.js +++ b/.config/vite.config.js @@ -1,7 +1,8 @@ -import { readFileSync, readdirSync, rmSync } from 'node:fs' +import { readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs' import { dirname, resolve } from 'node:path' import { fileURLToPath } from 'node:url' +import { parse } from 'acorn' import { rollup } from 'rollup' import dts from 'rollup-plugin-dts' import { defineConfig } from 'vite' @@ -11,7 +12,8 @@ const packageJsonPath = process.env.npm_package_json || resolve(root, 'package.j const packageRoot = dirname(packageJsonPath) const pkg = JSON.parse(readFileSync(packageJsonPath).toString()) const isRootPackage = packageRoot === root -const packageName = pkg.name.split('/').at(-1) +const libraryName = toLibraryName(pkg.name) +const packageGlobals = getPackageGlobals() const entry = isRootPackage ? resolve(root, 'src/index.js') : resolve(packageRoot, 'index.js') @@ -47,17 +49,19 @@ export default defineConfig({ } } : {}), plugins: [ + jsCommentStripPlugin(), declarationBundlePlugin() ], build: { outDir: resolve(packageRoot, 'dist'), lib: { entry, - formats: ['es'], - fileName: () => 'index.module.js' + name: libraryName, + formats: ['es', 'umd'], + fileName: (format) => `index.${format === 'es' ? 'module' : format}.js` }, - target: 'es2020', - minify: 'esbuild', + target: 'esnext', + minify: false, esbuild: { keepNames: true }, @@ -65,12 +69,29 @@ export default defineConfig({ external: isPackageExternal, output: { banner, - exports: 'named' + exports: 'named', + globals: packageGlobals } } } }) +function jsCommentStripPlugin() { + return { + name: 'js-comment-strip', + apply: 'build', + /** + * @param {string} code + */ + async renderChunk(code) { + const bannerPrefix = code.startsWith(banner) ? banner : '' + const body = bannerPrefix ? code.slice(bannerPrefix.length) : code + + return `${bannerPrefix}${stripJsComments(body)}` + } + } +} + function declarationBundlePlugin() { return { name: 'declaration-bundle', @@ -104,6 +125,7 @@ function declarationBundlePlugin() { file: resolve(packageRoot, 'dist/index.d.ts'), format: 'es' }) + stripImportJsdocComments(resolve(packageRoot, 'dist/index.d.ts')) await bundle.close() if (isRootPackage) { rmSync(resolve(packageRoot, 'types'), { recursive: true, force: true }) @@ -112,6 +134,68 @@ function declarationBundlePlugin() { } } +/** + * Removes line and block comments from generated JavaScript chunks. + * The bundle banner is injected after renderChunk, so it stays intact. + * + * @param {string} code + * @returns {string} + */ +function stripJsComments(code) { + /** @type {{ block: boolean, start: number, end: number }[]} */ + const comments = [] + + parse(code, { + ecmaVersion: 'latest', + onComment(block, _text, start, end) { + comments.push({ block, start, end }) + }, + sourceType: 'module' + }) + + if (!comments.length) { + return code + } + + let stripped = '' + let cursor = 0 + + for (const comment of comments) { + stripped += code.slice(cursor, comment.start) + + if (comment.block) { + const left = code[comment.start - 1] + const right = code[comment.end] + + if (left && right && !/\s/.test(left) && !/\s/.test(right)) { + stripped += ' ' + } + } + + cursor = comment.end + } + + stripped += code.slice(cursor) + + return stripped +} + +/** + * Removes JSDoc import-only comment blocks from generated declaration files. + * + * @param {string} filePath + */ +function stripImportJsdocComments(filePath) { + const contents = readFileSync(filePath, 'utf8') + const stripped = contents.replace(/\/\*\*[\s\S]*?\*\//g, (block) => ( + block.includes('@import') ? '' : block + )) + + if (stripped !== contents) { + writeFileSync(filePath, stripped) + } +} + function getPackageDeclarationPaths() { return Object.fromEntries( readdirSync(resolve(root, 'packages'), { withFileTypes: true }) @@ -122,3 +206,33 @@ function getPackageDeclarationPaths() { ]) ) } + +/** + * Returns the UMD global names for workspace packages. + * + * @returns {Record} + */ +function getPackageGlobals() { + return Object.fromEntries( + readdirSync(resolve(root, 'packages'), { withFileTypes: true }) + .filter((entry) => entry.isDirectory()) + .map(({ name }) => [ + `@wimaengine/${name}`, + toLibraryName(`@wimaengine/${name}`) + ]) + ) +} + +/** + * Converts a package name to a valid UMD global identifier. + * + * @param {string} name + * @returns {string} + */ +function toLibraryName(name) { + return name + .replace(/^@/, '') + .replace(/\//g, '_') + .replace(/-/g, '_') + .toUpperCase() +} From 0face4bb0fbe5e09d5fba4c790f3705b7d47f349 Mon Sep 17 00:00:00 2001 From: waynemwashuma <94756970+waynemwashuma@users.noreply.github.com> Date: Fri, 24 Jul 2026 18:24:45 +0300 Subject: [PATCH 2/6] Update packages' metadata --- package.json | 5 +++-- packages/animation/package.json | 12 ++++-------- packages/app/package.json | 12 ++++-------- packages/asset/package.json | 12 ++++-------- packages/audio/package.json | 12 ++++-------- packages/broadphase/package.json | 12 ++++-------- packages/color/package.json | 12 ++++-------- packages/command/package.json | 12 ++++-------- packages/core/package.json | 12 ++++-------- packages/damping/package.json | 12 ++++-------- packages/datastructures/package.json | 12 ++++-------- packages/device/package.json | 12 ++++-------- packages/diagnostic/package.json | 12 ++++-------- packages/ecs/package.json | 12 ++++-------- packages/emitter/package.json | 12 ++++-------- packages/event/package.json | 12 ++++-------- packages/geometry/package.json | 12 ++++-------- packages/gizmo/package.json | 12 ++++-------- packages/gravity/package.json | 12 ++++-------- packages/hierarchy/package.json | 12 ++++-------- packages/input-core/package.json | 12 ++++-------- packages/input/package.json | 12 ++++-------- packages/integrator/package.json | 12 ++++-------- packages/keyboard/package.json | 12 ++++-------- packages/logger/package.json | 12 ++++-------- packages/math/package.json | 12 ++++-------- packages/misc/package.json | 12 ++++-------- packages/mouse/package.json | 12 ++++-------- packages/movable/package.json | 12 ++++-------- packages/name/package.json | 12 ++++-------- packages/narrowphase/package.json | 12 ++++-------- packages/noise/package.json | 12 ++++-------- packages/physics/package.json | 12 ++++-------- packages/profiler/package.json | 12 ++++-------- packages/reflect/package.json | 12 ++++-------- packages/relationship/package.json | 12 ++++-------- packages/render-canvas2d/package.json | 12 ++++-------- packages/render-core/package.json | 12 ++++-------- packages/render-webgl/package.json | 12 ++++-------- packages/scene/package.json | 12 ++++-------- packages/schedule/package.json | 12 ++++-------- packages/storage/package.json | 12 ++++-------- packages/time/package.json | 12 ++++-------- packages/touch/package.json | 12 ++++-------- packages/transform/package.json | 12 ++++-------- packages/tween/package.json | 12 ++++-------- packages/type/package.json | 12 ++++-------- packages/utils/package.json | 12 ++++-------- packages/window-dom/package.json | 12 ++++-------- packages/window/package.json | 12 ++++-------- 50 files changed, 199 insertions(+), 394 deletions(-) diff --git a/package.json b/package.json index 6e8aa6d2..9ff3edf2 100644 --- a/package.json +++ b/package.json @@ -8,12 +8,13 @@ }, "type": "module", "license": "SEE LICENSE in LICENSE.txt", - "main": "./dist/index.module.js", + "main": "./dist/index.umd.js", "types": "./dist/index.d.ts", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./dist/index.module.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "author": "Wima engine contributors", diff --git a/packages/animation/package.json b/packages/animation/package.json index 4b397698..ab5cf0b6 100644 --- a/packages/animation/package.json +++ b/packages/animation/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/app/package.json b/packages/app/package.json index 25e3438c..3f1ee498 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/asset/package.json b/packages/asset/package.json index 732a8131..a81981d3 100644 --- a/packages/asset/package.json +++ b/packages/asset/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/audio/package.json b/packages/audio/package.json index d33cd49f..fb0c2839 100644 --- a/packages/audio/package.json +++ b/packages/audio/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/broadphase/package.json b/packages/broadphase/package.json index cde44482..aa225d07 100644 --- a/packages/broadphase/package.json +++ b/packages/broadphase/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/color/package.json b/packages/color/package.json index 9ef4942c..54e8675a 100644 --- a/packages/color/package.json +++ b/packages/color/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/command/package.json b/packages/command/package.json index cd73cd75..66eb6611 100644 --- a/packages/command/package.json +++ b/packages/command/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/core/package.json b/packages/core/package.json index 2e181518..907cb604 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/damping/package.json b/packages/damping/package.json index 957f052c..254289ac 100644 --- a/packages/damping/package.json +++ b/packages/damping/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/datastructures/package.json b/packages/datastructures/package.json index 3372697b..7a7b0383 100644 --- a/packages/datastructures/package.json +++ b/packages/datastructures/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "dependencies": { "vifaa": "^0.4.0" diff --git a/packages/device/package.json b/packages/device/package.json index b6cb41da..c8d2fe9b 100644 --- a/packages/device/package.json +++ b/packages/device/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/diagnostic/package.json b/packages/diagnostic/package.json index 26b79649..533ce0a6 100644 --- a/packages/diagnostic/package.json +++ b/packages/diagnostic/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/ecs/package.json b/packages/ecs/package.json index 8776b161..cd39f2f6 100644 --- a/packages/ecs/package.json +++ b/packages/ecs/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "dependencies": { "@wimaengine/datastructures": "0.3.0", diff --git a/packages/emitter/package.json b/packages/emitter/package.json index dde50c7f..2ddb26a3 100644 --- a/packages/emitter/package.json +++ b/packages/emitter/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/event/package.json b/packages/event/package.json index 3c8d1066..0bd18dd9 100644 --- a/packages/event/package.json +++ b/packages/event/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/geometry/package.json b/packages/geometry/package.json index cdbfca1d..41ec7a55 100644 --- a/packages/geometry/package.json +++ b/packages/geometry/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/gizmo/package.json b/packages/gizmo/package.json index 06af18e1..baa0c698 100644 --- a/packages/gizmo/package.json +++ b/packages/gizmo/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/gravity/package.json b/packages/gravity/package.json index b1b888d6..4c203226 100644 --- a/packages/gravity/package.json +++ b/packages/gravity/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/hierarchy/package.json b/packages/hierarchy/package.json index 510f24d7..89f7a8f2 100644 --- a/packages/hierarchy/package.json +++ b/packages/hierarchy/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/input-core/package.json b/packages/input-core/package.json index b8d7d060..f88b5f2a 100644 --- a/packages/input-core/package.json +++ b/packages/input-core/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/input/package.json b/packages/input/package.json index 15f08a46..8d3bc4f7 100644 --- a/packages/input/package.json +++ b/packages/input/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/integrator/package.json b/packages/integrator/package.json index b1346838..c997ca19 100644 --- a/packages/integrator/package.json +++ b/packages/integrator/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/keyboard/package.json b/packages/keyboard/package.json index 5db97cbb..193d5fa9 100644 --- a/packages/keyboard/package.json +++ b/packages/keyboard/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/logger/package.json b/packages/logger/package.json index ee45b5c6..5305a3d7 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/math/package.json b/packages/math/package.json index d8ae770f..56eb7e48 100644 --- a/packages/math/package.json +++ b/packages/math/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/misc/package.json b/packages/misc/package.json index 71b763cf..d4a05917 100644 --- a/packages/misc/package.json +++ b/packages/misc/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/mouse/package.json b/packages/mouse/package.json index b4adbd6f..a8eb35be 100644 --- a/packages/mouse/package.json +++ b/packages/mouse/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/movable/package.json b/packages/movable/package.json index 634150ca..8367658c 100644 --- a/packages/movable/package.json +++ b/packages/movable/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/name/package.json b/packages/name/package.json index d935c1d2..342c7407 100644 --- a/packages/name/package.json +++ b/packages/name/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/narrowphase/package.json b/packages/narrowphase/package.json index b3181841..adcef32b 100644 --- a/packages/narrowphase/package.json +++ b/packages/narrowphase/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/noise/package.json b/packages/noise/package.json index 6487b598..1f7d13a8 100644 --- a/packages/noise/package.json +++ b/packages/noise/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/physics/package.json b/packages/physics/package.json index 4ec2b46b..4c4e0d2e 100644 --- a/packages/physics/package.json +++ b/packages/physics/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/profiler/package.json b/packages/profiler/package.json index 391b2b37..0087b016 100644 --- a/packages/profiler/package.json +++ b/packages/profiler/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/reflect/package.json b/packages/reflect/package.json index 3628d260..b8bb2ad9 100644 --- a/packages/reflect/package.json +++ b/packages/reflect/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/relationship/package.json b/packages/relationship/package.json index 07a3f87d..05fe5d4b 100644 --- a/packages/relationship/package.json +++ b/packages/relationship/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/render-canvas2d/package.json b/packages/render-canvas2d/package.json index f559e7db..6296dadd 100644 --- a/packages/render-canvas2d/package.json +++ b/packages/render-canvas2d/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/render-core/package.json b/packages/render-core/package.json index 79946f1a..b2120943 100644 --- a/packages/render-core/package.json +++ b/packages/render-core/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/render-webgl/package.json b/packages/render-webgl/package.json index 39308aa1..6a0877a6 100644 --- a/packages/render-webgl/package.json +++ b/packages/render-webgl/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/scene/package.json b/packages/scene/package.json index bfbcef6b..27b9bd87 100644 --- a/packages/scene/package.json +++ b/packages/scene/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/schedule/package.json b/packages/schedule/package.json index 579f7529..28b6404f 100644 --- a/packages/schedule/package.json +++ b/packages/schedule/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "dependencies": { "@wimaengine/datastructures": "0.3.0", diff --git a/packages/storage/package.json b/packages/storage/package.json index cc446cd6..0271c1c2 100644 --- a/packages/storage/package.json +++ b/packages/storage/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/time/package.json b/packages/time/package.json index d7d5287a..a8d6ff0b 100644 --- a/packages/time/package.json +++ b/packages/time/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/touch/package.json b/packages/touch/package.json index ae2de266..a47b6424 100644 --- a/packages/touch/package.json +++ b/packages/touch/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/transform/package.json b/packages/transform/package.json index 7b919222..61342251 100644 --- a/packages/transform/package.json +++ b/packages/transform/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/tween/package.json b/packages/tween/package.json index 2de7685e..d3e2ce12 100644 --- a/packages/tween/package.json +++ b/packages/tween/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/type/package.json b/packages/type/package.json index 1a826e90..42ea8e97 100644 --- a/packages/type/package.json +++ b/packages/type/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/utils/package.json b/packages/utils/package.json index edece9f2..d76814e7 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/window-dom/package.json b/packages/window-dom/package.json index ea4fe196..76ad3ca4 100644 --- a/packages/window-dom/package.json +++ b/packages/window-dom/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", diff --git a/packages/window/package.json b/packages/window/package.json index b453d234..6b48d225 100644 --- a/packages/window/package.json +++ b/packages/window/package.json @@ -13,20 +13,16 @@ "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, - "main": "./index.js", + "main": "./dist/index.umd.js", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./index.js" - }, - "./src": { - "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/index.module.js", + "require": "./dist/index.umd.js" } }, "files": [ - "index.js", - "src" + "dist" ], "scripts": { "build": "vite build --config ../../.config/vite.config.js", From 443f415cfc63fd6427d0f764938cdb9a036e3919 Mon Sep 17 00:00:00 2001 From: waynemwashuma <94756970+waynemwashuma@users.noreply.github.com> Date: Fri, 24 Jul 2026 18:25:00 +0300 Subject: [PATCH 3/6] Update build scripts --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9ff3edf2..1c1273d8 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "build:docs": "npm run typedoc", "types": "turbo run types //#types:root", "test": "turbo run test", - "build": "npm run clean:build && turbo run build && turbo run //#build:root //#build:docs", + "build": "turbo run build && turbo run //#build:root //#build:docs", "lint": "npm run lint:src && npm run lint:examples", "version": "changeset version", "check:release-version": "node scripts/check-release-version.js", @@ -50,7 +50,7 @@ "tsc:lint": "tsc -p .config/tsc.lint.json", "watch:src": "vite build --watch --config .config/vite.config.js", "watch:docs": "npm run typedoc -- --watch", - "clean:build": "rm -rf dist types packages/*/types" + "clean:build": "rm -rf dist types packages/*/types packages/*/dist" }, "keywords": [ "game", From caf643f07344ab8395d58d9f59516f29e3e8973a Mon Sep 17 00:00:00 2001 From: waynemwashuma <94756970+waynemwashuma@users.noreply.github.com> Date: Fri, 24 Jul 2026 18:43:13 +0300 Subject: [PATCH 4/6] Update homepage metadata --- package.json | 2 +- packages/animation/package.json | 2 +- packages/app/package.json | 2 +- packages/asset/package.json | 2 +- packages/audio/package.json | 2 +- packages/broadphase/package.json | 2 +- packages/color/package.json | 2 +- packages/command/package.json | 2 +- packages/core/package.json | 2 +- packages/damping/package.json | 2 +- packages/datastructures/package.json | 2 +- packages/device/package.json | 2 +- packages/diagnostic/package.json | 2 +- packages/ecs/package.json | 2 +- packages/emitter/package.json | 2 +- packages/event/package.json | 2 +- packages/geometry/package.json | 2 +- packages/gizmo/package.json | 2 +- packages/gravity/package.json | 2 +- packages/hierarchy/package.json | 2 +- packages/input-core/package.json | 2 +- packages/input/package.json | 2 +- packages/integrator/package.json | 2 +- packages/keyboard/package.json | 2 +- packages/logger/package.json | 2 +- packages/math/package.json | 2 +- packages/misc/package.json | 2 +- packages/mouse/package.json | 2 +- packages/movable/package.json | 2 +- packages/name/package.json | 2 +- packages/narrowphase/package.json | 2 +- packages/noise/package.json | 2 +- packages/physics/package.json | 2 +- packages/profiler/package.json | 2 +- packages/reflect/package.json | 2 +- packages/relationship/package.json | 2 +- packages/render-canvas2d/package.json | 2 +- packages/render-core/package.json | 2 +- packages/render-webgl/package.json | 2 +- packages/scene/package.json | 2 +- packages/schedule/package.json | 2 +- packages/storage/package.json | 2 +- packages/time/package.json | 2 +- packages/touch/package.json | 2 +- packages/transform/package.json | 2 +- packages/tween/package.json | 2 +- packages/type/package.json | 2 +- packages/utils/package.json | 2 +- packages/window-dom/package.json | 2 +- packages/window/package.json | 2 +- 50 files changed, 50 insertions(+), 50 deletions(-) diff --git a/package.json b/package.json index 1c1273d8..c0af9a17 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "wima", "version": "0.3.0", "description": "An ECS driven modular game engine.", - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/animation/package.json b/packages/animation/package.json index ab5cf0b6..a538b39f 100644 --- a/packages/animation/package.json +++ b/packages/animation/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/app/package.json b/packages/app/package.json index 3f1ee498..afdad168 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/asset/package.json b/packages/asset/package.json index a81981d3..b3de6361 100644 --- a/packages/asset/package.json +++ b/packages/asset/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/audio/package.json b/packages/audio/package.json index fb0c2839..a620b906 100644 --- a/packages/audio/package.json +++ b/packages/audio/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/broadphase/package.json b/packages/broadphase/package.json index aa225d07..46742b86 100644 --- a/packages/broadphase/package.json +++ b/packages/broadphase/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/color/package.json b/packages/color/package.json index 54e8675a..1f55e2f1 100644 --- a/packages/color/package.json +++ b/packages/color/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/command/package.json b/packages/command/package.json index 66eb6611..31b9c05d 100644 --- a/packages/command/package.json +++ b/packages/command/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/core/package.json b/packages/core/package.json index 907cb604..bd42afa5 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/damping/package.json b/packages/damping/package.json index 254289ac..812b9833 100644 --- a/packages/damping/package.json +++ b/packages/damping/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/datastructures/package.json b/packages/datastructures/package.json index 7a7b0383..3b51fbdc 100644 --- a/packages/datastructures/package.json +++ b/packages/datastructures/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/device/package.json b/packages/device/package.json index c8d2fe9b..992cd71a 100644 --- a/packages/device/package.json +++ b/packages/device/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/diagnostic/package.json b/packages/diagnostic/package.json index 533ce0a6..ca8968b0 100644 --- a/packages/diagnostic/package.json +++ b/packages/diagnostic/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/ecs/package.json b/packages/ecs/package.json index cd39f2f6..bf3c7592 100644 --- a/packages/ecs/package.json +++ b/packages/ecs/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/emitter/package.json b/packages/emitter/package.json index 2ddb26a3..b04ea15a 100644 --- a/packages/emitter/package.json +++ b/packages/emitter/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/event/package.json b/packages/event/package.json index 0bd18dd9..7ae263ef 100644 --- a/packages/event/package.json +++ b/packages/event/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/geometry/package.json b/packages/geometry/package.json index 41ec7a55..acc20a23 100644 --- a/packages/geometry/package.json +++ b/packages/geometry/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/gizmo/package.json b/packages/gizmo/package.json index baa0c698..fedfbac2 100644 --- a/packages/gizmo/package.json +++ b/packages/gizmo/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/gravity/package.json b/packages/gravity/package.json index 4c203226..a08dab04 100644 --- a/packages/gravity/package.json +++ b/packages/gravity/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/hierarchy/package.json b/packages/hierarchy/package.json index 89f7a8f2..8df2a7f7 100644 --- a/packages/hierarchy/package.json +++ b/packages/hierarchy/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/input-core/package.json b/packages/input-core/package.json index f88b5f2a..44528c13 100644 --- a/packages/input-core/package.json +++ b/packages/input-core/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/input/package.json b/packages/input/package.json index 8d3bc4f7..805a4836 100644 --- a/packages/input/package.json +++ b/packages/input/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/integrator/package.json b/packages/integrator/package.json index c997ca19..921b8d36 100644 --- a/packages/integrator/package.json +++ b/packages/integrator/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/keyboard/package.json b/packages/keyboard/package.json index 193d5fa9..d30f8e92 100644 --- a/packages/keyboard/package.json +++ b/packages/keyboard/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/logger/package.json b/packages/logger/package.json index 5305a3d7..c5524b71 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/math/package.json b/packages/math/package.json index 56eb7e48..0f3a1de4 100644 --- a/packages/math/package.json +++ b/packages/math/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/misc/package.json b/packages/misc/package.json index d4a05917..c17bf41e 100644 --- a/packages/misc/package.json +++ b/packages/misc/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/mouse/package.json b/packages/mouse/package.json index a8eb35be..51729603 100644 --- a/packages/mouse/package.json +++ b/packages/mouse/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/movable/package.json b/packages/movable/package.json index 8367658c..8445de5c 100644 --- a/packages/movable/package.json +++ b/packages/movable/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/name/package.json b/packages/name/package.json index 342c7407..17088df1 100644 --- a/packages/name/package.json +++ b/packages/name/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/narrowphase/package.json b/packages/narrowphase/package.json index adcef32b..65510de4 100644 --- a/packages/narrowphase/package.json +++ b/packages/narrowphase/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/noise/package.json b/packages/noise/package.json index 1f7d13a8..c7324353 100644 --- a/packages/noise/package.json +++ b/packages/noise/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/physics/package.json b/packages/physics/package.json index 4c4e0d2e..c86284af 100644 --- a/packages/physics/package.json +++ b/packages/physics/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/profiler/package.json b/packages/profiler/package.json index 0087b016..114fdd46 100644 --- a/packages/profiler/package.json +++ b/packages/profiler/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/reflect/package.json b/packages/reflect/package.json index b8bb2ad9..b2489598 100644 --- a/packages/reflect/package.json +++ b/packages/reflect/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/relationship/package.json b/packages/relationship/package.json index 05fe5d4b..546acdbf 100644 --- a/packages/relationship/package.json +++ b/packages/relationship/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/render-canvas2d/package.json b/packages/render-canvas2d/package.json index 6296dadd..c3e1a29e 100644 --- a/packages/render-canvas2d/package.json +++ b/packages/render-canvas2d/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/render-core/package.json b/packages/render-core/package.json index b2120943..4b4d07d1 100644 --- a/packages/render-core/package.json +++ b/packages/render-core/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/render-webgl/package.json b/packages/render-webgl/package.json index 6a0877a6..02ef54b1 100644 --- a/packages/render-webgl/package.json +++ b/packages/render-webgl/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/scene/package.json b/packages/scene/package.json index 27b9bd87..56da6ccf 100644 --- a/packages/scene/package.json +++ b/packages/scene/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/schedule/package.json b/packages/schedule/package.json index 28b6404f..6e6a1b9f 100644 --- a/packages/schedule/package.json +++ b/packages/schedule/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/storage/package.json b/packages/storage/package.json index 0271c1c2..d889bbf9 100644 --- a/packages/storage/package.json +++ b/packages/storage/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/time/package.json b/packages/time/package.json index a8d6ff0b..902eaa0d 100644 --- a/packages/time/package.json +++ b/packages/time/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/touch/package.json b/packages/touch/package.json index a47b6424..7dac3040 100644 --- a/packages/touch/package.json +++ b/packages/touch/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/transform/package.json b/packages/transform/package.json index 61342251..bf9e8b8e 100644 --- a/packages/transform/package.json +++ b/packages/transform/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/tween/package.json b/packages/tween/package.json index d3e2ce12..49858093 100644 --- a/packages/tween/package.json +++ b/packages/tween/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/type/package.json b/packages/type/package.json index 42ea8e97..458655a2 100644 --- a/packages/type/package.json +++ b/packages/type/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/utils/package.json b/packages/utils/package.json index d76814e7..e2986a5b 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/window-dom/package.json b/packages/window-dom/package.json index 76ad3ca4..1c3d0e0a 100644 --- a/packages/window-dom/package.json +++ b/packages/window-dom/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, diff --git a/packages/window/package.json b/packages/window/package.json index 6b48d225..caf65512 100644 --- a/packages/window/package.json +++ b/packages/window/package.json @@ -9,7 +9,7 @@ "type": "git", "url": "https://github.com/wimaengine/wima.git" }, - "homepage": "https://wimaengine.github.io/wima/", + "homepage": "https://wimaengine.org", "bugs": { "url": "https://github.com/wimaengine/wima/issues" }, From 65912aa72962f49d7d76fbeefba32e873daa90b0 Mon Sep 17 00:00:00 2001 From: waynemwashuma <94756970+waynemwashuma@users.noreply.github.com> Date: Fri, 24 Jul 2026 20:19:34 +0300 Subject: [PATCH 5/6] Update tests --- packages/asset/tests/handle.test.js | 27 +------------------ .../scene/tests/resources/assetmap.test.js | 25 ++++++++++++++++- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/packages/asset/tests/handle.test.js b/packages/asset/tests/handle.test.js index 15e2aa23..70be8dbd 100644 --- a/packages/asset/tests/handle.test.js +++ b/packages/asset/tests/handle.test.js @@ -1,10 +1,7 @@ import { deepStrictEqual, strictEqual } from "assert"; import { test, describe } from "vitest"; -import { Assets } from "../src/resources"; -import { AssetServer } from "../src/resources"; +import { AssetServer, Assets } from "../src/resources"; import { World } from "@wimaengine/ecs"; -import { AssetSceneMap } from "@wimaengine/scene"; -import { typeid } from "@wimaengine/type"; describe('Testing `Handle`',()=>{ test('`Handle` clone is same as original', () => { @@ -205,26 +202,4 @@ describe('Testing `Handle`',()=>{ strictEqual(snapshot.asset, '/assets/text/sample.txt') deepStrictEqual(restored.id(), handle.id()) }) - - test('`Handle` snapshot restores through the scene asset map when no path is registered.', () => { - const world = new World() - const assets = new Assets(String) - const server = new AssetServer() - world.setResource(server) - const sceneMap = new AssetSceneMap() - world.setResource(sceneMap) - server.registerAsset(assets) - - const sourceHandle = assets.add('Wima engine') - const mappedHandle = assets.add('Mapped asset') - const sceneAssetId = sourceHandle.id() - const snapshot = sourceHandle.toSnapshot(world) - - sceneMap.set(sceneAssetId, typeid(String), sourceHandle.index, mappedHandle) - - const restored = snapshot.fromSnapshot(world, sceneAssetId) - - strictEqual(snapshot.asset, sourceHandle.index) - deepStrictEqual(restored.id(), mappedHandle.id()) - }) }) diff --git a/packages/scene/tests/resources/assetmap.test.js b/packages/scene/tests/resources/assetmap.test.js index c4f3174e..7a7798e0 100644 --- a/packages/scene/tests/resources/assetmap.test.js +++ b/packages/scene/tests/resources/assetmap.test.js @@ -1,6 +1,7 @@ import { deepStrictEqual, strictEqual } from 'assert' import { test, describe } from 'vitest' -import { Assets } from '@wimaengine/asset' +import { AssetServer, Assets } from '@wimaengine/asset' +import { World } from '@wimaengine/ecs' import { AssetSceneMap } from '../../src/resources' import { typeid } from '@wimaengine/type' @@ -48,4 +49,26 @@ describe.sequential('Testing `AssetSceneMap`', () => { strictEqual(sceneMap.get(sceneAssetId, typeid(String), 0), undefined) strictEqual(sceneMap.get(sceneAssetId, typeid(Number), 0) !== undefined, true) }) + + test('`Handle` snapshot restores through the scene asset map when no path is registered.', () => { + const world = new World() + const assets = new Assets(String) + const server = new AssetServer() + world.setResource(server) + const sceneMap = new AssetSceneMap() + world.setResource(sceneMap) + server.registerAsset(assets) + + const sourceHandle = assets.add('Wima engine') + const mappedHandle = assets.add('Mapped asset') + const sceneAssetId = sourceHandle.id() + const snapshot = sourceHandle.toSnapshot(world) + + sceneMap.set(sceneAssetId, typeid(String), sourceHandle.index, mappedHandle) + + const restored = snapshot.fromSnapshot(world, sceneAssetId) + + strictEqual(snapshot.asset, sourceHandle.index) + deepStrictEqual(restored.id(), mappedHandle.id()) + }) }) From 682a8ccb053a3610acf22e3ba814afd764b830ff Mon Sep 17 00:00:00 2001 From: waynemwashuma <94756970+waynemwashuma@users.noreply.github.com> Date: Fri, 24 Jul 2026 20:19:44 +0300 Subject: [PATCH 6/6] Update CI actions --- .github/workflows/pull-lint.yml | 22 +++++++++++++++++----- turbo.json | 6 ++++++ 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull-lint.yml b/.github/workflows/pull-lint.yml index 033b480f..da7e2391 100644 --- a/.github/workflows/pull-lint.yml +++ b/.github/workflows/pull-lint.yml @@ -13,6 +13,7 @@ jobs: outputs: source: ${{ steps.filter.outputs.source }} examples: ${{ steps.filter.outputs.examples }} + config: ${{ steps.filter.outputs.config }} steps: - uses: actions/checkout@v7 with: @@ -28,9 +29,17 @@ jobs: - 'addons/**' examples: - 'examples/**' + config: + - '.config/**' + - '.github/workflows/**' + - 'package.json' + - 'package-lock.json' + - 'scripts/**' + - 'turbo.json' + - 'tsconfig.json' lint-source: needs: changes - if: needs.changes.outputs.source == 'true' + if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.config == 'true' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 @@ -39,18 +48,20 @@ jobs: node-version: 24 cache: npm - run: npm ci + - run: npm run build - run: npm run lint:src-dry -- --max-warnings=0 lint-examples: needs: changes - if: needs.changes.outputs.examples == 'true' + if: ${{ needs.changes.outputs.examples == 'true' || needs.changes.outputs.config == 'true' }} runs-on: ubuntu-latest - steps: + steps: - uses: actions/checkout@v7 - uses: actions/setup-node@v6 with: node-version: 24 cache: npm - run: npm ci + - run: npm run build - run: npm run lint:examples-dry -- --max-warnings=0 tests: needs: compiles @@ -62,6 +73,7 @@ jobs: node-version: 24 cache: npm - run: npm ci + - run: npm run build - run: npm run test builds: needs: compiles @@ -76,9 +88,9 @@ jobs: - run: npm run build compiles: needs: changes - if: needs.changes.outputs.source == 'true' + if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.config == 'true' }} runs-on: ubuntu-latest - steps: + steps: - uses: actions/checkout@v7 - uses: actions/setup-node@v6 with: diff --git a/turbo.json b/turbo.json index e66ba915..68a708cc 100644 --- a/turbo.json +++ b/turbo.json @@ -11,9 +11,15 @@ ] }, "test": { + "dependsOn": [ + "^build" + ], "outputs": [] }, "types": { + "dependsOn": [ + "^build" + ], "outputs": [ "types/**" ]