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

Bit snap followed by bit reset clears the forkedFrom entry to the bitmap file

sbland opened this issue · comments

Describe the bug

Bit snap followed by bit reset clears the forkedFrom entry to the bitmap file

Steps to Reproduce

  1. Use bit snap on a forked component
  2. Use bit reset on the component
  3. The following part of the components json in .bitmap is cleared
"teambit.component/forking": {
                "forkedFrom": {
                    "scope": "myscope",
                    "name": "my-component",
                    "version": "0.0.3"
                }
            },

Expected Behavior

Should keep the forkedFrom info

Specifications

  • Bit version: 1.6.62
  • Workspace type: harmony
  • Node version:v18.19.1
  • npm / yarn version:10.2.4
  • Platform: ubuntu

Thanks, we will check it
@davidfirst FYI

I'm unable to reproduce. See screenshot attached.

Screenshot 2024-04-29 at 10 44 47 AM

@sbland , maybe you're using a very old version of bit?
This was handled a while ago. Basically what happens is that when you snap, the .bitmap changes are saved into .bit/staged-config/main.json, and then when running bit reset, bit restore them back from that file.