Skip to content

[codex] fix prebuild project name replacement#689

Merged
thymikee merged 3 commits intomainfrom
codex/fix-prebuild-project-name-replacement
Feb 24, 2026
Merged

[codex] fix prebuild project name replacement#689
thymikee merged 3 commits intomainfrom
codex/fix-prebuild-project-name-replacement

Conversation

@thiagobrez
Copy link
Collaborator

@thiagobrez thiagobrez commented Feb 24, 2026

Summary

This pull request fixes a rock prebuild regression in @rock-js/plugin-expo-config-plugins where native placeholders were replaced using the project root folder name instead of the app name from app.json.

It also includes test coverage updates to avoid case-sensitivity mismatch between local development (often case-insensitive filesystems) and Linux CI (case-sensitive filesystem).

User Impact

Users whose repository folder name differs from their configured app name could end up with incorrectly renamed native iOS artifacts after running rock prebuild (for example, native project files named after the parent directory like Mobile).

In addition, CI Validate could fail while local runs passed because fallback path assertions used incorrect casing.

Root Cause

  • regenNativeDirs used normalizeProjectName(path.basename(projectRoot)) when replacing placeholders, which ignored app.json name configuration.
  • The fallback assertion in regen-native-dirs.test.ts used lowercase path casing that was not valid on case-sensitive CI filesystems.

Fix

  • Resolve project name from app.json first (expo.name, otherwise top-level name) and only fall back to directory name when unavailable.
  • Normalize the resolved project name before passing to replacePlaceholder.
  • Update tests to assert the correct normalized casing for fallback paths.
  • Update changeset summary to reflect the full branch scope: prebuild project-name replacement fix.

Validation

  • pnpm --filter @rock-js/plugin-expo-config-plugins exec vitest run src/lib/utils/regen-native-dirs.test.ts

@vercel
Copy link

vercel bot commented Feb 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
rock Ignored Ignored Preview Feb 24, 2026 4:39pm

Request Review

@thiagobrez thiagobrez marked this pull request as ready for review February 24, 2026 16:48
@thymikee thymikee merged commit 526edf8 into main Feb 24, 2026
6 checks passed
@thymikee thymikee deleted the codex/fix-prebuild-project-name-replacement branch February 24, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants