teambit / bit

A build system for development of composable software.
https://bit.dev
Other
17.82k stars 924 forks source link

fix(local-only), do not auto-tag/snap local-only, block export when some ids are local-only #9059

Closed davidfirst closed 1 month ago

davidfirst commented 1 month ago

also, remove the --include-local-only flag.

This is related to the recently-merged local-only feature: https://github.com/teambit/bit/pull/9057. The original implementation has two issues:

  1. It's possible to snap/tag local-only components with --include-local-only flag. Then, the export filters them out. However, what if it has been unset later on, snapped again and exported. The remote doesn't have part of the history which was local-only back then.
  2. when on a lane and some local-only components were snapped with the flag above, the export sends a lane object to the remote with some components that exist only locally.

This PR handles the issues above by the follwoing:

  1. removes the --include-local-only flag, so it's impossible to snap/tag local-only components.
  2. block bit local-only set from running on staged components.
  3. just in case somehow a component was managed to be local-only when it's staged, bit export blocks the export and suggests running bit reset or bit local-only unset.