Closed zachwolf closed 4 years ago
I donβt understand how npm outdated canβt find the dependencies? Iβm pretty sure they end up in the root package.json, not nested inside of react-scripts or anything like that.
You're correct, they do @heyimalex. I'm not quite following the OP. These dependencies are controlled by the developer within their application.
Ahh, sorry, let me clarify.
When running npm outdated
inside of create-react-app
's monorepo, the dependencies are not discoverable. E.g.:
$ cd create-react-app
$ lerna exec npm outdated
I'm using npm outdated
only an example. My intention isn't to focus on that functionality specifically.
My end goal is for CRA contributors to be able to use the tools built for the JavaScript ecosystem.
No longer an issue with 3.3.0
π€
Is your proposal related to a problem?
The npm ecosystem has the expectation that
package.json
contains information for its package. Currently, when updating dependencies, it's one more thing to remember when TypeScript dependencies are maintained inside ofcreateReactApp.js
. This makes tools likenpm outdated
not able to find these dependencies.Describe the solution you'd like
What has worked well for my team's project, is to add another package that can maintain and export its own dependencies. For example:
Then, in
createReactApp.js
:Describe alternatives you've considered
I'm missing context around create-react-app's roadmap. Forgive me if this issue is already solved with the recent and upcoming changes around how templates are maintained. I see that
cra-template-typescript/template.json
might have already solved the problem. However, the TypeScript dependency check is still in place increateReactApp.js
.