Commit Graph

16653 Commits

Author SHA1 Message Date
Hayouung ca1bc7e80b feat(common): allow default currency code to be configurable (#32584)
Default currency code in CurrencyPipe is currently hardcoded to USD
and is not configurable. This commit allows the default currency code
to be configurable by adding a DEFAULT_CURRENCY_CODE injection token.

Example:
```
providers: [{ provide: DEFAULT_CURRENCY_CODE, useValue: "GBP" }]
...
{{ 123.45 | currency }} // outputs £123.45 as opposed to always $123.45 before
```

Closes: #25461

PR Close #32584
2020-01-13 09:57:06 -08:00
George Kalpakas cfbb1a1e77 fix(ngcc): correctly detect dependencies in CommonJS (#34528)
Previously, `CommonJsDependencyHost.collectDependencies()` would only
find dependencies via imports of the form `var foo = require('...');` or
`var foo = require('...'), bar = require('...');` However, CommonJS
files can have imports in many different forms. By failing to recognize
other forms of imports, the associated dependencies were missed, which
in turn resulted in entry-points being compiled out-of-order and failing
due to that.

While we cannot easily capture all different types of imports, this
commit enhances `CommonJsDependencyHost` to recognize the following
common forms of imports:

- Imports in property assignments. E.g.:
  `exports.foo = require('...');` or
  `module.exports = {foo: require('...')};`

- Imports for side-effects only. E.g.:
  `require('...');`

- Star re-exports (with both emitted and imported heleprs). E.g.:
  `__export(require('...'));` or
  `tslib_1.__exportStar(require('...'), exports);`

PR Close #34528
2020-01-13 09:48:20 -08:00
George Kalpakas eb6e1af46d test(ngcc): fix typos in `CommonJsDependencyHost` tests (to avoid confusion) (#34528)
PR Close #34528
2020-01-13 09:48:20 -08:00
Paul Gschwendtner 8de3c20e50 fix(ivy): do not reset view dirty state in check no changes mode (#34495)
Unlike in View Engine, we currently reset the dirty state of
components in the check no changes change detection cycle.

This means that components cannot be marked as dirty from
view lifecycle hooks because the dirty state is reset and
the lifecycle hooks do not run in the check no changes CD cycle.

PR Close #34495
2020-01-13 09:43:16 -08:00
ajitsinghkaler ebcd59ae4f docs: replace from class hero to interface with accordance with # 344022 (#34294)
Fixes #21186

PR Close #34294
2020-01-13 07:25:19 -08:00
Adam 55037d1107 build: bump year (#34651)
PR Close #34651
2020-01-13 07:21:43 -08:00
Paul Gschwendtner 5f1f42ba54 test: run styling benchmarks in benchpress (#34664)
Runs the styling benchmarks that have been added with 2e0b237646863562e336f370372b4b7f9e52d818
in benchpress. The goal is that these benchmarks can be wired up in
Latency Lab.

PR Close #34664
2020-01-13 07:20:58 -08:00
Pawel Kozlowski 3dee2244da perf(ivy): styling algorithm benchmark (#34664)
PR Close #34664
2020-01-13 07:20:58 -08:00
mikef afc88074cd docs: correct full stop position in providers section (#34712)
Correct the position of the full stop at the end of the limiting provider scope with components paragraph.

PR Close #34712
2020-01-13 07:20:24 -08:00
George Kalpakas 0b9c4245f9 refactor(docs-infra): simplify Firebase redirect config (#34726)
This simplifies the Firebase redirect config, removing a redundant
pattern (`/api/http`) which is covered by the previous pattern and
dropping an unused named captured segment (`:rest*`).

This change does not affect the redirection behavior for the deployed
apps, but allows the Firebase hosting emulator to work correctly.
(See [here][1] for more info.)

NOTE: Although we are not currently using the Firebase emulator for
      development/testing, we might want to use it in the future.

[1]: https://github.com/firebase/superstatic/issues/231#issuecomment-573034515

PR Close #34726
2020-01-13 07:19:29 -08:00
Igor Minar 4b534358bb build: update to @bazel/ibazel@0.11.1 (#34732)
motivation: keeping up to date and picking up new bugfixes for ibazel that could fix some weirdness
I see when using 0.10.3

PR Close #34732
2020-01-13 07:18:58 -08:00
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 cb6ffa1211.

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 96643e7ce2.

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 9bb349e1c8.

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 053b23d902.

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 7203169c3d.

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 1ba6fd3f42.

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 8042433cb0.

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 d0400a1188.

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 0e52d9297f.

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 da4782e67f.

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 3fda893f00.

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 4754e495dc.

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 c3e8439954.

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 67044ef55d.

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 79a0d007b4.

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 753b5bc305.

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 7a63e4f7d5.

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 9e0583045c.

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