Commit Graph

16713 Commits

Author SHA1 Message Date
51a9f6c540 build: should use $(execpath) in npm_package_bin args (#34736)
This is recommended in the Bazel docs as $(location) is ambiguous and can mean either $(execpath) or $(rootpath) depending on the context.

PR Close #34736
2020-01-15 14:58:09 -05:00
8560f016cd build: add a before-all-other bootstrap script that patches require (#34736)
This removes the churn in the existing bootstrap scripts.

PR Close #34736
2020-01-15 14:58:09 -05:00
449a9fccc2 build: renamed "injected_scripts" target to "asset_injected_index_html" (#34736)
PR Close #34736
2020-01-15 14:58:09 -05:00
cdf5bd76e7 test: keep diff in integration/bazel minimal by not introducing additional_root_paths (#34736)
PR Close #34736
2020-01-15 14:58:09 -05:00
7fb43d0d02 test: handle bootstrap templated_args in jasmine_node_test defaults.bzl (#34736)
PR Close #34736
2020-01-15 14:58:09 -05:00
fa30e31cd5 build: update to rules nodejs 1.0.1 (#34736)
This brings in a few minor fixes including a better way to patch require for bootstrap scripts

Also remove install_source_map_support attribute from nodejs_binary targets This attribute will be removed from nodejs_binary in the future

PR Close #34736
2020-01-15 14:58:09 -05:00
1cf28929f1 build: update to @angular/cli 9.0.0-rc.4 (#34736)
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 #34736
2020-01-15 14:58:09 -05:00
d1bac3bbbe build: update integration/bazel & @angular/bazel schematics to rules_nodejs 1.0.0 (#34736)
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 #34736
2020-01-15 14:58:08 -05:00
f7415731cf build: package-build & release scripts should handle new pkg_npm naming (#34736)
bazel query now using: kind("ng_package|pkg_npm", //packages/...)

PR Close #34736
2020-01-15 14:58:08 -05:00
bf695d7526 refactor: handle breaking changes in rules_nodejs 1.0.0 (#34736)
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 #34736
2020-01-15 14:58:08 -05:00
7f7d3584b3 build: upgrade to io_bazel_rules_sass 1.24.0 (#34736)
PR Close #34736
2020-01-15 14:58:08 -05:00
c8ba576021 build: upgrade to rules_nodejs 1.0.0 (first stable release) (#34736)
Brings in the fix for stamping which was preventing many targets from getting cached.

PR Close #34736
2020-01-15 14:58:08 -05:00
fb7a6ce586 test(ngcc): update dependency host test description (#34695)
The `describe` description did not match the name of the
method.

PR Close #34695
2020-01-15 10:24:50 -08:00
32d4d97111 fix(ngcc): do not add DTS deep imports to missing packages list (#34695)
When searching the typings program for a package for imports a
distinction is drawn between missing entry-points and deep imports.

Previously in the `DtsDependencyHost` these deep imports may be
marked as missing if there was no typings file at the deep import path.
Instead there may be a javascript file instead. In practice this means
the import is "deep" and not "missing".

Now the `DtsDependencyHost` will also consider `.js` files when checking
for deep-imports, and it will also look inside `@types/...` for a suitable
deep-imported typings file.

Fixes #34720

PR Close #34695
2020-01-15 10:24:50 -08:00
1268f77937 test(ngcc): remove declare from JS classes (#34695)
PR Close #34695
2020-01-15 10:24:50 -08:00
b6bc3887f0 release: cut the v9.0.0-rc.9 release 9.0.0-rc.9 2020-01-15 09:21:24 -08:00
76a84bfffc test: update typings test to use ts 3.7.4 instead of 3.7.3 (#33717)
Just to be consistent.

PR Close #33717
2020-01-14 16:42:24 -08:00
ad3d964955 ci: update material-unit-tests commit (#33717)
Updates the SHA that will be tested against in the `material-unit-tests` job to the latest commit in the components repository. SHA 71955d2e194bfc5561f25daea16e68af266d6ff9 is needed in order to compile repository with typescript 3.7

PR Close #33717
2020-01-14 16:42:24 -08:00
7e98c5fc07 ci: overwrite angular/components yarn typescript resolution (#33717)
The components repository has a Yarn resolution to ensure that
dgeni-packages uses a specific TypeScript version. This resolution
causes the specified TS version to be considered as candidate for the
`@angular/bazel` peer dependency. Ultimately, Yarn decides to use
the TypeScript version from the resolution for `@angular/bazel`,
and builds will fail due to a version mismatch.

This is because `tsickle` will use the hoisted top-level TS
version (set to `3.7.4` ), while `@angular/bazel` uses the
version from the resolution (at the time of writing: v3.6.4)

PR Close #33717
2020-01-14 16:42:24 -08:00
d05c5b1461 ci: update material-unit-tests commit (#33717)
Updates the commit SHA the `material-unit-tests` CircleCI
job runs against. We need to include a commit that makes
the node module installation more determinisitc (i.e. ensuring
that `tsickle` is always hoisted at the node module root).

31a50f7ad2

PR Close #33717
2020-01-14 16:42:24 -08:00
c8a9ef2fe5 test: also install tsickle 0.38 on material (#33717)
PR Close #33717
2020-01-14 16:42:24 -08:00
26b8a639a2 test: save material ts override as a devdep (#33717)
PR Close #33717
2020-01-14 16:42:23 -08:00
331a59f48a test: fix path to dist zone.js (#33717)
PR Close #33717
2020-01-14 16:42:23 -08:00
72e075d570 test: use ts 3.7 on material unit tests (#33717)
PR Close #33717
2020-01-14 16:42:23 -08:00
99f7ac99f5 build(docs-infra): use typescript 3.7 (#33717)
PR Close #33717
2020-01-14 16:42:23 -08:00
80521e4739 test(docs-infra): compile only app for examples with no e2e (#33717)
With TS 3.7, these examples were running into the error below (e.g. on https://circleci.com/gh/angular/angular/574906#tests/containers/0):

```
============== AIO example output for: /home/circleci/ng/aio/content/examples/observables/
running: yarn tsc --project ./
$ /home/circleci/ng/aio/content/examples/observables/node_modules/.bin/tsc --project ./
../../../tools/examples/shared/node_modules/protractor/built/index.d.ts(5,10): error TS2440: Import declaration conflicts with local declaration of 'PluginConfig'.
../../../tools/examples/shared/node_modules/protractor/built/index.d.ts(5,24): error TS2440: Import declaration conflicts with local declaration of 'ProtractorPlugin'.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
completed: yarn tsc --project ./
```

This happened because of https://github.com/angular/protractor/issues/5348.

It's unclear why this typings problem does not affect `ng e2e` runs, and only affects `tsc` runs.

For now it seems sensible to alter the tests to compile only the app and not the e2e, since the intent of 2cc954d5a5 was never to verify the correctness of the e2e in the first place.

We still need a release of protractor that supports TS 3.7 though, but at least it doesn't seem to block our update proper.

PR Close #33717
2020-01-14 16:42:23 -08:00
40fdb01108 build: update tsickle to 0.38.0 (#33717)
This is the tsickle version that supports TypeScript 3.7.

PR Close #33717
2020-01-14 16:42:23 -08:00
f1eecd75ba test: add yarn.lock to typings_test_ts37 (#33717)
PR Close #33717
2020-01-14 16:42:23 -08:00
373157970a build: typescript 3.7 support (#33717)
This PR updates TypeScript version to 3.7 while retaining compatibility with TS3.6.

PR Close #33717
2020-01-14 16:42:23 -08:00
fa39a8c026 feat(language-service): provide completion for $event variable (#34566)
This commit adds a completion for the `$event` variable in bound event
expressions.

This is the first in a series of PRs to support completions for
properties on `$event` variables (https://github.com/angular/vscode-ng-language-service/issues/531).

PR Close #34566
2020-01-14 15:54:03 -08:00
c4d035e886 refactor(compiler): refactor and export Bazel host creation. (#34686)
Refactored Bazel host creation to export some of the relevant utility functions. google3 needs to make some modifications to the Bazel host to enable the Ivy migration. The functionality exported here is still needed in g3, but it allows g3 code to create the Bazel host, make necessary modifications, and then provide it to the external codebase here while everything is still compatible. For external users, this is a no-op.

PR Close #34686
2020-01-14 15:26:52 -08:00
a7ca658d68 fix(ivy): handle overloaded constructors in ngtsc (#34590)
Currently ngtsc looks for the first `ConstructorDeclaration` when figuring out what the parameters are so that it can generate the DI instructions. The problem is that if a constructor has overloads, it'll have several `ConstructorDeclaration` members with a different number of parameters. These changes tweak the logic so it looks for the constructor implementation.

PR Close #34590
2020-01-14 15:17:09 -08:00
3113bb7ad2 fix(forms): accept number length in length validators (#32057)
Both `MinLengthValidator` and `MaxLengthValidator` accepted only string inputs for the length required, which throws with Ivy and `fullTemplateTypeCheck` enabled:

    <!-- min = 2 in the component -->
    <input [minlength]="min">

with:

    Type 'number' is not assignable to type 'string | undefined'

This relaxes the accepted type to `string | number` to avoid breakage when developers switch to Ivy and fTTC.

PR Close #32057
2020-01-14 14:55:33 -08:00
e100bbc696 docs: replace non-breaking with regular spaces in resources.json (#34772)
By using non-breaking spaces, the description of Amexio UI components
was overflowing its container in the "Resources" page.

PR Close #34772
2020-01-14 13:33:26 -08:00
995bafd007 refactor(language-service): Construct proper template AST from HTML ast (#34764)
The Template AST that corresponds to a given HTML AST is not always
complete, and often has to be reconstructed. This commit refactors the
code to make it easier to adapt to multiple cases.

PR Close #34764
2020-01-14 13:32:58 -08:00
c9c0113a46 docs: expand doc for app_initializer token (#34760)
PR Close #34760
2020-01-14 13:32:33 -08:00
b1d213bece docs: remove old contributors (#34486)
PR Close #34486
2020-01-14 10:28:25 -08:00
84fc2b09d8 docs: update Alex Eagle and Wassim Chegham collaborator status (#34486)
PR Close #34486
2020-01-14 10:28:24 -08:00
4bffaf63da docs: add Manu Murthy to Angular team (#34486)
PR Close #34486
2020-01-14 10:28:24 -08:00
d16d1d8d3b docs: add Andrew Scott to Angular team (#34486)
PR Close #34486
2020-01-14 10:28:24 -08:00
7e10366977 docs: add Jules Kremer to Angular team (#34486)
PR Close #34486
2020-01-14 10:28:24 -08:00
a15f20b208 perf(ivy): add static style to the list of scenarios (#34775)
PR Close #34775
2020-01-14 10:27:27 -08:00
1ec9515f4f perf(ivy): add create scenario to the styling benchmark (#34775)
PR Close #34775
2020-01-14 10:27:27 -08:00
4928f1a492 perf(ivy): add noop change detection scenario to the styling benchmark (#34775)
PR Close #34775
2020-01-14 10:27:27 -08:00
6212bab745 refactor: rename styling benchmark scenario (#34775)
PR Close #34775
2020-01-14 10:27:27 -08:00
a8c789d98d docs: add deprecation info about default currency code (#34771)
In v10 the default currency code will be taken from the
current locale, rather than simply defaulting to `USD`.

PR Close #34771
2020-01-14 10:24:56 -08:00
a7cd7d4df6 test: update tests for new locale data (#34771)
PR Close #34771
2020-01-14 10:24:56 -08:00
5b3e0d6d49 refactor: update locales with extracted currency codes (#34771)
The locale data extraction has been modified to include the default
currency code in the generated locale data. This commit updates these
generated files accordingly.

PR Close #34771
2020-01-14 10:24:56 -08:00
c18a3fe455 feat: i18n - include currency code in locale data (#34771)
PR Close #34771
2020-01-14 10:24:55 -08:00
965f5575c7 feat(common): allow default currency code to be configurable (#34771)
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 #34771
2020-01-14 10:24:55 -08:00