Skip to content

Conversation

huntie
Copy link
Member

@huntie huntie commented Apr 17, 2025

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.

- 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 or — one or the other!

Having at the package root does not behave(!). Having as one source of truth is better and safer. See npm/cli#6221.

Changelog: [Internal]

Differential Revision: D73185321

huntie added 2 commits April 17, 2025 06:10
…s directories

Summary:
Migrates us from several  files to , for the main  package.

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

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

Changelog: [Internal]

Differential Revision: D73185321
@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 fb-exported labels Apr 17, 2025
@facebook-github-bot
Copy link
Contributor

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

huntie added a commit to huntie/react-native that referenced this pull request Apr 17, 2025
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 pushed a commit that referenced this pull request Apr 17, 2025
Summary:
Pull Request resolved: #50786

Follows #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
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Apr 17, 2025
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in d1cf584.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @huntie in d1cf584

When will my fix make it into a release? | How to file a pick request?

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

Summary:
Pull Request resolved: facebook#50784

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(!). Having `"files"` as one source of truth is better and safer. See npm/cli#6221.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D73185321

fbshipit-source-id: 429c9fec4f447d63440a38bb8e3f3ce3bd155414
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-D73185321 branch April 22, 2025 10:26
huntie added a commit to huntie/react-native that referenced this pull request May 22, 2025
Summary:
Alternative to facebook#50784.

`__mocks__` (and other underscored dirs) are correctly excluded from our npm package via `package.json#files`. But in this instance, this is a source file for the `jest/` directory (Jest preset within `react-native`), and should be included — fix by relocating.

Changelog:
[General][Fixed] - Fix missing RefreshControlMock source in Jest preset

Reviewed By: rshest

Differential Revision: D75215731
huntie added a commit to huntie/react-native that referenced this pull request May 22, 2025
Summary:
Pull Request resolved: facebook#51530

Alternative to facebook#50784.

`__mocks__` (and other underscored dirs) are correctly excluded from our npm package via `package.json#files`. But in this instance, this is a source file for the `jest/` directory (Jest preset within `react-native`), and should be included — fix by relocating.

Changelog:
[General][Fixed] - Fix missing RefreshControlMock source in Jest preset

Reviewed By: rshest

Differential Revision: D75215731
facebook-github-bot pushed a commit that referenced this pull request May 22, 2025
Summary:
Pull Request resolved: #51530

Alternative to #50784.

`__mocks__` (and other underscored dirs) are correctly excluded from our npm package via `package.json#files`. But in this instance, this is a source file for the `jest/` directory (Jest preset within `react-native`), and should be included — fix by relocating.

Changelog:
[General][Fixed] - Fix missing RefreshControlMock source in Jest preset

Reviewed By: rshest

Differential Revision: D75215731

fbshipit-source-id: 1240344c4236288f31b16513f4df16766ad1e571
mdjastrzebski pushed a commit to mdjastrzebski/react-native that referenced this pull request Jun 11, 2025
Summary:
Pull Request resolved: facebook#51530

Alternative to facebook#50784.

`__mocks__` (and other underscored dirs) are correctly excluded from our npm package via `package.json#files`. But in this instance, this is a source file for the `jest/` directory (Jest preset within `react-native`), and should be included — fix by relocating.

Changelog:
[General][Fixed] - Fix missing RefreshControlMock source in Jest preset

Reviewed By: rshest

Differential Revision: D75215731

fbshipit-source-id: 1240344c4236288f31b16513f4df16766ad1e571

# Conflicts:
#	packages/react-native/jest/setup.js
fabriziocucci pushed a commit that referenced this pull request Jun 23, 2025
Summary:
Pull Request resolved: #51530

Alternative to #50784.

`__mocks__` (and other underscored dirs) are correctly excluded from our npm package via `package.json#files`. But in this instance, this is a source file for the `jest/` directory (Jest preset within `react-native`), and should be included — fix by relocating.

Changelog:
[General][Fixed] - Fix missing RefreshControlMock source in Jest preset

Reviewed By: rshest

Differential Revision: D75215731

fbshipit-source-id: 1240344c4236288f31b16513f4df16766ad1e571
huntie added a commit to huntie/react-native that referenced this pull request Jul 21, 2025
Summary: Changelog: [Internal] (Follow up to keep facebook#50784 non-breaking)

Differential Revision: D78662770
facebook-github-bot pushed a commit that referenced this pull request Jul 21, 2025
Summary:
Pull Request resolved: #52735

Changelog: [Internal] (Follow up to keep #50784 non-breaking)

Reviewed By: cortinico

Differential Revision: D78662770

fbshipit-source-id: 03d931c904c0092481dbd03e8420244639305610
react-native-bot pushed a commit that referenced this pull request Jul 28, 2025
Summary:
Pull Request resolved: #52735

Changelog: [Internal] (Follow up to keep #50784 non-breaking)

Reviewed By: cortinico

Differential Revision: D78662770

fbshipit-source-id: 03d931c904c0092481dbd03e8420244639305610
kikoso pushed a commit to kikoso/react-native that referenced this pull request Aug 26, 2025
Summary:
Pull Request resolved: facebook#52735

Changelog: [Internal] (Follow up to keep facebook#50784 non-breaking)

Reviewed By: cortinico

Differential Revision: D78662770

fbshipit-source-id: 03d931c904c0092481dbd03e8420244639305610
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.

3 participants