Skip to content

Commit aa15c28

Browse files
committed
chore(json-api-nestjs,json-api-nestjs-sdk,nestjs-json-rpc,nestjs-json-rpc-sdk): Bump for nx 20
BREAKING CHANGE: Changes dependencies
1 parent 08e3bb5 commit aa15c28

File tree

13 files changed

+4872
-5720
lines changed

13 files changed

+4872
-5720
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DB_HOST=localhost
1+
DB_HOST=192.168.2.243
22
DB_LOGGING=1
33

44
DB_USERNAME="postgres"

.eslintrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
"jest": true
3434
},
3535
"rules": {}
36+
},
37+
{
38+
"files": ["*.ts"],
39+
"rules": {
40+
"@angular-eslint/prefer-standalone": "off"
41+
}
3642
}
3743
],
3844
"extends": ["./.eslintrc.base.json"]

apps/json-api-front/.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"prefix": "nestjs-json-api",
2525
"style": "kebab-case"
2626
}
27-
]
27+
],
28+
"@angular-eslint/prefer-standalone": "off"
2829
}
2930
},
3031
{

apps/json-api-front/src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ type RpcMap = {
1616
};
1717

1818
@Component({
19-
standalone: true,
2019
imports: [NxWelcomeComponent],
2120
selector: 'nestjs-json-api-root',
2221
templateUrl: './app.component.html',
2322
styleUrl: './app.component.css',
23+
standalone: true,
2424
})
2525
export class AppComponent implements OnInit {
2626
private JsonApiSdkService = inject(JsonApiSdkService);

apps/json-api-front/src/app/app.config.ts

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
1+
import { ApplicationConfig, InjectionToken } from '@angular/core';
2+
import { provideJsonApi } from 'json-api-nestjs-sdk/ngModule';
13
import {
2-
ApplicationConfig,
3-
importProvidersFrom,
4-
InjectionToken,
5-
} from '@angular/core';
6-
import { JsonApiAngular, provideJsonApi } from 'json-api-nestjs-sdk/ngModule';
7-
import {
8-
JsonRpcAngular,
94
JsonRpcAngularConfig,
105
TransportType,
116
provideJsonRpc,
127
} from '@klerick/nestjs-json-rpc-sdk/ngModule';
138
import { Subject } from 'rxjs';
149
import { webSocket } from 'rxjs/webSocket';
1510
import { io } from 'socket.io-client';
16-
import { provideHttpClient, withInterceptors } from '@angular/common/http';
11+
import { provideHttpClient, withFetch } from '@angular/common/http';
1712

1813
const destroySubject = new Subject<boolean>();
1914
setTimeout(() => {
@@ -60,21 +55,18 @@ const ioConfig: JsonRpcAngularConfig = {
6055

6156
export const appConfig: ApplicationConfig = {
6257
providers: [
63-
importProvidersFrom(
64-
JsonApiAngular.forRoot({
65-
apiHost: 'http://localhost:4200',
66-
idKey: 'id',
67-
apiPrefix: 'api',
68-
operationUrl: 'operation',
69-
})
70-
),
71-
importProvidersFrom(
72-
JsonRpcAngular.forRoot(
73-
// httpConfig
74-
// wsConfig
75-
// wsConfigWithToken,
76-
ioConfig
77-
)
58+
provideHttpClient(withFetch()),
59+
provideJsonApi({
60+
apiHost: 'http://localhost:4200',
61+
idKey: 'id',
62+
apiPrefix: 'api',
63+
operationUrl: 'operation',
64+
}),
65+
provideJsonRpc(
66+
// httpConfig
67+
// wsConfig
68+
// wsConfigWithToken,
69+
ioConfig
7870
),
7971
],
8072
};

apps/json-api-front/src/app/nx-welcome.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { CommonModule } from '@angular/common';
33

44
@Component({
55
selector: 'nestjs-json-api-nx-welcome',
6-
standalone: true,
76
imports: [CommonModule],
7+
standalone: true,
88
template: `
99
<!--
1010
* * * * * * * * * * * * * * * * * * * * * * * * * * * *

jest.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { getJestProjects } from '@nx/jest';
1+
import { getJestProjectsAsync } from '@nx/jest';
22

3-
export default {
4-
projects: getJestProjects()
5-
};
3+
export default async () => ({
4+
projects: await getJestProjectsAsync()
5+
});

libs/json-api/json-api-nestjs-sdk/.eslintrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
"rules": {
2121
"@nx/dependency-checks": "error"
2222
}
23+
},
24+
{
25+
"files": ["*.ts"],
26+
"rules": {
27+
"@angular-eslint/prefer-standalone": "off"
28+
}
2329
}
2430
]
2531
}

libs/json-api/json-api-nestjs/project.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"sourceRoot": "libs/json-api/json-api-nestjs/src",
55
"projectType": "library",
66
"targets": {
7-
"build": {
7+
"build-ts": {
88
"executor": "@nx/js:tsc",
99
"outputs": ["{options.outputPath}"],
1010
"options": {
@@ -18,6 +18,17 @@
1818
"generateExportsField": true
1919
}
2020
},
21+
"build": {
22+
"executor": "nx:run-commands",
23+
"dependsOn": [
24+
"build-ts"
25+
],
26+
"options": {
27+
"commands": ["rm -rf dist/libs/json-api/json-api-nestjs/libs"],
28+
"cwd": "./",
29+
"parallel": false
30+
}
31+
},
2132
"publish": {
2233
"command": "node tools/scripts/publish.mjs json-api-nestjs {args.ver} {args.tag}",
2334
"dependsOn": ["build"]

libs/json-rpc/nestjs-json-rpc-sdk/.eslintrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
"rules": {
2121
"@nx/dependency-checks": "error"
2222
}
23+
},
24+
{
25+
"files": ["*.ts"],
26+
"rules": {
27+
"@angular-eslint/prefer-standalone": "off"
28+
}
2329
}
2430
]
2531
}

0 commit comments

Comments
 (0)