Skip to content

Commit

Permalink
fix(nest): fix invalid nestjs versions
Browse files Browse the repository at this point in the history
  • Loading branch information
leosvelperez committed May 4, 2023
1 parent 05ee74e commit ceee1dd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
8 changes: 4 additions & 4 deletions packages/nest/migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -67,7 +67,7 @@
"alwaysAddToPackageJson": false
},
"@nestjs/testing": {
"version": "^9.1.0",
"version": "^9.1.1",
"alwaysAddToPackageJson": false
}
}
Expand Down
8 changes: 6 additions & 2 deletions packages/nest/src/generators/init/init.spec.ts
Original file line number Diff line number Diff line change
@@ -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', () => {
Expand All @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion packages/nest/src/generators/init/lib/add-dependencies.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { GeneratorCallback, Tree } from '@nx/devkit';
import { addDependenciesToPackageJson } from '@nx/devkit';
import {
nestJsSchematicsVersion,
nestJsVersion,
nxVersion,
reflectMetadataVersion,
Expand All @@ -20,7 +21,7 @@ export function addDependencies(tree: Tree): GeneratorCallback {
tslib: tsLibVersion,
},
{
'@nestjs/schematics': nestJsVersion,
'@nestjs/schematics': nestJsSchematicsVersion,
'@nestjs/testing': nestJsVersion,
'@nx/nest': nxVersion,
}
Expand Down
3 changes: 2 additions & 1 deletion packages/nest/src/utils/versions.ts
Original file line number Diff line number Diff line change
@@ -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';

0 comments on commit ceee1dd

Please sign in to comment.