Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: workaround for npm ignoring .gitignore #1231

Merged
merged 4 commits into from
Nov 30, 2022

Conversation

tido64
Copy link
Member

@tido64 tido64 commented Nov 28, 2022

Description

npm install seems to be renaming .gitignore files to .npmignore. This breaks our templates. As a workaround, we'll rename the files ourselves, from .gitignore to _gitignore, to avoid any further attempts to mutate the package.

Resolves #1228.

Platforms affected

  • Android
  • iOS
  • macOS
  • Windows

Test plan

npm pack
tar tf react-native-test-app-0.0.1-dev.tgz | grep gitignore

Verify that .gitignore files have been renamed to _gitignore, i.e.:

% tar tf react-native-test-app-0.0.1-dev.tgz | grep ignore
package/example/_gitignore
package/example/windows/_gitignore

@github-actions github-actions bot added the platform: Android This affects Android label Nov 28, 2022
@github-actions

This comment was marked as resolved.

@kelset kelset added bug Something isn't working and removed platform: Android This affects Android labels Nov 29, 2022
Copy link
Contributor

@kelset kelset left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested locally, works as expected 👍 kind of surprised by this behaviour but I guess that's why in RN's template we have all the dotenv files as "_"

@tido64 tido64 enabled auto-merge (squash) November 29, 2022 17:30
@github-actions github-actions bot added the platform: Android This affects Android label Nov 29, 2022
@tido64 tido64 force-pushed the tido/workaround-npm-gitignore branch from fa45cc5 to e17f3b2 Compare November 30, 2022 09:27
@tido64 tido64 merged commit f05935e into trunk Nov 30, 2022
@tido64 tido64 deleted the tido/workaround-npm-gitignore branch November 30, 2022 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform: Android This affects Android
Projects
None yet
2 participants