simondotm / nx-firebase

Firebase plugin for Nx Monorepos
https://www.npmjs.com/package/@simondotm/nx-firebase
MIT License
175 stars 31 forks source link

Regress nx version to 13.10.6 #90

Closed simondotm closed 1 year ago

simondotm commented 1 year ago

Decided that we may need to release a plugin version for each major release of Nx, so this PR builds the plugin at Nx 13.10.6 which will be the minimum Nx version for new releases.

Various reasons for this:

  1. It is not unclear if we can maintain backwards compatibility for the plugin across Nx version, because the API changes so often. The only option we have is to release a plugin version to match each Nx version.
  2. Each new Nx release tends to upgrade internal dependencies - tsc, tslib, Angular etc. and other projects may not be ready to take Angular 14/Angular 15 etc.
  3. If we create branches for different plugin versions, we can patch if necessary.

The compat:test tool now runs a test matrix across Nx versions and Plugin versions to indicate compatibility from Nx 13.10.6 onwards.

Also, the peerDeps in the plugin are now minimized to just:

  "peerDependencies": {
    "nx": ">= 13.10.6",
    "@nrwl/workspace": ">= 13.10.6"
  }

Which are the two core dependencies for every Nx workspace.

It is the plugin initialiser that will now add the Nx plugins it needs, using the version of the host workspace:

 '@nrwl/devkit'
 '@nrwl/linter'
 '@nrwl/jest'
 '@nrwl/node'
 '@nrwl/js'