Skip to content

Commit e41b7b8

Browse files
Merge pull request #321 from JuanVillegas1921/update-deps
Update deps
2 parents 97012e1 + 3794f97 commit e41b7b8

23 files changed

+196
-227
lines changed

templates/node-angular/.vscode/extensions.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

templates/node-angular/.vscode/launch.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

templates/node-angular/.vscode/tasks.json

Lines changed: 0 additions & 42 deletions
This file was deleted.

templates/node-angular/angular.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@
1111
"prefix": "app",
1212
"architect": {
1313
"build": {
14-
"builder": "@angular-devkit/build-angular:application",
14+
"builder": "@angular/build:application",
1515
"options": {
16-
"outputPath": "dist/node-angular",
17-
"index": "src/index.html",
1816
"browser": "src/main.ts",
1917
"polyfills": [
2018
"zone.js"
@@ -28,8 +26,7 @@
2826
],
2927
"styles": [
3028
"src/styles.css"
31-
],
32-
"scripts": []
29+
]
3330
},
3431
"configurations": {
3532
"production": {
@@ -56,7 +53,7 @@
5653
"defaultConfiguration": "production"
5754
},
5855
"serve": {
59-
"builder": "@angular-devkit/build-angular:dev-server",
56+
"builder": "@angular/build:dev-server",
6057
"configurations": {
6158
"production": {
6259
"buildTarget": "node-angular:build:production"
@@ -68,10 +65,10 @@
6865
"defaultConfiguration": "development"
6966
},
7067
"extract-i18n": {
71-
"builder": "@angular-devkit/build-angular:extract-i18n"
68+
"builder": "@angular/build:extract-i18n"
7269
},
7370
"test": {
74-
"builder": "@angular-devkit/build-angular:karma",
71+
"builder": "@angular/build:karma",
7572
"options": {
7673
"polyfills": [
7774
"zone.js",
@@ -86,8 +83,7 @@
8683
],
8784
"styles": [
8885
"src/styles.css"
89-
],
90-
"scripts": []
86+
]
9187
}
9288
}
9389
}
Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,70 @@
1-
import globals from "globals";
2-
import js from "@eslint/js";
3-
import nodePlugin from "eslint-plugin-n";
4-
import tseslintPlugin from "@typescript-eslint/eslint-plugin";
5-
import tseslintParser from "@typescript-eslint/parser";
1+
/*
2+
**
3+
** Copyright (c) 2024, Oracle and/or its affiliates.
4+
** All rights reserved
5+
** Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
6+
*/
7+
import js from '@eslint/js'
8+
import globals from 'globals'
9+
import nodePlugin from 'eslint-plugin-n'
10+
import reactPlugin from 'eslint-plugin-react'
11+
import reactHooks from 'eslint-plugin-react-hooks'
12+
import reactRefresh from 'eslint-plugin-react-refresh'
13+
import { defineConfig, globalIgnores } from 'eslint/config'
614

7-
export default [
15+
export default defineConfig([
16+
// Ignore dist folder globally
17+
globalIgnores(['dist']),
18+
19+
// Frontend (React)
820
{
9-
files: ["src/**/*.js","src/**/*.ts"],
21+
files: ['src/**/*.js', 'src/**/*.jsx'],
1022
languageOptions: {
1123
ecmaVersion: 2022,
12-
sourceType: "module",
13-
parser: tseslintParser,
24+
sourceType: 'module',
1425
parserOptions: {
1526
ecmaFeatures: {
16-
modules: true
17-
},
18-
ecmaVersion: "2022",
19-
project: "./tsconfig.json",
27+
jsx: true
28+
}
2029
},
2130
globals: {
22-
...globals.browser,
31+
...globals.browser
2332
}
2433
},
2534
plugins: {
26-
"@typescript-eslint": tseslintPlugin
35+
react: reactPlugin,
36+
'react-hooks': reactHooks,
37+
'react-refresh': reactRefresh
38+
},
39+
settings: {
40+
react: { version: 'detect' }
2741
},
2842
rules: {
2943
...js.configs.recommended.rules,
30-
...tseslintPlugin.configs["eslint-recommended"].overrides[0].rules,
31-
...tseslintPlugin.configs["recommended"].rules,
44+
...reactPlugin.configs.flat.recommended.rules,
45+
...reactPlugin.configs.flat['jsx-runtime'].rules,
46+
...reactHooks.configs['recommended-latest'].rules,
47+
...reactRefresh.configs.vite.rules,
48+
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }]
3249
}
3350
},
51+
52+
// Backend (Node.js)
3453
{
35-
files: ["server/**/*.js", "server/**/*.cjs"],
54+
files: ['server/**/*.js', 'server/**/*.cjs'],
3655
languageOptions: {
3756
ecmaVersion: 2022,
38-
sourceType: "module",
57+
sourceType: 'module',
3958
globals: {
40-
...globals.node,
59+
...globals.node
4160
}
4261
},
4362
plugins: {
4463
n: nodePlugin
4564
},
4665
rules: {
4766
...js.configs.recommended.rules,
48-
...nodePlugin.configs["flat/recommended-script"].rules
67+
...nodePlugin.configs['flat/recommended-script'].rules
4968
}
5069
}
51-
];
70+
])

templates/node-angular/package.json

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,50 @@
1010
"watch": "ng build --watch --configuration development",
1111
"test": "ng test"
1212
},
13+
"prettier": {
14+
"overrides": [
15+
{
16+
"files": "*.html",
17+
"options": {
18+
"parser": "angular"
19+
}
20+
}
21+
]
22+
},
1323
"private": true,
1424
"dependencies": {
15-
"@angular/common": "^19.2.0",
16-
"@angular/compiler": "^19.2.0",
17-
"@angular/core": "^19.2.0",
18-
"@angular/forms": "^19.2.0",
19-
"@angular/platform-browser": "^19.2.0",
20-
"@angular/platform-browser-dynamic": "^19.2.0",
21-
"@angular/router": "^19.2.0",
25+
"@angular/common": "^20.0.0",
26+
"@angular/compiler": "^20.0.0",
27+
"@angular/core": "^20.0.0",
28+
"@angular/forms": "^20.0.0",
29+
"@angular/platform-browser": "^20.0.0",
30+
"@angular/router": "^20.0.0",
31+
"rxjs": "~7.8.0",
32+
"tslib": "^2.3.0",
33+
"zone.js": "~0.15.0",
2234
"body-parser": "^2.2.0",
2335
"cors": "^2.8.5",
24-
"dotenv": "^16.5.0",
36+
"dotenv": "^17.1.0",
2537
"express": "^5.1.0",
2638
"morgan": "^1.10.0",
27-
"oracledb": "^6.8.0",
28-
"rxjs": "~7.8.0",
29-
"tslib": "^2.3.0",
30-
"zone.js": "~0.15.0"
39+
"oracledb": "^6.7.1"
3140
},
3241
"devDependencies": {
33-
"@angular-devkit/build-angular": "^19.2.8",
34-
"@angular/cli": "^19.2.8",
35-
"@angular/compiler-cli": "^19.2.0",
36-
"@eslint/js": "^9.25.1",
42+
"@angular/build": "^20.0.6",
43+
"@angular/cli": "^20.0.6",
44+
"@angular/compiler-cli": "^20.0.0",
3745
"@types/jasmine": "~5.1.0",
38-
"@typescript-eslint/eslint-plugin": "^8.31.0",
39-
"@typescript-eslint/parser": "^8.31.0",
40-
"concurrently": "^9.1.2",
41-
"eslint": "^9.25.1",
42-
"eslint-plugin-n": "^17.17.0",
43-
"globals": "^16.0.0",
44-
"jasmine-core": "~5.6.0",
46+
"jasmine-core": "~5.7.0",
4547
"karma": "~6.4.0",
4648
"karma-chrome-launcher": "~3.2.0",
4749
"karma-coverage": "~2.2.0",
4850
"karma-jasmine": "~5.1.0",
4951
"karma-jasmine-html-reporter": "~2.1.0",
50-
"typescript": "~5.7.2"
52+
"typescript": "~5.8.2",
53+
"@eslint/js": "^9.18.0",
54+
"concurrently": "^9.1.2",
55+
"eslint": "^9.18.0",
56+
"eslint-plugin-n": "^17.15.1",
57+
"globals": "^16.3.0"
5158
}
5259
}
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
1+
import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZoneChangeDetection } from '@angular/core';
22
import { provideRouter } from '@angular/router';
33

44
import { routes } from './app.routes';
55

66
export const appConfig: ApplicationConfig = {
7-
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes)]
7+
providers: [
8+
provideBrowserGlobalErrorListeners(),
9+
provideZoneChangeDetection({ eventCoalescing: true }),
10+
provideRouter(routes)
11+
]
812
};

templates/node-angular/src/app/app.component.html renamed to templates/node-angular/src/app/app.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div id="root">
22
<div>
33
<a href="https://www.oracle.com/database/" target="_blank">
4-
<img src="{{ oracleLogo }}" class="logo" alt="Oracle logo" />
4+
<img src="{{ oracleLogo }}" class="logo" alt="Oracle logo" />
55
</a>
66
<a href="https://angular.io/" target="_blank">
77
<img src="{{ angularLogo }}" class="logo angular" alt="Angular logo" />
@@ -17,3 +17,5 @@ <h1>{{ checkingConnection }}</h1>
1717
Click on the Oracle and Angular logos to learn more
1818
</p>
1919
</div>
20+
21+
<router-outlet />

templates/node-angular/src/app/app.component.spec.ts renamed to templates/node-angular/src/app/app.spec.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,21 @@
11
import { TestBed } from '@angular/core/testing';
2-
import { AppComponent } from './app.component';
2+
import { App } from './app';
33

4-
describe('AppComponent', () => {
4+
describe('App', () => {
55
beforeEach(async () => {
66
await TestBed.configureTestingModule({
7-
imports: [AppComponent],
7+
imports: [App],
88
}).compileComponents();
99
});
1010

1111
it('should create the app', () => {
12-
const fixture = TestBed.createComponent(AppComponent);
12+
const fixture = TestBed.createComponent(App);
1313
const app = fixture.componentInstance;
1414
expect(app).toBeTruthy();
1515
});
1616

17-
it(`should have the 'node-angular' title`, () => {
18-
const fixture = TestBed.createComponent(AppComponent);
19-
const app = fixture.componentInstance;
20-
expect(app.title).toEqual('node-angular');
21-
});
22-
2317
it('should render title', () => {
24-
const fixture = TestBed.createComponent(AppComponent);
18+
const fixture = TestBed.createComponent(App);
2519
fixture.detectChanges();
2620
const compiled = fixture.nativeElement as HTMLElement;
2721
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, node-angular');

0 commit comments

Comments
 (0)