最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

yarnpkg - How to automatically change all ^ package.json dependencies to be exact? - Stack Overflow

programmeradmin5浏览0评论

What command can I run to change all the versions in my package.json to be the exact installed versions mentioned in the yarn.lock?

My package.json has unlocked versions like "^3". It has lines like:

  "dependencies": {
    "next": "15.2.3",
    "react": "^19.0.0",
    "react-dom": "^19.0.0"
  },
  "devDependencies": {
    "@chromatic-com/storybook": "^3",  
    "eslint": "9.17.0",
    "storybook": "^8.6.8",
    "tailwindcss": "^4",
    "typescript": "^5"
  },

I thought I'd be able to run something like yarn upgrade --exact or yarn install --exact, but those were wrong.

I didn't see the answer at How can I update each dependency in package.json to the latest version?

发布评论

评论列表(0)

  1. 暂无评论