From c6c336dc2da6a943cecda4e9932f203d62cd6205 Mon Sep 17 00:00:00 2001 From: Christopher Monsanto Date: Sat, 15 Aug 2026 22:04:43 -0400 Subject: [PATCH] Fix ps sheet data imports broken by dist-main removal The .sheet.mjs files imported bare @smogon/sprite-data / @smogon/sprite-root, which stopped resolving from the repo root after the TS7/Node 24 migration dropped dist mains. Use explicit index.ts imports and add the workspace deps to the root package. Co-Authored-By: Claude Fable 5 --- build.config | 7 +++++++ package.json | 4 ++++ pnpm-lock.yaml | 7 +++++++ ps-items.sheet.mjs | 4 ++-- ps-pokemon.sheet.mjs | 4 ++-- 5 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 build.config diff --git a/build.config b/build.config new file mode 100644 index 00000000..1bc0e487 --- /dev/null +++ b/build.config @@ -0,0 +1,7 @@ +MODELS_OPTIPNG=-o7 +MODELS_ADVPNG=-z4 -i10 +MINISPRITE_OPTIPNG=-o7 +MINISPRITE_ADVPNG=-z4 -i100 +#CONFIG_SPRITESHEET_OPTIPNG=-o7 +#CONFIG_SPRITESHEET_ADVPNG=-z4 -i15 +#CONFIG_SPRITESHEET_PNGQUANT=256 -s 11 diff --git a/package.json b/package.json index f46268d7..4122314c 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,10 @@ "scripts": { "build": "tsc --build tsconfig-workspace.json" }, + "dependencies": { + "@smogon/sprite-data": "workspace:*", + "@smogon/sprite-root": "workspace:*" + }, "devDependencies": { "@types/node": "^24.10.7", "typescript": "~7.0.2" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 892df403..d70c1e2e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,13 @@ settings: importers: .: + dependencies: + '@smogon/sprite-data': + specifier: workspace:* + version: link:data/lib + '@smogon/sprite-root': + specifier: workspace:* + version: link:lib/root devDependencies: '@types/node': specifier: ^24.10.7 diff --git a/ps-items.sheet.mjs b/ps-items.sheet.mjs index 9b76bd34..3d98e462 100644 --- a/ps-items.sheet.mjs +++ b/ps-items.sheet.mjs @@ -1,7 +1,7 @@ import path from 'path'; -import * as spritedata from '@smogon/sprite-data'; -import root from '@smogon/sprite-root'; +import * as spritedata from '@smogon/sprite-data/index.ts'; +import root from '@smogon/sprite-root/index.ts'; function toPSID(name) { return name.toLowerCase().replace(/[^a-z0-9]+/g, ''); diff --git a/ps-pokemon.sheet.mjs b/ps-pokemon.sheet.mjs index 1745f361..7344f8c6 100644 --- a/ps-pokemon.sheet.mjs +++ b/ps-pokemon.sheet.mjs @@ -1,8 +1,8 @@ import fs from 'fs'; import path from 'path'; -import * as spritedata from '@smogon/sprite-data'; -import root from '@smogon/sprite-root'; +import * as spritedata from '@smogon/sprite-data/index.ts'; +import root from '@smogon/sprite-root/index.ts'; const srcDir = path.join(root, "src"); const spritesDir = path.join(srcDir, "minisprites/pokemon/gen6");