Compare commits
1 Commits
7.2.2
...
ngcontaine
Author | SHA1 | Date | |
---|---|---|---|
90e9a8e100 |
12
.bazelrc
12
.bazelrc
@ -22,18 +22,12 @@ test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test
|
||||
# Filesystem interactions #
|
||||
###############################
|
||||
|
||||
# Create symlinks in the project:
|
||||
# - dist/bin for outputs
|
||||
# - dist/testlogs, dist/genfiles
|
||||
# - bazel-out
|
||||
# NB: bazel-out should be excluded from the editor configuration.
|
||||
# The checked-in /.vscode/settings.json does this for VSCode.
|
||||
# Other editors may require manual config to ignore this directory.
|
||||
# In the past, we say a problem where VSCode traversed a massive tree, opening file handles and
|
||||
# Don't create symlinks like bazel-out in the project.
|
||||
# These cause VSCode to traverse a massive tree, opening file handles and
|
||||
# eventually a surprising failure with auto-discovery of the C++ toolchain in
|
||||
# MacOS High Sierra.
|
||||
# See https://github.com/bazelbuild/bazel/issues/4603
|
||||
build --symlink_prefix=dist/
|
||||
build --symlink_prefix=/
|
||||
|
||||
# Performance: avoid stat'ing input files
|
||||
build --watchfs
|
||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,7 +1,7 @@
|
||||
.DS_STORE
|
||||
|
||||
/dist/
|
||||
/bazel-out/
|
||||
/bazel-*
|
||||
/integration/bazel/bazel-*
|
||||
e2e_test.*
|
||||
node_modules
|
||||
@ -13,9 +13,9 @@ pubspec.lock
|
||||
.c9
|
||||
.idea/
|
||||
.settings/
|
||||
.vscode/launch.json
|
||||
*.swo
|
||||
modules/.settings
|
||||
.vscode
|
||||
modules/.vscode
|
||||
|
||||
# Don't check in secret files
|
||||
|
15
.vscode/settings.json
vendored
15
.vscode/settings.json
vendored
@ -1,15 +0,0 @@
|
||||
{
|
||||
"files.watcherExclude": {
|
||||
"**/.git/objects/**": true,
|
||||
"**/.git/subtree-cache/**": true,
|
||||
"**/node_modules/**": true,
|
||||
"**/bazel-out/**": true,
|
||||
"**/dist/**": true,
|
||||
},
|
||||
"search.exclude": {
|
||||
"**/node_modules": true,
|
||||
"**/bower_components": true,
|
||||
"**/bazel-out": true,
|
||||
"**/dist": true,
|
||||
},
|
||||
}
|
17
CHANGELOG.md
17
CHANGELOG.md
@ -1,20 +1,3 @@
|
||||
<a name="7.2.2"></a>
|
||||
## [7.2.2](https://github.com/angular/angular/compare/7.2.1...7.2.2) (2019-01-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bazel:** Fix integration test after v8 bump ([#28194](https://github.com/angular/angular/issues/28194)) ([7b772e9](https://github.com/angular/angular/commit/7b772e9)), closes [#28142](https://github.com/angular/angular/issues/28142)
|
||||
* **router:** `skipLocationChange` with named outlets ([#28301](https://github.com/angular/angular/issues/28301)) ([32737a6](https://github.com/angular/angular/commit/32737a6)), closes [#27680](https://github.com/angular/angular/issues/27680) [#28200](https://github.com/angular/angular/issues/28200)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **bazel:** Add support for SASS ([#28167](https://github.com/angular/angular/issues/28167)) ([a4d9192](https://github.com/angular/angular/commit/a4d9192))
|
||||
* **compiler-cli:** resolve generated Sass/Less files to .css inputs ([#28166](https://github.com/angular/angular/issues/28166)) ([4c00059](https://github.com/angular/angular/commit/4c00059))
|
||||
|
||||
|
||||
|
||||
<a name="7.2.1"></a>
|
||||
## [7.2.1](https://github.com/angular/angular/compare/7.2.0...7.2.1) (2019-01-16)
|
||||
|
||||
|
@ -3796,7 +3796,7 @@ The relevant *Crisis Center* code for this milestone follows.
|
||||
|
||||
</code-pane>
|
||||
|
||||
<code-pane header="crisis-detail.component.ts" path="router/src/app/crisis-center/crisis-detail/crisis-detail.component.ts">
|
||||
<code-pane header="crisis-detail.component.html" path="router/src/app/crisis-center/crisis-detail/crisis-detail.component.html">
|
||||
|
||||
</code-pane>
|
||||
|
||||
|
@ -52,7 +52,7 @@ describe('AppComponent', () => {
|
||||
await newDocPromise; // Wait for the new document to be fetched.
|
||||
fixture.detectChanges(); // Propagate document change to the view (i.e to `DocViewer`).
|
||||
await docRenderedPromise; // Wait for the `docRendered` event.
|
||||
}
|
||||
};
|
||||
|
||||
function initializeTest(waitForDoc = true) {
|
||||
fixture = TestBed.createComponent(AppComponent);
|
||||
@ -73,7 +73,7 @@ describe('AppComponent', () => {
|
||||
tocService = de.injector.get<TocService>(TocService);
|
||||
|
||||
return waitForDoc && awaitDocRendered();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
describe('with proper DocViewer', () => {
|
||||
|
@ -125,7 +125,7 @@ export class ApiListComponent implements OnInit {
|
||||
return status === 'all' ||
|
||||
status === item.stability ||
|
||||
(status === 'security-risk' && item.securityRisk);
|
||||
}
|
||||
};
|
||||
|
||||
function matchesType() {
|
||||
return type === 'all' || type === item.docType;
|
||||
|
@ -54,7 +54,7 @@ export class ApiService implements OnDestroy {
|
||||
section.items.every(item => item.stability === 'deprecated');
|
||||
});
|
||||
}));
|
||||
}
|
||||
};
|
||||
|
||||
constructor(private http: HttpClient, private logger: Logger) { }
|
||||
|
||||
|
@ -79,7 +79,7 @@ describe('ContributorListComponent', () => {
|
||||
return comp;
|
||||
}
|
||||
|
||||
interface SearchResult { [index: string]: string; }
|
||||
interface SearchResult { [index: string]: string; };
|
||||
|
||||
class TestLocationService {
|
||||
searchResult: SearchResult = {};
|
||||
|
@ -245,7 +245,7 @@ class FakeComponentFactory extends ComponentFactory<any> {
|
||||
rootSelectorOrNode?: string | any,
|
||||
ngModule?: NgModuleRef<any>): ComponentRef<any> {
|
||||
return jasmine.createSpy('ComponentRef') as any;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
class FakeComponentFactoryResolver extends ComponentFactoryResolver {
|
||||
|
@ -37,6 +37,6 @@ describe('Getting Started NgFor Component', () => {
|
||||
|
||||
component.parseError$.subscribe(error => {
|
||||
expect(error).toBeTruthy();
|
||||
});
|
||||
})
|
||||
});
|
||||
});
|
||||
|
@ -46,6 +46,6 @@ describe('Getting Started NgIf Component', () => {
|
||||
|
||||
component.parseError$.subscribe(error => {
|
||||
expect(error).toBeTruthy();
|
||||
});
|
||||
})
|
||||
});
|
||||
});
|
||||
|
@ -26,7 +26,7 @@ export class ResourceService {
|
||||
|
||||
(categories as ConnectableObservable<Category[]>).connect();
|
||||
return categories;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Extract sorted Category[] from resource JSON data
|
||||
|
@ -100,10 +100,9 @@ export class DocViewerComponent implements OnDestroy {
|
||||
if (needsToc && !embeddedToc) {
|
||||
// Add an embedded ToC if it's needed and there isn't one in the content already.
|
||||
titleEl!.insertAdjacentHTML('afterend', '<aio-toc class="embedded"></aio-toc>');
|
||||
} else if (!needsToc && embeddedToc && embeddedToc.parentNode !== null) {
|
||||
} else if (!needsToc && embeddedToc) {
|
||||
// Remove the embedded Toc if it's there and not needed.
|
||||
// We cannot use ChildNode.remove() because of IE11
|
||||
embeddedToc.parentNode.removeChild(embeddedToc);
|
||||
embeddedToc.remove();
|
||||
}
|
||||
|
||||
return () => {
|
||||
|
@ -14,4 +14,4 @@ export class Deployment {
|
||||
mode: string = this.location.search()['mode'] || environment.mode;
|
||||
|
||||
constructor(private location: LocationService) {}
|
||||
}
|
||||
};
|
||||
|
@ -68,10 +68,7 @@ export class TocService {
|
||||
}
|
||||
}
|
||||
// now remove the anchor
|
||||
if (anchorLink.parentNode !== null) {
|
||||
// We cannot use ChildNode.remove() because of IE11
|
||||
anchorLink.parentNode.removeChild(anchorLink);
|
||||
}
|
||||
anchorLink.remove();
|
||||
}
|
||||
// security: the document element which provides this heading content
|
||||
// is always authored by the documentation team and is considered to be safe
|
||||
|
@ -75,7 +75,6 @@
|
||||
],
|
||||
"radix": true,
|
||||
"semicolon": [
|
||||
true,
|
||||
"always"
|
||||
],
|
||||
"triple-equals": [
|
||||
|
@ -13,6 +13,3 @@ build --local_resources=14336,8.0,1.0
|
||||
|
||||
# Use the Angular 6 compiler
|
||||
build --define=compile=legacy
|
||||
|
||||
# Don't create symlinks
|
||||
build --symlink_prefix=/
|
||||
|
@ -37,9 +37,14 @@ ts_devserver(
|
||||
|
||||
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary", "rollup_bundle")
|
||||
|
||||
filegroup(
|
||||
name = "empty_node_modules",
|
||||
)
|
||||
|
||||
rollup_bundle(
|
||||
name = "bundle",
|
||||
entry_point = "src/main",
|
||||
node_modules = ":empty_node_modules",
|
||||
deps = ["//src"],
|
||||
)
|
||||
|
||||
|
@ -2,24 +2,24 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@bazel/bazel-darwin_x64@0.18.0":
|
||||
version "0.18.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.18.0.tgz#bab437605a702279d42f59caa4741bb327eb7dbc"
|
||||
integrity sha512-um2OzgLL2Gd/W6joOpvrSTcqpnupliPNpwe/uE7sB0huBSJ/4Im0w2IlCTI6C7OfgMcbpUj4YxgUa9T6u6WY6w==
|
||||
"@bazel/bazel-darwin_x64@0.20.0":
|
||||
version "0.20.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.20.0.tgz#648d61c32a3c5fccb7bf70b753071b6e54b11f21"
|
||||
integrity sha512-zeoeVK504341GfnaxdaB4pFzQV0YOK1HLiYj3/ocamPFxAJRh9abvKB8iOpqD5Oal0j7VsINxnXCjovp9a4urA==
|
||||
|
||||
"@bazel/bazel-linux_x64@0.18.0":
|
||||
version "0.18.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.18.0.tgz#0c02b2404ec95c180e17615cc7079ee07df48a69"
|
||||
integrity sha512-Rq8X8bL6SgQvbOHnfPhSgF6hp+f6Fbt2w6pRmBlFvV1J+CeUyrSrrRXfnnO1bjIuq05Ur3mV8ULA0qK6rtA5lQ==
|
||||
"@bazel/bazel-linux_x64@0.20.0":
|
||||
version "0.20.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.20.0.tgz#2568628a0d0b85dcc69d0ab701b1d6e10551357d"
|
||||
integrity sha512-PpHzoEqfXty8dc1/p1tVFXtbPyrE1n0N79QmYePjJ5mJMyW7uBF/zV4IajYY8+IpJEcDVq5v4BavSexOmVJRmA==
|
||||
|
||||
"@bazel/bazel-win32_x64@0.18.0":
|
||||
version "0.18.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.18.0.tgz#aa4575fb00066dcf59a6d464971774dea6a0bafd"
|
||||
integrity sha512-U2TbfK8B7dc3JqXSFwj2oXCQrxEaSzCCUkAHjAOIGOKzx/HLKIKs+NJj9IQkLLr7BsMU+Qqzo8aqo11E+Vs+aA==
|
||||
"@bazel/bazel-win32_x64@0.20.0":
|
||||
version "0.20.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.20.0.tgz#af7d041dae4c066e7aa8618949e2de1aad07495e"
|
||||
integrity sha512-3bqHXFBvLnbvNzr1KCQ1zryTYvHMoQffaWVekbckgPyT2VPEj3abuB91+DrRYmZdPjcgPYnjnyanxZHDkKuF2g==
|
||||
|
||||
"@bazel/bazel@file:../../node_modules/@bazel/bazel":
|
||||
version "0.18.0"
|
||||
version "0.20.0"
|
||||
optionalDependencies:
|
||||
"@bazel/bazel-darwin_x64" "0.18.0"
|
||||
"@bazel/bazel-linux_x64" "0.18.0"
|
||||
"@bazel/bazel-win32_x64" "0.18.0"
|
||||
"@bazel/bazel-darwin_x64" "0.20.0"
|
||||
"@bazel/bazel-linux_x64" "0.20.0"
|
||||
"@bazel/bazel-win32_x64" "0.20.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "angular-srcs",
|
||||
"version": "7.2.2",
|
||||
"version": "7.2.1",
|
||||
"private": true,
|
||||
"branchPattern": "2.0.*",
|
||||
"description": "Angular - a web framework for modern web apps",
|
||||
@ -146,9 +146,5 @@
|
||||
"vlq": "0.2.2",
|
||||
"vrsource-tslint-rules": "5.1.1",
|
||||
"webpack": "1.12.9"
|
||||
},
|
||||
"// 4": "natives is needed for gulp to work with node >= 10.13, see #28213",
|
||||
"resolutions": {
|
||||
"natives": "1.1.6"
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,6 @@ ng_module(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/animations",
|
||||
deps = [
|
||||
"//packages/core",
|
||||
],
|
||||
|
@ -12,7 +12,6 @@ ng_module(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/animations/browser",
|
||||
deps = [
|
||||
"//packages/animations",
|
||||
"//packages/core",
|
||||
|
@ -7,7 +7,6 @@ load("//tools:defaults.bzl", "ng_module")
|
||||
ng_module(
|
||||
name = "testing",
|
||||
srcs = glob(["**/*.ts"]),
|
||||
module_name = "@angular/animations/browser/testing",
|
||||
deps = [
|
||||
"//packages/animations",
|
||||
"//packages/animations/browser",
|
||||
|
@ -10,7 +10,6 @@ ts_library(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/benchpress",
|
||||
deps = [
|
||||
"//packages:types",
|
||||
"//packages/core",
|
||||
|
@ -10,7 +10,6 @@ ng_module(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/common",
|
||||
deps = [
|
||||
"//packages/core",
|
||||
"@rxjs",
|
||||
|
@ -12,7 +12,6 @@ ng_module(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/common/http",
|
||||
deps = [
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
|
@ -12,7 +12,6 @@ ng_module(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/common/http/testing",
|
||||
deps = [
|
||||
"//packages/common/http",
|
||||
"//packages/core",
|
||||
|
@ -8,7 +8,6 @@ ts_library(
|
||||
["**/*.ts"],
|
||||
exclude = ["closure-locale.ts"],
|
||||
),
|
||||
module_name = "@angular/common/locales",
|
||||
)
|
||||
|
||||
npm_package(
|
||||
|
@ -12,35 +12,21 @@ import {Directive, DoCheck, ElementRef, Input, KeyValueChanges, KeyValueDiffer,
|
||||
* @ngModule CommonModule
|
||||
*
|
||||
* @usageNotes
|
||||
*
|
||||
* Set the font of the containing element to the result of an expression.
|
||||
*
|
||||
* ```
|
||||
* <some-element [ngStyle]="{'font-style': styleExp}">...</some-element>
|
||||
* ```
|
||||
*
|
||||
* Set the width of the containing element to a pixel value returned by an expression.
|
||||
*
|
||||
* ```
|
||||
* <some-element [ngStyle]="{'max-width.px': widthExp}">...</some-element>
|
||||
* ```
|
||||
*
|
||||
* Set a collection of style values using an expression that returns key-value pairs.
|
||||
*
|
||||
* ```
|
||||
* <some-element [ngStyle]="objExp">...</some-element>
|
||||
* ```
|
||||
*
|
||||
* @description
|
||||
*
|
||||
* An attribute directive that updates styles for the containing HTML element.
|
||||
* Sets one or more style properties, specified as colon-separated key-value pairs.
|
||||
* The key is a style name, with an optional `.<unit>` suffix
|
||||
* (such as 'top.px', 'font-style.em').
|
||||
* The value is an expression to be evaluated.
|
||||
* The resulting non-null value, expressed in the given unit,
|
||||
* is assigned to the given style property.
|
||||
* If the result of evaluation is null, the corresponding style is removed.
|
||||
* Update an HTML element styles.
|
||||
*
|
||||
* The styles are updated according to the value of the expression evaluation:
|
||||
* - keys are style names with an optional `.<unit>` suffix (ie 'top.px', 'font-style.em'),
|
||||
* - values are the values assigned to those properties (expressed in the given unit).
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@ -55,24 +41,13 @@ export class NgStyle implements DoCheck {
|
||||
private _differs: KeyValueDiffers, private _ngEl: ElementRef, private _renderer: Renderer2) {}
|
||||
|
||||
@Input()
|
||||
set ngStyle(
|
||||
/**
|
||||
* A map of style properties, specified as colon-separated
|
||||
* key-value pairs.
|
||||
* * The key is a style name, with an optional `.<unit>` suffix
|
||||
* (such as 'top.px', 'font-style.em').
|
||||
* * The value is an expression to be evaluated.
|
||||
*/
|
||||
values: {[key: string]: string}) {
|
||||
set ngStyle(values: {[key: string]: string}) {
|
||||
this._ngStyle = values;
|
||||
if (!this._differ && values) {
|
||||
this._differ = this._differs.find(values).create();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies the new styles if needed.
|
||||
*/
|
||||
ngDoCheck() {
|
||||
if (this._differ) {
|
||||
const changes = this._differ.diff(this._ngStyle);
|
||||
|
@ -7,7 +7,6 @@ load("//tools:defaults.bzl", "ng_module")
|
||||
ng_module(
|
||||
name = "testing",
|
||||
srcs = glob(["**/*.ts"]),
|
||||
module_name = "@angular/common/testing",
|
||||
deps = [
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
|
@ -20,7 +20,6 @@ ts_library(
|
||||
"src/integrationtest/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/compiler-cli",
|
||||
tsconfig = ":tsconfig",
|
||||
deps = [
|
||||
"//packages/compiler",
|
||||
|
@ -8,7 +8,6 @@ ts_library(
|
||||
"*.ts",
|
||||
"**/*.ts",
|
||||
]),
|
||||
module_name = "@angular/compiler-cli/src/ngcc",
|
||||
deps = [
|
||||
"//packages:types",
|
||||
"//packages/compiler",
|
||||
|
@ -8,7 +8,6 @@ ts_library(
|
||||
"index.ts",
|
||||
"src/**/*.ts",
|
||||
]),
|
||||
module_name = "@angular/compiler-cli/src/ngtsc/annotations",
|
||||
deps = [
|
||||
"//packages/compiler",
|
||||
"//packages/compiler-cli/src/ngtsc/diagnostics",
|
||||
|
@ -8,7 +8,6 @@ ts_library(
|
||||
"index.ts",
|
||||
"src/**/*.ts",
|
||||
]),
|
||||
module_name = "@angular/compiler-cli/src/ngtsc/diagnostics",
|
||||
deps = [
|
||||
"//packages/compiler",
|
||||
"@ngdeps//typescript",
|
||||
|
@ -8,6 +8,5 @@ ts_library(
|
||||
"index.ts",
|
||||
"src/**/*.ts",
|
||||
]),
|
||||
module_name = "@angular/compiler-cli/src/ngtsc/host",
|
||||
deps = ["@ngdeps//typescript"],
|
||||
)
|
||||
|
@ -8,7 +8,6 @@ ts_library(
|
||||
"index.ts",
|
||||
"src/*.ts",
|
||||
]),
|
||||
module_name = "@angular/compiler-cli/src/ngtsc/metadata",
|
||||
deps = [
|
||||
"//packages:types",
|
||||
"//packages/compiler",
|
||||
|
@ -8,7 +8,6 @@ ts_library(
|
||||
"index.ts",
|
||||
"src/**/*.ts",
|
||||
]),
|
||||
module_name = "@angular/compiler-cli/src/ngtsc/shims",
|
||||
deps = [
|
||||
"//packages/compiler",
|
||||
"//packages/compiler-cli/src/ngtsc/host",
|
||||
|
@ -8,7 +8,6 @@ ts_library(
|
||||
"index.ts",
|
||||
"src/**/*.ts",
|
||||
]),
|
||||
module_name = "@angular/compiler-cli/src/ngtsc/switch",
|
||||
deps = [
|
||||
"//packages/compiler",
|
||||
"//packages/compiler-cli/src/ngtsc/host",
|
||||
|
@ -8,7 +8,6 @@ ts_library(
|
||||
"index.ts",
|
||||
"src/**/*.ts",
|
||||
]),
|
||||
module_name = "@angular/compiler-cli/src/ngtsc/transform",
|
||||
deps = [
|
||||
"//packages/compiler",
|
||||
"//packages/compiler-cli/src/ngtsc/diagnostics",
|
||||
|
@ -5,7 +5,6 @@ load("//tools:defaults.bzl", "ts_library")
|
||||
ts_library(
|
||||
name = "translator",
|
||||
srcs = glob(["**/*.ts"]),
|
||||
module_name = "@angular/compiler-cli/src/ngtsc/translator",
|
||||
deps = [
|
||||
"//packages:types",
|
||||
"//packages/compiler",
|
||||
|
@ -5,7 +5,6 @@ load("//tools:defaults.bzl", "ts_library")
|
||||
ts_library(
|
||||
name = "typecheck",
|
||||
srcs = glob(["**/*.ts"]),
|
||||
module_name = "@angular/compiler-cli/src/ngtsc/typecheck",
|
||||
deps = [
|
||||
"//packages:types",
|
||||
"//packages/compiler",
|
||||
|
@ -8,7 +8,6 @@ ts_library(
|
||||
"index.ts",
|
||||
"src/**/*.ts",
|
||||
]),
|
||||
module_name = "@angular/compiler-cli/src/ngtsc/util",
|
||||
deps = [
|
||||
"//packages:types",
|
||||
"@ngdeps//@types/node",
|
||||
|
@ -10,7 +10,6 @@ ts_library(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/compiler",
|
||||
)
|
||||
|
||||
ng_package(
|
||||
|
@ -10,7 +10,6 @@ ng_module(
|
||||
["**/*.ts"],
|
||||
exclude = ["testing.ts"],
|
||||
),
|
||||
module_name = "@angular/compiler/testing",
|
||||
deps = [
|
||||
"//packages:types",
|
||||
"//packages/compiler",
|
||||
|
@ -10,7 +10,6 @@ ng_module(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/core",
|
||||
deps = [
|
||||
"//packages:types",
|
||||
"@ngdeps//zone.js",
|
||||
|
@ -9,7 +9,6 @@ ng_module(
|
||||
srcs = glob(
|
||||
["**/*.ts"],
|
||||
),
|
||||
module_name = "@angular/core/testing",
|
||||
deps = [
|
||||
"//packages:types",
|
||||
"//packages/core",
|
||||
|
@ -10,7 +10,6 @@ ng_module(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/elements",
|
||||
deps = [
|
||||
"//packages/core",
|
||||
"//packages/platform-browser",
|
||||
|
@ -10,7 +10,6 @@ ng_module(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/forms",
|
||||
deps = [
|
||||
"//packages/core",
|
||||
"//packages/platform-browser",
|
||||
|
@ -10,7 +10,6 @@ ng_module(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/http",
|
||||
deps = [
|
||||
"//packages/core",
|
||||
"//packages/platform-browser",
|
||||
|
@ -7,7 +7,6 @@ load("//tools:defaults.bzl", "ng_module")
|
||||
ng_module(
|
||||
name = "testing",
|
||||
srcs = glob(["**/*.ts"]),
|
||||
module_name = "@angular/http/testing",
|
||||
deps = [
|
||||
"//packages/core",
|
||||
"//packages/http",
|
||||
|
@ -10,7 +10,6 @@ ts_library(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/language-service",
|
||||
deps = [
|
||||
"//packages:types",
|
||||
"//packages/compiler",
|
||||
|
@ -10,7 +10,6 @@ ng_module(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/platform-browser-dynamic",
|
||||
deps = [
|
||||
"//packages:types",
|
||||
"//packages/common",
|
||||
|
@ -7,7 +7,6 @@ load("//tools:defaults.bzl", "ng_module")
|
||||
ng_module(
|
||||
name = "testing",
|
||||
srcs = glob(["**/*.ts"]),
|
||||
module_name = "@angular/platform-browser-dynamic/testing",
|
||||
deps = [
|
||||
"//packages/compiler",
|
||||
"//packages/compiler/testing",
|
||||
|
@ -10,7 +10,6 @@ ng_module(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/platform-browser",
|
||||
deps = [
|
||||
"//packages:types",
|
||||
"//packages/common",
|
||||
|
@ -12,7 +12,6 @@ ng_module(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/platform-browser/animations",
|
||||
deps = [
|
||||
"//packages/animations",
|
||||
"//packages/animations/browser",
|
||||
|
@ -7,7 +7,6 @@ load("//tools:defaults.bzl", "ng_module")
|
||||
ng_module(
|
||||
name = "testing",
|
||||
srcs = glob(["**/*.ts"]),
|
||||
module_name = "@angular/platform-browser/testing",
|
||||
deps = [
|
||||
"//packages/core",
|
||||
"//packages/core/testing",
|
||||
|
@ -10,7 +10,6 @@ ng_module(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/platform-server",
|
||||
deps = [
|
||||
"//packages/animations/browser",
|
||||
"//packages/common",
|
||||
|
@ -43,6 +43,8 @@ export class ServerRendererFactory2 implements RendererFactory2 {
|
||||
(<EmulatedEncapsulationServerRenderer2>renderer).applyToHost(element);
|
||||
return renderer;
|
||||
}
|
||||
case ViewEncapsulation.Native:
|
||||
throw new Error('Native encapsulation is not supported on the server!');
|
||||
default: {
|
||||
if (!this.rendererByCompId.has(type.id)) {
|
||||
const styles = flattenStyles(type.id, type.styles, []);
|
||||
|
@ -7,7 +7,6 @@ load("//tools:defaults.bzl", "ng_module")
|
||||
ng_module(
|
||||
name = "testing",
|
||||
srcs = glob(["**/*.ts"]),
|
||||
module_name = "@angular/platform-server/testing",
|
||||
deps = [
|
||||
"//packages/core",
|
||||
"//packages/platform-browser-dynamic/testing",
|
||||
|
@ -10,7 +10,6 @@ ng_module(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/platform-webworker-dynamic",
|
||||
deps = [
|
||||
"//packages:types",
|
||||
"//packages/common",
|
||||
|
@ -10,7 +10,6 @@ ng_module(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/platform-webworker",
|
||||
deps = [
|
||||
"//packages:types",
|
||||
"//packages/common",
|
||||
|
@ -10,7 +10,6 @@ ng_module(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/router",
|
||||
deps = [
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
|
@ -505,10 +505,8 @@ export class Router {
|
||||
|
||||
// Update URL if in `eager` update mode
|
||||
tap(t => {
|
||||
if (this.urlUpdateStrategy === 'eager') {
|
||||
if (!t.extras.skipLocationChange) {
|
||||
this.setBrowserUrl(t.urlAfterRedirects, !!t.extras.replaceUrl, t.id);
|
||||
}
|
||||
if (this.urlUpdateStrategy === 'eager' && !t.extras.skipLocationChange) {
|
||||
this.setBrowserUrl(t.urlAfterRedirects, !!t.extras.replaceUrl, t.id);
|
||||
this.browserUrlTree = t.urlAfterRedirects;
|
||||
}
|
||||
}),
|
||||
@ -671,11 +669,8 @@ export class Router {
|
||||
|
||||
(this as{routerState: RouterState}).routerState = t.targetRouterState !;
|
||||
|
||||
if (this.urlUpdateStrategy === 'deferred') {
|
||||
if (!t.extras.skipLocationChange) {
|
||||
this.setBrowserUrl(
|
||||
this.rawUrlTree, !!t.extras.replaceUrl, t.id, t.extras.state);
|
||||
}
|
||||
if (this.urlUpdateStrategy === 'deferred' && !t.extras.skipLocationChange) {
|
||||
this.setBrowserUrl(this.rawUrlTree, !!t.extras.replaceUrl, t.id, t.extras.state);
|
||||
this.browserUrlTree = t.urlAfterRedirects;
|
||||
}
|
||||
}),
|
||||
|
@ -575,27 +575,6 @@ describe('Integration', () => {
|
||||
expect(fixture.nativeElement).toHaveText('team 33 [ , right: ]');
|
||||
})));
|
||||
|
||||
it('should navigate after navigation with skipLocationChange',
|
||||
fakeAsync(inject([Router, Location], (router: Router, location: Location) => {
|
||||
const fixture = TestBed.createComponent(RootCmpWithNamedOutlet);
|
||||
advance(fixture);
|
||||
|
||||
router.resetConfig([{path: 'show', outlet: 'main', component: SimpleCmp}]);
|
||||
|
||||
router.navigate([{outlets: {main: 'show'}}], {skipLocationChange: true});
|
||||
advance(fixture);
|
||||
expect(location.path()).toEqual('');
|
||||
|
||||
expect(fixture.nativeElement).toHaveText('main [simple]');
|
||||
|
||||
router.navigate([{outlets: {main: null}}], {skipLocationChange: true});
|
||||
advance(fixture);
|
||||
|
||||
expect(location.path()).toEqual('');
|
||||
|
||||
expect(fixture.nativeElement).toHaveText('main []');
|
||||
})));
|
||||
|
||||
describe('"eager" urlUpdateStrategy', () => {
|
||||
beforeEach(() => {
|
||||
const serializer = new DefaultUrlSerializer();
|
||||
@ -4911,10 +4890,6 @@ class RootCmpWithOnInit {
|
||||
class RootCmpWithTwoOutlets {
|
||||
}
|
||||
|
||||
@Component({selector: 'root-cmp', template: `main [<router-outlet name="main"></router-outlet>]`})
|
||||
class RootCmpWithNamedOutlet {
|
||||
}
|
||||
|
||||
@Component({selector: 'throwing-cmp', template: ''})
|
||||
class ThrowingCmp {
|
||||
constructor() { throw new Error('Throwing Cmp'); }
|
||||
@ -4966,7 +4941,6 @@ class LazyComponent {
|
||||
RootCmp,
|
||||
RelativeLinkInIfCmp,
|
||||
RootCmpWithTwoOutlets,
|
||||
RootCmpWithNamedOutlet,
|
||||
EmptyQueryParamsCmp,
|
||||
ThrowingCmp
|
||||
],
|
||||
@ -4997,7 +4971,6 @@ class LazyComponent {
|
||||
RootCmpWithOnInit,
|
||||
RelativeLinkInIfCmp,
|
||||
RootCmpWithTwoOutlets,
|
||||
RootCmpWithNamedOutlet,
|
||||
EmptyQueryParamsCmp,
|
||||
ThrowingCmp
|
||||
],
|
||||
@ -5029,7 +5002,6 @@ class LazyComponent {
|
||||
RootCmpWithOnInit,
|
||||
RelativeLinkInIfCmp,
|
||||
RootCmpWithTwoOutlets,
|
||||
RootCmpWithNamedOutlet,
|
||||
EmptyQueryParamsCmp,
|
||||
ThrowingCmp
|
||||
]
|
||||
|
@ -7,7 +7,6 @@ load("//tools:defaults.bzl", "ng_module")
|
||||
ng_module(
|
||||
name = "testing",
|
||||
srcs = glob(["**/*.ts"]),
|
||||
module_name = "@angular/router/testing",
|
||||
deps = [
|
||||
"//packages/common",
|
||||
"//packages/common/testing",
|
||||
|
@ -12,7 +12,6 @@ ng_module(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/router/upgrade",
|
||||
deps = [
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
|
@ -10,7 +10,6 @@ ng_module(
|
||||
"src/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/service-worker",
|
||||
deps = [
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
|
@ -10,6 +10,5 @@ ng_module(
|
||||
"*.ts",
|
||||
"src/**/*.ts",
|
||||
]),
|
||||
module_name = "@angular/service-worker/config",
|
||||
deps = ["//packages/core"],
|
||||
)
|
||||
|
@ -6,7 +6,6 @@ ng_module(
|
||||
name = "testing",
|
||||
testonly = True,
|
||||
srcs = glob(["**/*.ts"]),
|
||||
module_name = "@angular/service-worker/testing",
|
||||
deps = [
|
||||
"//packages/core",
|
||||
"@rxjs",
|
||||
|
@ -11,7 +11,6 @@ ng_module(
|
||||
"src/dynamic/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/upgrade",
|
||||
deps = [
|
||||
"//packages/core",
|
||||
"//packages/platform-browser",
|
||||
|
@ -15,7 +15,6 @@ ng_module(
|
||||
"src/static/**/*.ts",
|
||||
],
|
||||
),
|
||||
module_name = "@angular/upgrade/static",
|
||||
deps = [
|
||||
"//packages/core",
|
||||
"//packages/platform-browser",
|
||||
|
@ -1,9 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# https://www.tldp.org/LDP/abs/html/options.html#AEN19601
|
||||
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
|
||||
set -u -e -E -o pipefail
|
||||
|
||||
set -u -e -o pipefail
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
BASEDIR=`(cd $BASEDIR; pwd)`
|
||||
@ -110,26 +107,11 @@ REWRITE_MESSAGE="git filter-branch -f --msg-filter \"$BASEDIR/utils/github_close
|
||||
PUSH_BRANCHES="git push git@github.com:angular/angular.git merge_pr_master:$MASTER_BRANCH merge_pr_patch:$PATCH_BRANCH"
|
||||
CHERRY_PICK_PR="git cherry-pick merge_pr_base..merge_pr"
|
||||
|
||||
# Checks that each PR branch to be merged upstream contains SHAs of commits that significantly changed our CI infrastructure.
|
||||
#
|
||||
# This check is used to enforce that we don't merge PRs that have not been rebased recently and could result in merging
|
||||
# of non-approved or otherwise bad changes.
|
||||
REQUIRED_BASE_SHA_MASTER="3fba6eff79a9b50909199eaa4ebf754c1c4adba6" # pullapprove => CODEOWNERS migration
|
||||
REQUIRED_BASE_SHA_PATCH="e3853e842ea5c10fafbc310a76a4a7f47ed8c65e" # pullapprove => CODEOWNERS migration
|
||||
if [[ $MERGE_MASTER == 1 ]]; then
|
||||
REQUIRED_BASE_SHA="$REQUIRED_BASE_SHA_MASTER"
|
||||
# check patch only if patch-only PR
|
||||
elif [[ $MERGE_PATCH == 1 ]]; then
|
||||
REQUIRED_BASE_SHA="$REQUIRED_BASE_SHA_PATCH"
|
||||
fi
|
||||
CHECK_IF_PR_REBASED="git branch --quiet merge_pr --contains $REQUIRED_BASE_SHA"
|
||||
|
||||
echo "======================"
|
||||
echo "GitHub Merge PR Steps"
|
||||
echo "======================"
|
||||
echo " $FETCH_PR"
|
||||
echo " $BASE_PR"
|
||||
echo " $CHECK_IF_PR_REBASED"
|
||||
echo " $SQUASH_PR"
|
||||
echo " $REWRITE_MESSAGE"
|
||||
if [[ $MERGE_MASTER == 1 ]]; then
|
||||
@ -145,19 +127,6 @@ echo ">>> Fetch PR: $FETCH_PR"
|
||||
$FETCH_PR
|
||||
echo ">>> Mark base: $BASE_PR"
|
||||
$BASE_PR
|
||||
echo ">>> Check if PR rebased: $CHECK_IF_PR_REBASED"
|
||||
if [[ $($CHECK_IF_PR_REBASED) != "" ]]; then
|
||||
echo "The PR is sufficiently rebased!"
|
||||
else
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Failed to merge pull request #${PR_NUMBER} because it hasn't been rebased recently and could be bypassing new or updated CI checks!"
|
||||
echo ""
|
||||
echo "Please rebase the PR and try again."
|
||||
echo ""
|
||||
$RESTORE_BRANCH
|
||||
exit 1
|
||||
fi
|
||||
echo ">>> Autosquash: $SQUASH_PR"
|
||||
GIT_EDITOR=echo $SQUASH_PR
|
||||
echo ">>> Rewrite message: $REWRITE_MESSAGE"
|
||||
@ -184,3 +153,4 @@ if [[ $PUSH_UPSTREAM == 1 ]]; then
|
||||
fi
|
||||
echo
|
||||
echo ">>>>>> SUCCESS <<<<<< PR#$PR_NUMBER merged."
|
||||
|
||||
|
@ -44,7 +44,38 @@ PKG_GROUP_REPLACEMENTS = {
|
||||
]""" % ",\n ".join(["\"%s\"" % s for s in ANGULAR_SCOPED_PACKAGES]),
|
||||
}
|
||||
|
||||
def ts_library(tsconfig = None, testonly = False, deps = [], **kwargs):
|
||||
def _default_module_name(testonly):
|
||||
""" Provide better defaults for package names.
|
||||
|
||||
e.g. rather than angular/packages/core/testing we want @angular/core/testing
|
||||
|
||||
TODO(alexeagle): we ought to supply a default module name for every library in the repo.
|
||||
But we short-circuit below in cases that are currently not working.
|
||||
"""
|
||||
pkg = native.package_name()
|
||||
|
||||
if testonly:
|
||||
# Some tests currently rely on the long-form package names
|
||||
return None
|
||||
|
||||
if pkg.startswith("packages/bazel"):
|
||||
# Avoid infinite recursion in the ViewEngine compiler. Error looks like:
|
||||
# Compiling Angular templates (ngc) //packages/bazel/test/ngc-wrapped/empty:empty failed (Exit 1)
|
||||
# : RangeError: Maximum call stack size exceeded
|
||||
# at normalizeString (path.js:57:25)
|
||||
# at Object.normalize (path.js:1132:12)
|
||||
# at Object.join (path.js:1167:18)
|
||||
# at resolveModule (execroot/angular/bazel-out/host/bin/packages/bazel/src/ngc-wrapped/ngc-wrapped.runfiles/angular/packages/compiler-cli/src/metadata/bundler.js:582:50)
|
||||
# at MetadataBundler.exportAll (execroot/angular/bazel-out/host/bin/packages/bazel/src/ngc-wrapped/ngc-wrapped.runfiles/angular/packages/compiler-cli/src/metadata/bundler.js:119:42)
|
||||
# at MetadataBundler.exportAll (execroot/angular/bazel-out/host/bin/packages/bazel/src/ngc-wrapped/ngc-wrapped.runfiles/angular/packages/compiler-cli/src/metadata/bundler.js:121:52)
|
||||
return None
|
||||
|
||||
if pkg.startswith("packages/"):
|
||||
return "@angular/" + pkg[len("packages/"):]
|
||||
|
||||
return None
|
||||
|
||||
def ts_library(tsconfig = None, testonly = False, deps = [], module_name = None, **kwargs):
|
||||
"""Default values for ts_library"""
|
||||
deps = deps + ["@ngdeps//tslib"]
|
||||
if testonly:
|
||||
@ -57,15 +88,19 @@ def ts_library(tsconfig = None, testonly = False, deps = [], **kwargs):
|
||||
else:
|
||||
tsconfig = _DEFAULT_TSCONFIG_BUILD
|
||||
|
||||
if not module_name:
|
||||
module_name = _default_module_name(testonly)
|
||||
|
||||
_ts_library(
|
||||
tsconfig = tsconfig,
|
||||
testonly = testonly,
|
||||
deps = deps,
|
||||
node_modules = _DEFAULT_TS_TYPINGS,
|
||||
module_name = module_name,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps = [], **kwargs):
|
||||
def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps = [], module_name = None, **kwargs):
|
||||
"""Default values for ng_module"""
|
||||
deps = deps + ["@ngdeps//tslib"]
|
||||
if testonly:
|
||||
@ -77,6 +112,8 @@ def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps
|
||||
tsconfig = _DEFAULT_TSCONFIG_TEST
|
||||
else:
|
||||
tsconfig = _DEFAULT_TSCONFIG_BUILD
|
||||
if not module_name:
|
||||
module_name = _default_module_name(testonly)
|
||||
if not entry_point:
|
||||
entry_point = "public_api.ts"
|
||||
_ng_module(
|
||||
@ -89,6 +126,7 @@ def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps
|
||||
compiler = _INTERNAL_NG_MODULE_COMPILER,
|
||||
ng_xi18n = _INTERNAL_NG_MODULE_XI18N,
|
||||
node_modules = _DEFAULT_TS_TYPINGS,
|
||||
module_name = module_name,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
|
@ -6122,10 +6122,10 @@ nanomatch@^1.2.9:
|
||||
snapdragon "^0.8.1"
|
||||
to-regex "^3.0.1"
|
||||
|
||||
natives@1.1.6, natives@^1.1.0:
|
||||
version "1.1.6"
|
||||
resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.6.tgz#a603b4a498ab77173612b9ea1acdec4d980f00bb"
|
||||
integrity sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA==
|
||||
natives@^1.1.0:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.4.tgz#2f0f224fc9a7dd53407c7667c84cf8dbe773de58"
|
||||
integrity sha512-Q29yeg9aFKwhLVdkTAejM/HvYG0Y1Am1+HUkFQGn5k2j8GS+v60TVmZh6nujpEAj/qql+wGUrlryO8bF+b1jEg==
|
||||
|
||||
needle@^2.2.1:
|
||||
version "2.2.4"
|
||||
|
Reference in New Issue
Block a user