Compare commits
457 Commits
8.0.0-rc.2
...
7.2.x
Author | SHA1 | Date | |
---|---|---|---|
dbbfab3ee8 | |||
b87ae8e5f9 | |||
8b1d28ff48 | |||
463e967abb | |||
71b8bbef95 | |||
a2cf677714 | |||
9e1ce318a8 | |||
a00c2a9210 | |||
a677d8b330 | |||
7fe89ba4ea | |||
a8af83bf36 | |||
c75e16aae8 | |||
1affcc63c0 | |||
34395aeea1 | |||
f64de2e9f3 | |||
86ad77c1b1 | |||
d5c815f1f2 | |||
32c6d5313a | |||
388c1a3638 | |||
334a3ba125 | |||
fd1d161844 | |||
280ea13342 | |||
3b1e539bab | |||
8e57965e3c | |||
761bb0aafd | |||
1b881b6ba2 | |||
f03d724fea | |||
cf8d934ba9 | |||
67f4852acb | |||
08f6a64893 | |||
ee49bbebc7 | |||
da78b02d71 | |||
d787925841 | |||
4e6efb361d | |||
aa371335dc | |||
090b6d92da | |||
a5cbfa2aab | |||
e8ed37a0e7 | |||
e5cbebef0d | |||
654ec1570a | |||
728d903a67 | |||
495f8e1bc6 | |||
d778a65447 | |||
e8dbba417d | |||
00c145f14c | |||
8c4c9858a2 | |||
caf3a53385 | |||
6ba1cd4365 | |||
bb18cba253 | |||
5abb9360d8 | |||
16c59aecf1 | |||
47d1216f6b | |||
5e614bfda8 | |||
efecf36eb5 | |||
b68d29791f | |||
136cd097c8 | |||
7be198a8e3 | |||
b4ee74667b | |||
67444e70ab | |||
09e55eabf3 | |||
1c838eb976 | |||
24ec9e57ad | |||
190330a612 | |||
9417086f6c | |||
535ff0564a | |||
e8c8ec7075 | |||
03d2813c20 | |||
fb5b2a89cd | |||
ea495d958f | |||
2edb87e7f8 | |||
903d28fe86 | |||
6945f7978e | |||
27afe01910 | |||
36b6110e7d | |||
24a1e146da | |||
2256920292 | |||
2a25ac2ac9 | |||
56693339c2 | |||
c976b88dcf | |||
3e08794abf | |||
b598e884f6 | |||
cf916a03d3 | |||
ee6498f37e | |||
1a0b2ff4fb | |||
dfb331cd18 | |||
11c926ce47 | |||
a0119b1144 | |||
c938fb4619 | |||
2f49a23d64 | |||
c6eaaf5b3d | |||
5e38ec8acc | |||
0cd5964f67 | |||
f3938a6a2b | |||
3baa74449c | |||
df4e97c81e | |||
d629f2c6a8 | |||
6ee47d5e76 | |||
9226b421e8 | |||
b06847f43d | |||
a54a752147 | |||
d00a2e8920 | |||
86981b395d | |||
feec963106 | |||
09fc669b4f | |||
cb339b87f3 | |||
fdcf877f83 | |||
5b5b9897c9 | |||
0e7365724e | |||
4ef1a3cd97 | |||
38b5ed05ea | |||
642c015f23 | |||
0977d95802 | |||
d374787db6 | |||
a634deb885 | |||
bcbd7ed8f0 | |||
f7de2be3f3 | |||
1e97d511c7 | |||
7e1e00c21e | |||
481f4b7412 | |||
4bc0084e5a | |||
b6864494a1 | |||
0021437ee1 | |||
d91ecd2c8b | |||
d0018e6bf6 | |||
587ca854cc | |||
8b9f03d9fa | |||
40f1f94fe0 | |||
2270467d60 | |||
8efda5b353 | |||
7b7f2d9c1b | |||
c469e25cf2 | |||
a21cde2960 | |||
9b774348b3 | |||
ce219ccfa2 | |||
53bbb01047 | |||
c6741bf36a | |||
cc06bf50f3 | |||
21e78ad022 | |||
05e855092b | |||
2817764433 | |||
145639d0f8 | |||
3eb327b67b | |||
be6af26dc1 | |||
637e81e9bb | |||
abc3cbb33f | |||
27eb8f2723 | |||
81671cea9a | |||
843fc7df9f | |||
cfe4732e41 | |||
48cabb44c7 | |||
9d0db2fe4b | |||
069146e7f3 | |||
fc895ba189 | |||
9a51528072 | |||
7fc38d4947 | |||
b1f84ec78f | |||
f351e8a5b1 | |||
ff2c342356 | |||
01b05b3f7c | |||
3b78f9eb0f | |||
f6ca619343 | |||
ab69c31fc5 | |||
38de40c9ec | |||
53352c40c3 | |||
dd3cab6eb1 | |||
ea1a3d3603 | |||
cf1b436010 | |||
cdcbb53a2d | |||
db2db6e7f5 | |||
1df6b16263 | |||
f4871212b7 | |||
2a23eca917 | |||
b5da4c6676 | |||
b8c2f3b93f | |||
75cf86e70f | |||
bf25165354 | |||
a2ba4448da | |||
ac6b2b4dc3 | |||
b6dffa9763 | |||
54b57def58 | |||
e2b3cc8118 | |||
5e701a2c88 | |||
27a3df146d | |||
8cce7efbb2 | |||
d225c3a6e3 | |||
b23582d57e | |||
d3c6e512a3 | |||
a873fab10c | |||
ecef0dd65e | |||
1cc74eaece | |||
e2b3be87cb | |||
3ca6c928f9 | |||
5933d16f3e | |||
0f839bcfd0 | |||
edda94edfa | |||
b5e36eaa3e | |||
08a1f51704 | |||
9690e36f78 | |||
68e741227b | |||
50a2327520 | |||
b07346c8e3 | |||
8e95849751 | |||
cd143f67af | |||
dd85351162 | |||
c1c68889de | |||
866f4be782 | |||
80e4019c83 | |||
d9f3316021 | |||
424a3b95aa | |||
7e883c2319 | |||
6a7fd70ddf | |||
73f9db53c2 | |||
2bf526bbfb | |||
8bd7d5befc | |||
aa163bea93 | |||
2f73c554c9 | |||
fb2d15fda1 | |||
018507fa02 | |||
95bb72d322 | |||
ce6e6c3f81 | |||
e4b1bdbfa0 | |||
6477c9e04a | |||
3f380b3b78 | |||
c4c0e9dbc5 | |||
4ddf57c58d | |||
624f01c311 | |||
6a713521e3 | |||
57a5ba3438 | |||
1b6fb5bc19 | |||
bd9da268c1 | |||
1e58a2194f | |||
da81c9cb54 | |||
ef6d26d4fa | |||
13bc1cd853 | |||
1fa1379318 | |||
d9efacc07e | |||
47f5b5f2d4 | |||
019fe77f64 | |||
a0e3a8e0f7 | |||
8908156eae | |||
2ee265fb1f | |||
116512b06d | |||
1d841973eb | |||
3694e1a38c | |||
88d8813ccc | |||
49bfb63442 | |||
48848c9ca4 | |||
a1f1ea993d | |||
be8a403bc9 | |||
c378402af4 | |||
91ce8c17ff | |||
786be967fd | |||
e88d5e0df2 | |||
f39f01e00b | |||
ce750e6f5b | |||
beba944843 | |||
50981cbb1f | |||
76e40eed35 | |||
d491a20f3b | |||
74c202a5cd | |||
483e8d28ec | |||
a6fd118f79 | |||
fe6e76c1e7 | |||
de560019f2 | |||
52ed53d071 | |||
5b72d4d676 | |||
c1aa1bf872 | |||
dad1bc7ca3 | |||
2109c30afe | |||
874919a25b | |||
c64e666755 | |||
1da403d8f3 | |||
60c5ebd46a | |||
b71d1987cd | |||
e6325eb9ef | |||
114519ab6a | |||
a9a095d44a | |||
5f9d574d4d | |||
baeb446392 | |||
0d1bfdc505 | |||
fa130e9445 | |||
194710fc1d | |||
6ae5e2b32a | |||
d85d396c26 | |||
1a25144297 | |||
449da8c18e | |||
0f37ed1060 | |||
5c85b4f1e9 | |||
22bc6ef22a | |||
bf928d1c9e | |||
d11c2f915b | |||
98c99e5073 | |||
2c63108faa | |||
0ff48a1266 | |||
ea2a3f8335 | |||
cbed4851a3 | |||
7c157780a9 | |||
cc1b2a5373 | |||
5076185fc8 | |||
65375f4c21 | |||
068a6070dc | |||
47e9761a01 | |||
bef52d20b5 | |||
fe50710021 | |||
71b66fb862 | |||
8db05b408e | |||
351610ca8d | |||
ef78e33560 | |||
12b8a6e351 | |||
260ac20e92 | |||
aed48e00d2 | |||
a9d46e4952 | |||
2f19ad9b46 | |||
81678e62db | |||
cf82fbceba | |||
1d67cb0ce1 | |||
318bd83a6e | |||
f767c22b31 | |||
8346a6dca2 | |||
6397885e74 | |||
8cee56e8c5 | |||
a1b9995731 | |||
35f7ff047a | |||
4ad691a33d | |||
c5af3f8617 | |||
bc1032866c | |||
63e6d1a896 | |||
cb9fd9b4d7 | |||
d5dca0764c | |||
bcd1a09dec | |||
898c0134e7 | |||
763d2150cc | |||
beacbfcb8e | |||
f72319cf6e | |||
5877b3f702 | |||
cf310ba1fa | |||
c2d2953ee4 | |||
5c5fe34241 | |||
32737a6bf7 | |||
7642308c14 | |||
f1c08d83b0 | |||
617412f9c3 | |||
cf716684a9 | |||
54565ed389 | |||
ab08385336 | |||
eb8ccf65d1 | |||
cb93027f32 | |||
607fd8e970 | |||
f4ac96d0ff | |||
1c7d156abd | |||
4c00059260 | |||
93d78c9c51 | |||
49bee4c0d8 | |||
d8c75f1bb0 | |||
6d40ef2d6b | |||
4ea6c27dcf | |||
a4d9192fbc | |||
7b772e93a3 | |||
05168395b0 | |||
03293c4fec | |||
479019f457 | |||
68515818b9 | |||
8bc369f828 | |||
3d1a4d5cc3 | |||
5c56b778e0 | |||
585e871c96 | |||
6ae7aee2c3 | |||
701270d039 | |||
02a852a34a | |||
531f940212 | |||
de80f1b6dd | |||
ca3965afe0 | |||
f269e433a7 | |||
8750b09fca | |||
ea2eef737b | |||
0ceab97a03 | |||
fbbdaaacc0 | |||
080de58a88 | |||
5390948360 | |||
0d860051af | |||
edbba24b60 | |||
6ae8d7691d | |||
af3cf36ce9 | |||
1be2f11965 | |||
495ce325b2 | |||
92411043d1 | |||
aa3f75b3c9 | |||
d64aadf57a | |||
51f7f081a3 | |||
b9fd62413f | |||
c5664bf245 | |||
c66a076614 | |||
28d34b699d | |||
47840bee71 | |||
305331f634 | |||
5e6c24cb01 | |||
0ec4e1372a | |||
84c1bad3a1 | |||
1640832f56 | |||
8ab036262d | |||
76e8c0ac7b | |||
0e81e418fb | |||
60255b68c0 | |||
ae7b3c8d45 | |||
9556ba7bca | |||
80994b25b9 | |||
2f154b980f | |||
342d352a00 | |||
f240ae5084 | |||
e4fc8bad35 | |||
5c680d4aa8 | |||
f05c5f82c8 | |||
2e0c58ec3e | |||
21093b9090 | |||
a6153accf0 | |||
dee789c204 | |||
12dd552fcd | |||
079bcffe07 | |||
30256e8fe8 | |||
8ee69831fc | |||
c3d8e2888d | |||
bea677136b | |||
11728bbbd9 | |||
1da4b03940 | |||
54ba0f021f | |||
836a5c72a0 | |||
f589933440 | |||
ef3ec34aa3 | |||
37a6d2d033 | |||
354f3639bb | |||
c4b06868b1 | |||
e3853e842e | |||
aee5cbd057 | |||
e9614eff1a | |||
80f9f7e8ef | |||
7d2589556f | |||
468fcab59d | |||
f720e972d4 | |||
b51ae7e59a | |||
eedb06936f | |||
ee5a094424 | |||
9773b5a173 | |||
eed171839e | |||
1057b52def | |||
302506e940 | |||
cc35feb445 | |||
21b875d4d0 | |||
dac9c09235 | |||
5cba438eb5 | |||
2b001cb2b1 | |||
0be8487f09 | |||
e1e69ca828 | |||
f376c46d78 | |||
fad4145f48 | |||
6b394f62be | |||
16aad8b2d8 | |||
25bbcbcbe5 |
@ -4,4 +4,3 @@ aio/content
|
|||||||
aio/node_modules
|
aio/node_modules
|
||||||
aio/tools/examples/shared/node_modules
|
aio/tools/examples/shared/node_modules
|
||||||
integration/bazel
|
integration/bazel
|
||||||
packages/bazel/node_modules
|
|
||||||
|
31
.bazelrc
31
.bazelrc
@ -10,10 +10,8 @@ build:angular-team --remote_http_cache=https://storage.googleapis.com/angular-te
|
|||||||
|
|
||||||
# Make compilation fast, by keeping a few copies of the compilers
|
# Make compilation fast, by keeping a few copies of the compilers
|
||||||
# running as daemons, and cache SourceFile AST's to reduce parse time.
|
# running as daemons, and cache SourceFile AST's to reduce parse time.
|
||||||
|
build --strategy=TypeScriptCompile=worker
|
||||||
build --strategy=AngularTemplateCompile=worker
|
build --strategy=AngularTemplateCompile=worker
|
||||||
# TODO(alexeagle): re-enable after fixing worker instability with rxjs typings
|
|
||||||
# build --strategy=TypeScriptCompile=worker
|
|
||||||
build --strategy=TypeScriptCompile=standalone
|
|
||||||
|
|
||||||
# Enable debugging tests with --config=debug
|
# Enable debugging tests with --config=debug
|
||||||
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results
|
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results
|
||||||
@ -35,9 +33,8 @@ test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test
|
|||||||
# See https://github.com/bazelbuild/bazel/issues/4603
|
# See https://github.com/bazelbuild/bazel/issues/4603
|
||||||
build --symlink_prefix=dist/
|
build --symlink_prefix=dist/
|
||||||
|
|
||||||
# Disable watchfs as it causes tests to be flaky on Windows
|
# Performance: avoid stat'ing input files
|
||||||
# https://github.com/angular/angular/issues/29541
|
build --watchfs
|
||||||
build --nowatchfs
|
|
||||||
|
|
||||||
# Turn off legacy external runfiles
|
# Turn off legacy external runfiles
|
||||||
run --nolegacy_external_runfiles
|
run --nolegacy_external_runfiles
|
||||||
@ -53,22 +50,6 @@ build --incompatible_strict_action_env
|
|||||||
run --incompatible_strict_action_env
|
run --incompatible_strict_action_env
|
||||||
test --incompatible_strict_action_env
|
test --incompatible_strict_action_env
|
||||||
|
|
||||||
###############################
|
|
||||||
# Saucelabs support #
|
|
||||||
# Turn on these settings with #
|
|
||||||
# --config=saucelabs #
|
|
||||||
###############################
|
|
||||||
|
|
||||||
# Expose SauceLabs environment to actions
|
|
||||||
# These environment variables are needed by
|
|
||||||
# web_test_karma to run on Saucelabs
|
|
||||||
test:saucelabs --action_env=SAUCE_USERNAME
|
|
||||||
test:saucelabs --action_env=SAUCE_ACCESS_KEY
|
|
||||||
test:saucelabs --action_env=SAUCE_READY_FILE
|
|
||||||
test:saucelabs --action_env=SAUCE_PID_FILE
|
|
||||||
test:saucelabs --action_env=SAUCE_TUNNEL_IDENTIFIER
|
|
||||||
test:saucelabs --define=KARMA_WEB_TEST_MODE=SL_REQUIRED
|
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
# Release support #
|
# Release support #
|
||||||
# Turn on these settings with #
|
# Turn on these settings with #
|
||||||
@ -76,9 +57,7 @@ test:saucelabs --define=KARMA_WEB_TEST_MODE=SL_REQUIRED
|
|||||||
###############################
|
###############################
|
||||||
|
|
||||||
# Releases should always be stamped with version control info
|
# Releases should always be stamped with version control info
|
||||||
# This command assumes node on the path and is a workaround for
|
build:release --workspace_status_command=./tools/bazel_stamp_vars.sh
|
||||||
# https://github.com/bazelbuild/bazel/issues/4802
|
|
||||||
build:release --workspace_status_command="node ./tools/bazel_stamp_vars.js"
|
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
# Output #
|
# Output #
|
||||||
@ -119,7 +98,7 @@ build --define=compile=legacy
|
|||||||
# Load default settings for Remote Build Execution
|
# Load default settings for Remote Build Execution
|
||||||
# When updating, the URLs of bazel_toolchains in packages/bazel/package.bzl
|
# When updating, the URLs of bazel_toolchains in packages/bazel/package.bzl
|
||||||
# may also need to be updated (see https://github.com/angular/angular/pull/27935)
|
# may also need to be updated (see https://github.com/angular/angular/pull/27935)
|
||||||
import %workspace%/third_party/github.com/bazelbuild/bazel-toolchains/bazelrc/bazel-0.24.0.bazelrc
|
import %workspace%/third_party/github.com/bazelbuild/bazel-toolchains/bazelrc/bazel-0.21.0.bazelrc
|
||||||
|
|
||||||
# Increase the default number of jobs by 50% because our build has lots of
|
# Increase the default number of jobs by 50% because our build has lots of
|
||||||
# parallelism
|
# parallelism
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
# VM creation:
|
# VM creation:
|
||||||
# In Google Cloud Platform, create a Compute Engine instance.
|
# In Google Cloud Platform, create a Compute Engine instance.
|
||||||
# We recommend machine type n1-standard-16 (16 vCPUs, 60 GB memory).
|
# We recommend machine type n1-highcpu-16 (16 vCPUs, 14.4 GB memory).
|
||||||
# Use a recent windows boot disk with container support such as
|
# Use a windows boot disk with container support such as
|
||||||
# "Windows Server version 1803 Datacenter Core for Containers", and add a 128GB SSD disk.
|
# "Windows Server version 1803 Datacenter Core for Containers".
|
||||||
# Give it a name, then click "Create".
|
# Give it a name, then click "Create".
|
||||||
|
|
||||||
# VM setup:
|
# VM setup:
|
||||||
@ -35,7 +35,7 @@
|
|||||||
# Get the token and tags from arguments.
|
# Get the token and tags from arguments.
|
||||||
param (
|
param (
|
||||||
[Parameter(Mandatory=$true)][string]$token,
|
[Parameter(Mandatory=$true)][string]$token,
|
||||||
[string]$tags = "",
|
[string]$tags = ""
|
||||||
[Int]$agents = 1
|
[Int]$agents = 1
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -54,8 +54,6 @@ Write-Host "Installing Git for Windows."
|
|||||||
Invoke-WebRequest -Uri https://github.com/git-for-windows/git/releases/download/v2.19.1.windows.1/Git-2.19.1-64-bit.exe -OutFile git.exe
|
Invoke-WebRequest -Uri https://github.com/git-for-windows/git/releases/download/v2.19.1.windows.1/Git-2.19.1-64-bit.exe -OutFile git.exe
|
||||||
.\git.exe /VERYSILENT /NORESTART /NOCANCEL /SP- /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS /COMPONENTS="icons,ext\reg\shellhere,assoc,assoc_sh" /DIR="C:\git"
|
.\git.exe /VERYSILENT /NORESTART /NOCANCEL /SP- /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS /COMPONENTS="icons,ext\reg\shellhere,assoc,assoc_sh" /DIR="C:\git"
|
||||||
Add-Path "C:\git\bin"
|
Add-Path "C:\git\bin"
|
||||||
# Sleep for 15s while git is installed. Trying to remove the git.exe before it finishes install causes an error.
|
|
||||||
Start-Sleep -s 15
|
|
||||||
Remove-Item git.exe
|
Remove-Item git.exe
|
||||||
|
|
||||||
# Download NSSM (https://nssm.cc/) to run the BuildKite agent as a service.
|
# Download NSSM (https://nssm.cc/) to run the BuildKite agent as a service.
|
||||||
|
@ -170,7 +170,10 @@ jobs:
|
|||||||
|
|
||||||
# Setup remote execution and run RBE-compatible tests.
|
# Setup remote execution and run RBE-compatible tests.
|
||||||
- *setup_bazel_remote_execution
|
- *setup_bazel_remote_execution
|
||||||
- run: yarn bazel test //... --build_tag_filters=-ivy-only --test_tag_filters=-ivy-only
|
- run: yarn bazel test //... --build_tag_filters=-ivy-only --test_tag_filters=-ivy-only,-local
|
||||||
|
# Now run RBE incompatible tests locally.
|
||||||
|
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
|
||||||
|
- run: yarn bazel test //... --build_tag_filters=-ivy-only,local --test_tag_filters=-ivy-only,local
|
||||||
|
|
||||||
# Temporary job to test what will happen when we flip the Ivy flag to true
|
# Temporary job to test what will happen when we flip the Ivy flag to true
|
||||||
test_ivy_aot:
|
test_ivy_aot:
|
||||||
@ -206,35 +209,6 @@ jobs:
|
|||||||
path: dist/bin/packages/core/test/bundling/todo/bundle.min.js.br
|
path: dist/bin/packages/core/test/bundling/todo/bundle.min.js.br
|
||||||
destination: core/todo/bundle.br
|
destination: core/todo/bundle.br
|
||||||
|
|
||||||
test_saucelabs_bazel:
|
|
||||||
<<: *job_defaults
|
|
||||||
# In order to avoid the bottleneck of having a slow host machine, we acquire a better
|
|
||||||
# container for this job. This is necessary because we launch a lot of browsers concurrently
|
|
||||||
# and therefore the tunnel and Karma need to process a lot of file requests and tests.
|
|
||||||
resource_class: xlarge
|
|
||||||
steps:
|
|
||||||
- *attach_workspace
|
|
||||||
- *init_environment
|
|
||||||
- *setup_circleci_bazel_config
|
|
||||||
- run:
|
|
||||||
name: Preparing environment for running tests on Saucelabs.
|
|
||||||
command: setSecretVar SAUCE_ACCESS_KEY $(echo $SAUCE_ACCESS_KEY | rev)
|
|
||||||
- run:
|
|
||||||
name: Starting Saucelabs tunnel
|
|
||||||
command: ./scripts/saucelabs/start-tunnel.sh
|
|
||||||
background: true
|
|
||||||
# Waits for the Saucelabs tunnel to be ready. This ensures that we don't run tests
|
|
||||||
# too early without Saucelabs not being ready.
|
|
||||||
- run: ./scripts/saucelabs/wait-for-tunnel.sh
|
|
||||||
# All web tests are contained within a single //:test_web_all target for Saucelabs
|
|
||||||
# as running each set of tests as a separate target will attempt to acquire too
|
|
||||||
# many browsers on Saucelabs (7 per target currently) and some tests will always
|
|
||||||
# fail to acquire browsers. For example:
|
|
||||||
# 14 02 2019 19:52:33.170:WARN [launcher]: chrome beta on SauceLabs have not captured in 180000 ms, killing.
|
|
||||||
# //packages/forms/test:web_test_sauce TIMEOUT in 315.0s
|
|
||||||
- run: yarn bazel test --config=saucelabs //:test_web_all
|
|
||||||
- run: ./scripts/saucelabs/stop-tunnel.sh
|
|
||||||
|
|
||||||
test_aio:
|
test_aio:
|
||||||
<<: *job_defaults
|
<<: *job_defaults
|
||||||
docker:
|
docker:
|
||||||
@ -269,7 +243,7 @@ jobs:
|
|||||||
- *attach_workspace
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
# Deploy angular.io to production (if necessary)
|
# Deploy angular.io to production (if necessary)
|
||||||
- run: setPublicVar_CI_STABLE_BRANCH
|
- run: setPublicVar CI_STABLE_BRANCH "$(npm info @angular/core dist-tags.latest | sed -r 's/^\s*([0-9]+\.[0-9]+)\.[0-9]+.*$/\1.x/')"
|
||||||
- run: yarn --cwd aio deploy-production
|
- run: yarn --cwd aio deploy-production
|
||||||
|
|
||||||
test_aio_local:
|
test_aio_local:
|
||||||
@ -295,6 +269,12 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- *attach_workspace
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
|
# Rename the Ivy packages dist folder to "dist/packages-dist" as the AIO
|
||||||
|
# package installer picks up the locally built packages from that location.
|
||||||
|
# *Note*: We could also adjust the packages installer, but given we won't have
|
||||||
|
# two different folders of Angular distributions in the future, it's likely not
|
||||||
|
# worth the efforts to change the AIO packages installer.
|
||||||
|
- run: mv dist/packages-dist-ivy-aot dist/packages-dist
|
||||||
# Build aio with Ivy (using local Angular packages)
|
# Build aio with Ivy (using local Angular packages)
|
||||||
- run: yarn --cwd aio build-with-ivy --progress=false
|
- run: yarn --cwd aio build-with-ivy --progress=false
|
||||||
|
|
||||||
@ -486,32 +466,7 @@ jobs:
|
|||||||
command: 'openssl aes-256-cbc -d -in .circleci/github_token -k "${KEY}" -out ~/.git_credentials'
|
command: 'openssl aes-256-cbc -d -in .circleci/github_token -k "${KEY}" -out ~/.git_credentials'
|
||||||
- run: ./scripts/ci/publish-build-artifacts.sh
|
- run: ./scripts/ci/publish-build-artifacts.sh
|
||||||
|
|
||||||
aio_monitoring_stable:
|
aio_monitoring:
|
||||||
<<: *job_defaults
|
|
||||||
docker:
|
|
||||||
# This job needs Chrome to be globally installed because the tests run with Protractor
|
|
||||||
# which does not load the browser through the Bazel webtesting rules.
|
|
||||||
- image: *browsers_docker_image
|
|
||||||
steps:
|
|
||||||
- *attach_workspace
|
|
||||||
- *init_environment
|
|
||||||
- run: setPublicVar_CI_STABLE_BRANCH
|
|
||||||
- run:
|
|
||||||
name: Check out `aio/` from the stable branch
|
|
||||||
command: |
|
|
||||||
git fetch origin $CI_STABLE_BRANCH
|
|
||||||
git checkout --force origin/$CI_STABLE_BRANCH -- aio/
|
|
||||||
- run:
|
|
||||||
name: Run tests against https://angular.io/
|
|
||||||
command: ./aio/scripts/test-production.sh https://angular.io/ $CI_AIO_MIN_PWA_SCORE
|
|
||||||
- run:
|
|
||||||
name: Notify caretaker about failure
|
|
||||||
# `$SLACK_CARETAKER_WEBHOOK_URL` is a secret env var defined in CircleCI project settings.
|
|
||||||
# The URL comes from https://angular-team.slack.com/apps/A0F7VRE7N-circleci.
|
|
||||||
command: 'curl --request POST --header "Content-Type: application/json" --data "{\"text\":\":x: \`$CIRCLE_JOB\` job failed on build $CIRCLE_BUILD_NUM: $CIRCLE_BUILD_URL :scream:\"}" $SLACK_CARETAKER_WEBHOOK_URL'
|
|
||||||
when: on_fail
|
|
||||||
|
|
||||||
aio_monitoring_next:
|
|
||||||
<<: *job_defaults
|
<<: *job_defaults
|
||||||
docker:
|
docker:
|
||||||
# This job needs Chrome to be globally installed because the tests run with Protractor
|
# This job needs Chrome to be globally installed because the tests run with Protractor
|
||||||
@ -521,8 +476,8 @@ jobs:
|
|||||||
- *attach_workspace
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
- run:
|
- run:
|
||||||
name: Run tests against https://next.angular.io/
|
name: Run tests against the deployed apps
|
||||||
command: ./aio/scripts/test-production.sh https://next.angular.io/ $CI_AIO_MIN_PWA_SCORE
|
command: ./aio/scripts/test-production.sh $CI_AIO_MIN_PWA_SCORE
|
||||||
- run:
|
- run:
|
||||||
name: Notify caretaker about failure
|
name: Notify caretaker about failure
|
||||||
# `$SLACK_CARETAKER_WEBHOOK_URL` is a secret env var defined in CircleCI project settings.
|
# `$SLACK_CARETAKER_WEBHOOK_URL` is a secret env var defined in CircleCI project settings.
|
||||||
@ -566,51 +521,6 @@ jobs:
|
|||||||
# the ESM5/ES2015 output. See: https://github.com/angular/angular/issues/27966
|
# the ESM5/ES2015 output. See: https://github.com/angular/angular/issues/27966
|
||||||
# - run: yarn gulp source-map-test
|
# - run: yarn gulp source-map-test
|
||||||
|
|
||||||
# Job to run unit tests from angular/material2. Needs a browser since all
|
|
||||||
# component unit tests assume they're running in the browser environment.
|
|
||||||
material-unit-tests:
|
|
||||||
<<: *job_defaults
|
|
||||||
resource_class: xlarge
|
|
||||||
docker:
|
|
||||||
- image: *browsers_docker_image
|
|
||||||
# The Material unit tests support splitting the browsers across multiple CircleCI
|
|
||||||
# instances. Since by default this job launches two browsers, we run each browser
|
|
||||||
# in its own container instance.
|
|
||||||
# https://github.com/angular/material2/blob/7baeaa797b19da2d2998f0d26f6fede3c8a13714/test/karma.conf.js#L107-L110
|
|
||||||
parallelism: 2
|
|
||||||
environment:
|
|
||||||
# The Material unit tests also support launching the same browser multiple times by
|
|
||||||
# sharding individual specs across the defined multiple instances.
|
|
||||||
# See: https://github.com/angular/material2/blob/7baeaa797b19da2d2998f0d26f6fede3c8a13714/test/karma.conf.js#L113-L116
|
|
||||||
KARMA_PARALLEL_BROWSERS: 3
|
|
||||||
steps:
|
|
||||||
- *attach_workspace
|
|
||||||
- *init_environment
|
|
||||||
- run:
|
|
||||||
name: "Cloning Material repository"
|
|
||||||
command: ./scripts/ci/clone_angular_material_repo.sh
|
|
||||||
- restore_cache:
|
|
||||||
# Material directory must be kept in sync with the `$MATERIAL_REPO_TMP_DIR` env variable.
|
|
||||||
# It needs to be hardcoded here, because env variables interpolation is not supported.
|
|
||||||
keys:
|
|
||||||
- v2-angular-material-{{ checksum "/tmp/material2/yarn.lock" }}
|
|
||||||
- v2-angular-material-
|
|
||||||
- run:
|
|
||||||
name: Installing Material dependencies.
|
|
||||||
command: yarn --cwd ${MATERIAL_REPO_TMP_DIR} install --frozen-lockfile --non-interactive
|
|
||||||
# Save the cache before we run the Material unit tests script. This is necessary
|
|
||||||
# because we don't want to cache the node modules which have been modified to contain
|
|
||||||
# the attached Ivy package output.
|
|
||||||
- save_cache:
|
|
||||||
# Material directory must be kept in sync with the `$MATERIAL_REPO_TMP_DIR` env variable.
|
|
||||||
# It needs to be hardcoded here, because env variables interpolation is not supported.
|
|
||||||
key: v2-angular-material-{{ checksum "/tmp/material2/yarn.lock" }}
|
|
||||||
paths:
|
|
||||||
- "/tmp/material2/node_modules"
|
|
||||||
- run:
|
|
||||||
name: "Running Material unit tests"
|
|
||||||
command: ./scripts/ci/run_angular_material_unit_tests.sh
|
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
default_workflow:
|
default_workflow:
|
||||||
@ -628,9 +538,6 @@ workflows:
|
|||||||
- build-npm-packages:
|
- build-npm-packages:
|
||||||
requires:
|
requires:
|
||||||
- setup
|
- setup
|
||||||
- build-ivy-npm-packages:
|
|
||||||
requires:
|
|
||||||
- setup
|
|
||||||
- test_aio:
|
- test_aio:
|
||||||
requires:
|
requires:
|
||||||
- setup
|
- setup
|
||||||
@ -646,18 +553,18 @@ workflows:
|
|||||||
- test_aio_local:
|
- test_aio_local:
|
||||||
requires:
|
requires:
|
||||||
- build-npm-packages
|
- build-npm-packages
|
||||||
- test_aio_local_ivy:
|
# - test_aio_local_ivy:
|
||||||
requires:
|
# requires:
|
||||||
- build-npm-packages
|
# - build-ivy-npm-packages
|
||||||
- test_aio_tools:
|
- test_aio_tools:
|
||||||
requires:
|
requires:
|
||||||
- build-npm-packages
|
- build-npm-packages
|
||||||
- test_docs_examples:
|
- test_docs_examples:
|
||||||
requires:
|
requires:
|
||||||
- build-npm-packages
|
- build-npm-packages
|
||||||
- test_docs_examples_ivy:
|
# - test_docs_examples_ivy:
|
||||||
requires:
|
# requires:
|
||||||
- build-ivy-npm-packages
|
# - build-ivy-npm-packages
|
||||||
- aio_preview:
|
- aio_preview:
|
||||||
requires:
|
requires:
|
||||||
- setup
|
- setup
|
||||||
@ -683,54 +590,26 @@ workflows:
|
|||||||
- integration_test
|
- integration_test
|
||||||
# Only publish if `aio`/`docs` tests using the locally built Angular packages pass
|
# Only publish if `aio`/`docs` tests using the locally built Angular packages pass
|
||||||
- test_aio_local
|
- test_aio_local
|
||||||
- test_aio_local_ivy
|
# - test_aio_local_ivy
|
||||||
- test_docs_examples
|
- test_docs_examples
|
||||||
- test_docs_examples_ivy
|
# - test_docs_examples_ivy
|
||||||
# Get the artifacts to publish from the build-packages-dist job
|
# Get the artifacts to publish from the build-packages-dist job
|
||||||
# since the publishing script expects the legacy outputs layout.
|
# since the publishing script expects the legacy outputs layout.
|
||||||
- build-npm-packages
|
- build-npm-packages
|
||||||
- build-ivy-npm-packages
|
|
||||||
- legacy-unit-tests-saucelabs
|
- legacy-unit-tests-saucelabs
|
||||||
- legacy-misc-tests
|
- legacy-misc-tests
|
||||||
- material-unit-tests:
|
|
||||||
requires:
|
|
||||||
- build-ivy-npm-packages
|
|
||||||
|
|
||||||
saucelabs_tests:
|
aio_monitoring:
|
||||||
jobs:
|
jobs:
|
||||||
- setup
|
- aio_monitoring
|
||||||
- test_saucelabs_bazel:
|
|
||||||
requires:
|
|
||||||
- setup
|
|
||||||
triggers:
|
triggers:
|
||||||
- schedule:
|
- schedule:
|
||||||
# Runs the Saucelabs legacy tests every hour. We still want to run Saucelabs
|
# Runs AIO monitoring job at 00:00AM every day.
|
||||||
# frequently as the caretaker needs up-to-date results when merging PRs or creating
|
cron: "0 0 * * *"
|
||||||
# a new release. Also we primarily moved the Saucelabs job into a cronjob that doesn't
|
filters:
|
||||||
# run for PRs, in order to ensure that PRs are not affected by Saucelabs flakiness or
|
branches:
|
||||||
# incidents. This is still guaranteed (even if we run the job every hour).
|
only:
|
||||||
cron: "0 * * * *"
|
- master
|
||||||
filters: *publish_branches_filter
|
|
||||||
|
|
||||||
# This job is currently disabled due to a version skew problem.
|
|
||||||
# More info is available here: https://github.com/angular/angular/issues/30101
|
|
||||||
# aio_monitoring:
|
|
||||||
# jobs:
|
|
||||||
# - setup
|
|
||||||
# - aio_monitoring_stable:
|
|
||||||
# requires:
|
|
||||||
# - setup
|
|
||||||
# - aio_monitoring_next:
|
|
||||||
# requires:
|
|
||||||
# - setup
|
|
||||||
# triggers:
|
|
||||||
# - schedule:
|
|
||||||
# # Runs AIO monitoring jobs at 00:00AM every day.
|
|
||||||
# cron: "0 0 * * *"
|
|
||||||
# filters:
|
|
||||||
# branches:
|
|
||||||
# only:
|
|
||||||
# - master
|
|
||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
# - don't build the g3 branch
|
# - don't build the g3 branch
|
||||||
|
@ -36,38 +36,3 @@ function setSecretVar() {
|
|||||||
# Restore original shell options.
|
# Restore original shell options.
|
||||||
eval "$originalShellOptions";
|
eval "$originalShellOptions";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Create a function to set an environment variable, when called.
|
|
||||||
#
|
|
||||||
# Use this function for creating setter for public environment variables that require expensive or
|
|
||||||
# time-consuming computaions and may not be needed. When needed, you can call this function to set
|
|
||||||
# the environment variable (which will be available through `$BASH_ENV` from that point onwards).
|
|
||||||
#
|
|
||||||
# Arguments:
|
|
||||||
# - `<name>`: The name of the environment variable. The generated setter function will be
|
|
||||||
# `setPublicVar_<name>`.
|
|
||||||
# - `<code>`: The code to run to compute the value for the variable. Since this code should be
|
|
||||||
# executed lazily, it must be properly escaped. For example:
|
|
||||||
# ```sh
|
|
||||||
# # DO NOT do this:
|
|
||||||
# createPublicVarSetter MY_VAR "$(whoami)"; # `whoami` will be evaluated eagerly
|
|
||||||
#
|
|
||||||
# # DO this isntead:
|
|
||||||
# createPublicVarSetter MY_VAR "\$(whoami)"; # `whoami` will NOT be evaluated eagerly
|
|
||||||
# ```
|
|
||||||
#
|
|
||||||
# Usage: `createPublicVarSetter <name> <code>`
|
|
||||||
#
|
|
||||||
# Example:
|
|
||||||
# ```sh
|
|
||||||
# createPublicVarSetter MY_VAR 'echo "FOO"';
|
|
||||||
# echo $MY_VAR; # Not defined
|
|
||||||
#
|
|
||||||
# setPublicVar_MY_VAR;
|
|
||||||
# source $BASH_ENV;
|
|
||||||
# echo $MY_VAR; # FOO
|
|
||||||
# ```
|
|
||||||
function createPublicVarSetter() {
|
|
||||||
echo "setPublicVar_$1() { setPublicVar $1 \"$2\"; }" >> $BASH_ENV;
|
|
||||||
}
|
|
||||||
|
@ -34,13 +34,6 @@ setPublicVar CI_REPO_NAME "$CIRCLE_PROJECT_REPONAME";
|
|||||||
setPublicVar CI_REPO_OWNER "$CIRCLE_PROJECT_USERNAME";
|
setPublicVar CI_REPO_OWNER "$CIRCLE_PROJECT_USERNAME";
|
||||||
|
|
||||||
|
|
||||||
####################################################################################################
|
|
||||||
# Define "lazy" PUBLIC environment variables for CircleCI.
|
|
||||||
# (I.e. functions to set an environment variable when called.)
|
|
||||||
####################################################################################################
|
|
||||||
createPublicVarSetter CI_STABLE_BRANCH "\$(npm info @angular/core dist-tags.latest | sed -r 's/^\\s*([0-9]+\\.[0-9]+)\\.[0-9]+.*$/\\1.x/')";
|
|
||||||
|
|
||||||
|
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
# Define SECRET environment variables for CircleCI.
|
# Define SECRET environment variables for CircleCI.
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
@ -69,15 +62,6 @@ setPublicVar SAUCE_TUNNEL_IDENTIFIER "angular-${CIRCLE_BUILD_NUM}-${CIRCLE_NODE_
|
|||||||
# acquire CircleCI instances for too long if sauceconnect failed, we need a connect timeout.
|
# acquire CircleCI instances for too long if sauceconnect failed, we need a connect timeout.
|
||||||
setPublicVar SAUCE_READY_FILE_TIMEOUT 120
|
setPublicVar SAUCE_READY_FILE_TIMEOUT 120
|
||||||
|
|
||||||
####################################################################################################
|
|
||||||
# Define environment variables for the Angular Material unit tests job.
|
|
||||||
####################################################################################################
|
|
||||||
# We specifically use a directory within "/tmp" here because we want the cloned repo to be
|
|
||||||
# completely isolated from angular/angular in order to avoid any bad interactions between
|
|
||||||
# their separate build setups.
|
|
||||||
setPublicVar MATERIAL_REPO_TMP_DIR "/tmp/material2"
|
|
||||||
setPublicVar MATERIAL_REPO_URL "https://github.com/angular/material2.git"
|
|
||||||
setPublicVar MATERIAL_REPO_BRANCH "ivy-2019"
|
|
||||||
|
|
||||||
# Source `$BASH_ENV` to make the variables available immediately.
|
# Source `$BASH_ENV` to make the variables available immediately.
|
||||||
source $BASH_ENV;
|
source $BASH_ENV;
|
||||||
|
@ -141,7 +141,7 @@ function getJson(url) {
|
|||||||
const opts = {headers: {Accept: 'application/json'}};
|
const opts = {headers: {Accept: 'application/json'}};
|
||||||
const onResponse = res => {
|
const onResponse = res => {
|
||||||
const statusCode = res.statusCode || -1;
|
const statusCode = res.statusCode || -1;
|
||||||
const isSuccess = (200 <= statusCode) && (statusCode < 400);
|
const isSuccess = (200 <= statusCode) && (statusCode <= 400);
|
||||||
let responseText = '';
|
let responseText = '';
|
||||||
|
|
||||||
res.
|
res.
|
||||||
|
@ -1,103 +0,0 @@
|
|||||||
ARG core=mcr.microsoft.com/windows/servercore:1809
|
|
||||||
ARG target=mcr.microsoft.com/powershell:windowsservercore-1809
|
|
||||||
|
|
||||||
FROM $core as download
|
|
||||||
|
|
||||||
ARG node_version=10.13.0
|
|
||||||
ARG yarn_version=1.13.0
|
|
||||||
|
|
||||||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
|
|
||||||
|
|
||||||
ENV GPG_VERSION 2.3.4
|
|
||||||
|
|
||||||
RUN Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; \
|
|
||||||
Start-Process .\gpg4win.exe -ArgumentList '/S' -NoNewWindow -Wait
|
|
||||||
|
|
||||||
RUN @( \
|
|
||||||
'94AE36675C464D64BAFA68DD7434390BDBE9B9C5', \
|
|
||||||
'FD3A5288F042B6850C66B31F09FE44734EB7990E', \
|
|
||||||
'71DCFD284A79C3B38668286BC97EC7A07EDE3FC1', \
|
|
||||||
'DD8F2338BAE7501E3DD5AC78C273792F7D83545D', \
|
|
||||||
'C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8', \
|
|
||||||
'B9AE9905FFD7803F25714661B63B535A4C206CA9', \
|
|
||||||
'77984A986EBC2AA786BC0F66B01FBB92821C587A', \
|
|
||||||
'8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600', \
|
|
||||||
'4ED778F539E3634C779C87C6D7062848A1AB005C', \
|
|
||||||
'A48C2BEE680E841632CD4E44F07496B3EB3C1762', \
|
|
||||||
'B9E2F5981AA6E0CD28160D9FF13993A75599653C' \
|
|
||||||
) | foreach { \
|
|
||||||
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys $_ ; \
|
|
||||||
}
|
|
||||||
|
|
||||||
ENV NODE_VERSION=$node_version
|
|
||||||
|
|
||||||
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; \
|
|
||||||
gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc
|
|
||||||
|
|
||||||
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
|
|
||||||
$sum = $(cat SHASUMS256.txt.asc | sls $(' node-v{0}-win-x64.zip' -f $env:NODE_VERSION)) -Split ' ' ; \
|
|
||||||
if ((Get-FileHash node.zip -Algorithm sha256).Hash -ne $sum[0]) { Write-Error 'SHA256 mismatch' } ; \
|
|
||||||
Expand-Archive node.zip -DestinationPath C:\ ; \
|
|
||||||
Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs'
|
|
||||||
|
|
||||||
ENV YARN_VERSION=$yarn_version
|
|
||||||
|
|
||||||
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \
|
|
||||||
Invoke-WebRequest $('https://yarnpkg.com/downloads/{0}/yarn-{0}.msi' -f $env:YARN_VERSION) -OutFile yarn.msi -UseBasicParsing ; \
|
|
||||||
$sig = Get-AuthenticodeSignature yarn.msi ; \
|
|
||||||
if ($sig.Status -ne 'Valid') { Write-Error 'Authenticode signature is not valid' } ; \
|
|
||||||
Write-Output $sig.SignerCertificate.Thumbprint ; \
|
|
||||||
if (@( \
|
|
||||||
'7E253367F8A102A91D04829E37F3410F14B68A5F', \
|
|
||||||
'AF764E1EA56C762617BDC757C8B0F3780A0CF5F9' \
|
|
||||||
) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \
|
|
||||||
Start-Process msiexec.exe -ArgumentList '/i', 'yarn.msi', '/quiet', '/norestart' -NoNewWindow -Wait
|
|
||||||
|
|
||||||
ENV GIT_VERSION 2.20.1
|
|
||||||
ENV GIT_DOWNLOAD_URL https://github.com/git-for-windows/git/releases/download/v${GIT_VERSION}.windows.1/MinGit-${GIT_VERSION}-busybox-64-bit.zip
|
|
||||||
ENV GIT_SHA256 9817ab455d9cbd0b09d8664b4afbe4bbf78d18b556b3541d09238501a749486c
|
|
||||||
|
|
||||||
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \
|
|
||||||
Invoke-WebRequest -UseBasicParsing $env:GIT_DOWNLOAD_URL -OutFile git.zip; \
|
|
||||||
if ((Get-FileHash git.zip -Algorithm sha256).Hash -ne $env:GIT_SHA256) {exit 1} ; \
|
|
||||||
Expand-Archive git.zip -DestinationPath C:\git; \
|
|
||||||
Remove-Item git.zip
|
|
||||||
|
|
||||||
FROM $target as baseimage
|
|
||||||
|
|
||||||
ENV NPM_CONFIG_LOGLEVEL info
|
|
||||||
|
|
||||||
COPY --from=download /nodejs /nodejs
|
|
||||||
COPY --from=download [ "/Program Files (x86)/yarn", "/yarn" ]
|
|
||||||
COPY --from=download /git /git
|
|
||||||
|
|
||||||
ARG SETX=/M
|
|
||||||
RUN setx %SETX% PATH "%PATH%;C:\nodejs;C:\yarn\bin;C:\git\cmd;C:\git\mingw64\bin;C:\git\usr\bin"
|
|
||||||
|
|
||||||
CMD [ "node.exe" ]
|
|
||||||
|
|
||||||
FROM baseimage
|
|
||||||
|
|
||||||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
|
|
||||||
|
|
||||||
RUN Invoke-WebRequest -UseBasicParsing 'https://www.7-zip.org/a/7z1805-x64.exe' -OutFile 7z.exe; \
|
|
||||||
Start-Process -FilePath 'C:\\7z.exe' -ArgumentList '/S', '/D=C:\\7zip0' -NoNewWindow -Wait; \
|
|
||||||
Invoke-WebRequest -UseBasicParsing 'http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20180531.tar.xz' -OutFile msys2.tar.xz; \
|
|
||||||
Start-Process -FilePath 'C:\\7zip\\7z' -ArgumentList 'e', 'msys2.tar.xz' -Wait; \
|
|
||||||
Start-Process -FilePath 'C:\\7zip\\7z' -ArgumentList 'x', 'msys2.tar', '-oC:\\' -Wait; \
|
|
||||||
Remove-Item msys2.tar.xz; \
|
|
||||||
Remove-Item msys2.tar; \
|
|
||||||
Remove-Item 7z.exe; \
|
|
||||||
Remove-Item -Recurse 7zip; \
|
|
||||||
[Environment]::SetEnvironmentVariable('Path', $env:Path + ';C:\msys64\usr\bin', [System.EnvironmentVariableTarget]::Machine); \
|
|
||||||
[Environment]::SetEnvironmentVariable('BAZEL_SH', 'C:\msys64\usr\bin\bash.exe', [System.EnvironmentVariableTarget]::Machine); \
|
|
||||||
Invoke-WebRequest -UseBasicParsing 'https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe' -OutFile vc_redist.x64.exe; \
|
|
||||||
Start-Process 'c:\\vc_redist.x64.exe' -ArgumentList '/Install', '/Passive', '/NoRestart' -NoNewWindow -Wait; \
|
|
||||||
Remove-Item vc_redist.x64.exe
|
|
||||||
|
|
||||||
# Add a fix for https://github.com/docker/for-win/issues/2920 as entry point to the container.
|
|
||||||
SHELL ["cmd", "/c"]
|
|
||||||
COPY "fix-msys64.cmd" "C:\\fix-msys64.cmd"
|
|
||||||
ENTRYPOINT cmd /C C:\\fix-msys64.cmd && cmd /c
|
|
||||||
|
|
||||||
CMD ["cmd.exe"]
|
|
@ -1,33 +0,0 @@
|
|||||||
# CodeFresh configuration
|
|
||||||
|
|
||||||
[](https://g.codefresh.io/public/accounts/angular/pipelines/angular/angular/angular)
|
|
||||||
|
|
||||||
This folder contains configuration for the [CodeFresh](<https://codefresh.io/>) based CI checks for this repository.
|
|
||||||
|
|
||||||
## The build pipeline
|
|
||||||
|
|
||||||
CodeFresh uses a several pipeline for each repository. The `codefresh.yml` file defines pipeline [build steps](https://codefresh.io/docs/docs/configure-ci-cd-pipeline/introduction-to-codefresh-pipelines/) for this repository.
|
|
||||||
|
|
||||||
Run results can be seen in the GitHub checks interface and in the [public pipeline](https://g.codefresh.io/public/accounts/angular/pipelines/angular/angular/angular)
|
|
||||||
|
|
||||||
Although most configuration is done via `pipeline.yml`, some options are only available in the online [pipeline settings](https://g.codefresh.io/pipelines/angular/services?repoOwner=angular&repoName=angular&project=angular%2Fangular&context=github&serviceName=angular%2Fangular), which needs a login to access.
|
|
||||||
|
|
||||||
|
|
||||||
## Caretaker
|
|
||||||
|
|
||||||
CodeFresh status can be found at <http://status.codefresh.io/>.
|
|
||||||
|
|
||||||
Issues related to the CodeFresh setup should be escalated to the Tools Team via the current caretaker, followed by Alex Eagle and Filipe Silva.
|
|
||||||
|
|
||||||
## Rollout strategy
|
|
||||||
|
|
||||||
Currently it is only used for tests on Windows platforms, on the master branch, and without pushing user-facing reports. It's only possible to see current builds in the [public pipeline dashboard](https://g.codefresh.io/public/accounts/angular/pipelines/angular/angular/angular).
|
|
||||||
|
|
||||||
After a week or two of running like this, we should reassess how stable and reliable it is.
|
|
||||||
|
|
||||||
Next steps include:
|
|
||||||
- building PRs
|
|
||||||
- showing build status publicly
|
|
||||||
- blocking PRs that break the build
|
|
||||||
- expanding the test suite
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
|||||||
# These options are enabled when running on CI
|
|
||||||
# We do this by copying this file to /etc/bazel.bazelrc at the start of the build.
|
|
||||||
# See documentation in /docs/BAZEL.md
|
|
||||||
|
|
||||||
# Save downloaded repositories in a location that can be cached by CodeFresh and shared between
|
|
||||||
# builds. This helps speed up the analysis time significantly with Bazel managed node dependencies
|
|
||||||
# on the CI.
|
|
||||||
# https://codefresh.io/docs/docs/configure-ci-cd-pipeline/introduction-to-codefresh-pipelines/#caching-the-artifacts-of-your-build-system
|
|
||||||
build --repository_cache=C:/codefresh/volume/bazel_repository_cache
|
|
||||||
|
|
||||||
# Don't be spammy in the logs
|
|
||||||
# TODO(gmagolan): Hide progress again once build performance improves
|
|
||||||
# Presently, CircleCI can timeout during bazel test ... with the following
|
|
||||||
# error: Too long with no output (exceeded 10m0s)
|
|
||||||
build --noshow_progress
|
|
||||||
|
|
||||||
# Print all the options that apply to the build.
|
|
||||||
# This helps us diagnose which options override others
|
|
||||||
# (e.g. /etc/bazel.bazelrc vs. tools/bazel.rc)
|
|
||||||
build --announce_rc
|
|
||||||
|
|
||||||
# Workaround https://github.com/bazelbuild/bazel/issues/3645
|
|
||||||
# Bazel doesn't calculate the memory ceiling correctly when running under Docker.
|
|
||||||
# Limit Bazel to consuming resources that fit in CodeFresh VMs
|
|
||||||
# TODO(filipesilva): determine the correct memory limit
|
|
||||||
build --local_resources=8000,8.0,1.0
|
|
||||||
|
|
||||||
# Retry in the event of flakes, eg. https://circleci.com/gh/angular/angular/31309
|
|
||||||
test --flaky_test_attempts=2
|
|
||||||
|
|
||||||
# More details on failures
|
|
||||||
build --verbose_failures=true
|
|
||||||
|
|
||||||
# Include PATH in Windows build/tests
|
|
||||||
# https://github.com/bazelbuild/rules_typescript/pull/356
|
|
||||||
build --action_env=PATH
|
|
||||||
test --action_env=PATH --test_env=PATH
|
|
||||||
|
|
||||||
# Exclude tests known to not work on Windows.
|
|
||||||
|
|
||||||
# Chrome web tests are currently broken.
|
|
||||||
test --test_tag_filters=-browser:chromium-local
|
|
@ -1,25 +0,0 @@
|
|||||||
version: '1.0'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
BuildImage:
|
|
||||||
type: build
|
|
||||||
image_name: node-bazel-windows
|
|
||||||
working_directory: ./.codefresh
|
|
||||||
no_cf_cache: true
|
|
||||||
build_arguments:
|
|
||||||
- node_version=10.13.0
|
|
||||||
- yarn_version=1.13.0
|
|
||||||
dockerfile: ./Dockerfile.win-1809
|
|
||||||
|
|
||||||
RunTests:
|
|
||||||
title: Run Example
|
|
||||||
image: ${{BuildImage}}
|
|
||||||
commands:
|
|
||||||
# Install dependencies
|
|
||||||
- yarn install --frozen-lockfile --non-interactive --network-timeout 100000 --no-progress
|
|
||||||
# Add Bazel CI config
|
|
||||||
- copy .codefresh\bazel.rc %ProgramData%\bazel.bazelrc
|
|
||||||
# Run tests
|
|
||||||
- yarn bazel test //tools/ts-api-guardian:all //packages/language-service/test
|
|
||||||
- yarn test-ivy-aot //packages/animations/test //packages/common/test //packages/forms/test //packages/http/test //packages/platform-browser/test //packages/platform-browser-dynamic/test //packages/router/test
|
|
||||||
- yarn bazel test //tools/public_api_guard/...
|
|
@ -1,6 +0,0 @@
|
|||||||
@echo off
|
|
||||||
REM Fix for https://github.com/docker/for-win/issues/2920
|
|
||||||
REM echo "Fixing msys64 folder..."
|
|
||||||
REM Touch all .dll files inside C:\msys64\
|
|
||||||
forfiles /p C:\msys64\ /s /m *.dll /c "cmd /c Copy /B @path+,, >NUL"
|
|
||||||
REM echo "Fixed msys64 folder."
|
|
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -5,8 +5,5 @@
|
|||||||
*.js eol=lf
|
*.js eol=lf
|
||||||
*.ts eol=lf
|
*.ts eol=lf
|
||||||
|
|
||||||
# API guardian patch must always use LF for tests to work
|
|
||||||
*.patch eol=lf
|
|
||||||
|
|
||||||
# Must keep Windows line ending to be parsed correctly
|
# Must keep Windows line ending to be parsed correctly
|
||||||
scripts/windows/packages.txt eol=crlf
|
scripts/windows/packages.txt eol=crlf
|
||||||
|
64
.github/CODEOWNERS
vendored
64
.github/CODEOWNERS
vendored
@ -275,7 +275,6 @@
|
|||||||
# @angular/fw-docs-intro
|
# @angular/fw-docs-intro
|
||||||
# ===========================================================
|
# ===========================================================
|
||||||
#
|
#
|
||||||
# - jenniferfell
|
|
||||||
# - brandonroberts
|
# - brandonroberts
|
||||||
# - IgorMinar
|
# - IgorMinar
|
||||||
# - stephenfluin
|
# - stephenfluin
|
||||||
@ -308,18 +307,6 @@
|
|||||||
# - mgechev
|
# - mgechev
|
||||||
|
|
||||||
|
|
||||||
# ===========================================================
|
|
||||||
# @angular/tools-docs-schematics
|
|
||||||
# ===========================================================
|
|
||||||
#
|
|
||||||
# - alan-agius4
|
|
||||||
# - alexeagle
|
|
||||||
# - hansl
|
|
||||||
# - IgorMinar
|
|
||||||
# - mgechev
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ===========================================================
|
# ===========================================================
|
||||||
# @angular/fw-docs-marketing
|
# @angular/fw-docs-marketing
|
||||||
# ===========================================================
|
# ===========================================================
|
||||||
@ -412,10 +399,10 @@
|
|||||||
|
|
||||||
|
|
||||||
# ================================================
|
# ================================================
|
||||||
# packages/compiler-cli/ngcc/
|
# packages/compiler-cli/src/ngcc/
|
||||||
# ================================================
|
# ================================================
|
||||||
|
|
||||||
/packages/compiler-cli/ngcc/** @angular/fw-ngcc @angular/framework-global-approvers
|
/packages/compiler-cli/src/ngcc/** @angular/fw-ngcc @angular/framework-global-approvers
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -427,7 +414,6 @@
|
|||||||
|
|
||||||
/packages/compiler-cli/src/ngtools/** @angular/tools-cli @angular/framework-global-approvers
|
/packages/compiler-cli/src/ngtools/** @angular/tools-cli @angular/framework-global-approvers
|
||||||
/aio/content/guide/ivy.md @angular/tools-cli @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/ivy.md @angular/tools-cli @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/guide/web-worker.md @angular/tools-cli @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -446,7 +432,6 @@
|
|||||||
/packages/platform-browser-dynamic/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/packages/platform-browser-dynamic/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/packages/platform-webworker/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/packages/platform-webworker/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/packages/platform-webworker-dynamic/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/packages/platform-webworker-dynamic/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/packages/examples/common/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
|
|
||||||
/aio/content/guide/architecture-components.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/architecture-components.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/guide/architecture-modules.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/architecture-modules.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
@ -527,7 +512,6 @@
|
|||||||
/aio/content/guide/module-types.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/module-types.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
/aio/content/guide/template-syntax.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/template-syntax.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/examples/built-in-template-functions/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
/aio/content/examples/event-binding/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/examples/event-binding/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/examples/interpolation/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/examples/interpolation/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/examples/template-syntax/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/examples/template-syntax/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
@ -643,7 +627,6 @@
|
|||||||
/packages/service-worker/** @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/packages/service-worker/** @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/guide/service-worker-getting-started.md @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/service-worker-getting-started.md @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/examples/service-worker-getting-started/** @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/examples/service-worker-getting-started/** @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/guide/app-shell.md @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
/aio/content/guide/service-worker-communications.md @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/service-worker-communications.md @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/guide/service-worker-config.md @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/service-worker-config.md @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/guide/service-worker-devops.md @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/service-worker-devops.md @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
@ -739,7 +722,6 @@ testing/** @angular/fw-test
|
|||||||
|
|
||||||
/aio/* @angular/docs-infra @angular/framework-global-approvers
|
/aio/* @angular/docs-infra @angular/framework-global-approvers
|
||||||
/aio/aio-builds-setup/** @angular/docs-infra @angular/framework-global-approvers
|
/aio/aio-builds-setup/** @angular/docs-infra @angular/framework-global-approvers
|
||||||
/aio/content/examples/* @angular/docs-infra @angular/framework-global-approvers
|
|
||||||
/aio/scripts/** @angular/docs-infra @angular/framework-global-approvers
|
/aio/scripts/** @angular/docs-infra @angular/framework-global-approvers
|
||||||
/aio/src/** @angular/docs-infra @angular/framework-global-approvers
|
/aio/src/** @angular/docs-infra @angular/framework-global-approvers
|
||||||
/aio/tests/** @angular/docs-infra @angular/framework-global-approvers
|
/aio/tests/** @angular/docs-infra @angular/framework-global-approvers
|
||||||
@ -771,10 +753,7 @@ testing/** @angular/fw-test
|
|||||||
/aio/content/examples/toh-pt4/** @angular/fw-docs-intro @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/examples/toh-pt4/** @angular/fw-docs-intro @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/examples/toh-pt5/** @angular/fw-docs-intro @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/examples/toh-pt5/** @angular/fw-docs-intro @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/examples/toh-pt6/** @angular/fw-docs-intro @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/examples/toh-pt6/** @angular/fw-docs-intro @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/examples/getting-started-v0/** @angular/fw-docs-intro @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
/aio/content/examples/getting-started/** @angular/fw-docs-intro @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
/aio/content/getting-started/** @angular/fw-docs-intro @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
/aio/content/images/guide/getting-started/** @angular/fw-docs-intro @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
|
|
||||||
|
|
||||||
# ================================================
|
# ================================================
|
||||||
@ -800,6 +779,7 @@ testing/** @angular/fw-test
|
|||||||
/aio/content/guide/npm-packages.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/npm-packages.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/guide/browser-support.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/browser-support.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/guide/typescript-configuration.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/typescript-configuration.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/quickstart/** @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/guide/setup.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/setup.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/examples/setup/** @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/examples/setup/** @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/guide/build.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/build.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
@ -821,17 +801,6 @@ testing/** @angular/fw-test
|
|||||||
/aio/content/guide/using-libraries.md @angular/tools-docs-libraries @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/using-libraries.md @angular/tools-docs-libraries @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
# ================================================
|
|
||||||
# Docs: schematics
|
|
||||||
# ================================================
|
|
||||||
|
|
||||||
/aio/content/guide/schematics.md @angular/tools-docs-schematics @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
/aio/content/guide/schematics-authoring.md @angular/tools-docs-schematics @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
/aio/content/guide/schematics-for-libraries.md @angular/tools-docs-schematics @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
/aio/content/images/guide/schematics/** @angular/tools-docs-schematics @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
/aio/content/examples/schematics-for-libraries/** @angular/tools-docs-schematics @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ================================================
|
# ================================================
|
||||||
# Docs: marketing
|
# Docs: marketing
|
||||||
@ -859,34 +828,11 @@ testing/** @angular/fw-test
|
|||||||
/packages/* @angular/fw-dev-infra
|
/packages/* @angular/fw-dev-infra
|
||||||
/scripts/** @angular/fw-dev-infra
|
/scripts/** @angular/fw-dev-infra
|
||||||
/third_party/** @angular/fw-dev-infra
|
/third_party/** @angular/fw-dev-infra
|
||||||
/tools/build/** @angular/fw-dev-infra
|
/tools/** @angular/fw-dev-infra
|
||||||
/tools/cjs-jasmine/** @angular/fw-dev-infra
|
|
||||||
/tools/gulp-tasks/** @angular/fw-dev-infra
|
|
||||||
/tools/ngcontainer/** @angular/fw-dev-infra
|
|
||||||
/tools/npm/** @angular/fw-dev-infra
|
|
||||||
/tools/npm_workspace/** @angular/fw-dev-infra
|
|
||||||
/tools/public_api_guard/** @angular/fw-dev-infra
|
|
||||||
/tools/rxjs/** @angular/fw-dev-infra
|
|
||||||
/tools/source-map-test/** @angular/fw-dev-infra
|
|
||||||
/tools/symbol-extractor/** @angular/fw-dev-infra
|
|
||||||
/tools/testing/** @angular/fw-dev-infra
|
|
||||||
/tools/ts-api-guardian/** @angular/fw-dev-infra
|
|
||||||
/tools/tslint/** @angular/fw-dev-infra
|
|
||||||
/tools/validate-commit-message/** @angular/fw-dev-infra
|
|
||||||
/tools/yarn/** @angular/fw-dev-infra
|
|
||||||
/tools/*
|
|
||||||
*.bzl @angular/fw-dev-infra
|
*.bzl @angular/fw-dev-infra
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ================================================
|
|
||||||
# Material CI
|
|
||||||
# ================================================
|
|
||||||
|
|
||||||
/tools/material-ci/** @angular/fw-core @angular/framework-global-approvers
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ================================================
|
# ================================================
|
||||||
# Public API
|
# Public API
|
||||||
# ================================================
|
# ================================================
|
||||||
|
13
.github/angular-robot.yml
vendored
13
.github/angular-robot.yml
vendored
@ -35,19 +35,17 @@ merge:
|
|||||||
# this list must be manually kept in sync with google3/third_party/javascript/angular2/copy.bara.sky
|
# this list must be manually kept in sync with google3/third_party/javascript/angular2/copy.bara.sky
|
||||||
include:
|
include:
|
||||||
- "LICENSE"
|
- "LICENSE"
|
||||||
- "modules/benchmarks/**"
|
- "modules/**"
|
||||||
- "modules/system.d.ts"
|
|
||||||
- "packages/**"
|
- "packages/**"
|
||||||
# list of patterns to ignore for the files changed by the PR
|
# list of patterns to ignore for the files changed by the PR
|
||||||
exclude:
|
exclude:
|
||||||
- "packages/*"
|
- "packages/*"
|
||||||
- "packages/bazel/*"
|
- "packages/bazel/*"
|
||||||
- "packages/bazel/src/api-extractor/**"
|
|
||||||
- "packages/bazel/src/builders/**"
|
- "packages/bazel/src/builders/**"
|
||||||
- "packages/bazel/src/ng_package/**"
|
- "packages/bazel/src/ng_package/**"
|
||||||
- "packages/bazel/src/protractor/**"
|
- "packages/bazel/src/protractor/**"
|
||||||
- "packages/bazel/src/schematics/**"
|
- "packages/bazel/src/schematics/**"
|
||||||
- "packages/compiler-cli/ngcc/**"
|
- "packages/compiler-cli/src/ngcc/**"
|
||||||
- "packages/docs/**"
|
- "packages/docs/**"
|
||||||
- "packages/elements/schematics/**"
|
- "packages/elements/schematics/**"
|
||||||
- "packages/examples/**"
|
- "packages/examples/**"
|
||||||
@ -167,10 +165,3 @@ triagePR:
|
|||||||
- "effort*"
|
- "effort*"
|
||||||
- "risk*"
|
- "risk*"
|
||||||
- "comp: *"
|
- "comp: *"
|
||||||
|
|
||||||
# options for rerunning CI
|
|
||||||
rerunCircleCI:
|
|
||||||
# set to true to disable
|
|
||||||
disabled: false
|
|
||||||
# the label which when added triggers a rerun of the default CircleCI workflow
|
|
||||||
triggerRerunLabel: "PR action: rerun CI at HEAD"
|
|
||||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,10 +1,11 @@
|
|||||||
.DS_STORE
|
.DS_STORE
|
||||||
|
|
||||||
/dist/
|
/dist/
|
||||||
/bazel-out
|
/bazel-out/
|
||||||
/integration/bazel/bazel-*
|
/integration/bazel/bazel-*
|
||||||
e2e_test.*
|
e2e_test.*
|
||||||
node_modules
|
node_modules
|
||||||
|
bower_components
|
||||||
tools/gulp-tasks/cldr/cldr-data/
|
tools/gulp-tasks/cldr/cldr-data/
|
||||||
|
|
||||||
# Include when developing application packages.
|
# Include when developing application packages.
|
||||||
@ -13,7 +14,6 @@ pubspec.lock
|
|||||||
.idea/
|
.idea/
|
||||||
.settings/
|
.settings/
|
||||||
.vscode/launch.json
|
.vscode/launch.json
|
||||||
.vscode/settings.json
|
|
||||||
*.swo
|
*.swo
|
||||||
modules/.settings
|
modules/.settings
|
||||||
modules/.vscode
|
modules/.vscode
|
||||||
|
23
.vscode/README.md
vendored
23
.vscode/README.md
vendored
@ -1,23 +0,0 @@
|
|||||||
# VSCode Configuration
|
|
||||||
|
|
||||||
This folder contains opt-in [Workspace Settings](https://code.visualstudio.com/docs/getstarted/settings) and [Extension Recommendations](https://code.visualstudio.com/docs/editor/extension-gallery#_workspace-recommended-extensions) that the Angular team recommends using when working on this repository.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
To use the recommended settings follow the steps below:
|
|
||||||
|
|
||||||
- install <https://marketplace.visualstudio.com/items?itemName=xaver.clang-format>
|
|
||||||
- copy `.vscode/recommended-settings.json` to `.vscode/settings.json`
|
|
||||||
- restart the editor
|
|
||||||
|
|
||||||
If you already have your custom workspace settings you should instead manually merge the file content.
|
|
||||||
|
|
||||||
This isn't an automatic process so you will need to repeat it when settings are updated.
|
|
||||||
|
|
||||||
To see the recommended extensions select "Extensions: Show Recommended Extensions" in the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette).
|
|
||||||
|
|
||||||
## Editing `.vscode/recommended-settings.json`
|
|
||||||
|
|
||||||
If you wish to add extra configuration items please keep in mind any settings you add here will be used by many users.
|
|
||||||
|
|
||||||
Try to keep these settings to things that help facilitate the development process and avoid altering the user workflow whenever possible.
|
|
@ -1,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
// Format js and ts files on save with `clang-format.executable`
|
|
||||||
// If `clang-format.executable` is not being used, these two settings should be removed otherwise it will break existing formatting.
|
|
||||||
// You can instead run `yarn gulp format` to manually format your code.
|
|
||||||
"[javascript]": {
|
"[javascript]": {
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
},
|
},
|
||||||
@ -11,7 +8,6 @@
|
|||||||
// Please install https://marketplace.visualstudio.com/items?itemName=xaver.clang-format to take advantage of `clang-format` in VSCode.
|
// Please install https://marketplace.visualstudio.com/items?itemName=xaver.clang-format to take advantage of `clang-format` in VSCode.
|
||||||
// (See https://clang.llvm.org/docs/ClangFormat.html for more info `clang-format`.)
|
// (See https://clang.llvm.org/docs/ClangFormat.html for more info `clang-format`.)
|
||||||
"clang-format.executable": "${workspaceRoot}/node_modules/.bin/clang-format",
|
"clang-format.executable": "${workspaceRoot}/node_modules/.bin/clang-format",
|
||||||
// Exclude third party modules and build artifacts from the editor watchers/searches.
|
|
||||||
"files.watcherExclude": {
|
"files.watcherExclude": {
|
||||||
"**/.git/objects/**": true,
|
"**/.git/objects/**": true,
|
||||||
"**/.git/subtree-cache/**": true,
|
"**/.git/subtree-cache/**": true,
|
60
BUILD.bazel
60
BUILD.bazel
@ -1,32 +1,20 @@
|
|||||||
package(default_visibility = ["//visibility:public"])
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
load("//tools:defaults.bzl", "karma_web_test")
|
|
||||||
|
|
||||||
exports_files([
|
exports_files([
|
||||||
|
"tsconfig.json",
|
||||||
"LICENSE",
|
"LICENSE",
|
||||||
"protractor-perf.conf.js",
|
"protractor-perf.conf.js",
|
||||||
"karma-js.conf.js",
|
|
||||||
"browser-providers.conf.js",
|
|
||||||
])
|
])
|
||||||
|
|
||||||
alias(
|
|
||||||
name = "tsconfig.json",
|
|
||||||
actual = "//packages:tsconfig-build.json",
|
|
||||||
)
|
|
||||||
|
|
||||||
filegroup(
|
filegroup(
|
||||||
name = "web_test_bootstrap_scripts",
|
name = "web_test_bootstrap_scripts",
|
||||||
# do not sort
|
# do not sort
|
||||||
srcs = [
|
srcs = [
|
||||||
"@npm//node_modules/core-js:client/core.js",
|
"@npm//node_modules/reflect-metadata:Reflect.js",
|
||||||
"@npm//node_modules/zone.js:dist/zone.js",
|
"@npm//node_modules/zone.js:dist/zone.js",
|
||||||
"@npm//node_modules/zone.js:dist/zone-testing.js",
|
"@npm//node_modules/zone.js:dist/zone-testing.js",
|
||||||
"@npm//node_modules/zone.js:dist/task-tracking.js",
|
"@npm//node_modules/zone.js:dist/task-tracking.js",
|
||||||
"//:test-events.js",
|
"//:test-events.js",
|
||||||
"//:shims_for_IE.js",
|
|
||||||
# Including systemjs because it defines `__eval`, which produces correct stack traces.
|
|
||||||
"@npm//node_modules/systemjs:dist/system.src.js",
|
|
||||||
"@npm//node_modules/reflect-metadata:Reflect.js",
|
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -46,47 +34,3 @@ filegroup(
|
|||||||
"@npm//node_modules/angular-mocks-1.6:angular-mocks.js",
|
"@npm//node_modules/angular-mocks-1.6:angular-mocks.js",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
# To run a karma_web_test target locally on SauceLabs:
|
|
||||||
# 1) have SAUCE_USERNAME, SAUCE_ACCESS_KEY (and optionally a SAUCE_TUNNEL_IDENTIFIER) set in your environment
|
|
||||||
# 2) open a sauce connection with `./scripts/saucelabs/start-tunnel.sh`
|
|
||||||
# NOTE: start-tunnel.sh uses `node_modules/sauce-connect` which is current linux specific:
|
|
||||||
# "sauce-connect": "https://saucelabs.com/downloads/sc-4.5.3-linux.tar.gz".
|
|
||||||
# On OSX or Windows you'll need to use the appropriate sauce-connect binary.
|
|
||||||
# 3) run target with `yarn bazel test --config=saucelabs <target>`
|
|
||||||
# NOTE: --config=saucelabs is required as it makes the SAUCE_XXX environment variables available to
|
|
||||||
# the action. See /.bazelrc.
|
|
||||||
karma_web_test(
|
|
||||||
name = "test_web_all",
|
|
||||||
tags = [
|
|
||||||
"local",
|
|
||||||
"manual",
|
|
||||||
"saucelabs",
|
|
||||||
],
|
|
||||||
deps = [
|
|
||||||
# We combine all tests into a single karma_web_test target
|
|
||||||
# as running them as seperate targets in parallel leads to too many
|
|
||||||
# browsers being acquired at once in SauceLabs and the tests flake out
|
|
||||||
# TODO: this is an example subset of tests below, add all remaining angular tests
|
|
||||||
"//packages/common/http/test:test_lib",
|
|
||||||
"//packages/common/http/testing/test:test_lib",
|
|
||||||
"//packages/common/test:test_lib",
|
|
||||||
"//packages/core/test:test_lib",
|
|
||||||
"//packages/forms/test:test_lib",
|
|
||||||
"//packages/http/test:test_lib",
|
|
||||||
# "//packages/router/test:test_lib",
|
|
||||||
# //packages/router/test:test_lib fails with:
|
|
||||||
# IE 11.0.0 (Windows 8.1.0.0) bootstrap should restore the scrolling position FAILED
|
|
||||||
# Expected undefined to equal 5000.
|
|
||||||
# at stack (eval code:2338:11)
|
|
||||||
# at buildExpectationResult (eval code:2305:5)
|
|
||||||
# at expectationResultFactory (eval code:858:11)
|
|
||||||
# at Spec.prototype.addExpectationResult (eval code:487:5)
|
|
||||||
# at addExpectationResult (eval code:802:9)
|
|
||||||
# at Anonymous function (eval code:2252:7)
|
|
||||||
# at Anonymous function (eval code:339:25)
|
|
||||||
# at step (eval code:133:17)
|
|
||||||
# at Anonymous function (eval code:114:50)
|
|
||||||
# at fulfilled (eval code:104:47)
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
505
CHANGELOG.md
505
CHANGELOG.md
@ -1,308 +1,10 @@
|
|||||||
<a name="8.0.0-rc.2"></a>
|
|
||||||
# [8.0.0-rc.2](https://github.com/angular/angular/compare/8.0.0-rc.1...8.0.0-rc.2) (2019-04-29)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **language-service:** Remove tsserverlibrary from rollup globals ([#30123](https://github.com/angular/angular/issues/30123)) ([b706800](https://github.com/angular/angular/commit/b706800))
|
|
||||||
* disable injectable-pipe migration ([#30180](https://github.com/angular/angular/issues/30180)) ([4b2fcfd](https://github.com/angular/angular/commit/4b2fcfd))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="8.0.0-rc.1"></a>
|
|
||||||
# [8.0.0-rc.1](https://github.com/angular/angular/compare/8.0.0-rc.0...8.0.0-rc.1) (2019-04-26)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** Exclude common/upgrade* in metadata.tsconfig.json ([#30133](https://github.com/angular/angular/issues/30133)) ([6711f22](https://github.com/angular/angular/commit/6711f22))
|
|
||||||
* **bazel:** update peerDep ranges ([#30155](https://github.com/angular/angular/issues/30155)) ([6067583](https://github.com/angular/angular/commit/6067583))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="8.0.0-rc.0"></a>
|
|
||||||
# [8.0.0-rc.0](https://github.com/angular/angular/compare/8.0.0-beta.14...8.0.0-rc.0) (2019-04-25)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** make name param in ng add optional ([#30074](https://github.com/angular/angular/issues/30074)) ([0b5f480](https://github.com/angular/angular/commit/0b5f480))
|
|
||||||
* **bazel:** Make sure only single copy of `[@angular](https://github.com/angular)/bazel` is installed ([#30072](https://github.com/angular/angular/issues/30072)) ([2905bf5](https://github.com/angular/angular/commit/2905bf5))
|
|
||||||
* **bazel:** transitive npm deps in ng_module ([#30065](https://github.com/angular/angular/issues/30065)) ([61365a9](https://github.com/angular/angular/commit/61365a9))
|
|
||||||
* **common:** add upgrade sub-package to ng_package rule for [@angular](https://github.com/angular)/common ([#30117](https://github.com/angular/angular/issues/30117)) ([6de4cbd](https://github.com/angular/angular/commit/6de4cbd)), closes [#30055](https://github.com/angular/angular/issues/30055) [#30116](https://github.com/angular/angular/issues/30116)
|
|
||||||
* **common:** adjust MockPlatformLocation to set state to new object ([#30055](https://github.com/angular/angular/issues/30055)) ([825efa8](https://github.com/angular/angular/commit/825efa8))
|
|
||||||
* **compiler:** Fix compiler crash due to isSkipSelf of null ([#30075](https://github.com/angular/angular/issues/30075)) ([28fd5ab](https://github.com/angular/angular/commit/28fd5ab))
|
|
||||||
* **upgrade:** do not break if `onMicrotaskEmpty` emits while a `$digest` is in progress ([#29794](https://github.com/angular/angular/issues/29794)) ([0ddf2e7](https://github.com/angular/angular/commit/0ddf2e7)), closes [#24680](https://github.com/angular/angular/issues/24680) [/github.com/angular/angular/blob/78146c189/packages/core/src/util/ng_dev_mode.ts#L12](https://github.com//github.com/angular/angular/blob/78146c189/packages/core/src/util/ng_dev_mode.ts/issues/L12) [#24680](https://github.com/angular/angular/issues/24680)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **common:** add [@angular](https://github.com/angular)/common/upgrade package for $location-related APIs ([#30055](https://github.com/angular/angular/issues/30055)) ([152d99e](https://github.com/angular/angular/commit/152d99e))
|
|
||||||
* **common:** add ability to retrieve the state from Location service ([#30055](https://github.com/angular/angular/issues/30055)) ([b44b143](https://github.com/angular/angular/commit/b44b143))
|
|
||||||
* **common:** add ability to track all location changes ([#30055](https://github.com/angular/angular/issues/30055)) ([3a9cf3f](https://github.com/angular/angular/commit/3a9cf3f))
|
|
||||||
* **common:** add APIs to read component pieces of URL ([#30055](https://github.com/angular/angular/issues/30055)) ([b635fe8](https://github.com/angular/angular/commit/b635fe8))
|
|
||||||
* **common:** add MockPlatformLocation to enable more robust testing of Location services ([#30055](https://github.com/angular/angular/issues/30055)) ([d0672c2](https://github.com/angular/angular/commit/d0672c2))
|
|
||||||
* **common:** add UrlCodec type for use with upgrade applications ([#30055](https://github.com/angular/angular/issues/30055)) ([ec455e1](https://github.com/angular/angular/commit/ec455e1))
|
|
||||||
* **common:** provide replacement for AngularJS $location service ([#30055](https://github.com/angular/angular/issues/30055)) ([4277600](https://github.com/angular/angular/commit/4277600))
|
|
||||||
* remove deprecated DOCUMENT token from platform-browser ([#28117](https://github.com/angular/angular/issues/28117)) ([3a9d247](https://github.com/angular/angular/commit/3a9d247))
|
|
||||||
* **compiler:** support skipping leading trivia in template source-maps ([#30095](https://github.com/angular/angular/issues/30095)) ([304a12f](https://github.com/angular/angular/commit/304a12f))
|
|
||||||
* **core:** add missing ARIA attributes to html sanitizer ([#29685](https://github.com/angular/angular/issues/29685)) ([909557d](https://github.com/angular/angular/commit/909557d)), closes [#26815](https://github.com/angular/angular/issues/26815)
|
|
||||||
* **router:** deprecate loadChildren:string ([#30073](https://github.com/angular/angular/issues/30073)) ([c61df39](https://github.com/angular/angular/commit/c61df39))
|
|
||||||
* **service-worker:** allow configuring when the SW is registered ([#21842](https://github.com/angular/angular/issues/21842)) ([4cfba58](https://github.com/angular/angular/commit/4cfba58)), closes [#20970](https://github.com/angular/angular/issues/20970)
|
|
||||||
* **service-worker:** expose `SwRegistrationOptions` token to allow runtime config ([#21842](https://github.com/angular/angular/issues/21842)) ([39c0152](https://github.com/angular/angular/commit/39c0152))
|
|
||||||
* **service-worker:** support bypassing SW with specific header/query param ([#30010](https://github.com/angular/angular/issues/30010)) ([6200732](https://github.com/angular/angular/commit/6200732)), closes [#21191](https://github.com/angular/angular/issues/21191)
|
|
||||||
|
|
||||||
|
|
||||||
### BREAKING CHANGES
|
|
||||||
|
|
||||||
* **bazel:** ng_module now depends on a minimum of build_bazel_rules_nodejs 0.27.12
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="8.0.0-beta.14"></a>
|
|
||||||
# [8.0.0-beta.14](https://github.com/angular/angular/compare/8.0.0-beta.13...8.0.0-beta.14) (2019-04-23)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** do not typecheck core schematic files ([#29876](https://github.com/angular/angular/issues/29876)) ([2ba799d](https://github.com/angular/angular/commit/2ba799d))
|
|
||||||
* **bazel:** restore ng build --prod ([#30005](https://github.com/angular/angular/issues/30005)) ([96a8289](https://github.com/angular/angular/commit/96a8289))
|
|
||||||
* **common:** prevent repeated application of HttpParams mutations ([#29045](https://github.com/angular/angular/issues/29045)) ([8e8e89a](https://github.com/angular/angular/commit/8e8e89a)), closes [#20430](https://github.com/angular/angular/issues/20430)
|
|
||||||
* **common:** async pipe will properly check when it recieves an NaN value from an observable ([#22305](https://github.com/angular/angular/issues/22305)) ([3f6bf6d](https://github.com/angular/angular/commit/3f6bf6d)), closes [#15721](https://github.com/angular/angular/issues/15721)
|
|
||||||
* **core:** don't include a local `EventListener` in typings ([#29809](https://github.com/angular/angular/issues/29809)) ([4bde40f](https://github.com/angular/angular/commit/4bde40f)), closes [/github.com/angular/angular/blob/303eae918d997070a36b523ddc97e018f622c258/packages/core/src/debug/debug_node.ts#L32](https://github.com//github.com/angular/angular/blob/303eae918d997070a36b523ddc97e018f622c258/packages/core/src/debug/debug_node.ts/issues/L32) [#29806](https://github.com/angular/angular/issues/29806)
|
|
||||||
* **core:** use shakeable global definitions ([#29929](https://github.com/angular/angular/issues/29929)) ([e5905bb](https://github.com/angular/angular/commit/e5905bb)), closes [/github.com/angular/angular-cli/blob/5fc1f2499cbe57f9a95e4b0dfced130eb3a8046d/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts#L279-L282](https://github.com//github.com/angular/angular-cli/blob/5fc1f2499cbe57f9a95e4b0dfced130eb3a8046d/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts/issues/L279-L282)
|
|
||||||
* **language-service:** Use proper types instead of any ([#29942](https://github.com/angular/angular/issues/29942)) ([1a56cd5](https://github.com/angular/angular/commit/1a56cd5))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **compiler-cli:** export tooling definitions ([#29929](https://github.com/angular/angular/issues/29929)) ([e1f51ea](https://github.com/angular/angular/commit/e1f51ea))
|
|
||||||
* **compiler-cli:** lower some exported expressions ([#30038](https://github.com/angular/angular/issues/30038)) ([8e73f9b](https://github.com/angular/angular/commit/8e73f9b))
|
|
||||||
* **core:** add schematics to move deprecated DOCUMENT import ([#29950](https://github.com/angular/angular/issues/29950)) ([645e305](https://github.com/angular/angular/commit/645e305))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="8.0.0-beta.13"></a>
|
|
||||||
# [8.0.0-beta.13](https://github.com/angular/angular/compare/8.0.0-beta.12...8.0.0-beta.13) (2019-04-16)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** Install packages after `ng add` when invoked independently ([#29852](https://github.com/angular/angular/issues/29852)) ([bd2ce9c](https://github.com/angular/angular/commit/bd2ce9c))
|
|
||||||
* **compiler-cli:** pass config path to ts.parseJsonConfigFileContent ([#29872](https://github.com/angular/angular/issues/29872)) ([86a3f90](https://github.com/angular/angular/commit/86a3f90)), closes [/github.com/Microsoft/TypeScript/blob/025d82633915b67003ea38ba40b9239a19721c13/src/compiler/emitter.ts#L56-L57](https://github.com//github.com/Microsoft/TypeScript/blob/025d82633915b67003ea38ba40b9239a19721c13/src/compiler/emitter.ts/issues/L56-L57)
|
|
||||||
* **router:** support non-NgFactory promise in loadChildren typings ([#29832](https://github.com/angular/angular/issues/29832)) ([2bfb6a0](https://github.com/angular/angular/commit/2bfb6a0))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="8.0.0-beta.12"></a>
|
|
||||||
# [8.0.0-beta.12](https://github.com/angular/angular/compare/8.0.0-beta.11...8.0.0-beta.12) (2019-04-13)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** add configuration_env_vars = ["compile"] to generated [@npm](https://github.com/npm)//[@angular](https://github.com/angular)/bazel/bin:ngc-wrapped nodejs_binary ([#29694](https://github.com/angular/angular/issues/29694)) ([2e66ddf](https://github.com/angular/angular/commit/2e66ddf))
|
|
||||||
* **bazel:** docs formatting ([#29817](https://github.com/angular/angular/issues/29817)) ([cc2e4b6](https://github.com/angular/angular/commit/cc2e4b6))
|
|
||||||
* **bazel:** remove karma-jasmine from ts_web_test_suite ([#29695](https://github.com/angular/angular/issues/29695)) ([2bd9214](https://github.com/angular/angular/commit/2bd9214))
|
|
||||||
* **bazel:** support running ng-add on minimal applications ([#29681](https://github.com/angular/angular/issues/29681)) ([9810c6c](https://github.com/angular/angular/commit/9810c6c)), closes [#29680](https://github.com/angular/angular/issues/29680)
|
|
||||||
* **common:** add `@Injectable()` to common pipes ([#29834](https://github.com/angular/angular/issues/29834)) ([387fbb8](https://github.com/angular/angular/commit/387fbb8))
|
|
||||||
* **compiler-cli:** ensure LogicalProjectPaths always start with a slash ([#29627](https://github.com/angular/angular/issues/29627)) ([e02684e](https://github.com/angular/angular/commit/e02684e))
|
|
||||||
* **core:** add missing migration to npm package ([#29705](https://github.com/angular/angular/issues/29705)) ([96b76dc](https://github.com/angular/angular/commit/96b76dc))
|
|
||||||
* **core:** call ngOnDestroy for tree-shakeable providers ([#28943](https://github.com/angular/angular/issues/28943)) ([30b0442](https://github.com/angular/angular/commit/30b0442)), closes [#28927](https://github.com/angular/angular/issues/28927)
|
|
||||||
* **core:** Deprecate TestBed.get(...):any ([#29290](https://github.com/angular/angular/issues/29290)) ([609024f](https://github.com/angular/angular/commit/609024f)), closes [#13785](https://github.com/angular/angular/issues/13785) [#26491](https://github.com/angular/angular/issues/26491)
|
|
||||||
* **core:** resolve ts compile issues due to lenient tsconfig ([#29843](https://github.com/angular/angular/issues/29843)) ([54058ba](https://github.com/angular/angular/commit/54058ba))
|
|
||||||
* **platform-browser:** insert APP_ID in styles, contentAttr and hostAttr ([#17745](https://github.com/angular/angular/issues/17745)) ([712d60e](https://github.com/angular/angular/commit/712d60e))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **bazel:** update the build to use the new architect api ([#29720](https://github.com/angular/angular/issues/29720)) ([902a53a](https://github.com/angular/angular/commit/902a53a))
|
|
||||||
|
|
||||||
|
|
||||||
### DEPRECATIONS
|
|
||||||
|
|
||||||
* `TestBed.get()` has two signatures, one which is typed and another which accepts and returns `any`. The signature for `any` is deprecated; all usage of `TestBed.get()` should go through the typed API. This mainly affects string tokens
|
|
||||||
(which aren't supported) and abstract class tokens.
|
|
||||||
|
|
||||||
Before:
|
|
||||||
|
|
||||||
```ts
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
providers: [{provide: "stringToken", useValue: new Service()}],
|
|
||||||
});
|
|
||||||
|
|
||||||
let service = TestBed.get("stringToken"); // type any
|
|
||||||
```
|
|
||||||
|
|
||||||
After:
|
|
||||||
|
|
||||||
```ts
|
|
||||||
const SERVICE_TOKEN = new InjectionToken<Service>("SERVICE_TOKEN");
|
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
providers: [{provide: SERVICE_TOKEN, useValue: new Service()}],
|
|
||||||
});
|
|
||||||
|
|
||||||
let service = TestBed.get(SERVICE_TOKEN); // type Service
|
|
||||||
```
|
|
||||||
|
|
||||||
<a name="7.2.13"></a>
|
|
||||||
## [7.2.13](https://github.com/angular/angular/compare/7.2.12...7.2.13) (2019-04-12)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** use //:tsconfig.json as the default for ng_module ([#29670](https://github.com/angular/angular/issues/29670)) ([#29711](https://github.com/angular/angular/issues/29711)) ([9e33dc3](https://github.com/angular/angular/commit/9e33dc3))
|
|
||||||
* **platform-browser:** insert APP_ID in styles, contentAttr and hostAttr ([#17745](https://github.com/angular/angular/issues/17745)) ([ca14509](https://github.com/angular/angular/commit/ca14509))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="8.0.0-beta.11"></a>
|
|
||||||
# [8.0.0-beta.11](https://github.com/angular/angular/compare/8.0.0-beta.10...8.0.0-beta.11) (2019-04-03)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** Update schematics to support routing ([#29548](https://github.com/angular/angular/issues/29548)) ([401b8ee](https://github.com/angular/angular/commit/401b8ee))
|
|
||||||
* **bazel:** use //:tsconfig.json as the default for ng_module ([#29670](https://github.com/angular/angular/issues/29670)) ([b14537a](https://github.com/angular/angular/commit/b14537a))
|
|
||||||
* **compiler-cli:** ngcc - cope with processing entry-points multiple times ([#29657](https://github.com/angular/angular/issues/29657)) ([6b39c9c](https://github.com/angular/angular/commit/6b39c9c))
|
|
||||||
* **core:** static-query schematic should detect static queries in getters. ([#29609](https://github.com/angular/angular/issues/29609)) ([33016b8](https://github.com/angular/angular/commit/33016b8))
|
|
||||||
|
|
||||||
|
|
||||||
### build
|
|
||||||
|
|
||||||
* **bazel:** update to nodejs rules 0.27.8 ([#29508](https://github.com/angular/angular/issues/29508)) ([d9162a8](https://github.com/angular/angular/commit/d9162a8))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* remove [@angular](https://github.com/angular)/http dependency from [@angular](https://github.com/angular)/platform-server ([#29408](https://github.com/angular/angular/issues/29408)) ([9745f55](https://github.com/angular/angular/commit/9745f55))
|
|
||||||
* **compiler-cli:** ngcc - make logging more configurable ([#29591](https://github.com/angular/angular/issues/29591)) ([8d3d75e](https://github.com/angular/angular/commit/8d3d75e))
|
|
||||||
* **core:** Add "AbstractType<T>" interface ([#29295](https://github.com/angular/angular/issues/29295)) ([afd4a4e](https://github.com/angular/angular/commit/afd4a4e)), closes [#26491](https://github.com/angular/angular/issues/26491)
|
|
||||||
* **core:** template-var-assignment update schematic ([#29608](https://github.com/angular/angular/issues/29608)) ([7c8f4e3](https://github.com/angular/angular/commit/7c8f4e3))
|
|
||||||
|
|
||||||
|
|
||||||
### BREAKING CHANGES
|
|
||||||
|
|
||||||
* **bazel:** @bazel/typescript is now a peerDependency of @angular/bazel so user's of @angular/bazel must add @bazel/typescript to their package.json
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="7.2.12"></a>
|
|
||||||
## [7.2.12](https://github.com/angular/angular/compare/7.2.11...7.2.12) (2019-04-03)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **common:** escape query selector used when anchor scrolling ([#29577](https://github.com/angular/angular/issues/29577)) ([7671c73](https://github.com/angular/angular/commit/7671c73)), closes [#28193](https://github.com/angular/angular/issues/28193)
|
|
||||||
* **router:** adjust setting navigationTransition when a new navigation cancels an existing one ([#29636](https://github.com/angular/angular/issues/29636)) ([e884c0c](https://github.com/angular/angular/commit/e884c0c)), closes [#29389](https://github.com/angular/angular/issues/29389) [#29590](https://github.com/angular/angular/issues/29590)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="8.0.0-beta.10"></a>
|
|
||||||
# [8.0.0-beta.10](https://github.com/angular/angular/compare/8.0.0-beta.9...8.0.0-beta.10) (2019-03-26)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** allow ng_module users to set createExternalSymbolFactoryReexports ([#29459](https://github.com/angular/angular/issues/29459)) ([21be0fb](https://github.com/angular/angular/commit/21be0fb))
|
|
||||||
* **bazel:** workaround problem reading summary files from node_modules ([#29459](https://github.com/angular/angular/issues/29459)) ([769d960](https://github.com/angular/angular/commit/769d960))
|
|
||||||
* **compiler:** inherit param types when class has a constructor which takes no declared parameters and delegates up ([#29232](https://github.com/angular/angular/issues/29232)) ([0007564](https://github.com/angular/angular/commit/0007564))
|
|
||||||
* **core:** parse incorrect ML open tag as text ([#29328](https://github.com/angular/angular/issues/29328)) ([dafbbf8](https://github.com/angular/angular/commit/dafbbf8)), closes [#29231](https://github.com/angular/angular/issues/29231)
|
|
||||||
* **core:** static-query schematic should detect queries in "ngDoCheck" and "ngOnChanges" ([#29492](https://github.com/angular/angular/issues/29492)) ([09fab58](https://github.com/angular/angular/commit/09fab58))
|
|
||||||
* **router:** support NgFactory promise in loadChildren typings ([#29392](https://github.com/angular/angular/issues/29392)) ([26a8c59](https://github.com/angular/angular/commit/26a8c59))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **bazel:** Upgrade rules_nodejs and rules_sass ([#29388](https://github.com/angular/angular/issues/29388)) ([d6d081e](https://github.com/angular/angular/commit/d6d081e))
|
|
||||||
* **service-worker:** support multiple apps on different subpaths of a domain ([#27080](https://github.com/angular/angular/issues/27080)) ([e721c08](https://github.com/angular/angular/commit/e721c08)), closes [#21388](https://github.com/angular/angular/issues/21388)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="7.2.11"></a>
|
|
||||||
## [7.2.11](https://github.com/angular/angular/compare/7.2.10...7.2.11) (2019-03-26)
|
|
||||||
|
|
||||||
This release contains various API docs improvements.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="8.0.0-beta.9"></a>
|
|
||||||
# [8.0.0-beta.9](https://github.com/angular/angular/compare/8.0.0-beta.8...8.0.0-beta.9) (2019-03-20)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** correct regexp test for self-references in metadata ([#29346](https://github.com/angular/angular/issues/29346)) ([9d090cb](https://github.com/angular/angular/commit/9d090cb))
|
|
||||||
* **bazel:** don't produce self-references in metadata ([#29317](https://github.com/angular/angular/issues/29317)) ([3facdeb](https://github.com/angular/angular/commit/3facdeb)), closes [#29315](https://github.com/angular/angular/issues/29315)
|
|
||||||
* **bazel:** fix strict null checks compile error in packages/bazel/src/schematics/ng-add/index.ts ([#29282](https://github.com/angular/angular/issues/29282)) ([9a7f560](https://github.com/angular/angular/commit/9a7f560))
|
|
||||||
* **bazel:** Remove [@angular](https://github.com/angular)/upgrade from dev dependencies ([#29319](https://github.com/angular/angular/issues/29319)) ([1db8bf3](https://github.com/angular/angular/commit/1db8bf3))
|
|
||||||
* **bazel:** Support new e2e project layout ([#29318](https://github.com/angular/angular/issues/29318)) ([8ef690c](https://github.com/angular/angular/commit/8ef690c))
|
|
||||||
* **bazel:** turn off pure call tree shaking for ng_package ([#29210](https://github.com/angular/angular/issues/29210)) ([4990b93](https://github.com/angular/angular/commit/4990b93))
|
|
||||||
* **compiler-cli:** incorrect metadata bundle for multiple unnamed re-exports ([#29360](https://github.com/angular/angular/issues/29360)) ([105cfaf](https://github.com/angular/angular/commit/105cfaf)), closes [/github.com/angular/material2/blob/master/tools/package-tools/build-release.ts#L78-L85](https://github.com//github.com/angular/material2/blob/master/tools/package-tools/build-release.ts/issues/L78-L85)
|
|
||||||
* **core:** don't wrap `<tr>` and `<col>` elements into a required parent ([#29219](https://github.com/angular/angular/issues/29219)) ([f2dc32e](https://github.com/angular/angular/commit/f2dc32e))
|
|
||||||
* **core:** parse incorrect ML open tag as text ([#29328](https://github.com/angular/angular/issues/29328)) ([4605df8](https://github.com/angular/angular/commit/4605df8)), closes [#29231](https://github.com/angular/angular/issues/29231)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* add support for TypeScript 3.3 (and drop older versions) ([#29004](https://github.com/angular/angular/issues/29004)) ([75748d6](https://github.com/angular/angular/commit/75748d6))
|
|
||||||
|
|
||||||
|
|
||||||
### BREAKING CHANGES
|
|
||||||
|
|
||||||
* **core:** Certain elements (like `<tr>` or `<col>`) require parent elements to be of a certain type by the HTML specification
|
|
||||||
(ex. `<tr>` can only be inside `<tbody>` / `<thead>`). Before this change Angular template parser was auto-correcting
|
|
||||||
"invalid" HTML using the following rules:
|
|
||||||
- `<tr>` would be wrapped in `<tbody>` if not inside `<tbody>`, `<tfoot>` or `<thead>`;
|
|
||||||
- `<col>` would be wrapped in `<colgroup>` if not inside `<colgroup>`.
|
|
||||||
|
|
||||||
This meachanism of automatic wrapping / auto-correcting was problematic for several reasons:
|
|
||||||
- it is non-obvious and arbitrary (ex. there are more HTML elements that has rules for parent type);
|
|
||||||
- it is incorrect for cases where `<tr>` / `<col>` are at the root of a component's content, ex.:
|
|
||||||
|
|
||||||
```html
|
|
||||||
<projecting-tr-inside-tbody>
|
|
||||||
<tr>...</tr>
|
|
||||||
</projecting-tr-inside-tbody>
|
|
||||||
```
|
|
||||||
|
|
||||||
In the above example the `<projecting-tr-inside-tbody>` component could be "surprised" to see additional
|
|
||||||
`<tbody>` elements inserted by Angular HTML parser.
|
|
||||||
|
|
||||||
|
|
||||||
* TypeScript 3.1 and 3.2 are no longer supported.
|
|
||||||
|
|
||||||
Please update your TypeScript version to 3.3
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="7.2.10"></a>
|
<a name="7.2.10"></a>
|
||||||
## [7.2.10](https://github.com/angular/angular/compare/7.2.9...7.2.10) (2019-03-20)
|
## [7.2.10](https://github.com/angular/angular/compare/7.2.9...7.2.10) (2019-03-20)
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
* **compiler-cli:** incorrect metadata bundle for multiple unnamed re-exports ([#29360](https://github.com/angular/angular/issues/29360)) ([cf8d934](https://github.com/angular/angular/commit/cf8d934)), closes [github.com/angular/material2/blob/master/tools/package-tools/build-release.ts#L78-L85](https://github.com/angular/material2/blob/master/tools/package-tools/build-release.ts#L78-L85)
|
* **compiler-cli:** incorrect metadata bundle for multiple unnamed re-exports ([#29360](https://github.com/angular/angular/issues/29360)) ([cf8d934](https://github.com/angular/angular/commit/cf8d934)), closes [/github.com/angular/material2/blob/master/tools/package-tools/build-release.ts#L78-L85](https://github.com//github.com/angular/material2/blob/master/tools/package-tools/build-release.ts/issues/L78-L85)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="8.0.0-beta.8"></a>
|
|
||||||
# [8.0.0-beta.8](https://github.com/angular/angular/compare/8.0.0-beta.7...8.0.0-beta.8) (2019-03-12)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** add missing binary path for api-extractor ([#29202](https://github.com/angular/angular/issues/29202)) ([df354d1](https://github.com/angular/angular/commit/df354d1))
|
|
||||||
* **bazel:** ng build should produce prod bundle ([#29136](https://github.com/angular/angular/issues/29136)) ([14ce8a9](https://github.com/angular/angular/commit/14ce8a9))
|
|
||||||
* **compiler:** ensure template is updated if an output is transformed ([#29041](https://github.com/angular/angular/issues/29041)) ([c7e4931](https://github.com/angular/angular/commit/c7e4931))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **bazel:** Eject Bazel ([#29167](https://github.com/angular/angular/issues/29167)) ([36a1550](https://github.com/angular/angular/commit/36a1550))
|
|
||||||
* **bazel:** Hide Bazel files in Bazel builder ([#29110](https://github.com/angular/angular/issues/29110)) ([7060d90](https://github.com/angular/angular/commit/7060d90))
|
|
||||||
* **forms:** clear (remove all) components from a FormArray ([#28918](https://github.com/angular/angular/issues/28918)) ([a68b1a1](https://github.com/angular/angular/commit/a68b1a1)), closes [#18531](https://github.com/angular/angular/issues/18531)
|
|
||||||
* **platform-server:** wait on returned BEFORE_APP_SERIALIZED promises ([#29120](https://github.com/angular/angular/issues/29120)) ([7102ea8](https://github.com/angular/angular/commit/7102ea8))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -311,31 +13,6 @@ Please update your TypeScript version to 3.3
|
|||||||
|
|
||||||
This release contains various API docs improvements.
|
This release contains various API docs improvements.
|
||||||
|
|
||||||
|
|
||||||
<a name="8.0.0-beta.7"></a>
|
|
||||||
# [8.0.0-beta.7](https://github.com/angular/angular/compare/8.0.0-beta.6...8.0.0-beta.7) (2019-03-06)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **animations:** ensure `position` and `display` styles are handled outside of keyframes/web-animations ([#28911](https://github.com/angular/angular/issues/28911)) ([a6ae759](https://github.com/angular/angular/commit/a6ae759)), closes [#24923](https://github.com/angular/angular/issues/24923) [#25635](https://github.com/angular/angular/issues/25635)
|
|
||||||
* **bazel:** add favicon to web package ([#29017](https://github.com/angular/angular/issues/29017)) ([5fdf24e](https://github.com/angular/angular/commit/5fdf24e))
|
|
||||||
* **bazel:** Add SHA256 for rules_sass ([#28994](https://github.com/angular/angular/issues/28994)) ([dc33519](https://github.com/angular/angular/commit/dc33519))
|
|
||||||
* **bazel:** api extractor don't generate tsdoc metadata ([#29023](https://github.com/angular/angular/issues/29023)) ([b5629d9](https://github.com/angular/angular/commit/b5629d9))
|
|
||||||
* **bazel:** ng serve should always watch ([#29032](https://github.com/angular/angular/issues/29032)) ([c532646](https://github.com/angular/angular/commit/c532646))
|
|
||||||
* **platform-server:** update minimum domino version to latest released ([#28893](https://github.com/angular/angular/issues/28893)) ([79e2ca0](https://github.com/angular/angular/commit/79e2ca0))
|
|
||||||
* **router:** removed obsolete TODO comment ([#29085](https://github.com/angular/angular/issues/29085)) ([72ecc45](https://github.com/angular/angular/commit/72ecc45))
|
|
||||||
* **service-worker:** detect new version even if files are identical to an old one ([#26006](https://github.com/angular/angular/issues/26006)) ([586234b](https://github.com/angular/angular/commit/586234b)), closes [#24338](https://github.com/angular/angular/issues/24338)
|
|
||||||
* **service-worker:** ignore passive mixed content requests ([#25994](https://github.com/angular/angular/issues/25994)) ([48214e2](https://github.com/angular/angular/commit/48214e2)), closes [/github.com/angular/angular/issues/23012#issuecomment-376430187](https://github.com//github.com/angular/angular/issues/23012/issues/issuecomment-376430187) [#23012](https://github.com/angular/angular/issues/23012)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **core:** update schematic to migrate to explicit query timing ([#28983](https://github.com/angular/angular/issues/28983)) ([6215799](https://github.com/angular/angular/commit/6215799))
|
|
||||||
* **service-worker:** add JSON schema for service worker config ([#27859](https://github.com/angular/angular/issues/27859)) ([3bee0f6](https://github.com/angular/angular/commit/3bee0f6)), closes [#19847](https://github.com/angular/angular/issues/19847)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="7.2.8"></a>
|
<a name="7.2.8"></a>
|
||||||
## [7.2.8](https://github.com/angular/angular/compare/7.2.7...7.2.8) (2019-03-06)
|
## [7.2.8](https://github.com/angular/angular/compare/7.2.7...7.2.8) (2019-03-06)
|
||||||
|
|
||||||
@ -349,25 +26,6 @@ This release contains various API docs improvements.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="8.0.0-beta.6"></a>
|
|
||||||
# [8.0.0-beta.6](https://github.com/angular/angular/compare/8.0.0-beta.5...8.0.0-beta.6) (2019-02-27)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** Pin browsers for schematics ([#28913](https://github.com/angular/angular/issues/28913)) ([1145bdb](https://github.com/angular/angular/commit/1145bdb))
|
|
||||||
* **bazel:** rxjs_umd_modules should always be present ([#28881](https://github.com/angular/angular/issues/28881)) ([9ae14db](https://github.com/angular/angular/commit/9ae14db))
|
|
||||||
* **compiler:** use correct variable in invalid function ([#28656](https://github.com/angular/angular/issues/28656)) ([f75acbd](https://github.com/angular/angular/commit/f75acbd))
|
|
||||||
* **core:** traverse and sanitize content of unsafe elements ([#28804](https://github.com/angular/angular/issues/28804)) ([262ba67](https://github.com/angular/angular/commit/262ba67)), closes [#25879](https://github.com/angular/angular/issues/25879) [#25879](https://github.com/angular/angular/issues/25879) [#26007](https://github.com/angular/angular/issues/26007) [#28427](https://github.com/angular/angular/issues/28427)
|
|
||||||
* **language-service:** Fix completions for input/output with alias ([#28904](https://github.com/angular/angular/issues/28904)) ([ad4a9bf](https://github.com/angular/angular/commit/ad4a9bf)), closes [#27959](https://github.com/angular/angular/issues/27959)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **bazel:** add ts_config extending support for ng_module ([#21883](https://github.com/angular/angular/issues/21883)) ([edb6c2d](https://github.com/angular/angular/commit/edb6c2d))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="7.2.7"></a>
|
<a name="7.2.7"></a>
|
||||||
## [7.2.7](https://github.com/angular/angular/compare/7.2.6...7.2.7) (2019-02-27)
|
## [7.2.7](https://github.com/angular/angular/compare/7.2.6...7.2.7) (2019-02-27)
|
||||||
|
|
||||||
@ -378,24 +36,6 @@ This release contains various API docs improvements.
|
|||||||
* **core:** traverse and sanitize content of unsafe elements ([#28804](https://github.com/angular/angular/issues/28804)) ([fdcf877](https://github.com/angular/angular/commit/fdcf877)), closes [#25879](https://github.com/angular/angular/issues/25879) [#25879](https://github.com/angular/angular/issues/25879) [#26007](https://github.com/angular/angular/issues/26007) [#28427](https://github.com/angular/angular/issues/28427)
|
* **core:** traverse and sanitize content of unsafe elements ([#28804](https://github.com/angular/angular/issues/28804)) ([fdcf877](https://github.com/angular/angular/commit/fdcf877)), closes [#25879](https://github.com/angular/angular/issues/25879) [#25879](https://github.com/angular/angular/issues/25879) [#26007](https://github.com/angular/angular/issues/26007) [#28427](https://github.com/angular/angular/issues/28427)
|
||||||
* **language-service:** Fix completions for input/output with alias ([#28904](https://github.com/angular/angular/issues/28904)) ([d0018e6](https://github.com/angular/angular/commit/d0018e6)), closes [#27959](https://github.com/angular/angular/issues/27959)
|
* **language-service:** Fix completions for input/output with alias ([#28904](https://github.com/angular/angular/issues/28904)) ([d0018e6](https://github.com/angular/angular/commit/d0018e6)), closes [#27959](https://github.com/angular/angular/issues/27959)
|
||||||
|
|
||||||
<a name="8.0.0-beta.5"></a>
|
|
||||||
# [8.0.0-beta.5](https://github.com/angular/angular/compare/8.0.0-beta.4...8.0.0-beta.5) (2019-02-20)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** Add postinstall step to generate summaries ([#28850](https://github.com/angular/angular/issues/28850)) ([96b597c](https://github.com/angular/angular/commit/96b597c))
|
|
||||||
* **bazel:** Schematics should upgrade rxjs to 6.4.0 ([#28841](https://github.com/angular/angular/issues/28841)) ([2d80419](https://github.com/angular/angular/commit/2d80419))
|
|
||||||
* **compiler-cli:** incorrect bundled metadata for static class member call expressions ([#28762](https://github.com/angular/angular/issues/28762)) ([4131715](https://github.com/angular/angular/commit/4131715)), closes [/github.com/angular/angular/blob/master/packages/core/src/change_detection/differs/keyvalue_differs.ts#L121](https://github.com//github.com/angular/angular/blob/master/packages/core/src/change_detection/differs/keyvalue_differs.ts/issues/L121) [#28741](https://github.com/angular/angular/issues/28741)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* upgrade domino to v2.1.2 ([#28767](https://github.com/angular/angular/issues/28767)) ([fdca001](https://github.com/angular/angular/commit/fdca001))
|
|
||||||
* **compiler-cli:** make enableIvy ngtsc/true equivalent ([#28616](https://github.com/angular/angular/issues/28616)) ([1923c2f](https://github.com/angular/angular/commit/1923c2f))
|
|
||||||
* **core:** allow users to define timing of ViewChild/ContentChild queries ([#28810](https://github.com/angular/angular/issues/28810)) ([19afb79](https://github.com/angular/angular/commit/19afb79))
|
|
||||||
* **router:** add hash-based navigation option to setUpLocationSync ([#28609](https://github.com/angular/angular/issues/28609)) ([71d0eeb](https://github.com/angular/angular/commit/71d0eeb)), closes [#24429](https://github.com/angular/angular/issues/24429) [#21995](https://github.com/angular/angular/issues/21995)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="7.2.6"></a>
|
<a name="7.2.6"></a>
|
||||||
@ -408,74 +48,15 @@ This release contains various API docs improvements.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="8.0.0-beta.4"></a>
|
|
||||||
# [8.0.0-beta.4](https://github.com/angular/angular/compare/8.0.0-beta.3...8.0.0-beta.4) (2019-02-15)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** Install angular repo before yarn_install ([#28670](https://github.com/angular/angular/issues/28670)) ([49fb8c3](https://github.com/angular/angular/commit/49fb8c3))
|
|
||||||
* **bazel:** Turn on strict action env ([#28675](https://github.com/angular/angular/issues/28675)) ([2ea030c](https://github.com/angular/angular/commit/2ea030c))
|
|
||||||
* **compiler:** ensure that event handlers have the correct source spans ([#28055](https://github.com/angular/angular/issues/28055)) ([cffd862](https://github.com/angular/angular/commit/cffd862))
|
|
||||||
* **compiler:** fix two existing expression transformer issues ([#28523](https://github.com/angular/angular/issues/28523)) ([09af7ea](https://github.com/angular/angular/commit/09af7ea))
|
|
||||||
* **compiler:** markup lexer should not capture quotes in attribute value ([#28055](https://github.com/angular/angular/issues/28055)) ([c0dac18](https://github.com/angular/angular/commit/c0dac18))
|
|
||||||
* **compiler:** support `sourceMappingURL` comments that have trailing lines ([#28055](https://github.com/angular/angular/issues/28055)) ([0d6fdec](https://github.com/angular/angular/commit/0d6fdec))
|
|
||||||
* **compiler-cli:** don't throw when listing lazy routes for an entry route ([#28372](https://github.com/angular/angular/issues/28372)) ([2caa419](https://github.com/angular/angular/commit/2caa419))
|
|
||||||
* **core:** improve global variable detection ([#28679](https://github.com/angular/angular/issues/28679)) ([77eee42](https://github.com/angular/angular/commit/77eee42)), closes [#16545](https://github.com/angular/angular/issues/16545)
|
|
||||||
* **core:** use the correct generated URL for JIT compiled components ([#28055](https://github.com/angular/angular/issues/28055)) ([4f46bfb](https://github.com/angular/angular/commit/4f46bfb))
|
|
||||||
* **core:** use the correct template URL in render3 JIT compilation ([#28055](https://github.com/angular/angular/issues/28055)) ([a5ea55a](https://github.com/angular/angular/commit/a5ea55a))
|
|
||||||
* **forms:** mark form as pristine before emitting value and status change events ([#28395](https://github.com/angular/angular/issues/28395)) ([1df3aef](https://github.com/angular/angular/commit/1df3aef)), closes [#28130](https://github.com/angular/angular/issues/28130)
|
|
||||||
* **router:** redirect to root url when returned as UrlTree from guard ([#28271](https://github.com/angular/angular/issues/28271)) ([50732e1](https://github.com/angular/angular/commit/50732e1)), closes [#27845](https://github.com/angular/angular/issues/27845)
|
|
||||||
* **router:** set href when routerLink is used on an 'area' element ([#28441](https://github.com/angular/angular/issues/28441)) ([ed0cf7e](https://github.com/angular/angular/commit/ed0cf7e)), closes [#28401](https://github.com/angular/angular/issues/28401)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* optionally save complete performance log in chrome benchpress tests ([#27551](https://github.com/angular/angular/issues/27551)) ([d42f32c](https://github.com/angular/angular/commit/d42f32c))
|
|
||||||
* **bazel:** add dts bundler as action to ng_module ([#28588](https://github.com/angular/angular/issues/28588)) ([3d39100](https://github.com/angular/angular/commit/3d39100))
|
|
||||||
* **compiler:** support tokenizing a sub-section of an input string ([#28055](https://github.com/angular/angular/issues/28055)) ([eeb560a](https://github.com/angular/angular/commit/eeb560a))
|
|
||||||
* **compiler:** support tokenizing escaped strings ([#28055](https://github.com/angular/angular/issues/28055)) ([2424184](https://github.com/angular/angular/commit/2424184))
|
|
||||||
* **compiler-cli:** no longer re-export external symbols by default ([#28633](https://github.com/angular/angular/issues/28633)) ([91b7152](https://github.com/angular/angular/commit/91b7152)), closes [#28594](https://github.com/angular/angular/issues/28594) [#25644](https://github.com/angular/angular/issues/25644) [#25644](https://github.com/angular/angular/issues/25644)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="7.2.5"></a>
|
<a name="7.2.5"></a>
|
||||||
## [7.2.5](https://github.com/angular/angular/compare/7.2.4...7.2.5)
|
## [7.2.5](https://github.com/angular/angular/compare/7.2.4...7.2.5) (2019-02-15)
|
||||||
(2019-02-15)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
* **compiler-cli:** diagnostics should respect "newLine" compiler option
|
* **compiler-cli:** diagnostics should respect "newLine" compiler option ([#28550](https://github.com/angular/angular/issues/28550)) ([ce750e6](https://github.com/angular/angular/commit/ce750e6))
|
||||||
([#28550](https://github.com/angular/angular/issues/28550))
|
* **router:** redirect to root url when returned as UrlTree from guard ([#28271](https://github.com/angular/angular/issues/28271)) ([1e58a21](https://github.com/angular/angular/commit/1e58a21)), closes [#27845](https://github.com/angular/angular/issues/27845)
|
||||||
([ce750e6](https://github.com/angular/angular/commit/ce750e6))
|
* **router:** set href when routerLink is used on an 'area' element ([#28441](https://github.com/angular/angular/issues/28441)) ([d491a20](https://github.com/angular/angular/commit/d491a20)), closes [#28401](https://github.com/angular/angular/issues/28401)
|
||||||
* **router:** redirect to root url when returned as UrlTree from guard
|
|
||||||
([#28271](https://github.com/angular/angular/issues/28271))
|
|
||||||
([1e58a21](https://github.com/angular/angular/commit/1e58a21)), closes
|
|
||||||
[#27845](https://github.com/angular/angular/issues/27845)
|
|
||||||
* **router:** set href when routerLink is used on an 'area' element
|
|
||||||
([#28441](https://github.com/angular/angular/issues/28441))
|
|
||||||
([d491a20](https://github.com/angular/angular/commit/d491a20)), closes
|
|
||||||
[#28401](https://github.com/angular/angular/issues/28401)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="8.0.0-beta.3"></a>
|
|
||||||
# [8.0.0-beta.3](https://github.com/angular/angular/compare/8.0.0-beta.2...8.0.0-beta.3) (2019-02-06)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** Bazel builder resolves with require.resolve() ([#28478](https://github.com/angular/angular/issues/28478)) ([36902e2](https://github.com/angular/angular/commit/36902e2))
|
|
||||||
* **bazel:** fix integration test for bazel-schematics ([#28460](https://github.com/angular/angular/issues/28460)) ([b1e099b](https://github.com/angular/angular/commit/b1e099b))
|
|
||||||
* **compiler-cli:** base synthetic filepaths on input filepath ([#28453](https://github.com/angular/angular/issues/28453)) ([7219639](https://github.com/angular/angular/commit/7219639))
|
|
||||||
* **compiler-cli:** diagnostics should respect "newLine" compiler option ([#28352](https://github.com/angular/angular/issues/28352)) ([4aa189d](https://github.com/angular/angular/commit/4aa189d))
|
|
||||||
* **core:** remove createInjector() from public API ([#28509](https://github.com/angular/angular/issues/28509)) ([f2621db](https://github.com/angular/angular/commit/f2621db))
|
|
||||||
|
|
||||||
|
|
||||||
### Performance Improvements
|
|
||||||
|
|
||||||
* pngcrush all pngs ([#28479](https://github.com/angular/angular/issues/28479)) ([ec6e730](https://github.com/angular/angular/commit/ec6e730)), closes [#18243](https://github.com/angular/angular/issues/18243)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -495,27 +76,6 @@ This release contains various API docs improvements.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="8.0.0-beta.2"></a>
|
|
||||||
# [8.0.0-beta.2](https://github.com/angular/angular/compare/8.0.0-beta.1...8.0.0-beta.2) (2019-01-30)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** also pass afterDeclarations transformers to emitWithTsickle ([#28342](https://github.com/angular/angular/issues/28342)) ([70e426b](https://github.com/angular/angular/commit/70e426b))
|
|
||||||
* **forms:** don't override form group's dirty state when disabling controls ([#24591](https://github.com/angular/angular/issues/24591)) ([ef67282](https://github.com/angular/angular/commit/ef67282))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **compiler-cli:** expose ngtsc as a TscPlugin ([#28435](https://github.com/angular/angular/issues/28435)) ([a227c52](https://github.com/angular/angular/commit/a227c52))
|
|
||||||
|
|
||||||
|
|
||||||
### Performance Improvements
|
|
||||||
|
|
||||||
* **core:** be more consistent about typeof checks ([#28400](https://github.com/angular/angular/issues/28400)) ([9af18c2](https://github.com/angular/angular/commit/9af18c2))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="7.2.3"></a>
|
<a name="7.2.3"></a>
|
||||||
## [7.2.3](https://github.com/angular/angular/compare/7.2.2...7.2.3) (2019-01-30)
|
## [7.2.3](https://github.com/angular/angular/compare/7.2.2...7.2.3) (2019-01-30)
|
||||||
|
|
||||||
@ -534,29 +94,6 @@ This release contains various API docs improvements.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="8.0.0-beta.1"></a>
|
|
||||||
# [8.0.0-beta.1](https://github.com/angular/angular/compare/8.0.0-beta.0...8.0.0-beta.1) (2019-01-22)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** increase node memory limit for ng_module rule to prevent OOM for big modules ([#28237](https://github.com/angular/angular/issues/28237)) ([73616ab](https://github.com/angular/angular/commit/73616ab))
|
|
||||||
* **router:** `skipLocationChange` with named outlets ([#28300](https://github.com/angular/angular/issues/28300)) ([50df897](https://github.com/angular/angular/commit/50df897)), 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)) ([f59f18c](https://github.com/angular/angular/commit/f59f18c))
|
|
||||||
* **compiler-cli:** resolve generated Sass/Less files to .css inputs ([#28166](https://github.com/angular/angular/issues/28166)) ([a58fd21](https://github.com/angular/angular/commit/a58fd21))
|
|
||||||
* **forms:** add `markAllAsTouched()` to `AbstractControl` ([#26812](https://github.com/angular/angular/issues/26812)) ([45bf911](https://github.com/angular/angular/commit/45bf911)), closes [#19400](https://github.com/angular/angular/issues/19400)
|
|
||||||
|
|
||||||
|
|
||||||
### Reverts
|
|
||||||
|
|
||||||
* "ci: use image based cache for windows BuildKite ([#27990](https://github.com/angular/angular/issues/27990))" ([#28160](https://github.com/angular/angular/issues/28160)) ([7bdf3fe](https://github.com/angular/angular/commit/7bdf3fe))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="7.2.2"></a>
|
<a name="7.2.2"></a>
|
||||||
## [7.2.2](https://github.com/angular/angular/compare/7.2.1...7.2.2) (2019-01-22)
|
## [7.2.2](https://github.com/angular/angular/compare/7.2.1...7.2.2) (2019-01-22)
|
||||||
|
|
||||||
@ -574,38 +111,6 @@ This release contains various API docs improvements.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="8.0.0-beta.0"></a>
|
|
||||||
# [8.0.0-beta.0](https://github.com/angular/angular/compare/7.2.0...8.0.0-beta.0) (2019-01-16)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** Add [@bazel](https://github.com/bazel)/bazel to dev deps ([#28032](https://github.com/angular/angular/issues/28032)) ([5a0deb8](https://github.com/angular/angular/commit/5a0deb8))
|
|
||||||
* **bazel:** Add /bazel-out to .gitignore ([#27874](https://github.com/angular/angular/issues/27874)) ([b05baa5](https://github.com/angular/angular/commit/b05baa5))
|
|
||||||
* **bazel:** Add ibazel to deps of Bazel project ([#28090](https://github.com/angular/angular/issues/28090)) ([605f450](https://github.com/angular/angular/commit/605f450))
|
|
||||||
* **bazel:** Bazel schematics should add router package ([#28141](https://github.com/angular/angular/issues/28141)) ([06e5bf1](https://github.com/angular/angular/commit/06e5bf1))
|
|
||||||
* **bazel:** flat module misses AMD module name on windows ([#27839](https://github.com/angular/angular/issues/27839)) ([935ce63](https://github.com/angular/angular/commit/935ce63))
|
|
||||||
* **bazel:** incorrectly always uses ngc-wrapped from "npm" workspace ([#28137](https://github.com/angular/angular/issues/28137)) ([d12db4e](https://github.com/angular/angular/commit/d12db4e))
|
|
||||||
* **bazel:** ng_package creates invalid typings reexport on windows ([#27829](https://github.com/angular/angular/issues/27829)) ([4caf654](https://github.com/angular/angular/commit/4caf654))
|
|
||||||
* **bazel:** packager not properly removing amd directives on windows ([#27829](https://github.com/angular/angular/issues/27829)) ([8473d68](https://github.com/angular/angular/commit/8473d68))
|
|
||||||
* **bazel:** protractor rule does not run spec files with underscore ([#28022](https://github.com/angular/angular/issues/28022)) ([65e72e9](https://github.com/angular/angular/commit/65e72e9))
|
|
||||||
* **bazel:** protractor utils cannot start server on windows ([#27915](https://github.com/angular/angular/issues/27915)) ([9de9c8a](https://github.com/angular/angular/commit/9de9c8a))
|
|
||||||
* **bazel:** replay compilation uses wrong compiler for building esm5 ([#28053](https://github.com/angular/angular/issues/28053)) ([cd04513](https://github.com/angular/angular/commit/cd04513))
|
|
||||||
* **bazel:** ts_web_test_suite now properly includes init_browser_spec.js ([#27965](https://github.com/angular/angular/issues/27965)) ([ce51dfb](https://github.com/angular/angular/commit/ce51dfb))
|
|
||||||
* **service-worker:** navigation urls backwards compatibility ([#27244](https://github.com/angular/angular/issues/27244)) ([d49d1e7](https://github.com/angular/angular/commit/d49d1e7))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **forms:** export NumberValueAccessor & RangeValueAccessor directives ([#27743](https://github.com/angular/angular/issues/27743)) ([ac15717](https://github.com/angular/angular/commit/ac15717))
|
|
||||||
|
|
||||||
|
|
||||||
### Performance Improvements
|
|
||||||
|
|
||||||
* **platform-server:** use shared `DomElementSchemaRegistry` instance ([#28150](https://github.com/angular/angular/issues/28150)) ([#28151](https://github.com/angular/angular/issues/28151)) ([ce3a746](https://github.com/angular/angular/commit/ce3a746))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="7.2.1"></a>
|
<a name="7.2.1"></a>
|
||||||
## [7.2.1](https://github.com/angular/angular/compare/7.2.0...7.2.1) (2019-01-16)
|
## [7.2.1](https://github.com/angular/angular/compare/7.2.0...7.2.1) (2019-01-16)
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[](https://circleci.com/gh/angular/workflows/angular/tree/master)
|
[](https://circleci.com/gh/angular/angular/tree/master)
|
||||||
[](https://www.browserstack.com/automate/public-build/LzF3RzBVVGt6VWE2S0hHaC9uYllOZz09LS1BVjNTclBKV0x4eVRlcjA4QVY1M0N3PT0=--eb4ce8c8dc2c1c5b2b5352d473ee12a73ac20e06)
|
[](https://www.browserstack.com/automate/public-build/LzF3RzBVVGt6VWE2S0hHaC9uYllOZz09LS1BVjNTclBKV0x4eVRlcjA4QVY1M0N3PT0=--eb4ce8c8dc2c1c5b2b5352d473ee12a73ac20e06)
|
||||||
[](https://gitter.im/angular/angular?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[](https://gitter.im/angular/angular?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
[](https://www.npmjs.com/@angular/core)
|
[](https://www.npmjs.com/@angular/core)
|
||||||
|
24
WORKSPACE
24
WORKSPACE
@ -15,12 +15,13 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|||||||
# Fetch rules_nodejs so we can install our npm dependencies
|
# Fetch rules_nodejs so we can install our npm dependencies
|
||||||
http_archive(
|
http_archive(
|
||||||
name = "build_bazel_rules_nodejs",
|
name = "build_bazel_rules_nodejs",
|
||||||
sha256 = "3a3efbf223f6de733475602844ad3a8faa02abda25ab8cfe1d1ed0db134887cf",
|
sha256 = "5c86b055c57e15bf32d9009a15bcd6d8e190c41b1ff2fb18037b75e0012e4e7c",
|
||||||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.27.12/rules_nodejs-0.27.12.tar.gz"],
|
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.26.0/rules_nodejs-0.26.0.tar.gz"],
|
||||||
)
|
)
|
||||||
|
|
||||||
# Check the bazel version and download npm dependencies
|
# Check the bazel version and download npm dependencies
|
||||||
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "check_rules_nodejs_version", "node_repositories", "yarn_install")
|
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
|
||||||
|
load("@build_bazel_rules_nodejs//:package.bzl", "check_rules_nodejs_version")
|
||||||
|
|
||||||
# Bazel version must be at least v0.21.0 because:
|
# Bazel version must be at least v0.21.0 because:
|
||||||
# - 0.21.0 Using --incompatible_strict_action_env flag fixes cache when running `yarn bazel`
|
# - 0.21.0 Using --incompatible_strict_action_env flag fixes cache when running `yarn bazel`
|
||||||
@ -41,22 +42,13 @@ Try running `yarn bazel` instead.
|
|||||||
# - 0.15.3 Includes a fix for the `jasmine_node_test` rule ignoring target tags
|
# - 0.15.3 Includes a fix for the `jasmine_node_test` rule ignoring target tags
|
||||||
# - 0.16.8 Supports npm installed bazel workspaces
|
# - 0.16.8 Supports npm installed bazel workspaces
|
||||||
# - 0.26.0 Fix for data files in yarn_install and npm_install
|
# - 0.26.0 Fix for data files in yarn_install and npm_install
|
||||||
# - 0.27.12 Adds NodeModuleSources provider for transtive npm deps support
|
check_rules_nodejs_version("0.26.0")
|
||||||
check_rules_nodejs_version("0.27.12")
|
|
||||||
|
|
||||||
# Setup the Node.js toolchain
|
# Setup the Node.js toolchain
|
||||||
node_repositories(
|
node_repositories(
|
||||||
node_version = "10.9.0",
|
node_version = "10.9.0",
|
||||||
package_json = ["//:package.json"],
|
package_json = ["//:package.json"],
|
||||||
preserve_symlinks = True,
|
preserve_symlinks = True,
|
||||||
# yarn 1.13.0 under Bazel has a regression on Windows that causes build errors on rebuilds:
|
|
||||||
# ```
|
|
||||||
# ERROR: Source forest creation failed: C:/.../fyuc5c3n/execroot/angular/external (Directory not empty)
|
|
||||||
# ```
|
|
||||||
# See https://github.com/angular/angular/pull/29431 for more information.
|
|
||||||
# It possible that versions of yarn past 1.13.0 do not have this issue, however, before
|
|
||||||
# advancing this version we need to test manually on Windows that the above error does not
|
|
||||||
# happen as the issue is not caught by CI.
|
|
||||||
yarn_version = "1.12.1",
|
yarn_version = "1.12.1",
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -74,6 +66,12 @@ yarn_install(
|
|||||||
yarn_lock = "//:yarn.lock",
|
yarn_lock = "//:yarn.lock",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
yarn_install(
|
||||||
|
name = "ts-api-guardian_deps",
|
||||||
|
package_json = "@angular//tools/ts-api-guardian:package.json",
|
||||||
|
yarn_lock = "@angular//tools/ts-api-guardian:yarn.lock",
|
||||||
|
)
|
||||||
|
|
||||||
# Install all bazel dependencies of the @npm npm packages
|
# Install all bazel dependencies of the @npm npm packages
|
||||||
load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
|
load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
|
||||||
|
|
||||||
|
@ -41,6 +41,16 @@ Here are the most important tasks you might need to use:
|
|||||||
- `yarn example-e2e --filter=foo` - limit e2e tests to those containing the word "foo"
|
- `yarn example-e2e --filter=foo` - limit e2e tests to those containing the word "foo"
|
||||||
- `yarn example-e2e --setup --local` - run e2e tests with the local version of Angular contained in the "dist" folder
|
- `yarn example-e2e --setup --local` - run e2e tests with the local version of Angular contained in the "dist" folder
|
||||||
|
|
||||||
|
## Developing on Windows
|
||||||
|
The `packages/` directory may contain Linux-specific symlinks, which are not recognized by Windows.
|
||||||
|
These unresolved links cause the docs generation process to fail because it cannot locate certain files.
|
||||||
|
|
||||||
|
> Hint: The following steps require administration rights or [Windows Developer Mode](https://docs.microsoft.com/en-us/windows/uwp/get-started/enable-your-device-for-development) enabled!
|
||||||
|
|
||||||
|
To fix this problem, run `scripts/windows/create-symlinks.sh`. This command creates temporary files where the symlinks used to be. Make sure not to commit those files with your documentation changes.
|
||||||
|
When you are done making and testing your documentation changes, you can restore the original symlinks and delete the temporary files by running `scripts/windows/remove-symlinks.sh`.
|
||||||
|
|
||||||
|
It's necessary to remove the temporary files, because otherwise they're displayed as local changes in your git working copy and certain operations are blocked.
|
||||||
|
|
||||||
## Using ServiceWorker locally
|
## Using ServiceWorker locally
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Image metadata and config
|
# Image metadata and config
|
||||||
FROM debian:stretch
|
FROM debian:jessie
|
||||||
|
|
||||||
LABEL name="angular.io PR preview" \
|
LABEL name="angular.io PR preview" \
|
||||||
description="This image implements the PR preview functionality for angular.io." \
|
description="This image implements the PR preview functionality for angular.io." \
|
||||||
@ -40,7 +40,7 @@ ARG AIO_TRUSTED_PR_LABEL="aio: preview"
|
|||||||
ARG TEST_AIO_TRUSTED_PR_LABEL="aio: preview"
|
ARG TEST_AIO_TRUSTED_PR_LABEL="aio: preview"
|
||||||
ARG AIO_PREVIEW_SERVER_HOSTNAME=preview.localhost
|
ARG AIO_PREVIEW_SERVER_HOSTNAME=preview.localhost
|
||||||
ARG TEST_AIO_PREVIEW_SERVER_HOSTNAME=preview.localhost
|
ARG TEST_AIO_PREVIEW_SERVER_HOSTNAME=preview.localhost
|
||||||
ARG AIO_ARTIFACT_MAX_SIZE=26214400
|
ARG AIO_ARTIFACT_MAX_SIZE=20971520
|
||||||
ARG TEST_AIO_ARTIFACT_MAX_SIZE=200
|
ARG TEST_AIO_ARTIFACT_MAX_SIZE=200
|
||||||
ARG AIO_PREVIEW_SERVER_PORT=3000
|
ARG AIO_PREVIEW_SERVER_PORT=3000
|
||||||
ARG TEST_AIO_PREVIEW_SERVER_PORT=3001
|
ARG TEST_AIO_PREVIEW_SERVER_PORT=3001
|
||||||
@ -76,20 +76,21 @@ RUN apt-get update -y && apt-get install -y curl
|
|||||||
RUN curl --silent --show-error --location https://deb.nodesource.com/setup_10.x | bash -
|
RUN curl --silent --show-error --location https://deb.nodesource.com/setup_10.x | bash -
|
||||||
RUN curl --silent --show-error https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
RUN curl --silent --show-error https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
||||||
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
||||||
RUN echo "deb http://ftp.debian.org/debian stretch-backports main" | tee /etc/apt/sources.list.d/backports.list
|
RUN echo "deb http://ftp.debian.org/debian jessie-backports main" | tee /etc/apt/sources.list.d/backports.list
|
||||||
|
|
||||||
|
|
||||||
# Install packages
|
# Install packages
|
||||||
RUN apt-get update -y && apt-get install -y \
|
RUN apt-get update -y && apt-get install -y \
|
||||||
cron=3.0pl1-128+deb9u1 \
|
chkconfig \
|
||||||
dnsmasq=2.76-5+deb9u2 \
|
cron \
|
||||||
nano=2.7.4-1 \
|
dnsmasq \
|
||||||
nginx=1.10.3-1+deb9u2 \
|
nano \
|
||||||
nodejs=10.15.3-1nodesource1 \
|
nodejs \
|
||||||
openssl=1.1.0j-1~deb9u1 \
|
openssl \
|
||||||
rsyslog=8.24.0-1 \
|
rsyslog \
|
||||||
yarn=1.15.2-1
|
yarn
|
||||||
RUN yarn global add pm2@3.5.0
|
RUN apt-get install -t jessie-backports -y nginx
|
||||||
|
RUN yarn global add pm2@2
|
||||||
|
|
||||||
|
|
||||||
# Set up log rotation
|
# Set up log rotation
|
||||||
@ -150,7 +151,8 @@ RUN sed -i "s|{{\$AIO_PREVIEW_SERVER_PORT}}|$TEST_AIO_PREVIEW_SERVER_PORT|g" /et
|
|||||||
|
|
||||||
|
|
||||||
# Set up pm2
|
# Set up pm2
|
||||||
RUN pm2 startup --user root > /dev/null
|
RUN pm2 startup systemv -u root > /dev/null
|
||||||
|
RUN chkconfig pm2-root on
|
||||||
|
|
||||||
|
|
||||||
# Set up the shell scripts
|
# Set up the shell scripts
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Imports
|
// Imports
|
||||||
import * as cp from 'child_process';
|
import * as cp from 'child_process';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
|
import * as http from 'http';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as shell from 'shelljs';
|
import * as shell from 'shelljs';
|
||||||
import {AIO_DOWNLOADS_DIR, HIDDEN_DIR_PREFIX} from '../common/constants';
|
import {AIO_DOWNLOADS_DIR, HIDDEN_DIR_PREFIX} from '../common/constants';
|
||||||
@ -104,7 +105,18 @@ class Helper {
|
|||||||
Object.keys(this.portPerScheme).forEach(scheme => suiteFactory(scheme, this.portPerScheme[scheme]));
|
Object.keys(this.portPerScheme).forEach(scheme => suiteFactory(scheme, this.portPerScheme[scheme]));
|
||||||
}
|
}
|
||||||
|
|
||||||
public verifyResponse(status: number, regex: string | RegExp = /^/): VerifyCmdResultFn {
|
public verifyResponse(status: number | [number, string], regex: string | RegExp = /^/): VerifyCmdResultFn {
|
||||||
|
let statusCode: number;
|
||||||
|
let statusText: string;
|
||||||
|
|
||||||
|
if (Array.isArray(status)) {
|
||||||
|
statusCode = status[0];
|
||||||
|
statusText = status[1];
|
||||||
|
} else {
|
||||||
|
statusCode = status;
|
||||||
|
statusText = http.STATUS_CODES[statusCode] || 'UNKNOWN_STATUS_CODE';
|
||||||
|
}
|
||||||
|
|
||||||
return (result: CmdResult) => {
|
return (result: CmdResult) => {
|
||||||
const [headers, body] = result.stdout.
|
const [headers, body] = result.stdout.
|
||||||
split(/(?:\r?\n){2,}/).
|
split(/(?:\r?\n){2,}/).
|
||||||
@ -119,7 +131,7 @@ class Helper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
expect(result.success).toBe(true);
|
expect(result.success).toBe(true);
|
||||||
expect(headers).toMatch(new RegExp(`HTTP/(?:1\\.1|2) ${status} `));
|
expect(headers).toContain(`${statusCode} ${statusText}`);
|
||||||
expect(body).toMatch(regex);
|
expect(body).toMatch(regex);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -259,10 +259,10 @@ describe(`nginx`, () => {
|
|||||||
|
|
||||||
it('should disallow non-GET requests', async () => {
|
it('should disallow non-GET requests', async () => {
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
h.runCmd(`curl -iLX POST ${baseUrl}/42`).then(h.verifyResponse(405)),
|
h.runCmd(`curl -iLX POST ${baseUrl}/42`).then(h.verifyResponse([405, 'Not Allowed'])),
|
||||||
h.runCmd(`curl -iLX PUT ${baseUrl}/42`).then(h.verifyResponse(405)),
|
h.runCmd(`curl -iLX PUT ${baseUrl}/42`).then(h.verifyResponse([405, 'Not Allowed'])),
|
||||||
h.runCmd(`curl -iLX PATCH ${baseUrl}/42`).then(h.verifyResponse(405)),
|
h.runCmd(`curl -iLX PATCH ${baseUrl}/42`).then(h.verifyResponse([405, 'Not Allowed'])),
|
||||||
h.runCmd(`curl -iLX DELETE ${baseUrl}/42`).then(h.verifyResponse(405)),
|
h.runCmd(`curl -iLX DELETE ${baseUrl}/42`).then(h.verifyResponse([405, 'Not Allowed'])),
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -295,10 +295,10 @@ describe(`nginx`, () => {
|
|||||||
const url = `${scheme}://${host}/circle-build`;
|
const url = `${scheme}://${host}/circle-build`;
|
||||||
|
|
||||||
Promise.all([
|
Promise.all([
|
||||||
h.runCmd(`curl -iLX GET ${url}`).then(h.verifyResponse(405)),
|
h.runCmd(`curl -iLX GET ${url}`).then(h.verifyResponse([405, 'Not Allowed'])),
|
||||||
h.runCmd(`curl -iLX PUT ${url}`).then(h.verifyResponse(405)),
|
h.runCmd(`curl -iLX PUT ${url}`).then(h.verifyResponse([405, 'Not Allowed'])),
|
||||||
h.runCmd(`curl -iLX PATCH ${url}`).then(h.verifyResponse(405)),
|
h.runCmd(`curl -iLX PATCH ${url}`).then(h.verifyResponse([405, 'Not Allowed'])),
|
||||||
h.runCmd(`curl -iLX DELETE ${url}`).then(h.verifyResponse(405)),
|
h.runCmd(`curl -iLX DELETE ${url}`).then(h.verifyResponse([405, 'Not Allowed'])),
|
||||||
]).then(done);
|
]).then(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -334,10 +334,10 @@ describe(`nginx`, () => {
|
|||||||
|
|
||||||
it('should disallow non-POST requests', done => {
|
it('should disallow non-POST requests', done => {
|
||||||
Promise.all([
|
Promise.all([
|
||||||
h.runCmd(`curl -iLX GET ${url}`).then(h.verifyResponse(405)),
|
h.runCmd(`curl -iLX GET ${url}`).then(h.verifyResponse([405, 'Not Allowed'])),
|
||||||
h.runCmd(`curl -iLX PUT ${url}`).then(h.verifyResponse(405)),
|
h.runCmd(`curl -iLX PUT ${url}`).then(h.verifyResponse([405, 'Not Allowed'])),
|
||||||
h.runCmd(`curl -iLX PATCH ${url}`).then(h.verifyResponse(405)),
|
h.runCmd(`curl -iLX PATCH ${url}`).then(h.verifyResponse([405, 'Not Allowed'])),
|
||||||
h.runCmd(`curl -iLX DELETE ${url}`).then(h.verifyResponse(405)),
|
h.runCmd(`curl -iLX DELETE ${url}`).then(h.verifyResponse([405, 'Not Allowed'])),
|
||||||
]).then(done);
|
]).then(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
"$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"cli": {
|
"cli": {
|
||||||
"packageManager": "yarn",
|
"packageManager": "yarn",
|
||||||
@ -13,13 +13,6 @@
|
|||||||
"root": "",
|
"root": "",
|
||||||
"sourceRoot": "src",
|
"sourceRoot": "src",
|
||||||
"projectType": "application",
|
"projectType": "application",
|
||||||
"prefix": "aio",
|
|
||||||
"schematics": {
|
|
||||||
"@schematics/angular:component": {
|
|
||||||
"inlineStyle": true,
|
|
||||||
"style": "scss"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"architect": {
|
"architect": {
|
||||||
"build": {
|
"build": {
|
||||||
"builder": "@angular-devkit/build-angular:browser",
|
"builder": "@angular-devkit/build-angular:browser",
|
||||||
@ -27,9 +20,7 @@
|
|||||||
"outputPath": "dist",
|
"outputPath": "dist",
|
||||||
"index": "src/index.html",
|
"index": "src/index.html",
|
||||||
"main": "src/main.ts",
|
"main": "src/main.ts",
|
||||||
"polyfills": "src/polyfills.ts",
|
"tsConfig": "src/tsconfig.app.json",
|
||||||
"tsConfig": "tsconfig.app.json",
|
|
||||||
"webWorkerTsConfig": "tsconfig.worker.json",
|
|
||||||
"aot": true,
|
"aot": true,
|
||||||
"optimization": true,
|
"optimization": true,
|
||||||
"buildOptimizer": true,
|
"buildOptimizer": true,
|
||||||
@ -40,9 +31,11 @@
|
|||||||
"extractLicenses": true,
|
"extractLicenses": true,
|
||||||
"namedChunks": true,
|
"namedChunks": true,
|
||||||
"vendorChunk": false,
|
"vendorChunk": false,
|
||||||
|
"polyfills": "src/polyfills.ts",
|
||||||
"assets": [
|
"assets": [
|
||||||
"src/assets",
|
"src/assets",
|
||||||
"src/generated",
|
"src/generated",
|
||||||
|
"src/app/search/search-worker.js",
|
||||||
"src/pwa-manifest.json",
|
"src/pwa-manifest.json",
|
||||||
"src/google385281288605d160.html",
|
"src/google385281288605d160.html",
|
||||||
{
|
{
|
||||||
@ -68,8 +61,8 @@
|
|||||||
"next": {
|
"next": {
|
||||||
"fileReplacements": [
|
"fileReplacements": [
|
||||||
{
|
{
|
||||||
"replace": "src/environments/environment.ts",
|
"src": "src/environments/environment.ts",
|
||||||
"with": "src/environments/environment.next.ts"
|
"replaceWith": "src/environments/environment.next.ts"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"serviceWorker": true
|
"serviceWorker": true
|
||||||
@ -77,8 +70,8 @@
|
|||||||
"stable": {
|
"stable": {
|
||||||
"fileReplacements": [
|
"fileReplacements": [
|
||||||
{
|
{
|
||||||
"replace": "src/environments/environment.ts",
|
"src": "src/environments/environment.ts",
|
||||||
"with": "src/environments/environment.stable.ts"
|
"replaceWith": "src/environments/environment.stable.ts"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"serviceWorker": true
|
"serviceWorker": true
|
||||||
@ -86,8 +79,8 @@
|
|||||||
"archive": {
|
"archive": {
|
||||||
"fileReplacements": [
|
"fileReplacements": [
|
||||||
{
|
{
|
||||||
"replace": "src/environments/environment.ts",
|
"src": "src/environments/environment.ts",
|
||||||
"with": "src/environments/environment.archive.ts"
|
"replaceWith": "src/environments/environment.archive.ts"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"serviceWorker": true
|
"serviceWorker": true
|
||||||
@ -127,13 +120,17 @@
|
|||||||
"builder": "@angular-devkit/build-angular:karma",
|
"builder": "@angular-devkit/build-angular:karma",
|
||||||
"options": {
|
"options": {
|
||||||
"main": "src/test.ts",
|
"main": "src/test.ts",
|
||||||
|
"karmaConfig": "src/karma.conf.js",
|
||||||
"polyfills": "src/polyfills.ts",
|
"polyfills": "src/polyfills.ts",
|
||||||
"tsConfig": "tsconfig.spec.json",
|
"tsConfig": "src/tsconfig.spec.json",
|
||||||
"webWorkerTsConfig": "tsconfig.worker.json",
|
"scripts": [],
|
||||||
"karmaConfig": "karma.conf.js",
|
"styles": [
|
||||||
|
"src/styles.scss"
|
||||||
|
],
|
||||||
"assets": [
|
"assets": [
|
||||||
"src/assets",
|
"src/assets",
|
||||||
"src/generated",
|
"src/generated",
|
||||||
|
"src/app/search/search-worker.js",
|
||||||
"src/pwa-manifest.json",
|
"src/pwa-manifest.json",
|
||||||
"src/google385281288605d160.html",
|
"src/google385281288605d160.html",
|
||||||
{
|
{
|
||||||
@ -146,27 +143,27 @@
|
|||||||
"input": "node_modules/@webcomponents/custom-elements/src",
|
"input": "node_modules/@webcomponents/custom-elements/src",
|
||||||
"output": "/assets/js"
|
"output": "/assets/js"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"styles": [
|
|
||||||
"src/styles.scss"
|
|
||||||
],
|
|
||||||
"scripts": []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"builder": "@angular-devkit/build-angular:tslint",
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
"options": {
|
"options": {
|
||||||
"tsConfig": [
|
"tsConfig": [
|
||||||
"tsconfig.app.json",
|
"src/tsconfig.app.json",
|
||||||
"tsconfig.spec.json",
|
"src/tsconfig.spec.json"
|
||||||
"tsconfig.worker.json",
|
|
||||||
"tests/e2e/tsconfig.json"
|
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": []
|
||||||
"**/node_modules/**"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"site-e2e": {
|
||||||
|
"root": "",
|
||||||
|
"projectType": "application",
|
||||||
|
"cli": {},
|
||||||
|
"schematics": {},
|
||||||
|
"architect": {
|
||||||
"e2e": {
|
"e2e": {
|
||||||
"builder": "@angular-devkit/build-angular:protractor",
|
"builder": "@angular-devkit/build-angular:protractor",
|
||||||
"options": {
|
"options": {
|
||||||
@ -178,9 +175,27 @@
|
|||||||
"devServerTarget": "site:serve:ci"
|
"devServerTarget": "site:serve:ci"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"tests/e2e/tsconfig.e2e.json"
|
||||||
|
],
|
||||||
|
"exclude": []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultProject": "site"
|
"schematics": {
|
||||||
|
"@schematics/angular:component": {
|
||||||
|
"inlineStyle": true,
|
||||||
|
"prefix": "aio",
|
||||||
|
"styleext": "scss"
|
||||||
|
},
|
||||||
|
"@schematics/angular:directive": {
|
||||||
|
"prefix": "aio"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
|
||||||
# For additional information regarding the format and rule options, please see:
|
|
||||||
# https://github.com/browserslist/browserslist#queries
|
|
||||||
|
|
||||||
# Googlebot uses an older version of Chrome
|
|
||||||
# For additional information see: https://developers.google.com/search/docs/guides/rendering
|
|
||||||
|
|
||||||
> 0.5%
|
|
||||||
last 2 versions
|
|
||||||
Firefox ESR
|
|
||||||
not dead
|
|
||||||
IE 9-11 # For IE 9-11 support.
|
|
||||||
Chrome 41 # For Googlebot support.
|
|
@ -101,9 +101,3 @@ Options that specify files can be given as absolute paths, or as paths relative
|
|||||||
The [ng generate](cli/generate) and [ng add](cli/add) commands take as an argument the artifact or library to be generated or added to the current project.
|
The [ng generate](cli/generate) and [ng add](cli/add) commands take as an argument the artifact or library to be generated or added to the current project.
|
||||||
In addition to any general options, each artifact or library defines its own options in a *schematic*.
|
In addition to any general options, each artifact or library defines its own options in a *schematic*.
|
||||||
Schematic options are supplied to the command in the same format as immediate command options.
|
Schematic options are supplied to the command in the same format as immediate command options.
|
||||||
|
|
||||||
|
|
||||||
### Building with Bazel
|
|
||||||
|
|
||||||
Optionally, you can configure the Angular CLI to use [Bazel](https://docs.bazel.build) as the build tool. For more information, see [Building with Bazel](guide/bazel).
|
|
||||||
|
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
# Gathering and Viewing Usage Analytics
|
|
||||||
|
|
||||||
Users can opt in to share their Angular CLI usage data with [Google Analytics](https://support.google.com/analytics/answer/1008015?hl=en), using the [`ng analytics` CLI command](analytics).
|
|
||||||
The data is also shared with the Angular team, and used to improve the CLI.
|
|
||||||
|
|
||||||
The gathering of CLI analytics data is disabled by default, and must be enabled at the project level by individual users.
|
|
||||||
It cannot be enabled at the project level for all users.
|
|
||||||
|
|
||||||
Data gathered in this way can be viewed on the Google Analytics site, but is not automatically visible on your own organization's Analytics site.
|
|
||||||
As an administrator for an Angular development group, you can configure your instance of Angular CLI to be able to see analytics data for your own team's usage of the Angular CLI.
|
|
||||||
This configuration option is separate from and in addition to other usage analytics that your users may be sharing with Google.
|
|
||||||
|
|
||||||
## Enable access to CLI usage data
|
|
||||||
|
|
||||||
To configure access to your own users' CLI usage data, use the `ng config` command to add a key to your global [`angular.json` workspace configuration file](guide/workspace-config).
|
|
||||||
The key goes under `cli.analyticsSharing` at the top level of the file, outside the `projects` sections.
|
|
||||||
The value of the key is your organization's tracking ID, as assigned by Google Analytics.
|
|
||||||
This ID is a string that looks like `UA-123456-12`.
|
|
||||||
|
|
||||||
You can choose to use a descriptive string as the key value, or be assigned a random key when you run the CLI command.
|
|
||||||
For example, the following command adds a configuration key named "tracking".
|
|
||||||
|
|
||||||
<code-example language="sh" class="code-shell">
|
|
||||||
ng config --global cli.analyticsSharing.tracking UA-123456-12
|
|
||||||
</code-example>
|
|
||||||
|
|
||||||
To turn off this feature, run the following command:
|
|
||||||
|
|
||||||
<code-example language="sh" class="code-shell">
|
|
||||||
ng config --global --remove cli.analyticsSharing
|
|
||||||
</code-example>
|
|
||||||
|
|
||||||
|
|
||||||
## Per user tracking
|
|
||||||
|
|
||||||
You can add a custom user ID to the global configuration, in order to identify unique usage of commands and flags.
|
|
||||||
If that user enables CLI analytics for their own project, your analytics display tracks and labels their individual usage.
|
|
||||||
|
|
||||||
|
|
||||||
<code-example language="sh" class="code-shell">
|
|
||||||
ng config --global cli.analyticsSharing.user SOME_USER_NAME
|
|
||||||
</code-example>
|
|
||||||
|
|
||||||
To generate a new random user ID, run the following command:
|
|
||||||
|
|
||||||
<code-example language="sh" class="code-shell">
|
|
||||||
ng config --global cli.analyticsSharing.user ""
|
|
||||||
</code-example>
|
|
3
aio/content/examples/.gitignore
vendored
3
aio/content/examples/.gitignore
vendored
@ -92,6 +92,3 @@ upgrade-phonecat-3-final/tsconfig-aot.json
|
|||||||
upgrade-phonecat-3-final/rollup-config.js
|
upgrade-phonecat-3-final/rollup-config.js
|
||||||
!upgrade-phonecat-*/**/karma.conf.js
|
!upgrade-phonecat-*/**/karma.conf.js
|
||||||
!upgrade-phonecat-*/**/karma-test-shim.js
|
!upgrade-phonecat-*/**/karma-test-shim.js
|
||||||
|
|
||||||
# schematics
|
|
||||||
!schematics-for-libraries/projects/my-lib/package.json
|
|
@ -2,31 +2,30 @@
|
|||||||
|
|
||||||
import { browser, element, by } from 'protractor';
|
import { browser, element, by } from 'protractor';
|
||||||
|
|
||||||
describe('Attribute directives', () => {
|
describe('Attribute directives', function () {
|
||||||
|
|
||||||
let _title = 'My First Attribute Directive';
|
let _title = 'My First Attribute Directive';
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(function () {
|
||||||
browser.get('');
|
browser.get('');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should display correct title: ${_title}`, () => {
|
it(`should display correct title: ${_title}`, function () {
|
||||||
expect(element(by.css('h1')).getText()).toEqual(_title);
|
expect(element(by.css('h1')).getText()).toEqual(_title);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be able to select green highlight', () => {
|
it('should be able to select green highlight', function () {
|
||||||
const highlightedEle = element(by.cssContainingText('p', 'Highlight me!'));
|
let highlightedEle = element(by.cssContainingText('p', 'Highlight me!'));
|
||||||
const lightGreen = 'rgba(144, 238, 144, 1)';
|
let lightGreen = 'rgba(144, 238, 144, 1)';
|
||||||
const getBgColor = () => highlightedEle.getCssValue('background-color');
|
|
||||||
|
|
||||||
expect(highlightedEle.getCssValue('background-color')).not.toEqual(lightGreen);
|
expect(highlightedEle.getCssValue('background-color')).not.toEqual(lightGreen);
|
||||||
|
// let greenRb = element(by.cssContainingText('input', 'Green'));
|
||||||
|
let greenRb = element.all(by.css('input')).get(0);
|
||||||
|
greenRb.click().then(function() {
|
||||||
|
// TypeScript Todo: find the right type for highlightedEle
|
||||||
|
browser.actions().mouseMove(highlightedEle as any).perform();
|
||||||
|
expect(highlightedEle.getCssValue('background-color')).toEqual(lightGreen);
|
||||||
|
});
|
||||||
|
|
||||||
const greenRb = element.all(by.css('input')).get(0);
|
|
||||||
greenRb.click();
|
|
||||||
browser.actions().mouseMove(highlightedEle).perform();
|
|
||||||
|
|
||||||
// Wait for up to 2s for the background color to be updated,
|
|
||||||
// to account for slow environments (e.g. CI).
|
|
||||||
browser.wait(() => highlightedEle.getCssValue('background-color').then(c => c === lightGreen), 2000);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -73,12 +73,8 @@ describe('Dependency Injection Cookbook', function () {
|
|||||||
let yellow = 'rgba(255, 255, 0, 1)';
|
let yellow = 'rgba(255, 255, 0, 1)';
|
||||||
|
|
||||||
expect(target.getCssValue('background-color')).not.toEqual(yellow);
|
expect(target.getCssValue('background-color')).not.toEqual(yellow);
|
||||||
|
browser.actions().mouseMove(target.getWebElement()).perform();
|
||||||
browser.actions().mouseMove(target).perform();
|
expect(target.getCssValue('background-color')).toEqual(yellow);
|
||||||
|
|
||||||
// Wait for up to 2s for the background color to be updated,
|
|
||||||
// to account for slow environments (e.g. CI).
|
|
||||||
browser.wait(() => target.getCssValue('background-color').then(c => c === yellow), 2000);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('in Parent Finder', function () {
|
describe('in Parent Finder', function () {
|
||||||
|
@ -17,7 +17,7 @@ export class AppComponent {
|
|||||||
if (event) { event.stopPropagation(); }
|
if (event) { event.stopPropagation(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteItem(item: Item) {
|
deleteItem(item?: Item) {
|
||||||
alert(`Delete the ${item}.`);
|
alert(`Delete the ${item}.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
'use strict'; // necessary for es6 output in node
|
|
||||||
|
|
||||||
import { browser, element, by } from 'protractor';
|
|
||||||
|
|
||||||
describe('Getting Started V0', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
return browser.get('/');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should display "My Store" in the top bar', async() => {
|
|
||||||
const title = await element(by.css('app-root app-top-bar h1')).getText();
|
|
||||||
|
|
||||||
expect(title).toEqual('My Store');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should display "Products" on the homepage', async() => {
|
|
||||||
const title = await element(by.css('app-root app-product-list h2')).getText();
|
|
||||||
|
|
||||||
expect(title).toEqual('Products');
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"useCommonBoilerplate": false,
|
|
||||||
"projectType": "getting-started"
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
p {
|
|
||||||
font-family: Lato;
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
<app-top-bar></app-top-bar>
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<router-outlet></router-outlet>
|
|
||||||
</div>
|
|
@ -1,8 +0,0 @@
|
|||||||
import { Component } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-root',
|
|
||||||
templateUrl: './app.component.html',
|
|
||||||
styleUrls: [ './app.component.css' ]
|
|
||||||
})
|
|
||||||
export class AppComponent {}
|
|
@ -1,25 +0,0 @@
|
|||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
|
||||||
import { RouterModule } from '@angular/router';
|
|
||||||
import { ReactiveFormsModule } from '@angular/forms';
|
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
|
||||||
import { TopBarComponent } from './top-bar/top-bar.component';
|
|
||||||
import { ProductListComponent } from './product-list/product-list.component';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
BrowserModule,
|
|
||||||
ReactiveFormsModule,
|
|
||||||
RouterModule.forRoot([
|
|
||||||
{ path: '', component: ProductListComponent },
|
|
||||||
])
|
|
||||||
],
|
|
||||||
declarations: [
|
|
||||||
AppComponent,
|
|
||||||
TopBarComponent,
|
|
||||||
ProductListComponent
|
|
||||||
],
|
|
||||||
bootstrap: [ AppComponent ]
|
|
||||||
})
|
|
||||||
export class AppModule { }
|
|
@ -1 +0,0 @@
|
|||||||
<h2>Products</h2>
|
|
@ -1,16 +0,0 @@
|
|||||||
import { Component } from '@angular/core';
|
|
||||||
|
|
||||||
import { products } from '../products';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-product-list',
|
|
||||||
templateUrl: './product-list.component.html',
|
|
||||||
styleUrls: ['./product-list.component.css']
|
|
||||||
})
|
|
||||||
export class ProductListComponent {
|
|
||||||
products = products;
|
|
||||||
|
|
||||||
share() {
|
|
||||||
window.alert('The product has been shared!');
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
export const products = [
|
|
||||||
{
|
|
||||||
name: 'Phone XL',
|
|
||||||
price: 799,
|
|
||||||
description: 'A large phone with one of the best screens'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Phone Mini',
|
|
||||||
price: 699,
|
|
||||||
description: 'A great phone with one of the best cameras'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Phone Standard',
|
|
||||||
price: 299,
|
|
||||||
description: ''
|
|
||||||
}
|
|
||||||
];
|
|
@ -1,5 +0,0 @@
|
|||||||
<a [routerLink]="['/']">
|
|
||||||
<h1>My Store</h1>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a [routerLink]="['/cart']" class="button fancy-button"><i class="material-icons">shopping_cart</i>Checkout</a>
|
|
@ -1,15 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-top-bar',
|
|
||||||
templateUrl: './top-bar.component.html',
|
|
||||||
styleUrls: ['./top-bar.component.css']
|
|
||||||
})
|
|
||||||
export class TopBarComponent implements OnInit {
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"type": "Overnight",
|
|
||||||
"price": 25.99
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "2-Day",
|
|
||||||
"price": 9.99
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Postal",
|
|
||||||
"price": 2.99
|
|
||||||
}
|
|
||||||
]
|
|
@ -1,18 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<title>Angular Getting Started</title>
|
|
||||||
<base href="/" />
|
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
|
||||||
<link
|
|
||||||
href="https://fonts.googleapis.com/icon?family=Material+Icons"
|
|
||||||
rel="stylesheet"
|
|
||||||
/>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<app-root></app-root>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"description": "Getting Started",
|
|
||||||
"files":[
|
|
||||||
"!**/*.d.ts",
|
|
||||||
"!**/*.js",
|
|
||||||
"!**/*.[0-9].*"
|
|
||||||
],
|
|
||||||
"tags": ["Angular", "getting started", "tutorial"]
|
|
||||||
}
|
|
@ -1,118 +0,0 @@
|
|||||||
'use strict'; // necessary for es6 output in node
|
|
||||||
|
|
||||||
import { browser, element, by, ExpectedConditions as EC, logging, ElementFinder, ElementArrayFinder } from 'protractor';
|
|
||||||
|
|
||||||
describe('Getting Started', () => {
|
|
||||||
const pageElements = {
|
|
||||||
topBarHeader: element(by.css('app-root app-top-bar h1')),
|
|
||||||
topBarLinks: element(by.css('app-root app-top-bar a')),
|
|
||||||
topBarCheckoutLink: element(by.cssContainingText('app-root app-top-bar a', 'Checkout')),
|
|
||||||
productListHeader: element(by.css('app-root app-product-list h2')),
|
|
||||||
productListItems: element.all(by.css('app-root app-product-list h3')),
|
|
||||||
productListLinks: element.all(by.css('app-root app-product-list a')),
|
|
||||||
productDetailsPage: element(by.css('app-root app-product-details div')),
|
|
||||||
cartPage: element(by.css('app-root app-cart'))
|
|
||||||
};
|
|
||||||
|
|
||||||
describe('General', () => {
|
|
||||||
beforeAll(async() => {
|
|
||||||
await browser.get('/');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should display "My Store"', async() => {
|
|
||||||
const title = await pageElements.topBarHeader.getText();
|
|
||||||
|
|
||||||
expect(title).toEqual('My Store');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should display "Products" on the homepage', async() => {
|
|
||||||
const title = await pageElements.productListHeader.getText();
|
|
||||||
|
|
||||||
expect(title).toEqual('Products');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('Product List', () => {
|
|
||||||
beforeAll(async() => {
|
|
||||||
await browser.get('/');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should display 3 items', async() => {
|
|
||||||
const products = await pageElements.productListItems;
|
|
||||||
|
|
||||||
expect(products.length).toEqual(3);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('Product Details', () => {
|
|
||||||
beforeEach(async() => {
|
|
||||||
await browser.get('/');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should display information for a product', async() => {
|
|
||||||
await pageElements.productListLinks.get(0).click();
|
|
||||||
|
|
||||||
const product = pageElements.productDetailsPage;
|
|
||||||
const productHeader = await product.element(by.css('h3')).getText();
|
|
||||||
const productPrice = await product.element(by.css('h4')).getText();
|
|
||||||
const productDescription = await product.element(by.css('p')).getText();
|
|
||||||
|
|
||||||
expect(await product.isDisplayed()).toBeTruthy();
|
|
||||||
expect(productHeader).toBe('Phone XL');
|
|
||||||
expect(productPrice).toBe('$799.00');
|
|
||||||
expect(productDescription).toBe('A large phone with one of the best screens');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should add the product to the cart', async() => {
|
|
||||||
await pageElements.productListLinks.get(0).click();
|
|
||||||
|
|
||||||
const product = pageElements.productDetailsPage;
|
|
||||||
const buyButton = await product.element(by.css('button'));
|
|
||||||
const checkoutLink = pageElements.topBarCheckoutLink;
|
|
||||||
|
|
||||||
await buyButton.click();
|
|
||||||
await browser.wait(EC.alertIsPresent(), 1000);
|
|
||||||
await browser.switchTo().alert().accept();
|
|
||||||
await checkoutLink.click();
|
|
||||||
|
|
||||||
const cartItems = await element.all(by.css('app-root app-cart div.cart-item'));
|
|
||||||
expect(cartItems.length).toBe(1);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('Cart', () => {
|
|
||||||
|
|
||||||
beforeEach(async() => {
|
|
||||||
await browser.get('/');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should go through the checkout process', async() => {
|
|
||||||
await pageElements.productListLinks.get(0).click();
|
|
||||||
|
|
||||||
const checkoutLink = pageElements.topBarCheckoutLink;
|
|
||||||
const productDetailsPage = pageElements.productDetailsPage;
|
|
||||||
const buyButton = await productDetailsPage.element(by.css('button'));
|
|
||||||
|
|
||||||
const cartPage = pageElements.cartPage;
|
|
||||||
const inputFields = cartPage.all(by.css('form input'));
|
|
||||||
|
|
||||||
const purchaseButton = await cartPage.element(by.css('button'));
|
|
||||||
const nameField = inputFields.get(0);
|
|
||||||
const addressField = inputFields.get(1);
|
|
||||||
|
|
||||||
await buyButton.click();
|
|
||||||
await browser.wait(EC.alertIsPresent(), 1000);
|
|
||||||
await browser.switchTo().alert().accept();
|
|
||||||
await checkoutLink.click();
|
|
||||||
|
|
||||||
await nameField.sendKeys('Customer');
|
|
||||||
await addressField.sendKeys('Address');
|
|
||||||
await purchaseButton.click();
|
|
||||||
|
|
||||||
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
|
|
||||||
const cartMessages = logs.filter(({ message }) => message.includes('Your order has been submitted'));
|
|
||||||
|
|
||||||
expect(cartMessages.length).toBe(1);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"useCommonBoilerplate": false,
|
|
||||||
"projectType": "getting-started"
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
<app-top-bar></app-top-bar>
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<router-outlet></router-outlet>
|
|
||||||
</div>
|
|
@ -1,55 +0,0 @@
|
|||||||
// #docplaster
|
|
||||||
// #docregion http-client-module-import, http-client-module
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
|
||||||
import { RouterModule } from '@angular/router';
|
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
|
||||||
// #enddocregion http-client-module-import
|
|
||||||
import { ReactiveFormsModule } from '@angular/forms';
|
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
|
||||||
import { TopBarComponent } from './top-bar/top-bar.component';
|
|
||||||
import { ProductListComponent } from './product-list/product-list.component';
|
|
||||||
import { ProductAlertsComponent } from './product-alerts/product-alerts.component';
|
|
||||||
import { ProductDetailsComponent } from './product-details/product-details.component';
|
|
||||||
// #enddocregion http-client-module
|
|
||||||
import { CartComponent } from './cart/cart.component';
|
|
||||||
import { ShippingComponent } from './shipping/shipping.component';
|
|
||||||
|
|
||||||
// #docregion product-details-route, http-client-module, shipping-route, cart-route
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
BrowserModule,
|
|
||||||
// #enddocregion product-details-route, cart-route
|
|
||||||
HttpClientModule,
|
|
||||||
// #docregion product-details-route, cart-route
|
|
||||||
ReactiveFormsModule,
|
|
||||||
RouterModule.forRoot([
|
|
||||||
{ path: '', component: ProductListComponent },
|
|
||||||
{ path: 'products/:productId', component: ProductDetailsComponent },
|
|
||||||
// #enddocregion product-details-route
|
|
||||||
{ path: 'cart', component: CartComponent },
|
|
||||||
// #enddocregion cart-route, http-client-module
|
|
||||||
{ path: 'shipping', component: ShippingComponent },
|
|
||||||
// #enddocregion shipping-route
|
|
||||||
// #docregion product-details-route, http-client-module, shipping-route, cart-route
|
|
||||||
])
|
|
||||||
],
|
|
||||||
// #enddocregion product-details-route, cart-route
|
|
||||||
declarations: [
|
|
||||||
AppComponent,
|
|
||||||
TopBarComponent,
|
|
||||||
ProductListComponent,
|
|
||||||
ProductAlertsComponent,
|
|
||||||
ProductDetailsComponent,
|
|
||||||
CartComponent,
|
|
||||||
// #enddocregion http-client-module
|
|
||||||
ShippingComponent
|
|
||||||
// #docregion http-client-module
|
|
||||||
],
|
|
||||||
bootstrap: [
|
|
||||||
AppComponent
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class AppModule { }
|
|
@ -1,13 +0,0 @@
|
|||||||
// #docplaster
|
|
||||||
// #docregion
|
|
||||||
import { Injectable } from '@angular/core';
|
|
||||||
|
|
||||||
// #docregion v1
|
|
||||||
@Injectable({
|
|
||||||
providedIn: 'root'
|
|
||||||
})
|
|
||||||
export class CartService {
|
|
||||||
|
|
||||||
constructor() {}
|
|
||||||
|
|
||||||
}
|
|
@ -1,39 +0,0 @@
|
|||||||
// #docplaster
|
|
||||||
// #docregion import-http
|
|
||||||
import { Injectable } from '@angular/core';
|
|
||||||
|
|
||||||
import { HttpClient } from '@angular/common/http';
|
|
||||||
// #enddocregion import-http
|
|
||||||
@Injectable({
|
|
||||||
providedIn: 'root'
|
|
||||||
})
|
|
||||||
// #docregion props, methods, inject-http, get-shipping
|
|
||||||
export class CartService {
|
|
||||||
items = [];
|
|
||||||
// #enddocregion props, methods
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
private http: HttpClient
|
|
||||||
) {}
|
|
||||||
// #enddocregion inject-http
|
|
||||||
// #docregion methods
|
|
||||||
|
|
||||||
addToCart(product) {
|
|
||||||
this.items.push(product);
|
|
||||||
}
|
|
||||||
|
|
||||||
getItems() {
|
|
||||||
return this.items;
|
|
||||||
}
|
|
||||||
|
|
||||||
clearCart() {
|
|
||||||
this.items = [];
|
|
||||||
return this.items;
|
|
||||||
}
|
|
||||||
// #enddocregion methods
|
|
||||||
|
|
||||||
getShippingPrices() {
|
|
||||||
return this.http.get('/assets/shipping.json');
|
|
||||||
}
|
|
||||||
// #docregion props, methods, inject-http
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-cart',
|
|
||||||
templateUrl: './cart.component.html',
|
|
||||||
styleUrls: ['./cart.component.css']
|
|
||||||
})
|
|
||||||
export class CartComponent implements OnInit {
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
<!-- #docplaster -->
|
|
||||||
<!-- #docregion prices -->
|
|
||||||
<h3>Cart</h3>
|
|
||||||
<!-- #enddocregion prices -->
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<a routerLink="/shipping">Shipping Prices</a>
|
|
||||||
</p>
|
|
||||||
<!-- #docregion prices -->
|
|
||||||
|
|
||||||
<div class="cart-item" *ngFor="let item of items">
|
|
||||||
<span>{{ item.name }} </span>
|
|
||||||
<span>{{ item.price | currency }}</span>
|
|
||||||
</div>
|
|
||||||
<!-- #enddocregion prices -->
|
|
@ -1,21 +0,0 @@
|
|||||||
// #docplaster
|
|
||||||
// #docregion imports
|
|
||||||
import { Component } from '@angular/core';
|
|
||||||
import { CartService } from '../cart.service';
|
|
||||||
// #enddocregion imports
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-cart',
|
|
||||||
templateUrl: './cart.component.html',
|
|
||||||
styleUrls: ['./cart.component.css']
|
|
||||||
})
|
|
||||||
// #docregion inject-cart, items, submit
|
|
||||||
export class CartComponent {
|
|
||||||
// #enddocregion inject-cart
|
|
||||||
items;
|
|
||||||
// #docregion inject-cart
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
private cartService: CartService
|
|
||||||
) { }
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
<!-- #docplaster -->
|
|
||||||
<h3>Cart</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<a routerLink="/shipping">Shipping Prices</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="cart-item" *ngFor="let item of items">
|
|
||||||
<span>{{ item.name }} </span>
|
|
||||||
<span>{{ item.price | currency }}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- #docregion checkout-form-->
|
|
||||||
<form [formGroup]="checkoutForm">
|
|
||||||
|
|
||||||
<button class="button" type="submit">Purchase</button>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
<!-- #enddocregion checkout-form -->
|
|
@ -1,21 +0,0 @@
|
|||||||
// #docplaster
|
|
||||||
// #docregion imports
|
|
||||||
import { Component } from '@angular/core';
|
|
||||||
import { CartService } from '../cart.service';
|
|
||||||
// #enddocregion imports
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-cart',
|
|
||||||
templateUrl: './cart.component.html',
|
|
||||||
styleUrls: ['./cart.component.css']
|
|
||||||
})
|
|
||||||
// #docregion props-services, submit
|
|
||||||
export class CartComponent {
|
|
||||||
items;
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
private cartService: CartService
|
|
||||||
) {
|
|
||||||
this.items = this.cartService.getItems();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
<!-- #docplaster -->
|
|
||||||
<!-- #docregion checkout-form-2 -->
|
|
||||||
<h3>Cart</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<a routerLink="/shipping">Shipping Prices</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="cart-item" *ngFor="let item of items">
|
|
||||||
<span>{{ item.name }} </span>
|
|
||||||
<span>{{ item.price | currency }}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- #docregion checkout-form-1 -->
|
|
||||||
<form [formGroup]="checkoutForm" (ngSubmit)="onSubmit(checkoutForm.value)">
|
|
||||||
<!-- #enddocregion checkout-form-1 -->
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<label>Name</label>
|
|
||||||
<input type="text" formControlName="name">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<label>Address</label>
|
|
||||||
<input type="text" formControlName="address">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button class="button" type="submit">Purchase</button>
|
|
||||||
|
|
||||||
<!-- #docregion checkout-form-1 -->
|
|
||||||
</form>
|
|
@ -1,46 +0,0 @@
|
|||||||
// #docplaster
|
|
||||||
// #docregion imports
|
|
||||||
import { Component } from '@angular/core';
|
|
||||||
import { FormBuilder } from '@angular/forms';
|
|
||||||
|
|
||||||
import { CartService } from '../cart.service';
|
|
||||||
// #enddocregion imports
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-cart',
|
|
||||||
templateUrl: './cart.component.html',
|
|
||||||
styleUrls: ['./cart.component.css']
|
|
||||||
})
|
|
||||||
// #docregion props-services, submit, inject-form-builder, checkout-form, checkout-form-group
|
|
||||||
export class CartComponent {
|
|
||||||
items;
|
|
||||||
// #enddocregion inject-form-builder
|
|
||||||
checkoutForm;
|
|
||||||
// #enddocregion checkout-form
|
|
||||||
// #docregion inject-form-builder
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
private cartService: CartService,
|
|
||||||
private formBuilder: FormBuilder,
|
|
||||||
) {
|
|
||||||
// #enddocregion inject-form-builder
|
|
||||||
this.items = this.cartService.getItems();
|
|
||||||
|
|
||||||
this.checkoutForm = this.formBuilder.group({
|
|
||||||
name: '',
|
|
||||||
address: ''
|
|
||||||
});
|
|
||||||
// #docregion inject-form-builder
|
|
||||||
}
|
|
||||||
// #enddocregion inject-form-builder, checkout-form-group
|
|
||||||
|
|
||||||
// #enddocregion props-services
|
|
||||||
onSubmit(customerData) {
|
|
||||||
// Process checkout data here
|
|
||||||
console.warn('Your order has been submitted', customerData);
|
|
||||||
|
|
||||||
this.items = this.cartService.clearCart();
|
|
||||||
this.checkoutForm.reset();
|
|
||||||
}
|
|
||||||
// #docregion props-services, inject-form-builder, checkout-form, checkout-form-group
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
<p *ngIf="product.price > 700">
|
|
||||||
<button>Notify Me</button>
|
|
||||||
</p>
|
|
@ -1,24 +0,0 @@
|
|||||||
// #docplaster
|
|
||||||
// #docregion as-generated, imports
|
|
||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
// #enddocregion as-generated
|
|
||||||
import { Input } from '@angular/core';
|
|
||||||
// #enddocregion imports
|
|
||||||
// #docregion as-generated
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-product-alerts',
|
|
||||||
templateUrl: './product-alerts.component.html',
|
|
||||||
styleUrls: ['./product-alerts.component.css']
|
|
||||||
})
|
|
||||||
// #docregion input-decorator
|
|
||||||
export class ProductAlertsComponent implements OnInit {
|
|
||||||
// #enddocregion as-generated
|
|
||||||
@Input() product;
|
|
||||||
// #docregion as-generated
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
<p *ngIf="product.price > 700">
|
|
||||||
<button (click)="notify.emit()">Notify Me</button>
|
|
||||||
</p>
|
|
@ -1,17 +0,0 @@
|
|||||||
// #docplaster
|
|
||||||
// #docregion imports
|
|
||||||
import { Component } from '@angular/core';
|
|
||||||
import { Input } from '@angular/core';
|
|
||||||
import { Output, EventEmitter } from '@angular/core';
|
|
||||||
// #enddocregion imports
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-product-alerts',
|
|
||||||
templateUrl: './product-alerts.component.html',
|
|
||||||
styleUrls: ['./product-alerts.component.css']
|
|
||||||
})
|
|
||||||
// #docregion input-output
|
|
||||||
export class ProductAlertsComponent {
|
|
||||||
@Input() product;
|
|
||||||
@Output() notify = new EventEmitter();
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
// #docplaster
|
|
||||||
// #docregion imports
|
|
||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
import { ActivatedRoute } from '@angular/router';
|
|
||||||
|
|
||||||
import { products } from '../products';
|
|
||||||
// #enddocregion imports
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-product-details',
|
|
||||||
templateUrl: './product-details.component.html',
|
|
||||||
styleUrls: ['./product-details.component.css']
|
|
||||||
})
|
|
||||||
// #docregion props-methods, add-to-cart
|
|
||||||
export class ProductDetailsComponent implements OnInit {
|
|
||||||
product;
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
private route: ActivatedRoute,
|
|
||||||
) { }
|
|
||||||
|
|
||||||
// #enddocregion props-methods
|
|
||||||
// #docregion get-product
|
|
||||||
ngOnInit() {
|
|
||||||
this.route.paramMap.subscribe(params => {
|
|
||||||
this.product = products[+params.get('productId')];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// #enddocregion get-product
|
|
||||||
// #docregion props-methods
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
<!-- #docplaster -->
|
|
||||||
<!-- #docregion details -->
|
|
||||||
<h2>Product Details</h2>
|
|
||||||
|
|
||||||
<div *ngIf="product">
|
|
||||||
<h3>{{ product.name }}</h3>
|
|
||||||
<h4>{{ product.price | currency }}</h4>
|
|
||||||
<p>{{ product.description }}</p>
|
|
||||||
|
|
||||||
<!-- #enddocregion details -->
|
|
||||||
<button (click)="addToCart(product)">Buy</button>
|
|
||||||
<!-- #docregion details -->
|
|
||||||
</div>
|
|
@ -1,46 +0,0 @@
|
|||||||
// #docplaster
|
|
||||||
// #docregion imports, cart-service
|
|
||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
import { ActivatedRoute } from '@angular/router';
|
|
||||||
|
|
||||||
import { products } from '../products';
|
|
||||||
// #enddocregion imports
|
|
||||||
import { CartService } from '../cart.service';
|
|
||||||
// #enddocregion cart-service
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-product-details',
|
|
||||||
templateUrl: './product-details.component.html',
|
|
||||||
styleUrls: ['./product-details.component.css']
|
|
||||||
})
|
|
||||||
// #docregion props-methods, get-product, inject-cart-service, add-to-cart
|
|
||||||
export class ProductDetailsComponent implements OnInit {
|
|
||||||
// #enddocregion add-to-cart, get-product, inject-cart-service
|
|
||||||
product;
|
|
||||||
|
|
||||||
// #docregion inject-cart-service
|
|
||||||
constructor(
|
|
||||||
private route: ActivatedRoute,
|
|
||||||
// #enddocregion props-methods
|
|
||||||
private cartService: CartService
|
|
||||||
// #docregion props-methods
|
|
||||||
) { }
|
|
||||||
// #enddocregion inject-cart-service
|
|
||||||
|
|
||||||
// #docregion get-product
|
|
||||||
ngOnInit() {
|
|
||||||
// #enddocregion props-methods
|
|
||||||
this.route.paramMap.subscribe(params => {
|
|
||||||
this.product = products[+params.get('productId')];
|
|
||||||
});
|
|
||||||
// #docregion props-methods
|
|
||||||
}
|
|
||||||
|
|
||||||
// #enddocregion props-methods, get-product
|
|
||||||
// #docregion add-to-cart
|
|
||||||
addToCart(product) {
|
|
||||||
window.alert('Your product has been added to the cart!');
|
|
||||||
this.cartService.addToCart(product);
|
|
||||||
}
|
|
||||||
// #docregion props-methods, get-product, inject-cart-service
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
<h2>Products</h2>
|
|
@ -1,15 +0,0 @@
|
|||||||
import { Component } from '@angular/core';
|
|
||||||
import { products } from '../products';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-product-list',
|
|
||||||
templateUrl: './product-list.component.html',
|
|
||||||
styleUrls: ['./product-list.component.css']
|
|
||||||
})
|
|
||||||
export class ProductListComponent {
|
|
||||||
products = products;
|
|
||||||
|
|
||||||
share() {
|
|
||||||
window.alert('The product has been shared!');
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
<!-- #docplaster -->
|
|
||||||
<!-- #docregion ngfor, interpolation -->
|
|
||||||
<h2>Products</h2>
|
|
||||||
|
|
||||||
<div *ngFor="let product of products">
|
|
||||||
<!-- #enddocregion ngfor -->
|
|
||||||
|
|
||||||
<h3>
|
|
||||||
<!-- #enddocregion interpolation -->
|
|
||||||
<a [title]="product.name + ' details'">
|
|
||||||
<!-- #docregion interpolation -->
|
|
||||||
{{ product.name }}
|
|
||||||
<!-- #enddocregion interpolation -->
|
|
||||||
</a>
|
|
||||||
<!-- #docregion interpolation -->
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
<!-- #docregion ngfor -->
|
|
||||||
</div>
|
|
||||||
<!-- #enddocregion ngfor, interpolation -->
|
|
@ -1,15 +0,0 @@
|
|||||||
<h2>Products</h2>
|
|
||||||
|
|
||||||
<div *ngFor="let product of products">
|
|
||||||
|
|
||||||
<h3>
|
|
||||||
<a [title]="product.name + ' details'">
|
|
||||||
{{ product.name }}
|
|
||||||
</a>
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
<p *ngIf="product.description">
|
|
||||||
Description: {{ product.description }}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</div>
|
|
@ -1,19 +0,0 @@
|
|||||||
<h2>Products</h2>
|
|
||||||
|
|
||||||
<div *ngFor="let product of products">
|
|
||||||
|
|
||||||
<h3>
|
|
||||||
<a [title]="product.name + ' details'">
|
|
||||||
{{ product.name }}
|
|
||||||
</a>
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
<p *ngIf="product.description">
|
|
||||||
Description: {{ product.description }}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<button (click)="share()">
|
|
||||||
Share
|
|
||||||
</button>
|
|
||||||
|
|
||||||
</div>
|
|
@ -1,28 +0,0 @@
|
|||||||
<h2>Products</h2>
|
|
||||||
|
|
||||||
<div *ngFor="let product of products">
|
|
||||||
|
|
||||||
<!-- #docregion product-details -->
|
|
||||||
<h3>
|
|
||||||
<a [title]="product.name + ' details'">
|
|
||||||
{{ product.name }}
|
|
||||||
</a>
|
|
||||||
</h3>
|
|
||||||
<!-- #enddocregion product-details -->
|
|
||||||
|
|
||||||
<p *ngIf="product.description">
|
|
||||||
Description: {{ product.description }}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- #docregion app-product-alerts -->
|
|
||||||
<button (click)="share()">
|
|
||||||
Share
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<app-product-alerts
|
|
||||||
[product]="product">
|
|
||||||
</app-product-alerts>
|
|
||||||
<!-- #enddocregion app-product-alerts -->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
<h2>Products</h2>
|
|
||||||
|
|
||||||
<div *ngFor="let product of products">
|
|
||||||
|
|
||||||
<h3>
|
|
||||||
<a [title]="product.name + ' details'">
|
|
||||||
{{ product.name }}
|
|
||||||
</a>
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
<p *ngIf="product.description">
|
|
||||||
Description: {{ product.description }}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- #docregion on-notify -->
|
|
||||||
<button (click)="share()">
|
|
||||||
Share
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<app-product-alerts
|
|
||||||
[product]="product"
|
|
||||||
(notify)="onNotify()">
|
|
||||||
</app-product-alerts>
|
|
||||||
<!-- #enddocregion on-notify -->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
<h2>Products</h2>
|
|
||||||
|
|
||||||
<!-- #docregion router-link -->
|
|
||||||
<div *ngFor="let product of products; index as productId">
|
|
||||||
|
|
||||||
<h3>
|
|
||||||
<a [title]="product.name + ' details'" [routerLink]="['/products', productId]">
|
|
||||||
{{ product.name }}
|
|
||||||
</a>
|
|
||||||
</h3>
|
|
||||||
<!-- #enddocregion router-link -->
|
|
||||||
<p *ngIf="product.description">
|
|
||||||
Description: {{ product.description }}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<button (click)="share()">
|
|
||||||
Share
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<app-product-alerts
|
|
||||||
[product]="product"
|
|
||||||
(notify)="onNotify()">
|
|
||||||
</app-product-alerts>
|
|
||||||
<!-- #docregion router-link -->
|
|
||||||
</div>
|
|
||||||
<!-- #enddocregion router-link -->
|
|
@ -1,21 +0,0 @@
|
|||||||
import { Component } from '@angular/core';
|
|
||||||
|
|
||||||
import { products } from '../products';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-product-list',
|
|
||||||
templateUrl: './product-list.component.html',
|
|
||||||
styleUrls: ['./product-list.component.css']
|
|
||||||
})
|
|
||||||
// #docregion on-notify
|
|
||||||
export class ProductListComponent {
|
|
||||||
products = products;
|
|
||||||
|
|
||||||
share() {
|
|
||||||
window.alert('The product has been shared!');
|
|
||||||
}
|
|
||||||
|
|
||||||
onNotify() {
|
|
||||||
window.alert('You will be notified when the product goes on sale');
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
export const products = [
|
|
||||||
{
|
|
||||||
name: 'Phone XL',
|
|
||||||
price: 799,
|
|
||||||
description: 'A large phone with one of the best screens'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Phone Mini',
|
|
||||||
price: 699,
|
|
||||||
description: 'A great phone with one of the best cameras'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Phone Standard',
|
|
||||||
price: 299,
|
|
||||||
description: ''
|
|
||||||
}
|
|
||||||
];
|
|
@ -1,15 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-shipping',
|
|
||||||
templateUrl: './shipping.component.html',
|
|
||||||
styleUrls: ['./shipping.component.css']
|
|
||||||
})
|
|
||||||
export class ShippingComponent implements OnInit {
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
<h3>Shipping Prices</h3>
|
|
||||||
|
|
||||||
<div class="shipping-item" *ngFor="let shipping of shippingCosts | async">
|
|
||||||
<span>{{ shipping.type }} </span>
|
|
||||||
<span>{{ shipping.price | currency }}</span>
|
|
||||||
</div>
|
|
@ -1,26 +0,0 @@
|
|||||||
// #docplaster
|
|
||||||
// #docregion imports
|
|
||||||
import { Component } from '@angular/core';
|
|
||||||
|
|
||||||
import { CartService } from '../cart.service';
|
|
||||||
// #enddocregion
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-shipping',
|
|
||||||
templateUrl: './shipping.component.html',
|
|
||||||
styleUrls: ['./shipping.component.css']
|
|
||||||
})
|
|
||||||
// #docregion props, ctor
|
|
||||||
export class ShippingComponent {
|
|
||||||
shippingCosts;
|
|
||||||
// #enddocregion props
|
|
||||||
|
|
||||||
// #docregion inject-cart-service
|
|
||||||
constructor(private cartService: CartService) {
|
|
||||||
// #enddocregion inject-cart-service
|
|
||||||
this.shippingCosts = this.cartService.getShippingPrices();
|
|
||||||
// #docregion inject-cart-service
|
|
||||||
}
|
|
||||||
// #enddocregion inject-cart-service
|
|
||||||
// #docregion props
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
<a>
|
|
||||||
<h1>My Store</h1>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a class="button fancy-button">
|
|
||||||
<i class="material-icons">shopping_cart</i>Checkout
|
|
||||||
</a>
|
|
@ -1,7 +0,0 @@
|
|||||||
<a [routerLink]="['/']">
|
|
||||||
<h1>My Store</h1>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a [routerLink]="['/cart']" class="button fancy-button">
|
|
||||||
<i class="material-icons">shopping_cart</i>Checkout
|
|
||||||
</a>
|
|
@ -1,10 +0,0 @@
|
|||||||
import { Component } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-top-bar',
|
|
||||||
templateUrl: './top-bar.component.html',
|
|
||||||
styleUrls: ['./top-bar.component.css']
|
|
||||||
})
|
|
||||||
export class TopBarComponent {
|
|
||||||
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"type": "Overnight",
|
|
||||||
"price": 25.99
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "2-Day",
|
|
||||||
"price": 9.99
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Postal",
|
|
||||||
"price": 2.99
|
|
||||||
}
|
|
||||||
]
|
|
@ -1,18 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<title>Angular Getting Started</title>
|
|
||||||
<base href="/" />
|
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
|
||||||
<link
|
|
||||||
href="https://fonts.googleapis.com/icon?family=Material+Icons"
|
|
||||||
rel="stylesheet"
|
|
||||||
/>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<app-root></app-root>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"description": "Getting Started",
|
|
||||||
"files":[
|
|
||||||
"!**/*.d.ts",
|
|
||||||
"!**/*.js",
|
|
||||||
"!**/*.[0-9].*"
|
|
||||||
],
|
|
||||||
"tags": ["Angular", "getting started", "tutorial"]
|
|
||||||
}
|
|
@ -28,6 +28,7 @@
|
|||||||
'@angular/compiler/testing': 'npm:@angular/compiler/bundles/compiler-testing.umd.js',
|
'@angular/compiler/testing': 'npm:@angular/compiler/bundles/compiler-testing.umd.js',
|
||||||
'@angular/platform-browser/testing': 'npm:@angular/platform-browser/bundles/platform-browser-testing.umd.js',
|
'@angular/platform-browser/testing': 'npm:@angular/platform-browser/bundles/platform-browser-testing.umd.js',
|
||||||
'@angular/platform-browser-dynamic/testing': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
|
'@angular/platform-browser-dynamic/testing': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
|
||||||
|
'@angular/http/testing': 'npm:@angular/http/bundles/http-testing.umd.js',
|
||||||
'@angular/router/testing': 'npm:@angular/router/bundles/router-testing.umd.js',
|
'@angular/router/testing': 'npm:@angular/router/bundles/router-testing.umd.js',
|
||||||
'@angular/forms/testing': 'npm:@angular/forms/bundles/forms-testing.umd.js',
|
'@angular/forms/testing': 'npm:@angular/forms/bundles/forms-testing.umd.js',
|
||||||
},
|
},
|
||||||
|
@ -1,42 +1,39 @@
|
|||||||
'use strict'; // necessary for es6 output in node
|
'use strict'; // necessary for es6 output in node
|
||||||
|
|
||||||
import { browser, element, ElementFinder, by } from 'protractor';
|
import { browser, element, by } from 'protractor';
|
||||||
|
|
||||||
describe('Lifecycle hooks', () => {
|
describe('Lifecycle hooks', function () {
|
||||||
const sendKeys = (el: ElementFinder, input: string) =>
|
|
||||||
input.split('').reduce((prev, c) => prev.then(() => el.sendKeys(c)), Promise.resolve());
|
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(function () {
|
||||||
browser.get('');
|
browser.get('');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should open correctly', () => {
|
it('should open correctly', function () {
|
||||||
expect(element.all(by.css('h2')).get(0).getText()).toEqual('Peek-A-Boo');
|
expect(element.all(by.css('h2')).get(0).getText()).toEqual('Peek-A-Boo');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should support peek-a-boo', async () => {
|
it('should support peek-a-boo', function () {
|
||||||
let pabComp = element(by.css('peek-a-boo-parent peek-a-boo'));
|
let pabComp = element(by.css('peek-a-boo-parent peek-a-boo'));
|
||||||
expect(pabComp.isPresent()).toBe(false, 'should not be able to find the "peek-a-boo" component');
|
expect(pabComp.isPresent()).toBe(false, 'should not be able to find the "peek-a-boo" component');
|
||||||
|
|
||||||
let pabButton = element.all(by.css('peek-a-boo-parent button')).get(0);
|
let pabButton = element.all(by.css('peek-a-boo-parent button')).get(0);
|
||||||
let updateHeroButton = element.all(by.css('peek-a-boo-parent button')).get(1);
|
let updateHeroButton = element.all(by.css('peek-a-boo-parent button')).get(1);
|
||||||
expect(pabButton.getText()).toContain('Create Peek');
|
expect(pabButton.getText()).toContain('Create Peek');
|
||||||
|
pabButton.click().then(function () {
|
||||||
await pabButton.click();
|
expect(pabButton.getText()).toContain('Destroy Peek');
|
||||||
expect(pabButton.getText()).toContain('Destroy Peek');
|
expect(pabComp.isDisplayed()).toBe(true, 'should be able to see the "peek-a-boo" component');
|
||||||
expect(pabComp.isDisplayed()).toBe(true, 'should be able to see the "peek-a-boo" component');
|
expect(pabComp.getText()).toContain('Windstorm');
|
||||||
expect(pabComp.getText()).toContain('Windstorm');
|
expect(pabComp.getText()).not.toContain('Windstorm!');
|
||||||
expect(pabComp.getText()).not.toContain('Windstorm!');
|
expect(updateHeroButton.isPresent()).toBe(true, 'should be able to see the update hero button');
|
||||||
expect(updateHeroButton.isPresent()).toBe(true, 'should be able to see the update hero button');
|
return updateHeroButton.click();
|
||||||
|
}).then(function () {
|
||||||
await updateHeroButton.click();
|
expect(pabComp.getText()).toContain('Windstorm!');
|
||||||
expect(pabComp.getText()).toContain('Windstorm!');
|
return pabButton.click();
|
||||||
|
}).then(function () {
|
||||||
await pabButton.click();
|
expect(pabComp.isPresent()).toBe(false, 'should no longer be able to find the "peek-a-boo" component');
|
||||||
expect(pabComp.isPresent()).toBe(false, 'should no longer be able to find the "peek-a-boo" component');
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should support OnChanges hook', () => {
|
it('should support OnChanges hook', function () {
|
||||||
let onChangesViewEle = element.all(by.css('on-changes div')).get(0);
|
let onChangesViewEle = element.all(by.css('on-changes div')).get(0);
|
||||||
let inputEles = element.all(by.css('on-changes-parent input'));
|
let inputEles = element.all(by.css('on-changes-parent input'));
|
||||||
let heroNameInputEle = inputEles.get(1);
|
let heroNameInputEle = inputEles.get(1);
|
||||||
@ -55,7 +52,7 @@ describe('Lifecycle hooks', () => {
|
|||||||
expect(changeLogEles.count()).toEqual(7, 'should have 7 messages now');
|
expect(changeLogEles.count()).toEqual(7, 'should have 7 messages now');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should support DoCheck hook', async () => {
|
it('should support DoCheck hook', function () {
|
||||||
let doCheckViewEle = element.all(by.css('do-check div')).get(0);
|
let doCheckViewEle = element.all(by.css('do-check div')).get(0);
|
||||||
let inputEles = element.all(by.css('do-check-parent input'));
|
let inputEles = element.all(by.css('do-check-parent input'));
|
||||||
let heroNameInputEle = inputEles.get(1);
|
let heroNameInputEle = inputEles.get(1);
|
||||||
@ -65,25 +62,26 @@ describe('Lifecycle hooks', () => {
|
|||||||
let logCount: number;
|
let logCount: number;
|
||||||
|
|
||||||
expect(titleEle.getText()).toContain('Windstorm can sing');
|
expect(titleEle.getText()).toContain('Windstorm can sing');
|
||||||
|
changeLogEles.count().then(function(count: number) {
|
||||||
let count = await changeLogEles.count();
|
// 3 messages to start
|
||||||
// 3 messages to start
|
expect(count).toEqual(3, 'should start with 3 messages');
|
||||||
expect(count).toEqual(3, 'should start with 3 messages');
|
logCount = count;
|
||||||
|
return heroNameInputEle.sendKeys('-foo-');
|
||||||
logCount = count;
|
}).then(function () {
|
||||||
await sendKeys(heroNameInputEle, '-foo-');
|
expect(titleEle.getText()).toContain('Windstorm-foo- can sing');
|
||||||
count = await changeLogEles.count();
|
return changeLogEles.count();
|
||||||
expect(titleEle.getText()).toContain('Windstorm-foo- can sing');
|
}).then(function(count: number) {
|
||||||
expect(count).toBeGreaterThanOrEqual(logCount + 5, 'should add at least one more message for each keystroke');
|
// one more for each keystroke
|
||||||
|
expect(count).toEqual(logCount + 5, 'should add 5 more messages');
|
||||||
logCount = count;
|
logCount = count;
|
||||||
await sendKeys(powerInputEle, '-bar-');
|
return powerInputEle.sendKeys('-bar-');
|
||||||
count = await changeLogEles.count();
|
}).then(function () {
|
||||||
expect(titleEle.getText()).toContain('Windstorm-foo- can sing-bar-');
|
expect(titleEle.getText()).toContain('Windstorm-foo- can sing-bar-');
|
||||||
expect(count).toBeGreaterThanOrEqual(logCount + 5, 'should add at least one more message for each keystroke');
|
expect(changeLogEles.count()).toEqual(logCount + 6, 'should add 6 more messages');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should support AfterView hooks', async () => {
|
it('should support AfterView hooks', function () {
|
||||||
let parentEle = element(by.tagName('after-view-parent'));
|
let parentEle = element(by.tagName('after-view-parent'));
|
||||||
let buttonEle = parentEle.element(by.tagName('button')); // Reset
|
let buttonEle = parentEle.element(by.tagName('button')); // Reset
|
||||||
let commentEle = parentEle.element(by.className('comment'));
|
let commentEle = parentEle.element(by.className('comment'));
|
||||||
@ -94,81 +92,90 @@ describe('Lifecycle hooks', () => {
|
|||||||
expect(childViewInputEle.getAttribute('value')).toContain('Magneta');
|
expect(childViewInputEle.getAttribute('value')).toContain('Magneta');
|
||||||
expect(commentEle.isPresent()).toBe(false, 'comment should not be in DOM');
|
expect(commentEle.isPresent()).toBe(false, 'comment should not be in DOM');
|
||||||
|
|
||||||
logCount = await logEles.count();
|
logEles.count().then(function(count: number) {
|
||||||
await childViewInputEle.sendKeys('-test-');
|
logCount = count;
|
||||||
|
return childViewInputEle.sendKeys('-test-');
|
||||||
expect(childViewInputEle.getAttribute('value')).toContain('-test-');
|
}).then(function() {
|
||||||
expect(commentEle.isPresent()).toBe(true, 'should have comment because >10 chars');
|
expect(childViewInputEle.getAttribute('value')).toContain('-test-');
|
||||||
expect(commentEle.getText()).toContain('long name');
|
expect(commentEle.isPresent()).toBe(true, 'should have comment because >10 chars');
|
||||||
|
expect(commentEle.getText()).toContain('long name');
|
||||||
let count = await logEles.count();
|
return logEles.count();
|
||||||
expect(logCount + 7).toBeGreaterThan(count - 3, '7 additional log messages should have been added');
|
}).then(function(count: number) {
|
||||||
expect(logCount + 7).toBeLessThan(count + 3, '7 additional log messages should have been added');
|
expect(logCount + 7).toBeGreaterThan(count - 3,
|
||||||
|
'7 additional log messages should have been added');
|
||||||
logCount = count;
|
expect(logCount + 7).toBeLessThan(count + 3,
|
||||||
await buttonEle.click();
|
'7 additional log messages should have been added');
|
||||||
expect(logEles.count()).toBeLessThan(logCount, 'log should shrink after reset');
|
logCount = count;
|
||||||
|
return buttonEle.click();
|
||||||
|
}).then(function() {
|
||||||
|
expect(logEles.count()).toBeLessThan(logCount, 'log should shrink after reset');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should support AfterContent hooks', async () => {
|
|
||||||
|
it('should support AfterContent hooks', function () {
|
||||||
let parentEle = element(by.tagName('after-content-parent'));
|
let parentEle = element(by.tagName('after-content-parent'));
|
||||||
let buttonEle = parentEle.element(by.tagName('button')); // Reset
|
let buttonEle = parentEle.element(by.tagName('button')); // Reset
|
||||||
let commentEle = parentEle.element(by.className('comment'));
|
let commentEle = parentEle.element(by.className('comment'));
|
||||||
let logEles = parentEle.all(by.css('h4 ~ div'));
|
let logEles = parentEle.all(by.css('h4 ~ div'));
|
||||||
let childViewInputEle = parentEle.element(by.css('app-child input'));
|
let childViewInputEle = parentEle.element(by.css('app-child input'));
|
||||||
let logCount = await logEles.count();
|
let logCount: number;
|
||||||
|
|
||||||
expect(childViewInputEle.getAttribute('value')).toContain('Magneta');
|
expect(childViewInputEle.getAttribute('value')).toContain('Magneta');
|
||||||
expect(commentEle.isPresent()).toBe(false, 'comment should not be in DOM');
|
expect(commentEle.isPresent()).toBe(false, 'comment should not be in DOM');
|
||||||
|
|
||||||
await sendKeys(childViewInputEle, '-test-');
|
logEles.count().then(function(count: number) {
|
||||||
let count = await logEles.count();
|
logCount = count;
|
||||||
expect(childViewInputEle.getAttribute('value')).toContain('-test-');
|
return childViewInputEle.sendKeys('-test-');
|
||||||
expect(commentEle.isPresent()).toBe(true, 'should have comment because >10 chars');
|
}).then(function() {
|
||||||
expect(commentEle.getText()).toContain('long name');
|
expect(childViewInputEle.getAttribute('value')).toContain('-test-');
|
||||||
expect(count).toBeGreaterThanOrEqual(logCount + 5, 'additional log messages should have been added');
|
expect(commentEle.isPresent()).toBe(true, 'should have comment because >10 chars');
|
||||||
|
expect(commentEle.getText()).toContain('long name');
|
||||||
logCount = count;
|
return logEles.count();
|
||||||
await buttonEle.click();
|
}).then(function(count: number) {
|
||||||
expect(logEles.count()).toBeLessThan(logCount, 'log should shrink after reset');
|
expect(logCount + 5).toEqual(count, '5 additional log messages should have been added');
|
||||||
|
logCount = count;
|
||||||
|
return buttonEle.click();
|
||||||
|
}).then(function() {
|
||||||
|
expect(logEles.count()).toBeLessThan(logCount, 'log should shrink after reset');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should support spy\'s OnInit & OnDestroy hooks', async () => {
|
it('should support spy\'s OnInit & OnDestroy hooks', function () {
|
||||||
let inputEle = element(by.css('spy-parent input'));
|
let inputEle = element(by.css('spy-parent input'));
|
||||||
let addHeroButtonEle = element(by.cssContainingText('spy-parent button', 'Add Hero'));
|
let addHeroButtonEle = element(by.cssContainingText('spy-parent button', 'Add Hero'));
|
||||||
let resetHeroesButtonEle = element(by.cssContainingText('spy-parent button', 'Reset Heroes'));
|
let resetHeroesButtonEle = element(by.cssContainingText('spy-parent button', 'Reset Heroes'));
|
||||||
let heroEles = element.all(by.css('spy-parent div[mySpy'));
|
let heroEles = element.all(by.css('spy-parent div[mySpy'));
|
||||||
let logEles = element.all(by.css('spy-parent h4 ~ div'));
|
let logEles = element.all(by.css('spy-parent h4 ~ div'));
|
||||||
|
|
||||||
expect(heroEles.count()).toBe(2, 'should have two heroes displayed');
|
expect(heroEles.count()).toBe(2, 'should have two heroes displayed');
|
||||||
expect(logEles.count()).toBe(2, 'should have two log entries');
|
expect(logEles.count()).toBe(2, 'should have two log entries');
|
||||||
|
inputEle.sendKeys('-test-').then(function() {
|
||||||
await inputEle.sendKeys('-test-');
|
return addHeroButtonEle.click();
|
||||||
await addHeroButtonEle.click();
|
}).then(function() {
|
||||||
expect(heroEles.count()).toBe(3, 'should have added one hero');
|
expect(heroEles.count()).toBe(3, 'should have added one hero');
|
||||||
expect(heroEles.get(2).getText()).toContain('-test-');
|
expect(heroEles.get(2).getText()).toContain('-test-');
|
||||||
expect(logEles.count()).toBe(3, 'should now have 3 log entries');
|
expect(logEles.count()).toBe(3, 'should now have 3 log entries');
|
||||||
|
return resetHeroesButtonEle.click();
|
||||||
await resetHeroesButtonEle.click();
|
}).then(function() {
|
||||||
expect(heroEles.count()).toBe(0, 'should no longer have any heroes');
|
expect(heroEles.count()).toBe(0, 'should no longer have any heroes');
|
||||||
expect(logEles.count()).toBe(7, 'should now have 7 log entries - 3 orig + 1 reset + 3 removeall');
|
expect(logEles.count()).toBe(7, 'should now have 7 log entries - 3 orig + 1 reset + 3 removeall');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should support "spy counter"', async () => {
|
it('should support "spy counter"', function () {
|
||||||
let updateCounterButtonEle = element(by.cssContainingText('counter-parent button', 'Update'));
|
let updateCounterButtonEle = element(by.cssContainingText('counter-parent button', 'Update'));
|
||||||
let resetCounterButtonEle = element(by.cssContainingText('counter-parent button', 'Reset'));
|
let resetCounterButtonEle = element(by.cssContainingText('counter-parent button', 'Reset'));
|
||||||
let textEle = element(by.css('counter-parent app-counter > div'));
|
let textEle = element(by.css('counter-parent app-counter > div'));
|
||||||
let logEles = element.all(by.css('counter-parent h4 ~ div'));
|
let logEles = element.all(by.css('counter-parent h4 ~ div'));
|
||||||
|
|
||||||
expect(textEle.getText()).toContain('Counter = 0');
|
expect(textEle.getText()).toContain('Counter = 0');
|
||||||
expect(logEles.count()).toBe(2, 'should start with two log entries');
|
expect(logEles.count()).toBe(2, 'should start with two log entries');
|
||||||
|
updateCounterButtonEle.click().then(function() {
|
||||||
await updateCounterButtonEle.click();
|
expect(textEle.getText()).toContain('Counter = 1');
|
||||||
expect(textEle.getText()).toContain('Counter = 1');
|
expect(logEles.count()).toBe(3, 'should now have 3 log entries');
|
||||||
expect(logEles.count()).toBe(3, 'should now have 3 log entries');
|
return resetCounterButtonEle.click();
|
||||||
|
}).then(function() {
|
||||||
await resetCounterButtonEle.click();
|
expect(textEle.getText()).toContain('Counter = 0');
|
||||||
expect(textEle.getText()).toContain('Counter = 0');
|
expect(logEles.count()).toBe(7, 'should now have 7 log entries - 3 prev + 1 reset + 2 destroy + 1 init');
|
||||||
expect(logEles.count()).toBe(7, 'should now have 7 log entries - 3 prev + 1 reset + 2 destroy + 1 init');
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
24
aio/content/examples/ngmodule-faq/contact.1b.stackblitz.json
Normal file
24
aio/content/examples/ngmodule-faq/contact.1b.stackblitz.json
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"description": "Contact NgModule v.1",
|
||||||
|
"files": [
|
||||||
|
"src/app/app.component.1b.ts",
|
||||||
|
"src/app/app.module.1b.ts",
|
||||||
|
"src/app/highlight.directive.ts",
|
||||||
|
"src/app/title.component.html",
|
||||||
|
"src/app/title.component.ts",
|
||||||
|
"src/app/user.service.ts",
|
||||||
|
|
||||||
|
"src/app/contact/awesome.pipe.ts",
|
||||||
|
"src/app/contact/contact.component.css",
|
||||||
|
"src/app/contact/contact.component.html",
|
||||||
|
"src/app/contact/contact.component.3.ts",
|
||||||
|
"src/app/contact/contact.service.ts",
|
||||||
|
"src/app/contact/contact-highlight.directive.ts",
|
||||||
|
|
||||||
|
"src/main.1b.ts",
|
||||||
|
"src/styles.css",
|
||||||
|
"src/index.1b.html"
|
||||||
|
],
|
||||||
|
"main": "src/index.1b.html",
|
||||||
|
"tags": ["NgModule"]
|
||||||
|
}
|
26
aio/content/examples/ngmodule-faq/contact.2.stackblitz.json
Normal file
26
aio/content/examples/ngmodule-faq/contact.2.stackblitz.json
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"description": "Contact NgModule v.2",
|
||||||
|
"files": [
|
||||||
|
"src/app/app.component.2.ts",
|
||||||
|
"src/app/app.module.2.ts",
|
||||||
|
"src/app/highlight.directive.ts",
|
||||||
|
"src/app/title.component.html",
|
||||||
|
"src/app/title.component.ts",
|
||||||
|
"src/app/user.service.ts",
|
||||||
|
|
||||||
|
"src/app/contact/contact.component.css",
|
||||||
|
"src/app/contact/contact.component.html",
|
||||||
|
"src/app/contact/contact.service.ts",
|
||||||
|
|
||||||
|
"src/app/contact/awesome.pipe.ts",
|
||||||
|
"src/app/contact/contact.component.3.ts",
|
||||||
|
"src/app/contact/contact.module.2.ts",
|
||||||
|
"src/app/contact/contact-highlight.directive.ts",
|
||||||
|
|
||||||
|
"src/main.2.ts",
|
||||||
|
"src/styles.css",
|
||||||
|
"src/index.2.html"
|
||||||
|
],
|
||||||
|
"main": "src/index.2.html",
|
||||||
|
"tags": ["NgModule"]
|
||||||
|
}
|
223
aio/content/examples/ngmodule-faq/e2e/src/app.e2e-spec.ts
Normal file
223
aio/content/examples/ngmodule-faq/e2e/src/app.e2e-spec.ts
Normal file
@ -0,0 +1,223 @@
|
|||||||
|
'use strict'; // necessary for es6 output in node
|
||||||
|
|
||||||
|
import { browser, element, by } from 'protractor';
|
||||||
|
|
||||||
|
describe('NgModule', function () {
|
||||||
|
|
||||||
|
// helpers
|
||||||
|
const gold = 'rgba(255, 215, 0, 1)';
|
||||||
|
const powderblue = 'rgba(176, 224, 230, 1)';
|
||||||
|
const lightgray = 'rgba(211, 211, 211, 1)';
|
||||||
|
const white = 'rgba(0, 0, 0, 0)';
|
||||||
|
|
||||||
|
function getCommonsSectionStruct() {
|
||||||
|
const buttons = element.all(by.css('nav a'));
|
||||||
|
|
||||||
|
return {
|
||||||
|
title: element.all(by.tagName('h1')).get(0),
|
||||||
|
welcome: element.all(by.css('app-title p i')).get(0),
|
||||||
|
contactButton: buttons.get(0),
|
||||||
|
crisisButton: buttons.get(1),
|
||||||
|
heroesButton: buttons.get(2)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function getContactSectionStruct() {
|
||||||
|
const buttons = element.all(by.css('app-contact form button'));
|
||||||
|
|
||||||
|
return {
|
||||||
|
header: element.all(by.css('app-contact h2')).get(0),
|
||||||
|
popupMessage: element.all(by.css('app-contact div')).get(0),
|
||||||
|
contactNameHeader: element.all(by.css('app-contact form h3')).get(0),
|
||||||
|
input: element.all(by.css('app-contact form input')).get(0),
|
||||||
|
validationError: element.all(by.css('app-contact form .alert')).get(0),
|
||||||
|
saveButton: buttons.get(0), // can't be tested
|
||||||
|
nextContactButton: buttons.get(1),
|
||||||
|
newContactButton: buttons.get(2)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCrisisSectionStruct() {
|
||||||
|
return {
|
||||||
|
title: element.all(by.css('ng-component h3')).get(0),
|
||||||
|
items: element.all(by.css('ng-component a')),
|
||||||
|
itemId: element.all(by.css('ng-component div')).get(0),
|
||||||
|
listLink: element.all(by.css('ng-component a')).get(0),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function getHeroesSectionStruct() {
|
||||||
|
return {
|
||||||
|
header: element.all(by.css('ng-component h2')).get(0),
|
||||||
|
title: element.all(by.css('ng-component h3')).get(0),
|
||||||
|
items: element.all(by.css('ng-component a')),
|
||||||
|
itemId: element.all(by.css('ng-component ng-component div div')).get(0),
|
||||||
|
itemInput: element.all(by.css('ng-component ng-component input')).get(0),
|
||||||
|
listLink: element.all(by.css('ng-component ng-component a')).get(0),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// tests
|
||||||
|
function appTitleTests(color: string, name?: string) {
|
||||||
|
return function() {
|
||||||
|
it('should have a gray header', function() {
|
||||||
|
const commons = getCommonsSectionStruct();
|
||||||
|
expect(commons.title.getCssValue('backgroundColor')).toBe(color);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should welcome us', function () {
|
||||||
|
const commons = getCommonsSectionStruct();
|
||||||
|
expect(commons.welcome.getText()).toBe('Welcome, ' + (name || 'Sherlock Holmes'));
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function contactTests(color: string, name?: string) {
|
||||||
|
return function() {
|
||||||
|
it('shows the contact\'s owner', function() {
|
||||||
|
const contacts = getContactSectionStruct();
|
||||||
|
expect(contacts.header.getText()).toBe('Contact of ' + (name || 'Sherlock Holmes'));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('can cycle between contacts', function () {
|
||||||
|
const contacts = getContactSectionStruct();
|
||||||
|
const nextButton = contacts.nextContactButton;
|
||||||
|
expect(contacts.contactNameHeader.getText()).toBe('Awesome Sam Spade');
|
||||||
|
expect(contacts.contactNameHeader.getCssValue('backgroundColor')).toBe(color);
|
||||||
|
nextButton.click().then(function () {
|
||||||
|
expect(contacts.contactNameHeader.getText()).toBe('Awesome Nick Danger');
|
||||||
|
return nextButton.click();
|
||||||
|
}).then(function () {
|
||||||
|
expect(contacts.contactNameHeader.getText()).toBe('Awesome Nancy Drew');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('can change an existing contact', function () {
|
||||||
|
const contacts = getContactSectionStruct();
|
||||||
|
contacts.input.sendKeys('a');
|
||||||
|
expect(contacts.input.getCssValue('backgroundColor')).toBe(color);
|
||||||
|
expect(contacts.contactNameHeader.getText()).toBe('Awesome Sam Spadea');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('can create a new contact', function () {
|
||||||
|
const contacts = getContactSectionStruct();
|
||||||
|
const newContactButton = contacts.newContactButton;
|
||||||
|
newContactButton.click().then(function () {
|
||||||
|
expect(contacts.validationError.getText()).toBe('Name is required');
|
||||||
|
contacts.input.sendKeys('John Doe');
|
||||||
|
expect(contacts.contactNameHeader.getText()).toBe('Awesome John Doe');
|
||||||
|
expect(contacts.validationError.getText()).toBe('');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('index.html', function () {
|
||||||
|
beforeEach(function () {
|
||||||
|
browser.get('');
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('app-title', appTitleTests(white, 'Miss Marple'));
|
||||||
|
|
||||||
|
describe('contact', contactTests(lightgray, 'Miss Marple'));
|
||||||
|
|
||||||
|
describe('crisis center', function () {
|
||||||
|
beforeEach(function () {
|
||||||
|
getCommonsSectionStruct().crisisButton.click();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('shows a list of crisis', function () {
|
||||||
|
const crisis = getCrisisSectionStruct();
|
||||||
|
expect(crisis.title.getText()).toBe('Crisis List');
|
||||||
|
expect(crisis.items.count()).toBe(4);
|
||||||
|
expect(crisis.items.get(0).getText()).toBe('1 - Dragon Burning Cities');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('can navigate to one crisis details', function () {
|
||||||
|
const crisis = getCrisisSectionStruct();
|
||||||
|
crisis.items.get(0).click().then(function() {
|
||||||
|
expect(crisis.itemId.getText()).toBe('Crisis id: 1');
|
||||||
|
return crisis.listLink.click();
|
||||||
|
}).then(function () {
|
||||||
|
// We are back to the list
|
||||||
|
expect(crisis.items.count()).toBe(4);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('heroes', function () {
|
||||||
|
beforeEach(function () {
|
||||||
|
getCommonsSectionStruct().heroesButton.click();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('shows a list of heroes', function() {
|
||||||
|
const heroes = getHeroesSectionStruct();
|
||||||
|
expect(heroes.header.getText()).toBe('Heroes of Miss Marple');
|
||||||
|
expect(heroes.title.getText()).toBe('Hero List');
|
||||||
|
expect(heroes.items.count()).toBe(6);
|
||||||
|
expect(heroes.items.get(0).getText()).toBe('11 - Mr. Nice');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('can navigate and edit one hero details', function () {
|
||||||
|
const heroes = getHeroesSectionStruct();
|
||||||
|
heroes.items.get(0).click().then(function () {
|
||||||
|
expect(heroes.itemId.getText()).toBe('Id: 11');
|
||||||
|
heroes.itemInput.sendKeys(' try');
|
||||||
|
return heroes.listLink.click();
|
||||||
|
}).then(function () {
|
||||||
|
// We are back to the list
|
||||||
|
expect(heroes.items.count()).toBe(6);
|
||||||
|
expect(heroes.items.get(0).getText()).toBe('11 - Mr. Nice try');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// describe('index.0.html', function() {
|
||||||
|
// beforeEach(function () {
|
||||||
|
// browser.get('index.0.html');
|
||||||
|
// });
|
||||||
|
|
||||||
|
// it('has a title', function () {
|
||||||
|
// const title = element.all(by.tagName('h1')).get(0);
|
||||||
|
// expect(title.getText()).toBe('Minimal NgModule');
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
|
||||||
|
// describe('index.1.html', function () {
|
||||||
|
// beforeEach(function () {
|
||||||
|
// browser.get('index.1.html');
|
||||||
|
// });
|
||||||
|
|
||||||
|
// describe('app-title', appTitleTests(powderblue));
|
||||||
|
// });
|
||||||
|
|
||||||
|
// describe('index.1b.html', function () {
|
||||||
|
// beforeEach(function () {
|
||||||
|
// browser.get('index.1b.html');
|
||||||
|
// });
|
||||||
|
|
||||||
|
// describe('app-title', appTitleTests(powderblue));
|
||||||
|
|
||||||
|
// describe('contact', contactTests(powderblue));
|
||||||
|
// });
|
||||||
|
|
||||||
|
// describe('index.2.html', function () {
|
||||||
|
// beforeEach(function () {
|
||||||
|
// browser.get('index.2.html');
|
||||||
|
// });
|
||||||
|
|
||||||
|
// describe('app-title', appTitleTests(gold));
|
||||||
|
|
||||||
|
// describe('contact', contactTests(powderblue));
|
||||||
|
// });
|
||||||
|
|
||||||
|
// describe('index.3.html', function () {
|
||||||
|
// beforeEach(function () {
|
||||||
|
// browser.get('index.3.html');
|
||||||
|
// });
|
||||||
|
|
||||||
|
// describe('app-title', appTitleTests(gold));
|
||||||
|
// });
|
||||||
|
|
||||||
|
});
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user