264 Commits

Author SHA1 Message Date
Igor Minar
7fdc24db72 test: remove obsolete typings tests ()
we no longer support typescript 2.4, 2.5, and 2.6

PR Close 
2018-03-30 13:07:03 -07:00
Veres Lajos
de90314304 style: typos fixed - https://github.com/vlajos/misspell-fixer ()
PR Close 
2018-03-27 14:51:53 -04:00
Alex Eagle
4f0cae0676 build: allow bazel build //... ()
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 
2018-03-23 15:02:32 -05:00
Igor Minar
3cc5c2e4d0 build: update to rxjs@6.0.0-beta.0 ()
PR Close 
2018-03-20 15:26:49 -07:00
Igor Minar
b43f8bc7d3 feat(core): upgrade rxjs to 6.0.0-alpha.4 ()
PR Close 
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 ()
PR Close 
2018-03-19 21:51:51 -07:00
Igor Minar
ce63dc6f95 feat: update the package output of build.sh to APF v6 ()
PR Close 
2018-03-18 09:33:51 -07:00
Igor Minar
912fe08756 test: improve ng build flags for cli-hello-world ()
Remove unnecessary --build-optimizer flag and add --sourcemaps flag to
generate source maps for better debugging.

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

PR Close 
2018-03-18 09:33:51 -07:00
Alex Rickabaugh
6ef9f2278f feat(ivy): @NgModule -> ngInjectorDef compilation ()
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 
2018-03-16 12:57:11 -07:00
Alex Eagle
88b3198c80 feat(bazel): change ng_package rule to APF v6 ()
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 
2018-03-15 11:38:31 -07:00
Hans Larsen
f256c02b5e build: fix build.sh for package group and add a test ()
PR Close 
2018-03-15 11:34:46 -07:00
Alex Rickabaugh
db56836425 feat: tree-shakeable providers API updates ()
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 
2018-03-13 09:28:05 -07:00
Chuck Jazdzewski
8449eb8d62 build: upgrade to TypeScript 2.7 ()
Fixes: 

PR Close 
2018-03-12 09:27:23 -07:00
Alex Eagle
4c40812b71 fix(bazel): fixes for ng_package on Windows ()
PR Close 
2018-03-06 07:52:48 -08:00
Alex Eagle
ba8df8a3f1 build: update to latest bazel rules ()
PR Close 
2018-03-02 13:27:25 -08:00
Alex Eagle
b43b164a61 feat(bazel): add an ng_package rule ()
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 
2018-02-23 11:19:04 -08:00
Alex Eagle
a81d599bfc ci: don't use bazel git_repository rule ()
It's currently broken on CircleCI because of a TLS change made by GitHub.
This is okay as a permanent change, we don't really want bazel to fetch a full git history.

Fixes 

PR Close 
2018-02-23 09:41:10 -08:00
Martin Probst
ca06af40f4 build: allow passing node options to ngc. ()
PR Close 
2018-02-22 10:20:04 -08:00
Alex Rickabaugh
f755db78dc fix(core): require factory to be provided for shakeable InjectionToken ()
InjectionToken can be created with an ngInjectableDef, and previously
this allowed the full expressiveness of @Injectable. However, this
requires a runtime reflection system in order to generate factories
from expressed provider declarations.

Instead, this change requires scoped InjectionTokens to provide the
factory directly (likely using inject() for the arguments), bypassing
the need for a reflection system.

Fixes 

PR Close 
2018-02-15 16:16:16 -08:00
Marc Laval
2de0d4c1db perf(ivy): use official build optimizer rollup plugin in int test ()
PR Close 
2018-02-13 10:25:37 -08:00
Alex Rickabaugh
235a235fab feat: change @Injectable() to support tree-shakeable tokens ()
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 
2018-02-12 14:34:59 -08:00
Alex Eagle
7e9b120452 build: update to latest bazel rules ()
PR Close 
2018-02-09 17:21:54 -08:00
Alex Eagle
b081dfe705 fix(bazel): allow TS to read ambient typings ()
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 

PR Close 
2018-02-09 17:16:25 -08:00
Peter Bacon Darwin
a751649c8d fix(core): use appropriate inert document strategy for Firefox & Safari ()
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 
2018-02-08 08:55:15 -08:00
Marc Laval
7e51e52f55 perf(ivy): improve Uglify configuration in hello world integration test ()
PR Close 
2018-02-06 08:01:18 -08:00
Kara Erickson
3db75b3f64 test(ivy): temp disable payload limit tests ()
PR Close 
2018-01-31 11:50:18 -08:00
Chuck Jazdzewski
ccd0298ec9 ci(ivy): enable size tracking of a minimal cli render3 application ()
PR Close 
2018-01-31 10:21:33 -08:00
Kara Erickson
9dca5f2743 refactor(ivy): save check methods separately () ()
PR Close 

PR Close 
2018-01-31 10:19:34 -08:00
Marc Laval
dd48df105b perf(ivy): use buildOptimizer in hello_world__render3__rollup integration test ()
PR Close 
2018-01-29 11:35:51 -08:00
Alex Eagle
a1cc02f0bd build: update to latest bazel rules ()
PR Close 
2018-01-27 10:55:44 -08:00
David-Emmanuel Divernois
1278cca883 perf(ivy): removes generation of comments ()
PR Close 
2018-01-27 10:48:39 -08:00
Alex Eagle
08aa54e1d9 ci: Add back the CLI integration test with pinning ()
The CLI app is now checked in, rather than generated dynamically with
`ng new`. This loses some assertion power, but gains hermeticity.
It also checks in lock files for all integration tests, avoiding
floating version numbers.

We'll need another place to integration test between changes in
the various repositories - but the angular/angular PR-blocking status
is not the right place to do this.

PR Close 
2018-01-25 22:18:55 -08:00
Filipe Silva
fac4d8d42a build(common): specify explicit locales dir in package.json ()
PR Close 
2018-01-25 22:18:35 -08:00
Kara Erickson
3e03dbe576 refactor(ivy): flatten hooks and collapse LView hook properties ()
PR Close 
2018-01-24 22:14:33 -08:00
Kara Erickson
33b338120c refactor(ivy): move onDestroys out of cleanup ()
PR Close 
2018-01-24 22:14:33 -08:00
Alex Rickabaugh
0ad02de47e feat(ivy): support for the ngForOf directive, with tests ()
Implement NgOnChangesFeature, ViewContainerRef, TemplateRef,
and the renderEmbeddedTemplate instruction, and wire together the
pieces required for the ngForOf directive to work.

PR Close 
2018-01-23 12:54:39 -08:00
Alex Eagle
95fbb7d675 build: Update to latest rules_typescript. ()
Fixes 

PR Close 
2018-01-22 15:32:59 -08:00
Yuan Gao
d39d1ce412 ci(aio): do not limit size of gzip7 and gzip 9 ()
PR Close 
2018-01-19 20:39:42 -08:00
Marc Laval
a0dc0a2f46 test(ivy): add render3 integration tests ()
PR Close 
2018-01-19 15:23:52 -08:00
Alex Eagle
1104d17252 refactor(bazel): pass around tsconfig as a file, not a path ()
this unlocks the ability to replay ts compilations with different settings

PR Close 
2018-01-19 11:53:59 -08:00
Alex Eagle
7c414fc746 ci: disable integration/cli-hello-world test ()
it is non-hermetic and breaks often due to unpinned dependencies.

PR Close 
2018-01-12 14:58:00 -08:00
Kara Erickson
c6eb9eebcc build: update polyfill size ()
PR Close 
2018-01-10 17:06:51 -08:00
Kara Erickson
74dbf7bad5 build(core): reduce payload limit back to normal ()
PR Close 
2018-01-08 12:02:30 -08:00
Igor Minar
7269fe5203 ci: reformat itegration/_payload-limits.json to be easier to read ()
PR Close 
2018-01-08 11:12:54 -08:00
Kara Erickson
2fc4cf67be build(core): update payload size of hello world ()
PR Close 
2018-01-05 14:23:28 -08:00
Chuck Jazdzewski
83d207d0a7 build: upgrade to TypeScript 2.6 ()
Fixes 

PR Close 
2017-12-22 20:15:47 -08:00
George Kalpakas
81d497ce1f build: pin ChromeDriver version ()
Since our version of Chromium is also pinned, a new ChromeDriver (that
drops support for our Chromium version) can cause random (and unrelated
to the corresponding changes) errors on CI.
This commit pins the version of ChromeDriver and it should now be
manually upgraded to a vrsion that is compatible with th currently used
Chromium version.

PR Close 
2017-12-11 15:53:04 -08:00
Alex Eagle
ef534c0cc1 build: upgrade bazel rules to latest ()
Add enough BUILD files to make it possible to
`bazel build packages/core/test`

Also re-format BUILD.bazel files with Buildifier.
Add a CI lint check that they stay formatted.

PR Close 
2017-12-07 11:27:50 -08:00
Alex Eagle
6790e02a13 ci: upgrade to node 8 and Bazel 0.8 ()
Closes 

PR Close 
2017-12-06 06:58:33 -08:00