Commit Graph

547 Commits

Author SHA1 Message Date
Alan 3aff79c251 fix(bazel): pass correct arguments to http_server in Windows (#30346)
Under Windows, the server binary has an extension of  `.exe` and the current logic is not handling that.

Partially addresses: #29785

PR Close #30346
2019-05-09 11:20:51 -07:00
arjunyel 4f055d4257 refactor: remove tslint no-use-before-declare rule (#30288)
PR Close #30288
2019-05-07 10:25:36 -07:00
Filipe Silva 60a8888b4f fix(compiler-cli): log ngcc skipping messages as debug instead of info (#30232)
Related to https://github.com/angular/angular-cli/issues/14194, https://github.com/angular/angular-cli/pull/14320

PR Close #30232
2019-05-06 09:24:15 -07:00
Kara Erickson 7d6f4885b2 fix(ivy): properly tree-shake away StaticInjector (#30219)
Ivy uses R3Injector, but we are currently pulling in both the StaticInjector
(View Engine injector) and the R3Injector when running with Ivy. This commit
adds an ivy switch so calling Injector.create() pulls in the correct
implementation of the injector depending on whether you are using VE or Ivy.
This saves us about 3KB in the bundle.

PR Close #30219
2019-04-30 21:35:54 -07:00
Keen Yee Liau 6dc884f2ab test(language-service): Load language service from tsconfig (#30153)
This PR changes the integration test to load language service the way it would be loaded in the editor.
If the language service is specified in tsconfig, it'd only be loaded for Angular projects.
Specifying it as `globalPlugins` loads it unconditionally whenever tsserver is brought up.

PR Close #30153
2019-04-29 13:28:18 -07:00
Keen Yee Liau 05eabb19d6 test(language-service): Add external template (#30128)
This is in preparation for more rigorous testing of external templates, since it'll work differently under the new tsserver plugin model.

PR Close #30128
2019-04-29 13:27:38 -07:00
Keen Yee Liau f4916730b5 feat(language-service): Implement `definitionAndBoundSpan` (#30125)
This PR adds the implementation for `definitionAndBoundSpan` because
it's now preferred over `definition`. vscode would send this new request
for `Go to definition`. As part of this PR the implementation for
`definition` is refactored and simplified. Goldens for both methods are
checked in.

PR Close #30125
2019-04-29 13:27:01 -07:00
Kara Erickson b945bc3a9e test(ivy): pin deps on hello world size tests (#30152)
We recently had an unexpected size regression in the hello world
tests because the CLI devkit released an RC that regressed us and
the dependencies were not pinned. This change ensures that we only
update dependencies like devkit deliberately, so we do not have
mysterious breakages caused by other packages.

PR Close #30152
2019-04-26 12:34:10 -07:00
Keen Yee Liau 1f4c380f58 fix(bazel): Exclude common/upgrade* in metadata.tsconfig.json (#30133)
It has a dependency on @angular/upgrade which is not part of the
dependencies in package.json, so postinstall would fail.

PR Close #30133
2019-04-26 11:07:34 -07:00
Kara Erickson 71b8b355a6 fix(ivy): remove debug utilities from ivy production builds (#30130)
Prior to this commit, we were pulling DebugNode and DebugElement
into production builds because BrowserModule automatically pulled
in NgProbe and thus getDebugNode. In Ivy, this is not necessary
because Ivy has its own set of debug utilities. We should use these
existing tools instead of NgProbe.

This commit adds an Ivy switch so we do not pull in NgProbe utilities
when running with Ivy. This saves us ~8KB in prod builds.

PR Close #30130
2019-04-26 11:04:47 -07:00
Andrew Kushnir fcacb2a4a2 test: update payload size limit for cli-hello-world app (#30134)
Master is red due to a size regression that was not caught before. We are making this change to bring master back to green state and will perform further investigation.

PR Close #30134
2019-04-25 18:03:48 -07:00
Brandon Roberts 6de4cbdd41 fix(common): add upgrade sub-package to ng_package rule for @angular/common (#30117)
Follow-up to #30055 to include @angular/common/upgrade in the npm package

Closes #30116

PR Close #30117
2019-04-25 15:01:17 -07:00
Martin Mädler 909557d5f8 feat(core): add missing ARIA attributes to html sanitizer (#29685)
Allow ARIA attributes from the WAI-ARIA 1.1 spec which were stripped by the htmlSanitizer.

Closes #26815

PR Close #29685
2019-04-25 12:30:55 -07:00
Jason Aden c0c8d2349c test: increase payload limits due to new additions in the angular/common/upgrade package (#30055)
PR Close #30055
2019-04-24 13:49:29 -07:00
Keen Yee Liau 017bf0b794 test(language-service): Add tests for quickinfo and definition (#29990)
`quickinfo` is used for hover tooltip.
`definition` is used for "Go to definition".

PR Close #29990
2019-04-19 19:28:46 -07:00
Paul Gschwendtner 2ba799ddc7 fix(bazel): do not typecheck core schematic files (#29876)
Currently for Angular Bazel projects, NGC needs to be run in the
"postinstall" NPM script in order to generate required summary files.

We need to update the postinstall `tsconfig` to not check/re-build the
`@angular/core` schematic code which has transitive dependencies
which are only available inside of a CLI project. As this is not guaranteed
to be the case with Angular Bazel projects, we need to make sure that
we don't check/re-build these files.

PR Close #29876
2019-04-18 18:22:09 -07:00
Keen Yee Liau 0629ebd9e9 build(bazel): Bump CLI and @angular-devkit/* to v8 beta 15 (#29966)
PR Close #29966
2019-04-18 13:53:33 -07:00
Filipe Silva e1f51eaa55 feat(compiler-cli): export tooling definitions (#29929)
PR Close #29929
2019-04-17 17:23:01 -07:00
Greg Magolan 7edfcf948f build(bazel): update to nodejs rules 0.27.12 and pin versions in @angular/bazel peer deps and for @bazel/schematics (#29799)
PR Close #29799
2019-04-17 13:02:03 -07:00
Kara Erickson ca2462cff7 fix(ivy): support providing components and dirs in tests (#29945)
Previous to this commit, providing a component or directive in a test
module without @Injectable() would throw because the injectable factory
would not be found. Providing components in tests in addition to declaring
or importing them is not necessary, but it should not throw an error.

This commit ensures factory data is saved when component defs and directive
defs are created, which allows them to be processed by the module injector.

Note that bootstrapping is still required for this setup to work because
directiveInject() does not support cases where the view has not been
created. This case will be handled in a future commit.

PR Close #29945
2019-04-16 19:14:17 -07:00
Filipe Silva ea70d41ac2 test: ensure correct TS version before running postinstall (#29885)
The bazel-schematics test could suffer from a version skew where new CLI projects were not yet using a new TS version, but Angular packages already were.

This caused the the `ngc` call in the added `postinstall` to run and fail: https://circleci.com/gh/angular/angular/283109

PR Close #29885
2019-04-13 09:31:21 -07:00
Alex Rickabaugh b0578061ce refactor(ivy): use ɵɵ instead of Δ for now (#29850)
The `Δ` caused issue with other infrastructure, and we are temporarily
changing it to `ɵɵ`.

This commit also patches ts_api_guardian_test and AIO to understand `ɵɵ`.

PR Close #29850
2019-04-11 16:27:56 -07:00
Filipe Silva ef85336719 build: update to TypeScript 3.4 (#29372)
PR Close #29372
2019-04-10 12:12:16 -07:00
Ben Lesh 138ca5a246 refactor(ivy): prefix all generated instructions (#29692)
- Updates all instructions to be prefixed with the Greek delta symbol

PR Close #29692
2019-04-10 12:11:40 -07:00
Alan Agius 902a53a4f6 feat(bazel): update the build to use the new architect api (#29720)
With this change the builder has been updated to use the latest architect API and make it compatable with the latest CLI

Fixes https://github.com/angular/angular-cli/issues/14082

PR Close #29720
2019-04-08 09:47:34 -07:00
Matias Niemelä ec56354306 fix(ivy): ensure parent/sub-class components evaluate styling correctly (#29602)
The new styling algorithm in angular is designed to evaluate host
bindings stylinh priority in order of directive evaluation order. This,
however, does not work with respect to parent/sub-class directives
because sub-class host bindings are run after the parent host bindings
but still have priority. This patch ensures that the host styling bindings
for parent and sub-class components/directives are executed with respect
to the styling algorithm prioritization.

Jira Issue: FW-1132

PR Close #29602
2019-04-05 16:49:52 -07:00
Greg Magolan b02cb3dc01 build(bazel): remove unnecessary scripts from ts_devserver & ts_web_test_suite in /integration/bazel (#29694)
PR Close #29694
2019-04-04 14:27:05 -07:00
Greg Magolan 7fbe138b1f build(bazel): update to nodejs rules 0.27.10 (#29694)
PR Close #29694
2019-04-04 14:27:04 -07:00
Pete Bacon Darwin 3246399bff fix(ivy): ngcc - show logging via CLI by default (#29686)
The new logger implementation caused a regression where
by default the ngcc CLI did not output any logging messages.

PR Close #29686
2019-04-03 15:27:39 -07:00
Pete Bacon Darwin 0f4f315f8e test(ivy): update ngcc integration test dependencies (#29686)
PR Close #29686
2019-04-03 15:27:38 -07:00
JoostK 2d372f48db feat(ivy): exclude declarations from injector imports (#29598)
Prior to this change, a module's imports and exports would be used verbatim
as an injectors' imports. This is detrimental for tree-shaking, as a
module's exports could reference declarations that would then prevent such
declarations from being eligible for tree-shaking.

Since an injector actually only needs NgModule references as its imports,
we may safely filter out any declarations from the list of module exports.
This makes them eligible for tree-shaking once again.

PR Close #29598
2019-04-02 16:03:54 -07:00
Alex Eagle 03d914a6c2 build: hide @angular/http for Angular v8 (#29550)
Currently our plan is to skip the publish, docgen, and update steps for this package.
During RC, we'll determine if the breaking change is too difficult for users, in which case we might restore the package for another major.

PR Close #29550
2019-04-02 10:55:31 -07:00
Greg Magolan 7c1f73ac7b build(bazel): update to nodejs rules 0.27.9 (#29647)
PR Close #29647
2019-04-02 10:27:14 -07:00
Keen Yee Liau 401b8eedd5 fix(bazel): Update schematics to support routing (#29548)
PR closes https://github.com/angular/angular/issues/29035

PR Close #29548
2019-03-27 12:35:52 -07:00
Greg Magolan 3514543e4b build(bazel): update integration/bazel lock file (#29508)
PR Close #29508
2019-03-27 09:41:11 -07:00
Greg Magolan d9162a872d build(bazel): update to nodejs rules 0.27.8 (#29508)
* fixes prodmode issue in integration/bazel

BREAKING CHANGE:

@bazel/typescript is now a peerDependency of @angular/bazel so user's of @angular/bazel must add @bazel/typescript to their package.json

PR Close #29508
2019-03-27 09:41:11 -07:00
JiaLiPassion 17f7bdbd60 build: update zone.js to 0.9.0 (#28219)
The API changes are due to enabling strict checks in TypeScript (via `strict: true`).
The payload size changes in `polyfills.js` are due to more browser APIs being patched in recent versions (e.g. `fetch`, `customElement v1`).

PR Close #28219
2019-03-26 12:50:38 -07:00
Keen Yee Liau b5295ad277 test(bazel): Add router to bazel integration test (#29459)
PR Close #29459
2019-03-22 13:17:01 -07:00
Greg Magolan d2b64cc008 build(bazel): revert back to yarn 1.12.1 under Bazel to fix Windows file-in-use issues (#29431)
PR Close #29431
2019-03-20 18:36:13 -04:00
Pete Bacon Darwin a827bc2e3a refactor(ivy): ngcc - mark target entry-point as processed even if ngcc was a noop (#29092)
If `targetEntryPointPath` is provided to `mainNgcc` then we will now mark all
the `propertiesToConsider` for that entry-point if we determine that
it does not contain code that was compiled by Angular (for instance it has
no `...metadata.json` file).

The commit also renames `__modified_by_ngcc__` to `__processed_by_ivy_ngcc__`, since
there may be entry-points that are marked despite ngcc not actually compiling anything.

PR Close #29092
2019-03-20 14:45:55 -04:00
Pete Bacon Darwin cd449021c1 feat(ivy): ngcc - compile only specified package.json format properties (#29092)
You can now specify a list of properties in the package.json that
should be considered (in order) to find the path to the format to compile.

The build marker system has been updated to store the markers in
the package.json rather than an additional external file.
Also instead of tracking the underlying bundle format that was compiled,
it now tracks the package.json property.

BREAKING CHANGE:

The `proertiesToConsider` option replaces the previous `formats` option,
which specified the final bundle format, rather than the property in the
package.json.
If you were using this option to compile only specific bundle formats,
you must now modify your usage to pass in the properties in the package.json
that map to the format that you wish to compile.

In the CLI, the `--formats` is no longer available. Instead use the
`--properties` option.

FW-1120

PR Close #29092
2019-03-20 14:45:54 -04:00
Pete Bacon Darwin bc88816c10 test: ignore the generated `demo` folder in the `bazel` integration test (#29092)
PR Close #29092
2019-03-20 14:45:54 -04:00
Keen Yee Liau d6d081e120 feat(bazel): Upgrade rules_nodejs and rules_sass (#29388)
PR Close #29388
2019-03-20 13:42:03 -04:00
Greg Magolan b460b26308 build(bazel): update to nodejs rules 0.27.7 (#29375)
PR Close #29375
2019-03-19 23:39:37 -04:00
Greg Magolan ea0e832e5f build(bazel): update to nodejs rules 0.27.6 (#29375)
PR Close #29375
2019-03-19 23:39:36 -04:00
Matias Niemelä 8714daf276 fix(ivy): introduce host-specific styling instructions (#29292)
This patch is the first of a few patches which separates the
styling logic between template bindings (e.g. <div [style])
from host bindings (e.g. @HostBinding('style')). This patch
in particular introduces a series of host-specific styling
instructions and changes the existing set of template styling
instructions not to accept directives. The underyling code (which
communicates with the styling algorithm) still works as it did
before.

This PR also separates the styling instruction code into a separate
file and moves over all other instructions into an dedicated
instructions directory.

PR Close #29292
2019-03-19 16:33:39 -04:00
Matias Niemelä fc8048ddaf build: update to nodejs rules 0.27 (#29210)
PR Close #29210
2019-03-14 19:35:00 -07:00
Matias Niemelä b2aadffbbc revert: build: update to nodejs rules 0.27 (#29210)
This reverts commit 08231f0bfa.
2019-03-14 17:38:35 -07:00
Greg Magolan 6ab8c0b371 build(bazel): update bazel managed yarn to 1.13.0 (same as CI version) (#29311)
PR Close #29311
2019-03-14 16:01:35 -04:00
Greg Magolan 08231f0bfa build: update to nodejs rules 0.27 (#29210)
PR Close #29210
2019-03-14 11:38:12 -04:00
Igor Minar 75748d6044 feat: add support for TypeScript 3.3 (and drop older versions) (#29004)
https://blogs.msdn.microsoft.com/typescript/2019/01/31/announcing-typescript-3-3/

BREAKING CHANGE: TypeScript 3.1 and 3.2 are no longer supported.

Please update your TypeScript version to 3.3

PR Close #29004
2019-03-13 10:38:37 -07:00
Kara Erickson c09d0ed627 ci: fix size regression to unblock master (#29263)
PR Close #29263
2019-03-12 12:21:56 -07:00
Renovate Bot 146256a4e0 build: update @angular-devkit/build-angular to version 0.13.5 (#29174)
PR Close #29174
2019-03-11 14:19:35 -07:00
Alan b3ffdf92c5 test: fix ngcc tests to work with flattened dts files (#28884)
PR Close #28884
2019-03-08 12:36:55 -08:00
Keen Yee Liau f4f20daee3 refactor(bazel): Remove bazel-workspace schematics (#29148)
`bazel-workspace` schematics is no longer needed now that the Bazel
files are injected into the project by the Bazel builder.

PR Close #29148
2019-03-07 13:04:09 -08:00
Keen Yee Liau 7060d9038b feat(bazel): Hide Bazel files in Bazel builder (#29110)
This commit modifies the Bazel builder to copy the Bazel WORKSPACE and
BUILD.bazel files to the project root directory before invoking Bazel.

This hides the Bazel files from users.

PR Close #29110
2019-03-06 17:35:06 -08:00
George Kalpakas 84f3dfbca4 test(service-worker): verify that `config/schema.json` is published to npm (#27859)
PR Close #27859
2019-03-05 16:48:26 -08:00
Marc Laval 25166d4f41 fix(ivy): support property values changed in ngOnChanges (forward rref case) (#29054)
PR Close #29054
2019-03-05 14:27:08 -08:00
Renovate Bot c5f1d08a43 build: update tslint to version ~5.13.0 (#29070)
PR Close #29070
2019-03-04 10:33:49 -08:00
Renovate Bot 3403027698 build: update @angular-devkit/build-angular to version 0.13.4 (#29069)
PR Close #29069
2019-03-04 10:33:18 -08:00
Alex Eagle ba602dbaec build: update Bazel to 0.23 (#29058)
PR Close #29058
2019-03-01 15:24:05 -08:00
Greg Magolan 9fe522f3e2 build: yarn.lock updates (#28871)
PR Close #28871
2019-02-28 12:06:36 -08:00
Greg Magolan ea09430039 build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871)
PR Close #28871
2019-02-28 12:06:36 -08:00
Wassim Chegham dad5a258b8 style: enforce buildifier lint on CI (#28186)
PR Close #28186
2019-02-26 16:57:41 -08:00
Wassim Chegham ce68b4d839 style: enforce buildifier lint on CI (#28186)
PR Close #28186
2019-02-26 16:57:41 -08:00
Marc Laval dc9f0af080 fix(ivy): static host classes and styles should work on root component (#28926)
PR Close #28926
2019-02-26 13:29:36 -08:00
Alex Eagle 350802b207 build: update to latest bazel rules (#28931)
PR Close #28931
2019-02-22 17:27:09 -08:00
Greg Magolan f4d652568d build: use uname instead of relying on sed --version (#28900)
PR Close #28900
2019-02-21 17:49:17 -08:00
Greg Magolan 3cc9ba24c6 build: fix integration/bazel on OSX and update integration yarn.lock files (#28900)
PR Close #28900
2019-02-21 17:49:17 -08:00
Kristiyan Kostadinov e1aaa7ec48 fix(ivy): component destroy hook called twice when configured as provider (#28470)
Fixes the `ngOnDestroy` hook on a component or directive being called twice, if the type is also registered as a provider.

This PR resolves FW-1010.

PR Close #28470
2019-02-21 09:34:26 -08:00
Greg Magolan ebffde7143 build: update to rules_typescript 0.25.1 (#28625)
Updated a spot in the compiler which assumed es5 downlevelling get ready for es2015 devmode in the future.

PR Close #28625
2019-02-21 07:46:21 -08:00
Matias Niemelä cfb2d176f8 feat(ivy): convert [ngStyle] and [ngClass] to use ivy styling bindings (#28711)
Prior to this fix, both the `NgStyle` and `NgClass` directives made use
of `Renderer2` and this dependency raised issues for future versions of
Angular that cannot inject it. This patch ensures that there are two
versions of both directives: one for the VE and another for Ivy.

Jira Issue: FW-882

PR Close #28711
2019-02-20 13:46:15 -08:00
Keen Yee Liau b9eb662c4a test(bazel): Upgrade CLI dependencies for schematics test (#28872)
This commit makes the integration test for bazel-schematics more robust
by removing package.json.replace. Instead of replacing the file, the
test script now just overrides Angular packages with the local ones.

This commit also fixes running the test locally by providing default
argument for CI_CHROMEDRIVER_VERSION_ARG.

PR Close #28872
2019-02-20 10:55:29 -08:00
Keen Yee Liau e5e4e63e71 refactor(bazel): Schematics should fetch angular from distro (#28851)
PR Close #28851
2019-02-20 09:01:44 -08:00
Alex Eagle 1eccf64b15 build: Add .bzl/BUILD files to @angular/bazel package (#28769)
It's now possible to use it as a hybrid package in latest rules_nodejs, so no WORKSPACE dep is needed

PR Close #28769
2019-02-19 17:55:57 -08:00
Greg Magolan 02ee8c7bc5 build: fix inflight PR conflict in integration/bazel (#28720)
PR Close #28720
2019-02-19 16:28:14 -08:00
Greg Magolan 25aae64274 build(bazel): do not build rxjs from source under Bazel (#28720)
PR Close #28720
2019-02-19 16:28:14 -08:00
Kara Erickson a4638d5a81 fix(ivy): support static ViewChild queries (#28811)
This commit adds support for the `static: true` flag in
`ViewChild` queries. Prior to this commit, all `ViewChild`
queries were resolved after change detection ran. This is
a problem for backwards compatibility because View Engine
also supported "static" queries which would resolve before
change detection.

Now if users add a `static: true` option, the query will be
resolved in creation mode (before change detection runs).
For example:

```ts
@ViewChild(TemplateRef, {static: true}) template !: TemplateRef;
```

This feature will come in handy for components that need
to create components dynamically.

PR Close #28811
2019-02-19 15:29:00 -08:00
Paul Gschwendtner a834c745d7 test: bazel integration test should use angular npm packages (#28762)
PR Close #28762
2019-02-19 12:53:19 -08:00
Matias Niemelä 627cecdfe2 fix(ivy): ensure host bindings and host styling works on a root component (#28664)
Prior to this fix if a root component was instantiated it create host
bindings, but never render them once update mode ran unless one or more
slot-allocated bindings were issued. Since styling in Ivy does not make
use of LView slots, the host bindings function never ran on the root
component.

This fix ensures that the `hostBindings` function does run for a root
component and also renders the schedlued styling instructions when
executed.

Jira Issue: FW-1062

PR Close #28664
2019-02-14 19:23:25 +00:00
Greg Magolan 47574fef11 build(bazel): temporarily pin browser versions while upstream is fixed as work-around for #28681 (#28698)
PR Close #28698
2019-02-13 19:18:27 -08:00
Greg Magolan 28bdeeef3e build(bazel): update to rules_nodejs 0.18.6 (#28699)
PR Close #28699
2019-02-13 12:13:08 -08:00
Keen Yee Liau 49fb8c3cb0 fix(bazel): Install angular repo before yarn_install (#28670)
PR closes https://github.com/angular/angular/issues/28636

PR Close #28670
2019-02-13 09:52:30 -08:00
Paul Gschwendtner 44de68ce40 ci: do not install firebase-tools without cache (#28615)
Currently we install `firebase-tools` manually in the
integration tests run script. This is problematic
because it means that we cannot cache `firebase-tools`
properly and Yarn might time out downloading this
dependency. We can safely move this to the top level
`package.json` since Bazel now has a `.bazelignore` and
since we have a cache that works for PRs (with fallback
caching).

Note that the `.bazelignore` is relevant here because
`firebase-tools` has been mainly moved to the bash
script because it broke some Bazel calls.

See 4f0cae0676.

PR Close #28615
2019-02-08 10:23:19 -08:00
Filipe Silva 264ef72800 build: update render3 section of integration test readme (#28372)
PR Close #28372
2019-02-07 12:36:51 -08:00
Filipe Silva f889317f93 build: re-enable CLI integration test for prod mode e2e (#28372)
PR Close #28372
2019-02-07 12:36:51 -08:00
Filipe Silva df3cea41de build: add cli-hello-world-ivy-minimal test with renderComponent (#28372)
PR Close #28372
2019-02-07 12:36:51 -08:00
Filipe Silva 36284713b2 build: rename cli-hello-world-ivy test to cli-hello-world-ivy-compat (#28372)
There are two ways to bootstrap an Ivy app: with `platformBrowserDynamic().bootstrapModule` and `renderComponent`.

To distinguish between these two approaches we call the `platformBrowserDynamic().bootstrapModule` way `ivy-compat` and the `renderComponent` way just `ivy`.

PR Close #28372
2019-02-07 12:36:51 -08:00
Filipe Silva ce83231ce9 build: update version of Angular CLI and Build Optimizer used for tests (#28372)
PR Close #28372
2019-02-07 12:36:51 -08:00
Greg Magolan 7a6237bc50 build: update lock files (#28532)
PR Close #28532
2019-02-05 16:55:43 -05:00
Greg Magolan ebaceb37e0 build: fix for integration test bazel-schematics (#28532)
PR Close #28532
2019-02-05 16:55:43 -05:00
Greg Magolan 57034aa13d build: fix for integration/bazel (#28532)
PR Close #28532
2019-02-05 16:55:43 -05:00
Greg Magolan cec1fa04c2 build: remove all deps on io_bazel_rules_go (#28532)
PR Close #28532
2019-02-05 16:55:43 -05:00
Greg Magolan 0d1e065a1c build: update to rules_typescript 0.23.2 and rules_nodejs 0.16.8 (#28532)
PR Close #28532
2019-02-05 16:55:43 -05:00
Keen Yee Liau 4a92fa9471 refactor(bazel): Create `ng-add` schematic for Bazel (#28436)
The logic to create additional files needed for Bazel are currently
hosted in `ng new`. Such files include the main.*.ts files needed
for AOT and a different angular.json to use Bazel builder, among others.

This commit refactors the logic into `ng add` so that it can be used to
perform the same modifications in an existing project. Users could do so
by running `ng add @angular/bazel`.

With this change, `ng new` effectively becomes an orchestrator that runs
the original `ng new` followed by `ng add @angular/bazel`.

PR Close #28436
2019-02-05 14:40:46 -05:00
George Kalpakas 72c36956de ci: pin ChromeDriver to a version compatible with docker image's Chrome (#28494)
By default, `webdriver-manager update` will download the latest
ChromeDriver version, which might not be compatible with the Chrome
version included in the [docker image used on CI], causing CI failures.
Previously, we used to pin the ChromeDriver version on CI in
[ngcontainer's Dockerfile][2]. This was accidentally broken in #26691,
while moving from ngcontainer to default CircleCI docker images.

This commit fixes the issue by pinning ChromeDriver to a known
compatible version.

[1]: bfd48d156d/.circleci/config.yml (L16)
[2]: bfd48d156d/tools/ngcontainer/Dockerfile (L63)

PR Close #28494
2019-02-01 20:22:03 -05:00
Keen Yee Liau 36902e2f0e fix(bazel): Bazel builder resolves with require.resolve() (#28478)
This commit fixes a bug in the Bazel builder in which the path to Bazel
executable is constructed using the project path. For non-default
project, the node_modules directory is actually one level above the
project path.

This PR fixes the bug by resolving node_modules with require.resolve().
It requires @bazel/bazel v0.22.1 because previous versions do not have
index.js or main field in package.json and would cause node module
resolution to fail.

This has been tested with both bazel and ibazel.

PR Close #28478
2019-02-01 13:56:53 -05:00
Keen Yee Liau b1e099b657 fix(bazel): fix integration test for bazel-schematics (#28460)
With the release of @angular/bazel v7.2.3, the npm install step right
after `ng new` installs this version. However there is a bug in the
builder which results in bazel executable not found.

This bug was not discovered before because the dependencies of the
project created by `ng new` are not pinned.

The fix is to pin the version of @angular/bazel to 7.2.2 which relies on
global installation of bazel.

PR Close #28460
2019-01-30 19:05:11 -05:00
Keen Yee Liau c84739dc55 test(bazel): Integration test for Sass support (#28297)
Add .sass files to the integration test for bazel-schematics.

Also addressed Alex's comment in
https://github.com/angular/angular/pull/28167/files#r248149866
about the unit tests being too brittle.

PR Close #28297
2019-01-28 20:01:18 -08:00
George Kalpakas 6e16338302 test: log cli version in `cli-hello-world[-ivy]` integration projects (#26947)
This helps debug issues on CI.

PR Close #26947
2019-01-28 14:01:13 -08:00
George Kalpakas 9a3739142f refactor: correctly name `cli-hello-world-ivy` project to distinguish from `cli-hello-world` in logs (#26947)
PR Close #26947
2019-01-28 14:01:13 -08:00
Keen Yee Liau 3b48d13af8 fix(bazel): ng-new should run yarn install (#28381)
yarn install was disabled in ng-new for Bazel schematics because
Bazel manages its own node_modules dependencies and therefore
there is no need to install dependencies twice.

However, the first yarn install is needed for `ng` commands to work,
most notably `ng build`.

This commit restores the original behavior.

PR Close #28381
2019-01-28 11:54:37 -08:00
Keen Yee Liau 2a02f4beb2 test(bazel): Cleanup bazel-schematics integration test (#28351)
PR Close #28351
2019-01-25 12:47:25 -08:00
George Kalpakas 94e305f48e build: upgrade `cli-hello-world[-ivy]` integration projects to @angular/cli@7.2.1 (#27697)
PR Close #27697
2019-01-22 12:02:10 -08:00
Alex Eagle 9a965c9145 build: create dist/bin symlink with Bazel outputs (#27781)
Note that we had nasty problems in the past when this was enabled, but those have supposedly been fixed.

PR Close #27781
2019-01-22 09:52:46 -08:00
Alex Eagle 38343a2388 build: set a default module_name for ts_library rules (#28051)
PR Close #28051
2019-01-18 10:16:39 -08:00
Keen Yee Liau c1c87462fd build(bazel): Use local rollup & build-optimizer for ng_rollup_bundle (#28215)
The current build workflow depends on cross workspace dependency by
installing angular-cli as a Bazel repository. This is not ideal because
it introduces separate node_module directories other than the one
installed by Angular through the yarn_install rule (ngdeps).

This commit removes angular-cli from the Bazel workspace and installs
rollup and @angular-devkit/build-optimizer locally.

PR Close #28215
2019-01-18 09:07:52 -08:00
Keen Yee Liau f8ad4d1e99 test(language-service): Improve integration test (#28168)
The current integration test for language service involves piping the
results of one process to another using Unix pipes.
This makes the test hard to debug, and hard to configure.

This commit refactors the integration test to use regular Jasmine
scaffolding.

More importantly, it tests the way the language service will actually
be installed by end users. Users would not have to add
`@angular/language-service` to the plugins section in tsconfig.json
Instead, all they need to do is install the *extension* from
the VS Code Marketplace and Angular Language Service will be loaded
as a global plugin.

PR Close #28168
2019-01-17 14:11:28 -08:00
Keen Yee Liau 80967ce82c build(bazel): Use @angular/cli from root package.json (#28139)
A few integration tests now depend on @angular/cli.

This commit changes the affected tests to use the dependency
on @angular/cli defined at root package.json.

PR Close #28139
2019-01-16 17:37:22 -08:00
Keen Yee Liau a570fdf0f0 fix(bazel): Fix integration test after v8 bump (#28194)
The integration test for bazel-schematics installs Angular in
two different locations:

1. Bazel workspace
2. package.json -> fetched from npm

Pull request #28142 changes the test to always install (1) from
source. This breaks when there's a major version bump since the
versions locally and the version in package.json no longer match.

This change updates package.json to fetch @angular/* packages
locally as well.

PR Close #28194
2019-01-16 16:09:58 -08:00
Keen Yee Liau 2afbcafab7 test(bazel): Use local_repository to load Angular (#28061)
The current integration test for Bazel schematics downloads a
published version of Angular as required by the http_archive
rule in the CLI created WORKSPACE.
However, this makes the test less useful because it does not
actually test any changes to the Angular repo at source.
This PR replaces the http_archive method in the WORSPACE
with local_repository so that any local changes to the Angular
repo are tested accordingly.

With Typescript 3.2, the file e2e/src/app.po.ts generated by CLI
no longer compiles under Bazel due to missing type annotations.
A temporary file is placed in the integration/bazel-schematics
directory while the change is pending in CLI repo.
https://github.com/angular/angular-cli/pull/13406

PR Close #28061
2019-01-11 16:19:59 -08:00
Ben Lesh 8ebdb437dc fix(ivy): ngOnChanges only runs for binding updates (#27965)
PR Close #27965
2019-01-11 14:28:35 -08:00
Pete Bacon Darwin e31afb7118 fix(ivy): ngcc - identify all ESM5 decorated classes (#27848)
In ESM5 decorated classes can be indicated by calls to `__decorate()`.
Previously the `ReflectionHost.findDecoratedClasses()` call would identify
helper calls of the form:

```
SomeClass = tslib_1.__decorate(...);
```

But it was missing calls of the form:

```
SomeClass = SomeClass_1 = tslib_1.__decorate(...);
```

This form is common in `@NgModule()` decorations, where the class
being decorated is referenced inside the decorator or another
member.

This commit now ensures that a chain of assignments, of any length,
is now identified as a class decoration if it results in a call to
`__decorate()`.

Fixes #27841

PR Close #27848
2019-01-11 11:14:01 -08:00
Keen Yee Liau b78351cc7e build(bazel): Bump @bazel/typescript & @bazel/karma to 0.22.1 (#28031)
PR Close #28031
2019-01-10 16:49:56 -08:00
JoostK d68ad3e617 fix(ivy): ngcc - recognize synthesized constructors (#27897)
A constructor function may have been "synthesized" by TypeScript during
JavaScript emit, in the case no user-defined constructor exists and e.g.
property initializers are used. Those initializers need to be emitted
into a constructor in JavaScript, so the TypeScript compiler generates a
synthetic constructor.

This commit adds identification of such constructors as ngcc needs to be
able to tell if a class did originally have a constructor in the
TypeScript source. When a class has a superclass, a synthesized
constructor must not be considered as a user-defined constructor as that
prevents a base factory call from being created by ngtsc, resulting in a
factory function that does not inject the dependencies of the superclass.
Hence, we identify a default synthesized super call in the constructor
body, according to the structure that TypeScript emits.

PR Close #27897
2019-01-09 11:48:10 -08:00
cexbrayat b621a69cda test: fix outDir in TS 3.2 integration test (#27774)
PR Close #27774
2019-01-08 16:00:26 -08:00
Miško Hevery b9c6df6da7 fix(ivy): use NgZone.onStable when bootstraped using PlatformRef (#27898)
PR Close #27898
2019-01-08 14:10:53 -08:00
Kara Erickson a0840242d7 ci: update payload size for cli-hello-world (#27994)
PR Close #27994
2019-01-08 11:58:40 -08:00
Paul Gschwendtner b47c43af45 build: bazel integration test using limited resources (#27937)
PR Close #27937
2019-01-07 15:35:10 -08:00
Paul Gschwendtner 4fc41517d1 build: shard integration tests on circleci (#27937)
PR Close #27937
2019-01-07 15:35:09 -08:00
Igor Minar c80071dd59 test: fix integration/platform-server test which had missing @types/node devDep (#27937)
I'm not sure why this problem is visible only now or how this worked before, but the CI
is now failing because @types/node is missing.

I also added the yarn.lock file which was previously omitted. We want the yarn.lock file in so that
our deps don't change over time without us knowing.

PR Close #27937
2019-01-07 15:35:09 -08:00
George Kalpakas 176b3f12f4 ci: make `integration_test` job logs less verbose (#27934)
The build and test progress logs make the CI log output so long that it
can't be displayed in the UI and one has to download and view the file
locally instead. This makes it harder to get to the interesting lines,
such as error messages.

Similar to #26869, but for the `bazel-schematics` integration project.

PR Close #27934
2019-01-04 12:18:39 -08:00
cexbrayat 3f64e87ed1 test: check payload size for cli-hello-world-ivy (#27797)
Adds size bundle checking to the integration test `cli-hello-world-ivy`

PR Close #27797
2018-12-26 11:19:19 -08:00
cexbrayat 62e45cef2d test: update cli-hello-world-ivy to cli@7.2.0-rc.0 (#27797)
Updates the app itself to reflect the result of using the  `experimentalIvy` flag on the CLI.
The result is similar to:

    npx @angular/cli@next new cli-hello-world-ivy --experimental-ivy --defaults

But replaces the current (cli `7.2.0-rc.0`) `renderComponent` bootstrap with the usual `platformBrowserDynamic` one.
It also keeps what the app did (display a pipe, tests it).

PR Close #27797
2018-12-26 11:19:19 -08:00
Keen Yee Liau b08f3acf09 test(bazel): Make sure CLI project created with Bazel works with original workflow (#27741)
Bazel bits added to a CLI project should not be destructive.
The project should still work under the original CLI workflow.

PR Close #27741
2018-12-19 18:24:25 -05:00
Igor Minar 17e702bf8b feat: add support for typescript 3.2 (#27536)
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-2.html
https://blogs.msdn.microsoft.com/typescript/2018/11/29/announcing-typescript-3-2/

Any application using tsickle for closure compatibility will need to update it's tsickle
dependency to 0.34

PR Close #27536
2018-12-18 13:20:01 -08:00
Keen Yee Liau 85866defa4 fix(bazel): Set module_name and enable ng test (#27715)
Relative imports in Typescript files only work when module_name is
defined in ts_library (when run in Node.js).
See issue https://github.com/bazelbuild/rules_typescript/issues/360

With that fixed, `ng test` now works.

`ng build` requires `node_modules` to be available in the project
directory, so it's not usable yet. Running `yarn` in project directory
does not work because of postinstall version check.

PR Close #27715
2018-12-17 16:43:09 -08:00
JoostK 44ec66d0a0 test(ivy): enable running cli-hello-world-ivy integration test suite (#27438)
PR Close #27438
2018-12-17 09:35:16 -08:00
JoostK b5b229dbe4 test(ivy): synchronize cli-hello-world-ivy with cli-hello-world integration suite (#27438)
The ci-production e2e test is diabled because Angular fails to be found

PR Close #27438
2018-12-17 09:35:16 -08:00
Keen Yee Liau 3680aef801 test(bazel): integration test for ng new with Bazel (#27659)
integration test for bazel build and bazel test

PR Close #27659
2018-12-14 10:19:22 -08:00
Alex Eagle bf57e9d781 build: update rules_typescript (#27586)
This release of rules_typescript fixes a critical bug: typescript code
was not checked at all, including type-checking, tsetse, and strict deps

fixes #27569

PR Close #27586
2018-12-10 16:33:41 -08:00
Alex Eagle 44dd764d6d build: update to Bazel 0.20 (#27394)
refactor Bazel RBE configs

PR Close #27394
2018-12-07 14:29:03 -08:00
Alex Eagle 15ca1bbd11 style: run latest buildifier binary (#27489)
PR Close #27489
2018-12-07 09:27:32 -08:00
Pete Bacon Darwin 0df914e1e9 test(ivy): ngcc - update integration test dependency lock file (#26906)
PR Close #26906
2018-11-30 14:02:03 -08:00
Greg Magolan c8a8dcfc6e build(bazel): update handling of rules_nodejs transitive deps (#27264)
BREAKING CHANGES:

Bazel users: rules_angular_dependencies() will no longer install transitive dependencies of build_bazel_rules_nodejs and build_bazel_rules_typescript. User WORKSPACE files will now need to install rules_nodejs and rules_typescript transitive deps directly:

```
load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependencies")
rules_typescript_dependencies()

load("@build_bazel_rules_nodejs//:package.bzl", "rules_nodejs_dependencies")
rules_nodejs_dependencies()
```

PR Close #27264
2018-11-30 13:35:51 -08:00
JoostK 0d9b27ff26 fix(ivy): let ngcc transform @angular/core typings with relative imports (#27055)
PR Close #27055
2018-11-21 09:20:11 -08:00
JoostK c8c8648abf fix(ivy): prevent ngcc from referencing missing ɵsetClassMetadata (#27055)
When ngtsc compiles @angular/core, it rewrites core imports to the
r3_symbols.ts file that exposes all internal symbols under their
external name. When creating the FESM bundle, the r3_symbols.ts file
causes the external symbol names to be rewritten to their internal name.

Under ngcc compilations of FESM bundles, the indirection of
r3_symbols.ts is no longer in place such that the external names are
retained in the bundle. Previously, the external name `ɵdefineNgModule`
was explicitly declared internally to resolve this issue, but the
recently added `setClassMetadata` was not declared as such, causing
runtime errors.

Instead of relying on the r3_symbols.ts file to perform the rewrite of
the external modules to their internal variants, the translation is
moved into the `ImportManager` during the compilation itself. This
avoids the need for providing the external name manually.

PR Close #27055
2018-11-21 09:20:11 -08:00
Alex Eagle 026b7e34b3 build: update yarn version (#27193)
Some engineers were already on Yarn 0.10.x which was permitted by the range in our package.json#engines
However this introduced 'integrity sha512' lines into the yarn.lock files.
Then when engineers use yarn 0.9 (in particular, Bazel did this) then the lock files get tons of meaningless edits.
We could force everyone back to yarn 0.9 but this commit chooses to instead advance everyone past 0.10

PR Close #27193
2018-11-21 07:46:22 -08:00
Alex Eagle 81e975ad93 build: update to latest Bazel rules_typescript (#27138)
PR Close #27138
2018-11-17 12:19:32 -08:00
Kara Erickson ee12e725c0 fix(ivy): component ref injector should support change detector ref (#27107)
PR Close #27107
2018-11-15 21:18:24 -08:00
George Kalpakas d568d7a352 ci: make `integration_test` job logs less verbose (#26929)
Follow-up for 804fb99d6.

PR Close #26929
2018-11-05 09:53:49 -08:00
George Kalpakas 804fb99d66 ci: make `integration_test` job logs less verbose (#26869)
The build progress logs accounted for ~80% of the total log size, which
makes it harder to get to the interesting lines, such as error messages.

Used suggestion from [here][1].

[1]: https://github.com/angular/angular-cli/issues/11412#issuecomment-412021539

PR Close #26869
2018-11-02 10:37:35 -07:00
George Kalpakas 387db75003 build: upgrade `@angular/cli` in `cli-hello-world` integration test (#26869)
PR Close #26869
2018-11-02 10:37:35 -07:00
George Kalpakas c40677a4f5 ci: fix and re-enable payload size checks for integration tests (#26869)
See #22810, #23376 and #23515 for more context.

Fixes #23376
Closes #23515

PR Close #26869
2018-11-02 10:37:34 -07:00
George Kalpakas d4b46e271a test: remove checks for non-existent directories in integration tests (#26869)
PR Close #26869
2018-11-02 10:37:34 -07:00
George Kalpakas 53bae68617 test: make `elements` integration tests less flaky (#26869)
PR Close #26869
2018-11-02 10:37:34 -07:00
Pete Bacon Darwin bc68b592b1 test(ivy): ngcc - test compiling a CLI generated project (#26403)
This integration test was created from a vanilla CLI generated
project with the following modifications:

* remove `PercentPipe` usage from `app.component.html`
  - these are not yet supported by ivy
* changed `ng test` in `package.json` to only to `ng build`
  - right now we can only confirm that the app will build
* hard-code `ngDevMode` in `index.html`
  - the CLI does not yet set this correctly

PR Close #26403
2018-11-01 14:13:26 -07:00
Pete Bacon Darwin 603e7935aa test(ivy): ngcc - test compiling the Angular Material library (#26403)
* rename test helper script
* add material to the ngcc integration test
* add MatButton to ngcc integration test checks
* remove platform-server from ngcc integration test
  This package does not yet compile as it contains a package-private
  (internal) decorated class, which the ngcc compiler does not yet
  handle.

PR Close #26403
2018-11-01 14:13:26 -07:00
Paul Gschwendtner 8fc4ae51fb build: use bazel version from node modules (#26691)
* No longer depends on a custom CircleCI docker image that comes with Bazel pre-installed. Since Bazel is now available through NPM, we should be able to use the version from `@bazel/bazel` in order to enforce a consistent environment on CI and locally.
* This also reduces the amount of packages that need to be published (ngcontainer is removed)

PR Close #26691
2018-10-30 16:19:13 -04:00
Greg Magolan 15c2467dbd build: review comments addressed (#26488)
PR Close #26488
2018-10-19 20:59:29 -07:00
Greg Magolan 2b3cac5b31 build: add comment to /integration/bazel/package.json (#26488)
PR Close #26488
2018-10-19 20:59:29 -07:00
Greg Magolan 8d5e3e6981 build: update to rules_typescript 0.20.3 and rules_nodejs 0.15.1 (#26488)
PR Close #26488
2018-10-19 20:59:29 -07:00
Greg Magolan 631998b2df build: idiomatic install of @angular/bazel npm package (#26258) (#26488)
PR Close #26488
2018-10-19 20:59:29 -07:00
Greg Magolan 6468711e16 build(bazel): update to rules_typescript 0.20.2 (#26279) (#26488)
PR Close #26488
2018-10-19 20:59:29 -07:00
Greg Magolan d698b0eadf build: update to rules_typescript 0.20.1 and rules_nodejs 0.15.0 (#26260) (#26488)
PR Close #26488
2018-10-19 20:59:29 -07:00
Greg Magolan 1f3331f5e6 build(bazel): use fine-grained npm deps (#26111) (#26488)
PR Close #26488
2018-10-19 20:59:29 -07:00
Alex Rickabaugh d4cee514f6 refactor(ivy): obviate the Bazel component of the ivy_switch (#26550)
Originally, the ivy_switch mechanism used Bazel genrules to conditionally
compile one TS file or another depending on whether ngc or ngtsc was the
selected compiler. This was done because we wanted to avoid importing
certain modules (and thus pulling them into the build) if Ivy was on or
off. This mechanism had a major drawback: ivy_switch became a bottleneck
in the import graph, as it both imports from many places in the codebase
and is imported by many modules in the codebase. This frequently resulted
in cyclic imports which caused issues both with TS and Closure compilation.

It turns out ngcc needs both code paths in the bundle to perform the switch
during its operation anyway, so import switching was later abandoned. This
means that there's no real reason why the ivy_switch mechanism needed to
operate at the Bazel level, and for the ivy_switch file to be a bottleneck.

This commit removes the Bazel-level ivy_switch mechanism, and introduces
an additional TypeScript transform in ngtsc (and the pass-through tsc
compiler used for testing JIT) to perform the same operation that ngcc
does, and flip the switch during ngtsc compilation. This allows the
ivy_switch file to be removed, and the individual switches to be located
directly next to their consumers in the codebase, greatly mitigating the
circular import issues and making the mechanism much easier to use.

As part of this commit, the tag for marking switched variables was changed
from __PRE_NGCC__ to __PRE_R3__, since it's no longer just ngcc which
flips these tags. Most variables were renamed from R3_* to SWITCH_* as well,
since they're referenced mostly in render2 code.

Test strategy: existing test coverage is more than sufficient - if this
didn't work correctly it would break the hello world and todo apps.

PR Close #26550
2018-10-19 09:23:05 -07:00
cexbrayat 164f79a7b0 style: typos in TS 3.1 integration test (#26433)
The test was mentionning TS 3.0.

PR Close #26433
2018-10-15 16:48:44 -07:00
George Kalpakas 9e32dc7c95 build: upgrade `@types/jasminewd2` to 2.0.4 (#26139)
This commit also removes the extra jasminewd2 typings, since the changes
have been merged in the official typings with
DefinitelyTyped/DefinitelyTyped#28957.

PR Close #26139
2018-10-12 14:11:11 -07:00
Pawel Kozlowski 053bf27fb3 refactor(ivy): use context discovery in TestBed implementation (#26211)
PR Close #26211
2018-10-11 13:01:28 -07:00
Pete Bacon Darwin 3ac8a63499 test(ivy): update ngcc integration test (#26236)
PR Close #26236
2018-10-08 13:45:46 -07:00
Igor Minar 86e6a2099a test: remove typescript 2.9 and 3.0 typings tests (#26151)
We no longer support these versions and the tests actually break with
the output from 3.1 (at least in the case of tsc 2.9)

PR Close #26151
2018-09-28 09:34:51 -07:00
Igor Minar 9993c72335 feat: add support for TypeScript 3.1 (#26151)
PR Close #26151
2018-09-28 09:34:51 -07:00
Matias Niemelä 0c344715e5 feat(ivy): expose a series of helpful application inspection tools (#25919)
PR Close #25919
2018-09-25 09:46:12 -07:00
Pete Bacon Darwin 9b1bb370a3 fix(ivy): ngcc should compile entry-points in the correct order (#25862)
The compiler should process all an entry-points dependencies
before processing that entry-point.

PR Close #25862
2018-09-18 13:06:28 -07:00
Pete Bacon Darwin 6f1100a7e9 refactor(ivy): use `canonical-path` in ngcc (#25862)
It turns out that `path.posix` does not always reliably
return forward slash paths on Windows.

PR Close #25862
2018-09-18 13:06:28 -07:00
Greg Magolan b99d7ed5bf build(bazel): update to rules_typescript 0.17.0 & rules_nodejs 0.13.4 (#25920)
PR Close #25920
2018-09-18 13:05:38 -07:00
Alex Eagle bdbb2f9bfa ci: update to bazel 0.17 (#25967)
this includes support for @ character in labels, which we need for fine-grained deps

PR Close #25967
2018-09-17 12:51:52 -07:00
Alex Eagle 34ec9244a6 build: update to Node 10 (#25822)
PR Close #25822
2018-09-06 14:58:30 -07:00
Pete Bacon Darwin b0cb134815 feat(ivy): implement ngcc build marker (#25557)
`ngcc` adds marker files to each folder that has been
compiled, containing the version of the ngcc used.

When compiling, it will ignore folders that contain these
marker files, as long as the version matches.

PR Close #25557
2018-09-05 11:35:47 -07:00
Greg Magolan 1e7a873cf4 build(bazel): remove unused angular.tsconfig.json integration/bazel test (#25778)
PR Close #25778
2018-09-05 09:38:19 -07:00
Greg Magolan 910381ddbd build(bazel): fix bazel types reference directive resolves (#25581)
PR Close #25581
2018-08-31 11:12:03 -07:00
Rob Wormald 6143da66b2 fix(elements): add compiler dependency (#24861)
PR Close #24861
2018-08-30 21:33:14 -07:00
Rob Wormald a080ffc743 fix(elements): add compiler to integration (#24861)
PR Close #24861
2018-08-30 21:33:14 -07:00
Rob Wormald a8210d010b fix(elements): strict null checks (#24861)
PR Close #24861
2018-08-30 21:33:14 -07:00
Rob Wormald c9844a2f01 feat(elements): enable Shadow DOM v1 and slots (#24861)
When using ViewEncapsulation.ShadowDom, Angular will not remove the child nodes of the DOM node a root Component is bootstrapped into. This enables developers building Angular Elements to use the `<slot>` element to do native content projection.

PR Close #24861
2018-08-30 21:33:14 -07:00
Rob Wormald 4815b92495 test(elements): add basic integration test for angular elements (#24861)
PR Close #24861
2018-08-30 21:33:14 -07:00
Alan Agius 5653fada32 feat: add TypeScript 3 support (#25275)
PR Close #25275
2018-08-27 21:07:53 -04:00
Alex Eagle c230173716 build: update Bazel to 0.16 (#25646)
PR Close #25646
2018-08-27 18:20:32 -04:00
Greg Magolan a59d4da304 build(bazel): fix bazel integration test after rules_typescript update (#25490)
PR Close #25490
2018-08-23 15:26:21 -04:00
Alex Eagle 22e7f7e99f build(bazel): update to rules_typescript 0.16.1 (#25490)
PR Close #25490
2018-08-23 15:26:21 -04:00
Pete Bacon Darwin 7500f0eafb feat(ivy): find all packages to be compiled by ngcc (#25406)
PR Close #25406
2018-08-22 19:28:56 -04:00
Pete Bacon Darwin 68acc5b355 feat(ivy): compile all package formats in ngcc (#25406)
PR Close #25406
2018-08-22 19:28:56 -04:00
Alex Rickabaugh c8baace554 test(ivy): add an integration test for ngcc (#25406)
This commit adds an integration test for ngcc, which runs ngcc
against most @angular packages. It does not yet make any assertions
on the result.

PR Close #25406
2018-08-22 19:28:56 -04:00
Greg Magolan b5f354f2fb build(bazel): update to rules_typescript 0.16.0 & update to tagged rules_webtesting 0.2.1 (#25433)
PR Close #25433
2018-08-14 16:37:15 -07:00
Victor Berchet 14ac7ad6b4 feat(ivy): implement TestBed (#25369)
PR Close #25369
2018-08-14 11:58:47 -07:00
Alex Eagle 6c4da9dcd3 build: stop printing source-map-support warning (#25339)
PR Close #25339
2018-08-08 19:02:57 -07:00
Kara Erickson 843479449d Revert "build: update Bazel to 0.16 (#25316)" (#25391)
This reverts commit 4eb8ac6de9 because 0.16 is not
widely available yet (e.g. on Mac) and it is blocking the Angular release.

PR Close #25391
2018-08-08 10:52:23 -07:00
Alex Eagle 4eb8ac6de9 build: update Bazel to 0.16 (#25316)
PR Close #25316
2018-08-06 11:30:24 -07:00
Greg Magolan bde4402675 build: update hello_world__closure to google-closure-compiler 20180716.0.0 (#25236)
PR Close #25236
2018-08-01 13:23:35 -07:00
Greg Magolan 5254d3447d build(bazel): update to rules_nodejs 0.11.2 and latest rules_typescript (#25169)
PR Close #25169
2018-07-31 11:41:50 -07:00
Greg Magolan 1d051c5841 build(bazel): use bazel managed node_modules for downstream angular from source build support (#24663)
PR Close #24663
2018-07-26 17:02:21 -07:00
Greg Magolan c438b5eeda build(bazel): turn on preserve-symlinks (#24881)
This change turns on preserve-symlinks in nodejs to verify hermeticity of the Angular build.

BREAKING CHANGE: Use of @angular/bazel rules now requires calling ng_setup_workspace() in your WORKSPACE file.

For example:

local_repository(
    name = "angular",
    path = "node_modules/@angular/bazel",
)

load("@angular//:index.bzl", "ng_setup_workspace")

ng_setup_workspace()

PR Close #24881
2018-07-20 10:37:30 -07:00
Alex Eagle 97277bc9fb build: update to Bazel 0.15 (#24841)
PR Close #24841
2018-07-13 15:05:16 -04:00
Greg Magolan ee50ee493d build(bazel): try removing gazelle (#24787)
PR Close #24787
2018-07-12 16:34:45 -04:00
Greg Magolan 161ff5c79d feat(bazel): protractor_web_test_suite for release (#24787)
PR Close #24787
2018-07-12 16:34:45 -04:00
Alex Eagle 80576641a8 build: update to latest nodejs bazel rules (#24817)
PR Close #24817
2018-07-10 18:47:39 -07:00
George Kalpakas 00c110b055 build: upgrade jasmine (and related typings) to latest version (#19904)
With these changes, the types are a little stricter now and also not
compatible with Protractor's jasmine-like syntax. So, we have to also
use `@types/jasminewd2` for e2e tests (but not for non-e2e tests).

I also had to "augment" `@types/jasminewd2`, because the latest
typings from [DefinitelyTyped][1] do not reflect the fact that the
`jasminewd2` version (v2.1.0) currently used by Protractor supports
passing a `done` callback to a spec.

[1]: 566e039485/types/jasminewd2/index.d.ts (L9-L15)

Fixes #23952
Closes #24733

PR Close #19904
2018-07-06 13:48:02 -07:00
cexbrayat fddd2af4fc test: integration test for TS 2.9.x (#24749)
PR Close #24749
2018-07-06 10:16:58 -07:00
Igor Minar e3064d5432 feat: typescript 2.9 support (#24652)
PR Close #24652
2018-07-03 13:32:06 -07:00
George Kalpakas b8760a0ca5 test(elements): test typings against TS 2.7 and 2.8 (#24443)
PR Close #24443
2018-06-25 07:56:14 -07:00
George Kalpakas 50fb58fd01 test: remove unnecessary `yarn.lock` file (#24443)
PR Close #24443
2018-06-25 07:56:14 -07:00
Greg Magolan 7c8159b3e2 test(bazel): fix flakey bazel integration e2e test (#24522)
PR Close #24522
2018-06-14 14:14:59 -07:00
Alex Eagle 5aa12c73ae build: update to Bazel 0.14.0 (#24512)
Includes a fix for out-of-memory condition which caused this to be
reverted yesterday.

PR Close #24512
2018-06-14 10:04:42 -07:00
Alex Eagle 03f93b3772 Revert "build: update to Bazel 0.14.0 (#24296)" (#24492)
This reverts commit 0d07d273dc.

Fixes #24484

PR Close #24492
2018-06-13 16:47:18 -07:00
Alex Eagle c2b5ebfa24 build: update buildifier to latest (#24296)
this matches the version in ngcontainer:0.3.1

PR Close #24296
2018-06-12 11:42:35 -07:00
Alex Eagle 0d07d273dc build: update to Bazel 0.14.0 (#24296)
Also update usage of the ctx.actions.args to a newer preferred API

PR Close #24296
2018-06-12 11:42:35 -07:00
Greg Magolan 5cbcb5680b build(bazel): update bazel integration test to test secondary angular imports such as @angular/common/http (#24170)
PR Close #24170
2018-06-01 13:40:47 -07:00
Greg Magolan ec57133b61 build: update to rules_nodejs 0.9.1 and rules_typescript 0.15.0 (#24212)
PR Close #24212
2018-05-31 10:08:07 -07:00
Lucas Sloan 5cf82f8f3f build: upgrade to TypeScript 2.8 (#23782)
PR Close #23782
2018-05-15 15:31:12 -07:00
Alex Eagle 7e9649bdf1 build: update to latest nodejs bazel rules (#23683)
PR Close #23683
2018-05-04 15:29:03 -07:00
Olivier Combe 8062f7de9e test: add i18n to cli-hello-world integration test (#23527)
PR Close #23527
2018-04-27 07:24:35 -07:00
Alex Eagle b26ac1c22f ci: publish build snapshots from Bazel/CircleCI (#23512)
This uses a new script and CircleCI job called "build-packages-dist"
which shims the new Bazel build to produce outputs matching the legacy
build. We'll use this to get AIO testing onto CircleCI as well.

We move the integration tests to a new circleCI job that depends on this
one, as well as the build publishing job.

Note that every PR will have a trivial green publishing status, because
we always create this job even for PRs. We'd rather not - see
https://discuss.circleci.com/t/workflows-pull-request-filter/14396/4

PR Close #23512
2018-04-23 15:45:56 -07:00
Igor Minar 2491b7249a ci: chown bazel-built packages when running integration tests (#23234)
PR Close #23234
2018-04-17 14:09:02 -07:00
Igor Minar acbfb9eb4d build: fix angular.json that was missing keys due to cli bugs (#23234)
https://github.com/angular/angular-cli/issues/10225
https://github.com/angular/angular-cli/issues/10226

PR Close #23234
2018-04-17 14:09:02 -07:00
Igor Minar 08fc4f3ad8 build: update to rxjs@6.0.0-tactical-rc.1 (#23234)
PR Close #23234
2018-04-17 14:09:02 -07:00
Igor Minar c6c79ab5dc test: simplify config for cli-hello-world (#23234)
PR Close #23234
2018-04-17 14:09:02 -07:00
Igor Minar 6837491f08 test: update cli-hello-world to cli@6.0.0-rc.2 (#23234)
PR Close #23234
2018-04-17 14:09:02 -07:00
Alex Eagle 102ed3b03c test: move platform-server integration test (#22810)
Now it lives in our standard location for tests against npm packages

PR Close #22810
2018-04-13 16:30:50 -07:00
Alex Eagle 328b48b697 test: integration tests now against bazel built packages (#22810)
PR Close #22810
2018-04-13 16:30:50 -07:00
Greg Magolan 6199ea5d4a fix(compiler-cli): shorten resolved module name in fileNameToModuleName to npm package name for typings (#23231)
PR Close #23231
2018-04-13 00:19:19 -07:00
JiaLi.Passion 30a6861fd0 build: update zone.js to 0.8.26 to fix some regression bugs (#23227)
PR Close #23227
2018-04-09 15:16:40 -07:00
Kara Erickson 3a9d916632 test(ivy): remove outdated render3 tests (#23229)
PR Close #23229
2018-04-06 11:29:31 -07:00
Kara Erickson 629629d1bd test(ivy): update size tests (#21940)
PR Close #21940
2018-04-05 16:28:47 -07:00
Igor Minar 7c039613dd test: update hello_world__closure to google-closure-compiler@20180319.0.0 (#23149)
PR Close #23149
2018-04-04 17:47:47 -07:00
Igor Minar dae4689b1c test: upgrade cli-hello-world to cli 6.0.0-rc.0 (#23149)
PR Close #23149
2018-04-04 17:47:47 -07:00
Igor Minar bf88c5c9f8 build: configure angular-cli projects to use yarn by default (#23149)
PR Close #23149
2018-04-04 17:47:47 -07:00
Igor Minar 1aebee42eb test: update cli-hello-world to @angular/cli@1.7.x (#23149)
PR Close #23149
2018-04-04 17:47:47 -07:00
JiaLi.Passion c560423b52 build: upgrade zone.js (#23108)
PR Close #23108
2018-04-04 08:24:02 -07:00
Alex Eagle 580f05bd9c build: flatten esm5 sources before rollup (#23131)
this is needed to update to latest rules_nodejs due to breaking change in
https://github.com/bazelbuild/rules_nodejs/pull/172
It has the side-effect of correctly marking rxjs packages as side-effect-free

PR Close #23131
2018-04-03 10:47:29 -07:00
Igor Minar 92724b396b build: update to rxjs@6.0.0-rc.0 (#23106)
PR Close #23106
2018-04-03 10:00:24 -07:00
Igor Minar 88a93e730e test: add missing lockfile for integration/ng_update test (#23084)
PR Close #23084
2018-03-30 13:07:03 -07:00
Igor Minar dc95e7bc33 test: add typings test for typescript 2.7 (#23084)
PR Close #23084
2018-03-30 13:07:03 -07:00
Igor Minar 7fdc24db72 test: remove obsolete typings tests (#23084)
we no longer support typescript 2.4, 2.5, and 2.6

PR Close #23084
2018-03-30 13:07:03 -07:00
Veres Lajos de90314304 style: typos fixed - https://github.com/vlajos/misspell-fixer (#22975)
PR Close #22975
2018-03-27 14:51:53 -04:00
Alex Eagle 4f0cae0676 build: allow bazel build //... (#22168)
Also switch our CircleCI commands to just
bazel build //...
bazel test //...
as this is easier to understand.

Note, the reason this commit removes `firebase-tools` is:

1) firebase-tools has an optional dependency on
https://www.npmjs.com/package/@google-cloud/functions-emulator
2) yarn's `--ignore-optional` doesn't work for transitive deps, so
there's no way to yarn install without getting that functions-emulator
package
3) functions-emulator has a transitive dep on `grpc`
4) the version of `grpc` we get has `BUILD` files and no `WORKSPACE`
file so it always breaks `bazel build ...`

It could be solved by any of:
1) remove firebase-tools - this is what I did
2) fix yarn so you can omit optional deps of a transitive dep
3) make functions-emulator depend transitively on a more recent `grpc`
version
4) patch `grpc` after install by doing an `rm` command in our
postinstall or something

In its place we must install protobufjs. This is needed by the
ngc-wrapped test, which needs jasmine as well as bazel's worker mode
dependencies, and therefore cannot simply rely on
node_modules =
"@build_bazel_rules_typescript_tsc_wrapped_deps//:node_modules"

PR Close #22168
2018-03-23 15:02:32 -05:00
Igor Minar 3cc5c2e4d0 build: update to rxjs@6.0.0-beta.0 (#22887)
PR Close #22887
2018-03-20 15:26:49 -07:00
Igor Minar b43f8bc7d3 feat(core): upgrade rxjs to 6.0.0-alpha.4 (#22573)
PR Close #22573
2018-03-19 21:51:51 -07:00
Igor Minar 5caad5fe93 ci: temporarily increase payload size limit for cli-hello-world until we update cli to v6 (#22573)
PR Close #22573
2018-03-19 21:51:51 -07:00
Igor Minar ce63dc6f95 feat: update the package output of build.sh to APF v6 (#22808)
PR Close #22808
2018-03-18 09:33:51 -07:00
Igor Minar 912fe08756 test: improve ng build flags for cli-hello-world (#22808)
Remove unnecessary --build-optimizer flag and add --sourcemaps flag to
generate source maps for better debugging.

PR Close #22808
2018-03-18 09:33:51 -07:00
Igor Minar 99408d0445 test: add workaround to cli-hello-world payload-size test (#22808)
See https://github.com/angular/devkit/pull/524

PR Close #22808
2018-03-18 09:33:51 -07:00
Alex Rickabaugh 6ef9f2278f feat(ivy): @NgModule -> ngInjectorDef compilation (#22458)
This adds compilation of @NgModule providers and imports into
ngInjectorDef statements in generated code. All @NgModule annotations
will be compiled and the @NgModule decorators removed from the
resultant js output.

All @Injectables will also be compiled in Ivy mode, and the decorator
removed.

PR Close #22458
2018-03-16 12:57:11 -07:00
Alex Eagle 88b3198c80 feat(bazel): change ng_package rule to APF v6 (#22782)
Angular Package Format v6 stops bundling files in the esm5 and esm2015
directories, now that Webpack 4 can tree-shake per-file.

Adds some missing files like package.json to make packages closer to
what we publish today.

Refactor ng_package to be a type of npm_package and re-use the packaging
action from that rule.

PR Close #22782
2018-03-15 11:38:31 -07:00
Hans Larsen f256c02b5e build: fix build.sh for package group and add a test (#22638)
PR Close #22638
2018-03-15 11:34:46 -07:00
Alex Rickabaugh db56836425 feat: tree-shakeable providers API updates (#22655)
Rename @Injectable({scope -> providedIn}).

Instead of {providedIn: APP_ROOT_SCOPE}, accept {providedIn: 'root'}.
Also, {providedIn: null} implies the injectable should not be added
to any scope.

PR Close #22655
2018-03-13 09:28:05 -07:00
Chuck Jazdzewski 8449eb8d62 build: upgrade to TypeScript 2.7 (#22669)
Fixes: #21571

PR Close #22669
2018-03-12 09:27:23 -07:00
Alex Eagle 4c40812b71 fix(bazel): fixes for ng_package on Windows (#22597)
PR Close #22597
2018-03-06 07:52:48 -08:00
Alex Eagle ba8df8a3f1 build: update to latest bazel rules (#22558)
PR Close #22558
2018-03-02 13:27:25 -08:00
Alex Eagle b43b164a61 feat(bazel): add an ng_package rule (#22221)
This produces a directory following the Angular Package layout spec.

Includes integration test coverage by making a minimal ng_package in integration/bazel.
Unit tests verify the content of the @angular/core and @angular/common packages.

This doesn't totally match our current output, but is good enough to unblock some
early adopters.

It re-uses logic from the rollup_bundle rule in rules_nodejs. It should also
eventually have the .pack and .publish secondary targets like npm_package rule.

PR Close #22221
2018-02-23 11:19:04 -08:00