fix: use @gsd-build npm scope and remove committed binary

Rename all platform packages from @gsd/engine-* to @gsd-build/engine-*
to match the npm org. Remove the darwin-arm64 binary from git and
native/addon from files — production binaries come exclusively from
CI-published platform packages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson 2026-03-13 14:46:57 -06:00
parent 1a0d5cf740
commit 1774d6e1f4
9 changed files with 15 additions and 16 deletions

View file

@ -122,7 +122,7 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
for platform in darwin-arm64 darwin-x64 linux-x64-gnu linux-arm64-gnu win32-x64-msvc; do
echo "Publishing @gsd/engine-${platform}..."
echo "Publishing @gsd-build/engine-${platform}..."
cd "native/npm/${platform}"
OUTPUT=$(npm publish --access public 2>&1) && echo "$OUTPUT" || {
if echo "$OUTPUT" | grep -q "cannot publish over the previously published"; then

View file

@ -1,5 +1,5 @@
{
"name": "@gsd/engine-darwin-arm64",
"name": "@gsd-build/engine-darwin-arm64",
"version": "2.10.2",
"description": "GSD native engine binary for macOS ARM64",
"os": [

View file

@ -1,5 +1,5 @@
{
"name": "@gsd/engine-darwin-x64",
"name": "@gsd-build/engine-darwin-x64",
"version": "2.10.2",
"description": "GSD native engine binary for macOS Intel",
"os": [

View file

@ -1,5 +1,5 @@
{
"name": "@gsd/engine-linux-arm64-gnu",
"name": "@gsd-build/engine-linux-arm64-gnu",
"version": "2.10.2",
"description": "GSD native engine binary for Linux ARM64 (glibc)",
"os": [

View file

@ -1,5 +1,5 @@
{
"name": "@gsd/engine-linux-x64-gnu",
"name": "@gsd-build/engine-linux-x64-gnu",
"version": "2.10.2",
"description": "GSD native engine binary for Linux x64 (glibc)",
"os": [

View file

@ -1,5 +1,5 @@
{
"name": "@gsd/engine-win32-x64-msvc",
"name": "@gsd-build/engine-win32-x64-msvc",
"version": "2.10.2",
"description": "GSD native engine binary for Windows x64 (MSVC)",
"os": [

View file

@ -48,7 +48,7 @@ for (const platform of platformPackages) {
let rootChanged = false;
const optDeps = rootPkg.optionalDependencies || {};
for (const platform of platformPackages) {
const depName = `@gsd/engine-${platform}`;
const depName = `@gsd-build/engine-${platform}`;
if (optDeps[depName] && optDeps[depName] !== version) {
console.log(` root optionalDependencies ${depName}: ${optDeps[depName]} -> ${version}`);
optDeps[depName] = version;

View file

@ -25,7 +25,6 @@
"pkg",
"src/resources",
"scripts/postinstall.js",
"native/addon",
"package.json",
"README.md"
],
@ -83,11 +82,11 @@
"typescript": "^5.4.0"
},
"optionalDependencies": {
"@gsd/engine-darwin-arm64": "2.10.2",
"@gsd/engine-darwin-x64": "2.10.2",
"@gsd/engine-linux-x64-gnu": "2.10.2",
"@gsd/engine-linux-arm64-gnu": "2.10.2",
"@gsd/engine-win32-x64-msvc": "2.10.2",
"@gsd-build/engine-darwin-arm64": "2.10.2",
"@gsd-build/engine-darwin-x64": "2.10.2",
"@gsd-build/engine-linux-x64-gnu": "2.10.2",
"@gsd-build/engine-linux-arm64-gnu": "2.10.2",
"@gsd-build/engine-win32-x64-msvc": "2.10.2",
"fsevents": "~2.3.3"
},
"overrides": {

View file

@ -3,7 +3,7 @@
*
* Locates and loads the compiled Rust N-API addon (`.node` file).
* Resolution order:
* 1. @gsd/engine-{platform} npm optional dependency (production install)
* 1. @gsd-build/engine-{platform} npm optional dependency (production install)
* 2. native/addon/gsd_engine.{platform}.node (local release build)
* 3. native/addon/gsd_engine.dev.node (local debug build)
*/
@ -34,10 +34,10 @@ function loadNative(): Record<string, unknown> {
const packageSuffix = platformPackageMap[platformTag];
if (packageSuffix) {
try {
return require(`@gsd/engine-${packageSuffix}`) as Record<string, unknown>;
return require(`@gsd-build/engine-${packageSuffix}`) as Record<string, unknown>;
} catch (err) {
const message = err instanceof Error ? err.message : String(err);
errors.push(`@gsd/engine-${packageSuffix}: ${message}`);
errors.push(`@gsd-build/engine-${packageSuffix}: ${message}`);
}
}