Skip to content

Commit

Permalink
chore(json-api-nestjs,json-api-nestjs-sdk,nestjs-json-rpc,nestjs-json…
Browse files Browse the repository at this point in the history
…-rpc-sdk): Bump for nx 20

BREAKING CHANGE: Changes dependencies
  • Loading branch information
klerick committed Dec 7, 2024
1 parent 08e3bb5 commit aa15c28
Show file tree
Hide file tree
Showing 13 changed files with 4,872 additions and 5,720 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DB_HOST=localhost
DB_HOST=192.168.2.243
DB_LOGGING=1

DB_USERNAME="postgres"
Expand Down
6 changes: 6 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@
"jest": true
},
"rules": {}
},
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
}
],
"extends": ["./.eslintrc.base.json"]
Expand Down
3 changes: 2 additions & 1 deletion apps/json-api-front/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"prefix": "nestjs-json-api",
"style": "kebab-case"
}
]
],
"@angular-eslint/prefer-standalone": "off"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion apps/json-api-front/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ type RpcMap = {
};

@Component({
standalone: true,
imports: [NxWelcomeComponent],
selector: 'nestjs-json-api-root',
templateUrl: './app.component.html',
styleUrl: './app.component.css',
standalone: true,
})
export class AppComponent implements OnInit {
private JsonApiSdkService = inject(JsonApiSdkService);
Expand Down
38 changes: 15 additions & 23 deletions apps/json-api-front/src/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
import { ApplicationConfig, InjectionToken } from '@angular/core';
import { provideJsonApi } from 'json-api-nestjs-sdk/ngModule';
import {
ApplicationConfig,
importProvidersFrom,
InjectionToken,
} from '@angular/core';
import { JsonApiAngular, provideJsonApi } from 'json-api-nestjs-sdk/ngModule';
import {
JsonRpcAngular,
JsonRpcAngularConfig,
TransportType,
provideJsonRpc,
} from '@klerick/nestjs-json-rpc-sdk/ngModule';
import { Subject } from 'rxjs';
import { webSocket } from 'rxjs/webSocket';
import { io } from 'socket.io-client';
import { provideHttpClient, withInterceptors } from '@angular/common/http';
import { provideHttpClient, withFetch } from '@angular/common/http';

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

export const appConfig: ApplicationConfig = {
providers: [
importProvidersFrom(
JsonApiAngular.forRoot({
apiHost: 'http://localhost:4200',
idKey: 'id',
apiPrefix: 'api',
operationUrl: 'operation',
})
),
importProvidersFrom(
JsonRpcAngular.forRoot(
// httpConfig
// wsConfig
// wsConfigWithToken,
ioConfig
)
provideHttpClient(withFetch()),
provideJsonApi({
apiHost: 'http://localhost:4200',
idKey: 'id',
apiPrefix: 'api',
operationUrl: 'operation',
}),
provideJsonRpc(
// httpConfig
// wsConfig
// wsConfigWithToken,
ioConfig
),
],
};
2 changes: 1 addition & 1 deletion apps/json-api-front/src/app/nx-welcome.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { CommonModule } from '@angular/common';

@Component({
selector: 'nestjs-json-api-nx-welcome',
standalone: true,
imports: [CommonModule],
standalone: true,
template: `
<!--
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
Expand Down
8 changes: 4 additions & 4 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getJestProjects } from '@nx/jest';
import { getJestProjectsAsync } from '@nx/jest';

export default {
projects: getJestProjects()
};
export default async () => ({
projects: await getJestProjectsAsync()
});
6 changes: 6 additions & 0 deletions libs/json-api/json-api-nestjs-sdk/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
"rules": {
"@nx/dependency-checks": "error"
}
},
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
}
]
}
13 changes: 12 additions & 1 deletion libs/json-api/json-api-nestjs/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"sourceRoot": "libs/json-api/json-api-nestjs/src",
"projectType": "library",
"targets": {
"build": {
"build-ts": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
Expand All @@ -18,6 +18,17 @@
"generateExportsField": true
}
},
"build": {
"executor": "nx:run-commands",
"dependsOn": [
"build-ts"
],
"options": {
"commands": ["rm -rf dist/libs/json-api/json-api-nestjs/libs"],
"cwd": "./",
"parallel": false
}
},
"publish": {
"command": "node tools/scripts/publish.mjs json-api-nestjs {args.ver} {args.tag}",
"dependsOn": ["build"]
Expand Down
6 changes: 6 additions & 0 deletions libs/json-rpc/nestjs-json-rpc-sdk/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
"rules": {
"@nx/dependency-checks": "error"
}
},
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
}
]
}
39 changes: 10 additions & 29 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"namedInputs": {
"default": [
"{projectRoot}/**/*",
"sharedGlobals"
],
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"production": [
"default",
"!{projectRoot}/.eslintrc.json",
Expand All @@ -15,9 +12,7 @@
"!{projectRoot}/src/test-setup.[jt]s",
"!{projectRoot}/test-setup.[jt]s"
],
"sharedGlobals": [
"{workspaceRoot}/.github/**/*"
]
"sharedGlobals": ["{workspaceRoot}/.github/**/*"]
},
"plugins": [
{
Expand All @@ -44,36 +39,21 @@
"targetDefaults": {
"@nx/js:tsc": {
"cache": true,
"dependsOn": [
"^build"
],
"inputs": [
"production",
"^production"
]
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
},
"@angular-devkit/build-angular:application": {
"cache": true,
"dependsOn": [
"^build"
],
"inputs": [
"production",
"^production"
]
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
},
"test": {
"cache": true
},
"@nx/angular:ng-packagr-lite": {
"cache": true,
"dependsOn": [
"^build"
],
"inputs": [
"production",
"^production"
]
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
}
},
"generators": {
Expand Down Expand Up @@ -114,5 +94,6 @@
"fallbackCurrentVersionResolver": "1.0.0"
}
}
}
},
"useLegacyCache": true
}
Loading

0 comments on commit aa15c28

Please sign in to comment.