teambit / bit

A build system for development of composable software.

Home Page:https://bit.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[WORKSPACE] How to move my package.json/ lock deps to bit workspace ?

MatthD opened this issue · comments

Description

I want to have bit managing my existing repo package.json dependencies so that I can remove then from my package.json (and benefit from workspace.json , dev deps detections ..)

Specifications

  • Bit version: 1.6.126
  • Node version: 20.11.0
  • npm / yarn version: 10.2.4
  • Platform: Mac0s 14.4.1

Context and additional information

Running bun install will trigger pnpm automatically and install the deps I have so that it's great, but it does not move them to the workspace file and I cannot get rid of package.json. and package.lock
But what I need is to move them to workspace.jsonc but with the specific version they have inside the package-lock.json

Should I manually copy them ? I mean doing that I will not benefit of the auto detection + I cann do it via a command but have >100 deps.

Maybe there is a way i did not found

you can simply copy-paste the list of deps to workspace.jsonc.
you can even keep the deps in package.json, as when you run bit install, bit will read deps from package.json and add them to the list of deps to install (in case of conflict with workspace.jsonc, the version from workspace.jsonc wins)