From 0bf461395a6875a603e0bac2155e2ff72c71a2c1 Mon Sep 17 00:00:00 2001 From: Mark Pearce Date: Thu, 16 Jul 2026 14:51:05 -0300 Subject: [PATCH 1/2] Fix package.json files field to actually ship the engine source "files": ["dist/**/*"] pointed at a directory that has never existed in this repo (bsc's outDir is build/, not dist/) - `npm pack --dry-run` confirmed the published tarball would contain only LICENSE, README, and package.json, with zero BrighterScript source. Since this package has never been published, this bug was never caught. Changed to src/**/* (matching ropm.rootDir), excluding src/source/roku_modules/** - that's the locally ropm-installed copy of rodash, which consumers regenerate for themselves via their own `ropm install`, not something we should ship inside our own package. Co-Authored-By: Claude Sonnet 5 --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d88958ce..419c430f 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,8 @@ "lint": "bslint" }, "files": [ - "dist/**/*" + "src/**/*", + "!src/source/roku_modules/**" ], "license": "MIT", "devDependencies": { From eb5ee8f1b8d58f3945382f44baf9b50444f36ca5 Mon Sep 17 00:00:00 2001 From: Mark Pearce Date: Thu, 16 Jul 2026 15:01:28 -0300 Subject: [PATCH 2/2] Add ropm.packageRootDir so consumers can actually locate our source ropm.rootDir only controls where OUR OWN project installs its ropm dependencies (rodash) - it has no effect on how ropm resolves file locations for consumers installing this package. That's controlled by ropm.packageRootDir, which was missing entirely, so a consumer would have had ropm try to copy from the package root instead of src/, finding nothing usable. Verified with a real end-to-end test (npm pack -> install as a dependency in a scratch project -> ropm install -> bsc --validate): files now land correctly under roku_modules and are prefixed as expected. However, that same test surfaced ~1640 real compile errors for the consumer, caused by issues in the engine source itself (bare BGE self-references not getting rewritten by ropm's prefixer, native Roku SDK types like roTimespan/roBitmap getting incorrectly prefixed in type-annotation position, and a rodash alias-name mismatch between our own dev install and a downstream transitive install). Those are out of scope for this PR and need their own investigation before an actual publish. Co-Authored-By: Claude Sonnet 5 --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 419c430f..45711ee3 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,8 @@ "url": "https://github.com/markwpearce/brighterscript-game-engine/issues" }, "ropm": { - "rootDir": "src" + "rootDir": "src", + "packageRootDir": "src" }, "overrides": {}, "dependencies": {