Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integration-tests/typescript-angular/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.

# Compiled output
/dist
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/typescript-angular/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TypescriptAngular

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.0.5.
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.0.1.

## Development server

Expand All @@ -24,4 +24,4 @@ Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To u

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
25 changes: 13 additions & 12 deletions integration-tests/typescript-angular/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
],
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
{
"glob": "**/*",
"input": "public"
}
],
"styles": [
"src/styles.css"
Expand All @@ -37,13 +39,13 @@
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
"maximumWarning": "500kB",
"maximumError": "1MB"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
"maximumWarning": "2kB",
"maximumError": "4kB"
}
],
"outputHashing": "all"
Expand All @@ -69,10 +71,7 @@
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"buildTarget": "typescript-angular:build"
}
"builder": "@angular-devkit/build-angular:extract-i18n"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
Expand All @@ -83,8 +82,10 @@
],
"tsConfig": "tsconfig.spec.json",
"assets": [
"src/favicon.ico",
"src/assets"
{
"glob": "**/*",
"input": "public"
}
],
"styles": [
"src/styles.css"
Expand Down
28 changes: 15 additions & 13 deletions integration-tests/typescript-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,36 @@
"clean": "rm -rf ./dist && rm -rf ./src/generated",
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"validate": "ng build --configuration production"
},
"private": true,
"dependencies": {
"@angular/animations": "^17.3.6",
"@angular/common": "^17.3.6",
"@angular/compiler": "^17.3.6",
"@angular/core": "^17.3.6",
"@angular/forms": "^17.3.6",
"@angular/platform-browser": "^17.3.6",
"@angular/platform-browser-dynamic": "^17.3.6",
"@angular/router": "^17.3.6",
"@angular/animations": "^18.0.0",
"@angular/common": "^18.0.0",
"@angular/compiler": "^18.0.0",
"@angular/core": "^18.0.0",
"@angular/forms": "^18.0.0",
"@angular/platform-browser": "^18.0.0",
"@angular/platform-browser-dynamic": "^18.0.0",
"@angular/router": "^18.0.0",
"rxjs": "~7.8.1",
"tslib": "^2.6.2",
"zone.js": "~0.14.4"
"zone.js": "~0.14.6"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.3.6",
"@angular/cli": "^17.3.6",
"@angular/compiler-cli": "^17.3.6",
"@angular-devkit/build-angular": "^18.0.1",
"@angular/cli": "^18.0.1",
"@angular/compiler-cli": "^18.0.0",
"@types/jasmine": "~5.1.4",
"jasmine-core": "~5.1.2",
"karma": "~6.4.3",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.1",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"typescript": "~5.4.0"
"typescript": "~5.4.5"
}
}
70 changes: 23 additions & 47 deletions integration-tests/typescript-angular/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,8 @@

--pill-accent: var(--bright-blue);

font-family:
"Inter",
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
Helvetica,
Arial,
sans-serif,
"Apple Color Emoji",
"Segoe UI Emoji",
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol";
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
Expand All @@ -60,17 +51,8 @@
line-height: 100%;
letter-spacing: -0.125rem;
margin: 0;
font-family:
"Inter Tight",
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
Helvetica,
Arial,
sans-serif,
"Apple Color Emoji",
"Segoe UI Emoji",
font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol";
}

Expand Down Expand Up @@ -249,26 +231,19 @@ <h1>Hello, {{ title }}</h1>
<div class="divider" role="separator" aria-label="Divider"></div>
<div class="right-side">
<div class="pill-group">
@for (
item of [
{title: "Explore the Docs", link: "https://angular.dev"},
{
title: "Learn with Tutorials",
link: "https://angular.dev/tutorials"
},
{title: "CLI Docs", link: "https://angular.dev/tools/cli"},
{
title: "Angular Language Service",
link: "https://angular.dev/tools/language-service"
},
{
title: "Angular DevTools",
link: "https://angular.dev/tools/devtools"
}
];
track item.title
) {
<a class="pill" [href]="item.link" target="_blank" rel="noopener">
@for (item of [
{ title: 'Explore the Docs', link: 'https://angular.dev' },
{ title: 'Learn with Tutorials', link: 'https://angular.dev/tutorials' },
{ title: 'CLI Docs', link: 'https://angular.dev/tools/cli' },
{ title: 'Angular Language Service', link: 'https://angular.dev/tools/language-service' },
{ title: 'Angular DevTools', link: 'https://angular.dev/tools/devtools' },
]; track item.title) {
<a
class="pill"
[href]="item.link"
target="_blank"
rel="noopener"
>
<span>{{ item.title }}</span>
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down Expand Up @@ -311,15 +286,15 @@ <h1>Hello, {{ title }}</h1>
rel="noopener"
>
<svg
width="25"
height="20"
viewBox="0 0 25 20"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
alt="Twitter"
>
<path
d="M8.04524 20C17.3335 20 22.4138 12.3047 22.4138 5.63144C22.4138 5.41287 22.4138 5.19529 22.399 4.97869C23.3874 4.26381 24.2405 3.37867 24.9185 2.3647C23.9969 2.77329 23.0192 3.04112 22.018 3.15923C23.0723 2.52818 23.8613 1.53552 24.2382 0.366057C23.2469 0.954335 22.1624 1.36889 21.0315 1.59182C20.2701 0.782212 19.2631 0.246107 18.1663 0.0664704C17.0695 -0.113166 15.9441 0.0736804 14.9642 0.598096C13.9843 1.12251 13.2046 1.95526 12.7457 2.96748C12.2868 3.9797 12.1742 5.11495 12.4255 6.19756C10.4178 6.09685 8.45366 5.57507 6.66064 4.66609C4.86763 3.75712 3.28579 2.48127 2.01781 0.921344C1.37203 2.03306 1.17424 3.34911 1.46472 4.60154C1.75519 5.85397 2.51208 6.9486 3.58128 7.66257C2.77759 7.63903 1.9914 7.42221 1.28924 7.03049V7.09449C1.28956 8.26041 1.69316 9.39034 2.4316 10.2926C3.17003 11.1949 4.19783 11.8139 5.34067 12.0448C4.59721 12.2476 3.81715 12.2772 3.06045 12.1315C3.38327 13.1348 4.01156 14.0122 4.85746 14.641C5.70337 15.2698 6.72461 15.6185 7.77842 15.6384C6.73139 16.4614 5.53237 17.0699 4.24995 17.4291C2.96753 17.7882 1.62687 17.891 0.304688 17.7316C2.61411 19.2136 5.30121 19.9997 8.04524 19.9961"
d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"
/>
</svg>
</a>
Expand Down Expand Up @@ -357,4 +332,5 @@ <h1>Hello, {{ title }}</h1>
<!-- * * * * * * * * * * End of Placeholder * * * * * * * * * * * * -->
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->

<router-outlet></router-outlet>

<router-outlet />
38 changes: 18 additions & 20 deletions integration-tests/typescript-angular/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
import {TestBed} from '@angular/core/testing'
import {AppComponent} from './app.component'
import { TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';

describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [AppComponent],
}).compileComponents()
})
}).compileComponents();
});

it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent)
const app = fixture.componentInstance
expect(app).toBeTruthy()
})
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});

it(`should have the 'typescript-angular' title`, () => {
const fixture = TestBed.createComponent(AppComponent)
const app = fixture.componentInstance
expect(app.title).toEqual('typescript-angular')
})
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('typescript-angular');
});

it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent)
fixture.detectChanges()
const compiled = fixture.nativeElement as HTMLElement
expect(compiled.querySelector('h1')?.textContent).toContain(
'Hello, typescript-angular',
)
})
})
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, typescript-angular');
});
});
10 changes: 9 additions & 1 deletion integration-tests/typescript-angular/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import {Component} from '@angular/core'
import {CommonModule} from '@angular/common'
import {RouterOutlet} from '@angular/router'
import {ApiModule as AzureCoreDataPlanServiceModule} from '../generated/azure-core-data-plane-service.tsp/api.module'
import {ApiModule as AzureResourceManagerModule} from '../generated/azure-resource-manager.tsp/api.module'
import {ApiModule as GhApiModule} from '../generated/api.github.com.yaml/api.module'
import {ApiModule as OktaIdpModule} from '../generated/okta.idp.yaml/api.module'
import {ApiModule as OktaOauthModule} from '../generated/okta.oauth.yaml/api.module'
import {ApiModule as PetStoreApiModule} from '../generated/petstore-expanded.yaml/api.module'
import {ApiModule as StripeApiModule} from '../generated/stripe.yaml/api.module'
import {ApiModule as TodoListsApiModule} from '../generated/todo-lists.yaml/api.module'
Expand All @@ -12,13 +16,17 @@ import {ApiModule as TodoListsApiModule} from '../generated/todo-lists.yaml/api.
imports: [
CommonModule,
RouterOutlet,
AzureCoreDataPlanServiceModule,
AzureResourceManagerModule,
GhApiModule,
OktaIdpModule,
OktaOauthModule,
PetStoreApiModule,
StripeApiModule,
TodoListsApiModule,
],
templateUrl: './app.component.html',
styleUrl: './app.component.scss',
styleUrl: './app.component.css',
})
export class AppComponent {
title = 'typescript-angular'
Expand Down
10 changes: 5 additions & 5 deletions integration-tests/typescript-angular/src/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {ApplicationConfig} from '@angular/core'
import {provideRouter} from '@angular/router'
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
import { provideRouter } from '@angular/router';

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

export const appConfig: ApplicationConfig = {
providers: [provideRouter(routes)],
}
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes)]
};
4 changes: 2 additions & 2 deletions integration-tests/typescript-angular/src/app/app.routes.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import {Routes} from '@angular/router'
import { Routes } from '@angular/router';

export const routes: Routes = []
export const routes: Routes = [];
Empty file.
20 changes: 10 additions & 10 deletions integration-tests/typescript-angular/src/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>TypescriptAngular</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
</head>
<body>
<app-root></app-root>
</body>
<head>
<meta charset="utf-8">
<title>TypescriptAngular</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
</body>
</html>
9 changes: 5 additions & 4 deletions integration-tests/typescript-angular/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {bootstrapApplication} from '@angular/platform-browser'
import {appConfig} from './app/app.config'
import {AppComponent} from './app/app.component'
import { bootstrapApplication } from '@angular/platform-browser';
import { appConfig } from './app/app.config';
import { AppComponent } from './app/app.component';

bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err))
bootstrapApplication(AppComponent, appConfig)
.catch((err) => console.error(err));
4 changes: 2 additions & 2 deletions integration-tests/typescript-angular/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"skipLibCheck": true,
"esModuleInterop": true,
"sourceMap": true,
"declaration": false,
"experimentalDecorators": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"importHelpers": true,
"target": "ES2022",
"module": "ES2022",
Expand All @@ -22,7 +23,6 @@
"ES2022",
"dom"
],
"noUnusedLocals": true
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
Expand Down
Loading