16642 Commits

Author SHA1 Message Date
Ayaz Hafiz
a44479d0a0 style(common): remove unnecessary private annotation (#34734)
The `@private` annotation on a function upsets tsc, and appears
unnecessary for non-exported functions.

PR Close #34734
2020-01-13 07:17:42 -08:00
Keen Yee Liau
bfe9bc912a fix(language-service): CRLF offset in inline template (#34737)
This commit fixes incorrect CRLF offsets in inline template.

PR closes https://github.com/angular/vscode-ng-language-service/issues/520

PR Close #34737
2020-01-13 07:16:50 -08:00
crisbeto
6d534f10e6 fix(ivy): don't run decorator handlers against declaration files (#34557)
Currently the decorator handlers are run against all `SourceFile`s in the compilation, but we shouldn't be doing it against declaration files. This initially came up as a CI issue in #33264 where it was worked around only for the `DirectiveDecoratorHandler`. These changes move the logic into the `TraitCompiler` and `DecorationAnalyzer` so that it applies to all of the handlers.

PR Close #34557
2020-01-10 15:54:51 -08:00
Keen Yee Liau
6d28a209e4 test(language-service): Remove test cases from parsing-cases.ts (#34716)
This commit removes some test scenarios from `parsing-cases.ts` and
colocate them with the test code instead. This makes the tests easier to
read and understand.

PR Close #34716
2020-01-10 14:44:24 -08:00
ajitsinghkaler
f6dee72a88 docs: add note that when ngOnInit not used (#34619)
In some examples ngOnInit was missing added note to tell when it is missing.

Fixes #34562

PR Close #34619
2020-01-10 14:40:52 -08:00
atscott
e88d652f2a Revert "build: upgrade to rules_nodejs 1.0.0 (first stable release) (#34589)" (#34730)
This reverts commit cb6ffa1211bafe35debf6f74f0caee0e2efc420a.

PR Close #34730
2020-01-10 14:12:15 -08:00
atscott
aa0244765a Revert "build: upgrade to io_bazel_rules_sass 1.24.0 (#34589)" (#34730)
This reverts commit 96643e7ce2904af2185c5ad596969d10b15d30aa.

PR Close #34730
2020-01-10 14:12:15 -08:00
atscott
538d0446b5 Revert "refactor: handle breaking changes in rules_nodejs 1.0.0 (#34589)" (#34730)
This reverts commit 9bb349e1c8089ee29b82c7234a11ad4256f1d06f.

PR Close #34730
2020-01-10 14:12:15 -08:00
atscott
7e9ac7650b Revert "build: package-build & release scripts should handle new pkg_npm naming (#34589)" (#34730)
This reverts commit 053b23d902afc356d50f813bd1e3ab6b606554a6.

PR Close #34730
2020-01-10 14:12:15 -08:00
atscott
7eddbe5d7f Revert "build: update integration/bazel & @angular/bazel schematics to rules_nodejs 1.0.0 (#34589)" (#34730)
This reverts commit 7203169c3d04b420d96ac4531137cd430d05e6cb.

PR Close #34730
2020-01-10 14:12:15 -08:00
atscott
ae007513f5 Revert "build: update to @angular/cli 9.0.0-rc.4 (#34589)" (#34730)
This reverts commit 1ba6fd3f420e6d004b3f154d51e32013fe475101.

PR Close #34730
2020-01-10 14:12:15 -08:00
atscott
6e5774b9a0 Revert "build: update to rules nodejs 1.0.1 (#34589)" (#34730)
This reverts commit 8042433cb09098c658fdec39c49edaeac2ac2c1d.

PR Close #34730
2020-01-10 14:12:15 -08:00
atscott
56ef500716 Revert "test: update to latest angular/components commit to pick up rules_nodejs 1.0 update (#34589)" (#34730)
This reverts commit d0400a118841f9d3b786911d576bd2dcbae2b8bd.

PR Close #34730
2020-01-10 14:12:15 -08:00
atscott
e2fe62d4cf Revert "test: bump material cache_key version (#34589)" (#34730)
This reverts commit 0e52d9297fc86f970321e7ecb9a800f16729c0df.

PR Close #34730
2020-01-10 14:12:15 -08:00
atscott
5e60215470 Revert "test: handle bootstrap templated_args in jasmine_node_test defaults.bzl (#34589)" (#34730)
This reverts commit da4782e67f662d37dccb89f9c642897c1266f4ce.

PR Close #34730
2020-01-10 14:12:15 -08:00
atscott
01d1da67ee Revert "test: keep diff in integration/bazel minimal by not introducing additional_root_paths (#34589)" (#34730)
This reverts commit 3fda893f00d415926866ee1d6786974ef637dc8d.

PR Close #34730
2020-01-10 14:12:14 -08:00
atscott
eabe961197 Revert "build: renamed "injected_scripts" target to "asset_injected_index_html" (#34589)" (#34730)
This reverts commit 4754e495dc19aa2f63ef276848d41b9a30d933bb.

PR Close #34730
2020-01-10 14:12:14 -08:00
atscott
b788c36909 Revert "build: add a before-all-other bootstrap script that patches require (#34589)" (#34730)
This reverts commit c3e843995434ace3e0a96faa950cd13f3ee90fbb.

PR Close #34730
2020-01-10 14:12:14 -08:00
atscott
66fbc2a1b8 Revert "build: should use $(execpath) in npm_package_bin args (#34589)" (#34730)
This reverts commit 67044ef55d98693e1cb9ec66cb986fc4a60c5467.

PR Close #34730
2020-01-10 14:12:14 -08:00
atscott
24679d8676 Revert "build: derive ts_library dep from jasmine_node_test boostrap label if it ends in _es5 (#34589)" (#34730)
This reverts commit 79a0d007b4e892dd988a8ef697e6d3436ea8391c.

PR Close #34730
2020-01-10 14:12:14 -08:00
atscott
88c7dfefe6 Revert "build: add better comments to defaults.bzl jasmine_node_test macro (#34589)" (#34730)
This reverts commit 753b5bc3055590b89d66f6dff1f89ab1221dc773.

PR Close #34730
2020-01-10 14:12:14 -08:00
atscott
2f810b2c1f Revert "build: cleanup //tools/ts-api-guardian:tests target (#34589)" (#34730)
This reverts commit 7a63e4f7d5b3a59a1ae45340cdd72ffb8b22730c.

PR Close #34730
2020-01-10 14:12:14 -08:00
atscott
6d385e8cb6 Revert "test: add coverage to //tools/ts-api-guardian/... on WindowsCI (#34589)" (#34730)
This reverts commit 9e0583045c8173d4be31f5bd3c977e146583740a.

PR Close #34730
2020-01-10 14:12:14 -08:00
Judy Bogart
475ffd67f5 docs: move ngcc def from page to glossary (#34196)
PR Close #34196
2020-01-10 08:38:53 -08:00
Judy Bogart
efdf347f9c docs: apply standard header case convention (#34196)
PR Close #34196
2020-01-10 08:38:53 -08:00
Greg Magolan
9e0583045c test: add coverage to //tools/ts-api-guardian/... on WindowsCI (#34589)
PR Close #34589
2020-01-10 08:32:00 -08:00
Greg Magolan
7a63e4f7d5 build: cleanup //tools/ts-api-guardian:tests target (#34589)
PR Close #34589
2020-01-10 08:32:00 -08:00
Greg Magolan
753b5bc305 build: add better comments to defaults.bzl jasmine_node_test macro (#34589)
PR Close #34589
2020-01-10 08:32:00 -08:00
Greg Magolan
79a0d007b4 build: derive ts_library dep from jasmine_node_test boostrap label if it ends in _es5 (#34589)
PR Close #34589
2020-01-10 08:32:00 -08:00
Greg Magolan
67044ef55d build: should use $(execpath) in npm_package_bin args (#34589)
This is recommended in the Bazel docs as $(location) is ambiguous and can mean either $(execpath) or $(rootpath) depending on the context.

PR Close #34589
2020-01-10 08:32:00 -08:00
Greg Magolan
c3e8439954 build: add a before-all-other bootstrap script that patches require (#34589)
This removes the churn in the existing bootstrap scripts.

PR Close #34589
2020-01-10 08:32:00 -08:00
Greg Magolan
4754e495dc build: renamed "injected_scripts" target to "asset_injected_index_html" (#34589)
PR Close #34589
2020-01-10 08:32:00 -08:00
Greg Magolan
3fda893f00 test: keep diff in integration/bazel minimal by not introducing additional_root_paths (#34589)
PR Close #34589
2020-01-10 08:31:59 -08:00
Greg Magolan
da4782e67f test: handle bootstrap templated_args in jasmine_node_test defaults.bzl (#34589)
PR Close #34589
2020-01-10 08:31:59 -08:00
Greg Magolan
0e52d9297f test: bump material cache_key version (#34589)
Also add comment that cache_key version should be bumped when switching forks or branches and added a comment from @devversion explaining how the fallback cache key works.

PR Close #34589
2020-01-10 08:31:59 -08:00
Greg Magolan
d0400a1188 test: update to latest angular/components commit to pick up rules_nodejs 1.0 update (#34589)
This commit includes https://github.com/angular/components/pull/18064 which is a pre-req for updating the angular repo to rules_nodejs 1.0.

PR Close #34589
2020-01-10 08:31:59 -08:00
Greg Magolan
8042433cb0 build: update to rules nodejs 1.0.1 (#34589)
This brings in a few minor fixes including a better way to patch require for bootstrap scripts.

PR Close #34589
2020-01-10 08:31:59 -08:00
Greg Magolan
1ba6fd3f42 build: update to @angular/cli 9.0.0-rc.4 (#34589)
This brings in a required fix to allow for 0.0.0 dev version of @angular/core for integration testing. Without this the following error is now observed:

```
This version of CLI is only compatible with Angular versions ^9.0.0-beta || >=9.0.0 <10.0.0,
but Angular version 0.0.0 was found instead.
```

NB: rc.7 breaks the cli-hello-world-ivy-i18n integration test

PR Close #34589
2020-01-10 08:31:59 -08:00
Greg Magolan
7203169c3d build: update integration/bazel & @angular/bazel schematics to rules_nodejs 1.0.0 (#34589)
For the purposes of the integration test the zone.js script & bundle script tags can just go into the source index.html itself. The purpose of the integration test is is to test @angular/bazel & ng_module & ng_package so there is no need to exercise html_insert_assets in integration/bazel.

PR Close #34589
2020-01-10 08:31:59 -08:00
Greg Magolan
053b23d902 build: package-build & release scripts should handle new pkg_npm naming (#34589)
bazel query now using: kind("ng_package|pkg_npm", //packages/...)

PR Close #34589
2020-01-10 08:31:59 -08:00
Greg Magolan
9bb349e1c8 refactor: handle breaking changes in rules_nodejs 1.0.0 (#34589)
The major one that affects the angular repo is the removal of the bootstrap attribute in nodejs_binary, nodejs_test and jasmine_node_test in favor of using templated_args --node_options=--require=/path/to/script. The side-effect of this is that the bootstrap script does not get the require.resolve patches with explicitly loading the targets _loader.js file.

PR Close #34589
2020-01-10 08:31:59 -08:00
Greg Magolan
96643e7ce2 build: upgrade to io_bazel_rules_sass 1.24.0 (#34589)
PR Close #34589
2020-01-10 08:31:58 -08:00
Greg Magolan
cb6ffa1211 build: upgrade to rules_nodejs 1.0.0 (first stable release) (#34589)
Brings in the fix for stamping which was preventing many targets from getting cached.

PR Close #34589
2020-01-10 08:31:58 -08:00
ayazhafiz
4d95c3d39a refactor(language-service): rename expression completions method (#34518)
This commit renames `addAttributeValuesToCompletions`, which generates
expression completions and is not exclusive to processing attributes, to
`processExpressionCompletions`. Also removes the expression completion
logic in `visitBoundText` for a call to `processExpressionCompletions`.

The conditional branch in `visitBoundText` is also removed. This branch
was added in one of the first commits to the language service
(519a32445407136b9d6b969cd0be6aa42ca73055) and appears to be
unnecessary, as the expression AST is constructed from the template
position anyway.

PR Close #34518
2020-01-10 08:31:09 -08:00
George Kalpakas
c3271ac22a fix(ngcc): recognize re-exports with imported TS helpers in CommonJS and UMD (#34527)
Previously, the `CommonJsReflectionHost` and `UmdReflectionHost` would
only recognize re-exports of the form `__export(...)`. This is what
re-exports look like, when the TypeScript helpers are emitted inline
(i.e. when compiling with the default [TypeScript compiler options][1]
that include `noEmitHelpers: false` and `importHelpers: false`).

However, when compiling with `importHelpers: true` and [tslib][2] (which
is the recommended way for optimized bundles), the re-exports will look
like: `tslib_1.__exportStar(..., exports)`
These types of re-exports were previously not recognized by the
CommonJS/UMD `ReflectionHost`s and thus ignored.

This commit fixes this by ensuring both re-export formats are
recognized.

[1]: https://www.typescriptlang.org/docs/handbook/compiler-options.html
[2]: https://www.npmjs.com/package/tslib

PR Close #34527
2020-01-10 08:28:50 -08:00
crisbeto
b1eb84c57e refactor(ivy): remove calls into other instructions from pipe instructions (#33714)
A while ago we made a pass through all instructions to make sure that none of them call directly into other instructions, however it seems like missed the `pipeBind*` since they still call into the pure functions. The result is that we have some unnecessary duplicated accesses of global state like `getLView` which are called twice in a row with nothing changing.

These changes move the common functionality into a shared file and make the pipe instructions call into them with the global state instead.

PR Close #33714
2020-01-10 08:27:26 -08:00
ayazhafiz
794dcb58d3 fix(language-service): do not use an i18n parser for templates (#34531)
The compiler's `I18NHtmlParser` may expand template nodes that have
internationalization metadata attached to them; for instance,

```html
<div i18n="@@i18n-el">{{}}</div>
```

gets expanded to an AST with the i18n metadata extracted and text filled
in as necessary; to the language service, the template above, as read in
the AST, now looks something like

```html
<div>{{$implicit}}</div>
```

This is undesirable for the language service because we want to preserve
the original form of the source template source code, and have
information about the original values of the template. The language
service also does not need to use an i18n parser -- we don't generate
any template output.

To fix this turns out to be as easy as moving to using a raw
`HtmlParser`.

---

A note on the testing strategy: as mentioned above, we don't need to use
an i18n parser, but we don't **not** need to use one if the parser
does not heavily modify the template AST. For this reason, the tests
target the functionality of not modifying a template with i18n metadata
rather than testing that the language service does not use an i18n parser.

---

Closes https://github.com/angular/vscode-ng-language-service/issues/272

PR Close #34531
2020-01-10 08:23:08 -08:00
George Kalpakas
b3441eea4c ci(docs-infra): do not deploy Firebase Realtime Database rules (#34696)
Currently, the angular.io projects do not use Firebase's Realtime
Database and therefore we only need to configure and deploy changes for
`hosting`.

This commit removes the unused Realtime Database related configs and
files.

PR Close #34696
2020-01-10 08:22:38 -08:00
Igor Minar
25eaff447a refactor(core): remove duplicate InjectableType declaration (#34679)
This duplication causes a compilation error with TypeScript 3.7

PR Close #34679
2020-01-09 16:05:20 -08:00
Kara Erickson
9c5510b28e docs(ivy): document breaking change with <select> and binding order (#34709)
Closes #34470

PR Close #34709
2020-01-09 15:13:56 -08:00