From ceee1dd1943affa5b654ae83ce6b99970a4224ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leosvel=20P=C3=A9rez=20Espinosa?= Date: Thu, 4 May 2023 17:31:07 +0100 Subject: [PATCH] fix(nest): fix invalid nestjs versions --- packages/nest/migrations.json | 8 ++++---- packages/nest/src/generators/init/init.spec.ts | 8 ++++++-- packages/nest/src/generators/init/lib/add-dependencies.ts | 3 ++- packages/nest/src/utils/versions.ts | 3 ++- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/packages/nest/migrations.json b/packages/nest/migrations.json index 90af302a5cf42..a701f32a3443e 100644 --- a/packages/nest/migrations.json +++ b/packages/nest/migrations.json @@ -47,15 +47,15 @@ "version": "16.1.0-beta.0", "packages": { "@nestjs/common": { - "version": "^9.1.0", + "version": "^9.1.1", "alwaysAddToPackageJson": false }, "@nestjs/core": { - "version": "^9.1.0", + "version": "^9.1.1", "alwaysAddToPackageJson": false }, "@nestjs/platform-express": { - "version": "^9.1.0", + "version": "^9.1.1", "alwaysAddToPackageJson": false }, "@nestjs/schematics": { @@ -67,7 +67,7 @@ "alwaysAddToPackageJson": false }, "@nestjs/testing": { - "version": "^9.1.0", + "version": "^9.1.1", "alwaysAddToPackageJson": false } } diff --git a/packages/nest/src/generators/init/init.spec.ts b/packages/nest/src/generators/init/init.spec.ts index 0392dabc66e2b..684b6e76c6cae 100644 --- a/packages/nest/src/generators/init/init.spec.ts +++ b/packages/nest/src/generators/init/init.spec.ts @@ -1,7 +1,11 @@ import type { Tree } from '@nx/devkit'; import * as devkit from '@nx/devkit'; import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; -import { nestJsVersion, nxVersion } from '../../utils/versions'; +import { + nestJsSchematicsVersion, + nestJsVersion, + nxVersion, +} from '../../utils/versions'; import { initGenerator } from './init'; describe('init generator', () => { @@ -26,7 +30,7 @@ describe('init generator', () => { expect(packageJson.dependencies['tslib']).toBeDefined(); expect(packageJson.dependencies['@nx/nest']).toBeUndefined(); expect(packageJson.devDependencies['@nestjs/schematics']).toBe( - nestJsVersion + nestJsSchematicsVersion ); expect(packageJson.devDependencies['@nestjs/testing']).toBe(nestJsVersion); expect(packageJson.devDependencies['@nx/nest']).toBe(nxVersion); diff --git a/packages/nest/src/generators/init/lib/add-dependencies.ts b/packages/nest/src/generators/init/lib/add-dependencies.ts index 793c088165497..003653111da18 100644 --- a/packages/nest/src/generators/init/lib/add-dependencies.ts +++ b/packages/nest/src/generators/init/lib/add-dependencies.ts @@ -1,6 +1,7 @@ import type { GeneratorCallback, Tree } from '@nx/devkit'; import { addDependenciesToPackageJson } from '@nx/devkit'; import { + nestJsSchematicsVersion, nestJsVersion, nxVersion, reflectMetadataVersion, @@ -20,7 +21,7 @@ export function addDependencies(tree: Tree): GeneratorCallback { tslib: tsLibVersion, }, { - '@nestjs/schematics': nestJsVersion, + '@nestjs/schematics': nestJsSchematicsVersion, '@nestjs/testing': nestJsVersion, '@nx/nest': nxVersion, } diff --git a/packages/nest/src/utils/versions.ts b/packages/nest/src/utils/versions.ts index 6d5f85e100dcb..32aa9bc19c6fa 100644 --- a/packages/nest/src/utils/versions.ts +++ b/packages/nest/src/utils/versions.ts @@ -1,6 +1,7 @@ export const nxVersion = require('../../package.json').version; -export const nestJsVersion = '^9.1.0'; +export const nestJsVersion = '^9.1.1'; +export const nestJsSchematicsVersion = '^9.1.0'; export const rxjsVersion = '^7.8.0'; export const reflectMetadataVersion = '^0.1.13'; export const tsLibVersion = '^2.3.0';