simondotm / nx-firebase

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

Functions generator always uses @nx/node@16 even if the workspace version is newer #191

Closed jaytavares closed 3 months ago

jaytavares commented 4 months ago

The nx-firebase package has a dependency on @nx/node@^16.6.0. In workspaces with an installed version of @nx/node > 16, this results in older-style code generated by @simondotm/nx-firebase:function.

As an example, I'm running Nx@18 and generating a function project will add the dependency @nx/linter to the workspace's package.json. This is error since the package was replaced with @nx/eslint.

I'm not sure if this idea has been proposed before but it might be helpful to change the dependency on @nx/node to a peer dependency so that we use whatever version that's already installed in the user's workspace.

I've added PR #190 in case this sounds good.

simondotm commented 3 months ago

@jaytavares v2.2.0 is now available, which has our fixes in it. Lets see if it does the trick 👍