diff --git a/e2e/nx-firebase-e2e/tests/nx-firebase.spec.ts b/e2e/nx-firebase-e2e/tests/nx-firebase.spec.ts index b93ae0a..5d7a37d 100644 --- a/e2e/nx-firebase-e2e/tests/nx-firebase.spec.ts +++ b/e2e/nx-firebase-e2e/tests/nx-firebase.spec.ts @@ -161,11 +161,18 @@ describe('nx-firebase e2e', () => { packageJson.devDependencies['firebase-functions-test'], ).toBeDefined() expect(packageJson.devDependencies['firebase-tools']).toBeDefined() + //SM: Mar'24: our plugin init generator now only add @nx/node expect(packageJson.devDependencies['@nx/node']).toBeDefined() - expect(packageJson.devDependencies['@nx/esbuild']).toBeDefined() - expect(packageJson.devDependencies['@nx/linter']).toBeDefined() - expect(packageJson.devDependencies['@nx/js']).toBeDefined() - expect(packageJson.devDependencies['@nx/jest']).toBeDefined() + // @nx/node package brings in @nx/js + // https://github.com/nrwl/nx/blob/fb90767af87c77955f8b8b7cace7cd0b5e3be27d/packages/node/package.json#L32 + // not in 16.8.0 it doesnt + expect(packageJson.devDependencies['@nx/js']).not.toBeDefined() + // @nx/jest, @nx/eslint are package.json dependencies in later versions of Nx + expect(packageJson.devDependencies['@nx/eslint']).not.toBeDefined() + expect(packageJson.devDependencies['@nx/jest']).not.toBeDefined() + + //SM: Mar'24: esbuild is added by @nx/node when functions are generated, depending on bundler option + expect(packageJson.devDependencies['@nx/esbuild']).not.toBeDefined() }) }) @@ -264,6 +271,19 @@ describe('nx-firebase e2e', () => { validateProjectConfig(appData) + // // should still not see any nx/node related packages when generating an app + // // since we dont run the node generator in app generator + // const packageJson = readJson(`package.json`) + // // running the application generator runs the init generator, which adds @nx/node and these dependencies of @nx/node + // // SM: not in 16.8.0 it doesnt + // expect(packageJson.devDependencies['@nx/linter']).toBeDefined() + // expect(packageJson.devDependencies['@nx/eslint']).not.toBeDefined() + // // jest and js IS added somehow for 16.8.0 + // expect(packageJson.devDependencies['@nx/jest']).toBeDefined() + // expect(packageJson.devDependencies['@nx/js']).toBeDefined() + // //SM: Mar'24: esbuild is added by @nx/node when functions are generated, depending on bundler option + // expect(packageJson.devDependencies['@nx/esbuild']).not.toBeDefined() + // cleanup - app await cleanAppAsync(appData) }) @@ -376,6 +396,14 @@ describe('nx-firebase e2e', () => { validateFunctionConfig(functionData, appData) + // const packageJson = readJson(`package.json`) + // // running the function generator runs the node apo generator, which adds these dependencies of @nx/node + // expect(packageJson.devDependencies['@nx/eslint']).toBeDefined() + // expect(packageJson.devDependencies['@nx/jest']).toBeDefined() + // expect(packageJson.devDependencies['@nx/js']).toBeDefined() + // //SM: Mar'24: esbuild is added by @nx/node when functions are generated, depending on bundler option + // expect(packageJson.devDependencies['@nx/esbuild']).toBeDefined() + // cleanup await cleanFunctionAsync(functionData) await cleanAppAsync(appData)