Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>My monorepoNew to Visual Studio Code? Get it now.

My monorepo

Roozendaal Online

|
16 installs
| (0) | Free
Extension to update the vscode settings to filter on the folders you own
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

My monorepo

Working in a monorepo, sometimes with many teams, is a fanatastic experience. But, finding your way in the codebase can be a bit of a challenge. This is where this tool comes in. It will help you find the code you teams owns.

This first release of the extension is tailored to the needs of my company. But, I will try to make it more generic in the future. Feel free to open an issue if you have any suggestions.

Features

From the contents of the code-owners file, the extension will filter the files in the explorer and show only the files that are owned by the team you are currently working in. It will also show the team that owns the file in the status bar. If you click on the team name in the status bar, you will be able to change the team that is used as a filter. The extension will also show the team that owns the file in the hover tooltip.

Settings

  • exclude: an array of files/folders to always exclude from the tree view
  • teamnames: an array of team names that can be toggled between in the status bar
  • ignore: an array of files/folders to ignore when parsing the structure of your monorepo (for efficiency reasons). The node_modules folders is a good candidate...
  • enabled: enable/disable the filter. If disabled, all files will be shown, excluding the files listed in the exclude setting. If enabled, the filter will be applied using the selected team in the status bar.
  • filename: the name of the code-owners file. Default is code-owners.json. This specifies the base name only; the file is expected to be in the root of the workspace.

Code-owners file

The format of the code owners file that is supported is the following:

{
  "teams": {
    "TeamAwesome": {
      "productOwner": "someone@yourcompany.online",
      "functionalMailbox": "TeamAwesome@yourcompany.online",
      "members": [
        "awesome.dude@yourcompany.online",
        "awesome.dame@yourcompany.online",
        "awesome.x@yourcompany.online"
      ],
      "paths": [
        "src/teamawesome",
        "src/teamawesometoo"
      ]
    },
    "AnotherTeamAwesome": {
      "productOwner": "anothersomeone@yourcompany.online",
      "functionalMailbox": "AnotherTeamAwesome@yourcompany.online",
      "members": [
        "anotherawesome.dude@yourcompany.online",
        "anotherawesome.dame@yourcompany.online",
        "anotherawesome.x@yourcompany.online"
      ],
      "paths": [
        "src/anotherteamawesome",
        "src/anotherteamawesometoo"
      ]
    }
  }
}

Known issues

If your monorepo is really large, and your teams owns a lot of different files and folders, the list of excluded files/folders from the file explorer is large, you might run into an issue in vscode with that.

There is an open issue that you can track here: https://github.com/microsoft/vscode/issues/869

It's been open a long time now :-| If any other extension is reporting an issue with an error message 'spawn ENAMETOOLONG', set the filter to All and reload the extension, or restart vscode. After that you can set the filter to the team you want to work with. This happens only when you have a lot of files/folders excluded from the explorer.

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft