Skip to content

Commit 328fbfe

Browse files
authored
Revert "Cherry pick missing fixes (#26935)" (#26936)
This reverts commit a47bb23.
1 parent a47bb23 commit 328fbfe

38 files changed

+2063
-2507
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
16+
Firefox ESR
Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,45 @@
11
# See http://help.github.com/ignore-files/ for more about ignoring files.
22

3-
# Compiled output
3+
# compiled output
44
/dist
55
/tmp
66
/out-tsc
7+
# Only exists if Bazel was run
78
/bazel-out
89

9-
# Node
10+
# dependencies
1011
/node_modules
11-
npm-debug.log
12-
yarn-error.log
12+
13+
# profiling files
14+
chrome-profiler-events*.json
1315

1416
# IDEs and editors
15-
.idea/
17+
/.idea
1618
.project
1719
.classpath
1820
.c9/
1921
*.launch
2022
.settings/
2123
*.sublime-workspace
2224

23-
# Visual Studio Code
25+
# IDE - VSCode
2426
.vscode/*
2527
!.vscode/settings.json
2628
!.vscode/tasks.json
2729
!.vscode/launch.json
2830
!.vscode/extensions.json
2931
.history/*
3032

31-
# Miscellaneous
32-
/.angular/cache
33-
.sass-cache/
33+
# misc
34+
/.sass-cache
3435
/connect.lock
3536
/coverage
3637
/libpeerconnection.log
38+
npm-debug.log
39+
yarn-error.log
3740
testem.log
3841
/typings
3942

40-
# System files
43+
# System Files
4144
.DS_Store
4245
Thumbs.db

integration/ng-add-standalone/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# NgAddStandalone
22

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.0.0-next.7.
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.0.0-next.7.
44

55
## Development server
66

7-
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
7+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
88

99
## Code scaffolding
1010

integration/ng-add-standalone/angular.json

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,10 @@
77
"projectType": "application",
88
"schematics": {
99
"@schematics/angular:component": {
10-
"style": "scss",
11-
"standalone": true
10+
"style": "scss"
1211
},
13-
"@schematics/angular:directive": {
14-
"standalone": true
15-
},
16-
"@schematics/angular:pipe": {
17-
"standalone": true
12+
"@schematics/angular:application": {
13+
"strict": true
1814
}
1915
},
2016
"root": "",
@@ -27,7 +23,7 @@
2723
"outputPath": "dist/ng-add-standalone",
2824
"index": "src/index.html",
2925
"main": "src/main.ts",
30-
"polyfills": ["zone.js"],
26+
"polyfills": "src/polyfills.ts",
3127
"tsConfig": "tsconfig.app.json",
3228
"inlineStyleLanguage": "scss",
3329
"assets": ["src/favicon.ico", "src/assets"],
@@ -48,6 +44,12 @@
4844
"maximumError": "4kb"
4945
}
5046
],
47+
"fileReplacements": [
48+
{
49+
"replace": "src/environments/environment.ts",
50+
"with": "src/environments/environment.prod.ts"
51+
}
52+
],
5153
"outputHashing": "all"
5254
},
5355
"development": {
@@ -82,13 +84,15 @@
8284
"test": {
8385
"builder": "@angular-devkit/build-angular:karma",
8486
"options": {
85-
"polyfills": ["zone.js", "zone.js/testing"],
87+
"main": "src/test.ts",
88+
"polyfills": "src/polyfills.ts",
8689
"tsConfig": "tsconfig.spec.json",
8790
"karmaConfig": "karma.conf.js",
8891
"inlineStyleLanguage": "scss",
8992
"assets": ["src/favicon.ico", "src/assets"],
9093
"styles": ["src/styles.scss"],
91-
"scripts": []
94+
"scripts": [],
95+
"watch": false
9296
}
9397
}
9498
}

integration/ng-add-standalone/package.json

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,37 @@
66
"start": "ng serve",
77
"build": "ng build",
88
"watch": "ng build --watch --configuration development",
9-
"test": "ng test --watch=false"
9+
"test": "ng test"
1010
},
1111
"private": true,
1212
"dependencies": {
13-
"@angular/animations": "^16.0.0-next.7",
13+
"@angular/animations": "^15.0.0",
1414
"@angular/cdk": "file:../../dist/releases/cdk",
15-
"@angular/common": "^16.0.0-next.7",
16-
"@angular/compiler": "^16.0.0-next.7",
17-
"@angular/core": "^16.0.0-next.7",
18-
"@angular/forms": "^16.0.0-next.7",
15+
"@angular/common": "^15.0.0",
16+
"@angular/compiler": "^15.0.0",
17+
"@angular/core": "^15.0.0",
18+
"@angular/forms": "^15.0.0",
1919
"@angular/material": "file:../../dist/releases/material",
20-
"@angular/platform-browser": "^16.0.0-next.7",
21-
"@angular/platform-browser-dynamic": "^16.0.0-next.7",
22-
"@angular/router": "^16.0.0-next.7",
23-
"rxjs": "~7.8.0",
20+
"@angular/platform-browser": "^15.0.0",
21+
"@angular/platform-browser-dynamic": "^15.0.0",
22+
"@angular/router": "^15.0.0",
23+
"rxjs": "~7.5.0",
2424
"tslib": "^2.3.0",
25-
"zone.js": "~0.13.0"
25+
"zone.js": "~0.11.4"
2626
},
2727
"devDependencies": {
28-
"@angular-devkit/build-angular": "^16.0.0-next.7",
29-
"@angular/cli": "~16.0.0-next.7",
30-
"@angular/compiler-cli": "^16.0.0-next.7",
31-
"@types/jasmine": "~4.3.0",
32-
"jasmine-core": "~4.6.0",
33-
"karma": "~6.4.0",
28+
"@angular-devkit/build-angular": "^15.0.0",
29+
"@angular/cli": "^15.0.0",
30+
"@angular/compiler-cli": "^15.0.0",
31+
"@types/jasmine": "~3.9.0",
32+
"@types/node": "^12.11.1",
33+
"glob": "^7.2.0",
34+
"jasmine-core": "~3.9.0",
35+
"karma": "~6.3.0",
3436
"karma-chrome-launcher": "~3.1.0",
35-
"karma-coverage": "~2.2.0",
36-
"karma-jasmine": "~5.1.0",
37-
"karma-jasmine-html-reporter": "~2.0.0",
37+
"karma-coverage": "~2.0.3",
38+
"karma-jasmine": "~4.0.0",
39+
"karma-jasmine-html-reporter": "~1.7.0",
3840
"typescript": "file:../../node_modules/typescript"
3941
}
4042
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import {NgModule} from '@angular/core';
2+
import {RouterModule, Routes} from '@angular/router';
3+
4+
const routes: Routes = [];
5+
6+
@NgModule({
7+
imports: [RouterModule.forRoot(routes)],
8+
exports: [RouterModule],
9+
})
10+
export class AppRoutingModule {}

integration/ng-add-standalone/src/app/app.component.html

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -366,12 +366,6 @@ <h2>Resources</h2>
366366
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>
367367
</a>
368368

369-
<a class="card" target="_blank" rel="noopener" href="https://material.angular.io">
370-
<svg xmlns="http://www.w3.org/2000/svg" style="margin-right: 8px" width="21.813" height="23.453" viewBox="0 0 179.2 192.7"><path fill="#ffa726" d="M89.4 0 0 32l13.5 118.4 75.9 42.3 76-42.3L179.2 32 89.4 0z"/><path fill="#fb8c00" d="M89.4 0v192.7l76-42.3L179.2 32 89.4 0z"/><path fill="#ffe0b2" d="m102.9 146.3-63.3-30.5 36.3-22.4 63.7 30.6-36.7 22.3z"/><path fill="#fff3e0" d="M102.9 122.8 39.6 92.2l36.3-22.3 63.7 30.6-36.7 22.3z"/><path fill="#fff" d="M102.9 99.3 39.6 68.7l36.3-22.4 63.7 30.6-36.7 22.4z"/></svg>
371-
<span>Angular Material</span>
372-
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>
373-
</a>
374-
375369
<a class="card" target="_blank" rel="noopener" href="https://blog.angular.io/">
376370
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.41 3.8 13.5.67zM11.71 19c-1.78 0-3.22-1.4-3.22-3.14 0-1.62 1.05-2.76 2.81-3.12 1.77-.36 3.6-1.21 4.62-2.58.39 1.29.59 2.65.59 4.04 0 2.65-2.15 4.8-4.8 4.8z"/></svg>
377371
<span>Angular Blog</span>
@@ -436,6 +430,29 @@ <h2>Next Steps</h2>
436430

437431
<!-- Links -->
438432
<div class="card-container">
433+
<a class="circle-link" title="Animations" href="https://angular.io/guide/animations" target="_blank" rel="noopener">
434+
<svg id="Group_20" data-name="Group 20" xmlns="http://www.w3.org/2000/svg" width="21.813" height="23.453" viewBox="0 0 21.813 23.453">
435+
<path id="Path_15" data-name="Path 15" d="M4099.584,972.736h0l-10.882,3.9,1.637,14.4,9.245,5.153,9.245-5.153,1.686-14.4Z" transform="translate(-4088.702 -972.736)" fill="#ffa726"/>
436+
<path id="Path_16" data-name="Path 16" d="M4181.516,972.736v23.453l9.245-5.153,1.686-14.4Z" transform="translate(-4170.633 -972.736)" fill="#fb8c00"/>
437+
<path id="Path_17" data-name="Path 17" d="M4137.529,1076.127l-7.7-3.723,4.417-2.721,7.753,3.723Z" transform="translate(-4125.003 -1058.315)" fill="#ffe0b2"/>
438+
<path id="Path_18" data-name="Path 18" d="M4137.529,1051.705l-7.7-3.723,4.417-2.721,7.753,3.723Z" transform="translate(-4125.003 -1036.757)" fill="#fff3e0"/>
439+
<path id="Path_19" data-name="Path 19" d="M4137.529,1027.283l-7.7-3.723,4.417-2.721,7.753,3.723Z" transform="translate(-4125.003 -1015.199)" fill="#fff"/>
440+
</svg>
441+
</a>
442+
443+
<a class="circle-link" title="CLI" href="https://cli.angular.io/" target="_blank" rel="noopener">
444+
<svg xmlns="http://www.w3.org/2000/svg" width="21.762" height="23.447" viewBox="0 0 21.762 23.447">
445+
<title>Angular CLI Logo</title>
446+
<g id="Group_21" data-name="Group 21" transform="translate(0)">
447+
<path id="Path_20" data-name="Path 20" d="M2660.313,313.618h0l-10.833,3.9,1.637,14.4,9.2,5.152,9.244-5.152,1.685-14.4Z" transform="translate(-2649.48 -313.618)" fill="#37474f"/>
448+
<path id="Path_21" data-name="Path 21" d="M2741.883,313.618v23.447l9.244-5.152,1.685-14.4Z" transform="translate(-2731.05 -313.618)" fill="#263238"/>
449+
<path id="Path_22" data-name="Path 22" d="M2692.293,379.169h11.724V368.618h-11.724Zm11.159-.6h-10.608v-9.345h10.621v9.345Z" transform="translate(-2687.274 -362.17)" fill="#fff"/>
450+
<path id="Path_23" data-name="Path 23" d="M2709.331,393.688l.4.416,2.265-2.28-2.294-2.294-.4.4,1.893,1.893Z" transform="translate(-2702.289 -380.631)" fill="#fff"/>
451+
<rect id="Rectangle_12" data-name="Rectangle 12" width="3.517" height="0.469" transform="translate(9.709 13.744)" fill="#fff"/>
452+
</g>
453+
</svg>
454+
</a>
455+
439456
<a class="circle-link" title="Find a Local Meetup" href="https://www.meetup.com/find/?keywords=angular" target="_blank" rel="noopener">
440457
<svg xmlns="http://www.w3.org/2000/svg" width="24.607" height="23.447" viewBox="0 0 24.607 23.447">
441458
<title>Meetup Logo</title>

integration/ng-add-standalone/src/app/app.component.spec.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
import {TestBed} from '@angular/core/testing';
2+
import {RouterTestingModule} from '@angular/router/testing';
23
import {AppComponent} from './app.component';
34

45
describe('AppComponent', () => {
5-
beforeEach(() =>
6-
TestBed.configureTestingModule({
7-
imports: [AppComponent],
8-
}),
9-
);
6+
beforeEach(async () => {
7+
await TestBed.configureTestingModule({
8+
imports: [RouterTestingModule],
9+
}).compileComponents();
10+
});
1011

1112
it('should create the app', () => {
1213
const fixture = TestBed.createComponent(AppComponent);
1314
const app = fixture.componentInstance;
1415
expect(app).toBeTruthy();
1516
});
1617

17-
it(`should have the 'ng-add-standalone' title`, () => {
18+
it(`should have as title 'ng-add-standalone'`, () => {
1819
const fixture = TestBed.createComponent(AppComponent);
1920
const app = fixture.componentInstance;
2021
expect(app.title).toEqual('ng-add-standalone');

integration/ng-add-standalone/src/app/app.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import {Component} from '@angular/core';
22
import {CommonModule} from '@angular/common';
3-
import {RouterOutlet} from '@angular/router';
3+
import {RouterModule} from '@angular/router';
44

55
@Component({
66
selector: 'app-root',
7-
standalone: true,
8-
imports: [CommonModule, RouterOutlet],
97
templateUrl: './app.component.html',
108
styleUrls: ['./app.component.scss'],
9+
standalone: true,
10+
imports: [RouterModule, CommonModule],
1111
})
1212
export class AppComponent {
1313
title = 'ng-add-standalone';

integration/ng-add-standalone/src/app/app.config.ts

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

integration/ng-add-standalone/src/app/app.routes.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const environment = {
2+
production: true,
3+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// This file can be replaced during build by using the `fileReplacements` array.
2+
// `ng build` replaces `environment.ts` with `environment.prod.ts`.
3+
// The list of file replacements can be found in `angular.json`.
4+
5+
export const environment = {
6+
production: false,
7+
};
8+
9+
/*
10+
* For easier debugging in development mode, you can import the following file
11+
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
12+
*
13+
* This import should be commented out in production mode because it will have a negative impact
14+
* on performance if an error is thrown.
15+
*/
16+
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
-694 Bytes
Binary file not shown.
Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
import {bootstrapApplication} from '@angular/platform-browser';
2-
import {appConfig} from './app/app.config';
1+
import {enableProdMode, importProvidersFrom} from '@angular/core';
2+
import {bootstrapApplication, BrowserModule} from '@angular/platform-browser';
3+
import {AppRoutingModule} from './app/app-routing.module';
34
import {AppComponent} from './app/app.component';
45

5-
bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));
6+
import {environment} from './environments/environment';
7+
8+
if (environment.production) {
9+
enableProdMode();
10+
}
11+
12+
bootstrapApplication(AppComponent, {
13+
providers: [importProvidersFrom(BrowserModule, AppRoutingModule)],
14+
});

0 commit comments

Comments
 (0)