Compare commits
424 Commits
8.0.1
...
8.1.0-next
Author | SHA1 | Date | |
---|---|---|---|
540b01402f | |||
8852b793df | |||
d1df0a94d4 | |||
00cc905b98 | |||
337b6fe003 | |||
ef4a15bc0b | |||
0d4f8c7dd9 | |||
b74df20c2a | |||
4ecff42e7f | |||
55a14e4866 | |||
c7850fff3b | |||
456f2e70af | |||
4da5e9a156 | |||
812c231b0c | |||
3ed7463ad7 | |||
8154433130 | |||
07cd65b5ec | |||
cd6fc8bf06 | |||
fcdd784667 | |||
a981dd2aab | |||
b4e68025f8 | |||
680d38513b | |||
21328f2373 | |||
dd8cf19352 | |||
8bedf50073 | |||
32886cf9ac | |||
fcef39048a | |||
1315d23aa4 | |||
8ce288a852 | |||
f936590573 | |||
876cd603f1 | |||
aca339e864 | |||
f4cd3740b2 | |||
6d861f240b | |||
1f79c827a0 | |||
e0c36620c1 | |||
80394ce08b | |||
99c9bcab03 | |||
fa354888b1 | |||
d82adbe8c4 | |||
09c57ecf95 | |||
282abdb02d | |||
19bbf4bc8e | |||
53c6b78c51 | |||
91699259b2 | |||
41f372fe79 | |||
8e8c1ad47d | |||
b61784948a | |||
b4644d7bb0 | |||
7a0f8ac36c | |||
5e0f982961 | |||
f5b0c8a323 | |||
d2b0ac7de8 | |||
a2d26c6f2a | |||
62332b80da | |||
e3f3b106ac | |||
fd23663a29 | |||
71be1da0ad | |||
6a5cc8f95c | |||
2c406fb1a9 | |||
0b23adca80 | |||
671f64324b | |||
f1f8d70a41 | |||
8301028319 | |||
ba5309c1f8 | |||
fa5d8ca041 | |||
24ca8ba7ce | |||
af4925f374 | |||
77578266fd | |||
7bf7244ba3 | |||
1a98d51f98 | |||
82682bb93f | |||
d72479b628 | |||
dd0815095f | |||
48093823cb | |||
51cb5925c5 | |||
a36cacae79 | |||
1b5096d5a9 | |||
875eedbfb0 | |||
75cdda5f0a | |||
6363db89d0 | |||
573f57ac90 | |||
41cf066906 | |||
661c6e6f10 | |||
84dd2679a9 | |||
dc6406e5e8 | |||
deb77bd3df | |||
d5f96a887d | |||
68cd0cab8c | |||
9b3af1468d | |||
be0bc799f3 | |||
0d23cedab8 | |||
6bf5ec241d | |||
cdb5ea4200 | |||
bfedfa79ed | |||
911a8160ec | |||
8479cb4233 | |||
250887244e | |||
9b035e4038 | |||
ccc76f7498 | |||
f310a5960e | |||
b5c893916d | |||
132c61dfd4 | |||
5640cedc82 | |||
faac51fd2e | |||
214ae0ea4c | |||
dcdecfa9a8 | |||
4299ecf9be | |||
21e8ac1e02 | |||
01cf04c85f | |||
5c5cee9f39 | |||
2f336f15be | |||
e122b44269 | |||
9ce9561737 | |||
2545445ffb | |||
300f1b289a | |||
975845596d | |||
2cdbe9b2ef | |||
988afad2af | |||
1537aec1f9 | |||
7555a46e23 | |||
38d7acee4d | |||
10f48278c2 | |||
d4e6263453 | |||
86c46908d4 | |||
fa6cbb3ffe | |||
e20b92ba37 | |||
c7a9987067 | |||
1bdec3ed6a | |||
620cd5c148 | |||
76391f8999 | |||
02523debe5 | |||
70fd4300f4 | |||
3125376ec1 | |||
2cd5294394 | |||
3c548189b1 | |||
ae91f45b27 | |||
f74e0fd825 | |||
f1ea78ba09 | |||
87a2366eeb | |||
0f5da82cfd | |||
66f269c077 | |||
b613f90146 | |||
2fe6f350cb | |||
514ebf402a | |||
7c0667d215 | |||
f6bf8928f2 | |||
6debe9dfb9 | |||
0d52a27f41 | |||
697046c2b2 | |||
53a0b26348 | |||
8c00fced1c | |||
a50c1bb7bc | |||
f3c69e7f6b | |||
c9f5f3d802 | |||
a96976e88f | |||
ebfbc04000 | |||
e1af6e3c70 | |||
9e946c9715 | |||
0d97143965 | |||
df1d3fbd7b | |||
e946594bf8 | |||
abe4433202 | |||
c79bffaacb | |||
e58e5ec6a6 | |||
e688e02ee4 | |||
d7eaae6f22 | |||
1c3ee41902 | |||
f78bda9ff0 | |||
6454f76cf6 | |||
28ae22ecb9 | |||
c1135ee18f | |||
1114053daa | |||
95830ee584 | |||
661a57d9e2 | |||
660a091f41 | |||
7d31f7b540 | |||
ab4a23d0e0 | |||
a39f4e2301 | |||
8e2e9dcee6 | |||
9d5abfb3d9 | |||
fd7dd4d9fc | |||
01919fbaae | |||
80d4fc5e26 | |||
eda09e69ea | |||
0937062a64 | |||
6f073885b0 | |||
f03475cac8 | |||
848e53efd0 | |||
6bf8b1007c | |||
98ded949dd | |||
a5a1f4f52f | |||
8c1a041411 | |||
b1ba2d6f4e | |||
1714451a6d | |||
1f6fcb6cd3 | |||
60235b5aef | |||
d18c58816f | |||
222dde129d | |||
257e9646d0 | |||
a5e06ba629 | |||
9a6d298ca7 | |||
6ec621b72d | |||
07ebe9624f | |||
b4014e9a39 | |||
73e3f565e0 | |||
757d4c33df | |||
edd775eabc | |||
c613596658 | |||
f4655ea98a | |||
f6aa60c03c | |||
7fec1771fc | |||
c9b588b349 | |||
37f69eddc7 | |||
0fa72a8bc8 | |||
48b77459ef | |||
989bfd2e97 | |||
aeec66b657 | |||
e68490c5e4 | |||
95c5b1a7f6 | |||
8e201f713a | |||
ac34a1429b | |||
739e5a4f53 | |||
bf94932c7a | |||
6cb3b50a03 | |||
0e92332491 | |||
f5127f601d | |||
1b613c3ebf | |||
3f7e823b80 | |||
e9ead2bc09 | |||
b6b1aec22b | |||
1aff524b63 | |||
077809398c | |||
f9404d9e7c | |||
b766987b98 | |||
c62c5e2999 | |||
f2ae452f01 | |||
79903b1842 | |||
0051ddf0f3 | |||
3a8f74e392 | |||
8555016eec | |||
45e11915dc | |||
1a0e500eea | |||
35c1750fcc | |||
53f356427f | |||
d20b0f4b93 | |||
79d4b16f8a | |||
0fd9d086e4 | |||
4f9b16783b | |||
018a5168a5 | |||
cf86ed7b29 | |||
dbb150a9bd | |||
9e5377a2e3 | |||
0cdf5980e2 | |||
6ceb9034dc | |||
f9fb921f91 | |||
1b059e595f | |||
ff29cccb77 | |||
c7f9a95a3f | |||
06efc340b6 | |||
3fecab64b1 | |||
34e0d621fd | |||
cc2f175617 | |||
96baff3a85 | |||
090eac068a | |||
d09d8e0adf | |||
a57f3e7bbf | |||
197584d1af | |||
18c0ba5272 | |||
1bd4891c9a | |||
3a7bfc721e | |||
f74373f2dd | |||
2f35dbfd3b | |||
31df5139c5 | |||
7569a2e0d9 | |||
7dad3284e3 | |||
0cf09fc981 | |||
877b2285f9 | |||
0d4a0b6519 | |||
4feb9b1c72 | |||
cb6dea473f | |||
5ab809ddf9 | |||
fbff03b476 | |||
411524d341 | |||
0a0b4c1d8f | |||
5887ddfa3c | |||
d80ae6ba0d | |||
44cf981407 | |||
5fd39283ec | |||
1f2b39ad7d | |||
24e172d779 | |||
b68850215a | |||
9abf114fbb | |||
8d3365e4fc | |||
8cec8f5584 | |||
741a5dc5f7 | |||
de996c6d56 | |||
d750b1e10d | |||
d2c83ea81b | |||
bf031fc56b | |||
b1d45ee6d2 | |||
f26f036286 | |||
0ffdb48f62 | |||
cb6ad971c3 | |||
d70b1ff177 | |||
3aff79c251 | |||
d8665e639b | |||
c016e2c4ec | |||
452f121486 | |||
728db88280 | |||
9a807bd26a | |||
eccc41c5cf | |||
509352fc36 | |||
349935a434 | |||
6357d4a0d3 | |||
29786e856d | |||
bf6bedd714 | |||
f094bb54a7 | |||
4c12d742dc | |||
04a9f28c3d | |||
d9b9ed56b6 | |||
7c8a62d64d | |||
de651122a5 | |||
4a96ddfb54 | |||
8ced321bb6 | |||
2a0f497e94 | |||
392473ec79 | |||
345a3cd9aa | |||
bd37622050 | |||
48de6e87f0 | |||
3b551e0fcd | |||
be8fbac942 | |||
98a38ec98b | |||
4f055d4257 | |||
c59717571e | |||
f5b2ae616f | |||
1660b34e2d | |||
b40f6f3eae | |||
3327bd8eab | |||
ea9a381c8c | |||
b2437c4500 | |||
d6538eb2fd | |||
0926119977 | |||
39f2c9f46b | |||
60a8888b4f | |||
4537816c1d | |||
bf73fb7420 | |||
1ec092ba32 | |||
30d1f292c9 | |||
b70d20b510 | |||
066ec33342 | |||
5b80ab372d | |||
638ba4a2cf | |||
7ec8806dc5 | |||
7d6f4885b2 | |||
b1506a3271 | |||
b15a403c71 | |||
37c598db04 | |||
ad94e02981 | |||
00ffc03523 | |||
e53cf81689 | |||
089fcbf369 | |||
68ff2cc323 | |||
164d160b22 | |||
1353bf0277 | |||
6dc884f2ab | |||
05eabb19d6 | |||
f4916730b5 | |||
67012509a8 | |||
28a1caa0ed | |||
f015dbe1ba | |||
029a93963a | |||
20898f9f4f | |||
ef861958a9 | |||
16d7dde2ad | |||
1fd2cc6340 | |||
5ced8fbbd5 | |||
23152c37c8 | |||
4a2405929c | |||
eef4ca5dd3 | |||
321da5cc83 | |||
c2cf500da9 | |||
4c03208537 | |||
78b5bd5174 | |||
1195dabb84 | |||
2945f47977 | |||
a44b510087 | |||
572b54967c | |||
6f433887e0 | |||
537502d685 | |||
e5c3695dbd | |||
3cf318b498 | |||
54d4105264 | |||
dd59b1d371 | |||
124e49752f | |||
fc2dd5482e | |||
e4b81a6957 | |||
3efdd39a18 | |||
582ef2e7b4 | |||
214fef2ee4 | |||
531fcaa99a | |||
8a60239ae7 | |||
10705684c8 | |||
bdc6818716 | |||
5f95796b61 | |||
f2709ac3f9 | |||
cce9b9912f | |||
2ae26ce20b | |||
d47de60944 | |||
acfcf90528 | |||
c99d379cc8 | |||
0151ad432b | |||
1b0be8d656 | |||
47244ba2b8 | |||
0d66844ad6 | |||
b945bc3a9e | |||
4ae0ee86cb | |||
6c86ae710a | |||
f3ce8eeb83 | |||
876ceb3688 | |||
ee12c45473 | |||
1f4c380f58 | |||
b9f0720c95 | |||
71b8b355a6 |
@ -4,5 +4,4 @@ aio/content
|
||||
aio/node_modules
|
||||
aio/tools/examples/shared/node_modules
|
||||
integration/bazel
|
||||
integration/bazel-schematics/demo
|
||||
packages/bazel/node_modules
|
||||
|
9
.bazelrc
9
.bazelrc
@ -145,12 +145,3 @@ build:remote --remote_accept_cached=false
|
||||
# Load any settings specific to the current user. Needs to be last statement in this
|
||||
# config, as the user configuration should be able to overwrite flags from this file.
|
||||
try-import .bazelrc.user
|
||||
|
||||
###############################
|
||||
# NodeJS rules settings
|
||||
# These settings are required for rules_nodejs
|
||||
###############################
|
||||
|
||||
# Turn on managed directories feature in Bazel
|
||||
# This allows us to avoid installing a second copy of node_modules
|
||||
common --experimental_allow_incremental_repository_updates
|
||||
|
@ -1,42 +0,0 @@
|
||||
# Heavily based on https://github.com/StefanScherer/dockerfiles-windows/ images.
|
||||
# Combines the node windowsservercore image with the Bazel Prerequisites (https://docs.bazel.build/versions/master/install-windows.html).
|
||||
# msys install taken from https://github.com/StefanScherer/dockerfiles-windows/issues/30
|
||||
# VS redist install taken from https://github.com/StefanScherer/dockerfiles-windows/blob/master/apache/Dockerfile
|
||||
# The nanoserver image won't work because MSYS2 does not run in it https://github.com/Alexpux/MSYS2-packages/issues/1493
|
||||
|
||||
# Before building this image, you must locally build node-windows:10.13.0-windowsservercore-1803.
|
||||
# Clone https://github.com/StefanScherer/dockerfiles-windows/commit/4ce7101a766b9b880ac262479dd9126b64d656cf and build using
|
||||
# docker build -t node-windows:10.13.0-windowsservercore-1803 --build-arg core=microsoft/windowsservercore:1803 --build-arg target=microsoft/windowsservercore:1803 .
|
||||
FROM node-windows:10.13.0-windowsservercore-1803
|
||||
|
||||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
|
||||
|
||||
# Install 7zip to extract msys2
|
||||
RUN Invoke-WebRequest -UseBasicParsing 'https://www.7-zip.org/a/7z1805-x64.exe' -OutFile 7z.exe
|
||||
# For some reason the last letter in the destination directory is lost. So '/D=C:\\7zip0' will extract to '/D=C:\\7zip'.
|
||||
RUN Start-Process -FilePath 'C:\\7z.exe' -ArgumentList '/S', '/D=C:\\7zip0' -NoNewWindow -Wait
|
||||
|
||||
# Extract msys2
|
||||
RUN Invoke-WebRequest -UseBasicParsing 'http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20180531.tar.xz' -OutFile msys2.tar.xz
|
||||
RUN Start-Process -FilePath 'C:\\7zip\\7z' -ArgumentList 'e', 'msys2.tar.xz' -Wait
|
||||
RUN Start-Process -FilePath 'C:\\7zip\\7z' -ArgumentList 'x', 'msys2.tar', '-oC:\\' -Wait
|
||||
RUN Remove-Item msys2.tar.xz
|
||||
RUN Remove-Item msys2.tar
|
||||
RUN Remove-Item 7z.exe
|
||||
RUN Remove-Item -Recurse 7zip
|
||||
|
||||
# Add MSYS2 to PATH, and set BAZEL_SH
|
||||
RUN [Environment]::SetEnvironmentVariable('Path', $env:Path + ';C:\msys64\usr\bin', [System.EnvironmentVariableTarget]::Machine)
|
||||
RUN [Environment]::SetEnvironmentVariable('BAZEL_SH', 'C:\msys64\usr\bin\bash.exe', [System.EnvironmentVariableTarget]::Machine)
|
||||
|
||||
# Install Microsoft Visual C++ Redistributable for Visual Studio 2015
|
||||
RUN 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
|
||||
RUN Start-Process 'c:\\vc_redist.x64.exe' -ArgumentList '/Install', '/Passive', '/NoRestart' -NoNewWindow -Wait
|
||||
RUN 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,96 +0,0 @@
|
||||
# BuildKite configuration
|
||||
|
||||
This folder contains configuration for the [BuildKite](https://buildkite.com) based CI checks for
|
||||
this repository.
|
||||
|
||||
BuildKite is a CI provider that provides build coordination and reports while we provide the
|
||||
infrastructure.
|
||||
|
||||
CI runs are triggered by new PRs and will show up on the GitHub checks interface, along with the
|
||||
other current CI solutions.
|
||||
|
||||
Currently it is only used for tests on Windows platforms.
|
||||
|
||||
|
||||
## The build pipeline
|
||||
|
||||
BuildKite uses a pipeline for each repository. The `pipeline.yml` file defines pipeline
|
||||
[build steps](https://buildkite.com/docs/pipelines/defining-steps) for this repository.
|
||||
|
||||
Run results can be seen in the GitHub checks interface and in the
|
||||
[pipeline dashboard](https://buildkite.com/angular/angular).
|
||||
|
||||
Although most configuration is done via `pipeline.yml`, some options are only available
|
||||
in the online [pipeline settings](https://buildkite.com/angular/angular/settings).
|
||||
|
||||
|
||||
## Infrastructure
|
||||
|
||||
BuildKite does not provide the host machines where the builds runs, providing instead the
|
||||
[BuildKite Agent](https://buildkite.com/docs/agent/v3) that should be run our own infrastructure.
|
||||
|
||||
|
||||
### Agents
|
||||
|
||||
This agent polls the BuildKite API for builds, runs them, and reports back the results.
|
||||
Agents are the unit of concurrency: each agent can run one build at any given time.
|
||||
Adding agents allows more builds to be ran at the same time.
|
||||
|
||||
Individual agents can have tags, and pipeline steps can target only agents with certain tags via the
|
||||
`agents` field in `pipeline.yml`.
|
||||
For example: agents on Windows machines are tagged as `windows`, and the Windows specific build
|
||||
steps list `windows: true` in their `agents` field.
|
||||
|
||||
You can see the current agent pool, along with their tags, in the
|
||||
[agents list](https://buildkite.com/organizations/angular/agents).
|
||||
|
||||
|
||||
### Our host machines
|
||||
|
||||
We use [Google Cloud](https://cloud.google.com/) as our cloud provider, under the
|
||||
[Angular project](https://console.cloud.google.com/home/dashboard?project=internal-200822).
|
||||
To access this project you need need to be logged in with a Google account that's a member of
|
||||
team@angular.io.
|
||||
For googlers this may be your google.com account, for others it is an angular.io account.
|
||||
|
||||
In this project we have a number of Windows VMs running, each of them with several agents.
|
||||
The `provision-windows-buildkite.ps1` file contains instructions on how to create new host VMs that
|
||||
are fully configured to run the BuildKite agents as services.
|
||||
|
||||
Our pipeline uses [docker-buildkite-plugin](https://github.com/buildkite-plugins/docker-buildkite-plugin)
|
||||
to run build steps inside docker containers.
|
||||
This way we achieve isolation and hermeticity.
|
||||
|
||||
The `Dockerfile` file describes a custom Docker image that includes NodeJs, Yarn, and the Bazel
|
||||
pre-requisites on Windows.
|
||||
|
||||
To upload a new version of the docker image, follow any build instructions in `Dockerfile` and then
|
||||
run `docker build -t angular/node-bazel-windows:NEW_VERSION`, followed by
|
||||
`docker push angular/node-bazel-windows:NEW_VERSION`.
|
||||
After being pushed it should be available online, and you can use the new version in `pipeline.yml`.
|
||||
|
||||
|
||||
## Caretaker
|
||||
|
||||
BuildKite status can be found at https://www.buildkitestatus.com/.
|
||||
|
||||
Issues related to the BuildKite setup should be escalated to the Tools Team via the current
|
||||
caretaker, followed by Alex Eagle and Filipe Silva.
|
||||
|
||||
Support requests should be submitted via email to support@buildkite.com and cc Igor, Misko, Alex,
|
||||
Jeremy and Manu
|
||||
|
||||
|
||||
## Rollout strategy
|
||||
|
||||
At the moment our BuildKite CI uses 1 host VM running 4 agents, thus being capable of 4 concurrent
|
||||
builds.
|
||||
The only test running is `bazel test //tools/ts-api-guardian:all`, and the PR check is not
|
||||
mandatory.
|
||||
|
||||
In the future we should add cache support to speed up the initial `yarn` install, and also Bazel
|
||||
remote caching to speed up Bazel builds.
|
||||
|
||||
After the current setup is verified as stable and reliable the GitHub PR check can become mandatory.
|
||||
|
||||
The tests ran should also be expanded to cover most, if not all, of the Bazel tests.
|
@ -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."
|
@ -1,10 +0,0 @@
|
||||
steps:
|
||||
- label: windows-test
|
||||
commands:
|
||||
- "yarn install --frozen-lockfile --non-interactive --network-timeout 100000"
|
||||
- "yarn bazel test //tools/ts-api-guardian:all --noshow_progress"
|
||||
plugins:
|
||||
- docker#v2.1.0:
|
||||
image: "filipesilva/node-bazel-windows:0.0.2"
|
||||
agents:
|
||||
windows: true
|
@ -1,94 +0,0 @@
|
||||
# PowerShell script to provision a Windows Server with BuildKite
|
||||
# This script follows https://buildkite.com/docs/agent/v3/windows.
|
||||
|
||||
# Instructions
|
||||
|
||||
# VM creation:
|
||||
# In Google Cloud Platform, create a Compute Engine instance.
|
||||
# We recommend machine type n1-standard-16 (16 vCPUs, 60 GB memory).
|
||||
# Use a recent windows boot disk with container support such as
|
||||
# "Windows Server version 1803 Datacenter Core for Containers", and add a 128GB SSD disk.
|
||||
# Give it a name, then click "Create".
|
||||
|
||||
# VM setup:
|
||||
# In the Compute Engine menu, select "VM Instances". Click on the VM name you chose before.
|
||||
# Click "Set Windows Password" to choose a username and password.
|
||||
# Click RDP to open a remote desktop via browser, using the username and password.
|
||||
# In the Windows command prompt start an elevated powershell by inputing
|
||||
# "powershell -Command "Start-Process PowerShell -Verb RunAs" followed by Enter.
|
||||
# Download and execute this script from GitHub, passing the token (mandatory), tags (optional)
|
||||
# and number of agents (optional) as args:
|
||||
# ```
|
||||
# Invoke-WebRequest -Uri https://raw.githubusercontent.com/angular/angular/master/.buildkite/provision-windows-buildkite.ps1 -OutFile provision.ps1
|
||||
# .\provision.ps1 -token "MY_TOKEN" -tags "windows=true,another_tag=true" -agents 4
|
||||
# ```
|
||||
# The VM should restart and be fully configured.
|
||||
|
||||
# Creating extra VMs
|
||||
# You can create an image of the current VM by following the instructions below.
|
||||
# https://cloud.google.com/compute/docs/instances/windows/creating-windows-os-image
|
||||
# Then create a new VM and choose "Custom images".
|
||||
|
||||
|
||||
# Script proper.
|
||||
|
||||
# Get the token and tags from arguments.
|
||||
param (
|
||||
[Parameter(Mandatory=$true)][string]$token,
|
||||
[string]$tags = "",
|
||||
[Int]$agents = 1
|
||||
)
|
||||
|
||||
# Allow HTTPS
|
||||
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
|
||||
|
||||
# Helper to add to PATH.
|
||||
# Will take current PATH so avoid running it after anything to modifies only the powershell session path.
|
||||
function Add-Path ([string]$newPathItem) {
|
||||
$Env:Path+= ";" + $newPathItem + ";"
|
||||
[Environment]::SetEnvironmentVariable("Path",$env:Path, [System.EnvironmentVariableTarget]::Machine)
|
||||
}
|
||||
|
||||
# Install Git for Windows
|
||||
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
|
||||
.\git.exe /VERYSILENT /NORESTART /NOCANCEL /SP- /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS /COMPONENTS="icons,ext\reg\shellhere,assoc,assoc_sh" /DIR="C:\git"
|
||||
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
|
||||
|
||||
# Download NSSM (https://nssm.cc/) to run the BuildKite agent as a service.
|
||||
Write-Host "Downloading NSSM."
|
||||
Invoke-WebRequest -Uri https://nssm.cc/ci/nssm-2.24-101-g897c7ad.zip -OutFile nssm.zip
|
||||
Expand-Archive -Path nssm.zip -DestinationPath C:\nssm
|
||||
Add-Path "C:\nssm\nssm-2.24-101-g897c7ad\win64"
|
||||
Remove-Item nssm.zip
|
||||
|
||||
# Run the BuildKite agent install script
|
||||
Write-Host "Installing BuildKite agent."
|
||||
$env:buildkiteAgentToken = $token
|
||||
$env:buildkiteAgentTags = $tags
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force
|
||||
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/buildkite/agent/master/install.ps1'))
|
||||
|
||||
# Configure the BuildKite agent clone and timestamp behavior
|
||||
Add-Content C:\buildkite-agent\buildkite-agent.cfg "`ngit-clone-flags=--config core.autocrlf=input --config core.eol=lf --config core.longpaths=true --config core.symlinks=true`n"
|
||||
Add-Content C:\buildkite-agent\buildkite-agent.cfg "`ntimestamp-lines=true`n"
|
||||
|
||||
# Register the BuildKite agent service using NSSM, so that it persists through restarts and is
|
||||
# restarted if the process dies.
|
||||
for ($i=1; $i -le $agents; $i++)
|
||||
{
|
||||
$agentName = "buildkite-agent-$i"
|
||||
Write-Host "Registering $agentName as a service."
|
||||
nssm.exe install $agentName "C:\buildkite-agent\bin\buildkite-agent.exe" "start"
|
||||
nssm.exe set $agentName AppStdout "C:\buildkite-agent\$agentName.log"
|
||||
nssm.exe set $agentName AppStderr "C:\buildkite-agent\$agentName.log"
|
||||
nssm.exe status $agentName
|
||||
nssm.exe start $agentName
|
||||
nssm.exe status $agentName
|
||||
}
|
||||
|
||||
# Restart the machine.
|
||||
Restart-Computer
|
@ -364,7 +364,7 @@ jobs:
|
||||
# Run examples tests with ivy. The "CIRCLE_NODE_INDEX" will be set if "parallelism" is enabled.
|
||||
# Since the parallelism is set to "3", there will be three parallel CircleCI containers
|
||||
# with either "0", "1" or "2" as node index. This can be passed to the "--shard" argument.
|
||||
- run: yarn --cwd aio example-e2e --setup --local --ivy --shard=${CIRCLE_NODE_INDEX}/${CIRCLE_NODE_TOTAL}
|
||||
- run: yarn --cwd aio example-e2e --setup --local --ivy --cliSpecsConcurrency=5 --shard=${CIRCLE_NODE_INDEX}/${CIRCLE_NODE_TOTAL}
|
||||
|
||||
# This job should only be run on PR builds, where `CI_PULL_REQUEST` is not `false`.
|
||||
aio_preview:
|
||||
|
@ -1,3 +1,5 @@
|
||||
# escape=`
|
||||
|
||||
ARG core=mcr.microsoft.com/windows/servercore:1809
|
||||
ARG target=mcr.microsoft.com/powershell:windowsservercore-1809
|
||||
|
||||
@ -10,57 +12,57 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
|
||||
|
||||
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 ; \
|
||||
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 $_ ; \
|
||||
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 ; \
|
||||
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:\ ; \
|
||||
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' } ; \
|
||||
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; \
|
||||
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
|
||||
@ -74,30 +76,45 @@ 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" ]
|
||||
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
|
||||
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)
|
||||
|
||||
# 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
|
||||
# Install VS Build Tools
|
||||
RUN Invoke-WebRequest -UseBasicParsing https://download.visualstudio.microsoft.com/download/pr/df649173-11e9-4af2-8eb7-0eb02ba8958a/cadb5bdac41e55bb8f6a6b7c45273370/vs_buildtools.exe -OutFile vs_BuildTools.exe; `
|
||||
# Installer won't detect DOTNET_SKIP_FIRST_TIME_EXPERIENCE if ENV is used, must use setx /M
|
||||
setx /M DOTNET_SKIP_FIRST_TIME_EXPERIENCE 1; `
|
||||
Start-Process vs_BuildTools.exe `
|
||||
-ArgumentList `
|
||||
'--add', 'Microsoft.VisualStudio.Workload.VCTools', `
|
||||
'--add', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64', `
|
||||
'--add', 'Microsoft.Component.VC.Runtime.UCRTSDK', `
|
||||
'--add', 'Microsoft.VisualStudio.Component.Windows10SDK.17763', `
|
||||
'--quiet', '--norestart', '--nocache' `
|
||||
-NoNewWindow -Wait; `
|
||||
Remove-Item -Force vs_buildtools.exe; `
|
||||
Remove-Item -Force -Recurse \"${Env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\"; `
|
||||
Remove-Item -Force -Recurse ${Env:TEMP}\*; `
|
||||
Remove-Item -Force -Recurse \"${Env:ProgramData}\Package Cache\"; `
|
||||
[Environment]::SetEnvironmentVariable('BAZEL_VC', \"${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\BuildTools\VC\", [System.EnvironmentVariableTarget]::Machine)
|
||||
|
||||
CMD ["cmd.exe"]
|
||||
# Install Python
|
||||
RUN Invoke-WebRequest -UseBasicParsing https://www.python.org/ftp/python/3.5.1/python-3.5.1.exe -OutFile python-3.5.1.exe; `
|
||||
Start-Process python-3.5.1.exe -ArgumentList '/quiet InstallAllUsers=1 PrependPath=1' -Wait; `
|
||||
Remove-Item -Force python-3.5.1.exe
|
||||
|
||||
CMD ["cmd.exe"]
|
||||
|
@ -2,11 +2,17 @@
|
||||
# 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.
|
||||
# Save built files and 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
|
||||
# Setting the output_base to a Docker volume is currently broken because of a Docker bug on Windows:
|
||||
# https://github.com/moby/moby/issues/37024
|
||||
# This affects Bazel because bazel_output_base\external\bazel_tools is an absolute path junction.
|
||||
# When its fixed we can uncomment this line, and use a different output_base for Ivy tests (they
|
||||
# use a separate compiler and destructively replace the cache).
|
||||
# startup --output_base=C:/codefresh/volume/bazel_output_base
|
||||
|
||||
# Don't be spammy in the logs
|
||||
# TODO(gmagolan): Hide progress again once build performance improves
|
||||
@ -23,20 +29,10 @@ build --announce_rc
|
||||
# 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
|
||||
build --local_resources=10240,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
|
||||
|
@ -2,6 +2,7 @@ version: '1.0'
|
||||
|
||||
steps:
|
||||
BuildImage:
|
||||
title: Build Docker image
|
||||
type: build
|
||||
image_name: node-bazel-windows
|
||||
working_directory: ./.codefresh
|
||||
@ -12,7 +13,7 @@ steps:
|
||||
dockerfile: ./Dockerfile.win-1809
|
||||
|
||||
RunTests:
|
||||
title: Run Example
|
||||
title: Run Bazel tests
|
||||
image: ${{BuildImage}}
|
||||
commands:
|
||||
# Install dependencies
|
||||
@ -20,7 +21,8 @@ steps:
|
||||
# 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 //packages/compiler/test //packages/compiler-cli/test:ngc //packages/compiler-cli/test/ngtsc:ngtsc
|
||||
- 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/...
|
||||
- yarn bazel test //packages/compiler-cli/integrationtest:integrationtest //packages/compiler-cli/test/compliance:compliance
|
||||
# At the moment 'browser:chromium-local' are broken in CI while locally they work
|
||||
# VE
|
||||
- yarn bazel test --build_tag_filters=-ivy-only --test_tag_filters=-ivy-only,-browser:chromium-local //...
|
||||
# Ivy
|
||||
- yarn bazel test --define=compile=aot --build_tag_filters=-no-ivy-aot,-fixme-ivy-aot --test_tag_filters=-no-ivy-aot,-fixme-ivy-aot,-browser:chromium-local //...
|
||||
|
@ -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."
|
218
CHANGELOG.md
218
CHANGELOG.md
@ -1,14 +1,59 @@
|
||||
<a name="8.0.1"></a>
|
||||
## [8.0.1](https://github.com/angular/angular/compare/8.0.0...8.0.1) (2019-06-13)
|
||||
<a name="8.1.0-next.1"></a>
|
||||
# [8.1.0-next.1](https://github.com/angular/angular/compare/8.1.0-beta.0...8.1.0-next.1) (2019-06-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bazel:** do not modify tsconfig.json ([#30984](https://github.com/angular/angular/issues/30984)) ([49307f0](https://github.com/angular/angular/commit/49307f0))
|
||||
* **bazel:** Load global stylesheet in dev and prod ([#30879](https://github.com/angular/angular/issues/30879)) ([5a7bcd1](https://github.com/angular/angular/commit/5a7bcd1))
|
||||
* **common:** expose the `HttpUploadProgressEvent` interface as public API ([#30852](https://github.com/angular/angular/issues/30852)) ([4e8614b](https://github.com/angular/angular/commit/4e8614b)), closes [#30814](https://github.com/angular/angular/issues/30814)
|
||||
* **core:** TypeScript related migrations should cater for BOM ([#30719](https://github.com/angular/angular/issues/30719)) ([26e3615](https://github.com/angular/angular/commit/26e3615)), closes [/github.com/angular/angular-cli/blob/master/packages/angular_devkit/schematics/src/tree/recorder.ts#L72](https://github.com//github.com/angular/angular-cli/blob/master/packages/angular_devkit/schematics/src/tree/recorder.ts/issues/L72) [#30713](https://github.com/angular/angular/issues/30713)
|
||||
* **service-worker:** avoid uncaught rejection warning when registration fails ([#30876](https://github.com/angular/angular/issues/30876)) ([08c38a1](https://github.com/angular/angular/commit/08c38a1))
|
||||
* **core:** TypeScript related migrations should cater for BOM ([#30719](https://github.com/angular/angular/issues/30719)) ([80394ce](https://github.com/angular/angular/commit/80394ce)), closes [/github.com/angular/angular-cli/blob/master/packages/angular_devkit/schematics/src/tree/recorder.ts#L72](https://github.com//github.com/angular/angular-cli/blob/master/packages/angular_devkit/schematics/src/tree/recorder.ts/issues/L72) [#30713](https://github.com/angular/angular/issues/30713)
|
||||
|
||||
|
||||
|
||||
<a name="8.1.0-beta.0"></a>
|
||||
# [8.1.0-beta.0](https://github.com/angular/angular/compare/8.0.0...8.1.0-beta.0) (2019-05-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bazel:** allow ts_library interop with list-typed inputs ([#30600](https://github.com/angular/angular/issues/30600)) ([3125376](https://github.com/angular/angular/commit/3125376))
|
||||
* **bazel:** Bump ibazel to 0.10.1 for windows fixes ([#30196](https://github.com/angular/angular/issues/30196)) ([1353bf0](https://github.com/angular/angular/commit/1353bf0))
|
||||
* **bazel:** Directly spawn native Bazel binary ([#30306](https://github.com/angular/angular/issues/30306)) ([2a0f497](https://github.com/angular/angular/commit/2a0f497))
|
||||
* **bazel:** Disable sandbox on Mac OS ([#30460](https://github.com/angular/angular/issues/30460)) ([b6b1aec](https://github.com/angular/angular/commit/b6b1aec))
|
||||
* **bazel:** Exclude common/upgrade* in metadata.tsconfig.json ([#30133](https://github.com/angular/angular/issues/30133)) ([1f4c380](https://github.com/angular/angular/commit/1f4c380))
|
||||
* **bazel:** ng test should run specific ts_web_test_suite ([#30526](https://github.com/angular/angular/issues/30526)) ([e688e02](https://github.com/angular/angular/commit/e688e02))
|
||||
* **bazel:** pass correct arguments to http_server in Windows ([#30346](https://github.com/angular/angular/issues/30346)) ([3aff79c](https://github.com/angular/angular/commit/3aff79c)), closes [#29785](https://github.com/angular/angular/issues/29785)
|
||||
* **bazel:** update peerDep ranges ([#30155](https://github.com/angular/angular/issues/30155)) ([4ae0ee8](https://github.com/angular/angular/commit/4ae0ee8))
|
||||
* **bazel:** Use existing npm/yarn lock files ([#30438](https://github.com/angular/angular/issues/30438)) ([ff29ccc](https://github.com/angular/angular/commit/ff29ccc))
|
||||
* **compiler-cli:** log ngcc skipping messages as debug instead of info ([#30232](https://github.com/angular/angular/issues/30232)) ([60a8888](https://github.com/angular/angular/commit/60a8888))
|
||||
* **core:** consistently use ng:/// for sourcemap URLs ([#29826](https://github.com/angular/angular/issues/29826)) ([392473e](https://github.com/angular/angular/commit/392473e))
|
||||
* **core:** CSS sanitizer now allows parens in file names ([#30322](https://github.com/angular/angular/issues/30322)) ([728db88](https://github.com/angular/angular/commit/728db88))
|
||||
* **core:** fix interpolate identifier in AOT ([#30243](https://github.com/angular/angular/issues/30243)) ([30d1f29](https://github.com/angular/angular/commit/30d1f29))
|
||||
* **core:** migrations not always migrating all files ([#30269](https://github.com/angular/angular/issues/30269)) ([349935a](https://github.com/angular/angular/commit/349935a))
|
||||
* **core:** remove deprecated `TestBed.deprecatedOverrideProvider` API ([#30576](https://github.com/angular/angular/issues/30576)) ([a96976e](https://github.com/angular/angular/commit/a96976e))
|
||||
* **core:** require 'static' flag on queries in typings ([#30639](https://github.com/angular/angular/issues/30639)) ([84dd267](https://github.com/angular/angular/commit/84dd267))
|
||||
* **core:** static-query migration errors not printed properly ([#30458](https://github.com/angular/angular/issues/30458)) ([6ceb903](https://github.com/angular/angular/commit/6ceb903))
|
||||
* **core:** static-query migration fails with default parameter values ([#30269](https://github.com/angular/angular/issues/30269)) ([6357d4a](https://github.com/angular/angular/commit/6357d4a))
|
||||
* **core:** static-query migration should gracefully exit if AOT compiler throws ([#30269](https://github.com/angular/angular/issues/30269)) ([509352f](https://github.com/angular/angular/commit/509352f))
|
||||
* **core:** static-query migration should handle queries on accessors ([#30327](https://github.com/angular/angular/issues/30327)) ([0ffdb48](https://github.com/angular/angular/commit/0ffdb48))
|
||||
* **core:** static-query migration should not fallback to test strategy ([#30458](https://github.com/angular/angular/issues/30458)) ([0cdf598](https://github.com/angular/angular/commit/0cdf598))
|
||||
* **core:** static-query migration should not prompt if no queries are used ([#30254](https://github.com/angular/angular/issues/30254)) ([4c12d74](https://github.com/angular/angular/commit/4c12d74))
|
||||
* **core:** static-query usage migration strategy should detect ambiguous query usage ([#30215](https://github.com/angular/angular/issues/30215)) ([8d3365e](https://github.com/angular/angular/commit/8d3365e))
|
||||
* **core:** temporarily remove [@deprecated](https://github.com/deprecated) jsdoc tag for a TextBed.get overload ([#30514](https://github.com/angular/angular/issues/30514)) ([f6bf892](https://github.com/angular/angular/commit/f6bf892)), closes [#29290](https://github.com/angular/angular/issues/29290) [#29905](https://github.com/angular/angular/issues/29905)
|
||||
* **language-service:** Remove tsserverlibrary from rollup globals ([#30123](https://github.com/angular/angular/issues/30123)) ([124e497](https://github.com/angular/angular/commit/124e497))
|
||||
* **router:** ensure `history.state` is set in `eager` update mode ([#30154](https://github.com/angular/angular/issues/30154)) ([b40f6f3](https://github.com/angular/angular/commit/b40f6f3))
|
||||
* **router:** ensure navigations start with the current URL value incase redirect is skipped ([#30344](https://github.com/angular/angular/issues/30344)) ([0fd9d08](https://github.com/angular/angular/commit/0fd9d08)), closes [#30340](https://github.com/angular/angular/issues/30340) [#30160](https://github.com/angular/angular/issues/30160)
|
||||
* **router:** fix a problem with router not responding to back button ([#30160](https://github.com/angular/angular/issues/30160)) ([3327bd8](https://github.com/angular/angular/commit/3327bd8))
|
||||
* **router:** IE 11 bug can break URL unification when comparing objects ([#30393](https://github.com/angular/angular/issues/30393)) ([197584d](https://github.com/angular/angular/commit/197584d))
|
||||
* **router:** type cast correctly for IE 11 bug breaking URL Unification when comparing objects ([#30464](https://github.com/angular/angular/issues/30464)) ([53f3564](https://github.com/angular/angular/commit/53f3564))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **bazel:** use `rbe_autoconfig()` and new container. ([#29336](https://github.com/angular/angular/issues/29336)) ([9abf114](https://github.com/angular/angular/commit/9abf114))
|
||||
* **common:** add ability to watch for AngularJS URL updates through `onUrlChange` hook ([#30466](https://github.com/angular/angular/issues/30466)) ([1aff524](https://github.com/angular/angular/commit/1aff524))
|
||||
* **common:** stricter types for `SlicePipe` ([#30156](https://github.com/angular/angular/issues/30156)) ([95830ee](https://github.com/angular/angular/commit/95830ee))
|
||||
* **core:** deprecate integration with the Web Tracing Framework (WTF) ([#30642](https://github.com/angular/angular/issues/30642)) ([f310a59](https://github.com/angular/angular/commit/f310a59))
|
||||
* **language-service:** Implement `definitionAndBoundSpan` ([#30125](https://github.com/angular/angular/issues/30125)) ([f491673](https://github.com/angular/angular/commit/f491673))
|
||||
* **platform-webworker:** deprecate platform-webworker ([#30642](https://github.com/angular/angular/issues/30642)) ([ccc76f7](https://github.com/angular/angular/commit/ccc76f7))
|
||||
|
||||
|
||||
|
||||
@ -18,18 +63,18 @@
|
||||
|
||||
### 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))
|
||||
* add support for TypeScript 3.4 (and drop older versions) ([#29372](https://github.com/angular/angular/issues/29372)) ([ef85336](https://github.com/angular/angular/commit/ef85336))
|
||||
* **common:** add ability to watch for AngularJS URL updates through `onUrlChange` hook ([#30466](https://github.com/angular/angular/issues/30466)) ([8022d36](https://github.com/angular/angular/commit/8022d36))
|
||||
* **common:** stricter types for SlicePipe ([#30156](https://github.com/angular/angular/issues/30156)) ([722b2fa](https://github.com/angular/angular/commit/722b2fa))
|
||||
* **bazel:** use rbe_autoconfig() and new container. ([#29336](https://github.com/angular/angular/issues/29336)) ([e562acc](https://github.com/angular/angular/commit/e562acc))
|
||||
* **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:** stricter types for `SlicePipe` ([#30156](https://github.com/angular/angular/issues/30156)) ([722b2fa](https://github.com/angular/angular/commit/722b2fa))
|
||||
* **bazel:** use `rbe_autoconfig()` and new container ([#29336](https://github.com/angular/angular/issues/29336)) ([e562acc](https://github.com/angular/angular/commit/e562acc))
|
||||
* **common:** add @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:** 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))
|
||||
* 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))
|
||||
@ -38,28 +83,28 @@
|
||||
* **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)
|
||||
* **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))
|
||||
* **core:** add schematics to move deprecated `DOCUMENT` import ([#29950](https://github.com/angular/angular/issues/29950)) ([645e305](https://github.com/angular/angular/commit/645e305))
|
||||
* **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))
|
||||
* 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))
|
||||
* remove @angular/http dependency from @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:** 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))
|
||||
* **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)
|
||||
* **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))
|
||||
* **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))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bazel:** allow ts_library interop with list-typed inputs ([#30600](https://github.com/angular/angular/issues/30600)) ([bf38df4](https://github.com/angular/angular/commit/bf38df4))
|
||||
* **bazel:** allow `ts_library` interop with list-typed inputs ([#30600](https://github.com/angular/angular/issues/30600)) ([bf38df4](https://github.com/angular/angular/commit/bf38df4))
|
||||
* **bazel:** Disable sandbox on Mac OS ([#30460](https://github.com/angular/angular/issues/30460)) ([3de26a8](https://github.com/angular/angular/commit/3de26a8))
|
||||
* **bazel:** ng test should run specific ts_web_test_suite ([#30526](https://github.com/angular/angular/issues/30526)) ([8bc4da8](https://github.com/angular/angular/commit/8bc4da8))
|
||||
* **core:** remove deprecated `TestBed.deprecatedOverrideProvider` API ([#30576](https://github.com/angular/angular/issues/30576)) ([5a46f94](https://github.com/angular/angular/commit/5a46f94))
|
||||
* **core:** require 'static' flag on queries in typings ([#30641](https://github.com/angular/angular/issues/30641)) ([c8af830](https://github.com/angular/angular/commit/c8af830))
|
||||
* **core:** temporarily remove [@deprecated](https://github.com/deprecated) jsdoc tag for a TextBed.get overload ([#30514](https://github.com/angular/angular/issues/30514)) ([561e01d](https://github.com/angular/angular/commit/561e01d)), closes [#29290](https://github.com/angular/angular/issues/29290) [#29905](https://github.com/angular/angular/issues/29905)
|
||||
* **core:** temporarily remove [@deprecated](https://github.com/deprecated) jsdoc tag for a `TextBed.get` overload ([#30514](https://github.com/angular/angular/issues/30514)) ([561e01d](https://github.com/angular/angular/commit/561e01d)), closes [#29290](https://github.com/angular/angular/issues/29290) [#29905](https://github.com/angular/angular/issues/29905)
|
||||
* **router:** type cast correctly for IE 11 bug breaking URL Unification when comparing objects ([#30464](https://github.com/angular/angular/issues/30464)) ([32daa93](https://github.com/angular/angular/commit/32daa93))
|
||||
* **bazel:** Directly spawn native Bazel binary ([#30306](https://github.com/angular/angular/issues/30306)) ([d1fcc2b](https://github.com/angular/angular/commit/d1fcc2b))
|
||||
* **bazel:** pass correct arguments to http_server in Windows ([#30346](https://github.com/angular/angular/issues/30346)) ([71eba45](https://github.com/angular/angular/commit/71eba45)), closes [#29785](https://github.com/angular/angular/issues/29785)
|
||||
@ -75,7 +120,7 @@
|
||||
* **core:** static-query usage migration strategy should detect ambiguous query usage ([#30215](https://github.com/angular/angular/issues/30215)) ([e295c6a](https://github.com/angular/angular/commit/e295c6a))
|
||||
* **router:** ensure navigations start with the current URL value incase redirect is skipped ([#30344](https://github.com/angular/angular/issues/30344)) ([9b88920](https://github.com/angular/angular/commit/9b88920)), closes [#30340](https://github.com/angular/angular/issues/30340) [#30160](https://github.com/angular/angular/issues/30160)
|
||||
* **router:** IE 11 bug can break URL unification when comparing objects ([#30393](https://github.com/angular/angular/issues/30393)) ([c383491](https://github.com/angular/angular/commit/c383491))
|
||||
* **bazel:** Bump ibazel to 0.10.1 for windows fixes ([#30196](https://github.com/angular/angular/issues/30196)) ([9f68c35](https://github.com/angular/angular/commit/9f68c35))
|
||||
* **bazel:** Bump ibazel to 0.10.1 for Windows fixes ([#30196](https://github.com/angular/angular/issues/30196)) ([9f68c35](https://github.com/angular/angular/commit/9f68c35))
|
||||
* **compiler-cli:** log ngcc skipping messages as debug instead of info ([#30232](https://github.com/angular/angular/issues/30232)) ([548b003](https://github.com/angular/angular/commit/548b003))
|
||||
* **core:** fix interpolate identifier in AOT ([#30243](https://github.com/angular/angular/issues/30243)) ([3fe3a84](https://github.com/angular/angular/commit/3fe3a84))
|
||||
* **router:** ensure `history.state` is set in `eager` update mode ([#30154](https://github.com/angular/angular/issues/30154)) ([9720227](https://github.com/angular/angular/commit/9720227))
|
||||
@ -85,57 +130,54 @@
|
||||
* **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))
|
||||
* **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:** Make sure only single copy of @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))
|
||||
* **common:** add upgrade sub-package to `ng_package` rule for @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)
|
||||
* **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)
|
||||
* **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 receives 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 [#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))
|
||||
* **language-service:** Use proper types instead of any ([#29942](https://github.com/angular/angular/issues/29942)) ([1a56cd5](https://github.com/angular/angular/commit/1a56cd5))
|
||||
* **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)
|
||||
* **compiler-cli:** pass config path to `ts.parseJsonConfigFileContent` ([#29872](https://github.com/angular/angular/issues/29872)) ([86a3f90](https://github.com/angular/angular/commit/86a3f90))
|
||||
* **router:** support non-NgFactory promise in loadChildren typings ([#29832](https://github.com/angular/angular/issues/29832)) ([2bfb6a0](https://github.com/angular/angular/commit/2bfb6a0))
|
||||
* **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:** add `configuration_env_vars = ["compile"]` to generated `@npm//@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:** 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))
|
||||
* **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:** 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))
|
||||
* **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))
|
||||
* **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))
|
||||
* **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))
|
||||
* **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))
|
||||
* **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)
|
||||
* **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:** 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))
|
||||
* **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))
|
||||
* **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:** 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/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)
|
||||
* **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))
|
||||
* **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)
|
||||
* **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)
|
||||
* **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))
|
||||
@ -149,16 +191,16 @@
|
||||
|
||||
### 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
|
||||
* **bazel:** ng_module now depends on a minimum of build_bazel_rules_nodejs 0.27.12
|
||||
* **core:** In Angular version 8, it's required that all @ViewChild and @ContentChild
|
||||
queries have a 'static' flag specifying whether the query is 'static' or
|
||||
* **bazel:** @bazel/typescript is now a peerDependency of @angular/bazel so users of @angular/bazel must add @bazel/typescript to their package.json
|
||||
* **bazel:** `ng_module` now depends on a minimum of build_bazel_rules_nodejs 0.27.12
|
||||
* **core:** In Angular version 8, it's required that all `@ViewChild` and `@ContentChild`
|
||||
queries have a `'static'` flag specifying whether the query is 'static' or
|
||||
'dynamic'. The compiler previously sorted queries automatically, but in
|
||||
8.0 developers are required to explicitly specify which behavior is wanted.
|
||||
This is a temporary requirement as part of a migration; see
|
||||
https://v8.angular.io/guide/static-query-migration for more details.
|
||||
[static query migration guide](https://v8.angular.io/guide/static-query-migration) for more details.
|
||||
|
||||
@ViewChildren and @ContentChildren queries are always dynamic, and so are
|
||||
`@ViewChildren` and `@ContentChildren` queries are always dynamic, and so are
|
||||
unaffected.
|
||||
|
||||
* `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
|
||||
@ -192,8 +234,8 @@ https://v8.angular.io/guide/static-query-migration for more details.
|
||||
- `<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);
|
||||
This mechanism of automatic wrapping / auto-correcting was problematic for several reasons:
|
||||
- it is non-obvious and arbitrary (ex. there are more HTML elements that have rules for parent type);
|
||||
- it is incorrect for cases where `<tr>` / `<col>` are at the root of a component's content, ex.:
|
||||
|
||||
```html
|
||||
@ -205,10 +247,13 @@ https://v8.angular.io/guide/static-query-migration for more details.
|
||||
In the above example the `<projecting-tr-inside-tbody>` component could be "surprised" to see additional
|
||||
`<tbody>` elements inserted by Angular HTML parser.
|
||||
|
||||
* **http:** The deprecated @angular/http package has been removed, the @angular/common/http package should be used instead.
|
||||
For details on how to migrate, please refer to [the deprecations guide](https://angular.io/guide/deprecations#angularhttp).
|
||||
|
||||
|
||||
* TypeScript 3.1 and 3.2 are no longer supported.
|
||||
|
||||
Please update your TypeScript version to 3.3
|
||||
Please update your TypeScript version to 3.4, as version 3.3 is also not supported.
|
||||
|
||||
|
||||
<a name="8.0.0-rc.5"></a>
|
||||
@ -294,6 +339,17 @@ unaffected.
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="7.2.15"></a>
|
||||
## [7.2.15](https://github.com/angular/angular/compare/7.2.14...7.2.15) (2019-05-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **upgrade:** do not break if `onMicrotaskEmpty` emits while a `$digest` is in progress ([#29794](https://github.com/angular/angular/issues/29794)) ([#30107](https://github.com/angular/angular/issues/30107)) ([1084c19](https://github.com/angular/angular/commit/1084c19)), 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)
|
||||
|
||||
|
||||
|
||||
<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)
|
||||
|
||||
@ -323,9 +379,9 @@ unaffected.
|
||||
### 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:** Make sure only single copy of `@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:** add upgrade sub-package to ng_package rule for @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)
|
||||
@ -333,7 +389,7 @@ unaffected.
|
||||
|
||||
### 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 @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))
|
||||
@ -396,7 +452,7 @@ unaffected.
|
||||
|
||||
### 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:** add configuration_env_vars = ["compile"] to generated [@npm](https://github.com/npm)//@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)
|
||||
@ -471,7 +527,7 @@ let service = TestBed.get(SERVICE_TOKEN); // type Service
|
||||
|
||||
### 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))
|
||||
* remove @angular/http dependency from @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))
|
||||
@ -531,7 +587,7 @@ This release contains various API docs improvements.
|
||||
* **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:** Remove @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)
|
||||
@ -552,8 +608,8 @@ This release contains various API docs improvements.
|
||||
- `<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);
|
||||
This mechanism of automatic wrapping / auto-correcting was problematic for several reasons:
|
||||
- it is non-obvious and arbitrary (ex. there are more HTML elements that have rules for parent type);
|
||||
- it is incorrect for cases where `<tr>` / `<col>` are at the root of a component's content, ex.:
|
||||
|
||||
```html
|
||||
@ -954,7 +1010,7 @@ This release contains various API docs improvements.
|
||||
* **bazel:** unable to launch protractor test on windows ([#27850](https://github.com/angular/angular/issues/27850)) ([1e6c9be](https://github.com/angular/angular/commit/1e6c9be))
|
||||
* **bazel:** devserver entry_module should have underscore name ([#27719](https://github.com/angular/angular/issues/27719)) ([f57916c](https://github.com/angular/angular/commit/f57916c))
|
||||
* **bazel:** emit full node stack traces when Angular compilation crashes ([#27678](https://github.com/angular/angular/issues/27678)) ([522919a](https://github.com/angular/angular/commit/522919a))
|
||||
* **bazel:** fix major/minor semver check between [@angular](https://github.com/angular)/bazel npm packager version and angular bazel repo version ([#27635](https://github.com/angular/angular/issues/27635)) ([1cc08b4](https://github.com/angular/angular/commit/1cc08b4))
|
||||
* **bazel:** fix major/minor semver check between @angular/bazel npm packager version and angular bazel repo version ([#27635](https://github.com/angular/angular/issues/27635)) ([1cc08b4](https://github.com/angular/angular/commit/1cc08b4))
|
||||
* **bazel:** Load http_archive and rules_nodejs dependencies ([#27609](https://github.com/angular/angular/issues/27609)) ([8313ffc](https://github.com/angular/angular/commit/8313ffc))
|
||||
* **bazel:** ng_package writes unrelevant definitions to bazel out ([#27519](https://github.com/angular/angular/issues/27519)) ([44dfa60](https://github.com/angular/angular/commit/44dfa60)), closes [/github.com/angular/angular/blob/4f9374951d67c75f67a31c110bd61ab72563db7d/packages/bazel/src/ng_package/packager.ts#L105-L124](https://github.com//github.com/angular/angular/blob/4f9374951d67c75f67a31c110bd61ab72563db7d/packages/bazel/src/ng_package/packager.ts/issues/L105-L124)
|
||||
* **bazel:** Set module_name and enable ng test ([#27715](https://github.com/angular/angular/issues/27715)) ([85866de](https://github.com/angular/angular/commit/85866de))
|
||||
@ -974,7 +1030,7 @@ This release contains various API docs improvements.
|
||||
* **core:** export a value for InjectFlags ([#27279](https://github.com/angular/angular/issues/27279)) ([23b06af](https://github.com/angular/angular/commit/23b06af)), closes [#27251](https://github.com/angular/angular/issues/27251)
|
||||
* **core:** More precise return type for `InjectableDecorator` ([#27360](https://github.com/angular/angular/issues/27360)) ([4b9948c](https://github.com/angular/angular/commit/4b9948c)), closes [#26942](https://github.com/angular/angular/issues/26942)
|
||||
* **forms:** typed argument for FormBuilder group ([#26985](https://github.com/angular/angular/issues/26985)) ([b0c7561](https://github.com/angular/angular/commit/b0c7561))
|
||||
* **platform-server:** add [@angular](https://github.com/angular)/http to the list of peerDependencies ([#27307](https://github.com/angular/angular/issues/27307)) ([32c5be9](https://github.com/angular/angular/commit/32c5be9)), closes [#26154](https://github.com/angular/angular/issues/26154)
|
||||
* **platform-server:** add @angular/http to the list of peerDependencies ([#27307](https://github.com/angular/angular/issues/27307)) ([32c5be9](https://github.com/angular/angular/commit/32c5be9)), closes [#26154](https://github.com/angular/angular/issues/26154)
|
||||
* **router:** ensure URL is updated after second redirect with UrlUpdateStrategy="eager" ([#27523](https://github.com/angular/angular/issues/27523)) ([ad26cd6](https://github.com/angular/angular/commit/ad26cd6)), closes [#27116](https://github.com/angular/angular/issues/27116)
|
||||
* **router:** update URL after redirects when urlHandlingStrategy='eager' ([#27356](https://github.com/angular/angular/issues/27356)) ([11a8bd8](https://github.com/angular/angular/commit/11a8bd8)), closes [#27076](https://github.com/angular/angular/issues/27076)
|
||||
* **upgrade:** allow nesting components from different downgraded modules ([#27217](https://github.com/angular/angular/issues/27217)) ([bc0ee01](https://github.com/angular/angular/commit/bc0ee01))
|
||||
@ -994,7 +1050,7 @@ This release contains various API docs improvements.
|
||||
* **animations:** mark actual descendant node as disabled ([#26180](https://github.com/angular/angular/issues/26180)) ([453589f](https://github.com/angular/angular/commit/453589f))
|
||||
* **bazel:** devserver entry_module should have underscore name ([#27719](https://github.com/angular/angular/issues/27719)) ([b108e9a](https://github.com/angular/angular/commit/b108e9a))
|
||||
* **bazel:** emit full node stack traces when Angular compilation crashes ([#27678](https://github.com/angular/angular/issues/27678)) ([0d8528b](https://github.com/angular/angular/commit/0d8528b))
|
||||
* **bazel:** fix major/minor semver check between [@angular](https://github.com/angular)/bazel npm packager version and angular bazel repo version ([#27635](https://github.com/angular/angular/issues/27635)) ([3ed1e84](https://github.com/angular/angular/commit/3ed1e84))
|
||||
* **bazel:** fix major/minor semver check between @angular/bazel npm packager version and angular bazel repo version ([#27635](https://github.com/angular/angular/issues/27635)) ([3ed1e84](https://github.com/angular/angular/commit/3ed1e84))
|
||||
* **bazel:** Load http_archive and rules_nodejs dependencies ([#27609](https://github.com/angular/angular/issues/27609)) ([89ace1a](https://github.com/angular/angular/commit/89ace1a))
|
||||
* **bazel:** ng_package writes unrelevant definitions to bazel out ([#27519](https://github.com/angular/angular/issues/27519)) ([ef056c5](https://github.com/angular/angular/commit/ef056c5)), closes [/github.com/angular/angular/blob/4f9374951d67c75f67a31c110bd61ab72563db7d/packages/bazel/src/ng_package/packager.ts#L105-L124](https://github.com//github.com/angular/angular/blob/4f9374951d67c75f67a31c110bd61ab72563db7d/packages/bazel/src/ng_package/packager.ts/issues/L105-L124)
|
||||
* **bazel:** Read latest versions from latest-versions.ts & use semver check ([#27591](https://github.com/angular/angular/issues/27591)) ([93078e3](https://github.com/angular/angular/commit/93078e3))
|
||||
@ -1026,7 +1082,7 @@ This release contains various API docs improvements.
|
||||
* **bazel:** ng_package should correctly map to source maps in secondary entry-points ([#27313](https://github.com/angular/angular/issues/27313)) ([fc2c23e](https://github.com/angular/angular/commit/fc2c23e)), closes [#25510](https://github.com/angular/angular/issues/25510)
|
||||
* **compiler-cli:** flatModuleIndex files not generated on windows with multiple input files ([#27200](https://github.com/angular/angular/issues/27200)) ([8087b6b](https://github.com/angular/angular/commit/8087b6b))
|
||||
* **compiler-cli:** ngtsc shim files not being generated on case-insensitive platforms ([#27466](https://github.com/angular/angular/issues/27466)) ([84f2928](https://github.com/angular/angular/commit/84f2928)), closes [/github.com/Microsoft/TypeScript/blob/3e4c5c95abd515eb9713b881d27ab3a93cc00461/src/compiler/sys.ts#L681-L682](https://github.com//github.com/Microsoft/TypeScript/blob/3e4c5c95abd515eb9713b881d27ab3a93cc00461/src/compiler/sys.ts/issues/L681-L682)
|
||||
* **platform-server:** add [@angular](https://github.com/angular)/http to the list of peerDependencies ([#27307](https://github.com/angular/angular/issues/27307)) ([236ac06](https://github.com/angular/angular/commit/236ac06)), closes [#26154](https://github.com/angular/angular/issues/26154)
|
||||
* **platform-server:** add @angular/http to the list of peerDependencies ([#27307](https://github.com/angular/angular/issues/27307)) ([236ac06](https://github.com/angular/angular/commit/236ac06)), closes [#26154](https://github.com/angular/angular/issues/26154)
|
||||
|
||||
|
||||
|
||||
@ -1053,7 +1109,7 @@ This release contains various API docs improvements.
|
||||
* **compiler:** generate inputs with aliases properly ([#26774](https://github.com/angular/angular/issues/26774)) ([19fcfc3](https://github.com/angular/angular/commit/19fcfc3))
|
||||
* **compiler:** generate relative paths only in summary file errors ([#26759](https://github.com/angular/angular/issues/26759)) ([56f44be](https://github.com/angular/angular/commit/56f44be))
|
||||
* **core:** ignore comment nodes under unsafe elements ([#25879](https://github.com/angular/angular/issues/25879)) ([d5cbcef](https://github.com/angular/angular/commit/d5cbcef))
|
||||
* **core:** Remove static dependency from [@angular](https://github.com/angular)/core to [@angular](https://github.com/angular)/compiler ([#26734](https://github.com/angular/angular/issues/26734)) ([d042c4a](https://github.com/angular/angular/commit/d042c4a))
|
||||
* **core:** Remove static dependency from @angular/core to @angular/compiler ([#26734](https://github.com/angular/angular/issues/26734)) ([d042c4a](https://github.com/angular/angular/commit/d042c4a))
|
||||
* **core:** support computed base class in metadata inheritance ([#24014](https://github.com/angular/angular/issues/24014)) ([95743e3](https://github.com/angular/angular/commit/95743e3))
|
||||
* **bazel:** unknown replay compiler error in windows ([#26711](https://github.com/angular/angular/issues/26711)) ([aed95fd](https://github.com/angular/angular/commit/aed95fd))
|
||||
* **core:** ensure that `ɵdefineNgModule` is available in flat-file formats ([#26403](https://github.com/angular/angular/issues/26403)) ([a64859b](https://github.com/angular/angular/commit/a64859b))
|
||||
@ -1160,7 +1216,7 @@ This release contains various API docs improvements.
|
||||
* **compiler:** generate inputs with aliases properly ([#26774](https://github.com/angular/angular/issues/26774)) ([19fcfc3](https://github.com/angular/angular/commit/19fcfc3))
|
||||
* **compiler:** generate relative paths only in summary file errors ([#26759](https://github.com/angular/angular/issues/26759)) ([56f44be](https://github.com/angular/angular/commit/56f44be))
|
||||
* **core:** ignore comment nodes under unsafe elements ([#25879](https://github.com/angular/angular/issues/25879)) ([d5cbcef](https://github.com/angular/angular/commit/d5cbcef))
|
||||
* **core:** Remove static dependency from [@angular](https://github.com/angular)/core to [@angular](https://github.com/angular)/compiler ([#26734](https://github.com/angular/angular/issues/26734)) ([d042c4a](https://github.com/angular/angular/commit/d042c4a))
|
||||
* **core:** Remove static dependency from @angular/core to @angular/compiler ([#26734](https://github.com/angular/angular/issues/26734)) ([d042c4a](https://github.com/angular/angular/commit/d042c4a))
|
||||
* **core:** support computed base class in metadata inheritance ([#24014](https://github.com/angular/angular/issues/24014)) ([95743e3](https://github.com/angular/angular/commit/95743e3))
|
||||
|
||||
|
||||
@ -1172,7 +1228,7 @@ This release contains various API docs improvements.
|
||||
### Bug Fixes
|
||||
|
||||
* **compiler:** generate relative paths only in summary file errors ([#26759](https://github.com/angular/angular/issues/26759)) ([c01f340](https://github.com/angular/angular/commit/c01f340))
|
||||
* **core:** Remove static dependency from [@angular](https://github.com/angular)/core to [@angular](https://github.com/angular)/compiler ([#26734](https://github.com/angular/angular/issues/26734)) ([#26879](https://github.com/angular/angular/issues/26879)) ([257ac83](https://github.com/angular/angular/commit/257ac83))
|
||||
* **core:** Remove static dependency from @angular/core to @angular/compiler ([#26734](https://github.com/angular/angular/issues/26734)) ([#26879](https://github.com/angular/angular/issues/26879)) ([257ac83](https://github.com/angular/angular/commit/257ac83))
|
||||
* **core:** support computed base class in metadata inheritance ([#24014](https://github.com/angular/angular/issues/24014)) ([b3c6409](https://github.com/angular/angular/commit/b3c6409))
|
||||
|
||||
|
||||
@ -1249,7 +1305,7 @@ To learn about the release highlights and our new CLI-powered update workflow fo
|
||||
* **compiler:** update compiler to flatten nested template fns ([#24943](https://github.com/angular/angular/issues/24943)) ([fe14f18](https://github.com/angular/angular/commit/fe14f18))
|
||||
* **compiler:** update compiler to generate new slot allocations ([#25607](https://github.com/angular/angular/issues/25607)) ([27e2039](https://github.com/angular/angular/commit/27e2039))
|
||||
* **core:** In Testability.whenStable update callback, pass more complete ([#25010](https://github.com/angular/angular/issues/25010)) ([16c03c0](https://github.com/angular/angular/commit/16c03c0))
|
||||
* **core:** add missing `peerDependency ` to `[@angular](https://github.com/angular)/compiler` ([#26033](https://github.com/angular/angular/issues/26033)) ([549de1e](https://github.com/angular/angular/commit/549de1e)), closes [/github.com/angular/angular/commit/919f42fea1df4b9e38b7d688aef5f2de668e9d3e#diff-58563046c4439699f2e6a89187099a54](https://github.com//github.com/angular/angular/commit/919f42fea1df4b9e38b7d688aef5f2de668e9d3e/issues/diff-58563046c4439699f2e6a89187099a54)
|
||||
* **core:** add missing `peerDependency ` to `@angular/compiler` ([#26033](https://github.com/angular/angular/issues/26033)) ([549de1e](https://github.com/angular/angular/commit/549de1e)), closes [/github.com/angular/angular/commit/919f42fea1df4b9e38b7d688aef5f2de668e9d3e#diff-58563046c4439699f2e6a89187099a54](https://github.com//github.com/angular/angular/commit/919f42fea1df4b9e38b7d688aef5f2de668e9d3e/issues/diff-58563046c4439699f2e6a89187099a54)
|
||||
* **core:** allow null value for renderer setElement(…) ([#17065](https://github.com/angular/angular/issues/17065)) ([ff15043](https://github.com/angular/angular/commit/ff15043)), closes [#13686](https://github.com/angular/angular/issues/13686)
|
||||
* **core:** do not clear element content when using shadow dom ([#24861](https://github.com/angular/angular/issues/24861)) ([6e828bb](https://github.com/angular/angular/commit/6e828bb))
|
||||
* **core:** size regression with closure compiler ([#25531](https://github.com/angular/angular/issues/25531)) ([1f59f2f](https://github.com/angular/angular/commit/1f59f2f))
|
||||
@ -1695,7 +1751,7 @@ To learn about the release highlights and our new CLI-powered update workflow fo
|
||||
* **upgrade:** propagate return value of resumeBootstrap ([#22754](https://github.com/angular/angular/issues/22754)) ([a2330ff](https://github.com/angular/angular/commit/a2330ff)), closes [#22723](https://github.com/angular/angular/issues/22723)
|
||||
* **upgrade:** two-way binding and listening for event ([#22772](https://github.com/angular/angular/issues/22772)) ([2b3de63](https://github.com/angular/angular/commit/2b3de63)), closes [#22734](https://github.com/angular/angular/issues/22734)
|
||||
* **upgrade:** correctly destroy nested downgraded component ([#22400](https://github.com/angular/angular/issues/22400)) ([8a85888](https://github.com/angular/angular/commit/8a85888)), closes [#22392](https://github.com/angular/angular/issues/22392)
|
||||
* **upgrade:** correctly handle `=` bindings in `[@angular](https://github.com/angular)/upgrade` ([#22167](https://github.com/angular/angular/issues/22167)) ([f089bf5](https://github.com/angular/angular/commit/f089bf5))
|
||||
* **upgrade:** correctly handle `=` bindings in `@angular/upgrade` ([#22167](https://github.com/angular/angular/issues/22167)) ([f089bf5](https://github.com/angular/angular/commit/f089bf5))
|
||||
* **upgrade:** fix empty transclusion content with AngularJS@>=1.5.8 ([#22167](https://github.com/angular/angular/issues/22167)) ([13ab91e](https://github.com/angular/angular/commit/13ab91e)), closes [#22175](https://github.com/angular/angular/issues/22175)
|
||||
|
||||
|
||||
@ -1830,7 +1886,7 @@ To learn about the release highlights and our new CLI-powered update workflow fo
|
||||
* **router:** don't mutate route configs ([#22358](https://github.com/angular/angular/issues/22358)) ([8f0a064](https://github.com/angular/angular/commit/8f0a064)), closes [#22203](https://github.com/angular/angular/issues/22203)
|
||||
* **router:** fix URL serialization so special characters are only encoded where needed ([#22337](https://github.com/angular/angular/issues/22337)) ([789a47e](https://github.com/angular/angular/commit/789a47e)), closes [#10280](https://github.com/angular/angular/issues/10280)
|
||||
* **upgrade:** correctly destroy nested downgraded component ([#22400](https://github.com/angular/angular/issues/22400)) ([4aef9de](https://github.com/angular/angular/commit/4aef9de)), closes [#22392](https://github.com/angular/angular/issues/22392)
|
||||
* **upgrade:** correctly handle `=` bindings in `[@angular](https://github.com/angular)/upgrade` ([#22167](https://github.com/angular/angular/issues/22167)) ([6638390](https://github.com/angular/angular/commit/6638390))
|
||||
* **upgrade:** correctly handle `=` bindings in `@angular/upgrade` ([#22167](https://github.com/angular/angular/issues/22167)) ([6638390](https://github.com/angular/angular/commit/6638390))
|
||||
* **upgrade:** fix empty transclusion content with AngularJS@>=1.5.8 ([#22167](https://github.com/angular/angular/issues/22167)) ([a9a0e27](https://github.com/angular/angular/commit/a9a0e27)), closes [#22175](https://github.com/angular/angular/issues/22175)
|
||||
|
||||
|
||||
@ -1844,7 +1900,7 @@ To learn about the release highlights and our new CLI-powered update workflow fo
|
||||
* **platform-server:** generate correct stylings for camel case names ([#22263](https://github.com/angular/angular/issues/22263)) ([de02a7a](https://github.com/angular/angular/commit/de02a7a)), closes [#19235](https://github.com/angular/angular/issues/19235)
|
||||
* **router:** don't mutate route configs ([#22358](https://github.com/angular/angular/issues/22358)) ([8f0a064](https://github.com/angular/angular/commit/8f0a064)), closes [#22203](https://github.com/angular/angular/issues/22203)
|
||||
* **upgrade:** correctly destroy nested downgraded component ([#22400](https://github.com/angular/angular/issues/22400)) ([4aef9de](https://github.com/angular/angular/commit/4aef9de)), closes [#22392](https://github.com/angular/angular/issues/22392)
|
||||
* **upgrade:** correctly handle `=` bindings in `[@angular](https://github.com/angular)/upgrade` ([#22167](https://github.com/angular/angular/issues/22167)) ([6638390](https://github.com/angular/angular/commit/6638390))
|
||||
* **upgrade:** correctly handle `=` bindings in `@angular/upgrade` ([#22167](https://github.com/angular/angular/issues/22167)) ([6638390](https://github.com/angular/angular/commit/6638390))
|
||||
* **upgrade:** fix empty transclusion content with AngularJS@>=1.5.8 ([#22167](https://github.com/angular/angular/issues/22167)) ([a9a0e27](https://github.com/angular/angular/commit/a9a0e27)), closes [#22175](https://github.com/angular/angular/issues/22175)
|
||||
|
||||
|
||||
@ -2291,7 +2347,7 @@ Note: Due to an animation fix back in 5.1.1 ([c2b3792](https://github.com/angula
|
||||
* **platform-server:** provide a way to hook into renderModule* ([#19023](https://github.com/angular/angular/issues/19023)) ([8dfc3c3](https://github.com/angular/angular/commit/8dfc3c3))
|
||||
* **router:** add ActivationStart/End events ([8f79150](https://github.com/angular/angular/commit/8f79150))
|
||||
* **router:** add events tracking activation of individual routes ([49cd851](https://github.com/angular/angular/commit/49cd851))
|
||||
* **service-worker:** introduce the [@angular](https://github.com/angular)/service-worker package ([#19274](https://github.com/angular/angular/issues/19274)) ([d442b68](https://github.com/angular/angular/commit/d442b68))
|
||||
* **service-worker:** introduce the @angular/service-worker package ([#19274](https://github.com/angular/angular/issues/19274)) ([d442b68](https://github.com/angular/angular/commit/d442b68))
|
||||
* **upgrade:** propagate touched state of NgModelController ([59c23c7](https://github.com/angular/angular/commit/59c23c7))
|
||||
* **upgrade:** support lazy-loading Angular module into AngularJS app ([30e76fc](https://github.com/angular/angular/commit/30e76fc))
|
||||
* update angular to support TypeScript 2.4 ([ca5aeba](https://github.com/angular/angular/commit/ca5aeba))
|
||||
@ -2515,7 +2571,7 @@ Because of multiple bugs and browser inconsistencies, we have dropped the intl a
|
||||
### Bug Fixes
|
||||
|
||||
* **animations:** do not leak DOM nodes/styling for host triggered animations ([#18853](https://github.com/angular/angular/issues/18853)) ([1cc3fe2](https://github.com/angular/angular/commit/1cc3fe2)), closes [#18606](https://github.com/angular/angular/issues/18606)
|
||||
* **common:** fix improper packaging for [@angular](https://github.com/angular)/common/http ([#18613](https://github.com/angular/angular/issues/18613)) ([a203a95](https://github.com/angular/angular/commit/a203a95))
|
||||
* **common:** fix improper packaging for @angular/common/http ([#18613](https://github.com/angular/angular/issues/18613)) ([a203a95](https://github.com/angular/angular/commit/a203a95))
|
||||
* **common:** fix XSSI prefix stripping by using JSON.parse always ([#18466](https://github.com/angular/angular/issues/18466)) ([8821723](https://github.com/angular/angular/commit/8821723)), closes [#18396](https://github.com/angular/angular/issues/18396) [#18453](https://github.com/angular/angular/issues/18453)
|
||||
* **compiler:** normalize the locale name ([#18963](https://github.com/angular/angular/issues/18963)) ([497e017](https://github.com/angular/angular/commit/497e017))
|
||||
* **core:** complete EventEmitter in QueryList on component destroy ([#18902](https://github.com/angular/angular/issues/18902)) ([7d137d7](https://github.com/angular/angular/commit/7d137d7)), closes [#18741](https://github.com/angular/angular/issues/18741)
|
||||
@ -2856,7 +2912,7 @@ Note: the 4.4.0 release on npm accidentally glitched-out midway, so we cut 4.4.1
|
||||
* **compiler-cli:** allow '==' to compare nullable types ([#16731](https://github.com/angular/angular/issues/16731)) ([d761059](https://github.com/angular/angular/commit/d761059))
|
||||
* **core:** detach projected views when a parent view is destroyed ([#16592](https://github.com/angular/angular/issues/16592)) ([f0f6544](https://github.com/angular/angular/commit/f0f6544)), closes [#15578](https://github.com/angular/angular/issues/15578)
|
||||
* **core:** projected views should be dirty checked when the declaring component is dirty checked. ([#16592](https://github.com/angular/angular/issues/16592)) ([fcc91d8](https://github.com/angular/angular/commit/fcc91d8)), closes [#14321](https://github.com/angular/angular/issues/14321)
|
||||
* **http:** flatten metadata for [@angular](https://github.com/angular)/http/testing ([9da6340](https://github.com/angular/angular/commit/9da6340)), closes [#15521](https://github.com/angular/angular/issues/15521)
|
||||
* **http:** flatten metadata for @angular/http/testing ([9da6340](https://github.com/angular/angular/commit/9da6340)), closes [#15521](https://github.com/angular/angular/issues/15521)
|
||||
* **http:** honor RequestArgs.search and RequestArgs.params map type ([aef5245](https://github.com/angular/angular/commit/aef5245)), closes [#15761](https://github.com/angular/angular/issues/15761) [#16392](https://github.com/angular/angular/issues/16392)
|
||||
* **http:** introduce encodingHint for text() for better ArrayBuffer support ([7ae7a84](https://github.com/angular/angular/commit/7ae7a84)), closes [#15932](https://github.com/angular/angular/issues/15932) [#16420](https://github.com/angular/angular/issues/16420)
|
||||
* **router:** fix redirect to a URL with a param having multiple values ([#16376](https://github.com/angular/angular/issues/16376)) ([5d4b36f](https://github.com/angular/angular/commit/5d4b36f)), closes [#16310](https://github.com/angular/angular/issues/16310)
|
||||
@ -2912,7 +2968,7 @@ Note: the 4.4.0 release on npm accidentally glitched-out midway, so we cut 4.4.1
|
||||
* **compiler:** avoid a `...null` spread in extraction ([#16547](https://github.com/angular/angular/issues/16547)) ([d0e1688](https://github.com/angular/angular/commit/d0e1688))
|
||||
* **core:** detach projected views when a parent view is destroyed ([#16592](https://github.com/angular/angular/issues/16592)) ([ee6705a](https://github.com/angular/angular/commit/ee6705a)), closes [#15578](https://github.com/angular/angular/issues/15578)
|
||||
* **core:** projected views should be dirty checked when the declaring component is dirty checked. ([#16592](https://github.com/angular/angular/issues/16592)) ([9218812](https://github.com/angular/angular/commit/9218812)), closes [#14321](https://github.com/angular/angular/issues/14321)
|
||||
* **http:** flatten metadata for [@angular](https://github.com/angular)/http/testing ([9c70a3c](https://github.com/angular/angular/commit/9c70a3c)), closes [#15521](https://github.com/angular/angular/issues/15521)
|
||||
* **http:** flatten metadata for @angular/http/testing ([9c70a3c](https://github.com/angular/angular/commit/9c70a3c)), closes [#15521](https://github.com/angular/angular/issues/15521)
|
||||
* **http:** honor RequestArgs.search and RequestArgs.params map type ([63066f7](https://github.com/angular/angular/commit/63066f7)), closes [#15761](https://github.com/angular/angular/issues/15761) [#16392](https://github.com/angular/angular/issues/16392)
|
||||
* **http:** introduce encodingHint for text() for better ArrayBuffer support ([ec3b6e9](https://github.com/angular/angular/commit/ec3b6e9)), closes [#15932](https://github.com/angular/angular/issues/15932) [#16420](https://github.com/angular/angular/issues/16420)
|
||||
* **router:** fix redirect to a URL with a param having multiple values ([#16376](https://github.com/angular/angular/issues/16376)) ([915eae5](https://github.com/angular/angular/commit/915eae5)), closes [#16310](https://github.com/angular/angular/issues/16310)
|
||||
@ -3542,7 +3598,7 @@ Note: the 4.0.0-rc.0 release on npm accidentally omitted one bug fix, so we cut
|
||||
* **core:** add isStable Observable property to ApplicationRef to indicate when it's stable and unstable ([#14337](https://github.com/angular/angular/issues/14337)) ([c481798](https://github.com/angular/angular/commit/c481798))
|
||||
* **platform-server:** add API to render Module and ModuleFactory to string ([#14381](https://github.com/angular/angular/issues/14381)) ([b4d444a](https://github.com/angular/angular/commit/b4d444a))
|
||||
* **platform-server:** Implement PlatformLocation for platformServer() ([#14405](https://github.com/angular/angular/issues/14405)) ([9e28568](https://github.com/angular/angular/commit/9e28568))
|
||||
* **platform-server:** support [@angular](https://github.com/angular)/http from [@angular](https://github.com/angular)/platform-server ([9559d3e](https://github.com/angular/angular/commit/9559d3e))
|
||||
* **platform-server:** support @angular/http from @angular/platform-server ([9559d3e](https://github.com/angular/angular/commit/9559d3e))
|
||||
* **tsc-wrapped:** add an option to `ngc` to bundle metadata ([#14509](https://github.com/angular/angular/issues/14509)) ([3b89670](https://github.com/angular/angular/commit/3b89670))
|
||||
|
||||
|
||||
@ -4503,7 +4559,7 @@ Note: The 2.2.0-beta.0 release also contains all the changes present in the 2.1.
|
||||
* **compiler:** properly shim `:host:before` and `:host(:before)` ([#12171](https://github.com/angular/angular/issues/12171)) ([aa92512](https://github.com/angular/angular/commit/aa92512)), closes [#12165](https://github.com/angular/angular/issues/12165)
|
||||
* **compiler:** validate `@HostBinding` name ([#12139](https://github.com/angular/angular/issues/12139)) ([13ecc14](https://github.com/angular/angular/commit/13ecc14))
|
||||
* **compiler-cli:** don't clone static symbols when simplifying annotation metadata ([#12158](https://github.com/angular/angular/issues/12158)) ([8c477b2](https://github.com/angular/angular/commit/8c477b2))
|
||||
* **compiler-cli:** remove peerDependency on [@angular](https://github.com/angular)/platform-server ([#12122](https://github.com/angular/angular/issues/12122)) ([71b7654](https://github.com/angular/angular/commit/71b7654))
|
||||
* **compiler-cli:** remove peerDependency on @angular/platform-server ([#12122](https://github.com/angular/angular/issues/12122)) ([71b7654](https://github.com/angular/angular/commit/71b7654))
|
||||
* **compiler-cli:** remove unused parse5 dependency from package.json ([eaaec69](https://github.com/angular/angular/commit/eaaec69))
|
||||
* **forms:** allow optional fields with pattern and minlength validators ([#12147](https://github.com/angular/angular/issues/12147)) ([d22eeb7](https://github.com/angular/angular/commit/d22eeb7))
|
||||
* **forms:** properly validate blank strings with minlength ([#12091](https://github.com/angular/angular/issues/12091)) ([f50c1da](https://github.com/angular/angular/commit/f50c1da))
|
||||
|
27
WORKSPACE
27
WORKSPACE
@ -1,7 +1,4 @@
|
||||
workspace(
|
||||
name = "angular",
|
||||
managed_directories = {"@npm": ["node_modules"]},
|
||||
)
|
||||
workspace(name = "angular")
|
||||
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
@ -18,15 +15,16 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
# Fetch rules_nodejs so we can install our npm dependencies
|
||||
http_archive(
|
||||
name = "build_bazel_rules_nodejs",
|
||||
sha256 = "e04a82a72146bfbca2d0575947daa60fda1878c8d3a3afe868a8ec39a6b968bb",
|
||||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.31.1/rules_nodejs-0.31.1.tar.gz"],
|
||||
sha256 = "395b7568f20822c13fc5abc65b1eced637446389181fda3a108fdd6ff2cac1e9",
|
||||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.29.2/rules_nodejs-0.29.2.tar.gz"],
|
||||
)
|
||||
|
||||
# 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")
|
||||
|
||||
# Bazel version must be at least the following version because:
|
||||
# - 0.26.0 managed_directories feature added which is required for nodejs rules 0.30.0
|
||||
# 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`
|
||||
# (see https://github.com/angular/angular/issues/27514#issuecomment-451438271)
|
||||
check_bazel_version(
|
||||
message = """
|
||||
You no longer need to install Bazel on your machine.
|
||||
@ -35,23 +33,22 @@ Try running `yarn bazel` instead.
|
||||
(If you did run that, check that you've got a fresh `yarn install`)
|
||||
|
||||
""",
|
||||
minimum_bazel_version = "0.26.0",
|
||||
minimum_bazel_version = "0.21.0",
|
||||
)
|
||||
|
||||
# The NodeJS rules version must be at least the following version because:
|
||||
# The NodeJS rules version must be at least v0.15.3 because:
|
||||
# - 0.15.2 Re-introduced the prod_only attribute on yarn_install
|
||||
# - 0.15.3 Includes a fix for the `jasmine_node_test` rule ignoring target tags
|
||||
# - 0.16.8 Supports npm installed bazel workspaces
|
||||
# - 0.26.0 Fix for data files in yarn_install and npm_install
|
||||
# - 0.27.12 Adds NodeModuleSources provider for transtive npm deps support
|
||||
# - 0.30.0 yarn_install now uses symlinked node_modules with new managed directories Bazel 0.26.0 feature
|
||||
# - 0.31.1 entry_point attribute of nodejs_binary & rollup_bundle is now a label
|
||||
check_rules_nodejs_version("0.31.1")
|
||||
check_rules_nodejs_version("0.27.12")
|
||||
|
||||
# Setup the Node.js toolchain
|
||||
node_repositories(
|
||||
node_version = "10.9.0",
|
||||
package_json = ["//:package.json"],
|
||||
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)
|
||||
@ -74,10 +71,6 @@ yarn_install(
|
||||
package_json = "//:package.json",
|
||||
# Don't install devDependencies, they are large and not used under Bazel
|
||||
prod_only = True,
|
||||
# Temporarily disable node_modules symlinking until the fix for
|
||||
# https://github.com/bazelbuild/bazel/issues/8487 makes it into a
|
||||
# future Bazel release
|
||||
symlink_node_modules = False,
|
||||
yarn_lock = "//:yarn.lock",
|
||||
)
|
||||
|
||||
|
@ -36,14 +36,14 @@ export class AdBannerComponent implements OnInit, OnDestroy {
|
||||
|
||||
loadComponent() {
|
||||
this.currentAdIndex = (this.currentAdIndex + 1) % this.ads.length;
|
||||
const adItem = this.ads[this.currentAdIndex];
|
||||
let adItem = this.ads[this.currentAdIndex];
|
||||
|
||||
const componentFactory = this.componentFactoryResolver.resolveComponentFactory(adItem.component);
|
||||
let componentFactory = this.componentFactoryResolver.resolveComponentFactory(adItem.component);
|
||||
|
||||
const viewContainerRef = this.adHost.viewContainerRef;
|
||||
let viewContainerRef = this.adHost.viewContainerRef;
|
||||
viewContainerRef.clear();
|
||||
|
||||
const componentRef = viewContainerRef.createComponent(componentFactory);
|
||||
let componentRef = viewContainerRef.createComponent(componentFactory);
|
||||
(<AdComponent>componentRef.instance).data = adItem.data;
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
# Building with Bazel
|
||||
|
||||
This guide explains how to build and test Angular apps with Bazel.
|
||||
This guide explains how to build and test Angular apps with Bazel.
|
||||
|
||||
|
||||
<div class="alert is-helpful">
|
||||
|
||||
This guide assumes you are already familiar with developing and building Angular applications using the [CLI](cli).
|
||||
This guide assumes you are already familiar with developing and building Angular applications using the [CLI](cli).
|
||||
|
||||
It describes features which are part of Angular Labs, and are not considered a stable, supported API.
|
||||
|
||||
@ -33,7 +33,7 @@ then create the new application with
|
||||
ng new --collection=@angular/bazel
|
||||
```
|
||||
|
||||
Now when you use Angular CLI build commands such as `ng build` and `ng serve`,
|
||||
Now when you use Angular CLI build commands such as `ng build` and `ng serve`,
|
||||
Bazel is used behind the scenes.
|
||||
Outputs from Bazel appear in the `dist/bin` folder.
|
||||
|
||||
@ -45,6 +45,7 @@ Outputs from Bazel appear in the `dist/bin` folder.
|
||||
If you need to opt-out from using Bazel, you can restore the backup files:
|
||||
|
||||
- `/angular.json.bak` replaces `/angular.json`
|
||||
- `/tsconfig.json.bak` replaces `/tsconfig.json`
|
||||
|
||||
## Advanced configuration
|
||||
|
||||
@ -62,7 +63,7 @@ You can manually adjust the Bazel configuration to:
|
||||
* customize the build steps
|
||||
* parallellize the build for scale and incrementality
|
||||
|
||||
Create the initial Bazel configuration files by running the following command:
|
||||
Create the initial Bazel configuration files by running the following command:
|
||||
|
||||
```sh
|
||||
ng build --leaveBazelFilesOnDisk
|
||||
@ -119,4 +120,4 @@ Rules are used in `BUILD.bazel` files, which are markers for the packages in you
|
||||
|
||||
In the `BUILD.bazel` file, each rule must first be imported, using the `load` statement. Then the rule is called with some attributes, and the result of calling the rule is that you've declared to Bazel how it can derive some outputs given some inputs and dependencies. Then later, when you run a `bazel` command line, Bazel loads all the rules you've declared to determine an absolute ordering of what needs to be run. Note that only the rules needed to produce the requested output will actually be executed.
|
||||
|
||||
A list of common rules for frontend development is documented in the README at https://github.com/bazelbuild/rules_nodejs/.
|
||||
A list of common rules for frontend development is documented in the README at https://github.com/bazelbuild/rules_nodejs/.
|
||||
|
@ -622,19 +622,6 @@ A class which is preceded by the `@Pipe{}` decorator and which defines a functio
|
||||
|
||||
To learn more, see [Pipes](guide/pipes).
|
||||
|
||||
{@a platform}
|
||||
|
||||
## platform
|
||||
|
||||
In Angular terminology, a platform is the context in which an Angular application runs.
|
||||
The most common platform for Angular applications is a web browser, but it can also be an operating system for a mobile device, or a web server.
|
||||
|
||||
Support for the various Angular run-time platforms is provided by the `@angular/platform-*` packages. These packages allow applications that make use of `@angular/core` and `@angular/common` to execute in different environments by providing implementation for gathering user input and rendering UIs for the given platform. Isolating platform-specific functionality allows the developer to make platform-independent use of the rest of the framework.
|
||||
|
||||
* When running in a web browser, [`BrowserModule`](api/platform-browser/BrowserModule) is imported from the `platform-browser` package, and supports services that simplify security and event processing, and allows applications to access browser-specific features, such as interpreting keyboard input and controlling the title of the document being displayed. All applications running in the browser use the same platform service.
|
||||
|
||||
* When [server-side rendering](#server-side-rendering) (SSR) is used, the [`platform-server`](api/platform-server) package provides web server implementations of the `DOM`, `XMLHttpRequest`, and other low-level features that don't rely on a browser.
|
||||
|
||||
{@a polyfill}
|
||||
|
||||
## polyfill
|
||||
|
@ -548,7 +548,7 @@ It displays the same hero data in JSON format by chaining through to the built-i
|
||||
|
||||
|
||||
The [JsonPipe](api/common/JsonPipe)
|
||||
provides an easy way to diagnose a mysteriously failing data binding or
|
||||
provides an easy way to diagnosis a mysteriously failing data binding or
|
||||
inspect an object for future binding.
|
||||
|
||||
|
||||
|
@ -28,11 +28,6 @@
|
||||
"rev": true,
|
||||
"title": "Angular Subreddit",
|
||||
"url": "https://www.reddit.com/r/Angular2/"
|
||||
},
|
||||
"angular-devto" : {
|
||||
"url": "https://dev.to/t/angular",
|
||||
"rev": true,
|
||||
"title": "Read and share content and chat about Angular on DEV Community."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -26,7 +26,7 @@ StackBlitz projects are public by default, allowing you to share your Angular ap
|
||||
|
||||
To build your application locally or for production, you will need to download the source code from your StackBlitz project. Click the `Download Project` icon in the left menu across from `Project` to download your files.
|
||||
|
||||
Once you have the source code downloaded and unzipped, use the [Angular Console](https://angularconsole.com "Angular Console web site") to serve the application, or you install `Node.js` and have the Angular CLI installed.
|
||||
Once you have the source code downloaded and unzipped, use the [Angular Console](https://angularconsole.com "Angular Console web site") to serve the application, or you install Node and have the Angular CLI installed.
|
||||
|
||||
From the terminal, install the Angular CLI globally with:
|
||||
|
||||
@ -52,7 +52,7 @@ This will produce the files that you need to deploy.
|
||||
|
||||
#### Hosting the built project
|
||||
|
||||
The files in the `dist/my-project-name` folder are static and can be hosted on any web server capable of serving files (`Node.js`, Java, .NET) or any backend (Firebase, Google Cloud, App Engine, others).
|
||||
The files in the `dist/my-project-name` folder are static and can be hosted on any web server capable of serving files (Node, Java, .NET) or any backend (Firebase, Google Cloud, App Engine, others).
|
||||
|
||||
### Hosting an Angular app on Firebase
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
"build-local": "yarn ~~build",
|
||||
"prebuild-with-ivy": "yarn setup-local && node scripts/switch-to-ivy",
|
||||
"build-with-ivy": "yarn ~~build",
|
||||
"extract-cli-command-docs": "node tools/transforms/cli-docs-package/extract-cli-commands.js 7da10691d",
|
||||
"extract-cli-command-docs": "node tools/transforms/cli-docs-package/extract-cli-commands.js 2bbd7f288",
|
||||
"lint": "yarn check-env && yarn docs-lint && ng lint && yarn example-lint && yarn tools-lint",
|
||||
"test": "yarn check-env && ng test",
|
||||
"pree2e": "yarn check-env && yarn update-webdriver",
|
||||
@ -76,28 +76,28 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^8.1.0-next.1",
|
||||
"@angular/cdk": "8.0.0",
|
||||
"@angular/common": "^8.1.0-next.1",
|
||||
"@angular/core": "^8.1.0-next.1",
|
||||
"@angular/elements": "^8.1.0-next.1",
|
||||
"@angular/forms": "^8.1.0-next.1",
|
||||
"@angular/material": "8.0.0",
|
||||
"@angular/platform-browser": "^8.1.0-next.1",
|
||||
"@angular/platform-browser-dynamic": "^8.1.0-next.1",
|
||||
"@angular/router": "^8.1.0-next.1",
|
||||
"@angular/service-worker": "^8.1.0-next.1",
|
||||
"@angular/animations": "^8.0.0-rc.2",
|
||||
"@angular/cdk": "8.0.0-rc.0",
|
||||
"@angular/common": "^8.0.0-rc.2",
|
||||
"@angular/core": "^8.0.0-rc.2",
|
||||
"@angular/elements": "^8.0.0-rc.2",
|
||||
"@angular/forms": "^8.0.0-rc.2",
|
||||
"@angular/material": "8.0.0-rc.0",
|
||||
"@angular/platform-browser": "^8.0.0-rc.2",
|
||||
"@angular/platform-browser-dynamic": "^8.0.0-rc.2",
|
||||
"@angular/router": "^8.0.0-rc.2",
|
||||
"@angular/service-worker": "^8.0.0-rc.2",
|
||||
"@types/lunr": "^2.3.2",
|
||||
"@webcomponents/custom-elements": "^1.2.0",
|
||||
"rxjs": "^6.5.2",
|
||||
"rxjs": "^6.5.1",
|
||||
"zone.js": "^0.9.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "0.800.2",
|
||||
"@angular/cli": "8.0.2",
|
||||
"@angular/compiler": "^8.1.0-next.1",
|
||||
"@angular/compiler-cli": "^8.1.0-next.1",
|
||||
"@angular/language-service": "^8.1.0-next.1",
|
||||
"@angular-devkit/build-angular": "0.800.0-rc.2",
|
||||
"@angular/cli": "8.0.0-rc.2",
|
||||
"@angular/compiler": "^8.0.0-rc.2",
|
||||
"@angular/compiler-cli": "^8.0.0-rc.2",
|
||||
"@angular/language-service": "^8.0.0-rc.2",
|
||||
"@types/jasmine": "^2.5.52",
|
||||
"@types/jasminewd2": "^2.0.4",
|
||||
"@types/node": "~6.0.60",
|
||||
@ -167,4 +167,4 @@
|
||||
"xregexp": "^4.0.0",
|
||||
"yargs": "^7.0.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,12 +2,12 @@
|
||||
"aio": {
|
||||
"master": {
|
||||
"uncompressed": {
|
||||
"runtime-es5": 3005,
|
||||
"runtime-es2015": 3011,
|
||||
"main-es5": 511054,
|
||||
"main-es2015": 450560,
|
||||
"polyfills-es5": 129161,
|
||||
"polyfills-es2015": 53295
|
||||
"runtime-es5": 2516,
|
||||
"runtime-es2015": 2522,
|
||||
"main-es5": 504760,
|
||||
"main-es2015": 443497,
|
||||
"polyfills-es5": 128751,
|
||||
"polyfills-es2015": 53147
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,8 @@ const ROOT_DIR = resolve(__dirname, '..');
|
||||
const NG_JSON = join(ROOT_DIR, 'angular.json');
|
||||
const NG_COMPILER_OPTS = {
|
||||
angularCompilerOptions: {
|
||||
// Related Jira issue: FW-737
|
||||
allowEmptyCodegenFiles: true,
|
||||
enableIvy: true,
|
||||
},
|
||||
};
|
||||
|
@ -7,12 +7,11 @@ import { MatProgressBar } from '@angular/material/progress-bar';
|
||||
import { MatSidenav } from '@angular/material/sidenav';
|
||||
import { By } from '@angular/platform-browser';
|
||||
|
||||
import { Subject, of, timer } from 'rxjs';
|
||||
import { of, timer } from 'rxjs';
|
||||
import { first, mapTo } from 'rxjs/operators';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { AppModule } from './app.module';
|
||||
import { CurrentNodes } from 'app/navigation/navigation.model';
|
||||
import { DocumentService } from 'app/documents/document.service';
|
||||
import { DocViewerComponent } from 'app/layout/doc-viewer/doc-viewer.component';
|
||||
import { Deployment } from 'app/shared/deployment.service';
|
||||
@ -23,7 +22,7 @@ import { Logger } from 'app/shared/logger.service';
|
||||
import { MockLocationService } from 'testing/location.service';
|
||||
import { MockLogger } from 'testing/logger.service';
|
||||
import { MockSearchService } from 'testing/search.service';
|
||||
import { NavigationNode, NavigationService } from 'app/navigation/navigation.service';
|
||||
import { NavigationNode } from 'app/navigation/navigation.service';
|
||||
import { ScrollService } from 'app/shared/scroll.service';
|
||||
import { SearchBoxComponent } from 'app/search/search-box/search-box.component';
|
||||
import { SearchResultsComponent } from 'app/shared/search-results/search-results.component';
|
||||
@ -810,43 +809,106 @@ describe('AppComponent', () => {
|
||||
});
|
||||
|
||||
describe('archive redirection', () => {
|
||||
const redirectionPerMode: {[mode: string]: boolean} = {
|
||||
archive: true,
|
||||
next: false,
|
||||
stable: false,
|
||||
};
|
||||
it('should redirect to `docs` if deployment mode is `archive` and not at a docs page', () => {
|
||||
createTestingModule('', 'archive');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).toHaveBeenCalledWith('docs');
|
||||
|
||||
Object.keys(redirectionPerMode).forEach(mode => {
|
||||
const doRedirect = redirectionPerMode[mode];
|
||||
const description =
|
||||
`should ${doRedirect ? '' : 'not '}redirect to 'docs' if deployment mode is '${mode}' ` +
|
||||
'and at a marketing page';
|
||||
const verifyNoRedirection = () => expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
const verifyRedirection = () => expect(TestBed.get(LocationService).replace).toHaveBeenCalledWith('docs');
|
||||
const verifyPossibleRedirection = doRedirect ? verifyRedirection : verifyNoRedirection;
|
||||
createTestingModule('resources', 'archive');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).toHaveBeenCalledWith('docs');
|
||||
|
||||
it(description, () => {
|
||||
createTestingModule('', mode);
|
||||
createTestingModule('guide/aot-compiler', 'archive');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
|
||||
const navService = TestBed.get(NavigationService) as NavigationService;
|
||||
const testCurrentNodes = navService.currentNodes = new Subject<CurrentNodes>();
|
||||
createTestingModule('tutorial', 'archive');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
|
||||
initializeTest(false);
|
||||
createTestingModule('tutorial/toh-pt1', 'archive');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
|
||||
testCurrentNodes.next({SideNav: {url: 'foo', view: 'SideNav', nodes: []}});
|
||||
verifyNoRedirection();
|
||||
createTestingModule('docs', 'archive');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
|
||||
testCurrentNodes.next({NoSideNav: {url: 'bar', view: 'SideNav', nodes: []}});
|
||||
verifyPossibleRedirection();
|
||||
createTestingModule('api', 'archive');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
|
||||
locationService.replace.calls.reset();
|
||||
testCurrentNodes.next({});
|
||||
verifyPossibleRedirection();
|
||||
createTestingModule('api/core/getPlatform', 'archive');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
locationService.replace.calls.reset();
|
||||
testCurrentNodes.next({SideNav: {url: 'baz', view: 'SideNav', nodes: []}});
|
||||
verifyNoRedirection();
|
||||
});
|
||||
it('should not redirect if deployment mode is `next`', () => {
|
||||
createTestingModule('', 'next');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
|
||||
createTestingModule('resources', 'next');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
|
||||
createTestingModule('guide/aot-compiler', 'next');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
|
||||
createTestingModule('tutorial', 'next');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
|
||||
createTestingModule('tutorial/toh-pt1', 'next');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
|
||||
createTestingModule('docs', 'next');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
|
||||
createTestingModule('api', 'next');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
|
||||
createTestingModule('api/core/getPlatform', 'next');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should not redirect to `docs` if deployment mode is `stable`', () => {
|
||||
createTestingModule('', 'stable');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
|
||||
createTestingModule('resources', 'stable');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
|
||||
createTestingModule('guide/aot-compiler', 'stable');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
|
||||
createTestingModule('tutorial', 'stable');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
|
||||
createTestingModule('tutorial/toh-pt1', 'stable');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
|
||||
createTestingModule('docs', 'stable');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
|
||||
createTestingModule('api', 'stable');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
|
||||
createTestingModule('api/core/getPlatform', 'stable');
|
||||
initializeTest(false);
|
||||
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -120,6 +120,11 @@ export class AppComponent implements OnInit {
|
||||
this.documentService.currentDocument.subscribe(doc => this.currentDocument = doc);
|
||||
|
||||
this.locationService.currentPath.subscribe(path => {
|
||||
// Redirect to docs if we are in archive mode and are not hitting a docs page
|
||||
// (i.e. we have arrived at a marketing page)
|
||||
if (this.deployment.mode === 'archive' && !/^(docs$|api|guide|tutorial)/.test(path)) {
|
||||
this.locationService.replace('docs');
|
||||
}
|
||||
if (path === this.currentPath) {
|
||||
// scroll only if on same page (most likely a change to the hash)
|
||||
this.scrollService.scroll();
|
||||
@ -133,15 +138,7 @@ export class AppComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
|
||||
this.navigationService.currentNodes.subscribe(currentNodes => {
|
||||
this.currentNodes = currentNodes;
|
||||
|
||||
// Redirect to docs if we are in archive mode and are not hitting a docs page
|
||||
// (i.e. we have arrived at a marketing page)
|
||||
if (this.deployment.mode === 'archive' && !currentNodes[sideNavView]) {
|
||||
this.locationService.replace('docs');
|
||||
}
|
||||
});
|
||||
this.navigationService.currentNodes.subscribe(currentNodes => this.currentNodes = currentNodes);
|
||||
|
||||
// Compute the version picker list from the current version and the versions in the navigation map
|
||||
combineLatest(
|
||||
|
@ -7,10 +7,6 @@ body {
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
color: $deepgray;
|
||||
}
|
||||
|
||||
h1 {
|
||||
display: inline-block;
|
||||
font-size: 24px;
|
||||
@ -58,11 +54,7 @@ h6 {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
h2, h3, h4, h5, h6 {
|
||||
a {
|
||||
font-size: inherit;
|
||||
}
|
||||
@ -76,20 +68,13 @@ h6 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
p,
|
||||
ol,
|
||||
ul,
|
||||
ol,
|
||||
li,
|
||||
input,
|
||||
a {
|
||||
p, ol, ul, ol, li, input, a {
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
letter-spacing: 0.3px;
|
||||
letter-spacing: 0.30px;
|
||||
font-weight: 400;
|
||||
color: $darkgray;
|
||||
& > em {
|
||||
letter-spacing: 0.3px;
|
||||
letter-spacing: 0.30px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,26 +87,13 @@ p + ul {
|
||||
}
|
||||
|
||||
ol {
|
||||
li,
|
||||
p {
|
||||
li, p {
|
||||
margin: 4px 0;
|
||||
}
|
||||
}
|
||||
|
||||
ol ol {
|
||||
list-style-type: lower-alpha;
|
||||
|
||||
ol {
|
||||
list-style-type: lower-roman;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
padding-bottom: 8px;
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
li p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
@ -131,7 +103,7 @@ a {
|
||||
.app-toolbar a {
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
color: $white;
|
||||
color: white;
|
||||
font-family: $main-font;
|
||||
text-transform: uppercase;
|
||||
padding: 21px 0;
|
||||
@ -157,10 +129,9 @@ table tbody th {
|
||||
td {
|
||||
font-weight: 400;
|
||||
padding: 8px 30px;
|
||||
letter-spacing: 0.3px;
|
||||
letter-spacing: 0.30px;
|
||||
|
||||
> p,
|
||||
ul {
|
||||
> p, ul {
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ aio-shell.page-docs {
|
||||
|
||||
.sidenav-content {
|
||||
min-height: 100vh;
|
||||
padding: 80px 3rem 2rem;
|
||||
padding: 80px 3rem 1rem;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
|
@ -5,15 +5,12 @@ footer {
|
||||
padding: 48px;
|
||||
z-index: 0;
|
||||
background-color: $blue;
|
||||
color: $offwhite;
|
||||
font-weight: 300;
|
||||
|
||||
aio-footer {
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
|
||||
& > * {
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
|
||||
.footer-block {
|
||||
@ -22,7 +19,8 @@ footer {
|
||||
}
|
||||
|
||||
a {
|
||||
color: $white;
|
||||
color: $offwhite;
|
||||
font-weight: 300;
|
||||
text-decoration: none;
|
||||
z-index: 20;
|
||||
position: relative;
|
||||
@ -41,7 +39,6 @@ footer {
|
||||
text-transform: uppercase;
|
||||
font-weight: 400;
|
||||
margin: 0 0 16px;
|
||||
color: $white;
|
||||
}
|
||||
p {
|
||||
text-align: center;
|
||||
|
@ -2,9 +2,8 @@ html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body,
|
||||
.content {
|
||||
background-color: $white;
|
||||
body {
|
||||
background-color: $offwhite;
|
||||
}
|
||||
|
||||
.clearfix {
|
||||
@ -49,4 +48,4 @@ body,
|
||||
|
||||
.text-uppercase {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
@ -42,7 +42,7 @@ section#intro {
|
||||
height: 480px;
|
||||
margin: 0 auto -32px;
|
||||
padding: 48px 0 0;
|
||||
color: $white;
|
||||
color: white;
|
||||
|
||||
@media (max-width: 780px) {
|
||||
flex-direction: column;
|
||||
@ -426,7 +426,7 @@ div[layout=row]{
|
||||
text-transform: uppercase;
|
||||
font-size: 24px;
|
||||
font-weight: 300;
|
||||
color: $white;
|
||||
color: white;
|
||||
margin: 0;
|
||||
-webkit-margin-before: 0;
|
||||
-webkit-margin-after: 0;
|
||||
|
@ -28,7 +28,7 @@ mat-sidenav.mat-sidenav.sidenav {
|
||||
left: 0;
|
||||
padding: 0;
|
||||
min-width: 260px;
|
||||
background-color: $white;
|
||||
background-color: $offwhite;
|
||||
box-shadow: 6px 0 6px rgba(0,0,0,0.10);
|
||||
|
||||
&.collapsed {
|
||||
@ -48,11 +48,6 @@ mat-sidenav-container.sidenav-container {
|
||||
}
|
||||
}
|
||||
|
||||
mat-sidenav-container.sidenav-container.mat-drawer-container.mat-sidenav-container,
|
||||
mat-sidenav-container .sidenav-content {
|
||||
background-color: $white;
|
||||
}
|
||||
|
||||
mat-sidenav-container div.mat-sidenav-content {
|
||||
height: auto;
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ aio-search-box.search-container {
|
||||
color: $darkgray;
|
||||
border: none;
|
||||
border-radius: 100px;
|
||||
background-color: $white;
|
||||
background-color: $offwhite;
|
||||
padding: 5px 16px;
|
||||
margin-left: 8px;
|
||||
width: 180px;
|
||||
|
@ -94,7 +94,7 @@ a.filter-button {
|
||||
|
||||
&:hover {
|
||||
background-color: $blue;
|
||||
color: $white;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,10 +20,6 @@
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
> *:not(:first-child) {
|
||||
padding: 16px 24px;
|
||||
}
|
||||
|
||||
&.is-critical {
|
||||
border-color: $brightred;
|
||||
background: rgba($brightred, 0.05);
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
|
||||
section {
|
||||
color: $deepgray;
|
||||
color: $darkgray;
|
||||
font-size: 20px;
|
||||
line-height: 24px;
|
||||
margin: 0;
|
||||
|
@ -5,6 +5,7 @@ code-example, code-tabs {
|
||||
|
||||
code-example {
|
||||
|
||||
|
||||
&:not(.no-box) {
|
||||
background-color: rgba($backgroundgray, 0.2);
|
||||
border: 0.5px solid $lightgray;
|
||||
@ -37,10 +38,6 @@ code-example, code-tabs {
|
||||
}
|
||||
}
|
||||
|
||||
code-tabs {
|
||||
margin: 16px 0;
|
||||
}
|
||||
|
||||
// TERMINAL / SHELL TEXT STYLES
|
||||
|
||||
code-example.code-shell, code-example[language=sh], code-example[language=bash] {
|
||||
@ -154,7 +151,6 @@ ol.linenums {
|
||||
margin: 0;
|
||||
font-family: $main-font;
|
||||
color: #B3B6B7;
|
||||
|
||||
li {
|
||||
margin: 0;
|
||||
font-family: $code-font;
|
||||
|
@ -22,7 +22,7 @@ aio-contributor-list {
|
||||
a {
|
||||
&.selected {
|
||||
background-color: $blue;
|
||||
color: $white;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -188,7 +188,7 @@ aio-contributor {
|
||||
line-height: 18px;
|
||||
margin: 8px 16px;
|
||||
text-overflow: ellipsis;
|
||||
overflow-y: auto;
|
||||
overflow: scroll;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
.filetree {
|
||||
background: $white;
|
||||
background: $offwhite;
|
||||
border: 4px solid $lightgray;
|
||||
border-radius: 4px;
|
||||
margin: 0 0 24px 0;
|
||||
@ -35,4 +35,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -32,30 +32,15 @@
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0;
|
||||
margin-top: 14px;
|
||||
margin-bottom: 14px;
|
||||
border-radius: 1px;
|
||||
border-radius: 4px;
|
||||
background: $white;
|
||||
border: 1px solid $lightgray;
|
||||
padding: 32px;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
display: inline-block;
|
||||
box-shadow: 2px 2px 5px 0 rgba(0, 0, 0, .2);
|
||||
margin: 16px 0;
|
||||
margin: 0 0 14px 0;
|
||||
|
||||
&.lightbox {
|
||||
background-color: $lightboxgray;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
div.card {
|
||||
box-shadow: 0 2px 2px rgba(10, 16, 20, 0.24), 0 0 2px rgba(10, 16, 20, 0.12);
|
||||
img {
|
||||
border-radius: 4px;
|
||||
padding: 8px;
|
||||
background-color: $white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ label.raised, .api-header label {
|
||||
padding: 4px 16px;
|
||||
display: inline;
|
||||
font-size: 14px;
|
||||
color: $white;
|
||||
color: white;
|
||||
margin-right: 8px;
|
||||
font-weight: 500;
|
||||
text-transform: uppercase;
|
||||
@ -64,4 +64,4 @@ label.raised, .api-header label {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -2,7 +2,7 @@ table {
|
||||
margin: 24px 0px;
|
||||
box-shadow: 0 2px 2px rgba($black, 0.24), 0 0 2px rgba($black, 0.12);
|
||||
border-radius: 2px;
|
||||
background: $white;
|
||||
background: $offwhite;
|
||||
|
||||
&.is-full-width {
|
||||
width: 100%;
|
||||
|
@ -18,11 +18,9 @@ $white: #FFFFFF;
|
||||
$offwhite: #FAFAFA;
|
||||
$backgroundgray: #F1F1F1;
|
||||
$lightgray: #DBDBDB;
|
||||
$lightboxgray: #EBEBEB;
|
||||
$mist: #ECEFF1;
|
||||
$mediumgray: #6E6E6E;
|
||||
$darkgray: #444444;
|
||||
$deepgray: #333333;
|
||||
$mediumgray: #6e6e6e;
|
||||
$darkgray: #333;
|
||||
$black: #0A1014;
|
||||
$orange: #FF9800;
|
||||
$darkorange: #940;
|
||||
@ -121,4 +119,4 @@ $api-symbols: (
|
||||
// OTHER
|
||||
$small-breakpoint-width: 840px;
|
||||
$phone-breakpoint: 480px;
|
||||
$tablet-breakpoint: 800px;
|
||||
$tablet-breakpoint: 800px;
|
@ -1,5 +1,4 @@
|
||||
const {resolve} = require('canonical-path');
|
||||
const semver = require('semver');
|
||||
const Package = require('dgeni').Package;
|
||||
const basePackage = require('../angular-base-package');
|
||||
const contentPackage = require('../content-package');
|
||||
@ -9,60 +8,59 @@ const CLI_SOURCE_PATH = resolve(CLI_SOURCE_ROOT, 'node_modules/@angular/cli');
|
||||
const CLI_SOURCE_HELP_PATH = resolve(CLI_SOURCE_PATH, 'help');
|
||||
|
||||
// Define the dgeni package for generating the docs
|
||||
module.exports =
|
||||
new Package('cli-docs', [basePackage, contentPackage])
|
||||
module.exports = new Package('cli-docs', [basePackage, contentPackage])
|
||||
|
||||
// Register the services and file readers
|
||||
.factory(require('./readers/cli-command'))
|
||||
// Register the services and file readers
|
||||
.factory(require('./readers/cli-command'))
|
||||
|
||||
// Register the processors
|
||||
.processor(require('./processors/processCliContainerDoc'))
|
||||
.processor(require('./processors/processCliCommands'))
|
||||
.processor(require('./processors/filterHiddenCommands'))
|
||||
// Register the processors
|
||||
.processor(require('./processors/processCliContainerDoc'))
|
||||
.processor(require('./processors/processCliCommands'))
|
||||
.processor(require('./processors/filterHiddenCommands'))
|
||||
|
||||
// Configure file reading
|
||||
.config(function(readFilesProcessor, cliCommandFileReader) {
|
||||
readFilesProcessor.fileReaders.push(cliCommandFileReader);
|
||||
readFilesProcessor.sourceFiles = readFilesProcessor.sourceFiles.concat([
|
||||
{
|
||||
basePath: CLI_SOURCE_HELP_PATH,
|
||||
include: resolve(CLI_SOURCE_HELP_PATH, '*.json'),
|
||||
fileReader: 'cliCommandFileReader'
|
||||
},
|
||||
{
|
||||
basePath: CONTENTS_PATH,
|
||||
include: resolve(CONTENTS_PATH, 'cli/**'),
|
||||
fileReader: 'contentFileReader'
|
||||
},
|
||||
]);
|
||||
})
|
||||
// Configure file reading
|
||||
.config(function(readFilesProcessor, cliCommandFileReader) {
|
||||
readFilesProcessor.fileReaders.push(cliCommandFileReader);
|
||||
readFilesProcessor.sourceFiles = readFilesProcessor.sourceFiles.concat([
|
||||
{
|
||||
basePath: CLI_SOURCE_HELP_PATH,
|
||||
include: resolve(CLI_SOURCE_HELP_PATH, '*.json'),
|
||||
fileReader: 'cliCommandFileReader'
|
||||
},
|
||||
{
|
||||
basePath: CONTENTS_PATH,
|
||||
include: resolve(CONTENTS_PATH, 'cli/**'),
|
||||
fileReader: 'contentFileReader'
|
||||
},
|
||||
]);
|
||||
})
|
||||
|
||||
.config(function(templateFinder, templateEngine, getInjectables) {
|
||||
// Where to find the templates for the CLI doc rendering
|
||||
templateFinder.templateFolders.unshift(resolve(TEMPLATES_PATH, 'cli'));
|
||||
// Add in templating filters and tags
|
||||
templateEngine.filters = templateEngine.filters.concat(
|
||||
getInjectables(requireFolder(__dirname, './rendering')));
|
||||
})
|
||||
.config(function(templateFinder, templateEngine, getInjectables) {
|
||||
// Where to find the templates for the CLI doc rendering
|
||||
templateFinder.templateFolders.unshift(resolve(TEMPLATES_PATH, 'cli'));
|
||||
// Add in templating filters and tags
|
||||
templateEngine.filters = templateEngine.filters.concat(getInjectables(requireFolder(__dirname, './rendering')));
|
||||
})
|
||||
|
||||
|
||||
.config(function(renderDocsProcessor) {
|
||||
.config(function(renderDocsProcessor) {
|
||||
|
||||
const cliPackage = require(resolve(CLI_SOURCE_PATH, 'package.json'));
|
||||
const repoUrlParts = cliPackage.repository.url.replace(/\.git$/, '').split('/');
|
||||
const version = `v${semver.clean(cliPackage.version)}`;
|
||||
const repo = repoUrlParts.pop();
|
||||
const owner = repoUrlParts.pop();
|
||||
const cliVersionInfo = {gitRepoInfo: {owner, repo}, currentVersion: {raw: version}};
|
||||
const cliPackage = require(resolve(CLI_SOURCE_PATH, 'package.json'));
|
||||
const repoUrlParts = cliPackage.repository.url.replace(/\.git$/, '').split('/');
|
||||
const version = `v${cliPackage.version}`;
|
||||
const repo = repoUrlParts.pop();
|
||||
const owner = repoUrlParts.pop();
|
||||
const cliVersionInfo = {
|
||||
gitRepoInfo: { owner, repo },
|
||||
currentVersion: { raw: version }
|
||||
};
|
||||
|
||||
// Add the cli version data to the renderer, for use in things like github links
|
||||
renderDocsProcessor.extraData.cliVersionInfo = cliVersionInfo;
|
||||
})
|
||||
// Add the cli version data to the renderer, for use in things like github links
|
||||
renderDocsProcessor.extraData.cliVersionInfo = cliVersionInfo;
|
||||
})
|
||||
|
||||
|
||||
.config(function(convertToJsonProcessor, postProcessHtml) {
|
||||
convertToJsonProcessor.docTypes =
|
||||
convertToJsonProcessor.docTypes.concat(['cli-command', 'cli-overview']);
|
||||
postProcessHtml.docTypes =
|
||||
postProcessHtml.docTypes.concat(['cli-command', 'cli-overview']);
|
||||
});
|
||||
.config(function(convertToJsonProcessor, postProcessHtml) {
|
||||
convertToJsonProcessor.docTypes = convertToJsonProcessor.docTypes.concat(['cli-command', 'cli-overview']);
|
||||
postProcessHtml.docTypes = postProcessHtml.docTypes.concat(['cli-command', 'cli-overview']);
|
||||
});
|
||||
|
@ -9,7 +9,7 @@
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
module.exports = function cliCommandFileReader() {
|
||||
module.exports = function cliCommandFileReader(log) {
|
||||
const json5 = require('json5');
|
||||
return {
|
||||
name: 'cliCommandFileReader',
|
||||
@ -26,61 +26,22 @@ module.exports = function cliCommandFileReader() {
|
||||
docType: 'cli-command',
|
||||
id: `cli-${doc.name}`,
|
||||
commandAliases: doc.aliases || [],
|
||||
aliases: computeAliases(doc), path,
|
||||
aliases: computeAliases(doc),
|
||||
path,
|
||||
outputPath: `${path}.json`,
|
||||
breadCrumbs: [
|
||||
{text: 'CLI', path: 'cli'},
|
||||
{text: name, path},
|
||||
{ text: 'CLI', path: 'cli' },
|
||||
{ text: name, path },
|
||||
]
|
||||
});
|
||||
if (doc.longDescription) {
|
||||
doc.longDescriptionDoc = createLongDescriptionDoc(fileInfo);
|
||||
}
|
||||
return [result];
|
||||
} catch (e) {
|
||||
throw new Error(
|
||||
`Failed to read cli command file: "${fileInfo.relativePath}" - ${e.message}`);
|
||||
log.warn(`Failed to read cli command file: "${fileInfo.relativePath}" - ${e.message}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
function computeAliases(doc) {
|
||||
return [doc.name].concat(doc.aliases || []).map(alias => `cli-${alias}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Synthesize a doc for the CLI command long description, which is used to generate links
|
||||
* for viewing and editing the long description in GitHub.
|
||||
*
|
||||
* The long description is stored in a markdown file that is referenced from the original
|
||||
* schema file for the command, via the `$longDescription` field. The field is a relative path
|
||||
* to the markdown file from the schema file.
|
||||
*
|
||||
* This function tries to retrieve that original schema based on the file path of the help JSON
|
||||
* file, which was passed to the `cliCommandFileReader.getDocs()` method.
|
||||
*/
|
||||
function createLongDescriptionDoc(fileInfo) {
|
||||
const path = require('canonical-path');
|
||||
const fs = require('fs');
|
||||
const json5 = require('json5');
|
||||
|
||||
const schemaJsonPath = path.resolve(fileInfo.basePath, '../commands', fileInfo.relativePath);
|
||||
|
||||
try {
|
||||
const schemaJson = fs.readFileSync(schemaJsonPath);
|
||||
const schema = json5.parse(schemaJson);
|
||||
if (schema.$longDescription) {
|
||||
return {
|
||||
docType: 'content',
|
||||
startingLine: 0,
|
||||
fileInfo: {
|
||||
realProjectRelativePath:
|
||||
path.join(path.dirname(fileInfo.realProjectRelativePath), schema.$longDescription)
|
||||
}
|
||||
};
|
||||
}
|
||||
} catch (e) {
|
||||
throw new Error(
|
||||
`Unable to read CLI "$longDescription" info from the schema: "${schemaJsonPath}" - ${e.message}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function computeAliases(doc) {
|
||||
return [doc.name].concat(doc.aliases || []).map(alias => `cli-${alias}`);
|
||||
}
|
@ -40,12 +40,7 @@ const content = `
|
||||
}
|
||||
`;
|
||||
|
||||
const fileInfo = {
|
||||
content,
|
||||
baseName: 'add',
|
||||
relativePath: 'add.json',
|
||||
basePath: __dirname + '/mocks/help',
|
||||
};
|
||||
const fileInfo = {content, baseName: 'add'};
|
||||
|
||||
describe('cli-command reader', () => {
|
||||
describe('getDocs', () => {
|
||||
@ -82,8 +77,8 @@ describe('cli-command reader', () => {
|
||||
it('should compute the bread crumbs', () => {
|
||||
const docs = reader.getDocs(fileInfo);
|
||||
expect(docs[0].breadCrumbs).toEqual([
|
||||
{text: 'CLI', path: 'cli'},
|
||||
{text: 'add', path: 'cli/add'},
|
||||
{ text: 'CLI', path: 'cli' },
|
||||
{ text: 'add', path: 'cli/add' },
|
||||
]);
|
||||
});
|
||||
|
||||
@ -94,9 +89,7 @@ describe('cli-command reader', () => {
|
||||
|
||||
it('should extract the long description', () => {
|
||||
const docs = reader.getDocs(fileInfo);
|
||||
expect(docs[0].longDescription)
|
||||
.toEqual(
|
||||
'Add support for a library in your project, for example adding `@angular/pwa` which would configure\nyour project for PWA support.\n');
|
||||
expect(docs[0].longDescription).toEqual('Add support for a library in your project, for example adding `@angular/pwa` which would configure\nyour project for PWA support.\n');
|
||||
});
|
||||
|
||||
it('should extract the command type', () => {
|
||||
@ -117,19 +110,10 @@ describe('cli-command reader', () => {
|
||||
it('should extract the options', () => {
|
||||
const docs = reader.getDocs(fileInfo);
|
||||
expect(docs[0].options).toEqual([
|
||||
jasmine.objectContaining({name: 'collection'}),
|
||||
jasmine.objectContaining({name: 'help'}),
|
||||
jasmine.objectContaining({name: 'helpJson'}),
|
||||
jasmine.objectContaining({ name: 'collection' }),
|
||||
jasmine.objectContaining({ name: 'help' }),
|
||||
jasmine.objectContaining({ name: 'helpJson' }),
|
||||
]);
|
||||
});
|
||||
|
||||
it('should extract file info for the long description', () => {
|
||||
const [doc] = reader.getDocs(fileInfo);
|
||||
expect(doc.longDescriptionDoc).toEqual({
|
||||
docType: 'content',
|
||||
startingLine: 0,
|
||||
fileInfo: {realProjectRelativePath: 'packages/angular/cli/commands/add-long.md'}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"$longDescription": "./add-long.md"
|
||||
}
|
@ -14,10 +14,7 @@
|
||||
{$ cli.renderSyntax(doc) $}
|
||||
|
||||
{% if doc.longDescription.length %}
|
||||
<h2 class="no-anchor">
|
||||
{$ github.githubLinks(doc.longDescriptionDoc, cliVersionInfo) $}
|
||||
Description
|
||||
</h2>
|
||||
<h2 class="no-anchor">Description</h2>
|
||||
{$ doc.longDescription | marked $}
|
||||
{% endif%}
|
||||
|
||||
|
289
aio/yarn.lock
289
aio/yarn.lock
@ -2,24 +2,24 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@angular-devkit/architect@0.800.2":
|
||||
version "0.800.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.800.2.tgz#0924864e57d1e56bddeae257c8779a2662c34e69"
|
||||
integrity sha512-251GOQwI3254AtnGWZoHmjOMFcz7h6M3fPmRHpYuuhRPIwZnQCKaszYI7gaP9zR7uArLUwsuPo+YYz8lb6Giwg==
|
||||
"@angular-devkit/architect@0.800.0-rc.2":
|
||||
version "0.800.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.800.0-rc.2.tgz#4096016fa6df93acbf02be648554631939aa87c0"
|
||||
integrity sha512-JU/x3UvUW+uVuF0tNkVTRtAvGfbKDXLFI3lm7i40qmts5z1zeQlPjrz+DRTe7msevoVu7DMQTJ7vlbyHUjZOFw==
|
||||
dependencies:
|
||||
"@angular-devkit/core" "8.0.2"
|
||||
"@angular-devkit/core" "8.0.0-rc.2"
|
||||
rxjs "6.4.0"
|
||||
|
||||
"@angular-devkit/build-angular@0.800.2":
|
||||
version "0.800.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-0.800.2.tgz#712f106f50fb8301816e4417493e98e1e12eb296"
|
||||
integrity sha512-RlYPEp5FVKosgzWhbI7llM3lGIxAYuCwEPloeUL4XaDasNe2zmLNUlYDVTrF7GpZRoAgiIejmT0HvvKfEuZNZQ==
|
||||
"@angular-devkit/build-angular@0.800.0-rc.2":
|
||||
version "0.800.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-0.800.0-rc.2.tgz#df78a27a58813bc442629f8500e1f3d4fd72c519"
|
||||
integrity sha512-E6P3CO4IUEyCezrBuNwMZ+H/Rg+0R/FH3/TyWiivY5D3bLGvRFJbQE5ZQkVWbd1i1woxvHdqkjgco9hpOko2XQ==
|
||||
dependencies:
|
||||
"@angular-devkit/architect" "0.800.2"
|
||||
"@angular-devkit/build-optimizer" "0.800.2"
|
||||
"@angular-devkit/build-webpack" "0.800.2"
|
||||
"@angular-devkit/core" "8.0.2"
|
||||
"@ngtools/webpack" "8.0.2"
|
||||
"@angular-devkit/architect" "0.800.0-rc.2"
|
||||
"@angular-devkit/build-optimizer" "0.800.0-rc.2"
|
||||
"@angular-devkit/build-webpack" "0.800.0-rc.2"
|
||||
"@angular-devkit/core" "8.0.0-rc.2"
|
||||
"@ngtools/webpack" "8.0.0-rc.2"
|
||||
ajv "6.10.0"
|
||||
autoprefixer "9.5.1"
|
||||
browserslist "4.5.5"
|
||||
@ -65,30 +65,30 @@
|
||||
webpack-subresource-integrity "1.1.0-rc.6"
|
||||
worker-plugin "3.1.0"
|
||||
|
||||
"@angular-devkit/build-optimizer@0.800.2":
|
||||
version "0.800.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.800.2.tgz#4223b2ac8c2a4c05682d1f3cb0417b4630b4a943"
|
||||
integrity sha512-A/lX7Fjfeh5PspGURV8fJeOsrIYM/7why7mC6v78zdxaErd4S18wUXJDfndjx3qiKyuq76Uu4cQcS7XfClpb8Q==
|
||||
"@angular-devkit/build-optimizer@0.800.0-rc.2":
|
||||
version "0.800.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.800.0-rc.2.tgz#d56cdc127699ad25eb817caf97336d239600f5cb"
|
||||
integrity sha512-YKTFlAfD4JZk1h4lZDA4HVPPIq1JB5Dxg/Icn2GvcuUws6wVcXUflMTIpBgIMF2j07fMIYPqSAcSBd+UsBJBvA==
|
||||
dependencies:
|
||||
loader-utils "1.2.3"
|
||||
source-map "0.5.6"
|
||||
typescript "3.4.4"
|
||||
webpack-sources "1.3.0"
|
||||
|
||||
"@angular-devkit/build-webpack@0.800.2":
|
||||
version "0.800.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.800.2.tgz#af90ea503eece948390bce154a53df9d7c566539"
|
||||
integrity sha512-Bd/sazcriUTFQCGFDyUkjXSmpn8hRLIyLIXBLAn+5coH4Y4xNy8PXt+hnr6ffwu92h/WnyxKIJi44+5aoUBURA==
|
||||
"@angular-devkit/build-webpack@0.800.0-rc.2":
|
||||
version "0.800.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.800.0-rc.2.tgz#c08218f54381157744a3166c0d94b1db180ba063"
|
||||
integrity sha512-t+/5WqgcsvgPIFGE48I+UWJPDpkQ6E+dKH6RuXec94VBJEv1pC9FJdoi6s/CqEzzPiZsWxJzrWI4dpPAn1eWuA==
|
||||
dependencies:
|
||||
"@angular-devkit/architect" "0.800.2"
|
||||
"@angular-devkit/core" "8.0.2"
|
||||
"@angular-devkit/architect" "0.800.0-rc.2"
|
||||
"@angular-devkit/core" "8.0.0-rc.2"
|
||||
rxjs "6.4.0"
|
||||
webpack-merge "4.2.1"
|
||||
|
||||
"@angular-devkit/core@8.0.2":
|
||||
version "8.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-8.0.2.tgz#22b017b38b4d6127ab2e39a27990fd7962d3844a"
|
||||
integrity sha512-S2OPYe6Qu7qTS8Q2lzf4qNjXdbN/J2YVnd3wGauMI8Tih5tY/NzUW3h5ds09nRcjsdBDuT0qgf3IMlCZWIABvQ==
|
||||
"@angular-devkit/core@8.0.0-rc.2":
|
||||
version "8.0.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-8.0.0-rc.2.tgz#e596a44da215713cdef5405f1477e70626e5d68c"
|
||||
integrity sha512-hfkQ1QaA0ZIquTNQYJiK0OhdSzdxWY1SJr20JwSBHezAvhN4sJHRBRN9RxGLWdL1d4Z4rUB4KEIvx0cMMk6Ueg==
|
||||
dependencies:
|
||||
ajv "6.10.0"
|
||||
fast-json-stable-stringify "2.0.0"
|
||||
@ -96,40 +96,40 @@
|
||||
rxjs "6.4.0"
|
||||
source-map "0.7.3"
|
||||
|
||||
"@angular-devkit/schematics@8.0.2":
|
||||
version "8.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-8.0.2.tgz#854a4366c7dc7462bebd10c24e808b5c9f65b6e2"
|
||||
integrity sha512-v+g0MOPADJJ5QNNmojCyh2sw1GOzadlbHPdTFqZOm77b2Bi79dRm+yuYMuY6a2nUt7DIcioLRcOFwV8UctajRg==
|
||||
"@angular-devkit/schematics@8.0.0-rc.2":
|
||||
version "8.0.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-8.0.0-rc.2.tgz#f4490b1277cdba9622227b178128c76f54e7eca1"
|
||||
integrity sha512-VuXCRE/PmQWMHaaBbbOq7f2M6/DeKnYUyqG2xpBJaSP+rX7j08gd6RGzkn6V81C6jxt0Q3WkXnQfj5ZQuFnF5w==
|
||||
dependencies:
|
||||
"@angular-devkit/core" "8.0.2"
|
||||
"@angular-devkit/core" "8.0.0-rc.2"
|
||||
rxjs "6.4.0"
|
||||
|
||||
"@angular/animations@^8.1.0-next.1":
|
||||
version "8.1.0-next.1"
|
||||
resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-8.1.0-next.1.tgz#6c79ac16b7da239b7823259994d2b379d883dd68"
|
||||
integrity sha512-drwdK7ARU41hGj6JebO7gF0MeeNz3qSMoPs8zRqjC3sfWZ4Jp9eNlfTf1b86gd6w9GMeOna/JjwxUeNEmxdLBw==
|
||||
"@angular/animations@^8.0.0-rc.2":
|
||||
version "8.0.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-8.0.0-rc.2.tgz#aef2683aba35498fe26253bf8f461a1658864e49"
|
||||
integrity sha512-XTT7Eif6Km6MSbLr6qlCmx8vjRgx/Hp5Hv1WnnPtRFt8XeidYGGYIq2si3CxQ2xBjEO3OpNbPqtYvZKH1yuBdA==
|
||||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
"@angular/cdk@8.0.0":
|
||||
version "8.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-8.0.0.tgz#34ca95e71d71780b29b5ba07318c88c4577bdc25"
|
||||
integrity sha512-2vsRWEHNARe0iRmqgzvM67gwfRy+aKvdef4Qu9L+ndSsTrrZT3tSgG8SMn1v9SfBHnx5G8mo4d1AMquXG69AuQ==
|
||||
"@angular/cdk@8.0.0-rc.0":
|
||||
version "8.0.0-rc.0"
|
||||
resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-8.0.0-rc.0.tgz#64731574ddcf6912b079e03efab95464ce17acee"
|
||||
integrity sha512-fa0AFR/v4t4rVFUwqpfRnzRhzyoReYcssjR6fQ4WMMxbhRHNZSJaPxvnykMOZsh7oQy0d6Dy4kENO6nXZptR9g==
|
||||
dependencies:
|
||||
tslib "^1.7.1"
|
||||
optionalDependencies:
|
||||
parse5 "^5.0.0"
|
||||
|
||||
"@angular/cli@8.0.2":
|
||||
version "8.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-8.0.2.tgz#b64c044342f0af2ed7e78e51c54087693407a47b"
|
||||
integrity sha512-xXSCwTKonC6nMqKPDlEFhXjKBu85jVB+KYo2tLU+RKtgFeIF/hTaUWQTvWXRwRsQAfBhB1cwe0oijdljOItTgw==
|
||||
"@angular/cli@8.0.0-rc.2":
|
||||
version "8.0.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-8.0.0-rc.2.tgz#fda3c42c3682a53168be67c0624db04144c0aa9c"
|
||||
integrity sha512-Aj5JJKa6JxNU3U9InvveIhU8gg6ZA1UvvKHHzX87FsUQhHzm7XIfwC5JrYGDE4c9ErIE40J3we7Hcsv2AjzkTw==
|
||||
dependencies:
|
||||
"@angular-devkit/architect" "0.800.2"
|
||||
"@angular-devkit/core" "8.0.2"
|
||||
"@angular-devkit/schematics" "8.0.2"
|
||||
"@schematics/angular" "8.0.2"
|
||||
"@schematics/update" "0.800.2"
|
||||
"@angular-devkit/architect" "0.800.0-rc.2"
|
||||
"@angular-devkit/core" "8.0.0-rc.2"
|
||||
"@angular-devkit/schematics" "8.0.0-rc.2"
|
||||
"@schematics/angular" "8.0.0-rc.2"
|
||||
"@schematics/update" "0.800.0-rc.2"
|
||||
"@yarnpkg/lockfile" "1.1.0"
|
||||
debug "^4.1.1"
|
||||
ini "1.3.5"
|
||||
@ -137,23 +137,22 @@
|
||||
npm-package-arg "6.1.0"
|
||||
open "6.2.0"
|
||||
pacote "9.5.0"
|
||||
read-package-tree "5.2.2"
|
||||
semver "6.0.0"
|
||||
symbol-observable "1.2.0"
|
||||
universal-analytics "^0.4.20"
|
||||
uuid "^3.3.2"
|
||||
|
||||
"@angular/common@^8.1.0-next.1":
|
||||
version "8.1.0-next.1"
|
||||
resolved "https://registry.yarnpkg.com/@angular/common/-/common-8.1.0-next.1.tgz#2b6674ad46c13d0e24fedb6f239d338448ca72b0"
|
||||
integrity sha512-sHzv1QIt2g6stXVqIiHpR2yk8goA3nek1FohUWz4H9mE24Knb4qSNvn25wztYdH5n5WPY+jyHyhWrqoXtrPvuQ==
|
||||
"@angular/common@^8.0.0-rc.2":
|
||||
version "8.0.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular/common/-/common-8.0.0-rc.2.tgz#77b2da22cb11bf2039799d56ec2fb7c4f51a1374"
|
||||
integrity sha512-/MUZhebMAkAwV8jkimBONN2eOQ2/5qO54ZvPypyy2tEHk69JRNLFjREaR+VU8yGlS/1MU6jTYxyfRW2c8ggLzA==
|
||||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
"@angular/compiler-cli@^8.1.0-next.1":
|
||||
version "8.1.0-next.1"
|
||||
resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-8.1.0-next.1.tgz#27047724d40a40b172497a0ebc40846a16bc481b"
|
||||
integrity sha512-pJ5s5cEh/cXasMwUzJLwypoSaDzmAV6tfOKhm3bN6dfSh1bS8jliElIwxgPkqlUv9zo4Io/RZD4KgvwBzD7WSw==
|
||||
"@angular/compiler-cli@^8.0.0-rc.2":
|
||||
version "8.0.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-8.0.0-rc.2.tgz#a3ef74f3e4ea448ccf1387c18c32fc664b67b2e1"
|
||||
integrity sha512-lLhedaTQ08/i4aysCPpTYbAP0/8T5/EHE79FByp/7XxqRuQxcXkFJujQT1Q/KReKa0gA9JEYD4I1eBJpNYyMLQ==
|
||||
dependencies:
|
||||
canonical-path "1.0.0"
|
||||
chokidar "^2.1.1"
|
||||
@ -167,71 +166,71 @@
|
||||
tslib "^1.9.0"
|
||||
yargs "13.1.0"
|
||||
|
||||
"@angular/compiler@^8.1.0-next.1":
|
||||
version "8.1.0-next.1"
|
||||
resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-8.1.0-next.1.tgz#e0dadb973b15497d9afccccd1e56ae36c3a32014"
|
||||
integrity sha512-3Qh4cSEPX3C2c+J9xea0CNnoy/UqtCqHzVuslfCdTRrgdCYx2xxcHvmwZHccDyTCTW8bX7C4jjr0Gf1w1lANlg==
|
||||
"@angular/compiler@^8.0.0-rc.2":
|
||||
version "8.0.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-8.0.0-rc.2.tgz#8395c20d2d7e93c6941a45b039e03ae7a6277797"
|
||||
integrity sha512-/NR0EN6wjit2mfgOhWirOjKp+s7lO1QSKhzK3TjYCda1L7Pijo29s3BGMWUSPCRno8zNH5o7Q0mWCC55MBGB4w==
|
||||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
"@angular/core@^8.1.0-next.1":
|
||||
version "8.1.0-next.1"
|
||||
resolved "https://registry.yarnpkg.com/@angular/core/-/core-8.1.0-next.1.tgz#ff8c51089a46e5fdaaa77bb65efb1b07aee47d68"
|
||||
integrity sha512-i26/UkfTOd+nZuPbUOgGHGSWwl1fghUlLwQHvDqtdMC2VANQOjEyQZrcNHP+N7ZumVdcfxDAisFOMWgnwFzVcw==
|
||||
"@angular/core@^8.0.0-rc.2":
|
||||
version "8.0.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular/core/-/core-8.0.0-rc.2.tgz#800fd49bbc176f7ee064375b726503c5e6c8387c"
|
||||
integrity sha512-ImXzoQk8U3IiL75dJWnO/aIGfaExgiqDc6GJYgQ8PvB7ZUkdUOj/a+jd6asMvE52VZJkof5XShhdonTScPcdUA==
|
||||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
"@angular/elements@^8.1.0-next.1":
|
||||
version "8.1.0-next.1"
|
||||
resolved "https://registry.yarnpkg.com/@angular/elements/-/elements-8.1.0-next.1.tgz#dbe64cc671bf94cafbad4225905f287cdb37ea01"
|
||||
integrity sha512-exxENgFIgUlKJcCrj0LyiAYPUhu5wNk5XfRCVXxoNIGXgsMtrKGXX5HYrZyRtKJhCwyvkuLg7IjdBzD9KoThrw==
|
||||
"@angular/elements@^8.0.0-rc.2":
|
||||
version "8.0.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular/elements/-/elements-8.0.0-rc.2.tgz#84ca2aadff66bfcd3c8042492a0c6b87a6a749fa"
|
||||
integrity sha512-7KVPDSGXo33WD+ZQHjmvSXyBa6az6MHIQo3I+wRKUB9pBZNqMa2Dcb7FQp7fq3tQTEpOW6fO52ozxAZ/ybozxA==
|
||||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
"@angular/forms@^8.1.0-next.1":
|
||||
version "8.1.0-next.1"
|
||||
resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-8.1.0-next.1.tgz#5cfee3f7e9ad8add06fe25419b06c8a7f8b9f72d"
|
||||
integrity sha512-NRiiV06FoMXU99eKv8poKEp1+VQntZnD8ADv4Z9YcU6XhngO09c0K/jmHABGh6oym+GtF2gRocTZ65a2FeUeDw==
|
||||
"@angular/forms@^8.0.0-rc.2":
|
||||
version "8.0.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-8.0.0-rc.2.tgz#f4db4653470b74cd55508aa83da761309a1d341d"
|
||||
integrity sha512-rjjGNVaxwOayuZCpsG8V13RK/h7S6v5ItzG6Ai1agO/em4/riNhEP3+BvxM4Rs1v4AfGOd+LhOeLt5qptj0JKA==
|
||||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
"@angular/language-service@^8.1.0-next.1":
|
||||
version "8.1.0-next.1"
|
||||
resolved "https://registry.yarnpkg.com/@angular/language-service/-/language-service-8.1.0-next.1.tgz#35b72dd320b46abe631f209759e5c939d8b2b725"
|
||||
integrity sha512-LlpStVhf4GEazD6/6i8DftNndEkrBoTxd6Bi5kFHrDmJB+cT5evVZHomXJcwHjZx31gpcLAot6lr7WCRkmbD0g==
|
||||
"@angular/language-service@^8.0.0-rc.2":
|
||||
version "8.0.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular/language-service/-/language-service-8.0.0-rc.2.tgz#5b8fd13b7cd9e7cc1c097f92749f05e72b1c7e47"
|
||||
integrity sha512-PXsntGd053iiM9lJPo7jmjhd5dp6AxugEC4WDTXimZ3vK2Hzv53CnKuVTUGcTWjwazbKAEyG0jiUl4VXptwTAA==
|
||||
|
||||
"@angular/material@8.0.0":
|
||||
version "8.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@angular/material/-/material-8.0.0.tgz#21dd15c318d1e29eb4d1a2dd888ddb027897eb49"
|
||||
integrity sha512-c7O7GhZd46xF2WB6T/YPam5lJkTgQLdIS53IqwZIFhL427+SEfPvejVzRnVfZCI3NdrKiWt/5VsvtQZwWzlGvw==
|
||||
"@angular/material@8.0.0-rc.0":
|
||||
version "8.0.0-rc.0"
|
||||
resolved "https://registry.yarnpkg.com/@angular/material/-/material-8.0.0-rc.0.tgz#c5170f9617abba3176e991a1e197e1efa0bff95a"
|
||||
integrity sha512-8J+oPHxcoDJnZUE+j5eYDR5FS/zN7RHljK2FtjiG2wsGGRiomnMLQBoFCQL55P1sgqWz3l4vKgi5GuwA65pADQ==
|
||||
dependencies:
|
||||
tslib "^1.7.1"
|
||||
|
||||
"@angular/platform-browser-dynamic@^8.1.0-next.1":
|
||||
version "8.1.0-next.1"
|
||||
resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-8.1.0-next.1.tgz#6e927d97583ec2bb9a9803c0f5003ef41fc39d9e"
|
||||
integrity sha512-BDeLlzpg7T2nv3Y6ywQAW+cBAgbSQUku7W1p71vFGqE8p4c79HmKbykGSR1/n7Sez8LV+N1LpliCrNQEgGtBaA==
|
||||
"@angular/platform-browser-dynamic@^8.0.0-rc.2":
|
||||
version "8.0.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-8.0.0-rc.2.tgz#86e8e227f19aa9c6ef4439623ce6cf7f2b0cd3b1"
|
||||
integrity sha512-c4QXgAikQx25AOnNiQUOe/yNJunR95rfTJ5yApcNU76eeCMG9KLFNGGQTg+PmcxZ6UMcw9zp2Tck9vjSb2BZYg==
|
||||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
"@angular/platform-browser@^8.1.0-next.1":
|
||||
version "8.1.0-next.1"
|
||||
resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-8.1.0-next.1.tgz#0cf2b04437d190687d7efbaa6b7e9be5f5a076e2"
|
||||
integrity sha512-EkDgr1wWW2eAd542k46JKb9jIr50M5eiq49QjDVmnjXCS1WNIyiW1TxTpyOiDNz8nK0jHYTzEw+PWEyvmwJV8Q==
|
||||
"@angular/platform-browser@^8.0.0-rc.2":
|
||||
version "8.0.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-8.0.0-rc.2.tgz#b40fa05fd32422be499ab3986bc3031374f7c5bc"
|
||||
integrity sha512-ErzIDckIqic9rmqMFk4scRX+lo7AWifOP+IOCot1KGPdQ7+CP/h/neJ9fiIzYTSDYUm5xk5i+2aW+2SWRJYQdA==
|
||||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
"@angular/router@^8.1.0-next.1":
|
||||
version "8.1.0-next.1"
|
||||
resolved "https://registry.yarnpkg.com/@angular/router/-/router-8.1.0-next.1.tgz#b957531748e153ddafb666fd8cd68546a7508e54"
|
||||
integrity sha512-balgDD3IlsnWs+WWuSAQn3oXULbh44oklqBQgDAl8CX94ki0jDCeVFob57cCflqRx7WjtxB053X9keg6EA2YtA==
|
||||
"@angular/router@^8.0.0-rc.2":
|
||||
version "8.0.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular/router/-/router-8.0.0-rc.2.tgz#e0e4636f56fc08760863486f45f203bb9b00543e"
|
||||
integrity sha512-7NnRdEykm0FJf/SHjUWz3cgGDtW5KM2gKm8it8V8azr3vIiMRYyqhDqCKkhutjt7C+yKNotB5M7Da9uYf0n/xQ==
|
||||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
"@angular/service-worker@^8.1.0-next.1":
|
||||
version "8.1.0-next.1"
|
||||
resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-8.1.0-next.1.tgz#bf00349b1993a6ecda07b9c08920b16aae176950"
|
||||
integrity sha512-lctU2Dq96ovsFU/e7vIKUUvg+k5H2w+RHOx8ARlgraCU3T5fYyriQvZ9GH7y86fkAFtSrQ6MX0+pnY5dFUUZ1Q==
|
||||
"@angular/service-worker@^8.0.0-rc.2":
|
||||
version "8.0.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-8.0.0-rc.2.tgz#e73374fe4ccd8c15790f007832a5e60576ed85d9"
|
||||
integrity sha512-uudl7+P9Xov9naoW7Ruv0rvvp+jYWe3P3OOpRul8X6tTYarKnorj3F44Y5GoNO5Xxjp0psPSD558rXrrIBt98w==
|
||||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
@ -317,32 +316,32 @@
|
||||
through2 "^2.0.0"
|
||||
xdg-basedir "^3.0.0"
|
||||
|
||||
"@ngtools/webpack@8.0.2":
|
||||
version "8.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-8.0.2.tgz#d60167b514b531ed6ae308b4911739dd102e41c7"
|
||||
integrity sha512-5P0FHF4p5H/G9xGjOG9meDViXcdW3RPdJa2nX1gGpii3/dhFhmU4pxjKn1Bfs4x+PB9FQQvhSvGIBLNf+B4y5Q==
|
||||
"@ngtools/webpack@8.0.0-rc.2":
|
||||
version "8.0.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-8.0.0-rc.2.tgz#d8321a89b2c14fcb627d3d5e326b4125b283f08c"
|
||||
integrity sha512-0pXtkvbwp53z+BgQwBllyIHjMM082phkM8hFwlEHCbYeWkSRBqDld7HgzXBEwpBe+4MKjtWF2xXbDp/4BdTjOQ==
|
||||
dependencies:
|
||||
"@angular-devkit/core" "8.0.2"
|
||||
"@angular-devkit/core" "8.0.0-rc.2"
|
||||
enhanced-resolve "4.1.0"
|
||||
rxjs "6.4.0"
|
||||
tree-kill "1.2.1"
|
||||
webpack-sources "1.3.0"
|
||||
|
||||
"@schematics/angular@8.0.2":
|
||||
version "8.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-8.0.2.tgz#80d2a4d55f89b0f843f64d38f588ccca4fdf4de2"
|
||||
integrity sha512-mN9qsoBVpbY1Q7BP8WaiHsyDv+kl5WrIHw/9OASLrGZcoVY7+oj2CfznVq0XRwvVjDtm6ZFor5ruxLF9dQUOSw==
|
||||
"@schematics/angular@8.0.0-rc.2":
|
||||
version "8.0.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-8.0.0-rc.2.tgz#94bc9bb68d75e07142a37f4881c287063d460df2"
|
||||
integrity sha512-sBIUz2xEBZJxXAiIsJEaTI7G8r1Mc0aI0tNnw0vQLF6sMSaVKJssN2gYg5dmceDXohJtcgdc3hN1xPL6ZpvsdA==
|
||||
dependencies:
|
||||
"@angular-devkit/core" "8.0.2"
|
||||
"@angular-devkit/schematics" "8.0.2"
|
||||
"@angular-devkit/core" "8.0.0-rc.2"
|
||||
"@angular-devkit/schematics" "8.0.0-rc.2"
|
||||
|
||||
"@schematics/update@0.800.2":
|
||||
version "0.800.2"
|
||||
resolved "https://registry.yarnpkg.com/@schematics/update/-/update-0.800.2.tgz#48d23bf60f2870f0887946165cad42c243c4faac"
|
||||
integrity sha512-HPjbzr/LfFLdMzi6zMQK8mPyLw+nt+m7OQsdoeOkFgHkHVfHrKQWcOGt4A0D6keDJ6K2g7W5CsqFR6/GMac7Mg==
|
||||
"@schematics/update@0.800.0-rc.2":
|
||||
version "0.800.0-rc.2"
|
||||
resolved "https://registry.yarnpkg.com/@schematics/update/-/update-0.800.0-rc.2.tgz#4ea24343c32f47ee7c2f2404fb67a50331dc8b1a"
|
||||
integrity sha512-oWnxEoscVHfzz0mEvfqwe7hRw4fzsYOmnZEVVLAb62lZQdPQHitflBITI+ubrPmHSgILHoBAWqOYlkuEKVXVAg==
|
||||
dependencies:
|
||||
"@angular-devkit/core" "8.0.2"
|
||||
"@angular-devkit/schematics" "8.0.2"
|
||||
"@angular-devkit/core" "8.0.0-rc.2"
|
||||
"@angular-devkit/schematics" "8.0.0-rc.2"
|
||||
"@yarnpkg/lockfile" "1.1.0"
|
||||
ini "1.3.5"
|
||||
pacote "9.5.0"
|
||||
@ -1027,7 +1026,7 @@ as-array@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/as-array/-/as-array-2.0.0.tgz#4f04805d87f8fce8e511bc2108f8e5e3a287d547"
|
||||
|
||||
asap@^2.0.0, asap@^2.0.3, asap@~2.0.3:
|
||||
asap@^2.0.3, asap@~2.0.3:
|
||||
version "2.0.6"
|
||||
resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"
|
||||
integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=
|
||||
@ -2701,11 +2700,6 @@ debug@^3.0.0, debug@^3.1.0, debug@^3.2.5, debug@^3.2.6:
|
||||
dependencies:
|
||||
ms "^2.1.1"
|
||||
|
||||
debuglog@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
|
||||
integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=
|
||||
|
||||
decamelize@^1.1.1, decamelize@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
|
||||
@ -2878,14 +2872,6 @@ detect-node@^2.0.4:
|
||||
resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c"
|
||||
integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==
|
||||
|
||||
dezalgo@^1.0.0:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456"
|
||||
integrity sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=
|
||||
dependencies:
|
||||
asap "^2.0.0"
|
||||
wrappy "1"
|
||||
|
||||
dgeni-packages@^0.27.1:
|
||||
version "0.27.2"
|
||||
resolved "https://registry.yarnpkg.com/dgeni-packages/-/dgeni-packages-0.27.2.tgz#ca1b40147a56668db2f4a2f09a374c6355f45cfa"
|
||||
@ -7091,7 +7077,7 @@ nopt@^4.0.1:
|
||||
abbrev "1"
|
||||
osenv "^0.1.4"
|
||||
|
||||
normalize-package-data@^2.0.0, normalize-package-data@^2.3.2:
|
||||
normalize-package-data@^2.3.2:
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
|
||||
integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==
|
||||
@ -8275,29 +8261,6 @@ read-cache@^1.0.0:
|
||||
dependencies:
|
||||
pify "^2.3.0"
|
||||
|
||||
read-package-json@^2.0.0:
|
||||
version "2.0.13"
|
||||
resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.0.13.tgz#2e82ebd9f613baa6d2ebe3aa72cefe3f68e41f4a"
|
||||
integrity sha512-/1dZ7TRZvGrYqE0UAfN6qQb5GYBsNcqS1C0tNK601CFOJmtHI7NIGXwetEPU/OtoFHZL3hDxm4rolFFVE9Bnmg==
|
||||
dependencies:
|
||||
glob "^7.1.1"
|
||||
json-parse-better-errors "^1.0.1"
|
||||
normalize-package-data "^2.0.0"
|
||||
slash "^1.0.0"
|
||||
optionalDependencies:
|
||||
graceful-fs "^4.1.2"
|
||||
|
||||
read-package-tree@5.2.2:
|
||||
version "5.2.2"
|
||||
resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.2.2.tgz#4b6a0ef2d943c1ea36a578214c9a7f6b7424f7a8"
|
||||
integrity sha512-rW3XWUUkhdKmN2JKB4FL563YAgtINifso5KShykufR03nJ5loGFlkUMe1g/yxmqX073SoYYTsgXu7XdDinKZuA==
|
||||
dependencies:
|
||||
debuglog "^1.0.1"
|
||||
dezalgo "^1.0.0"
|
||||
once "^1.3.0"
|
||||
read-package-json "^2.0.0"
|
||||
readdir-scoped-modules "^1.0.0"
|
||||
|
||||
read-pkg-up@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
|
||||
@ -8400,16 +8363,6 @@ readable-stream@~2.0.0:
|
||||
string_decoder "~0.10.x"
|
||||
util-deprecate "~1.0.1"
|
||||
|
||||
readdir-scoped-modules@^1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747"
|
||||
integrity sha1-n6+jfShr5dksuuve4DDcm19AZ0c=
|
||||
dependencies:
|
||||
debuglog "^1.0.1"
|
||||
dezalgo "^1.0.0"
|
||||
graceful-fs "^4.1.2"
|
||||
once "^1.3.0"
|
||||
|
||||
readdirp@^2.0.0, readdirp@^2.2.1:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525"
|
||||
@ -8882,10 +8835,10 @@ rxjs@6.4.0, rxjs@^6.4.0:
|
||||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
rxjs@^6.5.2:
|
||||
version "6.5.2"
|
||||
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.2.tgz#2e35ce815cd46d84d02a209fb4e5921e051dbec7"
|
||||
integrity sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==
|
||||
rxjs@^6.5.1:
|
||||
version "6.5.1"
|
||||
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.1.tgz#f7a005a9386361921b8524f38f54cbf80e5d08f4"
|
||||
integrity sha512-y0j31WJc83wPu31vS1VlAFW5JGrnGC+j+TtGAa1fRQphy48+fDYiDmX8tjGloToEsMkxnouOg/1IzXGKkJnZMg==
|
||||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
|
@ -81,6 +81,9 @@ See also: [`//.bazelrc`](https://github.com/angular/angular/blob/master/.bazelrc
|
||||
|
||||
The process should automatically connect to the debugger. For additional info and testing options, see the [nodejs_test documentation](https://bazelbuild.github.io/rules_nodejs/node/node.html#nodejs_test).
|
||||
|
||||
- Click on "Resume script execution" to let the code run until the first `debugger` statement or a previously set breakpoint.
|
||||
- If you're debugging an ivy test and you want to inspect the generated template instructions, find the template of your component in the call stack and click on `(source mapped from [CompName].js)` at the bottom of the code. You can also disable sourcemaps in the options or go to sources and look into ng:// namespace to see all the generated code.
|
||||
|
||||
### Debugging a Node Test in VSCode
|
||||
|
||||
First time setup:
|
||||
|
@ -37,7 +37,7 @@ We explicitly don't consider the following to be our public API surface:
|
||||
|
||||
- any file/import paths within our package except for the `/`, `/testing` and `/bundles/*` and other documented package entry-points.
|
||||
- constructors of injectable classes (services and directives) - please use DI to obtain instances of these classes
|
||||
- any class members or symbols marked as `private`, or prefixed with underscore (`_`), [barred latin o](https://en.wikipedia.org/wiki/%C6%9F) (`ɵ`), and double barred latin o, aka "frog eyes" (`ɵɵ`).
|
||||
- any class members or symbols marked as `private`, or prefixed with underscore (`_`), [barred latin o](https://en.wikipedia.org/wiki/%C6%9F) (`ɵ`), and double barred latin o (`ɵɵ`).
|
||||
- extending any of our classes unless the support for this is specifically documented in the API docs
|
||||
- the contents and API surface of the code generated by Angular's compiler (with one notable exception: the existence and name of `NgModuleFactory` instances exported from generated code is guaranteed)
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
"master": {
|
||||
"uncompressed": {
|
||||
"runtime": 1440,
|
||||
"main": 14487,
|
||||
"main": 14664,
|
||||
"polyfills": 43567
|
||||
}
|
||||
}
|
||||
@ -21,7 +21,7 @@
|
||||
"master": {
|
||||
"uncompressed": {
|
||||
"runtime": 1440,
|
||||
"main": 149205,
|
||||
"main": 149248,
|
||||
"polyfills": 43567
|
||||
}
|
||||
}
|
||||
@ -34,4 +34,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ function testBazel() {
|
||||
ng new demo --collection=@angular/bazel --routing --skip-git --skip-install --style=scss
|
||||
cd demo
|
||||
installLocalPackages
|
||||
yarn webdriver-manager update --gecko=false --standalone=false ${CI_CHROMEDRIVER_VERSION_ARG:---versions.chrome 2.45}
|
||||
ng generate component widget --style=css
|
||||
ng build
|
||||
ng test
|
||||
@ -41,8 +42,8 @@ function testBazel() {
|
||||
function testNonBazel() {
|
||||
# Replace angular.json that uses Bazel builder with the default generated by CLI
|
||||
mv ./angular.json.bak ./angular.json
|
||||
mv ./tsconfig.json.bak ./tsconfig.json
|
||||
rm -rf dist src/main.dev.ts src/main.prod.ts
|
||||
yarn webdriver-manager update --gecko=false --standalone=false ${CI_CHROMEDRIVER_VERSION_ARG:---versions.chrome 2.45}
|
||||
ng build --progress=false
|
||||
ng test --progress=false --watch=false
|
||||
ng e2e --configuration=production --webdriver-update=false
|
||||
|
@ -30,7 +30,7 @@
|
||||
rxjs "6.4.0"
|
||||
|
||||
"@angular/bazel@file:../../dist/packages-dist/bazel":
|
||||
version "0.0.0"
|
||||
version "8.0.0-beta.13"
|
||||
dependencies:
|
||||
"@angular-devkit/architect" "^0.800.0-beta.15"
|
||||
"@angular-devkit/core" "^8.0.0-beta.15"
|
||||
@ -40,7 +40,7 @@
|
||||
"@types/node" "6.0.84"
|
||||
semver "^5.6.0"
|
||||
shelljs "0.8.2"
|
||||
tsickle "^0.35.0"
|
||||
tsickle "0.34.3"
|
||||
|
||||
"@angular/cli@file:../../node_modules/@angular/cli":
|
||||
version "8.0.0-beta.15"
|
||||
@ -62,27 +62,27 @@
|
||||
universal-analytics "^0.4.20"
|
||||
uuid "^3.3.2"
|
||||
|
||||
"@bazel/bazel-darwin_x64@0.26.1":
|
||||
version "0.26.1"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.26.1.tgz#1b5c69b635e5c2a8c3090fa5f6bcb45735f06045"
|
||||
integrity sha512-9VjrR+ce+iS9xS1lgeAo1RAPXlxCvez/r3smN1lP4s4YNF0s5LAT0cevIl6Zz2nwyEha/6JvY3v6Euemy36F0w==
|
||||
"@bazel/bazel-darwin_x64@0.24.0":
|
||||
version "0.24.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.24.0.tgz#828ef298d8d542961df388f17b0244f4f4302a74"
|
||||
integrity sha512-xly44vkcD/fauUb7Lm5Lme4qhEZdkuuyBKSVQUHPbYAGDdbj/W8dupI3bZREkJAgG/WrRU+WXUemMj4U8ZcLcw==
|
||||
|
||||
"@bazel/bazel-linux_x64@0.26.1":
|
||||
version "0.26.1"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.26.1.tgz#04dd194bdcd6b9d45bd865a9a60c280d0d600251"
|
||||
integrity sha512-oZooDxI1C4p7o18zx2Uns2cK/NN2hgF2YSBKH0aVDPAAxQA85h+g124CWDEbsghOdRMSBM0Hd0SSeIqwZcqLSw==
|
||||
"@bazel/bazel-linux_x64@0.24.0":
|
||||
version "0.24.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.24.0.tgz#9ef2e7266833ad2221fe4af4ceb6763d2897e3ff"
|
||||
integrity sha512-p5ylPLWnJZDGbaIFBrtD/tp3Su5rMdzeeNJKU24XyiWQTHVZ3OD3I2Fb0ILCgfBjY8AlA7EtCtOI4hYnAuIOtg==
|
||||
|
||||
"@bazel/bazel-win32_x64@0.26.1":
|
||||
version "0.26.1"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.26.1.tgz#9351f07313173b1f98006da8131c94db7aa7c506"
|
||||
integrity sha512-0FkOo8+bxw13X2m6ALhXX2241gG9ZXgcLu0E/IbCWy/TmOB5bR0Z73CslszWbXIldVYnANuhFmnkxIa745Du5Q==
|
||||
"@bazel/bazel-win32_x64@0.24.0":
|
||||
version "0.24.0"
|
||||
resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.24.0.tgz#02d83113a6c6ed99795a3e41bff5631aa141638d"
|
||||
integrity sha512-/bcSEx+GoV/q7H4WM0jazfxTcurSiIIePhRv+d05mxRDcaWwhCO8KzmmZRWH1abW6npvq5tLkbSQi7G7nUBhgg==
|
||||
|
||||
"@bazel/bazel@file:../../node_modules/@bazel/bazel":
|
||||
version "0.26.1"
|
||||
version "0.24.0"
|
||||
optionalDependencies:
|
||||
"@bazel/bazel-darwin_x64" "0.26.1"
|
||||
"@bazel/bazel-linux_x64" "0.26.1"
|
||||
"@bazel/bazel-win32_x64" "0.26.1"
|
||||
"@bazel/bazel-darwin_x64" "0.24.0"
|
||||
"@bazel/bazel-linux_x64" "0.24.0"
|
||||
"@bazel/bazel-win32_x64" "0.24.0"
|
||||
|
||||
"@microsoft/api-extractor@^7.0.21":
|
||||
version "7.0.22"
|
||||
@ -1610,10 +1610,10 @@ tough-cookie@~2.4.3:
|
||||
psl "^1.1.24"
|
||||
punycode "^1.4.1"
|
||||
|
||||
tsickle@^0.35.0:
|
||||
version "0.35.0"
|
||||
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.35.0.tgz#59235df45937c0ec5d072c616c26d2d97fba54b9"
|
||||
integrity sha512-irsZLX4293YUl9TuwNC5Fy020eLSc4bC3LfKnxnx1oq5wmZD9zSP8qvNNTiwRmf2/rxH+58JINcTARDjuvn+oQ==
|
||||
tsickle@0.34.3:
|
||||
version "0.34.3"
|
||||
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.34.3.tgz#8085067a26d7bff466ddadb2eba18849b49159b8"
|
||||
integrity sha512-mb1v3nsr6rYaZky22xj0d6qv4ogAR40Bc6r37jwWOg3bEIO/ZppEFZiEADs/NNVLcWTPgmNmPZgaX5CfAH6oXA==
|
||||
dependencies:
|
||||
minimist "^1.2.0"
|
||||
mkdirp "^0.5.1"
|
||||
|
@ -1 +0,0 @@
|
||||
node_modules
|
@ -16,7 +16,3 @@ build --define=compile=legacy
|
||||
|
||||
# Don't create symlinks
|
||||
build --symlink_prefix=/
|
||||
|
||||
# Turn on managed directories feature in Bazel
|
||||
# This allows us to avoid installing a second copy of node_modules
|
||||
common --experimental_allow_incremental_repository_updates
|
||||
|
@ -1,30 +1,28 @@
|
||||
workspace(
|
||||
name = "bazel_integration_test",
|
||||
managed_directories = {"@npm": ["node_modules"]},
|
||||
)
|
||||
workspace(name = "bazel_integration_test")
|
||||
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
# Fetch rules_nodejs so we can install our npm dependencies
|
||||
http_archive(
|
||||
name = "build_bazel_rules_nodejs",
|
||||
sha256 = "e04a82a72146bfbca2d0575947daa60fda1878c8d3a3afe868a8ec39a6b968bb",
|
||||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.31.1/rules_nodejs-0.31.1.tar.gz"],
|
||||
sha256 = "395b7568f20822c13fc5abc65b1eced637446389181fda3a108fdd6ff2cac1e9",
|
||||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.29.2/rules_nodejs-0.29.2.tar.gz"],
|
||||
)
|
||||
|
||||
# Fetch sass rules for compiling sass files
|
||||
# TODO: change back to upstream release after https://github.com/bazelbuild/rules_sass/pull/87 merged and released
|
||||
http_archive(
|
||||
name = "io_bazel_rules_sass",
|
||||
strip_prefix = "rules_sass-9862dfc96a4a1f66fe171ef5e043b29853e8445b",
|
||||
url = "https://github.com/manekinekko/rules_sass/archive/9862dfc96a4a1f66fe171ef5e043b29853e8445b.zip",
|
||||
sha256 = "dbe9fb97d5a7833b2a733eebc78c9c1e3880f676ac8af16e58ccf2139cbcad03",
|
||||
strip_prefix = "rules_sass-1.11.0",
|
||||
url = "https://github.com/bazelbuild/rules_sass/archive/1.11.0.zip",
|
||||
)
|
||||
|
||||
# Check the bazel version and download npm dependencies
|
||||
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
|
||||
|
||||
# Bazel version must be at least the following version because:
|
||||
# - 0.26.0 managed_directories feature added which is required for nodejs rules 0.30.0
|
||||
# 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`
|
||||
# (see https://github.com/angular/angular/issues/27514#issuecomment-451438271)
|
||||
check_bazel_version(
|
||||
message = """
|
||||
You no longer need to install Bazel on your machine.
|
||||
@ -33,7 +31,7 @@ Try running `yarn bazel` instead.
|
||||
(If you did run that, check that you've got a fresh `yarn install`)
|
||||
|
||||
""",
|
||||
minimum_bazel_version = "0.26.0",
|
||||
minimum_bazel_version = "0.21.0",
|
||||
)
|
||||
|
||||
# Setup the Node.js toolchain
|
||||
@ -45,8 +43,12 @@ node_repositories(
|
||||
# Install our npm dependencies into @npm
|
||||
yarn_install(
|
||||
name = "npm",
|
||||
package_json = "//:package.json",
|
||||
yarn_lock = "//:yarn.lock",
|
||||
data = [
|
||||
# Needed because this tsconfig file is used in the "postinstall" script.
|
||||
"//:angular-metadata.tsconfig.json",
|
||||
],
|
||||
package_json = "//src:package.json",
|
||||
yarn_lock = "//src:yarn.lock",
|
||||
)
|
||||
|
||||
# Install all bazel dependencies of our npm packages
|
||||
|
@ -4,32 +4,14 @@
|
||||
"version": "0.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@angular/animations": "file:../../dist/packages-dist/animations",
|
||||
"@angular/common": "file:../../dist/packages-dist/common",
|
||||
"@angular/core": "file:../../dist/packages-dist/core",
|
||||
"@angular/platform-browser": "file:../../dist/packages-dist/platform-browser",
|
||||
"@angular/platform-browser-dynamic": "file:../../dist/packages-dist/platform-browser-dynamic",
|
||||
"@angular/router": "file:../../dist/packages-dist/router",
|
||||
"reflect-metadata": "0.1.12",
|
||||
"rxjs": "6.4.0",
|
||||
"tslib": "1.9.3",
|
||||
"zone.js": "0.9.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/bazel": "file:../../dist/packages-dist/bazel",
|
||||
"@angular/compiler": "file:../../dist/packages-dist/compiler",
|
||||
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
|
||||
"@bazel/bazel": "file:../../node_modules/@bazel/bazel",
|
||||
"@bazel/karma": "0.30.1",
|
||||
"@bazel/typescript": "0.30.1",
|
||||
"@types/jasmine": "2.8.8",
|
||||
"@types/source-map": "0.5.1",
|
||||
"protractor": "5.1.2",
|
||||
"typescript": "3.4.2"
|
||||
"@bazel/bazel": "file:../../node_modules/@bazel/bazel"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "bazel build ... --noshow_progress && bazel test ...",
|
||||
"postinstall": "ngc -p ./angular-metadata.tsconfig.json",
|
||||
"//": "TODO(gregmagolan): figure out how to keep dependencies here up to date with the root package.json"
|
||||
"//": "deps are listed in src/package.json which is used by yarn_install",
|
||||
"//": "this package.json file is only here so that `yarn test` can be called by /integration/run_tests.sh",
|
||||
"pretest": "./pretest.sh",
|
||||
"test": "bazel build ... --noshow_progress && bazel test ..."
|
||||
}
|
||||
}
|
||||
}
|
20
integration/bazel/pretest.sh
Executable file
20
integration/bazel/pretest.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux -o pipefail
|
||||
# -e: exits if a command fails
|
||||
# -u: errors if an variable is referenced before being set
|
||||
# -x: shows the commands that get run
|
||||
# -o pipefail: causes a pipeline to produce a failure return code if any command errors
|
||||
|
||||
# sedi makes `sed -i` work on both OSX & Linux
|
||||
# See https://stackoverflow.com/questions/2320564/i-need-my-sed-i-command-for-in-place-editing-to-work-with-both-gnu-sed-and-bsd
|
||||
sedi () {
|
||||
case $(uname) in
|
||||
Darwin*) sedi=('-i' '') ;;
|
||||
*) sedi='-i' ;;
|
||||
esac
|
||||
|
||||
sed "${sedi[@]}" "$@"
|
||||
}
|
||||
|
||||
sedi "s#packages-dist:#file://$PWD/../../dist/packages-dist/#" src/package.json
|
@ -47,7 +47,7 @@ ts_devserver(
|
||||
|
||||
rollup_bundle(
|
||||
name = "bundle",
|
||||
entry_point = ":main.ts",
|
||||
entry_point = "src/main",
|
||||
deps = [
|
||||
"//src",
|
||||
# TODO(kyliau): These are not necessary. Bundle compiles fine without
|
||||
|
@ -25,7 +25,7 @@ ng_module(
|
||||
|
||||
ng_package(
|
||||
name = "npm_package",
|
||||
entry_point = ":index.ts",
|
||||
entry_point = "src/hello-world/index.js",
|
||||
deps = [":hello-world"],
|
||||
)
|
||||
|
||||
|
33
integration/bazel/src/package.json
Normal file
33
integration/bazel/src/package.json
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "angular-bazel",
|
||||
"description": "example and integration test for building Angular apps with Bazel",
|
||||
"version": "0.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@angular/animations": "packages-dist:animations",
|
||||
"@angular/common": "packages-dist:common",
|
||||
"@angular/core": "packages-dist:core",
|
||||
"@angular/platform-browser": "packages-dist:platform-browser",
|
||||
"@angular/platform-browser-dynamic": "packages-dist:platform-browser-dynamic",
|
||||
"@angular/router": "packages-dist:router",
|
||||
"reflect-metadata": "0.1.12",
|
||||
"rxjs": "6.4.0",
|
||||
"tslib": "1.9.3",
|
||||
"zone.js": "0.9.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/bazel": "packages-dist:bazel",
|
||||
"@angular/compiler": "packages-dist:compiler",
|
||||
"@angular/compiler-cli": "packages-dist:compiler-cli",
|
||||
"@bazel/karma": "0.29.0",
|
||||
"@bazel/typescript": "0.29.0",
|
||||
"@types/jasmine": "2.8.8",
|
||||
"@types/source-map": "0.5.1",
|
||||
"protractor": "5.1.2",
|
||||
"typescript": "3.4.2"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "ngc -p ./angular-metadata.tsconfig.json",
|
||||
"//": "TODO(gregmagolan): figure out how to keep dependencies here up to date with the root package.json"
|
||||
}
|
||||
}
|
3668
integration/bazel/src/yarn.lock
Normal file
3668
integration/bazel/src/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,32 @@
|
||||
{
|
||||
"seq": 0,
|
||||
"type": "response",
|
||||
"command": "definitionAndBoundSpan",
|
||||
"request_seq": 2,
|
||||
"success": true,
|
||||
"body": {
|
||||
"definitions": [
|
||||
{
|
||||
"file": "${PWD}/project/app/app.component.ts",
|
||||
"start": {
|
||||
"line": 7,
|
||||
"offset": 30
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"offset": 47
|
||||
}
|
||||
}
|
||||
],
|
||||
"textSpan": {
|
||||
"start": {
|
||||
"line": 7,
|
||||
"offset": 30
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"offset": 47
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
{
|
||||
"seq": 0,
|
||||
"type": "response",
|
||||
"command": "quickinfo",
|
||||
"request_seq": 4,
|
||||
"success": true,
|
||||
"body": {
|
||||
"kind": "const",
|
||||
"kindModifiers": "declare",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"offset": 17
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"offset": 21
|
||||
},
|
||||
"displayString": "const name: never",
|
||||
"documentation": "",
|
||||
"tags": []
|
||||
}
|
||||
}
|
@ -2,6 +2,6 @@ import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'my-app',
|
||||
template: `<h1>Hello {{name}}</h1>`,
|
||||
template: `<h1>Hello {{name}}</h1><my-widget></my-widget>`,
|
||||
})
|
||||
export class AppComponent { name = 'Angular'; }
|
||||
|
@ -2,10 +2,11 @@ import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { WidgetComponent } from './widget.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [ BrowserModule ],
|
||||
declarations: [ AppComponent ],
|
||||
declarations: [ AppComponent, WidgetComponent ],
|
||||
bootstrap: [ AppComponent ]
|
||||
})
|
||||
export class AppModule { }
|
||||
|
@ -0,0 +1 @@
|
||||
<h1>This is a {{name}} widget!</h1>
|
@ -0,0 +1,7 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'my-widget',
|
||||
templateUrl: './widget.component.html',
|
||||
})
|
||||
export class WidgetComponent { name = 'Angular'; }
|
@ -8,6 +8,9 @@
|
||||
"experimentalDecorators": true,
|
||||
"lib": [ "es2015", "dom" ],
|
||||
"noImplicitAny": true,
|
||||
"suppressImplicitAnyIndexErrors": true
|
||||
"suppressImplicitAnyIndexErrors": true,
|
||||
"plugins": [
|
||||
{"name": "@angular/language-service"}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,6 @@ describe('Angular Language Service', () => {
|
||||
beforeEach(() => {
|
||||
jasmine.addMatchers(goldenMatcher);
|
||||
server = fork(SERVER_PATH, [
|
||||
'--globalPlugins', '@angular/language-service',
|
||||
'--logVerbosity', 'verbose',
|
||||
'--logFile', join(PWD, 'tsserver.log'),
|
||||
], {
|
||||
@ -118,6 +117,17 @@ describe('Angular Language Service', () => {
|
||||
offset: 28,
|
||||
});
|
||||
expect(resp2).toMatchGolden('quickinfo.json');
|
||||
|
||||
client.sendRequest('open', {
|
||||
file: `${PWD}/project/app/widget.component.html`,
|
||||
});
|
||||
|
||||
const resp3 = await client.sendRequest('quickinfo', {
|
||||
file: `${PWD}/project/app/widget.component.html`,
|
||||
line: 1,
|
||||
offset: 19,
|
||||
});
|
||||
expect(resp3).toMatchGolden('quickinfo_externalTemplate.json');
|
||||
});
|
||||
|
||||
it('should perform definition', async () => {
|
||||
@ -139,4 +149,25 @@ describe('Angular Language Service', () => {
|
||||
});
|
||||
expect(resp2).toMatchGolden('definition.json');
|
||||
});
|
||||
|
||||
it('should perform definitionAndBoundSpan', async () => {
|
||||
client.sendRequest('open', {
|
||||
file: `${PWD}/project/app/app.component.ts`,
|
||||
});
|
||||
|
||||
const resp1 = await client.sendRequest('reload', {
|
||||
file: `${PWD}/project/app/app.component.ts`,
|
||||
tmpFile: `${PWD}/project/app/app.component.ts`,
|
||||
}) as any;
|
||||
expect(resp1.command).toBe('reload');
|
||||
expect(resp1.success).toBe(true);
|
||||
|
||||
const resp2 = await client.sendRequest('definitionAndBoundSpan', {
|
||||
file: `${PWD}/project/app/app.component.ts`,
|
||||
line: 5,
|
||||
offset: 28,
|
||||
});
|
||||
expect(resp2).toMatchGolden('definitionAndBoundSpan.json');
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -3,12 +3,12 @@
|
||||
|
||||
|
||||
"@angular/core@file:../../dist/packages-dist/core":
|
||||
version "7.2.0"
|
||||
version "8.0.0-beta.13"
|
||||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
"@angular/language-service@file:../../dist/packages-dist/language-service":
|
||||
version "7.2.0"
|
||||
version "8.0.0-beta.13"
|
||||
|
||||
"@types/node@file:../../node_modules/@types/node":
|
||||
version "10.9.4"
|
||||
@ -61,16 +61,16 @@ inherits@2:
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
||||
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
|
||||
|
||||
jasmine-core@~3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.1.0.tgz#a4785e135d5df65024dfc9224953df585bd2766c"
|
||||
integrity sha1-pHheE11d9lAk38kiSVPfWFvSdmw=
|
||||
jasmine-core@~3.3.0:
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.3.0.tgz#dea1cdc634bc93c7e0d4ad27185df30fa971b10e"
|
||||
integrity sha512-3/xSmG/d35hf80BEN66Y6g9Ca5l/Isdeg/j6zvbTYlTzeKinzmaTM4p9am5kYqOmE05D7s1t8FGjzdSnbUbceA==
|
||||
|
||||
"jasmine@file:../../node_modules/jasmine":
|
||||
version "3.1.0"
|
||||
version "3.3.1"
|
||||
dependencies:
|
||||
glob "^7.0.6"
|
||||
jasmine-core "~3.1.0"
|
||||
jasmine-core "~3.3.0"
|
||||
|
||||
minimatch@^3.0.4:
|
||||
version "3.0.4"
|
||||
@ -97,7 +97,7 @@ tslib@^1.9.0:
|
||||
integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==
|
||||
|
||||
"typescript@file:../../node_modules/typescript":
|
||||
version "3.2.2"
|
||||
version "3.4.2"
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
|
@ -14,23 +14,23 @@ if [[ $? != 0 ]]; then exit 1; fi
|
||||
# Did it add the appropriate build markers?
|
||||
|
||||
# - esm2015
|
||||
cat node_modules/@angular/common/package.json | awk 'ORS=" "' | grep '"__processed_by_ivy_ngcc__":[^}]*"esm2015": "'
|
||||
grep '"__processed_by_ivy_ngcc__":[^}]*"esm2015":"' node_modules/@angular/common/package.json
|
||||
if [[ $? != 0 ]]; then exit 1; fi
|
||||
|
||||
# - fesm2015
|
||||
cat node_modules/@angular/common/package.json | awk 'ORS=" "' | grep '"__processed_by_ivy_ngcc__":[^}]*"fesm2015": "'
|
||||
grep '"__processed_by_ivy_ngcc__":[^}]*"fesm2015":"' node_modules/@angular/common/package.json
|
||||
if [[ $? != 0 ]]; then exit 1; fi
|
||||
cat node_modules/@angular/common/package.json | awk 'ORS=" "' | grep '"__processed_by_ivy_ngcc__":[^}]*"es2015": "'
|
||||
grep '"__processed_by_ivy_ngcc__":[^}]*"es2015":"' node_modules/@angular/common/package.json
|
||||
if [[ $? != 0 ]]; then exit 1; fi
|
||||
|
||||
# - esm5
|
||||
cat node_modules/@angular/common/package.json | awk 'ORS=" "' | grep '"__processed_by_ivy_ngcc__":[^}]*"esm5": "'
|
||||
grep '"__processed_by_ivy_ngcc__":[^}]*"esm5":"' node_modules/@angular/common/package.json
|
||||
if [[ $? != 0 ]]; then exit 1; fi
|
||||
|
||||
# - fesm5
|
||||
cat node_modules/@angular/common/package.json | awk 'ORS=" "' | grep '"__processed_by_ivy_ngcc__":[^}]*"module": "'
|
||||
grep '"__processed_by_ivy_ngcc__":[^}]*"module":"' node_modules/@angular/common/package.json
|
||||
if [[ $? != 0 ]]; then exit 1; fi
|
||||
cat node_modules/@angular/common/package.json | awk 'ORS=" "' | grep '"__processed_by_ivy_ngcc__":[^}]*"fesm5": "'
|
||||
grep '"__processed_by_ivy_ngcc__":[^}]*"fesm5":"' node_modules/@angular/common/package.json
|
||||
if [[ $? != 0 ]]; then exit 1; fi
|
||||
|
||||
# Did it replace the PRE_R3 markers correctly?
|
||||
|
@ -1,147 +1,3 @@
|
||||
import { Subject, Subscription } from "rxjs";
|
||||
import "rxjs";
|
||||
|
||||
import "rxjs/operators";
|
||||
|
||||
function getGlobal() {
|
||||
const __globalThis = "undefined" !== typeof globalThis && globalThis;
|
||||
const __window = "undefined" !== typeof window && window;
|
||||
const __self = "undefined" !== typeof self && "undefined" !== typeof WorkerGlobalScope && self instanceof WorkerGlobalScope && self;
|
||||
const __global = "undefined" !== typeof global && global;
|
||||
return __globalThis || __global || __window || __self;
|
||||
}
|
||||
|
||||
const _global = getGlobal();
|
||||
|
||||
let _symbolIterator = null;
|
||||
|
||||
function getSymbolIterator() {
|
||||
if (!_symbolIterator) {
|
||||
const Symbol = _global["Symbol"];
|
||||
if (Symbol && Symbol.iterator) _symbolIterator = Symbol.iterator; else {
|
||||
const keys = Object.getOwnPropertyNames(Map.prototype);
|
||||
for (let i = 0; i < keys.length; ++i) {
|
||||
const key = keys[i];
|
||||
if ("entries" !== key && "size" !== key && Map.prototype[key] === Map.prototype["entries"]) _symbolIterator = key;
|
||||
}
|
||||
}
|
||||
}
|
||||
return _symbolIterator;
|
||||
}
|
||||
|
||||
if ("undefined" === typeof ngI18nClosureMode) _global["ngI18nClosureMode"] = "undefined" !== typeof goog && "function" === typeof goog.getMsg;
|
||||
|
||||
function flatten(list, dst) {
|
||||
if (void 0 === dst) dst = list;
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
let item = list[i];
|
||||
if (Array.isArray(item)) {
|
||||
if (dst === list) dst = list.slice(0, i);
|
||||
flatten(item, dst);
|
||||
} else if (dst !== list) dst.push(item);
|
||||
}
|
||||
return dst;
|
||||
}
|
||||
|
||||
class EventEmitter extends Subject {
|
||||
constructor(isAsync = false) {
|
||||
super();
|
||||
this.__isAsync = isAsync;
|
||||
}
|
||||
emit(value) {
|
||||
super.next(value);
|
||||
}
|
||||
subscribe(generatorOrNext, error, complete) {
|
||||
let schedulerFn;
|
||||
let errorFn = err => null;
|
||||
let completeFn = () => null;
|
||||
if (generatorOrNext && "object" === typeof generatorOrNext) {
|
||||
schedulerFn = this.__isAsync ? value => {
|
||||
setTimeout(() => generatorOrNext.next(value));
|
||||
} : value => {
|
||||
generatorOrNext.next(value);
|
||||
};
|
||||
if (generatorOrNext.error) errorFn = this.__isAsync ? err => {
|
||||
setTimeout(() => generatorOrNext.error(err));
|
||||
} : err => {
|
||||
generatorOrNext.error(err);
|
||||
};
|
||||
if (generatorOrNext.complete) completeFn = this.__isAsync ? () => {
|
||||
setTimeout(() => generatorOrNext.complete());
|
||||
} : () => {
|
||||
generatorOrNext.complete();
|
||||
};
|
||||
} else {
|
||||
schedulerFn = this.__isAsync ? value => {
|
||||
setTimeout(() => generatorOrNext(value));
|
||||
} : value => {
|
||||
generatorOrNext(value);
|
||||
};
|
||||
if (error) errorFn = this.__isAsync ? err => {
|
||||
setTimeout(() => error(err));
|
||||
} : err => {
|
||||
error(err);
|
||||
};
|
||||
if (complete) completeFn = this.__isAsync ? () => {
|
||||
setTimeout(() => complete());
|
||||
} : () => {
|
||||
complete();
|
||||
};
|
||||
}
|
||||
const sink = super.subscribe(schedulerFn, errorFn, completeFn);
|
||||
if (generatorOrNext instanceof Subscription) generatorOrNext.add(sink);
|
||||
return sink;
|
||||
}
|
||||
}
|
||||
|
||||
class QueryList {
|
||||
constructor() {
|
||||
this.dirty = true;
|
||||
this._results = [];
|
||||
this.changes = new EventEmitter();
|
||||
this.length = 0;
|
||||
}
|
||||
map(fn) {
|
||||
return this._results.map(fn);
|
||||
}
|
||||
filter(fn) {
|
||||
return this._results.filter(fn);
|
||||
}
|
||||
find(fn) {
|
||||
return this._results.find(fn);
|
||||
}
|
||||
reduce(fn, init) {
|
||||
return this._results.reduce(fn, init);
|
||||
}
|
||||
forEach(fn) {
|
||||
this._results.forEach(fn);
|
||||
}
|
||||
some(fn) {
|
||||
return this._results.some(fn);
|
||||
}
|
||||
toArray() {
|
||||
return this._results.slice();
|
||||
}
|
||||
[getSymbolIterator()]() {
|
||||
return this._results[getSymbolIterator()]();
|
||||
}
|
||||
toString() {
|
||||
return this._results.toString();
|
||||
}
|
||||
reset(resultsTree) {
|
||||
this._results = flatten(resultsTree);
|
||||
this.dirty = false;
|
||||
this.length = this._results.length;
|
||||
this.last = this._results[this.length - 1];
|
||||
this.first = this._results[0];
|
||||
}
|
||||
notifyOnChanges() {
|
||||
this.changes.emit(this);
|
||||
}
|
||||
setDirty() {
|
||||
this.dirty = true;
|
||||
}
|
||||
destroy() {
|
||||
this.changes.complete();
|
||||
this.changes.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
@ -3,15 +3,3 @@ import "tslib";
|
||||
import "rxjs";
|
||||
|
||||
import "rxjs/operators";
|
||||
|
||||
function getGlobal() {
|
||||
var __globalThis = "undefined" !== typeof globalThis && globalThis;
|
||||
var __window = "undefined" !== typeof window && window;
|
||||
var __self = "undefined" !== typeof self && "undefined" !== typeof WorkerGlobalScope && self instanceof WorkerGlobalScope && self;
|
||||
var __global = "undefined" !== typeof global && global;
|
||||
return __globalThis || __global || __window || __self;
|
||||
}
|
||||
|
||||
var _global = getGlobal();
|
||||
|
||||
if ("undefined" === typeof ngI18nClosureMode) _global["ngI18nClosureMode"] = "undefined" !== typeof goog && "function" === typeof goog.getMsg;
|
||||
|
74
modules/benchmarks/src/expanding_rows/BUILD.bazel
Normal file
74
modules/benchmarks/src/expanding_rows/BUILD.bazel
Normal file
@ -0,0 +1,74 @@
|
||||
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
|
||||
|
||||
load("//tools:defaults.bzl", "ts_library")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle")
|
||||
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
|
||||
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
|
||||
|
||||
ng_module(
|
||||
name = "application_lib",
|
||||
srcs = glob(
|
||||
["**/*.ts"],
|
||||
exclude = ["**/*.spec.ts"],
|
||||
),
|
||||
deps = [
|
||||
"//packages:types",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"//packages/platform-browser",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
ts_library(
|
||||
name = "perf_lib",
|
||||
testonly = 1,
|
||||
srcs = ["benchmark_perf.spec.ts"],
|
||||
deps = [
|
||||
"//modules/e2e_util",
|
||||
"@npm//protractor",
|
||||
],
|
||||
)
|
||||
|
||||
ng_rollup_bundle(
|
||||
name = "bundle",
|
||||
entry_point = "modules/benchmarks/src/expanding_rows/index.js",
|
||||
deps = [
|
||||
":application_lib",
|
||||
"@npm//rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
ts_devserver(
|
||||
name = "prodserver",
|
||||
static_files = [
|
||||
":bundle.min_debug.js",
|
||||
":bundle.min.js",
|
||||
"@npm//node_modules/zone.js:dist/zone.js",
|
||||
"index.html",
|
||||
],
|
||||
)
|
||||
|
||||
ts_devserver(
|
||||
name = "devserver",
|
||||
entry_module = "angular/modules/benchmarks/src/expanding_rows/index",
|
||||
index_html = "index.html",
|
||||
scripts = [
|
||||
"@npm//node_modules/tslib:tslib.js",
|
||||
"//tools/rxjs:rxjs_umd_modules",
|
||||
],
|
||||
serving_path = "/index.js",
|
||||
static_files = [
|
||||
"@npm//node_modules/zone.js:dist/zone.js",
|
||||
"index.html",
|
||||
],
|
||||
deps = [":application_lib"],
|
||||
)
|
||||
|
||||
benchmark_test(
|
||||
name = "perf",
|
||||
server = ":prodserver",
|
||||
deps = [
|
||||
":perf_lib",
|
||||
],
|
||||
)
|
78
modules/benchmarks/src/expanding_rows/benchmark.ts
Normal file
78
modules/benchmarks/src/expanding_rows/benchmark.ts
Normal file
@ -0,0 +1,78 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {AfterViewInit, Component, NgModule, ViewChild, ViewEncapsulation} from '@angular/core';
|
||||
import {BrowserModule} from '@angular/platform-browser';
|
||||
|
||||
import {BenchmarkModule} from './benchmark_module';
|
||||
import {BenchmarkableExpandingRow} from './benchmarkable_expanding_row';
|
||||
import {BenchmarkableExpandingRowModule} from './benchmarkable_expanding_row_module';
|
||||
|
||||
@Component({
|
||||
selector: 'benchmark-root',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
template: `
|
||||
<h2>cfc-expanding-row initialization benchmark</h2>
|
||||
|
||||
<section>
|
||||
<button id="reset" (click)="reset()">Reset</button>
|
||||
<button id="init" (click)="init()">Init</button>
|
||||
<button id="run" (click)="runAll()">Run All</button>
|
||||
</section>
|
||||
|
||||
<benchmark-area>
|
||||
<benchmarkable-expanding-row></benchmarkable-expanding-row>
|
||||
</benchmark-area>`,
|
||||
})
|
||||
export class InitializationRoot implements AfterViewInit {
|
||||
@ViewChild(BenchmarkableExpandingRow, {static: true})
|
||||
expandingRow !: BenchmarkableExpandingRow;
|
||||
|
||||
ngAfterViewInit() {}
|
||||
|
||||
reset() { this.expandingRow.reset(); }
|
||||
|
||||
init() { this.expandingRow.init(); }
|
||||
|
||||
async runAll() {
|
||||
await execTimed('initialization_benchmark', async() => { await this.doInit(); });
|
||||
}
|
||||
|
||||
async handleInitClick() { await this.doInit(); }
|
||||
|
||||
private async doInit() {
|
||||
await execTimed('initial_load', async() => { this.expandingRow.init(); });
|
||||
}
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [InitializationRoot],
|
||||
exports: [InitializationRoot],
|
||||
imports: [
|
||||
CommonModule,
|
||||
BenchmarkableExpandingRowModule,
|
||||
BenchmarkModule,
|
||||
BrowserModule,
|
||||
],
|
||||
bootstrap: [InitializationRoot],
|
||||
})
|
||||
// Component benchmarks must export a BenchmarkModule.
|
||||
export class ExpandingRowBenchmarkModule {
|
||||
}
|
||||
|
||||
export async function execTimed(description: string, func: () => Promise<void>) {
|
||||
console.time(description);
|
||||
await func();
|
||||
await nextTick(200);
|
||||
console.timeEnd(description);
|
||||
}
|
||||
|
||||
export async function nextTick(delay = 1) {
|
||||
return new Promise((res, rej) => { setTimeout(() => { res(); }, delay); });
|
||||
}
|
51
modules/benchmarks/src/expanding_rows/benchmark_module.ts
Normal file
51
modules/benchmarks/src/expanding_rows/benchmark_module.ts
Normal file
@ -0,0 +1,51 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Component, ErrorHandler, Injectable, NgModule} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'benchmark-area',
|
||||
template: '<ng-content></ng-content>',
|
||||
styles: [`
|
||||
:host {
|
||||
padding: 1;
|
||||
margin: 1;
|
||||
background-color: white;
|
||||
width: 1000px;
|
||||
display: block;
|
||||
}`],
|
||||
host: {
|
||||
'class': 'cfc-ng2-region',
|
||||
}
|
||||
})
|
||||
export class BenchmarkArea {
|
||||
}
|
||||
|
||||
declare interface ExtendedWindow extends Window { benchmarkErrors?: string[]; }
|
||||
const extendedWindow = window as ExtendedWindow;
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
export class BenchmarkErrorHandler implements ErrorHandler {
|
||||
handleError(error: Error) {
|
||||
if (!extendedWindow.benchmarkErrors) {
|
||||
extendedWindow.benchmarkErrors = [];
|
||||
}
|
||||
extendedWindow.benchmarkErrors.push(error.message);
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [BenchmarkArea],
|
||||
exports: [BenchmarkArea],
|
||||
providers: [
|
||||
{provide: ErrorHandler, useClass: BenchmarkErrorHandler},
|
||||
]
|
||||
})
|
||||
export class BenchmarkModule {
|
||||
}
|
26
modules/benchmarks/src/expanding_rows/benchmark_perf.spec.ts
Normal file
26
modules/benchmarks/src/expanding_rows/benchmark_perf.spec.ts
Normal file
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {$, browser} from 'protractor';
|
||||
import {runBenchmark} from '../../../e2e_util/perf_util';
|
||||
|
||||
describe('benchmarks', () => {
|
||||
|
||||
it('should work for create', done => {
|
||||
browser.rootEl = '#root';
|
||||
runBenchmark({
|
||||
id: 'create',
|
||||
url: '',
|
||||
ignoreBrowserSynchronization: true,
|
||||
params: [],
|
||||
prepare: () => $('#reset').click(),
|
||||
work: () => $('#init').click()
|
||||
}).then(done, done.fail);
|
||||
});
|
||||
|
||||
});
|
@ -0,0 +1,73 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Component} from '@angular/core';
|
||||
|
||||
export interface MlbTeam {
|
||||
name: string;
|
||||
id: number;
|
||||
division: string;
|
||||
stadium: string;
|
||||
projection: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'benchmarkable-expanding-row',
|
||||
template: `
|
||||
<cfc-expanding-row-host *ngIf="showExpandingRow">
|
||||
<cfc-expanding-row *ngFor="let team of teams" [rowId]="$any(team.id)">
|
||||
<cfc-expanding-row-summary>
|
||||
Team {{team.id}}
|
||||
</cfc-expanding-row-summary>
|
||||
<cfc-expanding-row-details-caption>
|
||||
{{team.name}}
|
||||
<a href="https://www.google.com" class="cfc-demo-expanding-row-caption-link">
|
||||
{{team.id}}
|
||||
</a>
|
||||
</cfc-expanding-row-details-caption>
|
||||
<cfc-expanding-row-details-content>
|
||||
<ul ace-list>
|
||||
<li>Division: {{team.division}}</li>
|
||||
<li>
|
||||
<a href="https://www.google.com">{{team.stadium}}</a>
|
||||
</li>
|
||||
<li>Projected Record: {{team.projection}}</li>
|
||||
</ul>
|
||||
</cfc-expanding-row-details-content>
|
||||
</cfc-expanding-row>
|
||||
</cfc-expanding-row-host>`,
|
||||
})
|
||||
export class BenchmarkableExpandingRow {
|
||||
// TODO(b/109816955): remove '!', see go/strict-prop-init-fix.
|
||||
showExpandingRow !: boolean;
|
||||
|
||||
// TODO(b/109816955): remove '!', see go/strict-prop-init-fix.
|
||||
teams !: MlbTeam[];
|
||||
// TODO(b/109816955): remove '!', see go/strict-prop-init-fix.
|
||||
private fakeTeams !: MlbTeam[];
|
||||
|
||||
init(): void {
|
||||
this.teams = this.fakeTeams;
|
||||
this.showExpandingRow = true;
|
||||
}
|
||||
|
||||
reset(numItems = 5000): void {
|
||||
this.showExpandingRow = false;
|
||||
|
||||
this.fakeTeams = [];
|
||||
for (let i = 0; i < numItems; i++) {
|
||||
this.fakeTeams.push({
|
||||
name: `name ${i}`,
|
||||
id: i,
|
||||
division: `division ${i}`,
|
||||
stadium: `stadium ${i}`,
|
||||
projection: `projection ${i}`,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
|
||||
import {BenchmarkableExpandingRow} from './benchmarkable_expanding_row';
|
||||
import {ExpandingRowModule} from './expanding_row_module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [BenchmarkableExpandingRow],
|
||||
exports: [BenchmarkableExpandingRow],
|
||||
imports: [
|
||||
CommonModule,
|
||||
ExpandingRowModule,
|
||||
],
|
||||
})
|
||||
export class BenchmarkableExpandingRowModule {
|
||||
}
|
355
modules/benchmarks/src/expanding_rows/expanding_row.ts
Normal file
355
modules/benchmarks/src/expanding_rows/expanding_row.ts
Normal file
@ -0,0 +1,355 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, HostListener, Inject, InjectionToken, Input, Output, QueryList, ViewChild} from '@angular/core';
|
||||
|
||||
import {expanding_row_css} from './expanding_row_css';
|
||||
import {ExpandingRowSummary} from './expanding_row_summary';
|
||||
import {ExpandingRowToggleEvent} from './expanding_row_toggle_event';
|
||||
|
||||
|
||||
/**
|
||||
* Injection token to break cylic dependency between ExpandingRow and
|
||||
* ExpandingRowHost
|
||||
*/
|
||||
export const EXPANDING_ROW_HOST_INJECTION_TOKEN =
|
||||
new InjectionToken<ExpandingRowHostBase>('ExpandingRowHost');
|
||||
|
||||
/** The base class for ExpandingRowHost component to break cylic dependency. */
|
||||
export interface ExpandingRowHostBase {
|
||||
/**
|
||||
* A reference to all child cfc-expanding-row elements. We will need for
|
||||
* keyboard accessibility and scroll adjustments. For example, we need to know
|
||||
* which row is previous row when user presses "left arrow" on a focused row.
|
||||
*/
|
||||
contentRows: QueryList<ExpandingRow>;
|
||||
|
||||
/**
|
||||
* Keeps track of the last row that had focus before focus left the list
|
||||
* of expanding rows.
|
||||
*/
|
||||
lastFocusedRow?: ExpandingRow;
|
||||
|
||||
/**
|
||||
* Handles summary element click on a cfc-expanding-row component. Note
|
||||
* that summary element is visible only when the row is collapsed. So this
|
||||
* event will fired prior to expansion of a collapsed row. Scroll adjustment
|
||||
* below makes sure mouse stays on the caption element when the collapsed
|
||||
* row expands.
|
||||
*/
|
||||
handleRowSummaryClick(row: ExpandingRow): void;
|
||||
|
||||
/**
|
||||
* Check if element is blacklisted. Blacklisted elements will not collapse an
|
||||
* open row when clicked.
|
||||
*/
|
||||
isBlacklisted(element: HTMLElement|null): boolean;
|
||||
|
||||
/**
|
||||
* Handles caption element click on a cfc-expanding-row component. Note
|
||||
* that caption element is visible only when the row is expanded. So this
|
||||
* means we will collapse the expanded row. The scroll adjustment below
|
||||
* makes sure that the mouse stays under the summary of the expanded row
|
||||
* when the row collapses.
|
||||
*/
|
||||
handleRowCaptionClick(row: ExpandingRow): void;
|
||||
|
||||
/**
|
||||
* Handles expansion of a row. When a new row expands, we need to remove
|
||||
* previous expansion and collapse. We also need to save the currently
|
||||
* expanded row so that we can collapse this row once another row expands.
|
||||
*/
|
||||
handleRowExpand(row: ExpandingRow): void;
|
||||
|
||||
/**
|
||||
* Handles focus on a row. When a new row gets focus (note that this is
|
||||
* different from expansion), we need to remove previous focus and expansion.
|
||||
* We need to save the reference to this focused row so that we can unfocus
|
||||
* this row when another row is focused.
|
||||
*/
|
||||
handleRowFocus(row: ExpandingRow): void;
|
||||
|
||||
/**
|
||||
* Function that is called by expanding row summary to focus on the last
|
||||
* focusable element before the list of expanding rows.
|
||||
*/
|
||||
focusOnPreviousFocusableElement(): void;
|
||||
|
||||
/**
|
||||
* Function that is called by expanding row summary to focus on the next
|
||||
* focusable element after the list of expanding rows.
|
||||
*/
|
||||
focusOnNextFocusableElement(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* This component is used to render a single expanding row. It should contain
|
||||
* cfc-expanding-row-summary, cfc-expanding-row-details-caption and
|
||||
* cfc-expanding-row-details-content components.
|
||||
*/
|
||||
@Component({
|
||||
selector: 'cfc-expanding-row',
|
||||
styles: [expanding_row_css],
|
||||
template: `
|
||||
<div #expandingRowMainElement
|
||||
class="cfc-expanding-row"
|
||||
cdkMonitorSubtreeFocus
|
||||
[attr.tabindex]="isExpanded ? '0' : '-1'"
|
||||
[class.cfc-expanding-row-has-focus]="isFocused"
|
||||
[class.cfc-expanding-row-is-expanded]="isExpanded"
|
||||
ve="CfcExpandingRow">
|
||||
<ng-content></ng-content>
|
||||
</div>`,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class ExpandingRow {
|
||||
/**
|
||||
* The identifier for this node provided by the user code. We need this
|
||||
* while we are emitting onToggle event.
|
||||
*/
|
||||
@Input() rowId !: string;
|
||||
|
||||
/**
|
||||
* An ElementRef to the main element in this component. We need a reference
|
||||
* to this element to compute the height. The height of cfc-expanding-row
|
||||
* is used in [cfcExpandingRowHost] directive for scroll adjustments.
|
||||
*/
|
||||
@ViewChild('expandingRowMainElement', {static: true})
|
||||
expandingRowMainElement !: ElementRef;
|
||||
|
||||
/**
|
||||
* This @Output event emitter will be triggered when the user expands or
|
||||
* collapses this node.
|
||||
*/
|
||||
@Output() onToggle = new EventEmitter<ExpandingRowToggleEvent>();
|
||||
|
||||
/**
|
||||
* A boolean indicating if this node is expanded. This value is used to
|
||||
* hide/show summary, caption, and content of the expanding row. There should
|
||||
* only be one expanded row within [cfcExpandingRowHost] directive. And if
|
||||
* there is an expanded row, there shouldn't be any focused rows.
|
||||
*/
|
||||
set isExpanded(value: boolean) {
|
||||
const changed: boolean = this.isExpandedInternal !== value;
|
||||
this.isExpandedInternal = value;
|
||||
|
||||
if (changed) {
|
||||
this.isExpandedChange.emit();
|
||||
this.changeDetectorRef.markForCheck();
|
||||
}
|
||||
}
|
||||
|
||||
/** TS getter for isExpanded property. */
|
||||
get isExpanded(): boolean { return this.isExpandedInternal; }
|
||||
|
||||
/** Triggered when isExpanded property changes. */
|
||||
isExpandedChange = new EventEmitter<void>();
|
||||
|
||||
/** Triggered when index property changes. */
|
||||
indexChange = new EventEmitter<void>();
|
||||
|
||||
/**
|
||||
* A boolean indicating if this node is focused. This value is used to add
|
||||
* a CSS class that should render a blue border on the right. There should
|
||||
* only be one focused row in [cfcExpandingRowHost] directive.
|
||||
*/
|
||||
set isFocused(value: boolean) {
|
||||
this.isFocusedInternal = value;
|
||||
this.changeDetectorRef.markForCheck();
|
||||
}
|
||||
|
||||
/** TS getter for isFocused property. */
|
||||
get isFocused(): boolean { return this.isFocusedInternal; }
|
||||
|
||||
/** The index of the row in the context of the entire collection. */
|
||||
set index(value: number) {
|
||||
const changed: boolean = this.indexInternal !== value;
|
||||
this.indexInternal = value;
|
||||
|
||||
if (changed) {
|
||||
this.indexChange.emit();
|
||||
this.changeDetectorRef.markForCheck();
|
||||
}
|
||||
}
|
||||
|
||||
/** TS getter for index property. */
|
||||
get index(): number { return this.indexInternal; }
|
||||
|
||||
/**
|
||||
* We should probably rename this to summaryContentChild. Because technically
|
||||
* this is not a @ViewChild that is in a template. This will be transcluded.
|
||||
* Note that we are not using @ContentChild directive here. The @ContentChild
|
||||
* will cause cyclic reference if the class definition for ExpandingRowSummary
|
||||
* component is not in the same file as ExpandingRow.
|
||||
*/
|
||||
// TODO(b/109816955): remove '!', see go/strict-prop-init-fix.
|
||||
summaryViewChild !: ExpandingRowSummary;
|
||||
|
||||
/**
|
||||
* We compute the collapsed height (which is just height of
|
||||
* cfc-expanding-row-summary component) in this component. This is used in
|
||||
* [cfcExpandingRowHost] for scroll adjustment calculation.
|
||||
*/
|
||||
collapsedHeight = -1;
|
||||
|
||||
/** Internal storage for isExpanded public property. */
|
||||
private isExpandedInternal = false;
|
||||
|
||||
/** Internal storage for isFocused public property. */
|
||||
private isFocusedInternal = false;
|
||||
|
||||
/** Internal storage for index public property. */
|
||||
// TODO(b/109816955): remove '!', see go/strict-prop-init-fix.
|
||||
private indexInternal !: number;
|
||||
|
||||
/**
|
||||
* This holds a reference to [cfcExpandingRowHost] directive. We need
|
||||
* this reference to notify the host when this row expands/collapses or is
|
||||
* focused.
|
||||
*/
|
||||
constructor(
|
||||
public elementRef: ElementRef,
|
||||
@Inject(EXPANDING_ROW_HOST_INJECTION_TOKEN) public expandingRowHost: ExpandingRowHostBase,
|
||||
private readonly changeDetectorRef: ChangeDetectorRef) {}
|
||||
|
||||
/**
|
||||
* Handles click on cfc-expanding-row-summary component. This will expand
|
||||
* this row and collapse the previously expanded row. The collapse & blur
|
||||
* is handled in [cfcExpandingRowHost] directive.
|
||||
*/
|
||||
handleSummaryClick(): void {
|
||||
this.collapsedHeight =
|
||||
this.elementRef.nativeElement.querySelector('.cfc-expanding-row-summary').offsetHeight;
|
||||
this.expandingRowHost.handleRowSummaryClick(this);
|
||||
this.expand();
|
||||
}
|
||||
|
||||
/**
|
||||
* When user tabs into child cfc-expanding-row-summary component. This method
|
||||
* will make sure we focuse on this row, and blur on previously focused row.
|
||||
*/
|
||||
handleSummaryFocus(): void { this.focus(); }
|
||||
|
||||
/**
|
||||
* cfc-expanding-row-details-caption component will call this function to
|
||||
* notify click on its host element. Note that caption is only shown when
|
||||
* the row is expanded. Hence this will collapse this row and put the focus
|
||||
* on it.
|
||||
* If a blacklisted element exists in the caption, clicking that element will
|
||||
* not trigger the row collapse.
|
||||
*/
|
||||
handleCaptionClick(event: MouseEvent): void {
|
||||
if (this.expandingRowHost.isBlacklisted(event.target as {} as HTMLElement)) {
|
||||
return;
|
||||
}
|
||||
this.expandingRowHost.handleRowCaptionClick(this);
|
||||
this.collapse();
|
||||
this.focus();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the height of this component. This height is used in parent
|
||||
* [cfcExpandingRowHost] directive to compute scroll adjustment.
|
||||
*/
|
||||
getHeight(): number { return this.expandingRowMainElement.nativeElement.offsetHeight; }
|
||||
|
||||
/**
|
||||
* Expands this row. This will notify the host so that it can collapse
|
||||
* previously expanded row. This function also emits onToggle @Output event
|
||||
* to the user code.
|
||||
*/
|
||||
expand(): void {
|
||||
this.isExpanded = true;
|
||||
this.expandingRowHost.handleRowExpand(this);
|
||||
|
||||
// setTimeout here makes sure we scroll this row into view after animation.
|
||||
setTimeout(() => { this.expandingRowMainElement.nativeElement.focus(); });
|
||||
|
||||
this.onToggle.emit({rowId: this.rowId, isExpand: true});
|
||||
}
|
||||
|
||||
/**
|
||||
* Collapses this row. Setting isExpanded to false will make sure we hide
|
||||
* the caption and details, and show cfc-expanding-row-summary component.
|
||||
* This also emits onToggle @Output event to the user code.
|
||||
*/
|
||||
collapse(): void {
|
||||
this.isExpanded = false;
|
||||
this.onToggle.emit({rowId: this.rowId, isExpand: false});
|
||||
}
|
||||
|
||||
/**
|
||||
* Blurs this row. This should remove the blue border on the left if there
|
||||
* is any. This function will remove DOM focus on the
|
||||
* cfc-expanding-row-summary
|
||||
* component.
|
||||
*/
|
||||
blur(): void {
|
||||
this.isFocused = false;
|
||||
this.summaryViewChild.blur();
|
||||
}
|
||||
|
||||
/**
|
||||
* Focuses this row. This should put blue border on the left. If there is
|
||||
* any previous focus/selection, those should be gone. Parent
|
||||
* [cfcExpandingRowHost] component takes care of that.
|
||||
*/
|
||||
focus(): void {
|
||||
this.isFocused = true;
|
||||
this.expandingRowHost.handleRowFocus(this);
|
||||
|
||||
// Summary child is not present currently. We need to NG2 to update the
|
||||
// template.
|
||||
setTimeout(() => { this.summaryViewChild.focus(); });
|
||||
}
|
||||
|
||||
/**
|
||||
* We listen for TAB press here to make sure we trap the focus on the
|
||||
* expanded
|
||||
* row. If the row is not expanded, we don't care about this event since focus
|
||||
* trap should work for expanded rows only.
|
||||
*/
|
||||
@HostListener('keydown', ['$event'])
|
||||
handleKeyDown(event: KeyboardEvent) {
|
||||
const charCode = event.which || event.keyCode;
|
||||
|
||||
switch (charCode) {
|
||||
case 9:
|
||||
if (!this.isExpanded) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.trapFocus(event);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* When this row is expanded, this function traps the focus between focusable
|
||||
* elements contained in this row.
|
||||
*/
|
||||
private trapFocus(event: KeyboardEvent): void {
|
||||
const rowElement: HTMLElement = this.expandingRowMainElement.nativeElement;
|
||||
const focusableEls: HTMLElement[] = [];
|
||||
let lastFocusableEl: HTMLElement = rowElement;
|
||||
|
||||
if (focusableEls.length) {
|
||||
lastFocusableEl = focusableEls[focusableEls.length - 1];
|
||||
}
|
||||
|
||||
if (event.target === lastFocusableEl && !event.shiftKey) {
|
||||
rowElement.focus();
|
||||
event.preventDefault();
|
||||
} else if (event.target === rowElement && event.shiftKey) {
|
||||
lastFocusableEl.focus();
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Directive} from '@angular/core';
|
||||
|
||||
|
||||
/**
|
||||
* This directive is used to flag an element to NOT trigger collapsing an
|
||||
* expanded row
|
||||
*/
|
||||
@Directive({
|
||||
selector: '[cfcExpandingRowBlacklist]',
|
||||
})
|
||||
export class ExpandingRowBlacklist {
|
||||
}
|
87
modules/benchmarks/src/expanding_rows/expanding_row_css.ts
Normal file
87
modules/benchmarks/src/expanding_rows/expanding_row_css.ts
Normal file
@ -0,0 +1,87 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
export const expanding_row_css = `
|
||||
::ng-deep [cfcExpandingRowHost] {
|
||||
display: block;
|
||||
margin-bottom: 2;
|
||||
}
|
||||
|
||||
:host(cfc-expanding-row),
|
||||
:host(cfc-expanding-row-summary),
|
||||
:host(cfc-expanding-row-details-caption),
|
||||
:host(cfc-expanding-row-details-content) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.cfc-expanding-row {
|
||||
background: white;
|
||||
border-top: 1 solid black;
|
||||
box-shadow: 0 1 1 gray;
|
||||
transition: margin 1 1;
|
||||
will-change: margin;
|
||||
}
|
||||
|
||||
.cfc-expanding-row.cfc-expanding-row-is-expanded {
|
||||
margin: 1 (-1);
|
||||
}
|
||||
|
||||
.cfc-expanding-row:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.cfc-expanding-row-summary {
|
||||
|
||||
display: flex;
|
||||
border-left: 6 solid transparent;
|
||||
cursor: pointer;
|
||||
padding: 6 2;
|
||||
|
||||
}
|
||||
|
||||
.cfc-expanding-row-summary:focus {
|
||||
outline: none;
|
||||
border-left-color: $cfc-color-active;
|
||||
}
|
||||
|
||||
// Adjust icons to be positioned correctly in the row.
|
||||
.cfc-expanding-row-summary::ng-deep cfc-icon {
|
||||
margin-top: 3;
|
||||
}
|
||||
|
||||
.cfc-expanding-row-details-caption {
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
padding: 4 2;
|
||||
|
||||
}
|
||||
|
||||
.cfc-expanding-row-details-caption::ng-deep a,
|
||||
.cfc-expanding-row-details-caption::ng-deep a:visited,
|
||||
.cfc-expanding-row-details-caption::ng-deep a .cfc-external-link-content {
|
||||
border-color: $cfc-color-text-primary-inverse;
|
||||
color: $cfc-color-text-primary-inverse;
|
||||
}
|
||||
|
||||
// Adjust icons to be positioned correctly in the row.
|
||||
::ng-deep cfc-icon {
|
||||
margin-top: 3;
|
||||
}
|
||||
|
||||
.cfc-expanding-row-details-content {
|
||||
padding: 2;
|
||||
}
|
||||
|
||||
.cfc-expanding-row-details-content::ng-deep .ace-kv-list.cfc-full-bleed {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
|
||||
.cfc-expanding-row-accessibility-text {
|
||||
display: none;
|
||||
}`;
|
@ -0,0 +1,53 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
|
||||
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Host, Input, OnDestroy} from '@angular/core';
|
||||
import {Subject} from 'rxjs';
|
||||
import {takeUntil} from 'rxjs/operators';
|
||||
|
||||
import {ExpandingRow} from './expanding_row';
|
||||
import {expanding_row_css} from './expanding_row_css';
|
||||
|
||||
/**
|
||||
* This component should be within cfc-expanding-row component. The caption
|
||||
* is only visible when the row is expanded.
|
||||
*/
|
||||
@Component({
|
||||
selector: 'cfc-expanding-row-details-caption',
|
||||
styles: [expanding_row_css],
|
||||
template: `
|
||||
<div *ngIf="expandingRow.isExpanded"
|
||||
(click)="expandingRow.handleCaptionClick($event)"
|
||||
[style.backgroundColor]="color"
|
||||
class="cfc-expanding-row-details-caption">
|
||||
<ng-content></ng-content>
|
||||
</div>`,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class ExpandingRowDetailsCaption implements OnDestroy {
|
||||
/** The background color of this component. */
|
||||
@Input() color: string = 'blue';
|
||||
|
||||
/** This is triggered when this component is destroyed. */
|
||||
private readonly onDestroy = new Subject();
|
||||
|
||||
/**
|
||||
* We need a reference to parent cfc-expanding-row component here to hide
|
||||
* this component when the row is collapsed. We also need to relay clicks
|
||||
* to the parent component.
|
||||
*/
|
||||
constructor(@Host() public expandingRow: ExpandingRow, changeDetectorRef: ChangeDetectorRef) {
|
||||
this.expandingRow.isExpandedChange.pipe(takeUntil(this.onDestroy)).subscribe(() => {
|
||||
changeDetectorRef.markForCheck();
|
||||
});
|
||||
}
|
||||
|
||||
/** When component is destroyed, unlisten to isExpanded. */
|
||||
ngOnDestroy(): void { this.onDestroy.next(); }
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Host, OnDestroy} from '@angular/core';
|
||||
import {Subscription} from 'rxjs';
|
||||
|
||||
import {ExpandingRow} from './expanding_row';
|
||||
import {expanding_row_css} from './expanding_row_css';
|
||||
|
||||
/**
|
||||
* This component should be within cfc-expanding-row component. Note that the
|
||||
* content is visible only when the row is expanded.
|
||||
*/
|
||||
@Component({
|
||||
styles: [expanding_row_css],
|
||||
selector: 'cfc-expanding-row-details-content',
|
||||
template: `
|
||||
<div class="cfc-expanding-row-details-content"
|
||||
*ngIf="expandingRow.isExpanded">
|
||||
<ng-content></ng-content>
|
||||
</div>`,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class ExpandingRowDetailsContent implements OnDestroy {
|
||||
/** Used for unsubscribing to changes in isExpanded parent property. */
|
||||
private isExpandedChangeSubscription: Subscription;
|
||||
|
||||
/**
|
||||
* We need a reference to parent cfc-expanding-row component to make sure we
|
||||
* hide this component if the row is collapsed.
|
||||
*/
|
||||
constructor(@Host() public expandingRow: ExpandingRow, changeDetectorRef: ChangeDetectorRef) {
|
||||
this.isExpandedChangeSubscription =
|
||||
this.expandingRow.isExpandedChange.subscribe(() => { changeDetectorRef.markForCheck(); });
|
||||
}
|
||||
|
||||
/** Unsubscribe from changes in parent isExpanded property. */
|
||||
ngOnDestroy(): void { this.isExpandedChangeSubscription.unsubscribe(); }
|
||||
}
|
497
modules/benchmarks/src/expanding_rows/expanding_row_host.ts
Normal file
497
modules/benchmarks/src/expanding_rows/expanding_row_host.ts
Normal file
@ -0,0 +1,497 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {AfterContentInit, AfterViewInit, ChangeDetectionStrategy, Component, ContentChildren, ElementRef, EventEmitter, HostListener, Input, OnDestroy, Output, QueryList, ViewChild, forwardRef} from '@angular/core';
|
||||
import {Subscription} from 'rxjs';
|
||||
|
||||
import {EXPANDING_ROW_HOST_INJECTION_TOKEN, ExpandingRow, ExpandingRowHostBase} from './expanding_row';
|
||||
|
||||
|
||||
/**
|
||||
* We use this class in <cfc-expanding-row/> template to identify the row.
|
||||
* The [cfcExpandingRowHost] directive also uses this class to check if a given
|
||||
* HTMLElement is within an <cfc-expanding-row/>.
|
||||
*/
|
||||
const EXPANDING_ROW_CLASS_NAME = 'cfc-expanding-row';
|
||||
|
||||
/** Throttle duration in milliseconds for repeated key presses. */
|
||||
export const EXPANDING_ROW_KEYPRESS_THORTTLE_MS = 50;
|
||||
|
||||
/**
|
||||
* This type union is created to make arguments of handleUpOrDownPress*
|
||||
* methods in ExpandingRowHost class more readable.
|
||||
*/
|
||||
type UpOrDown = 'up' | 'down';
|
||||
|
||||
/**
|
||||
* This is the wrapper directive for the cfc-expanding-row components. Note that
|
||||
* we wanted to make this a directive instead of component because child
|
||||
* cfc-expanding-row components does not have to be a direct child.
|
||||
*/
|
||||
@Component({
|
||||
selector: 'cfc-expanding-row-host',
|
||||
template: `
|
||||
<div #firstFocusable
|
||||
(focus)="focusOnLastFocusedRow()"
|
||||
tabindex="0">
|
||||
</div>
|
||||
<ng-content></ng-content>
|
||||
<div #lastFocusable
|
||||
(focus)="focusOnLastFocusedRow()"
|
||||
tabindex="0">
|
||||
</div>`,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
providers: [{provide: EXPANDING_ROW_HOST_INJECTION_TOKEN, useExisting: ExpandingRowHost}],
|
||||
})
|
||||
export class ExpandingRowHost implements AfterViewInit,
|
||||
OnDestroy, ExpandingRowHostBase {
|
||||
/**
|
||||
* An HTML selector (e.g. "body") for the scroll element. We need this to
|
||||
* make some scroll adjustments.
|
||||
*/
|
||||
@Input() scrollElementSelector = '.cfc-panel-body-scrollable';
|
||||
|
||||
/**
|
||||
* An HTML selector (e.g. "body") for the click root. While the row is
|
||||
* expanded, and user clicks outside of the expanded row, we collapse this row
|
||||
* But to do this, we need to know the clickable area.
|
||||
*/
|
||||
@Input() clickRootElementSelector = 'cfc-panel-body';
|
||||
|
||||
/**
|
||||
* The @Output will be triggered when the user wants to focus on the
|
||||
* previously expanded row, and we are already at the first row. The logs team
|
||||
* will use this to prepend data on demand.
|
||||
*/
|
||||
@Output() onPrepend = new EventEmitter<void>();
|
||||
|
||||
/** A reference to the last focusable element in list of expanding rows. */
|
||||
@ViewChild('lastFocusable', {static: true}) lastFocusableElement !: ElementRef;
|
||||
|
||||
/** A reference to the first focusable element in list of expanding rows. */
|
||||
@ViewChild('firstFocusable', {static: true})
|
||||
firstFocusableElement !: ElementRef;
|
||||
|
||||
/**
|
||||
* A reference to all child cfc-expanding-row elements. We will need for
|
||||
* keyboard accessibility and scroll adjustments. For example, we need to know
|
||||
* which row is previous row when user presses "left arrow" on a focused row.
|
||||
*/
|
||||
@ContentChildren(forwardRef(() => ExpandingRow), {descendants: true})
|
||||
contentRows !: QueryList<ExpandingRow>;
|
||||
|
||||
/**
|
||||
* Keeps track of the last row that had focus before focus left the list
|
||||
* of expanding rows.
|
||||
*/
|
||||
lastFocusedRow?: ExpandingRow = undefined;
|
||||
|
||||
/**
|
||||
* Focused rows just show a blue left border. This node is not expanded. We
|
||||
* need to keep a reference to the focused row to unfocus when another row
|
||||
* is focused.
|
||||
*/
|
||||
private focusedRow?: ExpandingRow = undefined;
|
||||
|
||||
/**
|
||||
* This is the expanded row. If there is an expanded row there shouldn't be
|
||||
* any focused rows. We need a reference to this. For example we need to
|
||||
* collapse the currently expanded row, if another row is expanded.
|
||||
*/
|
||||
private expandedRow?: ExpandingRow = undefined;
|
||||
|
||||
/**
|
||||
* This is just handleRootMouseUp.bind(this). handleRootMouseUp handles
|
||||
* click events on root element (defined by clickRootElementSelector @Input)
|
||||
* Since we attach the click listener dynamically, we need to keep this
|
||||
* function around. This enables us to detach the click listener when
|
||||
* component is destroyed.
|
||||
*/
|
||||
private handleRootMouseUpBound: EventListenerObject = this.handleRootMouseUp.bind(this);
|
||||
|
||||
/**
|
||||
* 16px is the margin animation we have on cfc-expanding-row component.
|
||||
* We need this value to compute scroll adjustments.
|
||||
*/
|
||||
private static rowMargin = 16;
|
||||
|
||||
/** Subscription to changes in the expanding rows. */
|
||||
// TODO(b/109816955): remove '!', see go/strict-prop-init-fix.
|
||||
private rowChangeSubscription !: Subscription;
|
||||
|
||||
/**
|
||||
* When component initializes we need to attach click listener to the root
|
||||
* element. This click listener will allows us to collapse the
|
||||
* currently expanded row when user clicks outside of it.
|
||||
*/
|
||||
ngAfterViewInit(): void {
|
||||
const clickRootElement: HTMLElement = this.getClickRootElement();
|
||||
|
||||
if (!clickRootElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
clickRootElement.addEventListener('mouseup', this.handleRootMouseUpBound);
|
||||
|
||||
this.rowChangeSubscription =
|
||||
this.contentRows.changes.subscribe(() => { this.recalcRowIndexes(); });
|
||||
this.recalcRowIndexes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Detaches the click listener on the root element. Note that we are attaching
|
||||
* this listener on ngAfterViewInit function.
|
||||
*/
|
||||
ngOnDestroy(): void {
|
||||
const clickRootElement: HTMLElement = this.getClickRootElement();
|
||||
|
||||
if (!clickRootElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
clickRootElement.removeEventListener('mouseup', this.handleRootMouseUpBound);
|
||||
|
||||
if (this.rowChangeSubscription) {
|
||||
this.rowChangeSubscription.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles caption element click on a cfc-expanding-row component. Note
|
||||
* that caption element is visible only when the row is expanded. So this
|
||||
* means we will collapse the expanded row. The scroll adjustment below
|
||||
* makes sure that the mouse stays under the summary of the expanded row
|
||||
* when the row collapses.
|
||||
*/
|
||||
handleRowCaptionClick(row: ExpandingRow): void {
|
||||
const scrollAdjustment: number = -ExpandingRowHost.rowMargin;
|
||||
const scrollElement: HTMLElement = this.getScrollElement() as HTMLElement;
|
||||
if (!scrollElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
scrollElement.scrollTop += scrollAdjustment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles summary element click on a cfc-expanding-row component. Note
|
||||
* that summary element is visible only when the row is collapsed. So this
|
||||
* event will fired prior to expansion of a collapsed row. Scroll adjustment
|
||||
* below makes sure mouse stays on the caption element when the collapsed
|
||||
* row expands.
|
||||
*/
|
||||
handleRowSummaryClick(row: ExpandingRow): void {
|
||||
const hadPreviousSelection: boolean = !!this.expandedRow;
|
||||
const previousSelectedRowIndex: number = this.getRowIndex(this.expandedRow as ExpandingRow);
|
||||
const newSelectedRowIndex: number = this.getRowIndex(row);
|
||||
const previousCollapsedHeight: number = this.getSelectedRowCollapsedHeight();
|
||||
const previousExpansionHeight = this.getSelectedRowExpandedHeight();
|
||||
|
||||
if (this.expandedRow) {
|
||||
return;
|
||||
}
|
||||
|
||||
let scrollAdjustment = 0;
|
||||
const scrollElement: HTMLElement = this.getScrollElement() as HTMLElement;
|
||||
if (!scrollElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (previousExpansionHeight > 0 && previousCollapsedHeight >= 0) {
|
||||
scrollAdjustment = previousExpansionHeight - previousCollapsedHeight;
|
||||
}
|
||||
|
||||
const newSelectionIsInfrontOfPrevious: boolean = newSelectedRowIndex > previousSelectedRowIndex;
|
||||
const multiplier = newSelectionIsInfrontOfPrevious ? -1 : 0;
|
||||
scrollAdjustment = scrollAdjustment * multiplier + ExpandingRowHost.rowMargin;
|
||||
|
||||
scrollElement.scrollTop += scrollAdjustment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles expansion of a row. When a new row expands, we need to remove
|
||||
* previous expansion and collapse. We also need to save the currently
|
||||
* expanded row so that we can collapse this row once another row expands.
|
||||
*/
|
||||
handleRowExpand(row: ExpandingRow): void {
|
||||
this.removePreviousFocus();
|
||||
this.removePreviousExpansion();
|
||||
this.expandedRow = row;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles focus on a row. When a new row gets focus (note that this is
|
||||
* different from expansion), we need to remove previous focus and expansion.
|
||||
* We need to save the reference to this focused row so that we can unfocus
|
||||
* this row when another row is focused.
|
||||
*/
|
||||
handleRowFocus(row: ExpandingRow): void {
|
||||
// Do not blur then refocus the row if it's already selected.
|
||||
if (row === this.focusedRow) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.removePreviousFocus();
|
||||
this.removePreviousExpansion();
|
||||
this.focusedRow = row;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when shift+tabbing from the first focusable element after the list
|
||||
* of expanding rows or tabbing from the last focusable element before.
|
||||
*/
|
||||
focusOnLastFocusedRow(): void {
|
||||
if (!this.lastFocusedRow) {
|
||||
this.lastFocusedRow = this.contentRows.toArray()[0];
|
||||
}
|
||||
this.lastFocusedRow.focus();
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that is called by expanding row summary to focus on the last
|
||||
* focusable element before the list of expanding rows.
|
||||
*/
|
||||
focusOnPreviousFocusableElement(): void { this.lastFocusedRow = this.focusedRow; }
|
||||
|
||||
/**
|
||||
* Function that is called by expanding row summary to focus on the next
|
||||
* focusable element after the list of expanding rows.
|
||||
*/
|
||||
focusOnNextFocusableElement(): void { this.lastFocusedRow = this.focusedRow; }
|
||||
|
||||
/**
|
||||
* Handles keydown event on the host. We are just concerned with up,
|
||||
* down arrow, ESC, and ENTER presses here. Note that Up/Down presses
|
||||
* can be repeated.
|
||||
*
|
||||
* - Up: Focuses on the row above.
|
||||
* - Down: Focuses on the row below.
|
||||
* - Escape: Collapses the expanded row.
|
||||
* - Enter: Expands the focused row.
|
||||
*/
|
||||
@HostListener('keydown', ['$event'])
|
||||
handleKeyDown(event: KeyboardEvent) {}
|
||||
|
||||
/**
|
||||
* Recursively returns true if target HTMLElement is within a
|
||||
* cfc-expanding-row component. It will return false otherwise.
|
||||
* We need this function in handleRootMouseUp to collapse the expanded row
|
||||
* when user clicks outside of all expanded rows.
|
||||
*/
|
||||
private isTargetInRow(target: HTMLElement): boolean {
|
||||
return target.classList.contains(EXPANDING_ROW_CLASS_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the click root element that is described by clickRootElementSelector
|
||||
* @Input value.
|
||||
*/
|
||||
private getClickRootElement(): HTMLElement {
|
||||
return document.querySelector(this.clickRootElementSelector) as HTMLElement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles all of the mouseup events on the click root. When user clicks
|
||||
* outside of an expanded row, we need to collapse that row.
|
||||
* We trigger collapse by calling handleCaptionClick() on the expanded row.
|
||||
*/
|
||||
private handleRootMouseUp(event: MouseEvent): void {
|
||||
if (!this.expandedRow) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.isTargetInRow(event.target as {} as HTMLElement)) {
|
||||
this.expandedRow.handleCaptionClick(event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if element is blacklisted. Blacklisted elements will not collapse an
|
||||
* open row when clicked.
|
||||
*/
|
||||
isBlacklisted(element: HTMLElement|null): boolean {
|
||||
const clickRoot = this.getClickRootElement();
|
||||
while (element && element !== clickRoot) {
|
||||
if (element.hasAttribute('cfcexpandingrowblacklist')) {
|
||||
return true;
|
||||
}
|
||||
element = element.parentElement;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes focus state from a previously focused row. We blur this row and
|
||||
* set the focusedRow to undefined in this method. This usually happens when
|
||||
* another row is focused.
|
||||
*/
|
||||
private removePreviousFocus(): void {
|
||||
if (this.focusedRow) {
|
||||
this.focusedRow.blur();
|
||||
this.focusedRow = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the expanded state from a previously expanded row. We collapse this
|
||||
* row and set the expandedRow to undefined in this method. This usually
|
||||
* happens when another row is expanded.
|
||||
*/
|
||||
private removePreviousExpansion(): void {
|
||||
if (this.expandedRow) {
|
||||
this.expandedRow.collapse();
|
||||
this.expandedRow = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the collapsed height of the currently expanded row. We need this for
|
||||
* scroll adjustments. Note that collapsed height of a cfc-expanding-row
|
||||
* component is equal to height of cfc-expanding-row-summary component within
|
||||
* the row.
|
||||
*/
|
||||
private getSelectedRowCollapsedHeight(): number {
|
||||
if (this.expandedRow) {
|
||||
return this.expandedRow.collapsedHeight;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current height of the expanded row. We need this value for the
|
||||
* scroll adjustment computation.
|
||||
*/
|
||||
private getSelectedRowExpandedHeight(): number {
|
||||
if (this.expandedRow) {
|
||||
return this.expandedRow.getHeight();
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the HTML element described by scrollElementSelector @Input value.
|
||||
* We need this value for scroll adjustments.
|
||||
*/
|
||||
private getScrollElement(): HTMLElement|undefined {
|
||||
if (!this.scrollElementSelector) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return document.querySelector(this.scrollElementSelector) as HTMLElement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles escape presses on the host element. Escape removes previous focus
|
||||
* if there is one. If there is an expanded row, escape row collapses this
|
||||
* row and focuses on it. A subsequent escape press will blur this row.
|
||||
*/
|
||||
private handleEscapePress(): void {
|
||||
this.removePreviousFocus();
|
||||
|
||||
if (this.expandedRow) {
|
||||
this.expandedRow.collapse();
|
||||
this.expandedRow.focus();
|
||||
this.expandedRow = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles enter keypress. If there is a focused row, an enter key press on
|
||||
* host element will expand this row.
|
||||
*/
|
||||
private handleEnterPress(): void {
|
||||
if (document.activeElement !== this.focusedRowSummary()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.focusedRow) {
|
||||
this.focusedRow.expand();
|
||||
}
|
||||
}
|
||||
|
||||
/** Returns the HTMLElement that is the currently focused row summary. */
|
||||
private focusedRowSummary(): HTMLElement|undefined {
|
||||
return this.focusedRow ? this.focusedRow.summaryViewChild.mainElementRef.nativeElement :
|
||||
undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the index of a given row. This enables us to figure out the row
|
||||
* above/below the focused row.
|
||||
*/
|
||||
private getRowIndex(rowToLookFor: ExpandingRow): number {
|
||||
return rowToLookFor ? rowToLookFor.index : -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles up/down arrow presses on the host element. Up arrow press will
|
||||
* focus/expand on the row above. Down arrow press will focus/expand the row
|
||||
* below. If we have a focus on the current row, this function will focus on
|
||||
* the computed (the one above or below) row. If host has an expanded row,
|
||||
* this function will expand the computed row.
|
||||
*/
|
||||
private handleUpOrDownPressOnce(upOrDown: UpOrDown, event: KeyboardEvent): void {
|
||||
event.preventDefault();
|
||||
|
||||
// If row is expanded but focus is inside the expanded element, arrow
|
||||
// key presses should not do anything.
|
||||
if (this.expandedRow &&
|
||||
document.activeElement !== this.expandedRow.expandingRowMainElement.nativeElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If focus is inside a collapsed row header, arrow key presses should not
|
||||
// do anything.
|
||||
if (this.focusedRow && document.activeElement !== this.focusedRowSummary()) {
|
||||
return;
|
||||
}
|
||||
// We only want screen reader to read the message the first time we enter
|
||||
// the list of expanding rows, so we must reset the variable here
|
||||
this.lastFocusedRow = undefined;
|
||||
|
||||
const rowToLookFor: ExpandingRow|undefined = this.expandedRow || this.focusedRow;
|
||||
if (!rowToLookFor) {
|
||||
return;
|
||||
}
|
||||
|
||||
const isFocus: boolean = (rowToLookFor === this.focusedRow);
|
||||
|
||||
const rowIndex: number = this.getRowIndex(rowToLookFor);
|
||||
const contentRowsArray: ExpandingRow[] = this.contentRows.toArray();
|
||||
|
||||
if (rowIndex < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const potentialIndex: number = (upOrDown === 'up' ? -1 : +1) + rowIndex;
|
||||
if (potentialIndex < 0) {
|
||||
this.onPrepend.emit();
|
||||
return;
|
||||
}
|
||||
|
||||
if (potentialIndex >= contentRowsArray.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
const potentialRow: ExpandingRow = contentRowsArray[potentialIndex];
|
||||
if (isFocus) {
|
||||
potentialRow.focus();
|
||||
} else {
|
||||
potentialRow.expand();
|
||||
}
|
||||
}
|
||||
|
||||
// Updates all of the rows with their new index.
|
||||
private recalcRowIndexes() {
|
||||
let index = 0;
|
||||
setTimeout(
|
||||
() => { this.contentRows.forEach((row: ExpandingRow) => { row.index = index++; }); });
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
|
||||
import {ExpandingRow} from './expanding_row';
|
||||
import {ExpandingRowBlacklist} from './expanding_row_blacklist';
|
||||
import {ExpandingRowDetailsCaption} from './expanding_row_details_caption';
|
||||
import {ExpandingRowDetailsContent} from './expanding_row_details_content';
|
||||
import {ExpandingRowHost} from './expanding_row_host';
|
||||
import {ExpandingRowSummary} from './expanding_row_summary';
|
||||
|
||||
/** The main module for the cfc-expanding-row component. */
|
||||
@NgModule({
|
||||
declarations: [
|
||||
ExpandingRow,
|
||||
ExpandingRowDetailsCaption,
|
||||
ExpandingRowDetailsContent,
|
||||
ExpandingRowHost,
|
||||
ExpandingRowSummary,
|
||||
ExpandingRowBlacklist,
|
||||
],
|
||||
exports: [
|
||||
ExpandingRow,
|
||||
ExpandingRowDetailsCaption,
|
||||
ExpandingRowDetailsContent,
|
||||
ExpandingRowHost,
|
||||
ExpandingRowSummary,
|
||||
ExpandingRowBlacklist,
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
],
|
||||
})
|
||||
export class ExpandingRowModule {
|
||||
}
|
207
modules/benchmarks/src/expanding_rows/expanding_row_summary.ts
Normal file
207
modules/benchmarks/src/expanding_rows/expanding_row_summary.ts
Normal file
@ -0,0 +1,207 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Host, HostListener, OnDestroy, ViewChild} from '@angular/core';
|
||||
import {Subscription} from 'rxjs';
|
||||
|
||||
import {ExpandingRow} from './expanding_row';
|
||||
import {expanding_row_css} from './expanding_row_css';
|
||||
|
||||
const KEY_CODE_TAB = 9;
|
||||
|
||||
/**
|
||||
* This component should be used within cfc-expanding-row component. Note that
|
||||
* summary is visible only when the row is collapsed.
|
||||
*/
|
||||
@Component({
|
||||
selector: 'cfc-expanding-row-summary',
|
||||
styles: [expanding_row_css],
|
||||
template: `
|
||||
<div *ngIf="!expandingRow.isExpanded"
|
||||
#expandingRowSummaryMainElement
|
||||
class="cfc-expanding-row-summary"
|
||||
tabindex="-1"
|
||||
(click)="expandingRow.handleSummaryClick()"
|
||||
(focus)="handleFocus()">
|
||||
<ng-content></ng-content>
|
||||
<div class="cfc-expanding-row-accessibility-text">.</div>
|
||||
<div class="cfc-expanding-row-accessibility-text"
|
||||
i18n="This is the label used to indicate that the user is in a list of expanding rows.">
|
||||
Row {{expandingRow.index + 1}} in list of expanding rows.
|
||||
</div>
|
||||
<div *ngIf="isPreviouslyFocusedRow()"
|
||||
class="cfc-expanding-row-accessibility-text"
|
||||
i18n="This is the label used for the first row in list of expanding rows.">
|
||||
Use arrow keys to navigate.
|
||||
</div>
|
||||
</div>`,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class ExpandingRowSummary implements OnDestroy {
|
||||
/**
|
||||
* A reference to the main element. This element should be focusable. We need
|
||||
* reference to compute collapsed height of the row. We also use this
|
||||
* reference for focus and blur methods below.
|
||||
*/
|
||||
@ViewChild('expandingRowSummaryMainElement', {static: false})
|
||||
mainElementRef !: ElementRef;
|
||||
|
||||
/** Subscription for changes in parent isExpanded property. */
|
||||
private isExpandedSubscription: Subscription;
|
||||
|
||||
/** Subscription for changes in parent index property. */
|
||||
private indexSubscription: Subscription;
|
||||
|
||||
/**
|
||||
* We need the parent cfc-expanding-row component here to hide this element
|
||||
* when the row is expanded. cfc-expanding-row-details-caption element
|
||||
* will act as a header for expanded rows. We also need to relay tab-in and
|
||||
* click events to the parent.
|
||||
*/
|
||||
constructor(@Host() public expandingRow: ExpandingRow, changeDetectorRef: ChangeDetectorRef) {
|
||||
this.expandingRow.summaryViewChild = this;
|
||||
this.isExpandedSubscription =
|
||||
this.expandingRow.isExpandedChange.subscribe(() => { changeDetectorRef.markForCheck(); });
|
||||
|
||||
this.indexSubscription =
|
||||
this.expandingRow.indexChange.subscribe(() => { changeDetectorRef.markForCheck(); });
|
||||
}
|
||||
|
||||
|
||||
/** When component is destroyed, unlisten to isExpanded. */
|
||||
ngOnDestroy(): void {
|
||||
if (this.isExpandedSubscription) {
|
||||
this.isExpandedSubscription.unsubscribe();
|
||||
}
|
||||
if (this.indexSubscription) {
|
||||
this.indexSubscription.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles focus event on the element. We basically want to detect any focus
|
||||
* in this component and relay this information to parent cfc-expanding-row
|
||||
* component.
|
||||
*/
|
||||
handleFocus(): void {
|
||||
// Clicking causes a focus event to occur before the click event. Filter
|
||||
// out click events using the cdkFocusMonitor.
|
||||
//
|
||||
// TODO(b/62385992) Use the KeyboardFocusService to detect focus cause
|
||||
// instead of creating multiple monitors on a page.
|
||||
if (this.expandingRow.expandingRowMainElement.nativeElement.classList.contains(
|
||||
'cdk-mouse-focused')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.expandingRow.isFocused && !this.expandingRow.isExpanded) {
|
||||
this.expandingRow.handleSummaryFocus();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles tab & shift+tab presses on expanding row summaries in case there
|
||||
* are tabbable elements inside the summaries.
|
||||
*/
|
||||
@HostListener('keydown', ['$event'])
|
||||
handleKeyDown(event: KeyboardEvent) {
|
||||
const charCode = event.which || event.keyCode;
|
||||
if (charCode === KEY_CODE_TAB) {
|
||||
this.handleTabKeypress(event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles tab and shift+tab presses inside expanding row summaries;
|
||||
*
|
||||
* From inside collapsed row summary:
|
||||
* - Tab: If focus was on the last focusable child, should shift focus to
|
||||
* the next focusable element outside the list of expanding rows.
|
||||
* - Shift+tab: If focus was on first focusable child, should shift focus to
|
||||
* the main collapsed row summary element
|
||||
* If focus was on main collapsed row summary element, should
|
||||
* shift focus to the last focusable element before the list of
|
||||
* expanding rows.
|
||||
*/
|
||||
handleTabKeypress(event: KeyboardEvent): void {
|
||||
const focusableChildren = this.getFocusableChildren();
|
||||
|
||||
if (focusableChildren.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Shift+tab on expanding row summary should focus on last focusable element
|
||||
// before expanding row list. Otherwise, if shift+tab is pressed on first
|
||||
// focusable child inside expanding row summary, it should focus on main
|
||||
// expanding row summary element.
|
||||
if (event.shiftKey && document.activeElement === this.mainElementRef.nativeElement) {
|
||||
event.preventDefault();
|
||||
this.expandingRow.expandingRowHost.focusOnPreviousFocusableElement();
|
||||
return;
|
||||
} else if (event.shiftKey && document.activeElement === focusableChildren[0]) {
|
||||
event.preventDefault();
|
||||
this.expandingRow.focus();
|
||||
}
|
||||
|
||||
// If tab is pressed on the last focusable element inside an expanding row
|
||||
// summary, focus should be set to the next focusable element after the list
|
||||
// of expanding rows.
|
||||
if (!event.shiftKey &&
|
||||
document.activeElement === focusableChildren[focusableChildren.length - 1]) {
|
||||
event.preventDefault();
|
||||
this.expandingRow.expandingRowHost.focusOnNextFocusableElement();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the row that had focus before focus left the list of expanding rows
|
||||
* and checks if the current row summary is that row.
|
||||
*/
|
||||
isPreviouslyFocusedRow(): boolean {
|
||||
if (!this.expandingRow.expandingRowHost.contentRows) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const expandingRowHost = this.expandingRow.expandingRowHost;
|
||||
|
||||
if (!this.mainElementRef || !expandingRowHost.lastFocusedRow) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!expandingRowHost.lastFocusedRow.summaryViewChild.mainElementRef) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the current expanding row summary was the last focused one before
|
||||
// focus exited the list, then return true to trigger the screen reader
|
||||
if (this.mainElementRef.nativeElement ===
|
||||
expandingRowHost.lastFocusedRow.summaryViewChild.mainElementRef.nativeElement) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Puts the DOM focus on the main element. */
|
||||
focus(): void {
|
||||
if (this.mainElementRef && document.activeElement !== this.mainElementRef.nativeElement) {
|
||||
this.mainElementRef.nativeElement.focus();
|
||||
}
|
||||
}
|
||||
|
||||
/** Removes the DOM focus on the main element. */
|
||||
blur(): void {
|
||||
if (!this.mainElementRef) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.mainElementRef.nativeElement.blur();
|
||||
}
|
||||
|
||||
/** Returns array of focusable elements within this component. */
|
||||
private getFocusableChildren(): HTMLElement[] { return []; }
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* This interface is used to send toggle (expand/collapse) events to the user
|
||||
* code.
|
||||
*/
|
||||
export interface ExpandingRowToggleEvent {
|
||||
/** The identifier of the row that was toggled. */
|
||||
rowId: string;
|
||||
|
||||
/**
|
||||
* A boolean indicating whether or not this row was expanded. This is set to
|
||||
* false if the row was collapsed.
|
||||
*/
|
||||
isExpand: boolean;
|
||||
}
|
39
modules/benchmarks/src/expanding_rows/index.html
Normal file
39
modules/benchmarks/src/expanding_rows/index.html
Normal file
@ -0,0 +1,39 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<!-- Prevent the browser from requesting any favicon. -->
|
||||
<link rel="icon" href="data:,">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>Change Detection Benchmark</h1>
|
||||
<div id="rendererMode">...</div>
|
||||
|
||||
<benchmark-root>loading...</benchmark-root>
|
||||
|
||||
<script>
|
||||
addEventListener('DOMContentLoaded', () => {
|
||||
// DevServer has automatic bootstrap code, so if we already have <scripts> than we don't need to bootstrap
|
||||
var alreadyBootstraped = document.querySelectorAll('script').length > 1; // 1 for ourselves
|
||||
if (!alreadyBootstraped) {
|
||||
function loadScript(url) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
var script = document.createElement('script');
|
||||
script.src = url;
|
||||
script.onload = resolve;
|
||||
script.onerror = reject;
|
||||
document.body.append(script);
|
||||
});
|
||||
}
|
||||
// zone.js must be loaded and processed before Angular bundle gets executed
|
||||
loadScript('/npm/node_modules/zone.js/dist/zone.js').then(function () {
|
||||
loadScript(document.location.search.endsWith('debug') ? 'bundle.min_debug.js' : 'bundle.min.js');
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
20
modules/benchmarks/src/expanding_rows/index.ts
Normal file
20
modules/benchmarks/src/expanding_rows/index.ts
Normal file
@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
import {enableProdMode} from '@angular/core';
|
||||
import {platformBrowser} from '@angular/platform-browser';
|
||||
|
||||
import {ExpandingRowBenchmarkModule} from './benchmark';
|
||||
import {ExpandingRowBenchmarkModuleNgFactory} from './benchmark.ngfactory';
|
||||
|
||||
setMode(ExpandingRowBenchmarkModule.hasOwnProperty('ngModuleDef') ? 'Ivy' : 'ViewEngine');
|
||||
enableProdMode();
|
||||
platformBrowser().bootstrapModuleFactory(ExpandingRowBenchmarkModuleNgFactory);
|
||||
|
||||
function setMode(name: string): void {
|
||||
document.querySelector('#rendererMode') !.textContent = `Render Mode: ${name}`;
|
||||
}
|
@ -20,7 +20,7 @@ ng_module(
|
||||
|
||||
ng_rollup_bundle(
|
||||
name = "bundle",
|
||||
entry_point = ":index.ts",
|
||||
entry_point = "modules/benchmarks/src/largetable/render3/index.js",
|
||||
tags = ["ivy-only"],
|
||||
deps = [
|
||||
":largetable_lib",
|
||||
|
@ -19,7 +19,7 @@ ng_module(
|
||||
|
||||
ng_rollup_bundle(
|
||||
name = "bundle",
|
||||
entry_point = ":index.ts",
|
||||
entry_point = "modules/benchmarks/src/tree/render3/index.js",
|
||||
tags = ["ivy-only"],
|
||||
deps = [
|
||||
":tree_lib",
|
||||
|
@ -6,7 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {ɵRenderFlags, ɵrenderComponent as renderComponent, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵdefineComponent, ɵɵelementEnd, ɵɵelementStart, ɵɵelementStyleProp, ɵɵelementStyling, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵinterpolation1, ɵɵtext, ɵɵtextBinding} from '@angular/core';
|
||||
import {ɵRenderFlags, ɵrenderComponent as renderComponent, ɵɵcontainer, ɵɵcontainerRefreshEnd, ɵɵcontainerRefreshStart, ɵɵdefineComponent, ɵɵelementEnd, ɵɵelementStart, ɵɵembeddedViewEnd, ɵɵembeddedViewStart, ɵɵinterpolation1, ɵɵselect, ɵɵstyleProp, ɵɵstyling, ɵɵtext, ɵɵtextBinding} from '@angular/core';
|
||||
|
||||
import {bindAction, profile} from '../../util';
|
||||
import {createDom, destroyDom, detectChanges} from '../render3/tree';
|
||||
@ -38,7 +38,7 @@ export function TreeTpl(rf: ɵRenderFlags, ctx: TreeNode) {
|
||||
ɵɵelementStart(0, 'tree');
|
||||
{
|
||||
ɵɵelementStart(1, 'span');
|
||||
ɵɵelementStyling(null, c1);
|
||||
ɵɵstyling(null, c1);
|
||||
{ ɵɵtext(2); }
|
||||
ɵɵelementEnd();
|
||||
ɵɵcontainer(3);
|
||||
@ -47,7 +47,10 @@ export function TreeTpl(rf: ɵRenderFlags, ctx: TreeNode) {
|
||||
ɵɵelementEnd();
|
||||
}
|
||||
if (rf & ɵRenderFlags.Update) {
|
||||
ɵɵelementStyleProp(1, 0, ctx.depth % 2 ? '' : 'grey');
|
||||
ɵɵselect(1);
|
||||
ɵɵstyleProp(0, ctx.depth % 2 ? '' : 'grey');
|
||||
ɵɵstyling();
|
||||
ɵɵselect(2);
|
||||
ɵɵtextBinding(2, ɵɵinterpolation1(' ', ctx.value, ' '));
|
||||
ɵɵcontainerRefreshStart(3);
|
||||
{
|
||||
|
13
package.json
13
package.json
@ -1,8 +1,7 @@
|
||||
{
|
||||
"name": "angular-srcs",
|
||||
"version": "8.0.1",
|
||||
"version": "8.1.0-next.1",
|
||||
"private": true,
|
||||
"branchPattern": "2.0.*",
|
||||
"description": "Angular - a web framework for modern web apps",
|
||||
"homepage": "https://github.com/angular/angular",
|
||||
"bugs": "https://github.com/angular/angular/issues",
|
||||
@ -36,9 +35,9 @@
|
||||
"@angular-devkit/core": "^8.0.0-beta.15",
|
||||
"@angular-devkit/schematics": "^8.0.0-beta.15",
|
||||
"@angular/bazel": "file:./tools/npm/@angular_bazel",
|
||||
"@bazel/jasmine": "0.31.1",
|
||||
"@bazel/karma": "0.31.1",
|
||||
"@bazel/typescript": "0.31.1",
|
||||
"@bazel/jasmine": "0.29.0",
|
||||
"@bazel/karma": "0.29.0",
|
||||
"@bazel/typescript": "0.29.0",
|
||||
"@microsoft/api-extractor": "^7.0.21",
|
||||
"@schematics/angular": "^8.0.0-beta.15",
|
||||
"@types/angular": "^1.6.47",
|
||||
@ -118,7 +117,7 @@
|
||||
"// 3": "when updating @bazel/bazel version you also need to update the RBE settings in .bazelrc (see https://github.com/angular/angular/pull/27935)",
|
||||
"devDependencies": {
|
||||
"@angular/cli": "^8.0.0-beta.15",
|
||||
"@bazel/bazel": "0.26.1",
|
||||
"@bazel/bazel": "0.26.0-rc5",
|
||||
"@bazel/buildifier": "^0.19.2",
|
||||
"@bazel/ibazel": "~0.9.0",
|
||||
"@types/minimist": "^1.2.0",
|
||||
@ -166,4 +165,4 @@
|
||||
"resolutions": {
|
||||
"natives": "1.1.6"
|
||||
}
|
||||
}
|
||||
}
|
@ -22,7 +22,7 @@ ng_package(
|
||||
"//packages/animations/browser:package.json",
|
||||
"//packages/animations/browser/testing:package.json",
|
||||
],
|
||||
entry_point = ":index.ts",
|
||||
entry_point = "packages/animations/index.js",
|
||||
tags = [
|
||||
"release-with-framework",
|
||||
],
|
||||
|
@ -1,29 +0,0 @@
|
||||
{
|
||||
"extends": "../tsconfig-build.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"rootDir": "../../",
|
||||
"paths": {
|
||||
"@angular/animations": ["../../../../dist/packages/animations"],
|
||||
"@angular/animations/browser": ["../../../../dist/packages/animations/browser"],
|
||||
"@angular/core": ["../../../../dist/packages/core"]
|
||||
},
|
||||
"outDir": "../../../../dist/packages/animations"
|
||||
},
|
||||
|
||||
"files": [
|
||||
"public_api.ts",
|
||||
"../../../../node_modules/@types/hammerjs/index.d.ts",
|
||||
"../../../../node_modules/@types/jasmine/index.d.ts",
|
||||
"../../../../node_modules/zone.js/dist/zone.js.d.ts"
|
||||
],
|
||||
|
||||
"angularCompilerOptions": {
|
||||
"annotateForClosureCompiler": true,
|
||||
"strictMetadataEmit": false,
|
||||
"skipTemplateCodegen": true,
|
||||
"flatModuleOutFile": "testing.js",
|
||||
"flatModuleId": "@angular/animations/browser/testing"
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
{
|
||||
"extends": "../tsconfig-build.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"rootDir": "../",
|
||||
"paths": {
|
||||
"@angular/animations": ["../../../dist/packages/animations"],
|
||||
"@angular/core": ["../../../dist/packages/core"]
|
||||
},
|
||||
"outDir": "../../../dist/packages/animations"
|
||||
},
|
||||
|
||||
"files": [
|
||||
"public_api.ts",
|
||||
"../../../node_modules/@types/node/index.d.ts",
|
||||
"../../../node_modules/zone.js/dist/zone.js.d.ts",
|
||||
"../../system.d.ts"
|
||||
],
|
||||
|
||||
"angularCompilerOptions": {
|
||||
"annotateForClosureCompiler": true,
|
||||
"strictMetadataEmit": false,
|
||||
"skipTemplateCodegen": true,
|
||||
"flatModuleOutFile": "browser.js",
|
||||
"flatModuleId": "@angular/animations/browser"
|
||||
}
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
{
|
||||
"extends": "../tsconfig-build.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"rootDir": ".",
|
||||
"paths": {
|
||||
"@angular/core": ["../../dist/packages/core"]
|
||||
},
|
||||
"outDir": "../../dist/packages/animations"
|
||||
},
|
||||
|
||||
"files": [
|
||||
"public_api.ts",
|
||||
"../../node_modules/zone.js/dist/zone.js.d.ts",
|
||||
"../system.d.ts"
|
||||
],
|
||||
|
||||
"angularCompilerOptions": {
|
||||
"annotateForClosureCompiler": true,
|
||||
"strictMetadataEmit": false,
|
||||
"skipTemplateCodegen": true,
|
||||
"flatModuleOutFile": "animations.js",
|
||||
"flatModuleId": "@angular/animations"
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user