Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions apps/example-game/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# example-game

## 0.0.7

### Patch Changes

- Updated dependencies [332db0b]
- @react-text-game/ui@0.6.1
- @react-text-game/mdx@0.3.1

## 0.0.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/example-game/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "example-game",
"private": true,
"version": "0.0.6",
"version": "0.0.7",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
7 changes: 7 additions & 0 deletions apps/ui-test-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# ui-test-app

## 0.1.7

### Patch Changes

- Updated dependencies [332db0b]
- @react-text-game/ui@0.6.1

## 0.1.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/ui-test-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ui-test-app",
"version": "0.1.6",
"version": "0.1.7",
"private": true,
"scripts": {
"dev": "next dev --turbopack",
Expand Down
21 changes: 21 additions & 0 deletions packages/mdx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## 0.3.1

### Patch Changes

- 332db0b: Fixed the published output being unloadable under Node's ESM resolver.

These packages declare `"type": "module"` and only an `exports.import` condition,
so Node reads their files as ESM — where relative specifiers need an explicit
file extension and a directory never resolves to its `index.js`. `dist` shipped
the shortened forms, which bundlers accept but Node rejects with
`ERR_MODULE_NOT_FOUND` and `ERR_UNSUPPORTED_DIR_IMPORT`. The build now enables
`tsc-alias`'s `resolveFullPaths`, matching what `core` and `devtools` already did.

`@react-text-game/ui/i18n` additionally imported its English strings from a JSON
file, which Node refuses without an `with { type: "json" }` import attribute
(`ERR_IMPORT_ATTRIBUTE_MISSING`). Because `core` reaches that entry through a
dynamic import inside `Game.init`, and that import is wrapped in a `try/catch`
that treats any failure as "the UI package isn't installed", UI strings silently
fell back to raw translation keys under Node and SSR. The locale is now a
TypeScript module; the exported `uiTranslations` type is unchanged.

## 0.3.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-text-game/mdx",
"version": "0.3.0",
"version": "0.3.1",
"description": "MDX support for React Text Game",
"main": "dist/index.js",
"module": "dist/index.js",
Expand Down
9 changes: 8 additions & 1 deletion packages/mdx/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"extends": "./tsconfig.json",
"exclude": ["dist", "node_modules", "src/tests"]
"exclude": ["dist", "node_modules", "src/tests"],
// Node's ESM resolver needs explicit file extensions and cannot resolve a
// directory to its index. Without this, `dist` ships specifiers like
// "./components" and Node fails with ERR_UNSUPPORTED_DIR_IMPORT. The plugin
// entry runs in a bundler config under Node, so this matters at build time.
"tsc-alias": {
"resolveFullPaths": true
}
}
21 changes: 21 additions & 0 deletions packages/messenger/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# @react-text-game/messenger

## 0.1.1

### Patch Changes

- 332db0b: Fixed the published output being unloadable under Node's ESM resolver.

These packages declare `"type": "module"` and only an `exports.import` condition,
so Node reads their files as ESM — where relative specifiers need an explicit
file extension and a directory never resolves to its `index.js`. `dist` shipped
the shortened forms, which bundlers accept but Node rejects with
`ERR_MODULE_NOT_FOUND` and `ERR_UNSUPPORTED_DIR_IMPORT`. The build now enables
`tsc-alias`'s `resolveFullPaths`, matching what `core` and `devtools` already did.

`@react-text-game/ui/i18n` additionally imported its English strings from a JSON
file, which Node refuses without an `with { type: "json" }` import attribute
(`ERR_IMPORT_ATTRIBUTE_MISSING`). Because `core` reaches that entry through a
dynamic import inside `Game.init`, and that import is wrapped in a `try/catch`
that treats any failure as "the UI package isn't installed", UI strings silently
fell back to raw translation keys under Node and SSR. The locale is now a
TypeScript module; the exported `uiTranslations` type is unchanged.

## 0.1.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/messenger/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-text-game/messenger",
"version": "0.1.0",
"version": "0.1.1",
"description": "Headless messenger and visual-novel transcript engine for React Text Game: persistent message logs, seen tracking, group chats, media albums and scheduled delivery",
"main": "dist/index.js",
"module": "dist/index.js",
Expand Down
9 changes: 8 additions & 1 deletion packages/messenger/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"extends": "./tsconfig.json",
"exclude": ["dist", "node_modules", "src/tests"]
"exclude": ["dist", "node_modules", "src/tests"],
// Node's ESM resolver needs explicit file extensions and cannot resolve a
// directory to its index. Without this, `dist` ships specifiers like
// "./constants" and "./i18n" and Node fails with ERR_MODULE_NOT_FOUND and
// ERR_UNSUPPORTED_DIR_IMPORT.
"tsc-alias": {
"resolveFullPaths": true
}
}
21 changes: 21 additions & 0 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## 0.6.1

### Patch Changes

- 332db0b: Fixed the published output being unloadable under Node's ESM resolver.

These packages declare `"type": "module"` and only an `exports.import` condition,
so Node reads their files as ESM — where relative specifiers need an explicit
file extension and a directory never resolves to its `index.js`. `dist` shipped
the shortened forms, which bundlers accept but Node rejects with
`ERR_MODULE_NOT_FOUND` and `ERR_UNSUPPORTED_DIR_IMPORT`. The build now enables
`tsc-alias`'s `resolveFullPaths`, matching what `core` and `devtools` already did.

`@react-text-game/ui/i18n` additionally imported its English strings from a JSON
file, which Node refuses without an `with { type: "json" }` import attribute
(`ERR_IMPORT_ATTRIBUTE_MISSING`). Because `core` reaches that entry through a
dynamic import inside `Game.init`, and that import is wrapped in a `try/catch`
that treats any failure as "the UI package isn't installed", UI strings silently
fell back to raw translation keys under Node and SSR. The locale is now a
TypeScript module; the exported `uiTranslations` type is unchanged.

## 0.6.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-text-game/ui",
"version": "0.6.0",
"version": "0.6.1",
"description": "Themeable React UI component library for text-based games with Tailwind CSS v4, featuring story passages, interactive maps, and customizable game interfaces",
"private": false,
"sideEffects": [
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/i18n/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ui from "./locales/en/ui.json";
import { ui } from "./locales/en/ui";

export const uiTranslations = {
en: { ui },
Expand Down
32 changes: 0 additions & 32 deletions packages/ui/src/i18n/locales/en/ui.json

This file was deleted.

42 changes: 42 additions & 0 deletions packages/ui/src/i18n/locales/en/ui.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* English defaults for the `ui` namespace.
*
* @remarks
* A TypeScript module rather than JSON on purpose: Node's ESM resolver requires
* an `with { type: "json" }` import attribute for JSON modules, so a bare JSON
* import makes this entry unloadable under plain Node (SSR, or `Game.init`
* reaching it through core's dynamic import).
*/
export const ui = {
mainMenu: {
title: "Main Menu",
newGame: "New Game",
continue: "Continue",
loadGame: "Load Game",
},
saves: {
title: {
save: "Save Game",
load: "Load Game",
saveLoad: "Save / Load Game",
},
slot: {
label: "Slot {{number}}",
empty: "Empty Slot",
saveHere: "Save Here",
overwrite: "Overwrite",
},
actions: {
load: "Load",
loading: "Loading...",
save: "Save",
saving: "Saving...",
delete: "Delete",
close: "Close",
},
errors: {
actionFailed:
"An error occurred. Please check the console for details.",
},
},
};
9 changes: 8 additions & 1 deletion packages/ui/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"extends": "./tsconfig.json",
"exclude": ["dist", "node_modules", "src/tests"]
"exclude": ["dist", "node_modules", "src/tests"],
// Node's ESM resolver needs explicit file extensions and cannot resolve a
// directory to its index. Without this, `dist` ships specifiers like
// "./hooks" and Node fails with ERR_MODULE_NOT_FOUND and
// ERR_UNSUPPORTED_DIR_IMPORT.
"tsc-alias": {
"resolveFullPaths": true
}
}
Loading