Skip to content

Extract non-UI modules from the `shared` package into a new workspaces

Created by: valerybugakov

Problem

The shared workspace contains utility functions, types, polyfills, etc., which is not a part of the UI kit. These modules should be moved into the utils package and other new packages which are not yet created: e.g., api for GraphQL client and type generators, etc. Each package should have a clear purpose.

That will ensure that we don't have a circular dependency between wildcard and shared packages and will help us to keep workspaces maintainable.

This issue is based on the Frontend SDK isolation RFC.

Success criteria

  1. Modules from the shared workspace are grouped semantically without circular dependencies between them.
  2. The required work to extract them into standalone workspaces is estimated.
  3. Grouped modules are extracted into a standalone workspace, and imports in the consumer package are updated. See here a workspace creation example PR.

Plan

  1. Let's scope packages one by one starting from the most specialized groups (utils package is our last resort) and use this issue as a tracking one.
  2. Each step will be approved from the Sourcegraph side before going to the next phase.
  3. Let's create an issue for each new possible group of modules with labels attached to this issue.