diff --git a/.scripts/esbuild.ts b/.scripts/esbuild.ts index fb4cda2a..f1416a36 100644 --- a/.scripts/esbuild.ts +++ b/.scripts/esbuild.ts @@ -233,6 +233,7 @@ const COMMON_CONFIG: esbuild.BuildOptions = { svelte: 'svelte', module: './.scripts/fakeModule.js', 'node:module': './.scripts/fakeModule.js', + 'node:fs': './src/constants.ts', }, format: 'iife', define: DEFINES, diff --git a/package.json b/package.json index 1694a8ab..6ec4dcbb 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "title": "Animated Java", "icon": "icon.svg", "description": "Effortlessly craft complex animations for Minecraft: Java Edition", - "version": "1.10.0", + "version": "1.10.1", "min_blockbench_version": "5.1.4", "variant": "desktop", "tags": [ @@ -105,7 +105,7 @@ "firebase": "^9.19.0", "jiti": "^2.6.1", "js-yaml": "^4.1.0", - "mc-build": "^4.1.2", + "mc-build": "^4.1.3", "node-modules-vscode-problems-patch": "^1.0.9", "octokit": "^5.0.3", "prettier": "^3.8.2", diff --git a/src/constants.ts b/src/constants.ts index c3f6fe47..914058a3 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,12 +1,42 @@ import PACKAGEJSON from '../package.json' -import { localize as translate } from './util/lang' +import { localize } from './util/lang' export const PACKAGE: typeof PACKAGEJSON = PACKAGEJSON let cachedFsModule: ScopedFS | null = null export function getFsModule() { + debugger cachedFsModule ??= requireNativeModule('fs', { - message: translate('require.fs'), + message: localize('require.fs'), optional: false, })! return cachedFsModule } + +// Super lazy-loading of properties, so that we don't load the fs or fs.promises module until it's actually used by a dependency. +export default new Proxy( + {}, + { + get(target, prop) { + if (prop === 'promises') { + return new Proxy( + {}, + { + get(target, prop) { + return (...args: any[]) => { + // @ts-expect-error + return getFsModule().promises[prop as keyof ScopedFS['promises']]( + ...args + ) + } + }, + } + ) + } + + return (...args: any[]) => { + // @ts-expect-error + return getFsModule()[prop as keyof ScopedFS](...args) + } + }, + } +) diff --git a/src/formats/blueprint/formatPage.svelte b/src/formats/blueprint/formatPage.svelte index 4faf57fe..e72c73e0 100644 --- a/src/formats/blueprint/formatPage.svelte +++ b/src/formats/blueprint/formatPage.svelte @@ -21,9 +21,8 @@
- Check out the Docs to learn how to use Animated Java. + Check out the Docs to learn + how to use Animated Java.
To learn the basics of Animated Java, check out our Getting StartedGetting Started guide.
diff --git a/src/pluginPackage/changelog.json b/src/pluginPackage/changelog.json index 67477465..27cfbada 100644 --- a/src/pluginPackage/changelog.json +++ b/src/pluginPackage/changelog.json @@ -852,5 +852,22 @@ ] } ] + }, + "1.10.1": { + "title": "v1.10.1", + "author": "Titus Evans (SnaveSutit)", + "date": "2026-06-24", + "categories": [ + { + "title": "Fixes", + "list": [ + "Fixed broken website links.", + "Fixed plugin data desyncs.", + "Fixed missing translations for resource pack folder path.", + "Fixed missing message for file access request.", + "Fixed dependencies requiring node:fs early in the plugin load process." + ] + } + ] } } diff --git a/src/popups/installed/installed.svelte b/src/popups/installed/installed.svelte index c7f3d08d..f192eb5b 100644 --- a/src/popups/installed/installed.svelte +++ b/src/popups/installed/installed.svelte @@ -15,7 +15,7 @@Check out our getting started page to learn how to use Animated Java!
diff --git a/src/systems/datapackCompiler/tellraw.ts b/src/systems/datapackCompiler/tellraw.ts index dba763bd..36dd8129 100644 --- a/src/systems/datapackCompiler/tellraw.ts +++ b/src/systems/datapackCompiler/tellraw.ts @@ -161,7 +161,7 @@ namespace TELLRAW { ], }, CREATE_TELLRAW_HELP_LINK( - 'https://animated-java.dev/docs/rigs/controlling-a-rig-instance' + 'https://animated-java.dev/docs/core-concepts/tags#practical-selector-examples' ), ]) }