Skip to content

fix: replace Android and Apple template placeholders in nitrogen init - #1986

Merged
mrousavy merged 1 commit into
v1from
mrousavy/fix-nitrogen-init-placeholders
Oct 23, 2026
Merged

mrousavy merged 1 commit into
v1from
mrousavy/fix-nitrogen-init-placeholders

Conversation

@mrousavy

Copy link
Copy Markdown
Member

#1972 renamed the nitro.json keys and also changed the names init.ts passes to replaceTemplate. The template still uses $$androidNamespace$$, $$androidCxxLibName$$ and $$appleModuleName$$, so nitrogen init left them in the podspec name, the Kotlin package path and several files. This goes back to the template's names.

CI didn't catch it because the init workflow never looked at the result. It now fails if any file name or file content in the generated library still contains $$.

Note: nitrogen init clones packages/template from the v1 branch on GitHub, so this workflow tests the PR's init.ts against the template on v1, not against template changes in the PR.

Also fixes the HybridObject JSDoc example to import Apple instead of iOS.

🤖 Generated with Claude Code

#1972 renamed the nitro.json keys and also changed the names init.ts
passes to replaceTemplate to `android.namespace`, `android.cxxLibName`
and `apple.moduleName`. The template still uses `$$androidNamespace$$`,
`$$androidCxxLibName$$` and `$$appleModuleName$$`, so new libraries kept
those placeholders in the podspec name, the Kotlin package path and file
contents. Go back to the template's names.

The init workflow now fails if any file name or file content in the
generated library still contains `$$`.

Also make the HybridObject JSDoc example import `Apple`, which it uses,
instead of `iOS`.
@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
nitro-docs Ready Ready Preview Oct 23, 2026 11:41am UTC

Request Review

@mrousavy
mrousavy merged commit 924caba into v1 Oct 23, 2026
17 of 19 checks passed

This branch was successfully deployed

1 active deployment
Preview — 5e659b8b Deployed Oct 23, 2026 by vercel[bot]
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.

1 participant