Vocabulary: [RFC] Move vocabulary packages to a monorepo

Created on 25 Aug 2020  路  3Comments  路  Source: creativecommons/vocabulary

Monorepo RFC

We should move all vocabulary packages into a monorepo, facilitated by lerna. @dhruvkb pointed out several good reasons to do so:

  • The three repos have a strong dependency chain so storing them together makes some implicit sense
  • The relation between a 2020.8.1 release of Fonts and a 2020.8.5 release of Vocabulary is arbitrary
  • The release process is long, convoluted, and involves releasing each project manually, in line from - Fonts to Vue Vocabulary
  • Documentation is scattered across 3 repos, making it harder to create internal links
    Unified documentation & landing pages would either be in one of the repos (making it the main one) or a new repo (adding to the confusion) @nimishnb
  • Lerna is a wonderful tool

In addition:

  • Solves having to keep config/code standards/etc. in sync
  • Lets us write a single, unified test suite
  • Ultimately less confusing for users and staff (one place to find all things vocabulary)
  • Easier to share code between packages

Migration guide (work in progress)

This includes all of the necessary work to unify the three repositories into one.

Code changes

1. File restructuring

  • [ ] Move each existing repo into a root packages/repo-name directory
  • [ ] Create new storybook package (will eventually move all stories there)
  • [ ] Move and merge all configuration files into the project root
  • [ ] Move all tests to the project root in single tests/ directory
  • [ ] Create a root /docker directory and subdirectories

    • [ ] Fix file paths in docker files as needed

    • [ ] Rewrite docker files as needed (some discussion here)

  • [ ] Implement prettier (seems like a good time to do it [maybe wait to format all files])

2. Lerna Setup

  • [ ] Run npx lerna init
  • [ ] Install lerna as a root dev dependency (to avoid requiring a global install from users)
  • [ ] Write any setup scripts / npm scripts we want to alias lerna scripts. Examples:

    • [ ] npm run setup for lerna bootstrap (totally optional)

    • [ ] A npm run dev or npm run dev:all that runs all packages concurrently

  • [ ] Move all shared deps into the root package.json

Repo Changes

  • [ ] Migrate issues from secondary repos to main vocabulary repo
  • [ ] Redirect secondary domains to https://cc-vocabulary.netlify.app/
  • [ ] Create new labels for projects 'package/fonts,package/vocabulary`, etc.

    • [ ] could also handle with issue prefixes [fonts] Issue description, [vue] Issue description

  • [ ] Write new ci/cd that publishes all packages at once
  • [ ] Implement release notes drafter with a section for each package (we can skip the granular "improvement", "bugfix", etc. sections for now in favor of grouping by package)

Most helpful comment

@dhruvkb That makes sense to me, but also leans me towards prefixing issues with the relevant package name, so it's clear what package was updated by what change in the release notes.

All 3 comments

Implement release notes drafter with a section for each package (we can skip the granular "improvement", "bugfix", etc. sections for now in favor of grouping by package

The inverse, grouping by improvements regardless of package, seems better as not all packages receive improvements at the same time and generally the same improvements will be duplicated across Vocabulary and Vue Vocabulary.

@dhruvkb That makes sense to me, but also leans me towards prefixing issues with the relevant package name, so it's clear what package was updated by what change in the release notes.

@zackkrida can we close this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nimishbongale picture nimishbongale  路  4Comments

zackkrida picture zackkrida  路  5Comments

zackkrida picture zackkrida  路  6Comments

zackkrida picture zackkrida  路  3Comments

Dhruvi16 picture Dhruvi16  路  4Comments