Commit Graph

1174 Commits

Author SHA1 Message Date
Adrien Boullé 020338230f style: fix typos boostrap to bootstrap (#21917)
PR Close #21917
2018-02-15 09:54:00 -08:00
Victor Berchet a1d86daa71 refactor(ivy): assertion (#22189)
Encourage the use of message to explain the assertion

PR Close #22189
2018-02-15 09:53:05 -08:00
Matias Niemelä 831592c381 Revert "style: fix typos boostrap to bootstrap (#21917)"
This reverts commit 363498b6b4.
2018-02-14 22:56:44 -05:00
Matias Niemelä f628797d91 Revert "refactor(ivy): assertion (#22189)"
This reverts commit 0b683123d2.
2018-02-14 22:56:11 -05:00
Victor Berchet 0b683123d2 refactor(ivy): assertion (#22189)
Encourage the use of message to explain the assertion

PR Close #22189
2018-02-14 18:42:04 -05:00
Adrien Boullé 363498b6b4 style: fix typos boostrap to bootstrap (#21917)
PR Close #21917
2018-02-14 18:21:52 -05:00
JiaLi.Passion 1d571b299d feat(platform-browser): fix #19604, can config hammerOptions (#21979)
PR Close #21979
2018-02-14 15:02:58 -05:00
Kara Erickson a589ca0adb test(ivy): clean up canonical spec (#22188)
PR Close #22188
2018-02-13 13:04:43 -08:00
Trotyl 72f8abd7b3 fix(compiler): make unary plus operator consistent to JavaScript (#22154)
fixes #22089

PR Close #22154
2018-02-13 13:04:30 -08:00
Miško Hevery 20a900b648 test: Add bundle symbol extractor tool (#22002)
This tool will be used for extracting symbols out of bundles so that
we can assert that only whitelisted symbols are allowed.

PR Close #22002
2018-02-13 11:28:54 -08:00
adasilva 6435ecd3c6 fix(platform-browser): support 0/false/null values in transfer_state (#22179)
Issue #22178

PR Close #22179
2018-02-13 11:28:22 -08:00
guillaumebarranco 16d1700a8e fix(core): add stacktrace in log when error during cleanup component in TestBed (#22162)
PR Close #22162
2018-02-13 11:28:08 -08:00
Kara 5e4af7c550 fix(ivy): o2+ should work with multiple template instances (#22075)
Closes #22075
2018-02-13 10:24:41 -08:00
Chuck Jazdzewski be59c3a98c fix(common): weaken AsyncPipe transform signature (#22169)
The AsyncPipe type signature was changed to allow
deferred creation of promises and observalbes that
is supported by the implementation by allowing
`Promise<T>|null|undefined` and by allowing
`Observable<T>|null|undefined`.

PR Close #22169
2018-02-12 15:57:29 -08:00
Chuck Jazdzewski b333919722 build(bazel): allow ng_modules to elide .ngsummary.closure.js files (#22107)
PR Close #22107
2018-02-12 15:57:17 -08:00
Alex Rickabaugh 235a235fab feat: change @Injectable() to support tree-shakeable tokens (#22005)
This commit bundles 3 important changes, with the goal of enabling tree-shaking
of services which are never injected. Ordinarily, this tree-shaking is prevented
by the existence of a hard dependency on the service by the module in which it
is declared.

Firstly, @Injectable() is modified to accept a 'scope' parameter, which points
to an @NgModule(). This reverses the dependency edge, permitting the module to
not depend on the service which it "provides".

Secondly, the runtime is modified to understand the new relationship created
above. When a module receives a request to inject a token, and cannot find that
token in its list of providers, it will then look at the token for a special
ngInjectableDef field which indicates which module the token is scoped to. If
that module happens to be in the injector, it will behave as if the token
itself was in the injector to begin with.

Thirdly, the compiler is modified to read the @Injectable() metadata and to
generate the special ngInjectableDef field as part of TS compilation, using the
PartialModules system.

Additionally, this commit adds several unit and integration tests of various
flavors to test this change.

PR Close #22005
2018-02-12 14:34:59 -08:00
Alex Rickabaugh 2d5e7d1b52 feat(compiler): mark @NgModules in provider lists for identification at runtime (#22005)
All of the providers in a module get compiled into a module definition in the
factory file. Some of these providers are for the actual module types, as those
are available for injection in Angular. For tree-shakeable tokens, the runtime
needs to be able to distinguish which modules are present in an injector.

This change adds a NodeFlag which tags those module providers for later
identification.

PR Close #22005
2018-02-12 14:34:59 -08:00
Alex Rickabaugh 647b8595d0 build: update some ts_library rules to ng_module (#22005)
This is needed so the rules produce metadata.json files, which is essential
for building compiler/integration tests with Bazel.

PR Close #22005
2018-02-12 14:34:59 -08:00
Alex Rickabaugh 0a1a397cd7 fix(platform-browser): add @Injectable where it was missing (#22005)
PR Close #22005
2018-02-12 14:34:59 -08:00
Victor Berchet 62e7b9da1e refactor(ivy): code simplification (#22082)
PR Close #22082
2018-02-12 10:00:56 -08:00
Victor Berchet 61341b2791 refactor(ivy): generatePropertyAliases (#22082)
PR Close #22082
2018-02-12 10:00:56 -08:00
Dan Bucholtz 92a5876f51 refactor(router): move activation to private method (#22033)
PR Close #22033
2018-02-12 10:00:36 -08:00
Misko Hevery 92d7060cb0 Revert "build(bazel): allow ng_modules to elide .ngsummary.closure.js files (#22107)"
This reverts commit 263a2eca88.
2018-02-09 20:08:41 -08:00
Alex Eagle 7e9b120452 build: update to latest bazel rules (#22127)
PR Close #22127
2018-02-09 17:21:54 -08:00
Alex Eagle b081dfe705 fix(bazel): allow TS to read ambient typings (#21876)
Same fix as e70d7a2a7c
This is because the CompilerOptions needs to have directoryExists undefined in order to get the google3 behavior,
so we have to set the property outside the constructor.

Fixes #21872

PR Close #21876
2018-02-09 17:16:25 -08:00
Chuck Jazdzewski 263a2eca88 build(bazel): allow ng_modules to elide .ngsummary.closure.js files (#22107)
PR Close #22107
2018-02-09 16:07:49 -08:00
Olivier Combe 44154e71fd fix(common): round currencies based on decimal digits in `CurrencyPipe` (#21783)
By default, we now round currencies based on the number of decimal digits available for that currency instead of using the rouding defined in the number formats.
More info about that can be found in http://www.unicode.org/cldr/charts/latest/supplemental/detailed_territory_currency_information.html#format_info

Fixes #10189

PR Close #21783
2018-02-09 14:42:23 -08:00
Olivier Combe 0b2f7d13d0 fix(common): regenerate i18n locale data files (#21783)
PR Close #21783
2018-02-09 14:42:23 -08:00
Olivier Combe 420cc7afc6 fix(common): add locale currency values (#21783)
we now use locale currency symbols, since they may be different in each locale (we were only using english data previously)

Fixes #20385

PR Close #21783
2018-02-09 14:42:23 -08:00
Chuck Jazdzewski aa456edafc refactor(ivy): validate that identifier identity in emitted output (#21877)
Modifies validation syntax to generate back references to ensure
that identifiers are used consistently.

Introduced … to allow validating constant definition and usage.

PR Close #21877
2018-02-09 13:06:10 -08:00
Pete Bacon Darwin 7007f51c35 feat(aio): first pass API docs redesign (#21874)
Includes:

* display ToC for API docs
* update dgeni-packages to 0.24.1
* add floating sidebar in API docs
* add breadcrumbs and structured data for Google crawler
* improved rendering of method overloads
* properties rendered in a table
* params rendered with docs
* removal of outdated "infobox" from all API docs

PR Close #21874
2018-02-09 13:05:16 -08:00
Miško Hevery cf8d512e43 Revert "fix(forms): set state before emitting a value from ngModelChange (#21514)"
This reverts commit 9744a1c966.
2018-02-09 10:11:23 -08:00
Miško Hevery 0b1f5d2127 Revert "docs(common): add `HttpParamsOptions` to the public API (#20332)"
This reverts commit a9545aba4d.
2018-02-08 14:37:27 -08:00
Alex Eagle dcf64a0d01 fix(bazel): improve error message for missing assets (#22096)
fixes #22095

PR Close #22096
2018-02-08 10:01:27 -08:00
George Kalpakas a9545aba4d docs(common): add `HttpParamsOptions` to the public API (#20332)
Fixes #20276

PR Close #20332
2018-02-08 09:44:36 -08:00
Kara Erickson d9ae70c699 test(ivy): normalize template names in canonical spec (#21815)
PR Close #21815
2018-02-08 08:55:40 -08:00
Peter Bacon Darwin a751649c8d fix(core): use appropriate inert document strategy for Firefox & Safari (#17019)
Both Firefox and Safari are vulnerable to XSS if we use an inert document
created via `document.implementation.createHTMLDocument()`.

Now we check for those vulnerabilities and then use a DOMParser or XHR
strategy if needed.

Further the platform-server has its own library for parsing HTML, so we
sniff for that (by checking whether DOMParser exists) and fall back to
the standard strategy.

Thanks to @cure53 for the heads up on this issue.

PR Close #17019
2018-02-08 08:55:15 -08:00
Victor Berchet 3f5a3d6ea1 refactor(ivy): add internal `isProceduralRenderer()` (#22055)
PR Close #22055
2018-02-07 17:03:25 -08:00
Victor Berchet 10a014d89e refactor(ivy): prefix viewStart & viewEnd with embedded (#22055)
PR Close #22055
2018-02-07 17:03:25 -08:00
Victor Berchet 8feb8e5408 refactor(ivy): use long instruction format in tests (#22055)
PR Close #22055
2018-02-07 17:03:25 -08:00
Victor Berchet 16dada28f5 docs(ivy): Simplify & dedup API docs for canInsertNativeNode (#22055)
PR Close #22055
2018-02-07 17:03:25 -08:00
Alex Eagle 16e5b866d2 test(ivy): also track the size of the compressed hello world bundle (#22056)
PR Close #22056
2018-02-07 16:10:00 -08:00
Kara Erickson b58c3527e9 test(ivy): add canonical spec for object literals (#22045)
PR Close #22045
2018-02-07 12:10:16 -08:00
Miško Hevery efc67ee5ef fix(ivy): make pipe invocation locality neutral (#22030)
PR Close #22030
2018-02-07 12:09:56 -08:00
Chuck Jazdzewski e442881ead feat(bazel): allow explicit specification of factories (#22003)
The `ng_module` rule now has a factories attribute that
allows explicit specification of which files are expected
to generate factories. This allows avoiding generating
empty factory files (such as `.ngfactory.js`) begin
generated which might cause down-stream tools issues if
they have a limit on the number of files that can be
processed in a single bazel action.

PR Close #22003
2018-02-07 12:09:21 -08:00
Emilio e56de1025a fix(core): ensure initial value of QueryList length (#21980) (#21982)
Set initial value of `length` to `0`.

Fixes regression introduced by e544742156 (diff-a85dbe0991a7577ea24b49374e9ae90b) where the `length` property ceased to have initial value.

Closes #21980

PR Close #21982
2018-02-07 12:08:44 -08:00
Olivier Combe 64ae6d206e test(common): disable deprecated date pipe tests on chrome mobile (#21933)
Closes #21907
PR Close #21933
2018-02-07 12:07:31 -08:00
Oussama Ben Brahim 54a14312d1 test(forms): update test name with correct wording (#21833)
Use the term primitive value instead of standalone

Fixes #21831

PR Close #21833
2018-02-07 12:07:14 -08:00
George Kalpakas 8f6047340e docs(animations): fix typo (disbled --> disabled) (#21695)
PR Close #21695
2018-02-07 12:06:45 -08:00
Philip Pham 9744a1c966 fix(forms): set state before emitting a value from ngModelChange (#21514)
Closes #21513.

PR Close #21514
2018-02-07 12:05:43 -08:00