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
github actions seems to be the obvious choice
should report progress clearly
should provide ability to pinpoint an issue easily
each plugin is run separately using the github actions build matrix:
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:
main
and notmaster
main
branch within plugin areapackages/firestore-plugin
:lib
: contains the libraryintegration
: contains the integration apps and/or testsdocs
?: we could publish per plugin docs too or just use markdowndependabot
or equivalent for automatic dependency update PRsprettier
main
by default only when libs changelerna
apparently does this well, but not sure what other approaches there arenpx lerna import --preserve-commit ....
to do this (unless there is a better tool?)Nice to have
Reference examples