fix(build): pack phonemis submodule sources in npm tarball#1182
Merged
Conversation
Init the phonemis submodule from create-package.sh so its sources are present at npm pack time; previously the submodule was empty so the podspec's third-party/common/phonemis/src glob found nothing and TTS-using apps could not build from the published package. Trim phonemis data/test/scripts/requirements.txt in the script (with a trap-based restore) rather than via package.json `files` because the submodule's own .gitignore re-includes scripts/build* via `!scripts/build*` and that overrides the package.json exclusion in npm-packlist.
IgorSwat
approved these changes
May 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Init the phonemis git submodule in
create-package.shso its sources are present in the published npm tarball. Previously the submodule was empty at pack time, so the podspec'sthird-party/common/phonemis/src/**/*.{cpp,hpp,h}source-files glob found nothing and TTS-using apps could not build from the npm package.data/,scripts/,test/, andrequirements.txtare trimmed in the script (working-tree trim, restored on exit viatrap) rather than via thepackage.jsonfilesfield, because the submodule's own.gitignorere-includesscripts/build*via!scripts/build*andnpm-packlisthonors that rule againstfilesexclusions.Introduces a breaking change?
Type of change
Tested on
Testing instructions
packages/react-native-executorch, run./scripts/create-package.sh.tar tzf react-native-executorch-*.tgz | grep phonemis/src | wc -l→ 87 source files.tar tzf react-native-executorch-*.tgz | grep -E "phonemis/(data|test|requirements)"→ empty.pod install+ iOS/Android build; phonemis should compile cleanly intolibreact-native-executorch.{a,so}.Screenshots
Related issues
Checklist
Additional notes