Commit Graph

16892 Commits

Author SHA1 Message Date
Sonu Kapoor def4127bf1 fix(docs-infra): convert hard-coded `comparing-observables` examples into a proper mini-app (#34327)
Previously, the examples in the `comparing-observables` guide were hard-coded.
This made it impossible to test them and verify they are correct.

This commit fixes this by converting them into a proper mini-app. In a
subsequent commit, tests will be added to verify that the source code
works as expected (and guard against regressions).

Fixes #31024

PR Close #34327
2020-01-21 13:14:46 -05:00
Paul Gschwendtner 7342d4b6f0 ci: remove typescript 3.7 patches in material-unit-tests job (#34863)
Previously, we added patches to the `angular/components` repository in
the `material-unit-tests` job in order to be able to run their tests
with TypeScript 3.7. This is no longer needed since the components
repository updated to Ts 3.7 already. Hence we can remove the patches.

PR Close #34863
2020-01-21 13:13:51 -05:00
Paul Gschwendtner 20419d3d49 ci: update material-unit-tests job commit to latest (#34863)
Updates the `material-unit-tests` job commit to the latest
available commit. We need to update since the `angular/components`
repository updated to TypeScript 3.7, which means that we can remove
the TS 3.7 workarounds we applied to get the job green when framework
updated to TS 3.7.

PR Close #34863
2020-01-21 13:13:51 -05:00
crisbeto 697f6a55a5 fix(animations): not waiting for child animations to finish when removing parent in Ivy (#34702)
In #28162 we introduced an extra `removeNode` call for host elements which can cause the parent element to be removed before all child animations have finished. The issue is only in Ivy, because that the only place where we pass in the `isHostElement` flag. These changes fix the issue by not re-triggering the removal logic if the element has in-progress animations.

Fixes #33597.

PR Close #34702
2020-01-21 13:13:20 -05:00
Sonu Kapoor 15ae924035 fix(docs-infra): convert hard-coded `cli-builder` examples into a proper mini-app (#34362)
Previously, the examples in the `cli-builder` guide were hard-coded.
This made it impossible to test them and verify they are correct.

This commit fixes this by converting them into a proper mini-app. In a
subsequent commit, tests will be added to verify that the source code
works as expected (and guard against regressions).

Fixes #34314

PR Close #34362
2020-01-21 13:12:18 -05:00
ayazhafiz 6c8e322fa1 refactor(language-service): cleanup of low-hanging TODOs (#34784)
Cleans up some simple TODOs. Also removes
`typescript_symbols#getTypeWrapper`, which I thought I had but failed to
remove in #34571.

PR Close #34784
2020-01-21 13:09:30 -05:00
Alan Agius 17e98e1678 build: disable link to PUBLIC_API docs when running ts-api-guardian in angular repo (#34786)
Currently we are showing the following link https://github.com/angular/angular/blob/master/docs/PUBLIC_API.md#golden-files whenever there are updates to the golden files. However this is not correct as this document only applies to the Angular repo as other consumers of ts-api-guardian have different commands, and they store they golden files in different locations.

PR Close #34786
2020-01-21 13:08:47 -05:00
Alan Agius 47f233a4a7 docs: fix public api tool name (#34786)
PR Close #34786
2020-01-21 13:08:47 -05:00
Kristina Gocheva b04c3cce09 docs: fix logging upon search in example tutorial (#34806)
When no errors are thrown but empty array is returned we should log different message.

PR Close #34806
2020-01-21 13:08:15 -05:00
Igor Minar 2f7857f0fb ci: update link for g3sync (#34842)
the link has changed in g3.

PR Close #34842
2020-01-21 13:03:55 -05:00
ajitsinghkaler fae5c521d8 docs: change docs for get request return object type checking (#34845)
earlier in the docs it was told that adding typescript's type checking make json response typed so changed docs to say that it adds all typescipt capabilities during compile time

Fixes #34746

PR Close #34845
2020-01-21 13:03:31 -05:00
ajitsinghkaler 4dbc871169 docs(core): fix typo in dependency injection guide (interactive --> interacting) (#34853)
Fixes #34852

PR Close #34853
2020-01-21 13:03:04 -05:00
ajitsinghkaler 2694a3b734 docs(core): add missing quote in dependency injection provider guide (#34854)
Add closing double quote in HTML `class` attribute in dependency
injection provider guide.

Fixes #34851

PR Close #34854
2020-01-21 13:02:29 -05:00
Pete Bacon Darwin e0ad9ecda0 fix(ivy): ensure that `LOCALE_ID` is set after app initializers (#34830)
Before ivy it was possible to configure a mutable service value
in an application initializer (by providing an `APP_INITIALIZER`)
that could be read in the provider of `LOCALE_ID`. This is a common
scenario if you wanted to load the locale id asynchronously from
an HTTP request for instance.

When using the ivy, the runtime needs to be told what the current
locale is, which is done by calling the `setLocaleId()` function with
the value injected by the `LOCALE_ID` token. Previously this was
being done before the application initializers were run, which meant
that the `LOCALE_ID` provider was being executed before the
app initializers had a chance to get a new value for it.

Now this initalization of the locale for the ivy runtime is done after the
application initializers have been run.

Closes #34701

PR Close #34830
2020-01-17 16:23:49 -05:00
Igor Minar 0b1e34de40 fix(common): cleanup the StylingDiffer and related code (#34307)
Since I was learning the codebase and had a hard time understanding what was going on I've done a
bunch of changes in one commit that under normal circumstances should have been split into several
commits. Because this code is likely going to be overwritten with Misko's changes I'm not going to
spend the time with trying to split this up.

Overall I've done the following:
- I processed review feedback from #34307
- I did a bunch of renaming to make the code easier to understand
- I refactored some internal functions that were either inefficient or hard to read
- I also updated lots of type signatures to correct them and to remove many casts in the code

PR Close #34307
2020-01-17 14:07:27 -05:00
Matias Niemelä abd4628587 fix(common): ensure diffing in ngStyle/ngClass correctly emits value changes (#34307)
Prior to this change, in Ivy mode ngStyle/ngClass would accidentally emit value changes for static
(string-based) values even if the value itself had not changed. This patch ensures that
the style/class diffing code is more strict and when it signals ngClass/ngStyle that there has been
a value change.

Fixes #34336, #34444

PR Close #34307
2020-01-17 14:07:27 -05:00
Filipe Silva 27b9eb5e38 build: use CLI rc.8 (#34788)
PR Close #34788
2020-01-17 13:42:41 -05:00
Mike Casebolt f2df1c79d2 refactor(core): remove underscore suffix from locally scoped class expression names (#34757)
remove unnecessary underscore suffix and the corresponding TODO comments,
because the rollup bug was fixed: github.com/rollup/rollup/issues/2047

PR Close #34757
2020-01-16 12:10:01 -05:00
Miško Hevery d56cf6a92d refactor: improve assert error by including the failed condition (#34799)
PR Close #34799
2020-01-16 12:09:03 -05:00
Igor Minar 63c9c2d2be fix: work around 'noImplicityAny' incompatibility due to ts3.7 update (#34798)
Typescript 3.7 now emits d.ts files for getters differently than prior versions,
and there seems to be a bug in how it strips private types without replacing them
with explicit 'any' type. This then leads to compilation failures in projects compiled
against our packages that don't have skipLibCheck turned on but do have strict or
noImplicitAny check on.

I'm working around this by marking the affected getters as @internal and
adding a test to prevent future regressions.

I believe this is a TypeScript bug, and I filed a bug report:
https://github.com/microsoft/TypeScript/issues/36216

PR Close #34798
2020-01-16 12:06:57 -05:00
Igor Minar f2a545479d test: explicitly turn off skipLibCheck for typings tests (#34798)
skipLibCheck=false is currently the default (in tsc 3.7.4) but it wouldn't be shocking if the default
changed in the future because skipLibCheck=true makes more sense in almost all scenarios. So just to be
defensive and explicit, I'm setting the flag to false even though it's the current default.

PR Close #34798
2020-01-16 12:06:57 -05:00
Igor Minar 7dc74decb7 test: make all typings integration tests use ts strict mode (#34798)
previously they didn't which was a bug/oversight.

PR Close #34798
2020-01-16 12:06:57 -05:00
Igor Minar 39ab72ebdc build: dedupe dependencies in typings_test_ts3{6,7}/package.json (#34798)
we should try to reuse as many dependencies as we can from the top level node_modules.

PR Close #34798
2020-01-16 12:06:57 -05:00
Pete Bacon Darwin 3102dc8344 docs: do not add auto-code-links to observables example (#34797)
Fixes #34793

PR Close #34797
2020-01-16 12:06:25 -05:00
Greg Magolan 436e7388c3 build: update to rules_nodejs 1.1.0 (#34736)
This release resolves the bootstrap require patching issue with jasmine_node_test. Require patches are now included before any bootstrap scripts.

PR Close #34736
2020-01-15 14:58:07 -05:00
Greg Magolan 6174dffc2a test: test for regression where jasmine_node_test passes silently (#34736)
Adds tests to verify that jasmine_node_test targets fail as expected.
This is to catch any future regressions to jasmine_node_test where tests pass silently without executing.
See https://github.com/bazelbuild/rules_nodejs/pull/1540 for an example of a potential regression.

PR Close #34736
2020-01-15 14:58:07 -05:00
Greg Magolan 6bb6588ce0 test: add coverage to //tools/ts-api-guardian/... on WindowsCI (#34736)
PR Close #34736
2020-01-15 14:58:07 -05:00
Greg Magolan e0601df59d build: cleanup //tools/ts-api-guardian:tests target (#34736)
PR Close #34736
2020-01-15 14:58:07 -05:00
Greg Magolan 0b377bd445 build: add better comments to defaults.bzl jasmine_node_test macro (#34736)
PR Close #34736
2020-01-15 14:58:07 -05:00
Greg Magolan a28c02bf89 build: derive ts_library dep from jasmine_node_test boostrap label if it ends in `_es5` (#34736)
PR Close #34736
2020-01-15 14:58:07 -05:00
Greg Magolan 1e3f41be8f 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:07 -05:00
Greg Magolan 81f6da173b 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:07 -05:00
Greg Magolan e0827f2ad5 build: renamed "injected_scripts" target to "asset_injected_index_html" (#34736)
PR Close #34736
2020-01-15 14:58:07 -05:00
Greg Magolan cc0f3c1422 test: keep diff in integration/bazel minimal by not introducing additional_root_paths (#34736)
PR Close #34736
2020-01-15 14:58:07 -05:00
Greg Magolan aee67f08d9 test: handle bootstrap templated_args in jasmine_node_test defaults.bzl (#34736)
PR Close #34736
2020-01-15 14:58:07 -05:00
Greg Magolan a4bbc35005 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:07 -05:00
Greg Magolan 99d73906a8 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:07 -05:00
Greg Magolan 96a61d21db 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:07 -05:00
Greg Magolan 45ae62787a 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:07 -05:00
Greg Magolan dcff76e8b9 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:07 -05:00
Greg Magolan ba662fa7a9 build: upgrade to io_bazel_rules_sass 1.24.0 (#34736)
PR Close #34736
2020-01-15 14:58:07 -05:00
Greg Magolan 93c2df23bf 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:07 -05:00
Pete Bacon Darwin 3d5bcd5883 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
Pete Bacon Darwin 85b5c365fc 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
Pete Bacon Darwin da51d884a1 test(ngcc): remove `declare` from JS classes (#34695)
PR Close #34695
2020-01-15 10:24:49 -08:00
atscott b7385a77ad docs: release notes for the v9.0.0-rc.9 release 2020-01-15 09:36:19 -08:00
Igor Minar bf8ba89394 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:22 -08:00
Andrius 9c211f9625 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:22 -08:00
Paul Gschwendtner c9f24e6a58 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:22 -08:00
Paul Gschwendtner 649d01e52a 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:22 -08:00