Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC - Create a monorepo for NGXS Labs #1

Open
markwhitfeld opened this issue Sep 27, 2021 · 1 comment
Open

RFC - Create a monorepo for NGXS Labs #1

markwhitfeld opened this issue Sep 27, 2021 · 1 comment

Comments

@markwhitfeld
Copy link
Member

markwhitfeld commented Sep 27, 2021

NGXS Labs Monorepo RFC

Background

NGXS labs has been a great place for plugin development, but we have seen issues where many authors are not familiar with publishing packages and don't keep dependencies up to date as needed. Sometimes the authors contribute and then disappear. We would like to create a monorepo to support most of the fundamentals of managing a plugin without the headache of maintenance.

Proposal

(Proposed by @markwhitfeld )

To create a monorepo for the plugins with the following requirements:

  • NX seems like a very good option for the overall workspace
    • buildable & publishable libs
    • cloud cache
    • good tooling support & plugins
    • schematics
    • apparently the npm preset is the best one to use for our needs
    • strict types should be enabled by default for libs
  • Primary branch should be called main and not master
  • Lib author/team rights management
    • leverage github CODEOWNERS
    • auto-assign issues/PRs
    • auto-label issues/PRs too?
    • author has rights to merge to main branch within plugin area
    • proposed folder structure:
      • packages/firestore-plugin:
        • lib: contains the library
        • integration: contains the integration apps and/or tests
        • docs?: we could publish per plugin docs too or just use markdown
  • Dependency management
    • shared dependency management for most libs
    • option for independent dependency management as needed for specific libs
      • for example, for integration apps, or for libs that need more work to align
      • yarn or lerna offers the ability to have independent versioning for specific folders
    • dependabot or equivalent for automatic dependency update PRs
  • CI / CD pipelines set up
  • Formatting
    • most likely prettier
    • enable es5 trailing comma format
    • to run as part of pre-commit hook
    • to run as part of PR checks
  • Linting
    • eslint
    • to run as part of PR checks
  • Commit format
    • semantic commits
    • check to run as part of pre-commit hook
    • to run as part of PR checks
  • Versioning
  • Publishing
    • auto-publishing from main by default only when libs change
      • lerna apparently does this well, but not sure what other approaches there are
    • lib could opt to rather do a GitHub action approval step before publish
  • Issue templates (just like NGXS)
  • PR management
    • bundle change reporting
    • coverage change reporting
  • Bundle size management
  • Reports
    • code coverage
    • bundle size history? (not sure if anything does this)
    • sonar-cube or equivalent
    • suggestions in comments please?
  • Integration app testing
  • Import existing repos
    • It would be great to import existing repos with commit history
    • Could use npx lerna import --preserve-commit .... to do this (unless there is a better tool?)

Nice to have

  • Publish docs for each plugin
    • could be shared docs site
    • could just be markdown in the repo
  • Could leverage other CI offerings to run the CI as well as a double check (CircleCI/Azure Devops/etc)

Reference examples

@LayZeeDK
Copy link

Notion to use main instead of master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants