Skip to content

Remove .npmignore files from other packages, add lint check #50786

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

Closed
wants to merge 4 commits into from

Conversation

huntie
Copy link
Member

@huntie huntie commented Apr 17, 2025

Summary:
Follows #50784. Having any .npmignore files is a gotcha — remove and replace with package.json#files.

Changelog: [Internal]

Differential Revision: D73193257

huntie added 4 commits April 17, 2025 06:10
Summary:
Migrates us from several `.npmignore` files to `package.json#files`, for the main `react-native` package.

This reduces the size of our npm package by 38 files — in particular, catching previously missed `__tests__` and `__docs__` directories.

```diff
- npm notice package size: 4.4 MB
- npm notice unpacked size: 23.7 MB
- npm notice total files: 4533
+ npm notice package size: 4.4 MB
+ npm notice unpacked size: 23.7 MB
+ npm notice total files: 4533
```

NOTE: `"files"` or `.npmignore` — one or the other!
- Having `.npmignore` at the package root does not behave(!). s, having `"files"` as one source of truth is better and safer. See npm/cli#6221.

Changelog: [Internal]

Differential Revision: D73185321
Summary:
Enables us to simplify exclude patterns in `package.json#files`.

Changelog: [Internal]

Differential Revision: D73185320
Summary:
Follows facebook#50784. Having any `.npmignore` files is a gotcha — remove and replace with `package.json#files`.

Changelog: [Internal]

Differential Revision: D73193257
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Apr 17, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D73193257

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 16a61bf.

uffoltzl pushed a commit to uffoltzl/react-native that referenced this pull request Apr 18, 2025
…#50786)

Summary:
Pull Request resolved: facebook#50786

Follows facebook#50784. Having any `.npmignore` files is a gotcha — remove and replace with `package.json#files`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D73193257

fbshipit-source-id: de715d74195e4f53c817c11f244a61c79b8ce5bc
@huntie huntie deleted the export-D73193257 branch April 22, 2025 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants