TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How do you maintain JavaScript web apps?

4 点作者 rjhackin超过 2 年前
Lets say I have a large code base built using React and other needed libraries. I have different repositories based on the functional breakdown. Each repo has its own package.json. With the way dependent packages release newer versions, its really hard to maintain dependent packages in turn resulting in audit issues and adding newer functionalities. Also, updating newer versions of React becomes a pain. So how do you all maintain javascript webapps? Any best practices or pointers to follow.

3 条评论

jamesfinlayson超过 2 年前
I&#x27;ve always tried to use monorepos to avoid different repos getting out of date and to avoid managing which versions work with which versions.<p>Updating dependencies is harder with a monorepo but for that I&#x27;ve tried to have as many unit and e2e tests as possible to try and make it a case of bump the version and assume no test failures means it worked (of course I do manual testing but if the tests worked it&#x27;s likely that any problems will be small).
gvkhna超过 2 年前
I’m curious about this too but there’s really only a few options. Npm update, etc, is the riskiest thing I do at this point, I’m extremely fed up with the state of packages and cross-compatibility.<p>I merely cross my fingers, if something fails, force peer-legacy install and hope for the best etc.<p>The only other options are:<p>- Don’t update, and when you do, update to an already old version not the latest<p>- Carefully scrutinize released updates and evaluate potential for breakages<p>I say this because I don’t primarily see any other options but hope we can get some more insight in the comments!
joshxyz超过 2 年前
Only do it if it brings business value. Start thinking that way.