Compare commits

...

122 Commits

Author SHA1 Message Date
George Kalpakas
912911220a test(bazel): fix bazel-workspace schematics test
The test was cherry-picked from #27719 into 7.1.x, where entry module
path ended in `/main`, not `/main.dev`. It was changed to `/main.dev`
in #27277, which was not backported to 7.1.x.
2018-12-24 16:59:17 -08:00
Miško Hevery
395f9cd8d2 release: cut the v7.1.4 release 2018-12-18 15:32:47 -08:00
Ben Lesh
94e4589d30 docs(bazel): Update VSCode config (#27733)
What was there didn't work at all, and resulted in an error `Error processing "attach": Error: Both localRoot and remoteRoot must be specified`
PR Close #27733
2018-12-18 10:14:01 -08:00
Miško Hevery
f43e29b3d5 build: removed merge conflict markers from a bad merge 2018-12-18 10:09:46 -08:00
Christian Oliff
9ab35a1165 build: use https link to editorconfig.org in .editorconfig (#27664)
PR Close #27664
2018-12-18 09:30:09 -08:00
Sharath George M
d622558458 docs: Fixed typo (#27669)
PR Close #27669
2018-12-18 09:29:48 -08:00
Paul Gschwendtner
26501495fc build: load angular.js minified output in upgrade tests (#27711)
* We should try loading Angular.JS for the upgrade tests in their minfied output. There seems to be a lot flakiness in regards to loading `AngularJS` within Travis, and the `onerror` messages aren't really too helpful. In order to reduce the payload that will be passed through the Saucelabs tunnel, we should try to load the minfied output files.

PR Close #27711
2018-12-18 09:29:27 -08:00
Paul Gschwendtner
ad160257fa build: update gulp-clang-format dependency (#27712)
Currently rnning the gulp tasks to format code does not work because the `through2` version used by `gulp-clang-format` is very outdated and seems to cause exceptions like:

```
Error: no writecb in Transform class
    at afterTransform (C:\Users\Paul\projects\angular\node_modules\gulp-clang-format\node_modules\readable-stream\lib\_stream_transform.js:95:33)
    at TransformState.afterTransform (C:\Users\Paul\projects\angular\node_modules\gulp-clang-format\node_modules\readable-stream\lib\_stream_transform.js:79:12)
```

Updating to the latest version of `gulp-clang-format` that comes with 10cbb7f9bf, seems to fix this.

**Note**: This issue seems to depend on the platform because I didn't run into it on MacOS, or Linux. Though I got the failure on Windows. I didn't spend time investigating, but updating to the latest
version should just improve things.

PR Close #27712
2018-12-18 09:28:55 -08:00
Keen Yee Liau
b108e9a036 fix(bazel): devserver entry_module should have underscore name (#27719)
This commit fixes a bug whereby the path of the entry_module is not
consistent with the workspace name, which does not permit dashes
in the name.

PR Close #27719
2018-12-18 09:28:06 -08:00
Brandon Roberts
be08611d11 docs(forms): update API reference for validator directives (#26926)
PR Close #26926
2018-12-17 16:45:35 -08:00
Paul Gschwendtner
6b5c151b88 build: improve error message for upgrade test helper (#27706)
Currently whenever the upgrade test helper fails to load a given AngularJS version, the error that will be rejected is technically not an error because the `onerror` callback is not returning an error, but an "ErrorEvent".

Since that `ErrorEvent` is basically just rejected, browsers will print
the error as followed:

```
Failed: [object Event]
```

This is not helpful at all and also implies that there _might_ be more
information hidden within the `Event` instance. Unfortunately that's not
the case (at least on browsers we test against) and the logic to extract
the data from the event would be not worth the effort, we just return a
simple custom `Error` that won't imply that there is more information
hidden.

PR Close #27706
2018-12-17 16:45:19 -08:00
Keen Yee Liau
183f27894c fix(bazel): Set module_name and enable ng test (#27715)
Relative imports in Typescript files only work when module_name is
defined in ts_library (when run in Node.js).
See issue https://github.com/bazelbuild/rules_typescript/issues/360

With that fixed, `ng test` now works.

`ng build` requires `node_modules` to be available in the project
directory, so it's not usable yet. Running `yarn` in project directory
does not work because of postinstall version check.

PR Close #27715
2018-12-17 16:44:32 -08:00
Emilio Martinez
d1a14f6989 docs: remove misplaced code in Universal guide (#26865)
PR Close #26865
2018-12-17 09:35:36 -08:00
bmarkov
ce4cff60f0 docs: Add Smart UI to UI Components section in resources (#27515)
docs: add Smart UI to UI Components section in resources

PR Close #27515
2018-12-17 09:34:14 -08:00
cyraid
78bd3c70de docs(animations): rename animateChild() to animate() (#26184)
Renamed "animateChild()" to "animate()" in the comments/usage.
  The docs state to use animateChild() but uses animate() in the examples.
PR Close #26184
2018-12-14 15:27:37 -08:00
Ruslan Dzhabbarov
b22405767f docs(common): fix documentation for getLocaleCurrencyName (#27087)
PR Close #27087
2018-12-14 15:27:04 -08:00
levgaas
cd1e206cb3 fix(animations): do not truncate decimals for delay (#24455)
Do not truncate decimals for animation delay if specified in seconds

PR Close #24455
2018-12-14 15:20:23 -08:00
JoostK
453589f9fc fix(animations): mark actual descendant node as disabled (#26180)
PR Close #26180
2018-12-14 15:19:56 -08:00
Ingo Bürk
fa3af8b1e0 fix(common): KeyValuePipe should return empty array for empty objects (#27258)
This lets KeyValuePipe return an empty array (rather than undefined)
when the input is empty.

PR Close #27258
2018-12-14 15:19:14 -08:00
zackarychapple
c220328274 docs: adding ngAtlanta 2019 (#27522)
PR Close #27522
2018-12-14 15:18:55 -08:00
Igor Minar
0d8528b0df fix(bazel): emit full node stack traces when Angular compilation crashes (#27678)
The default 10 items are often not enough to debug deeply nested compilation operations.

This PR is based on @martinprobst's http://cl/225528216.

PR Close #27678
2018-12-14 14:58:21 -08:00
Christopher Dahm
9ac4a4d8a0 docs(common): update currencyPipe default digitsInfo values (#27417)
Change the docs to reflect the actual default values

Fixes #27414
PR Close #27417
2018-12-14 10:26:57 -08:00
cooljeffro
fe8c6b04ef docs(common): Fix typo in KeyValuePipe docs (#27580)
PR Close #27580
2018-12-14 10:21:47 -08:00
Alex Eagle
63d395cb7e build: restrict visibility of npm_package targets (#27611)
dependencies on these cause very long rebuilds which have to re-package angular.
Such tests belong in the integration/ folder

PR Close #27611
2018-12-14 10:20:41 -08:00
Paul Gschwendtner
f5e7208bea build: re-enable saucelabs non-verbose logging (#27657)
Previously the logging to TravisCI has been disabled because the `print-logs.sh` file printed the Sauce-Connect logfile output that is `verbose` by default. See [for example](https://travis-ci.org/angular/angular/jobs/250578973).

Since the default stdout/stderr of sauce-connect is pretty much concise and can alert us if we run into any issues (e.g. rate limit, outdated tunnel version), we should stop piping these to `/dev/null`.

PR Close #27657
2018-12-14 10:19:54 -08:00
Paul Gschwendtner
b3759fdc90 build: disable failing optional travis jobs (#27657)
* Disables the failing optional Travis jobs because those just acquire limited resources of Saucelabs and BrowserStack and cause API rate limit problems if the caretaker merges multiple PRs. The rate limit error will spread across multiple repositories because we use the same license in multiple Angular projects (e.g. Angular Material, angular.js etc.)

PR Close #27657
2018-12-14 10:19:54 -08:00
Paul Gschwendtner
ef056c5fb1 fix(bazel): ng_package writes unrelevant definitions to bazel out (#27519)
In order to keep the bazel bin directory as clean as possible, we should not write definition files that are not relevant to a `ng_package` to an undesired location in the bazel bin directory. This currently just happens because we only filter out external definition files while we also should filter out definitions that aren't just in the current package.

The `packager.ts` file currently tries to write these files to the package, but fails because those are not inside of the current package. So the logic to create a relative path for the file fails, and the definition will be copied to a location like:

```js
// Notice the double "bazel-out" here.
C:\Users\Paul\_bazel_Paul\kn4tsvyh\execroot\angular_material\bazel-out\x64_windows-fastbuild\bin\src\bazel-out\x64_windows-fastbuild\bin\src\cdk
```

[See logic that causes this](4f9374951d/packages/bazel/src/ng_package/packager.ts (L105-L124)) (nothing wrong with that logic because it assumes that only paths from within the package are passed to it)

PR Close #27519
2018-12-13 14:58:38 -08:00
Paul Gschwendtner
a808c7d150 build: ts-api-guardian tsconfig warning with bazel (#27583)
* Suppresses the warning from the Bazel TypeScript rules about overwritten options from the `tools/tsconfig.json` file. This is the only remaining warning that makes our Bazel build on Angular Material "dirty"

PR Close #27583
2018-12-13 11:01:48 -08:00
Keen Yee Liau
89ace1a2d9 fix(bazel): Load http_archive and rules_nodejs dependencies (#27609)
Bazel 0.20 requires loading http_archive explicitly.
rules_nodejs dependencies must now be installed explicity as well.

PR Close #27609
2018-12-13 11:01:31 -08:00
Igor Minar
52fd4a2d35 build: disable postinstall-patch.js log output (#27619)
currently we have no patches so the logging only adds noise to our dev environment.

PR Close #27619
2018-12-13 11:01:15 -08:00
Esteban Marin
8c32a2e8bc fix(docs-infra): fix top menu item clickable area (#27633)
the clickable region of the top menu item is expanded beyond the focused area, so the clickable area is spans the entire height of the navigation

fixes #27618

PR Close #27633
2018-12-13 11:00:34 -08:00
Greg Magolan
3ed1e842d6 fix(bazel): fix major/minor semver check between @angular/bazel npm packager version and angular bazel repo version (#27635)
PR Close #27635
2018-12-13 10:59:15 -08:00
Igor Minar
d53c421768 ci: remove packages/bazel from compiler-cli group (#27641)
it doesn't make sense require approvals from compiler-cli group for most @angular/bazel changes.

PR Close #27641
2018-12-13 10:58:59 -08:00
Igor Minar
01102cb235 ci: exclude unnedeed files and directories from angular-robot g3sync check (#27653)
We are overincluding files, all of these are not necessary in google3 and should not be synced
because it's only slowing us down.

Related CL: http://cl/225197013

PR Close #27653
2018-12-13 10:58:43 -08:00
Paul Gschwendtner
97eb85826f build: update to latest karma-sauce-launcher version (#27634)
PR Close #27634
2018-12-13 10:58:18 -08:00
Emmanuel DEMEY
1059789f9f docs: add Zenika trainings in resources.json (#27216)
PR Close #27216
2018-12-12 11:03:09 -08:00
Greg Magolan
0dba3ee359 build: update to tsickle 0.33.1 (#27612)
PR Close #27612
2018-12-12 11:02:43 -08:00
George Kalpakas
80818549fe build(docs-infra): upgrade cli command docs sources to 02524ab82 (#27556)
Relevant changes in [commit range](a176d127a...02524ab82):

**Modified**
- help/build.json
- help/serve.json
- help/test.json

PR Close #27556
2018-12-12 10:56:48 -08:00
Esteban Marin
348c94911c fix(docs-infra): fix top menu item clickable area (#27620)
the clickable region of the top menu item is reduced to the focused area, so no cursor pointer is shown outside the clickable area

fixes #27618

PR Close #27620
2018-12-12 10:55:28 -08:00
Greg Magolan
26c79efa4a build(bazel): fix postinstall-patches.js script run during yarn postinstall when running yarn_install (#27610)
PR Close #27610
2018-12-12 10:54:59 -08:00
Igor Minar
0b8db92a2b docs: update SAVED_REPLIES and CONTRIBUTING with new issue templates (#27608)
When we launched the new issue templates (.github/ISSUE_TEMPLATE/*), we forgot to update these
docs which got stale and needed a refresh.

PR Close #27608
2018-12-11 16:43:58 -08:00
Igor Minar
d0e6eeb51e build: bump @bazel/ibazel to 0.9.0 (#27601)
This should fix the problem with ibazel crashing on bzl/BUILD file syntax errors. bazelbuild/bazel-watcher/issues/194

https://github.com/bazelbuild/bazel-watcher/blob/master/CHANGELOG.md#v090-2018-12-07

PR Close #27601
2018-12-11 16:31:20 -08:00
Keen Yee Liau
93078e3709 fix(bazel): Read latest versions from latest-versions.ts & use semver check (#27591)
When @angular/bazel is installed, a postinstall script is run to make sure that
the npm version is *exactly* the same as the Angular repository install by
Bazel. This check is overly stringent. Instead, it should enforce that the
version satisfies the range check instead. This is consistent with the range
defined in angular-cli/packages/schematics/angular/utility/latest-versions.ts.

This commit also fixes the Bazel workspace to use the same Rxjs version if it's
already installed.

PR Close #27591
2018-12-11 16:30:52 -08:00
Lucas
29ab72980c docs: fix ngModel typo in form validation guide (#27574)
Fix typo

PR Close #27574
2018-12-11 16:22:58 -08:00
Alex Rickabaugh
5452889aa6 release: cut the v7.1.3 release 2018-12-11 13:31:19 -08:00
Michał Jawulski
590b84fc1d docs: update npm scripts to support angular 7 (#27334)
PR Close #27334
2018-12-11 11:25:37 -08:00
Igor Minar
b6deb00b97 build: exclude ivy commit messages from the release notes (#27532)
there is still too much churn to make this info useful in the release notes, advanced
developers can use git log to find out what's going on with ivy.

PR Close #27532
2018-12-11 11:22:54 -08:00
Alex Eagle
01114dc10a build: fix type-check errors introduced during rules_ts 0.21 (#27586) (#27590)
PR Close #27586

PR Close #27590
2018-12-11 11:22:08 -08:00
Alex Eagle
7b1f3527be build: update rules_typescript (#27586) (#27590)
This release of rules_typescript fixes a critical bug: typescript code
was not checked at all, including type-checking, tsetse, and strict deps

fixes #27569

PR Close #27586

PR Close #27590
2018-12-11 11:22:08 -08:00
Isaac Sunkes
575ef9f5a4 docs: add webucator to resources (#26895)
Added Angular Training by Webucator to Workshops & Onsite Training section of resources.
PR Close #26895
2018-12-10 14:20:03 -08:00
Igor Minar
11996cd1c4 docs: remove AngularDart from the version picker (#27550)
At this point it's only confusing people.

PR Close #27550
2018-12-10 10:29:40 -08:00
Alex Eagle
8fc763d58f build: update to Bazel 0.20 (#27394)
refactor Bazel RBE configs

PR Close #27394
2018-12-07 14:29:03 -08:00
Igor Minar
7a5136bcc1 build: update source-map-support to get rid of Node's DeprecationWarning (#27538)
Removes the following when bazel runs any of our jasmine_node_tests:

(node:85494) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from()
 methods instead.

I was able to find the source of the warning by running the target with the following tags:

```
bazel test packages/language-service/... --test_arg=--node_options=--throw-deprecation
```

PR Close #27538
2018-12-07 11:53:21 -08:00
Paul Gschwendtner
a9f39a4fdf fix(bazel): tsickle dependency not working with typescript 3.1.x (#27402)
`@angular/bazel` currently requires TypeScript 3.1.x as a peer dependency, but comes with `tsickle` as dependency. The current version of `tsickle` that is specified by `@angular/bazel` does not support TypeScript 3.1.x (which is a peer dependency) and therefore we need to make sure that `tsickle` works with the required TypeScript versions.

This change updates `tsickle` to the latest version that comes with b10fb6de0a in order to work with TypeScript 3.1.x.

PR Close #27402
2018-12-07 10:51:37 -08:00
Christopher Dahm
35d0284f45 docs: file new issue needs to have opener choose type from template (#27400)
The submission guidelines for submitting an issue directs issue reporters to a pre-filled unformatted issue form. Reporters need directed to choose from the issue templates.

Fixes #27398
PR Close #27400
2018-12-07 09:27:52 -08:00
Alex Eagle
74346e987a style: run latest buildifier binary (#27489)
PR Close #27489
2018-12-07 09:27:33 -08:00
Alex Eagle
f221e9010e ci: use buildifier binary release (#27489)
Switch from Skylint to buildifier --lint - this is required for the Bazel 0.20 upgrade since Bazel no longer lets us use the embedded JDK to build and run Java programs, and Skylint is a Java program

PR Close #27489
2018-12-07 09:27:33 -08:00
Olivier Combe
90c273a788 ci: update ngbot config to add merge linked labels (#27512)
PR Close #27512
2018-12-07 09:25:45 -08:00
Igor Minar
11d2a8cc81 release: cut the v7.1.2 release 2018-12-06 15:08:57 -08:00
Minko Gechev
ad106abece build: introduce remote bazel caching (#27358)
This PR introduces:

1. Google Cloud Store bucket which contains build artifacts
2. Documentation on how to enable remote caching in development

Each team member should download a service key. More convenient ways of authentication would be more obscure and prevent us from doing identity tracking of the produced artifacts.

PR Close #27358
2018-12-06 11:25:03 -08:00
Paul Gschwendtner
84f2928c8c fix(compiler-cli): ngtsc shim files not being generated on case-insensitive platforms (#27466)
Common insensitive platforms are `win32/win64` (see:
[here](3e4c5c95ab/src/compiler/sys.ts (L681-L682)))

Currently when running `bazel build packages/core --define=compile=aot`, the `compiler-cli` will throw because it cannot find the `index.ngfactory.ts` file in the compiler host. This is because the shim host wrapper is not properly generating the requested `ngfactory` file.

This happens because we call `getCanonicalFileName` that returns a path that is different to the actual program filenames that are used to construct a map of generated files. Since the generators always use the paths which are not "canonical" and pases them internally like that, we can just stop manually calling `getCanonicalFileName`.

PR Close #27466
2018-12-06 09:24:53 -08:00
Igor Minar
610472bf3b Revert "fix(router): change processing url tree children condition (#26243)" (#27516)
This reverts commit ccc77ca441ae11d2b516806b4b1c1b7b3062b896.

Breaks Pantheon see cl/224256517.

PR Close #27516
2018-12-06 09:17:21 -08:00
Igor Minar
7bed896f11 Revert "fix(router): process empty path segment when preceding a named outlet (#26243)" (#27516)
This reverts commit 20cef5078dc86bc5d9831fafec076d912ad3521f.

Breaks Pantheon see cl/224256517.

PR Close #27516
2018-12-06 09:17:21 -08:00
Igor Minar
d7c72fced7 build: remove obsolete gulp build task (#27386)
PR Close #27386
2018-12-05 20:55:33 -08:00
Igor Minar
3ca5de7efd ci: don't run node unit tests on travis (#27386)
we run all these tests on CircleCI with bazel.

PR Close #27386
2018-12-05 20:55:33 -08:00
Igor Minar
485e2a147a test(benchpress): make most of the tests run under bazel (#27386)
PR Close #27386
2018-12-05 20:55:33 -08:00
Igor Minar
b24f1984f3 ci: remove validate-commit-message tests from travis (#27386)
we alredy run them via bazel.

I also removed a bunch of obsolete files that bazel doesn't need.

PR Close #27386
2018-12-05 20:55:33 -08:00
Igor Minar
f8846ef14e docs: remove obsolete packages/examples/web_workers/ts/.gitkeep (#27386)
PR Close #27386
2018-12-05 20:55:33 -08:00
Igor Minar
9a93259b64 test: correct bazel visibility for @angular/private/testing (#27386)
we don't want anyone else to depened on this stuff.

PR Close #27386
2018-12-05 20:55:33 -08:00
Igor Minar
194f1f084f test(service-worker): run the remaining service-worker tests under bazel (#27386)
PR Close #27386
2018-12-05 20:55:33 -08:00
Igor Minar
fba9fa2302 test(common): run @angular/common/http/testing tests under bazel (#27386)
PR Close #27386
2018-12-05 20:55:32 -08:00
Igor Minar
820e2027e0 ci: don't run router tests on travis (#27386)
we already run them on circle under bazel

PR Close #27386
2018-12-05 20:55:32 -08:00
Kara Erickson
0508143128 build: add kara to more approval lists (#27493)
PR Close #27493
2018-12-05 14:41:50 -08:00
George Kalpakas
a97fbfd823 refactor(docs-infra): remove unused custom element (#27250)
PR Close #27250
2018-12-05 13:26:28 -08:00
George Kalpakas
e552cadc90 fix(docs-infra): do not use an Angular element in hard-coded FETCH_ERROR document (#27250)
The `FETCH_ERROR` document is used when we are unable to retrieve a
document (except for 404 errors), which includes when there is no
internet connection. Using the `<current-location>` element in the
document's template to show the path of the page we failed to retrieve
assumes that the element's bundle is available (e.g. cached by the SW)
or can be fetched from the server.

When none of these conditions is met, the `DocViewer` is unable to
prepare the document and fails, never showing the `FETCH_ERROR` page to
the user.

Furthermore, the path we are looking to retrieve via
`<current-location>` is essentially the document ID, which we already
have. Thus, loading and instantiating a whole component just for that is
overkill.

This commit addresses both issues by getting rid of the
`<current-location>` component and directly embedding the document ID
into the `FETCH_ERROR` content.

PR Close #27250
2018-12-05 13:26:28 -08:00
George Kalpakas
35ab809326 fix(docs-infra): fix sidenav positioning when notification is shown (#27250)
_Before:_
![sidenav-scrollbar-before](https://user-images.githubusercontent.com/8604205/49089078-62519d00-f263-11e8-8369-f39e73dcc239.png)

_After:_
![sidenav-scrollbar-after](https://user-images.githubusercontent.com/8604205/49089077-62519d00-f263-11e8-8a94-0c34044c4ba1.png)

PR Close #27250
2018-12-05 13:26:28 -08:00
George Kalpakas
919ef66a7c build(docs-infra): remove dependency on FontAwesome (#27250)
We were only using two FontAwesome icons (`link` and `twitter`). The
twitter icon is already available as an SVG (used in the topbar) and a
similar link icon is available via 'Material Icons', which we are
already brining in.

This commit removes the dependency on FontAwesome and uses the available
icons instead.

_Before:_
![contributor-info-before](https://user-images.githubusercontent.com/8604205/49089076-61b90680-f263-11e8-8c5f-c52d332e6e64.png)

_After:_
![contributor-info-after](https://user-images.githubusercontent.com/8604205/49089075-61b90680-f263-11e8-9785-b8df15aaacd3.png)

PR Close #27250
2018-12-05 13:26:28 -08:00
George Kalpakas
a37c65827a fix(docs-infra): correctly cache footer image by the SW (#27250)
When using relative paths for CSS resources (such as background images),
`@angular/cli` will move them to the root `dist/` directory (and update
the paths in CSS accordingly). This results in the SW being unable to
cache the resource, because it is not where it expects it to be.

This commit fixes this issue for the footer background image, by using
an absolute path for the URL. (It also removes an unused style that
would have been affected by the same issue.)

PR Close #27250
2018-12-05 13:26:28 -08:00
George Kalpakas
1371cf6d33 fix(docs-infra): ensure material icons are cached for offline access (#27250)
In order for 'Material Icons' to work offline, their `.woff2` file needs
to have been cached by the SW. This file is not requested by the
browser, until an element needs to use the icon font.

In order to speed up the initial page load and avoid FOUC, we use
inlined SVGs for all icons in the app shell. As a result, the `.woff2`
file may not be requested, when a user visits angular.io. If they go
offline before visiting a page that does actually use 'Material Icons',
then such icons will not work correctly (e.g. the `error_outline` icon
used in the error page for failed requests due to network
unanvailability).

This commit fixes this, by adding a non-visible element that needs the
'Material Icons' font on the main component. Thids ensures that the
`.woff2` file will always be loaded, even if the page does not use any
material icons.

(Note: The element is inserted lazily to avoid affecting the initial
rendering.)

PR Close #27250
2018-12-05 13:26:28 -08:00
George Kalpakas
e9655720f8 fix(docs-infra): remove hard-coded color from inlined SVG icons (#27250)
This allows the icons to inherit the color of their HTMLElement parent.

PR Close #27250
2018-12-05 13:26:28 -08:00
George Kalpakas
8512e34521 fix(docs-infra): inline SVG icons used in page load sensitive UI (#27250)
These icons are part of the app shell and used on every load (on both
desktop and mobile). Inlining them ensures they are rendered asap.

PR Close #27250
2018-12-05 13:26:28 -08:00
George Kalpakas
21c9cfff5a fix(docs-infra): always fetch Roboto font (#27250)
Previously, we did not load the Roboto font, instead relying on the user
to have it available on their system and falling back to different fonts
otherwise. This resulted in the page being styled slightly differently
for those people that didn't have the font installed locally.

PR Close #27250
2018-12-05 13:26:28 -08:00
George Kalpakas
e902f5ee6a fix(docs-infra): do not create an anchor for the file-not-found header (#27250)
PR Close #27250
2018-12-05 13:26:28 -08:00
George Kalpakas
013a241b94 refactor(docs-infra): move minified lunr script to the generated directory (#27250)
PR Close #27250
2018-12-05 13:26:27 -08:00
George Kalpakas
0d0bc1f725 build: error when files specified in payload size limits are missing (#27250)
PR Close #27250
2018-12-05 13:26:27 -08:00
Filipe Silva
a655d288ca ci: test ts-api-guardian on windows (#27205)
PR Close #27205
2018-12-05 12:49:55 -08:00
Igor Minar
e55088a364 build: to fsevents@2.0.1 (#27469)
the old version was failing to compile on MacOS Mojave 10.14.1.

PR Close #27469
2018-12-05 10:48:20 -08:00
Greg Magolan
2e41631026 build(bazel): replace yarn_install(name = "npm") with @npm local_reporsitory() to speed up build (#27469)
PR Close #27469
2018-12-05 10:48:20 -08:00
miginmrs
2bc85fb77e fix(router): process empty path segment when preceding a named outlet (#26243)
PR Close #10726

PR Close #26243
2018-12-05 10:39:30 -08:00
miginmrs
8167bfc87c fix(router): change processing url tree children condition (#26243)
stop adding next path of pathless activated route to the url

PR Close #26224

PR Close #26243
2018-12-05 10:39:30 -08:00
Alex Eagle
711ef2ded4 build: update to newest ibazel (#27441)
this supports the --define flag which we use for Ivy development

PR Close #27441
2018-12-04 20:00:06 -08:00
George Kalpakas
5c57920dbb fix(docs-infra): log the successful creation of previews (#27436)
This can help with debugging issues, e.g. with the communication between
the preview server and CI, as it gives a better idea of exactly when was
the preview made available and how long it took.

PR Close #27436
2018-12-04 19:59:25 -08:00
Paul Gschwendtner
9b4d95974a fix(bazel): do not throw if ts compile action does not create esm5 outputs (#27401)
In some applications, developers define a `ts_library` that just consists of `d.ts` files (e.g. to type `module.id`; see: https://github.com/angular/material2/blob/master/src/module-typings.d.ts), and expect the `esm5.bzl` file to not throw an error like:

```
  target.typescript.replay_params.outputs
struct' object has no attribute 'outputs'
```

The "replay_parameters" property will exist in that case, but is set to "None" because there is no action that should be replayed in favor of producing ES5 outputs. See: https://github.com/bazelbuild/rules_typescript/pull/326. Notice that this right now breaks similarly because an empty `struct()` is returned that does not have a property called `outputs`. [#326](https://github.com/bazelbuild/rules_typescript/pull/326) fixes that by being explicit that there is no _action_ at all.

PR Close #27401
2018-12-04 19:58:36 -08:00
Paul Gschwendtner
8087b6b611 fix(compiler-cli): flatModuleIndex files not generated on windows with multiple input files (#27200)
* Currently when building a `ng_module` with Bazel and having the flat module id option set, the flat module files are not being generated because `@angular/compiler-cli` does not properly determine the entry-point file.

Note that this logic is not necessarily specific to Bazel and the same problem can happen without Bazel if multiple TypeScript input files are specified while the `flatModuleIndex` option has been enabled.

PR Close #27200
2018-12-04 14:01:25 -08:00
Paul Gschwendtner
1ca292392b fix(bazel): ng_package cannot be run multiple times without clean (#27200)
Currently when building the `ng_package` multiple times, the old `ng_package` output will be copied over to the new `ng_package` content. Resulting in packages like `src/cdk/npm_package/npm_package/npm_package/AND_MORE`.

This happens because currently all TypeScript definition files are resolved from within the `binDir`. This is just wrong because it could then take up the `d.ts` files from the previous `ng_package` output. All typescript definitions that belong to the target package, should be resolved through Bazel and copied based on that computation.

Also fixes that `esm` files aren't written to the `ng_package` on Windows. This is because we try to flatten paths using the `path.delimiter` while the path is always using Posix delimiters (causing the paths to be incorrect)

PR Close #27200
2018-12-04 14:01:25 -08:00
Paul Gschwendtner
079c4b3482 fix(bazel): do not throw error when writing tsickle externs (#27200)
* Currently when building the ES5 and ES2015 output, `ngc_wrapped` will fail because it tries to write the `fs.openSync` the tsickle output file at the same time. This causes a runtime exception in Windows and can be fixed by just writing the externs for ES5 mode to the proper ES5 "output root".

PR Close #27200
2018-12-04 14:01:25 -08:00
Paul Gschwendtner
e476c38dee fix(bazel): ng_package not generating UMD bundles on windows (#27200)
* Fixes that `ng_package` does not work generate UMD bundles on Windows because the `esm5/` files are not written to the output directory. This is because `rootDirs` and `rootDir` are posix paths and cause invalid relative paths when mixed with Windows backslash paths.

PR Close #27200
2018-12-04 14:01:25 -08:00
George Kalpakas
8799ea7ea0 ci(docs-infra): manually trigger the preview server webhook (#27458)
With this change, we no longer depend on CircleCI to trigger the webhook
(which it sometimes does with considerable delay or not at all).

This has the added benefit that other jobs will not unnecessarily
trigger webhooks and spam the preview server logs. It is only the
`aio_preview` job's webhook that we care about.

Related to #27352.

PR Close #27458
2018-12-04 13:59:54 -08:00
volshibenik
03787924da docs: fix typo in toh-pt6.md (#27403)
PR Close #27403
2018-12-03 08:24:19 -08:00
Christopher Dahm
1022db1c8c test(common): add PercentPipe round and trim tests (#27365)
Add tests to cover the percent's decimal to be rounded and trimmed.
PR Close #27365
2018-12-03 08:22:25 -08:00
Christopher Dahm
560cb99f55 docs(common): update PercentPipe default maxFractionDigits value (#27365)
Change the docs to reflect the actual default value

Fixes #27079
PR Close #27365
2018-12-03 08:22:25 -08:00
Alex Eagle
5acfdee3ca build: only stamp version info when releasing (#27362)
Also build releases into a dedicated output_base so you can't
accidentally publish with outdated version stamp.

Bump the version of rules_nodejs so we don't need to create the
symlink_prefixes for the .publish command to work.

PR Close #27362
2018-11-30 16:08:23 -08:00
Igor Minar
fc2c23ef4b fix(bazel): ng_package should correctly map to source maps in secondary entry-points (#27313)
This fixes the issue with broken source maps for @angular/common/http/testing.

Fixes #25510

PR Close #27313
2018-11-30 13:40:01 -08:00
Greg Magolan
1ddc34cbc5 build(bazel): update handling of rules_nodejs transitive deps (#27264)
BREAKING CHANGES:

Bazel users: rules_angular_dependencies() will no longer install transitive dependencies of build_bazel_rules_nodejs and build_bazel_rules_typescript. User WORKSPACE files will now need to install rules_nodejs and rules_typescript transitive deps directly:

```
load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependencies")
rules_typescript_dependencies()

load("@build_bazel_rules_nodejs//:package.bzl", "rules_nodejs_dependencies")
rules_nodejs_dependencies()
```

PR Close #27264
2018-11-30 13:35:52 -08:00
dennisameling
184d63d91d docs: fix dynamic-component-loader example for Adblock Plus + EasyList (#27212)
Reported issue in #18138 is due to EasyList being selected in ABP. This commit fixes both the image at the bottom of the Dynamic Component Loader example, and the Stackblitz demo.

Fixes #18138

PR Close #27212
2018-11-30 13:35:38 -08:00
Igor Minar
236ac060b0 fix(platform-server): add @angular/http to the list of peerDependencies (#27307)
Fixes #26154

PR Close #27307
2018-11-30 10:02:44 -08:00
ryo.s
2cce8d4ebc docs: fix typo (#27294)
PR Close #27294
2018-11-29 22:15:28 -08:00
Brandon Roberts
a149c3a8db docs(forms): update API reference for common APIs and template-driven directives (#27033)
PR Close #27033
2018-11-29 21:33:08 -08:00
seunggabi
013c0ae2e1 style: change style css syntax (#27253)
PR Close #27253
2018-11-29 21:26:53 -08:00
Miško Hevery
c8aebaeb76 build: Replace iteration over depsets with an explicit .to_list() call. (#27336)
PR Close #27336
2018-11-29 21:22:39 -08:00
Kara Erickson
56254b53bd build: add kara to approvers for packages needing ivy TestBed updates (#27337)
PR Close #27337
2018-11-29 21:22:24 -08:00
Minko Gechev
5d0e1147df docs: move Minko to Angular (#27339)
Joined the team at Google about a month ago 

PR Close #27339
2018-11-29 21:21:54 -08:00
Grant Timmerman
a0f239fc71 docs: move past events on events page (#27342)
Moves events that have already happened to the list of past events.

PR Close #27342
2018-11-29 21:21:24 -08:00
Jacob Foshee
88032eb302 docs: Minor: insert missing space (#27213)
PR Close #27213
2018-11-28 11:41:21 -08:00
Amadou Sall
827e223edb docs: replace ChromeNoSandbox by ChromeHeadlessCI (#27304)
the custom launcher name should be named ChromeHeadlessCI instead of ChromeNoSandbox.
PR Close #27304
2018-11-28 11:40:03 -08:00
Filipe Silva
14d75d6971 docs: add instructions to diagnose slow Bazel builds (#27324)
PR Close #27324
2018-11-28 11:39:38 -08:00
Jason Aden
8282e15c2b release: cut the v7.1.1 release 2018-11-28 10:09:48 -08:00
Alex Rickabaugh
bdf5f3e499 fix(core): export a value for InjectFlags (#27279)
A recent commit (probably 2c7386c) has changed the import graph of the
DI types in core, and somehow results in the ngc compiler deciding to
re-export core DI types from application factories which tangentially
use inject(). This is not really surprising; ngc's import graph can be
very unstable.

However, this results in a re-export of InjectFlags surviving JS
compilation. InjectFlags was a const enum, akin to an interface in TS,
with no runtime repesentation. This causes a warning to be emitted by
Webpack when it sees the re-export of InjectFlags.

This commit avoids the issue by removing 'const' from the declaration
of InjectFlags, causing it to have a runtime value. This is a temporary
fix. The real fix will be for ngc to no longer write exports of const
enums.

Testing strategy: manually verified. Due to the problem only manifesting
when recompiling after a change and then running Webpack, there is no
existing framework via which this could be easily tested with an
integration test. Additionally, the potential for this issue is gone in
Ivy, so this solution is only temporarily needed.

Fixes #27251.

PR Close #27279
2018-11-27 13:40:39 -08:00
George Kalpakas
a71038b5fa build(docs-infra): upgrade npm-run-all to latest version for security (#27274)
Earlier versions may transitively depend on a malicious version of
`flatmap-stream` (see dominictarr/event-stream#116).

The `aio-builds-setup/` had an older version of `event-stream` (3.3.4),
which did not depend on `flatmap-stream`, but upgraded it anyway.

PR Close #27274
2018-11-27 13:38:36 -08:00
onlyflix
d735160a11 fix(docs-infra): don't call setSearch when not clicking in the searchBox and no searchResults (#26590)
Fix to call locationService.setSearch less often to avoid unnecessary
downloading of favicons

Fixes #26544

PR Close #26590
2018-11-27 13:38:28 -08:00
Brandon Roberts
498c4c32b1 docs: add forms terms to glossary (#27075)
PR Close #27075
2018-11-27 13:38:20 -08:00
Paul Gschwendtner
b9c7da6503 build: fix source-map warnings for ts-api-guardian (#27098)
* Fixes that running `ts-api-guardian` targets always causes source map warnings to appear.

PR Close #27098
2018-11-27 13:38:13 -08:00
195 changed files with 4936 additions and 4813 deletions

View File

@ -1,3 +1,11 @@
# Load any settings specific to the current user
try-import .bazelrc.user
################################
# Settings for Angular team members only
################################
# To enable this feature check the "Remote caching" section in docs/BAZEL.md.
build:angular-team --remote_http_cache=https://storage.googleapis.com/angular-team-cache
############################### ###############################
# Typescript / Angular / Sass # # Typescript / Angular / Sass #
############################### ###############################
@ -30,10 +38,12 @@ test --nolegacy_external_runfiles
############################### ###############################
# Release support # # Release support #
# Turn on these settings with #
# --config=release #
############################### ###############################
# Releases should always be stamped with version control info # Releases should always be stamped with version control info
build --workspace_status_command=./tools/bazel_stamp_vars.sh build:release --workspace_status_command=./tools/bazel_stamp_vars.sh
############################### ###############################
# Output # # Output #
@ -64,3 +74,28 @@ test --experimental_ui
# to determine if the compiler used should be Ivy or ViewEngine one can use `--define=compile=local` on # to determine if the compiler used should be Ivy or ViewEngine one can use `--define=compile=local` on
# any bazel target. This is a temporary flag until codebase is permanently switched to Ivy. # any bazel target. This is a temporary flag until codebase is permanently switched to Ivy.
build --define=compile=legacy build --define=compile=legacy
###############################
# Remote Build Execution support
# Turn on these settings with
# --config=remote
###############################
# Load default settings for Remote Build Execution
import %workspace%/third_party/github.com/bazelbuild/bazel-toolchains/bazelrc/bazel-0.20.0.bazelrc
# Increase the default number of jobs by 50% because our build has lots of
# parallelism
build:remote --jobs=150
# Point to our custom execution platform; see tools/BUILD.bazel
build:remote --extra_execution_platforms=//tools:rbe_ubuntu1604-angular
build:remote --host_platform=//tools:rbe_ubuntu1604-angular
build:remote --platforms=//tools:rbe_ubuntu1604-angular
# Remote instance.
build:remote --remote_instance_name=projects/internal-200822/instances/default_instance
# Do not accept remote cache.
# We need to understand the security risks of using prior build artifacts.
build:remote --remote_accept_cached=false

42
.buildkite/Dockerfile Normal file
View File

@ -0,0 +1,42 @@
# 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"]

96
.buildkite/README.md Normal file
View File

@ -0,0 +1,96 @@
# 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.

View File

@ -0,0 +1,6 @@
@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."

10
.buildkite/pipeline.yml Normal file
View File

@ -0,0 +1,10 @@
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

View File

@ -0,0 +1,92 @@
# 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-highcpu-16 (16 vCPUs, 14.4 GB memory).
# Use a windows boot disk with container support such as
# "Windows Server version 1803 Datacenter Core for Containers".
# 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"
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

View File

@ -1,6 +1,6 @@
# These options are enabled when running on CI # These options are enabled when running on CI
# We do this by copying this file to /etc/bazel.bazelrc at the start of the build. # We do this by copying this file to /etc/bazel.bazelrc at the start of the build.
# See remote cache documentation in /docs/BAZEL.md # See documentation in /docs/BAZEL.md
# Don't be spammy in the logs # Don't be spammy in the logs
# TODO(gmagolan): Hide progress again once build performance improves # TODO(gmagolan): Hide progress again once build performance improves
@ -8,9 +8,6 @@
# error: Too long with no output (exceeded 10m0s) # error: Too long with no output (exceeded 10m0s)
# build --noshow_progress # build --noshow_progress
# Don't run manual tests
test --test_tag_filters=-manual
# Print all the options that apply to the build. # Print all the options that apply to the build.
# This helps us diagnose which options override others # This helps us diagnose which options override others
# (e.g. /etc/bazel.bazelrc vs. tools/bazel.rc) # (e.g. /etc/bazel.bazelrc vs. tools/bazel.rc)

View File

@ -25,7 +25,10 @@ var_4: &define_env_vars
var_5: &setup_bazel_remote_execution var_5: &setup_bazel_remote_execution
run: run:
name: "Setup bazel RBE remote execution" name: "Setup bazel RBE remote execution"
command: openssl aes-256-cbc -d -in .circleci/gcp_token -k "$CI_REPO_NAME" -out /home/circleci/.gcp_credentials && echo "export GOOGLE_APPLICATION_CREDENTIALS=/home/circleci/.gcp_credentials" >> $BASH_ENV && sudo bash -c "cat .circleci/rbe-bazel.rc >> /etc/bazel.bazelrc" command: |
openssl aes-256-cbc -d -in .circleci/gcp_token -k "$CI_REPO_NAME" -out /home/circleci/.gcp_credentials
echo "export GOOGLE_APPLICATION_CREDENTIALS=/home/circleci/.gcp_credentials" >> $BASH_ENV
sudo bash -c "echo 'build --config=remote' >> /etc/bazel.bazelrc"
# Settings common to each job # Settings common to each job
var_6: &job_defaults var_6: &job_defaults
@ -53,21 +56,19 @@ version: 2
jobs: jobs:
lint: lint:
<<: *job_defaults <<: *job_defaults
resource_class: xlarge
steps: steps:
- checkout: - checkout:
<<: *post_checkout <<: *post_checkout
- restore_cache: - restore_cache:
key: *cache_key key: *cache_key
- *define_env_vars - *define_env_vars
- *setup_circleci_bazel_config
- *yarn_install - *yarn_install
- run: 'yarn buildifier -mode=check || - run: 'yarn bazel:format -mode=check ||
(echo "BUILD files not formatted. Please run ''yarn buildifier''" ; exit 1)' (echo "BUILD files not formatted. Please run ''yarn bazel:format''" ; exit 1)'
# Run the skylark linter to check our Bazel rules # Run the skylark linter to check our Bazel rules
- run: 'yarn skylint || - run: 'yarn bazel:lint ||
(echo -e "\n.bzl files have lint errors. Please run ''yarn skylint''"; exit 1)' (echo -e "\n.bzl files have lint errors. Please run ''yarn bazel:lint-fix''"; exit 1)'
- run: ./node_modules/.bin/gulp lint - run: ./node_modules/.bin/gulp lint
@ -275,6 +276,7 @@ jobs:
# The `destination` needs to be kept in synch with the value of # The `destination` needs to be kept in synch with the value of
# `AIO_ARTIFACT_PATH` in `aio/aio-builds-setup/Dockerfile` # `AIO_ARTIFACT_PATH` in `aio/aio-builds-setup/Dockerfile`
destination: aio/dist/aio-snapshot.tgz destination: aio/dist/aio-snapshot.tgz
- run: node ./aio/scripts/create-preview $CIRCLE_BUILD_NUM
# This job should only be run on PR builds, where `CI_PULL_REQUEST` is not `false`. # This job should only be run on PR builds, where `CI_PULL_REQUEST` is not `false`.
test_aio_preview: test_aio_preview:
@ -461,7 +463,3 @@ workflows:
branches: branches:
only: only:
- master - master
notify:
webhooks:
- url: https://ngbuilds.io/circle-build

View File

@ -1,77 +0,0 @@
# These options are enabled when running on CI with Remote Build Execution.
################################################################
# Toolchain related flags for remote build execution. #
################################################################
# Remote Build Execution requires a strong hash function, such as SHA256.
startup --host_jvm_args=-Dbazel.DigestFunction=SHA256
# Depending on how many machines are in the remote execution instance, setting
# this higher can make builds faster by allowing more jobs to run in parallel.
# Setting it too high can result in jobs that timeout, however, while waiting
# for a remote machine to execute them.
build --jobs=150
# Set several flags related to specifying the platform, toolchain and java
# properties.
# These flags are duplicated rather than imported from (for example)
# %workspace%/configs/ubuntu16_04_clang/1.0/toolchain.bazelrc to make this
# bazelrc a standalone file that can be copied more easily.
# These flags should only be used as is for the rbe-ubuntu16-04 container
# and need to be adapted to work with other toolchain containers.
build --host_javabase=@bazel_toolchains//configs/ubuntu16_04_clang/1.0:jdk8
build --javabase=@bazel_toolchains//configs/ubuntu16_04_clang/1.0:jdk8
build --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
build --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
build --crosstool_top=@bazel_toolchains//configs/ubuntu16_04_clang/1.0/bazel_0.15.0/default:toolchain
build --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
# Platform flags:
# The toolchain container used for execution is defined in the target indicated
# by "extra_execution_platforms", "host_platform" and "platforms".
# If you are using your own toolchain container, you need to create a platform
# target with "constraint_values" that allow for the toolchain specified with
# "extra_toolchains" to be selected (given constraints defined in
# "exec_compatible_with").
# More about platforms: https://docs.bazel.build/versions/master/platforms.html
build --extra_toolchains=@bazel_toolchains//configs/ubuntu16_04_clang/1.0/bazel_0.15.0/cpp:cc-toolchain-clang-x86_64-default
build --extra_execution_platforms=//tools:rbe_ubuntu1604-angular
build --host_platform=//tools:rbe_ubuntu1604-angular
build --platforms=//tools:rbe_ubuntu1604-angular
# Set various strategies so that all actions execute remotely. Mixing remote
# and local execution will lead to errors unless the toolchain and remote
# machine exactly match the host machine.
build --spawn_strategy=remote
build --strategy=Javac=remote
build --strategy=Closure=remote
build --genrule_strategy=remote
build --define=EXECUTOR=remote
# Enable the remote cache so action results can be shared across machines,
# developers, and workspaces.
build --remote_cache=remotebuildexecution.googleapis.com
# Enable remote execution so actions are performed on the remote systems.
build --remote_executor=remotebuildexecution.googleapis.com
# Remote instance.
build --remote_instance_name=projects/internal-200822/instances/default_instance
# Enable encryption.
build --tls_enabled=true
# Enforce stricter environment rules, which eliminates some non-hermetic
# behavior and therefore improves both the remote cache hit rate and the
# correctness and repeatability of the build.
build --experimental_strict_action_env=true
# Set a higher timeout value, just in case.
build --remote_timeout=3600
# Enable authentication. This will pick up application default credentials by
# default. You can use --auth_credentials=some_file.json to use a service
# account credential instead.
build --auth_enabled=true
# Do not accept remote cache.
build --remote_accept_cached=false

View File

@ -0,0 +1,107 @@
#!/usr/bin/env node
/**
* Usage (cli):
* ```
* node create-preview <build-number> <job-name> <webhook-url>
* ```
*
* Usage (JS):
* ```js
* require('./trigger-webhook').
* triggerWebhook(buildNumber, jobName, webhookUrl).
* then(...);
* ```
*
* Triggers a notification webhook with CircleCI specific info.
*
* It can be used for notifying external servers and trigger operations based on CircleCI job status
* (e.g. triggering the creation of a preview based on previously stored build atrifacts).
*
* The body of the sent payload is of the form:
* ```json
* {
* "payload": {
* "build_num": ${buildNumber}
* "build_parameters": {
* "CIRCLE_JOB": "${jobName}"
* }
* }
* }
* ```
*
* When used from JS, it returns a promise which resolves to an object of the form:
* ```json
* {
* "statucCode": ${statusCode},
* "responseText": "${responseText}"
* }
* ```
*
* NOTE:
* - When used from the cli, the command will exit with an error code if the response's status code
* is outside the [200, 400) range.
* - When used from JS, the returned promise will be resolved, even if the response's status code is
* outside the [200, 400) range. It is up to the caller to decide how this should be handled.
*/
// Imports
const {request} = require('https');
// Exports
module.exports = {
triggerWebhook,
};
// Run
if (require.resolve === module) {
_main(process.argv.slice(2));
}
// Helpers
function _main(args) {
triggerWebhook(...args).
then(({statusCode, responseText}) => (200 <= statusCode && statusCode < 400) ?
console.log(`Status: ${statusCode}\n${responseText}`) :
Promise.reject(new Error(`Request failed (status: ${statusCode}): ${responseText}`))).
catch(err => {
console.error(err);
process.exit(1);
});
}
function postJson(url, data) {
return new Promise((resolve, reject) => {
const opts = {method: 'post', headers: {'Content-Type': 'application/json'}};
const onResponse = res => {
const statusCode = res.statusCode || -1;
let responseText = '';
res.
on('error', reject).
on('data', d => responseText += d).
on('end', () => resolve({statusCode, responseText}));
};
request(url, opts, onResponse).
on('error', reject).
end(JSON.stringify(data));
});
}
async function triggerWebhook(buildNumber, jobName, webhookUrl) {
if (!buildNumber || !jobName || !webhookUrl || isNaN(buildNumber)) {
throw new Error(
'Missing or invalid arguments.\n' +
'Expected: buildNumber (number), jobName (string), webhookUrl (string)');
}
const data = {
payload: {
build_num: +buildNumber,
build_parameters: {CIRCLE_JOB: jobName},
},
};
return postJson(webhookUrl, data);
}

View File

@ -1,4 +1,4 @@
# http://editorconfig.org # https://editorconfig.org
root = true root = true

View File

@ -4,7 +4,7 @@ about: Report a bug in the Angular Framework
--- ---
<!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅 <!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅
Oh hi there! 😄 Oh hi there! 😄
To expedite issue processing please search open and closed issues before submitting a new one. To expedite issue processing please search open and closed issues before submitting a new one.
Existing issues often contain information about workarounds, resolution, or progress updates. Existing issues often contain information about workarounds, resolution, or progress updates.
@ -38,6 +38,10 @@ Please create and share minimal reproduction of the issue starting with this tem
<!-- <!--
If StackBlitz is not suitable for reproduction of your issue, please create a minimal GitHub repository with the reproduction of the issue. Share the link to the repo below along with step-by-step instructions to reproduce the problem, as well as expected and actual behavior. If StackBlitz is not suitable for reproduction of your issue, please create a minimal GitHub repository with the reproduction of the issue. Share the link to the repo below along with step-by-step instructions to reproduce the problem, as well as expected and actual behavior.
Issues that don't have enough info and can't be reproduced will be closed.
You can read more about issue submission guidelines here: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-submitting-an-issue
--> -->
## 🔥 Exception or Error ## 🔥 Exception or Error

View File

@ -39,18 +39,30 @@ merge:
- "packages/**" - "packages/**"
# list of patterns to ignore for the files changed by the PR # list of patterns to ignore for the files changed by the PR
exclude: exclude:
- "packages/bazel/*.bzl" - "packages/*"
- "packages/bazel/*"
- "packages/bazel/src/builders/**"
- "packages/bazel/src/ng_package/**"
- "packages/bazel/src/protractor/**"
- "packages/bazel/src/schematics/**"
- "packages/compiler-cli/src/ngcc/**"
- "packages/docs/**"
- "packages/elements/schematics/**"
- "packages/examples/**"
- "packages/language-service/**" - "packages/language-service/**"
- "packages/private/**"
- "packages/service-worker/**"
- "**/.gitignore" - "**/.gitignore"
- "**/.gitkeep" - "**/.gitkeep"
- "**/yarn.lock"
- "**/package.json" - "**/package.json"
- "**/tsconfig-build.json" - "**/tsconfig-build.json"
- "**/tsconfig.json" - "**/tsconfig.json"
- "**/rollup.config.js" - "**/rollup.config.js"
- "**/BUILD.bazel" - "**/BUILD.bazel"
- "**/*.md"
- "packages/**/integrationtest/**" - "packages/**/integrationtest/**"
- "packages/**/test/**" - "packages/**/test/**"
- "packages/compiler-cli/src/ngcc/**"
# comment that will be added to a PR when there is a conflict, leave empty or set to false to disable # comment that will be added to a PR when there is a conflict, leave empty or set to false to disable
mergeConflictComment: "Hi @{{PRAuthor}}! This PR has merge conflicts due to recent upstream merges. mergeConflictComment: "Hi @{{PRAuthor}}! This PR has merge conflicts due to recent upstream merges.
@ -59,6 +71,10 @@ merge:
# label to monitor # label to monitor
mergeLabel: "PR action: merge" mergeLabel: "PR action: merge"
# adding any of these labels will also add the merge label
mergeLinkedLabels:
- "PR action: merge-assistance"
# list of checks that will determine if the merge label can be added # list of checks that will determine if the merge label can be added
checks: checks:

5
.gitignore vendored
View File

@ -2,6 +2,7 @@
/dist/ /dist/
/bazel-* /bazel-*
/integration/bazel/bazel-*
e2e_test.* e2e_test.*
node_modules node_modules
bower_components bower_components
@ -29,3 +30,7 @@ yarn-error.log
# rollup-test output # rollup-test output
/modules/rollup-test/dist/ /modules/rollup-test/dist/
# User specific bazel settings
.bazelrc.user

View File

@ -98,6 +98,7 @@ groups:
- IgorMinar #fallback - IgorMinar #fallback
- mhevery - mhevery
- vikerman #fallback - vikerman #fallback
- kara
build-and-ci: build-and-ci:
conditions: conditions:
@ -211,6 +212,7 @@ groups:
- mhevery #fallback - mhevery #fallback
- IgorMinar #fallback - IgorMinar #fallback
- jenniferfell #docs only - jenniferfell #docs only
- kara
compiler/i18n: compiler/i18n:
conditions: conditions:
@ -223,6 +225,7 @@ groups:
- IgorMinar #fallback - IgorMinar #fallback
- mhevery #fallback - mhevery #fallback
- jenniferfell #docs only - jenniferfell #docs only
- kara
compiler: compiler:
conditions: conditions:
@ -234,6 +237,7 @@ groups:
- mhevery - mhevery
- IgorMinar #fallback - IgorMinar #fallback
- jenniferfell #docs only - jenniferfell #docs only
- kara
compiler-cli/ngtools: compiler-cli/ngtools:
conditions: conditions:
@ -243,13 +247,13 @@ groups:
- hansl - hansl
- filipesilva #fallback - filipesilva #fallback
- IgorMinar #fallback - IgorMinar #fallback
- kara
compiler-cli: compiler-cli:
conditions: conditions:
files: files:
include: include:
- "packages/compiler-cli/*" - "packages/compiler-cli/*"
- "packages/bazel/*"
exclude: exclude:
- "packages/compiler-cli/src/ngtools*" - "packages/compiler-cli/src/ngtools*"
users: users:
@ -257,6 +261,7 @@ groups:
- alxhub - alxhub
- IgorMinar #fallback - IgorMinar #fallback
- mhevery #fallback - mhevery #fallback
- kara
common: common:
conditions: conditions:
@ -269,6 +274,7 @@ groups:
- pkozlowski-opensource #primary - pkozlowski-opensource #primary
- IgorMinar #fallback - IgorMinar #fallback
- mhevery #fallback - mhevery #fallback
- kara
forms: forms:
conditions: conditions:
@ -334,6 +340,7 @@ groups:
- IgorMinar #fallback - IgorMinar #fallback
- mhevery #fallback - mhevery #fallback
- jenniferfell #docs only - jenniferfell #docs only
- kara
testing: testing:
conditions: conditions:
@ -367,6 +374,7 @@ groups:
- IgorMinar #fallback - IgorMinar #fallback
- mhevery #fallback - mhevery #fallback
- jenniferfell #docs only - jenniferfell #docs only
- kara
platform-browser: platform-browser:
conditions: conditions:
@ -376,6 +384,7 @@ groups:
- mhevery #primary - mhevery #primary
# needs secondary # needs secondary
- IgorMinar #fallback - IgorMinar #fallback
- kara
platform-server: platform-server:
conditions: conditions:
@ -398,6 +407,7 @@ groups:
- mhevery #primary - mhevery #primary
# needs secondary # needs secondary
- IgorMinar #fallback - IgorMinar #fallback
- kara
service-worker: service-worker:
conditions: conditions:
@ -431,6 +441,7 @@ groups:
- IgorMinar #fallback - IgorMinar #fallback
- mhevery #fallback - mhevery #fallback
- jenniferfell #docs only - jenniferfell #docs only
- kara
benchpress: benchpress:
conditions: conditions:

View File

@ -37,8 +37,12 @@ env:
- CI_MODE=saucelabs_required - CI_MODE=saucelabs_required
# deactivated, see #19768 # deactivated, see #19768
# - CI_MODE=browserstack_required # - CI_MODE=browserstack_required
- CI_MODE=saucelabs_optional
- CI_MODE=browserstack_optional # We disable these optional jobs because those acquire tunnel and browser instances which
# could lead to rate limit excess while those are failing most of the time and nobody pays
# attention anyway.
# - CI_MODE=saucelabs_optional
# - CI_MODE=browserstack_optional
matrix: matrix:
fast_finish: true fast_finish: true

View File

@ -23,9 +23,14 @@ filegroup(
filegroup( filegroup(
name = "angularjs_scripts", name = "angularjs_scripts",
srcs = [ srcs = [
# We also declare the unminfied AngularJS files since these can be used for
# local debugging (e.g. see: packages/upgrade/test/common/test_helpers.ts)
"@ngdeps//node_modules/angular:angular.js", "@ngdeps//node_modules/angular:angular.js",
"@ngdeps//node_modules/angular:angular.min.js",
"@ngdeps//node_modules/angular-1.5:angular.js", "@ngdeps//node_modules/angular-1.5:angular.js",
"@ngdeps//node_modules/angular-1.5:angular.min.js",
"@ngdeps//node_modules/angular-1.6:angular.js", "@ngdeps//node_modules/angular-1.6:angular.js",
"@ngdeps//node_modules/angular-1.6:angular.min.js",
"@ngdeps//node_modules/angular-mocks:angular-mocks.js", "@ngdeps//node_modules/angular-mocks:angular-mocks.js",
"@ngdeps//node_modules/angular-mocks-1.5:angular-mocks.js", "@ngdeps//node_modules/angular-mocks-1.5:angular-mocks.js",
"@ngdeps//node_modules/angular-mocks-1.6:angular-mocks.js", "@ngdeps//node_modules/angular-mocks-1.6:angular-mocks.js",

View File

@ -1,3 +1,59 @@
<a name="7.1.4"></a>
## [7.1.4](https://github.com/angular/angular/compare/7.1.3...7.1.4) (2018-12-18)
### Bug Fixes
* **animations:** do not truncate decimals for delay ([#24455](https://github.com/angular/angular/issues/24455)) ([cd1e206](https://github.com/angular/angular/commit/cd1e206))
* **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:** 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))
* **bazel:** Set module_name and enable ng test ([#27715](https://github.com/angular/angular/issues/27715)) ([183f278](https://github.com/angular/angular/commit/183f278))
* **common:** KeyValuePipe should return empty array for empty objects ([#27258](https://github.com/angular/angular/issues/27258)) ([fa3af8b](https://github.com/angular/angular/commit/fa3af8b))
<a name="7.1.3"></a>
## [7.1.3](https://github.com/angular/angular/compare/7.1.2...7.1.3) (2018-12-11)
### Bug Fixes
* **bazel:** tsickle dependency not working with typescript 3.1.x ([#27402](https://github.com/angular/angular/issues/27402)) ([a9f39a4](https://github.com/angular/angular/commit/a9f39a4))
<a name="7.1.2"></a>
## [7.1.2](https://github.com/angular/angular/compare/7.1.1...7.1.2) (2018-12-06)
### Bug Fixes
* **bazel:** do not throw error when writing tsickle externs ([#27200](https://github.com/angular/angular/issues/27200)) ([079c4b3](https://github.com/angular/angular/commit/079c4b3))
* **bazel:** do not throw if ts compile action does not create esm5 outputs ([#27401](https://github.com/angular/angular/issues/27401)) ([9b4d959](https://github.com/angular/angular/commit/9b4d959))
* **bazel:** ng_package cannot be run multiple times without clean ([#27200](https://github.com/angular/angular/issues/27200)) ([1ca2923](https://github.com/angular/angular/commit/1ca2923))
* **bazel:** ng_package not generating UMD bundles on windows ([#27200](https://github.com/angular/angular/issues/27200)) ([e476c38](https://github.com/angular/angular/commit/e476c38))
* **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)
<a name="7.1.1"></a>
## [7.1.1](https://github.com/angular/angular/compare/7.1.0...7.1.1) (2018-11-28)
### Bug Fixes
* **core:** export a value for InjectFlags ([#27279](https://github.com/angular/angular/issues/27279)) ([bdf5f3e](https://github.com/angular/angular/commit/bdf5f3e)), closes [#27251](https://github.com/angular/angular/issues/27251)
<a name="7.1.0"></a> <a name="7.1.0"></a>
# [7.1.0](https://github.com/angular/angular/compare/7.1.0-rc.0...7.1.0) (2018-11-21) # [7.1.0](https://github.com/angular/angular/compare/7.1.0-rc.0...7.1.0) (2018-11-21)

View File

@ -51,19 +51,15 @@ and help you to craft the change so that it is successfully accepted into the pr
Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available. Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we will systematically ask you to provide a minimal reproduction scenario using http://plnkr.co. Having a live, reproducible scenario gives us a wealth of important information without going back & forth to you with additional questions like: We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we will systematically ask you to provide a minimal reproduction. Having a minimal reproducible scenario gives us a wealth of important information without going back & forth to you with additional questions.
- version of Angular used A minimal reproduction allows us to quickly confirm a bug (or point out a coding problem) as well as confirm that we are fixing the right problem.
- 3rd-party libraries and their versions
- and most importantly - a use-case that fails
A minimal reproduce scenario using http://plnkr.co/ allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem. If plunker is not a suitable way to demonstrate the problem (for example for issues related to our npm packaging), please create a standalone git repository demonstrating the problem. We will be insisting on a minimal reproduction scenario in order to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal reproduction. We understand that sometimes it might be hard to extract essential bits of code from a larger code-base but we really need to isolate the problem before we can fix it.
We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal plunk. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it.
Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced. Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced.
You can file new issues by filling out our [new issue form](https://github.com/angular/angular/issues/new). You can file new issues by selecting from our [new issue templates](https://github.com/angular/angular/issues/new/choose) and filling out the issue template.
### <a name="submit-pr"></a> Submitting a Pull Request (PR) ### <a name="submit-pr"></a> Submitting a Pull Request (PR)

View File

@ -1,11 +1,18 @@
workspace(name = "angular") workspace(name = "angular")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load( load(
"//packages/bazel:package.bzl", "//packages/bazel:package.bzl",
"rules_angular_dependencies", "rules_angular_dependencies",
"rules_angular_dev_dependencies", "rules_angular_dev_dependencies",
) )
http_archive(
name = "io_bazel_rules_go",
sha256 = "b7a62250a3a73277ade0ce306d22f122365b513f5402222403e507f2f997d421",
url = "https://github.com/bazelbuild/rules_go/releases/download/0.16.3/rules_go-0.16.3.tar.gz",
)
# Uncomment for local bazel rules development # Uncomment for local bazel rules development
#local_repository( #local_repository(
# name = "build_bazel_rules_nodejs", # name = "build_bazel_rules_nodejs",
@ -18,17 +25,28 @@ load(
# Angular Bazel users will call this function # Angular Bazel users will call this function
rules_angular_dependencies() rules_angular_dependencies()
# Install transitive deps of rules_nodejs
load("@build_bazel_rules_nodejs//:package.bzl", "rules_nodejs_dependencies")
rules_nodejs_dependencies()
# These are the dependencies only for us # These are the dependencies only for us
rules_angular_dev_dependencies() rules_angular_dev_dependencies()
# Install transitive deps of rules_typescript
load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependencies")
rules_typescript_dependencies()
# #
# Point Bazel to WORKSPACEs that live in subdirectories # Point Bazel to WORKSPACEs that live in subdirectories
# #
http_archive( http_archive(
name = "rxjs", name = "rxjs",
url = "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz",
strip_prefix = "package/src",
sha256 = "72b0b4e517f43358f554c125e40e39f67688cd2738a8998b4a266981ed32f403", sha256 = "72b0b4e517f43358f554c125e40e39f67688cd2738a8998b4a266981ed32f403",
strip_prefix = "package/src",
url = "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz",
) )
# Point to the integration test workspace just so that Bazel doesn't descend into it # Point to the integration test workspace just so that Bazel doesn't descend into it
@ -43,9 +61,11 @@ local_repository(
# #
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install") load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
check_bazel_version("0.18.0", """ check_bazel_version("0.20.0", """
If you are on a Mac and using Homebrew, there is a breaking change to the installation in Bazel 0.16 You no longer need to install Bazel on your machine.
See https://blog.bazel.build/2018/08/22/bazel-homebrew.html Angular has a dependency on the @bazel/bazel package which supplies it.
Try running `yarn bazel` instead.
(If you did run that, check that you've got a fresh `yarn install`)
""") """)
@ -56,13 +76,12 @@ node_repositories(
yarn_version = "1.12.1", yarn_version = "1.12.1",
) )
yarn_install( local_repository(
name = "npm", name = "npm",
package_json = "//tools:npm/package.json", path = "tools/npm_workspace",
yarn_lock = "//tools:npm/yarn.lock",
) )
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains") load("@io_bazel_rules_go//go:def.bzl", "go_register_toolchains", "go_rules_dependencies")
go_rules_dependencies() go_rules_dependencies()

3
aio/.gitignore vendored
View File

@ -44,6 +44,3 @@ protractor-results*.txt
# System Files # System Files
.DS_Store .DS_Store
Thumbs.db Thumbs.db
# copied dependencies
src/assets/js/lunr*

View File

@ -41,8 +41,6 @@ Here are the most important tasks you might need to use:
- `yarn example-e2e --filter=foo` - limit e2e tests to those containing the word "foo" - `yarn example-e2e --filter=foo` - limit e2e tests to those containing the word "foo"
- `yarn example-e2e --setup --local` - run e2e tests with the local version of Angular contained in the "dist" folder - `yarn example-e2e --setup --local` - run e2e tests with the local version of Angular contained in the "dist" folder
* `yarn build-ie-polyfills` - generates a js file of polyfills that can be loaded in Internet Explorer.
## Developing on Windows ## Developing on Windows
The `packages/` directory may contain Linux-specific symlinks, which are not recognized by Windows. The `packages/` directory may contain Linux-specific symlinks, which are not recognized by Windows.
These unresolved links cause the docs generation process to fail because it cannot locate certain files. These unresolved links cause the docs generation process to fail because it cannot locate certain files.
@ -50,7 +48,7 @@ These unresolved links cause the docs generation process to fail because it cann
> Hint: The following steps require administration rights or [Windows Developer Mode](https://docs.microsoft.com/en-us/windows/uwp/get-started/enable-your-device-for-development) enabled! > Hint: The following steps require administration rights or [Windows Developer Mode](https://docs.microsoft.com/en-us/windows/uwp/get-started/enable-your-device-for-development) enabled!
To fix this problem, run `scripts/windows/create-symlinks.sh`. This command creates temporary files where the symlinks used to be. Make sure not to commit those files with your documentation changes. To fix this problem, run `scripts/windows/create-symlinks.sh`. This command creates temporary files where the symlinks used to be. Make sure not to commit those files with your documentation changes.
When you are done making and testing your documentation changes, you can restore the original symlinks and delete the temporary files by running `scripts/windows/remove-symlinks.sh`. When you are done making and testing your documentation changes, you can restore the original symlinks and delete the temporary files by running `scripts/windows/remove-symlinks.sh`.
It's necessary to remove the temporary files, because otherwise they're displayed as local changes in your git working copy and certain operations are blocked. It's necessary to remove the temporary files, because otherwise they're displayed as local changes in your git working copy and certain operations are blocked.

View File

@ -7,7 +7,7 @@ import {CircleCiApi} from '../common/circle-ci-api';
import {GithubApi} from '../common/github-api'; import {GithubApi} from '../common/github-api';
import {GithubPullRequests} from '../common/github-pull-requests'; import {GithubPullRequests} from '../common/github-pull-requests';
import {GithubTeams} from '../common/github-teams'; import {GithubTeams} from '../common/github-teams';
import {assert, assertNotMissingOrEmpty, Logger} from '../common/utils'; import {assert, assertNotMissingOrEmpty, computeShortSha, Logger} from '../common/utils';
import {BuildCreator} from './build-creator'; import {BuildCreator} from './build-creator';
import {ChangedPrVisibilityEvent, CreatedBuildEvent} from './build-events'; import {ChangedPrVisibilityEvent, CreatedBuildEvent} from './build-events';
import {BuildRetriever} from './build-retriever'; import {BuildRetriever} from './build-retriever';
@ -144,7 +144,10 @@ export class PreviewServerFactory {
const artifactPath = await buildRetriever.downloadBuildArtifact(buildNum, pr, sha, cfg.buildArtifactPath); const artifactPath = await buildRetriever.downloadBuildArtifact(buildNum, pr, sha, cfg.buildArtifactPath);
const isPublic = await buildVerifier.getPrIsTrusted(pr); const isPublic = await buildVerifier.getPrIsTrusted(pr);
await buildCreator.create(pr, sha, artifactPath, isPublic); await buildCreator.create(pr, sha, artifactPath, isPublic);
res.sendStatus(isPublic ? 201 : 202); res.sendStatus(isPublic ? 201 : 202);
logger.log(`PR:${pr}, SHA:${computeShortSha(sha)}, Build:${buildNum} - ` +
`Successfully created ${isPublic ? 'public' : 'non-public'} preview.`);
} catch (err) { } catch (err) {
logger.error('CircleCI webhook error', err); logger.error('CircleCI webhook error', err);
respondWithError(res, err); respondWithError(res, err);

View File

@ -46,7 +46,7 @@
"@types/shelljs": "^0.8.0", "@types/shelljs": "^0.8.0",
"@types/supertest": "^2.0.5", "@types/supertest": "^2.0.5",
"nodemon": "^1.18.3", "nodemon": "^1.18.3",
"npm-run-all": "^4.1.3", "npm-run-all": "^4.1.5",
"supertest": "^3.1.0", "supertest": "^3.1.0",
"tslint": "^5.11.0", "tslint": "^5.11.0",
"tslint-jasmine-noSkipOrFocus": "^1.0.9", "tslint-jasmine-noSkipOrFocus": "^1.0.9",

View File

@ -129,7 +129,7 @@ ansi-styles@^2.2.1:
version "2.2.1" version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
ansi-styles@^3.2.0, ansi-styles@^3.2.1: ansi-styles@^3.2.1:
version "3.2.1" version "3.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
dependencies: dependencies:
@ -384,7 +384,7 @@ chalk@^1.1.3:
strip-ansi "^3.0.0" strip-ansi "^3.0.0"
supports-color "^2.0.0" supports-color "^2.0.0"
chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0: chalk@^2.0.1, chalk@^2.3.0, chalk@^2.4.1:
version "2.4.1" version "2.4.1"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
dependencies: dependencies:
@ -532,9 +532,10 @@ cross-spawn@^5.0.1:
shebang-command "^1.2.0" shebang-command "^1.2.0"
which "^1.2.9" which "^1.2.9"
cross-spawn@^6.0.4: cross-spawn@^6.0.5:
version "6.0.5" version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==
dependencies: dependencies:
nice-try "^1.0.4" nice-try "^1.0.4"
path-key "^2.0.1" path-key "^2.0.1"
@ -1630,16 +1631,17 @@ npm-packlist@^1.1.6:
ignore-walk "^3.0.1" ignore-walk "^3.0.1"
npm-bundled "^1.0.1" npm-bundled "^1.0.1"
npm-run-all@^4.1.3: npm-run-all@^4.1.5:
version "4.1.3" version "4.1.5"
resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-4.1.3.tgz#49f15b55a66bb4101664ce270cb18e7103f8f185" resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-4.1.5.tgz#04476202a15ee0e2e214080861bff12a51d98fba"
integrity sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==
dependencies: dependencies:
ansi-styles "^3.2.0" ansi-styles "^3.2.1"
chalk "^2.1.0" chalk "^2.4.1"
cross-spawn "^6.0.4" cross-spawn "^6.0.5"
memorystream "^0.3.1" memorystream "^0.3.1"
minimatch "^3.0.4" minimatch "^3.0.4"
ps-tree "^1.1.0" pidtree "^0.3.0"
read-pkg "^3.0.0" read-pkg "^3.0.0"
shell-quote "^1.6.1" shell-quote "^1.6.1"
string.prototype.padend "^3.0.0" string.prototype.padend "^3.0.0"
@ -1786,6 +1788,11 @@ pause-stream@0.0.11:
dependencies: dependencies:
through "~2.3" through "~2.3"
pidtree@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.3.0.tgz#f6fada10fccc9f99bf50e90d0b23d72c9ebc2e6b"
integrity sha512-9CT4NFlDcosssyg8KVFltgokyKZIFjoBxw8CTGy+5F38Y1eQWrt8tRayiUOXE+zVKQnYu5BR8JjCtvK3BcnBhg==
pify@^2.3.0: pify@^2.3.0:
version "2.3.0" version "2.3.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"

View File

@ -9,7 +9,7 @@ import { AdComponent } from './ad.component';
selector: 'app-ad-banner', selector: 'app-ad-banner',
// #docregion ad-host // #docregion ad-host
template: ` template: `
<div class="ad-banner"> <div class="ad-banner-example">
<h3>Advertisements</h3> <h3>Advertisements</h3>
<ng-template ad-host></ng-template> <ng-template ad-host></ng-template>
</div> </div>

View File

@ -18,6 +18,6 @@
color: black; color: black;
} }
.ad-banner { .ad-banner-example {
width: 400px; width: 400px;
} }

View File

@ -7,7 +7,8 @@
box-sizing: border-box; box-sizing: border-box;
} }
h3 { h3 {
text-align: center; margin-bottom: 0; text-align: center;
margin-bottom: 0;
} }
[class*='col-'] { [class*='col-'] {
padding-right: 20px; padding-right: 20px;

View File

@ -17,7 +17,8 @@ button {
border: none; border: none;
padding: 5px 10px; padding: 5px 10px;
border-radius: 4px; border-radius: 4px;
cursor: pointer; cursor: hand; cursor: pointer;
cursor: hand;
} }
button:hover { button:hover {
background-color: #cfd8dc; background-color: #cfd8dc;

View File

@ -16,7 +16,8 @@ a {
box-sizing: border-box; box-sizing: border-box;
} }
h3 { h3 {
text-align: center; margin-bottom: 0; text-align: center;
margin-bottom: 0;
} }
h4 { h4 {
position: relative; position: relative;

View File

@ -18,7 +18,8 @@ button {
border: none; border: none;
padding: 5px 10px; padding: 5px 10px;
border-radius: 4px; border-radius: 4px;
cursor: pointer; cursor: hand; cursor: pointer;
cursor: hand;
} }
button:hover { button:hover {
background-color: #cfd8dc; background-color: #cfd8dc;

View File

@ -16,7 +16,8 @@ a {
box-sizing: border-box; box-sizing: border-box;
} }
h3 { h3 {
text-align: center; margin-bottom: 0; text-align: center;
margin-bottom: 0;
} }
h4 { h4 {
position: relative; position: relative;

View File

@ -3,7 +3,7 @@
border-bottom: 1px solid gray; border-bottom: 1px solid gray;
border-left: 1px solid gray; border-left: 1px solid gray;
border-right: 1px solid gray; border-right: 1px solid gray;
width:195px; width: 195px;
height: 16px; height: 16px;
padding: 5px; padding: 5px;
background-color: white; background-color: white;

View File

@ -16,7 +16,8 @@ a {
box-sizing: border-box; box-sizing: border-box;
} }
h3 { h3 {
text-align: center; margin-bottom: 0; text-align: center;
margin-bottom: 0;
} }
h4 { h4 {
position: relative; position: relative;

View File

@ -18,7 +18,8 @@ button {
border: none; border: none;
padding: 5px 10px; padding: 5px 10px;
border-radius: 4px; border-radius: 4px;
cursor: pointer; cursor: hand; cursor: pointer;
cursor: hand;
} }
button:hover { button:hover {
background-color: #cfd8dc; background-color: #cfd8dc;

View File

@ -3,7 +3,7 @@
border-bottom: 1px solid gray; border-bottom: 1px solid gray;
border-left: 1px solid gray; border-left: 1px solid gray;
border-right: 1px solid gray; border-right: 1px solid gray;
width:195px; width: 195px;
height: 16px; height: 16px;
padding: 5px; padding: 5px;
background-color: white; background-color: white;

View File

@ -3,7 +3,7 @@
<div class="nf-container l-flex-wrap flex-center"> <div class="nf-container l-flex-wrap flex-center">
<img src="assets/images/support/angular-404.svg" width="300" height="300"/> <img src="assets/images/support/angular-404.svg" width="300" height="300"/>
<div class="nf-response l-flex-wrap"> <div class="nf-response l-flex-wrap">
<h1 class="no-toc">Page Not Found</h1> <h1 class="no-anchor no-toc">Page Not Found</h1>
<p>We're sorry. The page you are looking for cannot be found.</p> <p>We're sorry. The page you are looking for cannot be found.</p>
</div> </div>
</div> </div>

View File

@ -192,7 +192,7 @@ Here are two sample components and the `AdComponent` interface for reference:
The final ad banner looks like this: The final ad banner looks like this:
<figure> <figure>
<img src="generated/images/guide/dynamic-component-loader/ads.gif" alt="Ads"> <img src="generated/images/guide/dynamic-component-loader/ads-example.gif" alt="Ads">
</figure> </figure>

View File

@ -302,7 +302,7 @@ After asynchronous validation begins, the form control enters a `pending` state.
A common UI pattern is to show a spinner while the async validation is being performed. The following example presents how to achieve this with template-driven forms: A common UI pattern is to show a spinner while the async validation is being performed. The following example presents how to achieve this with template-driven forms:
```html ```html
<input [(ngModel)}="name" #model="ngModel" appSomeAsyncValidator> <input [(ngModel)]="name" #model="ngModel" appSomeAsyncValidator>
<app-spinner *ngIf="model.pending"></app-spinner> <app-spinner *ngIf="model.pending"></app-spinner>
``` ```

View File

@ -317,6 +317,30 @@ Within Angular, use [NgModules](guide/glossary#ngmodule) to make public parts av
{@a F} {@a F}
{@a form-control}
## form control
A instance of `FormControl`, which is a fundamental building block for Angular forms. Together with `FormGroup` and `FormArray`, tracks the value, validation, and status of a form input element.
Read more forms in the [Introduction to forms in Angular](guide/forms-overview).
{@a form-model}
## form model
The "source of truth" for the value and validation status of a form input element at a given point in time. When using [reactive forms](guide/glossary#reactive-forms), the form model is created explicitly in the component class. When using [template-driven forms](guide/glossary#template-driven-forms), the form model is implicitly created by directives.
Learn more about reactive and template-driven forms in the [Introduction to forms in Angular](guide/forms-overview).
{@a form-validation}
## form validation
A check that runs when form values change and reports whether the given values are correct and complete, according to the defined constraints. Reactive forms apply [validator functions](guide/form-validation#adding-to-reactive-forms). Template-driven forms use [validator directives](guide/form-validation#adding-to-template-driven-forms).
To learn more, see [Form Validation](guide/form-validation).
{@a G} {@a G}
@ -325,6 +349,14 @@ Within Angular, use [NgModules](guide/glossary#ngmodule) to make public parts av
{@a I} {@a I}
{@a immutability}
## immutability
The ability to alter the state of a value after its creation. [Reactive forms](guide/glossary#reactive-forms) perform immutable changes in that
each change to the data model produces a new data model rather than modifying the existing one. [Template-driven forms](guide/glossary#template-driven-forms) perform mutable changes with `NgModel` and [two-way data binding](guide/glossary#data-binding) to modify the existing data model in place.
{@a injectable} {@a injectable}
## injectable ## injectable
@ -575,14 +607,15 @@ Learn more in [Dependency Injection](guide/dependency-injection).
A framework for building Angular forms through code in a component. A framework for building Angular forms through code in a component.
The alternative is a [template-driven form](guide/glossary#template-driven-forms). The alternative is a [template-driven form](guide/glossary#template-driven-forms).
When building reactive forms: When using reactive forms:
* The "source of truth" is the component. The validation is defined using code in the component. * The "source of truth", the form model, is defined in the component class.
* Each control is explicitly created in the component class with `new FormControl()` or with `FormBuilder`. * Validation is set up through validation functions rather than valdation directives.
* Each control is explicitly created in the component class by creating a `FormControl` instance manually or with `FormBuilder`.
* The template input elements do *not* use `ngModel`. * The template input elements do *not* use `ngModel`.
* The associated Angular directives are prefixed with `Form`, such as `FormGroup()`, `FormControl()`, and `FormControlName()`. * The associated Angular directives are prefixed with `form`, such as `formControl`, `formGroup`, and `formControlName`.
Reactive forms are powerful, flexible, and a good choice for more complex data-entry form scenarios, such as dynamic generation of form controls. The alternative is a template-driven form. For an introduction and comparison of both forms approaches, see [Introduction to Angular Forms](guide/forms-overview).
{@a router} {@a router}
{@a router-module} {@a router-module}
@ -697,16 +730,14 @@ Additional templates, represented by `TemplateRef` objects, can define alternati
A format for building Angular forms using HTML forms and input elements in the view. A format for building Angular forms using HTML forms and input elements in the view.
The alternative format uses the [reactive forms](guide/glossary#reactive-forms) framework. The alternative format uses the [reactive forms](guide/glossary#reactive-forms) framework.
When building template-driven forms: When using template-driven forms:
* The "source of truth" is the template. The validation is defined using attributes on the individual input elements. * The "source of truth" is the template. The validation is defined using attributes on the individual input elements.
* [Two-way binding](guide/glossary#data-binding) with `ngModel` keeps the component model synchronized with the user's entry into the input elements. * [Two-way binding](guide/glossary#data-binding) with `ngModel` keeps the component model synchronized with the user's entry into the input elements.
* Behind the scenes, Angular creates a new control for each input element, provided you have set up a `name` attribute and two-way binding for each input. * Behind the scenes, Angular creates a new control for each input element, provided you have set up a `name` attribute and two-way binding for each input.
* The associated Angular directives are prefixed with `ng` such as `ngForm`, `ngModel`, and `ngModelGroup`. * The associated Angular directives are prefixed with `ng` such as `ngForm`, `ngModel`, and `ngModelGroup`.
Template-driven forms are convenient, quick, and simple. They are a good choice for many basic data-entry form scenarios. The alternative is a reactive form. For an introduction and comparison of both forms approaches, see [Introduction to Angular Forms](guide/forms-overview).
Read about how to build template-driven forms in [Forms](guide/forms).
{@a template-expression} {@a template-expression}

View File

@ -126,8 +126,8 @@ jobs:
key: my-project-{{ .Branch }}-{{ checksum "package-lock.json" }} key: my-project-{{ .Branch }}-{{ checksum "package-lock.json" }}
paths: paths:
- "node_modules" - "node_modules"
- run: npm run test -- --single-run --no-progress --browser=ChromeHeadlessCI - run: npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
- run: npm run e2e -- --no-progress --config=protractor-ci.conf.js - run: npm run e2e -- --protractor-config=e2e/protractor-ci.conf.js
``` ```
This configuration caches `node_modules/` and uses [`npm run`](https://docs.npmjs.com/cli/run-script) to run CLI commands, because `@angular/cli` is not installed globally. This configuration caches `node_modules/` and uses [`npm run`](https://docs.npmjs.com/cli/run-script) to run CLI commands, because `@angular/cli` is not installed globally.
@ -167,8 +167,8 @@ install:
- npm install - npm install
script: script:
- npm run test -- --single-run --no-progress --browser=ChromeHeadlessCI - npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
- npm run e2e -- --no-progress --config=protractor-ci.conf.js - npm run e2e -- --protractor-config=e2e/protractor-ci.conf.js
``` ```
This does the same things as the Circle CI configuration, except that Travis doesn't come with Chrome, so we use Chromium instead. This does the same things as the Circle CI configuration, except that Travis doesn't come with Chrome, so we use Chromium instead.
@ -190,7 +190,7 @@ which you must adjust to start Chrome without sandboxing.
We'll be using [Headless Chrome](https://developers.google.com/web/updates/2017/04/headless-chrome#cli) in these examples. We'll be using [Headless Chrome](https://developers.google.com/web/updates/2017/04/headless-chrome#cli) in these examples.
* In the Karma configuration file, `karma.conf.js`, add a custom launcher called ChromeNoSandbox below browsers: * In the Karma configuration file, `karma.conf.js`, add a custom launcher called ChromeHeadlessCI below browsers:
``` ```
browsers: ['Chrome'], browsers: ['Chrome'],
customLaunchers: { customLaunchers: {
@ -201,7 +201,7 @@ customLaunchers: {
}, },
``` ```
* Create a new file, `protractor-ci.conf.js`, in the root folder of your project, which extends the original `protractor.conf.js`: * In the root folder of your e2e tests project, create a new file named `protractor-ci.conf.js`. This new file extends the original `protractor.conf.js`.
``` ```
const config = require('./protractor.conf').config; const config = require('./protractor.conf').config;
@ -218,8 +218,8 @@ exports.config = config;
Now you can run the following commands to use the `--no-sandbox` flag: Now you can run the following commands to use the `--no-sandbox` flag:
<code-example language="sh" class="code-shell"> <code-example language="sh" class="code-shell">
ng test --single-run --no-progress --browser=ChromeHeadlessCI ng test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
ng e2e --no-progress --config=protractor-ci.conf.js ng e2e -- --protractor-config=e2e/protractor-ci.conf.js
</code-example> </code-example>
<div class="alert is-helpful"> <div class="alert is-helpful">
@ -238,7 +238,7 @@ Code coverage reports show you any parts of our code base that may not be prope
To generate a coverage report run the following command in the root of your project. To generate a coverage report run the following command in the root of your project.
<code-example language="sh" class="code-shell"> <code-example language="sh" class="code-shell">
ng test --watch=false --code-coverage ng test --no-watch --code-coverage
</code-example> </code-example>
When the tests are complete, the command creates a new `/coverage` folder in the project. Open the `index.html` file to see a report with your source code and code coverage values. When the tests are complete, the command creates a new `/coverage` folder in the project. Open the `index.html` file to see a report with your source code and code coverage values.
@ -684,7 +684,7 @@ and returns a [`ComponentFixture`](#component-fixture).
Do not re-configure `TestBed` after calling `createComponent`. Do not re-configure `TestBed` after calling `createComponent`.
The `createComponent` method freezes the current `TestBed`definition, The `createComponent` method freezes the current `TestBed` definition,
closing it to further configuration. closing it to further configuration.
You cannot call any more `TestBed` configuration methods, not `configureTestingModule()`, You cannot call any more `TestBed` configuration methods, not `configureTestingModule()`,

View File

@ -385,7 +385,6 @@ Set up a webpack configuration to handle the Node Express `server.ts` file and s
In your app root directory, create a webpack configuration file (`webpack.server.config.js`) that compiles the `server.ts` file and its dependencies into `dist/server.js`. In your app root directory, create a webpack configuration file (`webpack.server.config.js`) that compiles the `server.ts` file and its dependencies into `dist/server.js`.
<code-example format="." language="typescript" linenums="false"> <code-example format="." language="typescript" linenums="false">
@NgModule({
const path = require('path'); const path = require('path');
const webpack = require('webpack'); const webpack = require('webpack');

View File

Before

Width:  |  Height:  |  Size: 851 KiB

After

Width:  |  Height:  |  Size: 851 KiB

View File

@ -422,8 +422,8 @@
"picture": "minko.jpg", "picture": "minko.jpg",
"twitter": "mgechev", "twitter": "mgechev",
"website": "http://blog.mgechev.com", "website": "http://blog.mgechev.com",
"bio": "Software engineer who enjoys theoretical computer science and its practical applications. Author of the books 'Switching to Angular 2' and 'Getting Started with Angular', speaker and blogger. Working on tooling for Angular and TypeScript.", "bio": "Software engineer who enjoys theoretical computer science and its practical applications. Speaker, author of the book 'Switching to Angular', codelyzer, Guess.js, and the Go linter revive. Working for faster and more reliable software.",
"group": "GDE" "group": "Angular"
}, },
"uri": { "uri": {

View File

@ -13,17 +13,11 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<!-- ReactiveConf --> <!-- ngAtlanta 2019 -->
<tr> <tr>
<th><a href="https://reactiveconf.com/" title="ReactiveConf">ReactiveConf</a></th> <th><a href="https://ng-atl.org/" title="ngAtlanta">ngAtlanta</a></th>
<td>Prague, Czech Republic</td> <td>Atlanta, Georgia</td>
<td>October 29-31, 2018</td> <td>January 9 - 12, 2019</td>
</tr>
<!-- AngularConnect-->
<tr>
<th><a href="http://angularconnect.com" title="AngularConnect">AngularConnect</a></th>
<td>London, United Kingdom</td>
<td>November 5-7, 2018</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -38,6 +32,18 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<!-- ReactiveConf -->
<tr>
<th><a href="https://reactiveconf.com/" title="ReactiveConf">ReactiveConf</a></th>
<td>Prague, Czech Republic</td>
<td>October 29-31, 2018</td>
</tr>
<!-- AngularConnect-->
<tr>
<th><a href="http://angularconnect.com" title="AngularConnect">AngularConnect</a></th>
<td>London, United Kingdom</td>
<td>November 5-7, 2018</td>
</tr>
<!-- AngularMix --> <!-- AngularMix -->
<tr> <tr>
<th><a href="https://angularmix.com/" title="AngularMix">AngularMix</a></th> <th><a href="https://angularmix.com/" title="AngularMix">AngularMix</a></th>

View File

@ -447,6 +447,12 @@
"rev": true, "rev": true,
"title": "Simple Quality UI", "title": "Simple Quality UI",
"url": "https://sq-ui.github.io/ng-sq-ui/#/" "url": "https://sq-ui.github.io/ng-sq-ui/#/"
},
"smart": {
"desc": "Web Components for Angular. Dependency-free Angular components for building modern and mobile-friendly web apps",
"rev": true,
"title": "Smart Web Components",
"url": "https://www.htmlelements.com/angular/"
} }
} }
} }
@ -694,6 +700,12 @@
"Workshops & Onsite Training": { "Workshops & Onsite Training": {
"order": 2, "order": 2,
"resources": { "resources": {
"webucator": {
"desc": "Customized in-person instructor-led Angular training for private groups and public online instructor-led Angular classes.",
"rev": true,
"title": "Webucator",
"url": "https://www.webucator.com/webdev-training/angular-training"
},
"-acceleb": { "-acceleb": {
"desc": "Customized, Instructor-Led Angular Training", "desc": "Customized, Instructor-Led Angular Training",
"rev": true, "rev": true,
@ -782,6 +794,12 @@
"title": "SFEIR School (French)", "title": "SFEIR School (French)",
"url": "https://school.sfeir.com/project/sa200/" "url": "https://school.sfeir.com/project/sa200/"
}, },
"zenika-angular": {
"desc": "Angular trainings delivered by Zenika (FRANCE)",
"rev": true,
"title": "Angular Trainings (French)",
"url": "https://training.zenika.com/fr/training/angular2/description"
},
"formationjs": { "formationjs": {
"desc": "Angular onsite training in Paris (France). Monthly Angular workshops and custom onsite classes. We are focused on Angular, so we are always up to date.", "desc": "Angular onsite training in Paris (France). Monthly Angular workshops and custom onsite classes. We are focused on Angular, so we are always up to date.",
"rev": true, "rev": true,

View File

@ -1,7 +1,5 @@
<h1>Test Code Page</h1> <h1>Test Code Page</h1>
<p>Current location is <current-location></current-location></p>
<h2>&lt;code-tabs&gt;</h2> <h2>&lt;code-tabs&gt;</h2>
<p>No linenums at code-tabs level</p> <p>No linenums at code-tabs level</p>

View File

@ -741,7 +741,6 @@
{ "title": "v6", "url": "https://v6.angular.io" }, { "title": "v6", "url": "https://v6.angular.io" },
{ "title": "v5", "url": "https://v5.angular.io" }, { "title": "v5", "url": "https://v5.angular.io" },
{ "title": "v4", "url": "https://v4.angular.io" }, { "title": "v4", "url": "https://v4.angular.io" },
{ "title": "v2", "url": "https://v2.angular.io" }, { "title": "v2", "url": "https://v2.angular.io" }
{ "title": "AngularDart", "url": "https://webdev.dartlang.org/angular" }
] ]
} }

View File

@ -17,7 +17,7 @@ When youre done, users will be able to navigate the app like this:
## Add the `AppRoutingModule` ## Add the `AppRoutingModule`
An Angular best practice is to load and configure the router in a separate, top-level module In Angular, the best practice is to load and configure the router in a separate, top-level module
that is dedicated to routing and imported by the root `AppModule`. that is dedicated to routing and imported by the root `AppModule`.
By convention, the module class name is `AppRoutingModule` and it belongs in the `app-routing.module.ts` in the `src/app` folder. By convention, the module class name is `AppRoutingModule` and it belongs in the `app-routing.module.ts` in the `src/app` folder.

View File

@ -251,7 +251,7 @@ Here is the final version of `getHeroes` with the `tap` that logs the operation.
Most web APIs support a _get by id_ request in the form `:baseURL/:id`. Most web APIs support a _get by id_ request in the form `:baseURL/:id`.
Here, the _base URL_ is the `heroesURL` defined in the [Heroes and HTTP](http://localhost:4800/tutorial/toh-pt6#heroes-and-http) section (`api/heroes`) and _id_ is Here, the _base URL_ is the `heroesURL` defined in the [Heroes and HTTP](tutorial/toh-pt6#heroes-and-http) section (`api/heroes`) and _id_ is
the number of the hero that you want to retrieve. For example, `api/heroes/11`. the number of the hero that you want to retrieve. For example, `api/heroes/11`.
Add a `HeroService.getHero()` method to make that request: Add a `HeroService.getHero()` method to make that request:

View File

@ -12,13 +12,13 @@
"/app/search/search-worker.js", "/app/search/search-worker.js",
"/assets/images/favicons/favicon.ico", "/assets/images/favicons/favicon.ico",
"/assets/js/*.js", "/assets/js/*.js",
"/generated/lunr.min.js",
"/*.css", "/*.css",
"/*.js" "/*.js"
], ],
"urls": [ "urls": [
"https://fonts.googleapis.com/**", "https://fonts.googleapis.com/**",
"https://fonts.gstatic.com/s/**", "https://fonts.gstatic.com/s/**"
"https://maxcdn.bootstrapcdn.com/**"
] ]
} }
}, { }, {

View File

@ -7,7 +7,7 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"preinstall": "node ../tools/yarn/check-yarn.js", "preinstall": "node ../tools/yarn/check-yarn.js",
"postinstall": "node tools/cli-patches/patch.js && uglifyjs node_modules/lunr/lunr.js -c -m -o src/assets/js/lunr.min.js --source-map", "postinstall": "node tools/cli-patches/patch.js",
"aio-use-local": "node tools/ng-packages-installer overwrite . --debug", "aio-use-local": "node tools/ng-packages-installer overwrite . --debug",
"aio-use-npm": "node tools/ng-packages-installer restore .", "aio-use-npm": "node tools/ng-packages-installer restore .",
"aio-check-local": "node tools/ng-packages-installer check .", "aio-check-local": "node tools/ng-packages-installer check .",
@ -18,14 +18,14 @@
"build-for": "yarn ~~build --configuration", "build-for": "yarn ~~build --configuration",
"prebuild-local": "yarn setup-local", "prebuild-local": "yarn setup-local",
"build-local": "yarn ~~build --configuration=stable", "build-local": "yarn ~~build --configuration=stable",
"extract-cli-command-docs": "node tools/transforms/cli-docs-package/extract-cli-commands.js a176d127a", "extract-cli-command-docs": "node tools/transforms/cli-docs-package/extract-cli-commands.js 02524ab82",
"lint": "yarn check-env && yarn docs-lint && ng lint && yarn example-lint && yarn tools-lint", "lint": "yarn check-env && yarn docs-lint && ng lint && yarn example-lint && yarn tools-lint",
"test": "yarn check-env && ng test", "test": "yarn check-env && ng test",
"pree2e": "yarn check-env && yarn update-webdriver", "pree2e": "yarn check-env && yarn update-webdriver",
"e2e": "ng e2e --no-webdriver-update", "e2e": "ng e2e --no-webdriver-update",
"presetup": "yarn --cwd .. install && yarn install --frozen-lockfile && yarn ~~check-env && yarn ~~clean-generated && yarn boilerplate:remove", "presetup": "yarn --cwd .. install && yarn install --frozen-lockfile && yarn ~~check-env && yarn ~~clean-generated && yarn boilerplate:remove",
"setup": "yarn aio-use-npm && yarn example-use-npm", "setup": "yarn aio-use-npm && yarn example-use-npm",
"postsetup": "yarn boilerplate:add && yarn build-ie-polyfills && yarn extract-cli-command-docs && yarn docs", "postsetup": "yarn ~~build-ie-polyfills && yarn ~~minify-lunr && yarn boilerplate:add && yarn extract-cli-command-docs && yarn docs",
"presetup-local": "yarn presetup", "presetup-local": "yarn presetup",
"setup-local": "yarn aio-use-local && yarn example-use-local", "setup-local": "yarn aio-use-local && yarn example-use-local",
"postsetup-local": "yarn postsetup", "postsetup-local": "yarn postsetup",
@ -61,13 +61,14 @@
"generate-stackblitz": "node ./tools/stackblitz-builder/generateStackblitz", "generate-stackblitz": "node ./tools/stackblitz-builder/generateStackblitz",
"generate-zips": "node ./tools/example-zipper/generateZips", "generate-zips": "node ./tools/example-zipper/generateZips",
"build-404-page": "node scripts/build-404-page", "build-404-page": "node scripts/build-404-page",
"build-ie-polyfills": "yarn webpack-cli src/ie-polyfills.js -o src/generated/ie-polyfills.min.js --mode production",
"update-webdriver": "webdriver-manager update --standalone false --gecko false $CHROMEDRIVER_VERSION_ARG", "update-webdriver": "webdriver-manager update --standalone false --gecko false $CHROMEDRIVER_VERSION_ARG",
"~~check-env": "node scripts/check-environment", "~~check-env": "node scripts/check-environment",
"~~clean-generated": "node --eval \"require('shelljs').rm('-rf', 'src/generated')\"", "~~clean-generated": "node --eval \"require('shelljs').rm('-rf', 'src/generated')\"",
"~~build": "ng build", "~~build": "ng build",
"post~~build": "yarn build-404-page", "post~~build": "yarn build-404-page",
"~~http-server": "http-server" "~~build-ie-polyfills": "webpack-cli src/ie-polyfills.js -o src/generated/ie-polyfills.min.js --mode production",
"~~http-server": "http-server",
"~~minify-lunr": "uglifyjs node_modules/lunr/lunr.js -c -m -o src/generated/lunr.min.js --source-map"
}, },
"engines": { "engines": {
"node": ">=10.9.0 <11.0.0", "node": ">=10.9.0 <11.0.0",
@ -141,7 +142,7 @@
"lighthouse": "^3.2.1", "lighthouse": "^3.2.1",
"lodash": "^4.17.4", "lodash": "^4.17.4",
"lunr": "^2.1.0", "lunr": "^2.1.0",
"npm-run-all": "^4.1.3", "npm-run-all": "^4.1.5",
"protractor": "^5.2.0", "protractor": "^5.2.0",
"rehype": "^6.0.0", "rehype": "^6.0.0",
"rehype-slug": "^2.0.0", "rehype-slug": "^2.0.0",

View File

@ -2,10 +2,9 @@
"aio": { "aio": {
"master": { "master": {
"uncompressed": { "uncompressed": {
"runtime": 3881, "runtime": 3713,
"main": 499953, "main": 500343,
"polyfills": 53926, "polyfills": 53926
"prettify": 14917
} }
} }
} }

View File

@ -0,0 +1,37 @@
#!/usr/bin/env node
/**
* Usage:
* node create-preview <build-number>
*
* Triggers the preview server to initiate the preview creation process for the specified CircleCI
* build number. It must be called _after_ the build artifacts have been created and stored on
* CircleCI.
*/
// Imports
const {triggerWebhook} = require('../../.circleci/trigger-webhook');
// Constants
const JOB_NAME = 'aio_preview';
const WEBHOOK_URL = 'https://ngbuilds.io/circle-build';
// Input
const buildNumber = process.argv[2];
// Run
triggerWebhook(buildNumber, JOB_NAME, WEBHOOK_URL).
then(({statusCode, responseText}) => isSuccess(statusCode) ?
console.log(`Status: ${statusCode}\n${responseText}`) :
Promise.reject(new Error(`Request failed (status: ${statusCode}): ${responseText}`))).
catch(err => {
console.error(err);
process.exit(1);
});
// Helpers
function isSuccess(statusCode) {
// Getting a 409 response from the preview server means that the preview has already been created
// for the corresponding PR/SHA, so our objective has been accomplished.
return (200 <= statusCode && statusCode < 400) || (statusCode === 409);
}

View File

@ -29,10 +29,12 @@
<aio-top-menu *ngIf="isSideBySide" [nodes]="topMenuNodes"></aio-top-menu> <aio-top-menu *ngIf="isSideBySide" [nodes]="topMenuNodes"></aio-top-menu>
<aio-search-box class="search-container" #searchBox (onSearch)="doSearch($event)" (onFocus)="doSearch($event)"></aio-search-box> <aio-search-box class="search-container" #searchBox (onSearch)="doSearch($event)" (onFocus)="doSearch($event)"></aio-search-box>
<div class="toolbar-external-icons-container"> <div class="toolbar-external-icons-container">
<a href="https://twitter.com/angular" title="Twitter"> <a href="https://twitter.com/angular" title="Twitter" aria-label="Angular on twitter">
<img src="assets/images/logos/twitter-icon.svg"></a> <mat-icon svgIcon="logos:twitter"></mat-icon>
<a href="https://github.com/angular/angular" title="GitHub"> </a>
<img src="assets/images/logos/github-icon.svg"></a> <a href="https://github.com/angular/angular" title="GitHub" aria-label="Angular on github">
<mat-icon svgIcon="logos:github"></mat-icon>
</a>
</div> </div>
</mat-toolbar-row> </mat-toolbar-row>
</mat-toolbar> </mat-toolbar>
@ -72,3 +74,10 @@
<aio-footer [nodes]="footerNodes" [versionInfo]="versionInfo" ></aio-footer> <aio-footer [nodes]="footerNodes" [versionInfo]="versionInfo" ></aio-footer>
</footer> </footer>
<!--
Work-around to ensure that the `.woff2` file for the 'Material Icons' font will always be fetched.
This allows the SW to cache the file (even if there are no icons in the current page) and ensure
material icons on other pages are displayed correctly in offline mode.
(Note: Instantiate lazily to avoid affecting the initial rendering.)
-->
<mat-icon class="cdk-visually-hidden" *ngIf="!isStarting">&nbsp;</mat-icon>

View File

@ -742,7 +742,7 @@ describe('AppComponent', () => {
expect(component.showSearchResults).toBe(true); expect(component.showSearchResults).toBe(true);
}); });
it('should not intercept clicks om the searchBox', () => { it('should not intercept clicks on the searchBox', () => {
component.showSearchResults = true; component.showSearchResults = true;
fixture.detectChanges(); fixture.detectChanges();
@ -752,6 +752,11 @@ describe('AppComponent', () => {
expect(component.showSearchResults).toBe(true); expect(component.showSearchResults).toBe(true);
}); });
it('should not call `locationService.setSearch` when searchResults are not shown', () => {
docViewer.click();
expect(locationService.setSearch).not.toHaveBeenCalled();
});
}); });
describe('keyup handling', () => { describe('keyup handling', () => {

View File

@ -389,7 +389,10 @@ export class AppComponent implements OnInit {
hideSearchResults() { hideSearchResults() {
this.showSearchResults = false; this.showSearchResults = false;
this.locationService.setSearch('', { ...this.locationService.search(), search: undefined }); const oldSearch = this.locationService.search();
if (oldSearch.search !== undefined) {
this.locationService.setSearch('', { ...oldSearch, search: undefined });
}
} }
focusSearchBox() { focusSearchBox() {

View File

@ -51,31 +51,19 @@ export const svgIconProviders = [
useValue: { useValue: {
name: 'close', name: 'close',
svgSource: svgSource:
'<svg fill="#ffffff" focusable="false" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">' + '<svg focusable="false" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">' +
'<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" />' + '<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" />' +
'<path d="M0 0h24v24H0z" fill="none" />' + '<path d="M0 0h24v24H0z" fill="none" />' +
'</svg>', '</svg>',
}, },
multi: true, multi: true,
}, },
{
provide: SVG_ICONS,
useValue: {
name: 'error_outline',
svgSource:
'<svg focusable="false" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">' +
'<path d="M0 0h24v24H0V0z" fill="none" />' +
'<path d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" />' +
'</svg>',
},
multi: true,
},
{ {
provide: SVG_ICONS, provide: SVG_ICONS,
useValue: { useValue: {
name: 'insert_comment', name: 'insert_comment',
svgSource: svgSource:
'<svg fill="#ffffff" focusable="false" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">' + '<svg focusable="false" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">' +
'<path d="M20 2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z" />' + '<path d="M20 2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z" />' +
'<path d="M0 0h24v24H0z" fill="none" />' + '<path d="M0 0h24v24H0z" fill="none" />' +
'</svg>', '</svg>',
@ -104,6 +92,41 @@ export const svgIconProviders = [
}, },
multi: true, multi: true,
}, },
// Namespace: logos
{
provide: SVG_ICONS,
useValue: {
namespace: 'logos',
name: 'github',
svgSource:
'<svg focusable="false" viewBox="0 0 51.8 50.4" xmlns="http://www.w3.org/2000/svg">' +
'<path d="M25.9,0.2C11.8,0.2,0.3,11.7,0.3,25.8c0,11.3,7.3,20.9,17.5,24.3c1.3,0.2,1.7-0.6,1.7-1.2c0-0.6,0-2.6,0-4.8' +
'c-7.1,1.5-8.6-3-8.6-3c-1.2-3-2.8-3.7-2.8-3.7c-2.3-1.6,0.2-1.6,0.2-1.6c2.6,0.2,3.9,2.6,3.9,2.6c2.3,3.9,6,2.8,7.5,2.1' +
'c0.2-1.7,0.9-2.8,1.6-3.4c-5.7-0.6-11.7-2.8-11.7-12.7c0-2.8,1-5.1,2.6-6.9c-0.3-0.7-1.1-3.3,0.3-6.8c0,0,2.1-0.7,7,2.6' +
'c2-0.6,4.2-0.9,6.4-0.9c2.2,0,4.4,0.3,6.4,0.9c4.9-3.3,7-2.6,7-2.6c1.4,3.5,0.5,6.1,0.3,6.8c1.6,1.8,2.6,4.1,2.6,6.9' +
'c0,9.8-6,12-11.7,12.6c0.9,0.8,1.7,2.4,1.7,4.7c0,3.4,0,6.2,0,7c0,0.7,0.5,1.5,1.8,1.2c10.2-3.4,17.5-13,17.5-24.3' +
'C51.5,11.7,40.1,0.2,25.9,0.2z" />' +
'</svg>',
},
multi: true,
},
{
provide: SVG_ICONS,
useValue: {
namespace: 'logos',
name: 'twitter',
svgSource:
'<svg focusable="false" viewBox="0 0 50 59" xmlns="http://www.w3.org/2000/svg">' +
'<path d="M50,9.3c-1.8,0.8-3.8,1.4-5.9,1.6c2.1-1.3,3.7-3.3,4.5-5.7c-2,1.2-4.2,2-6.5,2.5c-1.9-2-4.5-3.2-7.5-3.2' +
'c-5.7,0-10.3,4.6-10.3,10.3c0,0.8,0.1,1.6,0.3,2.3C16.1,16.7,8.5,12.6,3.5,6.4c-0.9,1.5-1.4,3.3-1.4,5.2c0,3.6,1.8,6.7,4.6,8.5' +
'C5,20,3.4,19.6,2,18.8c0,0,0,0.1,0,0.1c0,5,3.5,9.1,8.2,10.1c-0.9,0.2-1.8,0.4-2.7,0.4c-0.7,0-1.3-0.1-1.9-0.2' +
'c1.3,4.1,5.1,7,9.6,7.1c-3.5,2.8-7.9,4.4-12.7,4.4c-0.8,0-1.6,0-2.4-0.1c4.5,2.9,9.9,4.6,15.7,4.6c18.9,0,29.2-15.6,29.2-29.2' +
'c0-0.4,0-0.9,0-1.3C46.9,13.2,48.6,11.4,50,9.3z" />' +
'</svg>',
},
multi: true,
},
]; ];
// tslint:enable: max-line-length // tslint:enable: max-line-length

View File

@ -1,12 +1,13 @@
import { NgModule, Type } from '@angular/core'; import { NgModule, Type } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { MatIconModule } from '@angular/material/icon';
import { ContributorListComponent } from './contributor-list.component'; import { ContributorListComponent } from './contributor-list.component';
import { ContributorService } from './contributor.service'; import { ContributorService } from './contributor.service';
import { ContributorComponent } from './contributor.component'; import { ContributorComponent } from './contributor.component';
import { WithCustomElementComponent } from '../element-registry'; import { WithCustomElementComponent } from '../element-registry';
@NgModule({ @NgModule({
imports: [ CommonModule ], imports: [ CommonModule, MatIconModule ],
declarations: [ ContributorListComponent, ContributorComponent ], declarations: [ ContributorListComponent, ContributorComponent ],
entryComponents: [ ContributorListComponent ], entryComponents: [ ContributorListComponent ],
providers: [ ContributorService ] providers: [ ContributorService ]

View File

@ -13,16 +13,16 @@ import { CONTENT_URL_PREFIX } from 'app/documents/document.service';
<div class="contributor-image" [style.background-image]="'url('+pictureBase+(person.picture || noPicture)+')'"> <div class="contributor-image" [style.background-image]="'url('+pictureBase+(person.picture || noPicture)+')'">
<div class="contributor-info"> <div class="contributor-info">
<a *ngIf="person.bio" mat-button> <a *ngIf="person.bio" mat-button class="info-item">
View Bio View Bio
</a> </a>
<a *ngIf="person.twitter" mat-button class="icon" <a *ngIf="person.twitter" mat-icon-button class="info-item icon"
href="https://twitter.com/{{person.twitter}}" target="_blank" (click)="$event.stopPropagation()"> href="https://twitter.com/{{person.twitter}}" target="_blank" (click)="$event.stopPropagation()">
<span class="fa fa-twitter fa-2x"></span> <mat-icon svgIcon="logos:twitter"></mat-icon>
</a> </a>
<a *ngIf="person.website" mat-button class="icon" <a *ngIf="person.website" mat-icon-button class="info-item icon"
href="{{person.website}}" target="_blank" (click)="$event.stopPropagation()"> href="{{person.website}}" target="_blank" (click)="$event.stopPropagation()">
<span class="fa fa-link fa-2x"></span> <mat-icon class="link-icon">link</mat-icon>
</a> </a>
</div> </div>
</div> </div>

View File

@ -1,35 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { LocationService } from 'app/shared/location.service';
import { MockLocationService } from 'testing/location.service';
import { CurrentLocationComponent } from './current-location.component';
describe('CurrentLocationComponent', () => {
let element: HTMLElement;
let fixture: ComponentFixture<CurrentLocationComponent>;
let locationService: MockLocationService;
beforeEach(() => {
locationService = new MockLocationService('initial/url');
TestBed.configureTestingModule({
declarations: [ CurrentLocationComponent ],
providers: [
{ provide: LocationService, useValue: locationService }
]
});
fixture = TestBed.createComponent(CurrentLocationComponent);
element = fixture.nativeElement;
});
it('should render the current location', () => {
fixture.detectChanges();
expect(element.textContent).toEqual('initial/url');
locationService.urlSubject.next('next/url');
fixture.detectChanges();
expect(element.textContent).toEqual('next/url');
});
});

View File

@ -1,12 +0,0 @@
/* tslint:disable component-selector */
import { Component } from '@angular/core';
import { LocationService } from 'app/shared/location.service';
/** Renders the current location path. */
@Component({
selector: 'current-location',
template: '{{ location.currentPath | async }}'
})
export class CurrentLocationComponent {
constructor(public location: LocationService) { }
}

View File

@ -1,13 +0,0 @@
import { NgModule, Type } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CurrentLocationComponent } from './current-location.component';
import { WithCustomElementComponent } from '../element-registry';
@NgModule({
imports: [ CommonModule ],
declarations: [ CurrentLocationComponent ],
entryComponents: [ CurrentLocationComponent ]
})
export class CurrentLocationModule implements WithCustomElementComponent {
customElementComponent: Type<any> = CurrentLocationComponent;
}

View File

@ -36,14 +36,6 @@ export const ELEMENT_MODULE_PATHS_AS_ROUTES = [
selector: 'code-tabs', selector: 'code-tabs',
loadChildren: './code/code-tabs.module#CodeTabsModule' loadChildren: './code/code-tabs.module#CodeTabsModule'
}, },
{
selector: 'current-location',
loadChildren: './current-location/current-location.module#CurrentLocationModule'
},
{
selector: 'expandable-section',
loadChildren: './expandable-section/expandable-section.module#ExpandableSectionModule'
},
{ {
selector: 'live-example', selector: 'live-example',
loadChildren: './live-example/live-example.module#LiveExampleModule' loadChildren: './live-example/live-example.module#LiveExampleModule'

View File

@ -1,7 +0,0 @@
<mat-expansion-panel style="background: inherit">
<mat-expansion-panel-header>
{{title}}
</mat-expansion-panel-header>
<ng-content></ng-content>
</mat-expansion-panel>

View File

@ -1,11 +0,0 @@
/* tslint:disable component-selector */
import {Component, Input} from '@angular/core';
/** Custom element wrapper for the material expansion panel with a title input. */
@Component({
selector: 'aio-expandable-section',
templateUrl: 'expandable-section.component.html',
})
export class ExpandableSectionComponent {
@Input() title;
}

View File

@ -1,13 +0,0 @@
import { NgModule, Type } from '@angular/core';
import { ExpandableSectionComponent } from './expandable-section.component';
import { WithCustomElementComponent } from '../element-registry';
import { MatExpansionModule } from '@angular/material';
@NgModule({
imports: [ MatExpansionModule ],
declarations: [ ExpandableSectionComponent, ],
entryComponents: [ ExpandableSectionComponent ]
})
export class ExpandableSectionModule implements WithCustomElementComponent {
customElementComponent: Type<any> = ExpandableSectionComponent;
}

View File

@ -113,6 +113,7 @@ describe('DocumentService', () => {
httpMock.expectOne({}).flush(null, {status: 500, statusText: 'Server Error'}); httpMock.expectOne({}).flush(null, {status: 500, statusText: 'Server Error'});
expect(latestDocument.id).toEqual(FETCHING_ERROR_ID); expect(latestDocument.id).toEqual(FETCHING_ERROR_ID);
expect(latestDocument.contents).toContain('We are unable to retrieve the "initial/doc" page at this time.');
expect(logger.output.error).toEqual([ expect(logger.output.error).toEqual([
[jasmine.any(Error)] [jasmine.any(Error)]
]); ]);

View File

@ -15,13 +15,13 @@ export const FETCHING_ERROR_ID = 'fetching-error';
export const CONTENT_URL_PREFIX = 'generated/'; export const CONTENT_URL_PREFIX = 'generated/';
export const DOC_CONTENT_URL_PREFIX = CONTENT_URL_PREFIX + 'docs/'; export const DOC_CONTENT_URL_PREFIX = CONTENT_URL_PREFIX + 'docs/';
const FETCHING_ERROR_CONTENTS = ` const FETCHING_ERROR_CONTENTS = (path: string) => `
<div class="nf-container l-flex-wrap flex-center"> <div class="nf-container l-flex-wrap flex-center">
<div class="nf-icon material-icons">error_outline</div> <div class="nf-icon material-icons">error_outline</div>
<div class="nf-response l-flex-wrap"> <div class="nf-response l-flex-wrap">
<h1 class="no-toc">Request for document failed.</h1> <h1 class="no-toc">Request for document failed.</h1>
<p> <p>
We are unable to retrieve the "<current-location></current-location>" page at this time. We are unable to retrieve the "${path}" page at this time.
Please check your connection and try again later. Please check your connection and try again later.
</p> </p>
</div> </div>
@ -46,7 +46,7 @@ export class DocumentService {
private getDocument(url: string) { private getDocument(url: string) {
const id = url || 'index'; const id = url || 'index';
this.logger.log('getting document', id); this.logger.log('getting document', id);
if ( !this.cache.has(id)) { if (!this.cache.has(id)) {
this.cache.set(id, this.fetchDocument(id)); this.cache.set(id, this.fetchDocument(id));
} }
return this.cache.get(id)!; return this.cache.get(id)!;
@ -93,7 +93,7 @@ export class DocumentService {
this.cache.delete(id); this.cache.delete(id);
return of({ return of({
id: FETCHING_ERROR_ID, id: FETCHING_ERROR_ID,
contents: FETCHING_ERROR_CONTENTS contents: FETCHING_ERROR_CONTENTS(id),
}); });
} }
} }

View File

@ -5,7 +5,11 @@ import { NavigationNode } from 'app/navigation/navigation.service';
selector: 'aio-top-menu', selector: 'aio-top-menu',
template: ` template: `
<ul role="navigation"> <ul role="navigation">
<li *ngFor="let node of nodes"><a class="nav-link" [href]="node.url" [title]="node.title">{{ node.title }}</a></li> <li *ngFor="let node of nodes">
<a class="nav-link" [href]="node.url" [title]="node.title">
<span class="nav-link-inner">{{ node.title }}</span>
</a>
</li>
</ul>` </ul>`
}) })
export class TopMenuComponent { export class TopMenuComponent {

View File

@ -6,7 +6,7 @@
var SEARCH_TERMS_URL = '/generated/docs/app/search-data.json'; var SEARCH_TERMS_URL = '/generated/docs/app/search-data.json';
// NOTE: This needs to be kept in sync with `ngsw-config.json`. // NOTE: This needs to be kept in sync with `ngsw-config.json`.
importScripts('/assets/js/lunr.min.js'); importScripts('/generated/lunr.min.js');
var index; var index;
var pages /* : SearchInfo */ = {}; var pages /* : SearchInfo */ = {};

View File

@ -17,6 +17,27 @@ describe('CustomIconRegistry', () => {
expect(svgElement).toEqual(createSvg(svgSrc)); expect(svgElement).toEqual(createSvg(svgSrc));
}); });
it('should support caching icons with a namespace', () => {
const mockHttp: any = {};
const mockSanitizer: any = {};
const mockDocument: any = {};
const svgSrc1 = '<svg xmlns="http://www.w3.org/2000/svg"><path d="h100" /></svg>';
const svgSrc2 = '<svg xmlns="http://www.w3.org/2000/svg"><path d="h200" /></svg>';
const svgSrc3 = '<svg xmlns="http://www.w3.org/2000/svg"><path d="h300" /></svg>';
const svgIcons: SvgIconInfo[] = [
{ name: 'test_icon', svgSource: svgSrc1 },
{ namespace: 'foo', name: 'test_icon', svgSource: svgSrc2 },
{ namespace: 'bar', name: 'test_icon', svgSource: svgSrc3 },
];
const registry = new CustomIconRegistry(mockHttp, mockSanitizer, mockDocument, svgIcons);
let svgElement: SVGElement|undefined;
registry.getNamedSvgIcon('test_icon', 'foo').subscribe(el => svgElement = el);
expect(svgElement).toEqual(createSvg(svgSrc2));
});
it('should call through to the MdIconRegistry if the icon name is not in the preloaded cache', () => { it('should call through to the MdIconRegistry if the icon name is not in the preloaded cache', () => {
const mockHttp: any = {}; const mockHttp: any = {};
const mockSanitizer: any = {}; const mockSanitizer: any = {};

View File

@ -20,21 +20,26 @@ import { DomSanitizer } from '@angular/platform-browser';
*/ */
export const SVG_ICONS = new InjectionToken<Array<SvgIconInfo>>('SvgIcons'); export const SVG_ICONS = new InjectionToken<Array<SvgIconInfo>>('SvgIcons');
export interface SvgIconInfo { export interface SvgIconInfo {
namespace?: string;
name: string; name: string;
svgSource: string; svgSource: string;
} }
interface SvgIconMap { interface SvgIconMap {
[iconName: string]: SVGElement; [namespace: string]: {
[iconName: string]: SVGElement;
};
} }
const DEFAULT_NS = '$$default';
/** /**
* A custom replacement for Angular Material's `MdIconRegistry`, which allows * A custom replacement for Angular Material's `MdIconRegistry`, which allows
* us to provide preloaded icon SVG sources. * us to provide preloaded icon SVG sources.
*/ */
@Injectable() @Injectable()
export class CustomIconRegistry extends MatIconRegistry { export class CustomIconRegistry extends MatIconRegistry {
private preloadedSvgElements: SvgIconMap = {}; private preloadedSvgElements: SvgIconMap = {[DEFAULT_NS]: {}};
constructor(http: HttpClient, sanitizer: DomSanitizer, @Optional() @Inject(DOCUMENT) document, constructor(http: HttpClient, sanitizer: DomSanitizer, @Optional() @Inject(DOCUMENT) document,
@Inject(SVG_ICONS) svgIcons: SvgIconInfo[]) { @Inject(SVG_ICONS) svgIcons: SvgIconInfo[]) {
@ -43,18 +48,24 @@ export class CustomIconRegistry extends MatIconRegistry {
} }
getNamedSvgIcon(iconName: string, namespace?: string) { getNamedSvgIcon(iconName: string, namespace?: string) {
if (this.preloadedSvgElements[iconName]) { const nsIconMap = this.preloadedSvgElements[namespace || DEFAULT_NS];
return of(this.preloadedSvgElements[iconName].cloneNode(true) as SVGElement); const preloadedElement = nsIconMap && nsIconMap[iconName];
}
return super.getNamedSvgIcon(iconName, namespace); return preloadedElement
? of(preloadedElement.cloneNode(true) as SVGElement)
: super.getNamedSvgIcon(iconName, namespace);
} }
private loadSvgElements(svgIcons: SvgIconInfo[]) { private loadSvgElements(svgIcons: SvgIconInfo[]) {
const div = document.createElement('DIV'); const div = document.createElement('DIV');
svgIcons.forEach(icon => { svgIcons.forEach(icon => {
const ns = icon.namespace || DEFAULT_NS;
const nsIconMap = this.preloadedSvgElements[ns] || (this.preloadedSvgElements[ns] = {});
// SECURITY: the source for the SVG icons is provided in code by trusted developers // SECURITY: the source for the SVG icons is provided in code by trusted developers
div.innerHTML = icon.svgSource; div.innerHTML = icon.svgSource;
this.preloadedSvgElements[icon.name] = div.querySelector('svg')!;
nsIconMap[icon.name] = div.querySelector('svg')!;
}); });
} }
} }

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 51.8 50.4" style="enable-background:new 0 0 51.8 50.4;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
</style>
<path class="st0" d="M25.9,0.2C11.8,0.2,0.3,11.7,0.3,25.8c0,11.3,7.3,20.9,17.5,24.3c1.3,0.2,1.7-0.6,1.7-1.2c0-0.6,0-2.6,0-4.8
c-7.1,1.5-8.6-3-8.6-3c-1.2-3-2.8-3.7-2.8-3.7c-2.3-1.6,0.2-1.6,0.2-1.6c2.6,0.2,3.9,2.6,3.9,2.6c2.3,3.9,6,2.8,7.5,2.1
c0.2-1.7,0.9-2.8,1.6-3.4c-5.7-0.6-11.7-2.8-11.7-12.7c0-2.8,1-5.1,2.6-6.9c-0.3-0.7-1.1-3.3,0.3-6.8c0,0,2.1-0.7,7,2.6
c2-0.6,4.2-0.9,6.4-0.9c2.2,0,4.4,0.3,6.4,0.9c4.9-3.3,7-2.6,7-2.6c1.4,3.5,0.5,6.1,0.3,6.8c1.6,1.8,2.6,4.1,2.6,6.9
c0,9.8-6,12-11.7,12.6c0.9,0.8,1.7,2.4,1.7,4.7c0,3.4,0,6.2,0,7c0,0.7,0.5,1.5,1.8,1.2c10.2-3.4,17.5-13,17.5-24.3
C51.5,11.7,40.1,0.2,25.9,0.2z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 50 49.7" style="enable-background:new 0 0 50 49.7;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
</style>
<path class="st0" d="M50,9.3c-1.8,0.8-3.8,1.4-5.9,1.6c2.1-1.3,3.7-3.3,4.5-5.7c-2,1.2-4.2,2-6.5,2.5c-1.9-2-4.5-3.2-7.5-3.2
c-5.7,0-10.3,4.6-10.3,10.3c0,0.8,0.1,1.6,0.3,2.3C16.1,16.7,8.5,12.6,3.5,6.4c-0.9,1.5-1.4,3.3-1.4,5.2c0,3.6,1.8,6.7,4.6,8.5
C5,20,3.4,19.6,2,18.8c0,0,0,0.1,0,0.1c0,5,3.5,9.1,8.2,10.1c-0.9,0.2-1.8,0.4-2.7,0.4c-0.7,0-1.3-0.1-1.9-0.2
c1.3,4.1,5.1,7,9.6,7.1c-3.5,2.8-7.9,4.4-12.7,4.4c-0.8,0-1.6,0-2.4-0.1c4.5,2.9,9.9,4.6,15.7,4.6c18.9,0,29.2-15.6,29.2-29.2
c0-0.4,0-0.9,0-1.3C46.9,13.2,48.6,11.4,50,9.3z"/>
</svg>

Before

Width:  |  Height:  |  Size: 937 B

View File

@ -21,9 +21,9 @@
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/favicons/favicon-144x144.png"> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/favicons/favicon-144x144.png">
<!-- NOTE: These need to be kept in sync with `ngsw-config.json`. --> <!-- NOTE: These need to be kept in sync with `ngsw-config.json`. -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
<link href="https://fonts.googleapis.com/css?family=Droid+Sans+Mono" rel="stylesheet"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Droid+Sans+Mono">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<!-- --> <!-- -->
<link rel="manifest" href="pwa-manifest.json"> <link rel="manifest" href="pwa-manifest.json">

View File

@ -103,8 +103,8 @@ footer::after {
left: 0; left: 0;
right: 0; right: 0;
background: background:
url('../src/assets/images/logos/angular/angular_whiteTransparent_withMargin.png') top 0 left 0 repeat, url('/assets/images/logos/angular/angular_whiteTransparent_withMargin.png') top 0 left 0 repeat,
url('../src/assets/images/logos/angular/angular_whiteTransparent_withMargin.png') top 80px left 160px repeat; url('/assets/images/logos/angular/angular_whiteTransparent_withMargin.png') top 80px left 160px repeat;
opacity: 0.05; opacity: 0.05;
background-size: 320px auto; background-size: 320px auto;
} }

View File

@ -147,15 +147,21 @@ aio-top-menu {
a.nav-link { a.nav-link {
margin: 0; margin: 0;
padding: 24px 16px; padding: 24px 0px;
cursor: pointer; cursor: pointer;
&:focus { .nav-link-inner {
background: rgba($white, 0.15);
border-radius: 4px;
outline: none;
padding: 8px 16px; padding: 8px 16px;
} }
&:focus {
outline: none;
.nav-link-inner {
background: rgba($white, 0.15);
border-radius: 4px;
}
}
} }
} }

View File

@ -67,21 +67,6 @@ a.button.mat-button {
background: $darkgray; background: $darkgray;
color: rgba($white, .87); color: rgba($white, .87);
} }
&.button-shield,
&.button-shield.mat-button {
background-color: $blue;
background: $blue url('assets/images/logos/angular/angular_whiteTransparent.svg') 24px 13px no-repeat;
color: rgba($white, .87);
padding-left: 54px;
background-size: 22px 22px;
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) {
background: $blue url('assets/images/logos/angular/angular_whiteTransparent.svg') 24px 13px no-repeat;
background-size: 22px 22px;
}
}
} }
.cta-bar { .cta-bar {

View File

@ -70,7 +70,7 @@ aio-contributor {
@media (hover) { opacity: 0; } @media (hover) { opacity: 0; }
border-radius: 50%; border-radius: 50%;
[mat-button] { .info-item {
color: $white; color: $white;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
@ -85,8 +85,14 @@ aio-contributor {
min-width: 20px; min-width: 20px;
width: 20px; width: 20px;
.fa-2x { mat-icon {
font-size: 20px; height: 20px;
width: 20px;
&.link-icon {
margin-top: -7px;
transform: rotateZ(45deg);
}
} }
} }
} }

View File

@ -73,7 +73,7 @@ aio-notification {
} }
mat-sidenav.mat-sidenav.sidenav { mat-sidenav.mat-sidenav.sidenav {
top: 56px + $notificationHeight; top: 64px + $notificationHeight;
@media (max-width: 600px) { @media (max-width: 600px) {
top: 56px + $notificationHeight; top: 56px + $notificationHeight;

View File

@ -624,9 +624,10 @@ ajv@6.5.3:
json-schema-traverse "^0.4.1" json-schema-traverse "^0.4.1"
uri-js "^4.2.2" uri-js "^4.2.2"
ajv@^4.7.0: ajv@^4.7.0, ajv@^4.9.1:
version "4.11.8" version "4.11.8"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536"
integrity sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=
dependencies: dependencies:
co "^4.6.0" co "^4.6.0"
json-stable-stringify "^1.0.1" json-stable-stringify "^1.0.1"
@ -726,7 +727,7 @@ ansi-styles@^3.1.0:
dependencies: dependencies:
color-convert "^1.9.0" color-convert "^1.9.0"
ansi-styles@^3.2.0, ansi-styles@^3.2.1: ansi-styles@^3.2.1:
version "3.2.1" version "3.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
dependencies: dependencies:
@ -923,6 +924,11 @@ assert-plus@1.0.0, assert-plus@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
assert-plus@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234"
integrity sha1-104bh+ev/A24qttwIfP+SBAasjQ=
assert@^1.1.1: assert@^1.1.1:
version "1.4.1" version "1.4.1"
resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91"
@ -998,18 +1004,23 @@ autoprefixer@8.4.1:
postcss "^6.0.22" postcss "^6.0.22"
postcss-value-parser "^3.2.3" postcss-value-parser "^3.2.3"
aws-sign2@~0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f"
integrity sha1-FDQt0428yU0OW4fXY81jYSwOeU8=
aws-sign2@~0.7.0: aws-sign2@~0.7.0:
version "0.7.0" version "0.7.0"
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
aws4@^1.2.1, aws4@^1.8.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f"
aws4@^1.6.0: aws4@^1.6.0:
version "1.6.0" version "1.6.0"
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e"
aws4@^1.8.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f"
axe-core@3.0.0-beta.2: axe-core@3.0.0-beta.2:
version "3.0.0-beta.2" version "3.0.0-beta.2"
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-3.0.0-beta.2.tgz#82a13d371268034352bba2bcb263c5625b3e4a09" resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-3.0.0-beta.2.tgz#82a13d371268034352bba2bcb263c5625b3e4a09"
@ -1196,6 +1207,22 @@ bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0:
version "4.11.8" version "4.11.8"
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f"
body-parser@1.18.2, body-parser@^1.16.1:
version "1.18.2"
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454"
integrity sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=
dependencies:
bytes "3.0.0"
content-type "~1.0.4"
debug "2.6.9"
depd "~1.1.1"
http-errors "~1.6.2"
iconv-lite "0.4.19"
on-finished "~2.3.0"
qs "6.5.1"
raw-body "2.3.2"
type-is "~1.6.15"
body-parser@1.18.3, body-parser@^1.18.3: body-parser@1.18.3, body-parser@^1.18.3:
version "1.18.3" version "1.18.3"
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4"
@ -1211,21 +1238,6 @@ body-parser@1.18.3, body-parser@^1.18.3:
raw-body "2.3.3" raw-body "2.3.3"
type-is "~1.6.16" type-is "~1.6.16"
body-parser@^1.16.1:
version "1.18.2"
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454"
dependencies:
bytes "3.0.0"
content-type "~1.0.4"
debug "2.6.9"
depd "~1.1.1"
http-errors "~1.6.2"
iconv-lite "0.4.19"
on-finished "~2.3.0"
qs "6.5.1"
raw-body "2.3.2"
type-is "~1.6.15"
bonjour@^3.5.0: bonjour@^3.5.0:
version "3.5.0" version "3.5.0"
resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5" resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5"
@ -2301,7 +2313,7 @@ cross-spawn@^5.0.1, cross-spawn@^5.1.0:
shebang-command "^1.2.0" shebang-command "^1.2.0"
which "^1.2.9" which "^1.2.9"
cross-spawn@^6.0.0, cross-spawn@^6.0.4, cross-spawn@^6.0.5: cross-spawn@^6.0.0, cross-spawn@^6.0.5:
version "6.0.5" version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
dependencies: dependencies:
@ -2782,10 +2794,6 @@ duplexer3@^0.1.4:
version "0.1.4" version "0.1.4"
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
duplexer@^0.1.1, duplexer@~0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1"
duplexify@^3.1.2, duplexify@^3.5.0: duplexify@^3.1.2, duplexify@^3.5.0:
version "3.5.1" version "3.5.1"
resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.1.tgz#4e1516be68838bc90a49994f0b39a6e5960befcd" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.1.tgz#4e1516be68838bc90a49994f0b39a6e5960befcd"
@ -3202,19 +3210,6 @@ event-emitter@^0.3.5, event-emitter@~0.3.5:
d "1" d "1"
es5-ext "~0.10.14" es5-ext "~0.10.14"
event-stream@~3.3.0:
version "3.3.6"
resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.6.tgz#cac1230890e07e73ec9cacd038f60a5b66173eef"
dependencies:
duplexer "^0.1.1"
flatmap-stream "^0.1.0"
from "^0.1.7"
map-stream "0.0.7"
pause-stream "^0.0.11"
split "^1.0.1"
stream-combiner "^0.2.2"
through "^2.3.8"
eventemitter3@1.x.x: eventemitter3@1.x.x:
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508"
@ -3683,10 +3678,6 @@ flat-cache@^1.2.1:
graceful-fs "^4.1.2" graceful-fs "^4.1.2"
write "^0.2.1" write "^0.2.1"
flatmap-stream@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/flatmap-stream/-/flatmap-stream-0.1.0.tgz#ed54e01422cd29281800914fcb968d58b685d5f1"
flatmap@0.0.3: flatmap@0.0.3:
version "0.0.3" version "0.0.3"
resolved "https://registry.yarnpkg.com/flatmap/-/flatmap-0.0.3.tgz#1f18a4d938152d495965f9c958d923ab2dd669b4" resolved "https://registry.yarnpkg.com/flatmap/-/flatmap-0.0.3.tgz#1f18a4d938152d495965f9c958d923ab2dd669b4"
@ -3732,6 +3723,15 @@ forever-agent@~0.6.1:
version "0.6.1" version "0.6.1"
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
form-data@~2.1.1:
version "2.1.4"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1"
integrity sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.5"
mime-types "^2.1.12"
form-data@~2.3.1: form-data@~2.3.1:
version "2.3.1" version "2.3.1"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.1.tgz#6fb94fbd71885306d73d15cc497fe4cc4ecd44bf" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.1.tgz#6fb94fbd71885306d73d15cc497fe4cc4ecd44bf"
@ -3769,10 +3769,6 @@ from2@^2.1.0, from2@^2.1.1:
inherits "^2.0.1" inherits "^2.0.1"
readable-stream "^2.0.0" readable-stream "^2.0.0"
from@^0.1.7:
version "0.1.7"
resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe"
fs-access@^1.0.0: fs-access@^1.0.0:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/fs-access/-/fs-access-1.0.1.tgz#d6a87f262271cefebec30c553407fb995da8777a" resolved "https://registry.yarnpkg.com/fs-access/-/fs-access-1.0.1.tgz#d6a87f262271cefebec30c553407fb995da8777a"
@ -4232,10 +4228,23 @@ handlebars@^4.0.1, handlebars@^4.0.3:
optionalDependencies: optionalDependencies:
uglify-js "^2.6" uglify-js "^2.6"
har-schema@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e"
integrity sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=
har-schema@^2.0.0: har-schema@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
har-validator@~4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a"
integrity sha1-M0gdDxu/9gDdID11gSpqX7oALio=
dependencies:
ajv "^4.9.1"
har-schema "^1.0.5"
har-validator@~5.0.3: har-validator@~5.0.3:
version "5.0.3" version "5.0.3"
resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd"
@ -4411,7 +4420,7 @@ hastscript@^4.0.0:
property-information "^4.0.0" property-information "^4.0.0"
space-separated-tokens "^1.0.0" space-separated-tokens "^1.0.0"
hawk@3.1.3: hawk@3.1.3, hawk@~3.1.3:
version "3.1.3" version "3.1.3"
resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4"
dependencies: dependencies:
@ -4577,6 +4586,15 @@ http-server@^0.9.0:
portfinder "0.4.x" portfinder "0.4.x"
union "~0.4.3" union "~0.4.3"
http-signature@~1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf"
integrity sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=
dependencies:
assert-plus "^0.2.0"
jsprim "^1.2.2"
sshpk "^1.7.0"
http-signature@~1.2.0: http-signature@~1.2.0:
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
@ -6095,10 +6113,6 @@ map-obj@^1.0.0, map-obj@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
map-stream@0.0.7:
version "0.0.7"
resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.0.7.tgz#8a1f07896d82b10926bd3744a2420009f88974a8"
map-visit@^1.0.0: map-visit@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f"
@ -6289,9 +6303,10 @@ miller-rabin@^4.0.0:
version "1.33.0" version "1.33.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db"
"mime-db@>= 1.36.0 < 2": "mime-db@>= 1.36.0 < 2", mime-db@~1.37.0:
version "1.37.0" version "1.37.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8"
integrity sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==
mime-db@~1.36.0: mime-db@~1.36.0:
version "1.36.0" version "1.36.0"
@ -6315,6 +6330,13 @@ mime-types@~2.1.19:
dependencies: dependencies:
mime-db "~1.36.0" mime-db "~1.36.0"
mime-types@~2.1.7:
version "2.1.21"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.21.tgz#28995aa1ecb770742fe6ae7e58f9181c744b3f96"
integrity sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==
dependencies:
mime-db "~1.37.0"
mime@1.4.1, mime@^1.2.11, mime@^1.3.4, mime@^1.4.1: mime@1.4.1, mime@^1.2.11, mime@^1.3.4, mime@^1.4.1:
version "1.4.1" version "1.4.1"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6"
@ -6777,16 +6799,17 @@ npm-registry-client@8.6.0:
optionalDependencies: optionalDependencies:
npmlog "2 || ^3.1.0 || ^4.0.0" npmlog "2 || ^3.1.0 || ^4.0.0"
npm-run-all@^4.1.3: npm-run-all@^4.1.5:
version "4.1.3" version "4.1.5"
resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-4.1.3.tgz#49f15b55a66bb4101664ce270cb18e7103f8f185" resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-4.1.5.tgz#04476202a15ee0e2e214080861bff12a51d98fba"
integrity sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==
dependencies: dependencies:
ansi-styles "^3.2.0" ansi-styles "^3.2.1"
chalk "^2.1.0" chalk "^2.4.1"
cross-spawn "^6.0.4" cross-spawn "^6.0.5"
memorystream "^0.3.1" memorystream "^0.3.1"
minimatch "^3.0.4" minimatch "^3.0.4"
ps-tree "^1.1.0" pidtree "^0.3.0"
read-pkg "^3.0.0" read-pkg "^3.0.0"
shell-quote "^1.6.1" shell-quote "^1.6.1"
string.prototype.padend "^3.0.0" string.prototype.padend "^3.0.0"
@ -6832,7 +6855,7 @@ nunjucks@^3.0.1:
version "1.4.3" version "1.4.3"
resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.3.tgz#64348e3b3d80f035b40ac11563d278f8b72db89c" resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.3.tgz#64348e3b3d80f035b40ac11563d278f8b72db89c"
oauth-sign@~0.8.2: oauth-sign@~0.8.1, oauth-sign@~0.8.2:
version "0.8.2" version "0.8.2"
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"
@ -7291,12 +7314,6 @@ path-type@^3.0.0:
dependencies: dependencies:
pify "^3.0.0" pify "^3.0.0"
pause-stream@^0.0.11:
version "0.0.11"
resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445"
dependencies:
through "~2.3"
pbkdf2@^3.0.3: pbkdf2@^3.0.3:
version "3.0.14" version "3.0.14"
resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.14.tgz#a35e13c64799b06ce15320f459c230e68e73bade" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.14.tgz#a35e13c64799b06ce15320f459c230e68e73bade"
@ -7307,10 +7324,20 @@ pbkdf2@^3.0.3:
safe-buffer "^5.0.1" safe-buffer "^5.0.1"
sha.js "^2.4.8" sha.js "^2.4.8"
performance-now@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5"
integrity sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=
performance-now@^2.1.0: performance-now@^2.1.0:
version "2.1.0" version "2.1.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
pidtree@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.3.0.tgz#f6fada10fccc9f99bf50e90d0b23d72c9ebc2e6b"
integrity sha512-9CT4NFlDcosssyg8KVFltgokyKZIFjoBxw8CTGy+5F38Y1eQWrt8tRayiUOXE+zVKQnYu5BR8JjCtvK3BcnBhg==
pify@^2.0.0, pify@^2.3.0: pify@^2.0.0, pify@^2.3.0:
version "2.3.0" version "2.3.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
@ -7528,9 +7555,10 @@ protractor@^5.2.0:
webdriver-js-extender "^1.0.0" webdriver-js-extender "^1.0.0"
webdriver-manager "^12.0.6" webdriver-manager "^12.0.6"
proxy-addr@~2.0.4: proxy-addr@~2.0.3, proxy-addr@~2.0.4:
version "2.0.4" version "2.0.4"
resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93"
integrity sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==
dependencies: dependencies:
forwarded "~0.1.2" forwarded "~0.1.2"
ipaddr.js "1.8.0" ipaddr.js "1.8.0"
@ -7539,12 +7567,6 @@ prr@~1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"
ps-tree@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.1.0.tgz#b421b24140d6203f1ed3c76996b4427b08e8c014"
dependencies:
event-stream "~3.3.0"
pseudomap@^1.0.2: pseudomap@^1.0.2:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
@ -8974,12 +8996,6 @@ split-string@^3.0.1, split-string@^3.0.2:
dependencies: dependencies:
extend-shallow "^3.0.0" extend-shallow "^3.0.0"
split@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9"
dependencies:
through "2"
sprintf-js@^1.0.3: sprintf-js@^1.0.3:
version "1.1.1" version "1.1.1"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.1.tgz#36be78320afe5801f6cea3ee78b6e5aab940ea0c" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.1.tgz#36be78320afe5801f6cea3ee78b6e5aab940ea0c"
@ -9060,13 +9076,6 @@ stream-browserify@^2.0.1:
inherits "~2.0.1" inherits "~2.0.1"
readable-stream "^2.0.2" readable-stream "^2.0.2"
stream-combiner@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.2.2.tgz#aec8cbac177b56b6f4fa479ced8c1912cee52858"
dependencies:
duplexer "~0.1.1"
through "~2.3.4"
stream-each@^1.1.0: stream-each@^1.1.0:
version "1.2.2" version "1.2.2"
resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.2.tgz#8e8c463f91da8991778765873fe4d960d8f616bd" resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.2.tgz#8e8c463f91da8991778765873fe4d960d8f616bd"
@ -9170,6 +9179,11 @@ stringmap@^0.2.2:
version "0.2.2" version "0.2.2"
resolved "https://registry.yarnpkg.com/stringmap/-/stringmap-0.2.2.tgz#556c137b258f942b8776f5b2ef582aa069d7d1b1" resolved "https://registry.yarnpkg.com/stringmap/-/stringmap-0.2.2.tgz#556c137b258f942b8776f5b2ef582aa069d7d1b1"
stringstream@~0.0.4:
version "0.0.6"
resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.6.tgz#7880225b0d4ad10e30927d167a1d6f2fd3b33a72"
integrity sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==
stringstream@~0.0.5: stringstream@~0.0.5:
version "0.0.5" version "0.0.5"
resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"
@ -9446,7 +9460,7 @@ through2@^2.0.0, through2@^2.0.3:
readable-stream "^2.1.5" readable-stream "^2.1.5"
xtend "~4.0.1" xtend "~4.0.1"
through@2, "through@>=2.2.7 <3", through@X.X.X, through@^2.3.6, through@^2.3.8, through@~2.3, through@~2.3.4: "through@>=2.2.7 <3", through@X.X.X, through@^2.3.6:
version "2.3.8" version "2.3.8"
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
@ -9540,6 +9554,13 @@ tough-cookie@^2.3.2, tough-cookie@~2.3.3:
dependencies: dependencies:
punycode "^1.4.1" punycode "^1.4.1"
tough-cookie@~2.3.0:
version "2.3.4"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655"
integrity sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==
dependencies:
punycode "^1.4.1"
tough-cookie@~2.4.3: tough-cookie@~2.4.3:
version "2.4.3" version "2.4.3"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781"

View File

@ -91,28 +91,12 @@ First time setup:
- Add the following to the `configurations` array: - Add the following to the `configurations` array:
```json ```json
{ {
"name": "Attach (inspect)", "type": "node",
"type": "node", "request": "attach",
"request": "attach", "name": "Attach to Remote",
"port": 9229, "port": 9229,
"address": "localhost", }
"restart": false,
"sourceMaps": true,
"localRoot": "${workspaceRoot}",
"remoteRoot": null
},
{
"name": "Attach (no-sm,inspect)",
"type": "node",
"request": "attach",
"port": 9229,
"address": "localhost",
"restart": false,
"sourceMaps": false,
"localRoot": "${workspaceRoot}",
"remoteRoot": null
},
``` ```
**Setting breakpoints directly in your code files may not work in VSCode**. This is because the files you're actually debugging are built files that exist in a `./private/...` folder. **Setting breakpoints directly in your code files may not work in VSCode**. This is because the files you're actually debugging are built files that exist in a `./private/...` folder.
@ -121,7 +105,7 @@ and launch the bazel corresponding test (`yarn bazel test <target> --config=debu
Bazel will wait on a connection. Go to the debug view (by clicking on the sidebar or Bazel will wait on a connection. Go to the debug view (by clicking on the sidebar or
Apple+Shift+D on Mac) and click on the green play icon next to the configuration name Apple+Shift+D on Mac) and click on the green play icon next to the configuration name
(ie `Attach (inspect)`). (ie `Attach to Remote`).
### Debugging a Karma Test ### Debugging a Karma Test
@ -168,8 +152,23 @@ Of course, non-hermeticity in an action can cause problems.
At worst, you can fetch a broken artifact from the cache, making your build non-reproducible. At worst, you can fetch a broken artifact from the cache, making your build non-reproducible.
For this reason, we are careful to implement our Bazel rules to depend only on their inputs. For this reason, we are careful to implement our Bazel rules to depend only on their inputs.
Currently we only use remote caching on CircleCI. Currently we only use remote caching on CircleCI and we let Angular core developers enable remote caching to speed up their builds.
We could enable it for developer builds as well, which would make initial builds much faster for developers by fetching already-built artifacts from the cache.
### Remote cache in development
To enable remote caching for your build:
1. Go to the service accounts for the ["internal" project](https://console.cloud.google.com/iam-admin/serviceaccounts?project=internal-200822)
1. Select "Angular local dev", click on "Edit", scroll to the bottom, and click "Create key"
1. When the pop-up shows, select "JSON" for "Key type" and click "Create"
1. Save the key in a secure location
1. Create a file called `.bazelrc.user` in the root directory of the workspace, and add the following content:
```
build --config=angular-team --google_credentials=[ABSOLUTE_PATH_TO_SERVICE_KEY]
```
### Remote cache for Circle CI
This feature is experimental, and developed by the CircleCI team with guidance from Angular. This feature is experimental, and developed by the CircleCI team with guidance from Angular.
Contact Alex Eagle with questions. Contact Alex Eagle with questions.
@ -181,6 +180,75 @@ Contact Alex Eagle with questions.
1. Bazel must be configured to connect to the proxy on a local port. This configuration lives in `.circleci/bazel.rc` and is enabled because we overwrite the system Bazel settings in /etc/bazel.bazelrc with this file. 1. Bazel must be configured to connect to the proxy on a local port. This configuration lives in `.circleci/bazel.rc` and is enabled because we overwrite the system Bazel settings in /etc/bazel.bazelrc with this file.
1. Each `bazel` command in `.circleci/config.yml` picks up and uses the caching flags. 1. Each `bazel` command in `.circleci/config.yml` picks up and uses the caching flags.
## Diagnosing slow builds
If a build seems slow you can use Bazel to diagnose where time is spent.
The first step is to generate a profile of the build using the `--profile filename_name.profile` flag.
```
yarn bazel build //packages/compiler --profile filename_name.profile
```
This will generate a `filename_name.profile` that you can then analyse using [analyze-profile](https://docs.bazel.build/versions/master/user-manual.html#analyze-profile) command.
## Using the console profile report
You can obtain a simple report directly in the console by running:
```
yarn bazel analyze-profile filename_name.profile
```
This will show the phase summary, individual phase information and critical path.
You can also list all individual tasks and the time they took using `--task_tree`.
```
yarn bazel analyze-profile filename_name.profile --task_tree ".*"
```
To show all tasks that take longer than a certain threshold, use the `--task_tree_threshold` flag.
The default behaviour is to use a 50ms threshold.
```
yarn bazel analyze-profile filename_name.profile --task_tree ".*" --task_tree_threshold 5000
```
`--task_tree` takes a regexp as argument that filters by the text shown after the time taken.
Compiling TypeScript shows as:
```
70569 ACTION_EXECUTE (10974.826 ms) Compiling TypeScript (devmode) //packages/compiler:compiler []
```
To filter all tasks by TypeScript compilations that took more than 5 seconds, use:
```
yarn bazel analyze-profile filename_name.profile --task_tree "Compiling TypeScript" --task_tree_threshold 5000
```
### Using the HTML profile report
A more comprehensive way to visualize the profile information is through the HTML report:
```
yarn bazel analyze-profile filename_name.profile --html --html_details --html_histograms
```
This will generate a `filename_name.profile.html` file that you can open in your browser.
On the upper right corner that is a small table of contents with links to three areas: Tasks, Legend and Statistics.
In the Tasks section you will find a graph of where time is spent. Legend shows what the colors in the Tasks graph mean.
Hovering over the background will show what phase that is, while hovering over bars will show more details about that specific action.
The Statistics section shows how long each phase took and how time was spent in that phase.
Usually the longest one is the execution phase, which also includes critical path information.
Also in the Statistics section are the Skylark statistic, split in User-Defined and Builtin function execution time.
You can click the "self" header twice to order the table by functions where the most time (in ms) is spent.
When diagnosing slow builds you should focus on the top time spenders across all phases and functions.
Usually there is a single item (or multiple items of the same kind) where the overwhelming majority of time is spent.
## Known issues ## Known issues
### Webstorm ### Webstorm

View File

@ -29,8 +29,6 @@ following products on your development machine:
* [Java Development Kit](http://www.oracle.com/technetwork/es/java/javase/downloads/index.html) which is used * [Java Development Kit](http://www.oracle.com/technetwork/es/java/javase/downloads/index.html) which is used
to execute the selenium standalone server for e2e testing. to execute the selenium standalone server for e2e testing.
* (Optional for now) [Bazel](https://bazel.build/), please follow instructions in [BAZEL.md](https://github.com/angular/angular/blob/master/docs/BAZEL.md)
## Getting the Sources ## Getting the Sources
Fork and clone the Angular repository: Fork and clone the Angular repository:
@ -124,7 +122,7 @@ You can automatically format your code by running:
A better way is to set up your IDE to format the changed file on each file save. A better way is to set up your IDE to format the changed file on each file save.
### VS Code ### VS Code
1. Install [Clang-Format](https://marketplace.visualstudio.com/items?itemName=xaver.clang-format) extension for VS Code. 1. Install [Clang-Format](https://marketplace.visualstudio.com/items?itemName=xaver.clang-format) extension for VS Code.
2. Open `settings.json` in your workspace and add these lines: 2. Open `settings.json` in your workspace and add these lines:
```json ```json
"files.autoSave": "onFocusChange", "files.autoSave": "onFocusChange",

View File

@ -5,43 +5,44 @@ The following are canned responses that the Angular team should use to close iss
Since GitHub currently doesn't allow us to have a repository-wide or organization-wide list of [saved replies](https://help.github.com/articles/working-with-saved-replies/), these replies need to be maintained by individual team members. Since the responses can be modified in the future, all responses are versioned to simplify the process of keeping the responses up to date. Since GitHub currently doesn't allow us to have a repository-wide or organization-wide list of [saved replies](https://help.github.com/articles/working-with-saved-replies/), these replies need to be maintained by individual team members. Since the responses can be modified in the future, all responses are versioned to simplify the process of keeping the responses up to date.
## Angular: Already Fixed (v2) ## Angular: Already Fixed (v3)
``` ```
Thanks for reporting this issue. Luckily it has already been fixed in one of the recent releases. Please update to the most recent version to resolve the problem. Thanks for reporting this issue. Luckily it has already been fixed in one of the recent releases. Please update to the most recent version to resolve the problem.
If after upgrade the problem still exists in your application please open a new issue and provide a StackBlitz reproducing the problem and describing the difference between the expected and current behavior. You can use this StackBlitz template: https://stackblitz.com/fork/angular-gitter If after upgrade the problem still exists in your application please [open a new issue](https://github.com/angular/angular/issues/new/choose) and follow the instructions in the issue template.
``` ```
## Angular: Don't Understand (v2) ## Angular: Don't Understand (v3)
``` ```
I'm sorry but we don't understand the problem you are reporting. I'm sorry but we don't understand the problem you are reporting.
If the problem still exists please open a new issue and provide a StackBlitz reproducing the problem and describing the difference between the expected and current behavior. You can use this StackBlitz template: https://stackblitz.com/fork/angular-gitter If the problem still exists in your application, please [open a new issue](https://github.com/angular/angular/issues/new/choose) and follow the instructions in the issue template.
``` ```
## Angular: StackBlitz Needed (v1) ## Angular: Can't reproduce (v2)
``` ```
I'm sorry but reported issues require a StackBlitz reproducing the problem. I'm sorry but we can't reproduce the problem you are reporting. We require that reported issues have a minimal reproduction that showcases the problem.
If this issue persists, please create a StackBlitz using this template and describe the difference between the expected and current behavior and create a new issue: https://stackblitz.com/fork/angular-gitter If the problem still exists in your application, please [open a new issue](https://github.com/angular/angular/issues/new/choose) and follow the instructions in the issue template that include info on how to create a reproduction using our template.
``` ```
## Angular: Duplicate (v1) ## Angular: Duplicate (v2)
``` ```
Thanks for reporting this issue. However this issue is a duplicate of an existing issue #<ISSUE_NUMBER>. Please subscribe to that issue for future updates. Thanks for reporting this issue. However this issue is a duplicate of an existing issue #ISSUE_NUMBER. Please subscribe to that issue for future updates.
``` ```
## Angular: Insufficient Information Provided (v1) ## Angular: Insufficient Information Provided (v2)
``` ```
Thanks for reporting this issue. However, you didn't provide sufficient information for us to understand and reproduce the problem. Please check out [our submission guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-submitting-an-issue) to understand why we can't act on issues that are lacking important information. Thanks for reporting this issue. However, you didn't provide sufficient information for us to understand and reproduce the problem. Please check out [our submission guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-submitting-an-issue) to understand why we can't act on issues that are lacking important information.
If the problem still persists, please file a new issue and ensure you provide all of the required information when filling out the issue template. If the problem still exists in your application, please [open a new issue](https://github.com/angular/angular/issues/new/choose) and follow the instructions in the issue template.
``` ```
## Angular: Issue Outside of Angular (v1) ## Angular: Issue Outside of Angular (v2)
``` ```
I'm sorry but this issue is not caused by Angular. Please contact the author(s) of project <PROJECT NAME> or file issue on their issue tracker. I'm sorry but this issue is not caused by Angular. Please contact the author(s) of project PROJECT_NAME or file issue on their issue tracker.
``` ```
## Angular: Behaving as Expected (v1) ## Angular: Behaving as Expected (v1)
@ -49,18 +50,18 @@ I'm sorry but this issue is not caused by Angular. Please contact the author(s)
It appears this behaves as expected. If you still feel there is an issue, please provide further details in a new issue. It appears this behaves as expected. If you still feel there is an issue, please provide further details in a new issue.
``` ```
## Angular: Non-reproducible (v1) ## Angular: Non-reproducible (v2)
``` ```
I'm sorry but we can't reproduce the problem following the instructions you provided. I'm sorry but we can't reproduce the problem following the instructions you provided.
If the problem still exists please open a new issue following [our submission guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-submitting-an-issue). If the problem still exists in your application please [open a new issue](https://github.com/angular/angular/issues/new/choose) and follow the instructions in the issue template.
``` ```
## Angular: Obsolete (v1) ## Angular: Obsolete (v2)
``` ```
Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular version. Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular version.
If the problem still persists, please file a new issue and ensure you provide the version of Angular affected and include the steps to reproduce the problem when filling out the issue template. If the problem still exists in your application, please [open a new issue](https://github.com/angular/angular/issues/new/choose) and follow the instructions in the issue template.
``` ```

View File

@ -32,8 +32,6 @@ gulp.task('format', loadTask('format', 'format'));
gulp.task('format:untracked', loadTask('format', 'format-untracked')); gulp.task('format:untracked', loadTask('format', 'format-untracked'));
gulp.task('format:diff', loadTask('format', 'format-diff')); gulp.task('format:diff', loadTask('format', 'format-diff'));
gulp.task('format:changed', ['format:untracked', 'format:diff']); gulp.task('format:changed', ['format:untracked', 'format:diff']);
gulp.task('build.sh', loadTask('build', 'all'));
gulp.task('build.sh:no-bundle', loadTask('build', 'no-bundle'));
gulp.task('lint', ['format:enforce', 'validate-commit-messages', 'tslint']); gulp.task('lint', ['format:enforce', 'validate-commit-messages', 'tslint']);
gulp.task('tslint', ['tools:build'], loadTask('lint')); gulp.task('tslint', ['tools:build'], loadTask('lint'));
gulp.task('validate-commit-messages', loadTask('validate-commit-message')); gulp.task('validate-commit-messages', loadTask('validate-commit-message'));

View File

@ -1,5 +1,7 @@
workspace(name = "bazel_integration_test") workspace(name = "bazel_integration_test")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# #
# Download Bazel toolchain dependencies as needed by build actions # Download Bazel toolchain dependencies as needed by build actions
# #
@ -11,15 +13,23 @@ local_repository(
http_archive( http_archive(
name = "rxjs", name = "rxjs",
url = "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz",
strip_prefix = "package/src",
sha256 = "72b0b4e517f43358f554c125e40e39f67688cd2738a8998b4a266981ed32f403", sha256 = "72b0b4e517f43358f554c125e40e39f67688cd2738a8998b4a266981ed32f403",
strip_prefix = "package/src",
url = "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz",
) )
load("@angular//packages/bazel:package.bzl", "rules_angular_dependencies") load("@angular//packages/bazel:package.bzl", "rules_angular_dependencies")
rules_angular_dependencies() rules_angular_dependencies()
load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependencies")
rules_typescript_dependencies()
load("@build_bazel_rules_nodejs//:package.bzl", "rules_nodejs_dependencies")
rules_nodejs_dependencies()
http_archive( http_archive(
name = "io_bazel_rules_sass", name = "io_bazel_rules_sass",
sha256 = "dbe9fb97d5a7833b2a733eebc78c9c1e3880f676ac8af16e58ccf2139cbcad03", sha256 = "dbe9fb97d5a7833b2a733eebc78c9c1e3880f676ac8af16e58ccf2139cbcad03",
@ -34,6 +44,7 @@ http_archive(
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install") load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
check_bazel_version("0.17.0") check_bazel_version("0.17.0")
node_repositories( node_repositories(
node_version = "10.9.0", node_version = "10.9.0",
yarn_version = "1.12.1", yarn_version = "1.12.1",
@ -45,14 +56,16 @@ yarn_install(
yarn_lock = "//src:yarn.lock", yarn_lock = "//src:yarn.lock",
) )
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains") load("@io_bazel_rules_go//go:def.bzl", "go_register_toolchains", "go_rules_dependencies")
go_rules_dependencies() go_rules_dependencies()
go_register_toolchains() go_register_toolchains()
load("@io_bazel_rules_webtesting//web:repositories.bzl", "browser_repositories", "web_test_repositories") load("@io_bazel_rules_webtesting//web:repositories.bzl", "browser_repositories", "web_test_repositories")
web_test_repositories() web_test_repositories()
browser_repositories( browser_repositories(
chromium = True, chromium = True,
firefox = True, firefox = True,

View File

@ -13,8 +13,8 @@
"@angular/bazel": "file:../angular/dist/packages-dist/bazel", "@angular/bazel": "file:../angular/dist/packages-dist/bazel",
"@angular/compiler": "file:../angular/dist/packages-dist/compiler", "@angular/compiler": "file:../angular/dist/packages-dist/compiler",
"@angular/compiler-cli": "file:../angular/dist/packages-dist/compiler-cli", "@angular/compiler-cli": "file:../angular/dist/packages-dist/compiler-cli",
"@bazel/karma": "0.21.0", "@bazel/karma": "0.22.0",
"@bazel/typescript": "0.21.0", "@bazel/typescript": "0.22.0",
"@types/jasmine": "2.8.8", "@types/jasmine": "2.8.8",
"@types/source-map": "0.5.1", "@types/source-map": "0.5.1",
"protractor": "5.1.2", "protractor": "5.1.2",

File diff suppressed because it is too large Load Diff

View File

@ -29,11 +29,11 @@ module.exports = function(config) {
{pattern: 'dist/all/@angular/**/*.js', included: false, watched: true}, {pattern: 'dist/all/@angular/**/*.js', included: false, watched: true},
// Serve AngularJS for `ngUpgrade` testing. // Serve AngularJS for `ngUpgrade` testing.
{pattern: 'node_modules/angular-1.5/angular.js', included: false, watched: false}, {pattern: 'node_modules/angular-1.5/angular?(.min).js', included: false, watched: false},
{pattern: 'node_modules/angular-mocks-1.5/angular-mocks.js', included: false, watched: false}, {pattern: 'node_modules/angular-mocks-1.5/angular-mocks.js', included: false, watched: false},
{pattern: 'node_modules/angular-1.6/angular.js', included: false, watched: false}, {pattern: 'node_modules/angular-1.6/angular?(.min).js', included: false, watched: false},
{pattern: 'node_modules/angular-mocks-1.6/angular-mocks.js', included: false, watched: false}, {pattern: 'node_modules/angular-mocks-1.6/angular-mocks.js', included: false, watched: false},
{pattern: 'node_modules/angular/angular.js', included: false, watched: false}, {pattern: 'node_modules/angular/angular?(.min).js', included: false, watched: false},
{pattern: 'node_modules/angular-mocks/angular-mocks.js', included: false, watched: false}, {pattern: 'node_modules/angular-mocks/angular-mocks.js', included: false, watched: false},
'node_modules/core-js/client/core.js', 'node_modules/core-js/client/core.js',
@ -122,12 +122,9 @@ module.exports = function(config) {
startConnect: false, startConnect: false,
recordVideo: false, recordVideo: false,
recordScreenshots: false, recordScreenshots: false,
options: { idleTimeout: 600,
'selenium-version': '2.53.0', commandTimeout: 600,
'command-timeout': 600, maxDuration: 5400,
'idle-timeout': 600,
'max-duration': 5400,
}
}, },
browserStack: { browserStack: {
@ -154,10 +151,8 @@ module.exports = function(config) {
config.sauceLabs.build = buildId; config.sauceLabs.build = buildId;
config.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER; config.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
// TODO(mlaval): remove once SauceLabs supports websockets. // Try "websocket" for a faster transmission first. Fallback to "polling" if necessary.
// This speeds up the capturing a bit, as browsers don't even try to use websocket. config.transports = ['websocket', 'polling'];
console.log('>>>> setting socket.io transport to polling <<<<');
config.transports = ['polling'];
} }
if (process.env.CI_MODE.startsWith('browserstack')) { if (process.env.CI_MODE.startsWith('browserstack')) {

View File

@ -1,6 +1,6 @@
{ {
"name": "angular-srcs", "name": "angular-srcs",
"version": "7.1.0", "version": "7.1.4",
"private": true, "private": true,
"branchPattern": "2.0.*", "branchPattern": "2.0.*",
"description": "Angular - a web framework for modern web apps", "description": "Angular - a web framework for modern web apps",
@ -16,13 +16,11 @@
"url": "https://github.com/angular/angular.git" "url": "https://github.com/angular/angular.git"
}, },
"scripts": { "scripts": {
"preskylint": "bazel build --noshow_progress @io_bazel//src/tools/skylark/java/com/google/devtools/skylark/skylint:Skylint", "bazel:format": "find . -type f \\( -name \"*.bzl\" -or -name BUILD -or -name BUILD.bazel -or -name WORKSPACE \\) ! -path \"*/node_modules/*\" | xargs buildifier -v",
"//": "deprecated-api is disabled because we use actions.new_file(genfiles_dir) which has no replacement, see https://github.com/bazelbuild/bazel/issues/4858", "bazel:lint": "yarn bazel:format --lint=warn",
"skylint": "find . -type f -name \"*.bzl\" ! -path \"*/node_modules/*\" ! -path \"./dist/*\" | xargs $(bazel info bazel-bin)/external/io_bazel/src/tools/skylark/java/com/google/devtools/skylark/skylint/Skylint --disable-checks=deprecated-api", "bazel:lint-fix": "yarn bazel:format --lint=fix",
"prebuildifier": "bazel build --noshow_progress @com_github_bazelbuild_buildtools//buildifier",
"buildifier": "find . -type f \\( -name \"*.bzl\" -or -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs $(bazel info bazel-bin)/external/com_github_bazelbuild_buildtools/buildifier/*/buildifier",
"preinstall": "node tools/yarn/check-yarn.js", "preinstall": "node tools/yarn/check-yarn.js",
"postinstall": "yarn update-webdriver && node ./tools/postinstall-patches.js", "postinstall": "yarn update-webdriver && node --preserve-symlinks --preserve-symlinks-main ./tools/postinstall-patches.js",
"update-webdriver": "webdriver-manager update --gecko false $CHROMEDRIVER_VERSION_ARG", "update-webdriver": "webdriver-manager update --gecko false $CHROMEDRIVER_VERSION_ARG",
"check-env": "gulp check-env", "check-env": "gulp check-env",
"commitmsg": "node ./scripts/git/commit-msg.js", "commitmsg": "node ./scripts/git/commit-msg.js",
@ -36,7 +34,8 @@
"@angular-devkit/architect": "^0.10.6", "@angular-devkit/architect": "^0.10.6",
"@angular-devkit/core": "^7.0.4", "@angular-devkit/core": "^7.0.4",
"@angular-devkit/schematics": "^7.0.4", "@angular-devkit/schematics": "^7.0.4",
"@bazel/typescript": "0.21.0", "@bazel/karma": "~0.22.0",
"@bazel/typescript": "~0.22.0",
"@schematics/angular": "^7.0.4", "@schematics/angular": "^7.0.4",
"@types/chokidar": "1.7.3", "@types/chokidar": "1.7.3",
"@types/convert-source-map": "^1.5.1", "@types/convert-source-map": "^1.5.1",
@ -76,8 +75,8 @@
"selenium-webdriver": "3.5.0", "selenium-webdriver": "3.5.0",
"shelljs": "^0.8.1", "shelljs": "^0.8.1",
"source-map": "^0.6.1", "source-map": "^0.6.1",
"source-map-support": "0.4.18", "source-map-support": "0.5.9",
"tsickle": "0.32.1", "tsickle": "0.33.1",
"tslib": "^1.7.1", "tslib": "^1.7.1",
"typescript": "~3.1.1", "typescript": "~3.1.1",
"xhr2": "0.1.4", "xhr2": "0.1.4",
@ -85,13 +84,13 @@
"zone.js": "^0.8.26" "zone.js": "^0.8.26"
}, },
"optionalDependencies": { "optionalDependencies": {
"fsevents": "1.1.2" "fsevents": "2.0.1"
}, },
"// 2": "devDependencies are not used under Bazel. Many can be removed after test.sh is deleted.", "// 2": "devDependencies are not used under Bazel. Many can be removed after test.sh is deleted.",
"devDependencies": { "devDependencies": {
"@bazel/bazel": "^0.18.1", "@bazel/bazel": "~0.20.0",
"@bazel/ibazel": "^0.1.1", "@bazel/buildifier": "^0.19.2",
"@bazel/karma": "0.21.0", "@bazel/ibazel": "~0.9.0",
"@types/angular": "^1.6.47", "@types/angular": "^1.6.47",
"@types/base64-js": "1.2.5", "@types/base64-js": "1.2.5",
"@types/jasminewd2": "^2.0.4", "@types/jasminewd2": "^2.0.4",
@ -111,7 +110,7 @@
"firefox-profile": "1.0.3", "firefox-profile": "1.0.3",
"glob": "7.1.2", "glob": "7.1.2",
"gulp": "3.9.1", "gulp": "3.9.1",
"gulp-clang-format": "1.0.23", "gulp-clang-format": "1.0.27",
"gulp-connect": "5.0.0", "gulp-connect": "5.0.0",
"gulp-conventional-changelog": "^2.0.3", "gulp-conventional-changelog": "^2.0.3",
"gulp-filter": "^5.1.0", "gulp-filter": "^5.1.0",
@ -124,7 +123,7 @@
"karma-browserstack-launcher": "^1.3.0", "karma-browserstack-launcher": "^1.3.0",
"karma-chrome-launcher": "^2.2.0", "karma-chrome-launcher": "^2.2.0",
"karma-jasmine": "^1.1.2", "karma-jasmine": "^1.1.2",
"karma-sauce-launcher": "^1.2.0", "karma-sauce-launcher": "^2.0.2",
"karma-sourcemap-loader": "^0.3.7", "karma-sourcemap-loader": "^0.3.7",
"madge": "0.5.0", "madge": "0.5.0",
"mutation-observer": "^1.0.3", "mutation-observer": "^1.0.3",
@ -145,4 +144,4 @@
"vrsource-tslint-rules": "5.1.1", "vrsource-tslint-rules": "5.1.1",
"webpack": "1.12.9" "webpack": "1.12.9"
} }
} }

View File

@ -27,6 +27,11 @@ ng_package(
tags = [ tags = [
"release-with-framework", "release-with-framework",
], ],
# Do not add more to this list.
# Dependencies on the full npm_package cause long re-builds.
visibility = [
"//packages/compiler/test:__pkg__",
],
deps = [ deps = [
":animations", ":animations",
"//packages/animations/browser", "//packages/animations/browser",

View File

@ -811,7 +811,7 @@ export class TransitionAnimationEngine {
} }
this.driver.query(element, DISABLED_SELECTOR, true).forEach(node => { this.driver.query(element, DISABLED_SELECTOR, true).forEach(node => {
this.markElementAsDisabled(element, false); this.markElementAsDisabled(node, false);
}); });
} }

View File

@ -65,7 +65,7 @@ function parseTimeExpression(
const delayMatch = matches[3]; const delayMatch = matches[3];
if (delayMatch != null) { if (delayMatch != null) {
delay = _convertTimeValueToMS(Math.floor(parseFloat(delayMatch)), matches[4]); delay = _convertTimeValueToMS(parseFloat(delayMatch), matches[4]);
} }
const easingVal = matches[5]; const easingVal = matches[5];

View File

@ -1132,7 +1132,7 @@ export function useAnimation(
/** /**
* Finds one or more inner elements within the current element that is * Finds one or more inner elements within the current element that is
* being animated within a sequence. Use with `animateChild()`. * being animated within a sequence. Use with `animate()`.
* *
* @param selector The element to query, or a set of elements that contain Angular-specific * @param selector The element to query, or a set of elements that contain Angular-specific
* characteristics, specified with one or more of the following tokens. * characteristics, specified with one or more of the following tokens.
@ -1179,7 +1179,7 @@ export function useAnimation(
* ### Usage Example * ### Usage Example
* *
* The following example queries for inner elements and animates them * The following example queries for inner elements and animates them
* individually using `animateChild()`. * individually using `animate()`.
* *
* ```typescript * ```typescript
* @Component({ * @Component({

View File

@ -13,6 +13,9 @@ npm_package(
"//packages/bazel/docs", "//packages/bazel/docs",
], ],
tags = ["release-with-framework"], tags = ["release-with-framework"],
# Do not add more to this list.
# Dependencies on the full npm_package cause long re-builds.
visibility = ["//visibility:private"],
deps = [ deps = [
"//packages/bazel/src/builders", "//packages/bazel/src/builders",
"//packages/bazel/src/ng_package:lib", "//packages/bazel/src/ng_package:lib",

View File

@ -7,8 +7,8 @@
*/ */
/** /**
* @fileoverview This script runs as a postinstall in the published npm packages * @fileoverview This script runs as a postinstall in the published npm packages
* and checks that the version of the build_bazel_rules_typescript external * and checks that the version of the Angular external repository matches that
* repository matches that of the published npm package. * of the published npm package.
* *
* Note, this check is only performed with bazel managed deps when the yarn or * Note, this check is only performed with bazel managed deps when the yarn or
* npm install is from a yarn_install or npm_install repository rule. For self * npm install is from a yarn_install or npm_install repository rule. For self
@ -19,6 +19,7 @@
const path = require('path'); const path = require('path');
const fs = require('fs'); const fs = require('fs');
const semver = require('semver');
// Version in package.bzl should match the npm package version // Version in package.bzl should match the npm package version
// but this should be tolerant of development stamped versions such as // but this should be tolerant of development stamped versions such as
@ -56,14 +57,12 @@ if (isBazelManagedDeps()) {
} }
// Be tolerant of versions such as "0.17.0-7-g76dc057" // Be tolerant of versions such as "0.17.0-7-g76dc057"
const angularPackageVersion = contents.version.split('-')[0]; const angularPackageVersion = contents.version.split('-')[0];
if (npmPackageVersion !== angularPackageVersion) { // Should match only the major and minor versions
// TODO: we might need to support a range here. const range = `${semver.major(angularPackageVersion)}.${semver.minor(angularPackageVersion)}.x`;
// For example, if you end up with @angular/bazel@6.1.8 and if (!semver.satisfies(npmPackageVersion, range)) {
// @angular/bazel@6.1.9 both installed one of the postinstalls is throw new Error(
// guaranteed to fail since there's only one version of `Expected angular npm version ${npmPackageVersion} to satisfy ${range}. ` +
// angular `Please update ANGULAR_VERSION in WORKSPACE file to match ${npmPackageVersion}`);
throw new Error(`Expected angular repository to be version ${
npmPackageVersion} but found ${angularPackageVersion}`);
} }
} else { } else {
// No version check // No version check

View File

@ -7,8 +7,6 @@
""" """
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load(":rules_nodejs_package.bzl", "rules_nodejs_dependencies")
load(":rules_typescript_package.bzl", "rules_typescript_dependencies")
def rules_angular_dependencies(): def rules_angular_dependencies():
""" """
@ -20,37 +18,34 @@ def rules_angular_dependencies():
# #
# Download Bazel toolchain dependencies as needed by build actions # Download Bazel toolchain dependencies as needed by build actions
# # Use a SHA to get fix for needing symlink_prefix during npm publishing
# TODO(gmagolan): updated to next tagged rules_typescript release # TODO(alexeagle): updated to next tagged rules_typescript release
_maybe( _maybe(
http_archive, http_archive,
name = "build_bazel_rules_nodejs", name = "build_bazel_rules_nodejs",
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.16.2.zip", url = "https://github.com/bazelbuild/rules_nodejs/archive/ee218e2a98b9f09ba07cecac8496a5918c47bc5d.zip",
strip_prefix = "rules_nodejs-0.16.2", strip_prefix = "rules_nodejs-ee218e2a98b9f09ba07cecac8496a5918c47bc5d",
) )
_maybe( _maybe(
http_archive, http_archive,
name = "build_bazel_rules_typescript", name = "build_bazel_rules_typescript",
url = "https://github.com/bazelbuild/rules_typescript/archive/0.21.0.zip", url = "https://github.com/bazelbuild/rules_typescript/archive/0.22.0.zip",
strip_prefix = "rules_typescript-0.21.0", strip_prefix = "rules_typescript-0.22.0",
) )
# Needed for Remote Execution # Needed for Remote Execution
_maybe( _maybe(
http_archive, http_archive,
name = "bazel_toolchains", name = "bazel_toolchains",
sha256 = "c3b08805602cd1d2b67ebe96407c1e8c6ed3d4ce55236ae2efe2f1948f38168d", sha256 = "07a81ee03f5feae354c9f98c884e8e886914856fb2b6a63cba4619ef10aaaf0b",
strip_prefix = "bazel-toolchains-5124557861ebf4c0b67f98180bff1f8551e0b421", strip_prefix = "bazel-toolchains-31b5dc8c4e9c7fd3f5f4d04c6714f2ce87b126c1",
urls = [ urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/5124557861ebf4c0b67f98180bff1f8551e0b421.tar.gz", "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/31b5dc8c4e9c7fd3f5f4d04c6714f2ce87b126c1.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/archive/5124557861ebf4c0b67f98180bff1f8551e0b421.tar.gz", "https://github.com/bazelbuild/bazel-toolchains/archive/31b5dc8c4e9c7fd3f5f4d04c6714f2ce87b126c1.tar.gz",
], ],
) )
rules_typescript_dependencies()
rules_nodejs_dependencies()
def rules_angular_dev_dependencies(): def rules_angular_dev_dependencies():
""" """
Fetch dependencies needed for local development, but not needed by users. Fetch dependencies needed for local development, but not needed by users.
@ -79,37 +74,20 @@ def rules_angular_dev_dependencies():
url = "https://github.com/google/brotli/archive/v1.0.5.zip", url = "https://github.com/google/brotli/archive/v1.0.5.zip",
) )
# Fetching the Bazel source code allows us to compile the Skylark linter
http_archive(
name = "io_bazel",
sha256 = "978f7e0440dd82182563877e2e0b7c013b26b3368888b57837e9a0ae206fd396",
strip_prefix = "bazel-0.18.0",
url = "https://github.com/bazelbuild/bazel/archive/0.18.0.zip",
)
http_archive(
name = "com_github_bazelbuild_buildtools",
sha256 = "a82d4b353942b10c1535528b02bff261d020827c9c57e112569eddcb1c93d7f6",
strip_prefix = "buildtools-0.17.2",
url = "https://github.com/bazelbuild/buildtools/archive/0.17.2.zip",
)
############################################# #############################################
# Dependencies for generating documentation # # Dependencies for generating documentation #
############################################# #############################################
http_archive( http_archive(
name = "io_bazel_rules_sass", name = "io_bazel_rules_sass",
sha256 = "dbe9fb97d5a7833b2a733eebc78c9c1e3880f676ac8af16e58ccf2139cbcad03", strip_prefix = "rules_sass-1.15.1",
strip_prefix = "rules_sass-1.11.0", url = "https://github.com/bazelbuild/rules_sass/archive/1.15.1.zip",
url = "https://github.com/bazelbuild/rules_sass/archive/1.11.0.zip",
) )
http_archive( http_archive(
name = "io_bazel_skydoc", name = "io_bazel_skydoc",
sha256 = "7bfb5545f59792a2745f2523b9eef363f9c3e7274791c030885e7069f8116016", strip_prefix = "skydoc-a9550cb3ca3939cbabe3b589c57b6f531937fa99",
strip_prefix = "skydoc-fe2e9f888d28e567fef62ec9d4a93c425526d701",
# TODO: switch to upstream when https://github.com/bazelbuild/skydoc/pull/103 is merged # TODO: switch to upstream when https://github.com/bazelbuild/skydoc/pull/103 is merged
url = "https://github.com/alexeagle/skydoc/archive/fe2e9f888d28e567fef62ec9d4a93c425526d701.zip", url = "https://github.com/alexeagle/skydoc/archive/a9550cb3ca3939cbabe3b589c57b6f531937fa99.zip",
) )
def _maybe(repo_rule, name, **kwargs): def _maybe(repo_rule, name, **kwargs):

View File

@ -18,8 +18,9 @@
"@bazel/typescript": "^0.21.0", "@bazel/typescript": "^0.21.0",
"@schematics/angular": "^7.0.4", "@schematics/angular": "^7.0.4",
"@types/node": "6.0.84", "@types/node": "6.0.84",
"semver": "^5.6.0",
"shelljs": "0.8.2", "shelljs": "0.8.2",
"tsickle": "0.32.1" "tsickle": "0.34.0"
}, },
"peerDependencies": { "peerDependencies": {
"@angular/compiler-cli": "0.0.0-PLACEHOLDER", "@angular/compiler-cli": "0.0.0-PLACEHOLDER",

View File

@ -1,56 +0,0 @@
# Copyright 2018 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Dependency-related rules defining our version and dependency versions.
Fulfills similar role as the package.json file.
"""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# This file mirrored from https://raw.githubusercontent.com/bazelbuild/rules_nodejs/0.15.3/package.bzl
VERSION = "0.15.3"
def rules_nodejs_dependencies():
"""
Fetch our transitive dependencies.
If the user wants to get a different version of these, they can just fetch it
from their WORKSPACE before calling this function, or not call this function at all.
"""
_maybe(
http_archive,
name = "bazel_skylib",
url = "https://github.com/bazelbuild/bazel-skylib/archive/0.3.1.zip",
strip_prefix = "bazel-skylib-0.3.1",
sha256 = "95518adafc9a2b656667bbf517a952e54ce7f350779d0dd95133db4eb5c27fb1",
)
# Needed for Remote Build Execution
# See https://releases.bazel.build/bazel-toolchains.html
# Not strictly a dependency for all users, but it is convenient for them to have this repository
# defined to reduce the effort required to on-board to remote execution.
http_archive(
name = "bazel_toolchains",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/cdea5b8675914d0a354d89f108de5d28e54e0edc.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/archive/cdea5b8675914d0a354d89f108de5d28e54e0edc.tar.gz",
],
strip_prefix = "bazel-toolchains-cdea5b8675914d0a354d89f108de5d28e54e0edc",
sha256 = "cefb6ccf86ca592baaa029bcef04148593c0efe8f734542f10293ea58f170715",
)
def _maybe(repo_rule, name, **kwargs):
if name not in native.existing_rules():
repo_rule(name = name, **kwargs)

Some files were not shown because too many files have changed in this diff Show More