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: react-native/metro bundler ignored warning of subpath package.json #1059

Merged
merged 2 commits into from Feb 13, 2022

Conversation

numandev1
Copy link
Contributor

@iiroj
Copy link
Member

iiroj commented Nov 27, 2021

@nomi9995 can you explain what this means?

@codecov
Copy link

codecov bot commented Nov 28, 2021

Codecov Report

Merging #1059 (82c0dfa) into master (9a14e92) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1059   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines          653       653           
  Branches       173       173           
=========================================
  Hits           653       653           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a14e92...82c0dfa. Read the comment docs.

@numandev1
Copy link
Contributor Author

@iiroj package.json should be defined in exports to be available for import.
you can see more detail in this thread react-native-community/cli#1168 (comment)

@okonet
Copy link
Collaborator

okonet commented Nov 29, 2021

After reading the original issue, I don't see how this is relevant for lint-staged. Can you explain please why this needs to be fixed here?

@numandev1
Copy link
Contributor Author

@okonet actually metro bundler needs to access package.json for export packages. when we install this library into react-native project then the metro give us a warning because the metro is unable to get package.json of this package

@okonet
Copy link
Collaborator

okonet commented Nov 29, 2021

But why would you want to export anything related to lint-staged to production? This package is meant to be used as a devDependency only. I still don't understand the problem you're trying to solve.

@numandev1
Copy link
Contributor Author

package.json Outdated Show resolved Hide resolved
@numandev1 numandev1 force-pushed the fix/react-native-metro-warning branch from 6acaed1 to cf1cebb Compare February 13, 2022 14:36
@iiroj iiroj merged commit 3395150 into lint-staged:master Feb 13, 2022
@numandev1 numandev1 deleted the fix/react-native-metro-warning branch February 13, 2022 16:54
@github-actions
Copy link
Contributor

🎉 This PR is included in version 12.3.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nnnnoel
Copy link

nnnnoel commented Apr 13, 2022

Cannot run lint-staged on yarn berry when pnpEnableEsmLoader is false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 participants