Commit Graph

12238 Commits

Author SHA1 Message Date
Alex Rickabaugh aa48810d80 feat(ivy): generate flat module index files (#27497)
Previously, ngtsc did not respect the angularCompilerOptions settings
for generating flat module indices. This commit adds a
FlatIndexGenerator which is used to implement those options.

FW-738 #resolve

PR Close #27497
2018-12-07 09:22:29 -08:00
Alex Rickabaugh 352c582f98 refactor(ivy): allow for shim generators not based on existing files (#27497)
Previously the ngtsc ShimGenerator interface expected that all shims would
be generated using the contents of existing ts.SourceFiles. This assumption
was true for ngfactory and ngsummary files, but breaks down for flat module
index files, which are standalone.

This commit prepares for flat module index generation by enabling shim
generators which don't require an existing file.

PR Close #27497
2018-12-07 09:22:29 -08:00
Igor Minar 6bd28e6063 docs: release notes for the v7.1.2 release 2018-12-06 21:47:29 -08:00
Igor Minar 7a6eb9de46 release: cut the v7.2.0-beta.1 release 2018-12-06 14:46:26 -08:00
Marc Laval f013c57186 test(router): correct a wrong test (FW-766) (#27511)
PR Close #27511
2018-12-06 13:41:20 -08:00
Pawel Kozlowski 913563a41d test(ivy): finish root cause analysis for @angular/core TestBed failing tests (#27510)
PR Close #27510
2018-12-06 13:41:02 -08:00
Marc Laval 8fa7e93c30 test(ivy): enable router tests with pending timers (FW-768) (#27509)
PR Close #27509
2018-12-06 13:40:42 -08:00
Andrew Kushnir cad67148b1 fix(ivy): "select" attribute on <ng-content> should not be case-sensitive (FW-789) (#27500)
While generating attributes for `projection` instruction, we checked whether attribute name is equal to 'select' in lower case. However in other cases we treat 'select' attribute name as case-insensitive. This PR makes 'select' attribute consistently case-insensitive.

PR Close #27500
2018-12-06 13:40:15 -08:00
Andrew Kushnir c71d7b5633 fix(ivy): setting up animation properties correctly (FW-643) (#27496)
Prior to this change, animation properties were defined as element attributes, which caused errors at runtime. Now all animation-related attributes are defined as element properties.

Also as a part of this update, we start to account for bindings used in animations, which was previously missing.

PR Close #27496
2018-12-06 13:38:40 -08:00
Keen Yee Liau 4da739a970 fix(bazel): Respect existing angular installation (#27495)
If user has already installed Angular, Bazel should fetch the same
version. Otherwise, user will see an error in the post-install step
that performs version check.

PR Close #27495
2018-12-06 13:36:19 -08:00
Sander Elias 21d13dd15a fix(ivy): Added missing getHostElement to export (#27488)
PR Close #27488
2018-12-06 13:35:41 -08:00
Marc Laval 8e9858fadb fix(ivy): align NgModuleRef implementation between Ivy and ViewEngine (#27482)
Solves FW-765 and FW-767

PR Close #27482
2018-12-06 13:35:08 -08:00
JoostK 159ab1c257 fix(ivy): ngtsc should include generic types on injectable definitions (#27037)
Analogously to directives, the `ngInjectableDef` field in .d.ts files is
annotated with the type of service that it represents. If the service
contains required generic type arguments, these must be included in
the .d.ts file.

PR Close #27037
2018-12-06 13:33:13 -08:00
Minko Gechev 7f221d8d2a 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
Filipe Silva d63d53f5ad ci: test ts-api-guardian on windows (#27205)
PR Close #27205
2018-12-06 09:38:59 -08:00
Igor Minar 7c52d10e5c Revert "ci: test ts-api-guardian on windows (#27205)"
This reverts commit 24ebdbd04b.

Buildkite is running out of space and causing PRs to go red: #27508
2018-12-06 09:35:49 -08:00
Kara Erickson 160cace336 test(ivy): fix query compliance spec (#27501)
PR Close #27501
2018-12-06 09:26:57 -08:00
Paul Gschwendtner ca1c430f30 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:52 -08:00
Igor Minar 091a504377 Revert "fix(router): change processing url tree children condition (#26243)" (#27516)
This reverts commit ccc77ca441.

Breaks Pantheon see cl/224256517.

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

Breaks Pantheon see cl/224256517.

PR Close #27516
2018-12-06 09:17:20 -08:00
Igor Minar 6740d0de74 build: remove obsolete gulp build task (#27386)
PR Close #27386
2018-12-05 20:55:32 -08:00
Igor Minar 8a63f6e245 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:32 -08:00
Igor Minar 917a7884be test(benchpress): make most of the tests run under bazel (#27386)
PR Close #27386
2018-12-05 20:55:32 -08:00
Igor Minar 2ccf5c4ffe 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:32 -08:00
Igor Minar dacf58eb99 docs: remove obsolete packages/examples/web_workers/ts/.gitkeep (#27386)
PR Close #27386
2018-12-05 20:55:32 -08:00
Igor Minar 21f6daf0bb 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:32 -08:00
Igor Minar 95f8b63265 test(service-worker): run the remaining service-worker tests under bazel (#27386)
PR Close #27386
2018-12-05 20:55:31 -08:00
Igor Minar 4f81a7c590 test(common): run @angular/common/http/testing tests under bazel (#27386)
PR Close #27386
2018-12-05 20:55:31 -08:00
Igor Minar 55e24d2602 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:31 -08:00
Andrew Kushnir a315dedb85 fix(ivy): fix fixmeIvy invocations in "platform-browser" tests (#27498)
Some "platform-browser" tests were updated before `fixmeIvy` function contract was changed to `fixmeIvy(...).it(...)`, thus triggering failed tests to run on CI. This commit updates these cases to invoke `fixmeIvy` correctly.

PR Close #27498
2018-12-05 16:33:27 -08:00
Alex Rickabaugh f514ac3da2 test(ivy): enable //packages/router/test/aot_ngsummary_test in Ivy mode (#27483)
This commit enables the above test to run under --define=compile=aot.
To accomplish this, one import is rewritten from a strange form to the
correct absolute form.

FW-658 #resolve

PR Close #27483
2018-12-05 16:26:39 -08:00
Alex Rickabaugh 0ae8c08b3c build(ivy): expect factories and summaries in Ivy mode (#27483)
Previously, Bazel/Blaze were only expecting .ngfactory.js and .ngsummary.js
files to be generated in legacy mode. ngtsc was attempting to write those
files, but they ended up being ignored at the Bazel level.

This commit causes Bazel to expect these files, and rearranges the logic
a little bit as the name 'include_ng_files' is now incorrect.

FW-514 FW-737 #resolve

PR Close #27483
2018-12-05 16:26:39 -08:00
Alex Rickabaugh 276bdd1f3e fix(ivy): move the generation of ɵNonEmptyModule to shim construction (#27483)
ngfactory files have a ɵNonEmptyModule constant included if there are no
other exported factory symbols. Previously this extra export was added
dynamically in a TS transformer.

However, synthetically constructed exports don't get properly downleveled
during JS emit, and this generated constant caused issues with downstream
tests.

Instead, this commit configures the shim to always have this export to
begin with, and to filter it out if it's not required.

Testing strategy: covered by existing ngtsc_spec tests which verify the
presence of the ɵNonEmptyModule symbol.

PR Close #27483
2018-12-05 16:26:39 -08:00
Alex Rickabaugh d553ec2f36 fix(ivy): generate correct moduleNames for factories and summaries (#27483)
In ngtsc, files loaded into the ts.Program have a "module name", set via
ts.SourceFile.moduleName, which ends up being written into an AMD module
name triple-slash directive in the generated .js file.

For generated shim files (ngfactories, ngsummaries) that are constructed
synthetically, there was previously no moduleName set, which caused some
issues with downstream tests.

This commit adds logic to compute and set moduleNames for both generated
ngfactory and ngsummary shims.

PR Close #27483
2018-12-05 16:26:39 -08:00
Kara Erickson cdf5cacdc0 build: add kara to more approval lists (#27493)
PR Close #27493
2018-12-05 14:41:50 -08:00
Alex Rickabaugh dfdaaf6a0d fix(ivy): deduplicate directives in component scopes (#27462)
A previous fix to ngtsc opened the door for duplicate directives in
the 'directives' array of a component. This would happen if the directive
was declared in a module which was imported more than once within the
component's module.

This commit adds deduplication when the component's scope is materialized,
so declarations which arrive via more than one module import are coalesced.

PR Close #27462
2018-12-05 14:36:24 -08:00
Olivier Combe b82f62a11d test(ivy): enable ivy tests for platform-browser/animations (#27478)
PR Close #27478
2018-12-05 14:35:23 -08:00
George Kalpakas 8973dd5a7e build(docs-infra): upgrade cli command docs sources to 1c01b91c6 (#27451)
Relevant changes in [commit range](a176d127a...1c01b91c6):

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

Closes #27285
Closes #27318
Closes #27407

PR Close #27451
2018-12-05 13:27:32 -08:00
George Kalpakas 4b5cd721c1 refactor(docs-infra): remove unused custom element (#27250)
PR Close #27250
2018-12-05 13:26:27 -08:00
George Kalpakas 6abbaaed89 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:27 -08:00
George Kalpakas dfdc2adbc6 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:27 -08:00
George Kalpakas fa0c65efe5 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:27 -08:00
George Kalpakas 271fcb0f3e 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:27 -08:00
George Kalpakas af952cad62 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:27 -08:00
George Kalpakas 27b196f585 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:27 -08:00
George Kalpakas 2adf03e54a 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:26 -08:00
George Kalpakas dca1535cb5 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:26 -08:00
George Kalpakas b2f73ddb64 fix(docs-infra): do not create an anchor for the `file-not-found` header (#27250)
PR Close #27250
2018-12-05 13:26:26 -08:00
George Kalpakas 33977a2ad5 refactor(docs-infra): move minified `lunr` script to the `generated` directory (#27250)
PR Close #27250
2018-12-05 13:26:26 -08:00
George Kalpakas 445f7896c1 build: error when files specified in payload size limits are missing (#27250)
PR Close #27250
2018-12-05 13:26:26 -08:00