Commit Graph

5148 Commits

Author SHA1 Message Date
Ben Lesh 16aa6ceff8 refactor(ivy): update ɵɵtextBinding to not take index (#30792)
- Splits core functionality off into a shared internal function
- ɵɵtextBinding will no longer require an index
- Alters the compiler to stop generating an index argument for the instruction
- Updates tests
- Updates some usage of ɵɵtextBinding in i18n to use the helper function instead

PR Close #30792
2019-06-14 12:22:11 -07:00
Alex Eagle ef0b2cc74d build: convert entry_point to label (#30627)
PR Close #30627
2019-06-11 00:03:11 +00:00
Misko Hevery fcdd784667 refactor(core): cleanup code with side-effects which was preventing tree-shaking (#30580)
PR Close #30580
2019-06-03 09:01:51 -07:00
Ben Lesh d7eaae6f22 refactor(ivy): Move instructions back to ɵɵ (#30546)
There is an encoding issue with using delta `Δ`, where the browser will attempt to detect the file encoding if the character set is not explicitly declared on a `<script/>` tag, and Chrome will find the `Δ` character and decide it is window-1252 encoding, which misinterprets the `Δ` character to be some other character that is not a valid JS identifier character

So back to the frog eyes we go.

```
    __
   /ɵɵ\
  ( -- ) - I am ineffable. I am forever.
 _/    \_
/  \  /  \
==  ==  ==
```

PR Close #30546
2019-05-20 16:37:47 -07:00
Pawel Kozlowski 98ded949dd fixup! test(ivy): make the test run with benchpress (#30449)
PR Close #30449
2019-05-16 20:04:04 -07:00
Pawel Kozlowski a5a1f4f52f fixup! test(ivy): enableProdMode (#30449)
PR Close #30449
2019-05-16 20:04:03 -07:00
Pawel Kozlowski 8c1a041411 fixup! test(ivy): rebase, format and lint (#30449)
PR Close #30449
2019-05-16 20:04:03 -07:00
Miško Hevery b1ba2d6f4e test(ivy): add expanding_rows performance benchmark which runs in ViewEngine and Ivy (#30449)
PR Close #30449
2019-05-16 20:04:03 -07:00
Ben Lesh cf86ed7b29 refactor(ivy): migrate ɵɵ prefix back to Δ (#30362)
Now that issues are resolved with Closure compiler, we can move back to our desired prefix of `Δ`.

PR Close #30362
2019-05-14 16:52:15 -07:00
Matias Niemelä d8665e639b refactor(ivy): drop `element` prefixes for all styling-related instructions (#30318)
This is the final patch to migrate the Angular styling code to have a
smaller instruction set in preparation for the runtime refactor. All
styling-related instructions now work both in template and hostBindings
functions and do not use `element` as a prefix for their names:

BEFORE:
  elementStyling()
  elementStyleProp()
  elementClassProp()
  elementStyleMap()
  elementClassMap()
  elementStylingApply()

AFTER:
  styling()
  styleProp()
  classProp()
  styleMap()
  classMap()
  stylingApply()

PR Close #30318
2019-05-08 15:33:39 -07:00
Matias Niemelä 7c8a62d64d refactor(ivy): remove elementIndex param from all element-level styling instructions (#30313)
This patch is one commit of many patches that will unify all styling instructions
across both template-level bindings and host-level bindings. This patch in particular
removes the `elementIndex` param because it is already set prior to each styling
instruction via the `select(n)` instruction.

PR Close #30313
2019-05-08 09:18:19 -07:00
Alex Eagle e5c3695dbd Revert "refactor: use new Http library in playground (#29355)"
This reverts commit acfcf90528.
2019-04-26 16:49:50 -07:00
Adam Plumer acfcf90528 refactor: use new Http library in playground (#29355)
PR Close #29355
2019-04-26 16:26:30 -07:00
Greg Magolan 4271d35dc4 build(bazel): fix missing deps in ts_devserver targets under /modules/playground/src/web_workers (#29799)
PR Close #29799
2019-04-17 13:02:03 -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
Peter Johan Salomonsen 712d60e467 fix(platform-browser): insert APP_ID in styles, contentAttr and hostAttr (#17745)
PR Close #17745
2019-04-11 07:59:22 -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
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
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
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
Paul Gschwendtner dba2a406fd build: remove legacy e2e tests job (#28645)
Now that all e2e integration tests within `modules/` have been
migrated to Bazel, we can remove the legacy e2e tests job.

PR Close #28645
2019-02-13 12:15:02 -08:00
Paul Gschwendtner fb194d5146 build: update instructions to run benchmark tests (#28645)
* Updates the instructions on how to run the benchmark tests.
* Removes the unused `favicon.ico` file and the corresponding Bazel filegroup

PR Close #28645
2019-02-13 12:15:01 -08:00
Paul Gschwendtner 0a4811c4ad build: convert largeform benchmarks to bazel (#28645)
Switches the `largeform` benchmarks to Bazel.
This is the last remaining e2e test within `modules/`.

PR Close #28645
2019-02-13 12:15:01 -08:00
Paul Gschwendtner 13685131bc build: run largetable benchmark tests with bazel (#28645)
PR Close #28645
2019-02-13 12:15:01 -08:00
Paul Gschwendtner 1a326d5690 build: serve largetable benchmark tests with bazel (#28645)
PR Close #28645
2019-02-13 12:15:01 -08:00
Paul Gschwendtner cf6d63ca63 build: fix web_worker images example not working (#28562)
The web_worker images example is currently not really usable
because the rendered button that can be used to upload
an "image" to the demo is currently not working. This is because
the HTML markup for the `file-field` is not matching what `materialize-css`
expects. See: https://materializecss.com/text-inputs.html

PR Close #28562
2019-02-13 12:01:54 -08:00
Paul Gschwendtner 1d20088291 build: playground examples do not explicitly specify "ng_module" assets (#28562)
Currently all playground examples are built with NGC, and most
of the HTML resources are automatically inlined. Surprisingly NGC
is able to resolve the relative component assets even though these
aren't specified in the `assets`. This seems to work because NGC
resolves the files in the execroot where the files are present
(if Bazel doesn't use sandboxing).

Issue is tracked with TOOL-667

PR Close #28562
2019-02-13 12:01:54 -08:00
Paul Gschwendtner 7e895b9179 build: fix web_worker playground examples using external resources (#28562)
The `web_workers/images` example is not being tested by any e2e
spec and therefore it's technically not necessary to fix that it uses
external resources, though in order to ensure that the Bazel builds
are hermetic and that we can eventually add e2e specs for the
web_worker/image example, we should avoid any use of external
resources.

We remove the `web-animations` polyfill in the `web_workers/animations`
example because we should try to vendor as few as possible deps. Also
the animations API is already supported by browsers we run the e2e tests
against (note here: `web_workers/animations` is currently also disabled)

PR Close #28562
2019-02-13 12:01:54 -08:00
Paul Gschwendtner 7115e7c427 build: remove outdated polymer tree benchmark (#28568)
The "tree/polymer_leaves" benchmark has no benchmark tests, nor do we install
Polymer anywhere. Polymer was previously installed through `bower`, but since
we removed bower, there is no easy way to run this benchmark with Polymer.

Considering that there are no benchmark tests, nor we have an easy way to
install/vendor Polymer, we should just remove this benchmark app.

This is also based on the assumption that we want to remove the
Polymer benchmarks anyway: see: 8a05199fb9

PR Close #28568
2019-02-08 13:37:36 -08:00
Paul Gschwendtner aadc332be2 build: run tree benchmark tests with bazel (#28568)
PR Close #28568
2019-02-08 13:37:36 -08:00
Paul Gschwendtner c916b360bf build: serve benchmark tree examples with bazel (#28568)
PR Close #28568
2019-02-08 13:37:36 -08:00
Kara Erickson fb9a4a668c fix(ivy): support web worker nodes in unknown property checks (#28610)
We need to support rendering in contexts like web workers where
nodes are emulated and properties may not be set directly. This
commit gates property validation checks to environments that have
real Node objects.

FW-1043 #resolve

PR Close #28610
2019-02-08 13:35:29 -08:00
Miško Hevery b65fe62be1 build: fix master by dissabling broken test (#28608)
PR Close #28608
2019-02-07 16:24:01 -08:00
Marc Laval 0e6f799aec test(ivy): update e2e tests to use Renderer2 instead of Renderer (#28558)
PR Close #28558
2019-02-06 14:34:49 -05:00
Alex Eagle 6709db9677 build: switch to typescript's es2015 typings (#28570)
Note that this allows Angular to depend on the entirety of the ES2015 API, not just our restricted subset.
This change is needed because our copy of the subset was out-of-date, and prevents us using ES2015 target in dev mode.

This is a subset of #27738

PR Close #28570
2019-02-06 14:17:55 -05:00
Marc Laval 43081a01d8 fix(ivy): WorkerAppModule should be an APP_ROOT (#28544)
PR Close #28544
2019-02-06 14:05:53 -05:00
Marc Laval 2ea4f690e4 test(ivy): add root cause for failing hello world e2e tests (#28540)
PR Close #28540
2019-02-05 23:32:55 -05:00
Matias Niemelä fe4d811086 revert: build: switch to typescript's es2015 typings (#28134)
This reverts commit dde7e2f253.
2019-02-05 18:07:10 -05:00
Alex Eagle dde7e2f253 build: switch to typescript's es2015 typings (#28134)
Note that this allows Angular to depend on the entirety of the ES2015 API, not just our restricted subset.
This change is needed because our copy of the subset was out-of-date, and prevents us using ES2015 target in dev mode.

This is a subset of https://github.com/angular/angular/pull/27738

PR Close #28134
2019-02-05 14:25:10 -05:00
Paul Gschwendtner 3c7fdc6a9e build: fix routing playground example using external resource (#28490)
Currently the "routing" playground example fails the e2e tests
because it tries to load the OpenSans font using an external
HTTP request. External http requests are not allowed (unless
explicitly enabled) within Bazel in order to ensure that
all targets are built and tested in a hermetic way.

In order to work around this issue in a Bazel idiomatic way,
we just vendor the fonts in the "third_party" folder. Note
that we can technically also enable internet for the RBE
host platform, but it's not a best practice for hermeticity.

The following syntax would allow us to enable internet for
RBE (stated here for tracking)

```
properties: {
  name: "dockerNetwork"
  value: "standard"
}
```

PR Close #28490
2019-02-04 16:51:11 -05:00
Paul Gschwendtner 5cdbdc9ee0 build: disable failing ivy playground example e2e tests (#28490)
With ed1ba88ffd9d0fc266808413fa517e7a31943bc8 we switched the
examples to run with Bazel. This means that we can now also run the
e2e tests for these examples against Ivy. All playground e2e tests,
**except** the `web_worker` examples, successfully run with Ivy.

The failing webworker e2e tests have been temporarily disabled with
`fixmeIvy` and need to be investigated in a follow-up.

PR Close #28490
2019-02-04 16:51:11 -05:00
Paul Gschwendtner 16a78f97f5 build: re-enable upgrade playground example (#28490)
The `upgrade` playground example has been disabled for a
long time because Protractor initially didn't support running
hybrid apps. Now that we use a more recent version of Protractor
that handles hybrid apps (also automatically), we can re-enable
this long-standing disabled test.

Additionally the e2e test logic was outdated and failed because a
CSS selector did not match the template of the upgrade example.
With this change, the CSS selector has been updated to match the
example's template, and also the test has been updated slightly
to also ensure that content projection works.

PR Close #28490
2019-02-04 16:51:11 -05:00
Paul Gschwendtner ee74835619 build: run playground e2e examples with bazel (#28490)
PR Close #28490
2019-02-04 16:51:11 -05:00
Paul Gschwendtner 5a257d02a6 build: fix "person_management" playground example (#28490)
Currently when someone serves the "person_management" playground
example, there will be runtime exceptions by `@angular/forms` if
someone clicks on one of the two buttons rendered in the example.

This happens because the example is outdated and the input elements
using `ngModel` do not specify a proper "name" while being inside of
a `<form>` element. A name is required inside of a form. The failure
is not specific to Ivy and is not covered by any test because the e2e
tests for this example are just asserting that the page properly loads
(the error only shows up one of the buttons has been clicked)

This is the reason why these errors were never visibile to the e2e tests.
Though in order to make this example work, we should this fix these failures
so that the example can work as expected.

```
FullNameComponent.html:7 ERROR Error: If ngModel is used within a form tag, either the name attribute must be set or the form
      control must be defined as 'standalone' in ngModelOptions.

      Example 1: <input [(ngModel)]="person.firstName" name="first">
      Example 2: <input [(ngModel)]="person.firstName" [ngModelOptions]="{standalone: true}">
    at Function.TemplateDrivenErrors.missingNameException (template_driven_errors.ts:40)
    at NgModel._checkName (ng_model.ts:319)
    at NgModel._checkForErrors (ng_model.ts:302)
    at NgModel.ngOnChanges (ng_model.ts:215)
    at Object.checkAndUpdateDirectiveInline (provider.ts:208)
    at checkAndUpdateNodeInline (view.ts:429)
    at checkAndUpdateNode (view.ts:389)
    at debugCheckAndUpdateNode (services.ts:431)
    at debugCheckDirectivesFn (services.ts:392)
    at Object.eval [as updateDirectives] (FullNameComponent.html:7)
```

PR Close #28490
2019-02-04 16:51:11 -05:00
Paul Gschwendtner e4fb93c28a build: switch playground examples to bazel (#28490)
Currently all playground examples are built with `tsc`
and served with the `gulp serve` task. In order to be able
to test these examples easily with Ivy, we now build and
serve the examples using Bazel. This allows us to expand our
Ivy test coverage and additionally it allows us to move forward
with the overall Bazel migration. Building & serving individual
examples is now very easy and doesn't involve building everything
inside of `/modules`.

PR Close #28490
2019-02-04 16:51:11 -05:00
Paul Gschwendtner b7738ef9e4 build: fix bazel protractor tests not capturing console output (#28490)
Currently we depend on the "rules_webtesting" version that is
installed by "rules_typescript//:package.bzl". This version of
the webtesting rules comes with a very old version of Chromium
and the `chromedriver` that does not support capturing console
errors properly (with stack traces). Since we have a few e2e
tests that depend on console output (e.g. playground/src/source-map),
we need to make sure that these tests can pass upon Bazel
migration.

PR Close #28490
2019-02-04 16:51:11 -05:00
Daniel Ruf d4ecffe475 refactor: remove obsolete font-smoothing property (#28174)
PR Close #28174
2019-01-23 15:44:35 -08:00
Paul Gschwendtner 31fdff7121 build: re-enable disabled e2e tests (#27979)
Re-enables a few e2e tests which have been disabled a long time ago. Since these pass now, we should re-enable them.

PR Close #27979
2019-01-09 10:41:16 -08:00