simondotm / nx-firebase

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

Patch for use with nx 16.3.2 #119

Closed anandsathe67 closed 1 year ago

anandsathe67 commented 1 year ago

Ran into compilation issues when I upgraded to nx 16.3.2 (There is a warning that it might happen for anyone using nx > 13.9.0). The errors are due to some package renaming nx has done (@nrwl/ packages have moved to @nx/) See below for the patch I created to fix this issue FYI for anyone running into the same problem @simondotm FYI

Today I used patch-package to patch @simondotm/nx-firebase@1.0.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/@simondotm/nx-firebase/src/executors/build/build.js b/node_modules/@simondotm/nx-firebase/src/executors/build/build.js
index 10235be..79a8bab 100644
--- a/node_modules/@simondotm/nx-firebase/src/executors/build/build.js
+++ b/node_modules/@simondotm/nx-firebase/src/executors/build/build.js
@@ -4,7 +4,7 @@ exports.runExecutor = void 0;
 const tslib_1 = require("tslib");
 require("../../utils/e2ePatch"); // intentional side effects
 const devkit_1 = require("@nrwl/devkit");
-const tsc_impl_1 = require("@nrwl/js/src/executors/tsc/tsc.impl");
+const tsc_impl_1 = require("@nx/js/src/executors/tsc/tsc.impl");
 const lib_1 = require("./lib");
 const utils_1 = require("../../utils");
 /**
diff --git a/node_modules/@simondotm/nx-firebase/src/executors/build/lib/get-dependencies.js b/node_modules/@simondotm/nx-firebase/src/executors/build/lib/get-dependencies.js
index b1e94f5..76f5416 100644
--- a/node_modules/@simondotm/nx-firebase/src/executors/build/lib/get-dependencies.js
+++ b/node_modules/@simondotm/nx-firebase/src/executors/build/lib/get-dependencies.js
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
 exports.getFirebaseDependencies = void 0;
 const tslib_1 = require("tslib");
 const devkit_1 = require("@nrwl/devkit");
-const buildable_libs_utils_1 = require("@nrwl/workspace/src/utilities/buildable-libs-utils");
+const buildable_libs_utils_1 = require("@nx/workspace/src/utilities/buildable-libs-utils");
 function getFirebaseDependencies(context) {
     return tslib_1.__awaiter(this, void 0, void 0, function* () {
         devkit_1.logger.log(`- Processing dependencies for firebase functions app '${context.projectName}':`);

This issue body was partially generated by patch-package.

hendrickson-tyler commented 1 year ago

Just to mention here too: I've been using version 1.1.0-beta.0 of the plugin with Nx 16.3.2 without any problems, so that is also an option.

simondotm commented 1 year ago

Yes, this was fixed in v1.1.0-beta.0