Commit Graph

1523 Commits

Author SHA1 Message Date
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
Judy Bogart a577c9e1f4 docs: edit api doc comments for new template and style (#23682)
PR Close #23682
2018-06-13 13:31:10 -07:00
Fabian Wiles 52ce9d5dcb feat(core): KeyValueDiffer#diff allows null values (#24319)
PR Close #24319
2018-06-13 13:30:49 -07:00
Fabian Wiles 2b49bf77af feat(common): introduce KeyValuePipe (#24319)
PR Close #24319
2018-06-13 13:30:49 -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
Victor Savkin 49c5234c68 feat(router): implement scrolling restoration service (#20030)
For documentation, see `RouterModule.scrollPositionRestoration`

Fixes #13636 #10929 #7791 #6595

PR Close #20030
2018-06-08 15:30:52 -07:00
Alex Rickabaugh bd02b27ee1 feat(core): expose a Compiler API for accessing module ids from NgModule types (#24258)
This will allow RouterTestingModule to better support lazy loading of modules
when using summaries, since it can detect whether a module is already loaded
if it can access the id.

PR Close #24258
2018-06-07 16:19:08 -04:00
Jason Aden e3759f7a73 feat(ivy): add support of ApplicationRef.bootstrapModuleFactory (#23811)
PR Close #23811
2018-06-07 16:15:26 -04:00
Victor Berchet c494d3cf60
Revert "feat(ivy): add support of ApplicationRef.bootstrapModuleFactory (#23811)"
This reverts commit 22b58a717a.
This commit causes a breakage in g3.
2018-06-05 22:11:47 -07:00
Jason Aden 22b58a717a feat(ivy): add support of ApplicationRef.bootstrapModuleFactory (#23811)
PR Close #23811
2018-06-05 20:10:25 -07:00
Victor Berchet 83a06863f9 docs: rename the "aio" component to "docs-infra" (#24295)
The legacy "aio" is still active for currently pending PRs,
The GH label has been renamed as well

PR Close #24295
2018-06-04 17:25:13 -07:00
Miško Hevery 08a18b82de refactor(common): Remove ngOnChanges from NgForOf (#23378)
`NgForOf` used to implement `OnChanges` and than use
`ngOnChanges` callback to detect when `ngForOf` binding
changed to update the differ. We now do the checking
manually which puts less pressure on the runtime to do
the bookkeeping and should result in minor perf improvement.

PR Close #23378
2018-06-04 13:24:43 -07:00
Jeremy Elbourn 24e5c5b425 refactor(platform-browser): make HAMMER_LOADER non-nullable (#24077)
PR Close #24077
2018-05-30 11:25:32 -07:00
cexbrayat 41cd8f3efb refactor(core): use Partial<T> for MetadataOverride (#24103)
Allows to write:

const fixture = TestBed
      .overridePipe(DisplayNamePipe, { set: { pure: false } })
      .createComponent(MenuComponent);

when you only want to set the `pure` metadata,
instead of currently:

const fixture = TestBed
      .overridePipe(DisplayNamePipe, { set: { name: 'displayName', pure: false } })
      .createComponent(MenuComponent);

which forces you to redefine the name of the pipe even if it is useless.

Fixes #24102

PR Close #24103
2018-05-29 18:40:05 -04:00
Alex Rickabaugh 1eafd04eb3 build(ivy): support alternate compilation modes to enable Ivy testing (#24056)
Bazel has a restriction that a single output (eg. a compiled version of
//packages/common) can only be produced by a single rule. This precludes
the Angular repo from having multiple rules that build the same code. And
the complexity of having a single rule produce multiple outputs (eg. an
ngc-compiled version of //packages/common and an Ivy-enabled version) is
too high.

Additionally, the Angular repo has lots of existing tests which could be
executed as-is under Ivy. Such testing is very valuable, and it would be
nice to share not only the code, but the dependency graph / build config
as well.

Thus, this change introduces a --define flag 'compile' with three potential
values. When --define=compile=X is set, the entire build system runs in a
particular mode - the behavior of all existing targets is controlled by
the flag. This allows us to reuse our entire build structure for testing
in a variety of different manners. The flag has three possible settings:

* legacy (the default): the traditional View Engine (ngc) build
* local: runs the prototype ngtsc compiler, which does not rely on global
  analysis
* jit: runs ngtsc in a mode which executes tsickle, but excludes the
  Angular related transforms, which approximates the behavior of plain
  tsc. This allows the main packages such as common to be tested with
  the JIT compiler.

Additionally, the ivy_ng_module() rule still exists and runs ngc in a mode
where Ivy-compiled output is produced from global analysis information, as
a stopgap while ngtsc is being developed.

PR Close #24056
2018-05-29 18:02:29 -04:00
Jeremy Elbourn 26fbf1d13c feat(platform-browser): add HammerJS lazy-loader symbols to public API (#23943)
PR Close #23943
2018-05-22 13:41:16 -04:00
Miško Hevery 1b6b936ef4 test(ivy): Add bazel flag to control building ViewEngine or Ivy (#23833)
PR Close #23833
2018-05-21 19:13:50 -04:00
Alex Eagle 43597279d6 test: don't run unit tests on Firefox (#23942)
PR Close #23942
2018-05-16 17:19:45 -04:00
George Kalpakas 1d378e2987 fix(service-worker): deprecate `versionedFiles` in asset-group resources (#23584)
Since `versionedFiles` behaves in the exact same way as `files`, there
is no reaason to have both. Users should use `files` instead.

This commit deprecates the property and prints a warning when coming
across an asset-group that uses it. It should be completely removed in
a future version.

Note, it has also been removed from the default `ngsw-config.json`
template in angular/devkit#754.

PR Close #23584
2018-05-15 12:19:08 -07:00
Alex Eagle 017d67cdf8 test: switch to ts_web_test_suite (#23859)
Unit tests now run on Firefox too

PR Close #23859
2018-05-15 11:40:56 -07:00
Greg Magolan 66b2d78305 build: only match version tags for BUILD_SCM_VERSION (#23903)
PR Close #23903
2018-05-14 12:44:26 -07:00
Igor Minar 77ff72f93b Revert "style(animations): fix short param names (#23668)"
This reverts commit e3518967ad.

This PR accidentaly introduces a breaking change:
https://github.com/angular/angular/pull/23668#discussion_r186265055
2018-05-05 08:36:49 -07:00
Pete Bacon Darwin e3518967ad style(animations): fix short param names (#23668)
PR Close #23668
2018-05-05 08:17:02 -07:00
Alex Eagle e3e15773ee build: update bazel to 0.13 (#23623)
PR Close #23623
2018-05-04 15:23:55 -07:00
Igor Minar 5b96078624 Revert "refactor(core): tree-shake application_module providers (#23477)"
This reverts commit eb031c6ff1.

The change is breaking targets in g3 see cl/194336387.
2018-04-26 14:08:13 -07:00
Matias Niemelä eb031c6ff1 refactor(core): tree-shake application_module providers (#23477)
PR Close #23477
2018-04-25 15:51:51 -07:00
Alex Eagle b4c252bcc5 build: serve ivy todo app with real http-server (#23446)
PR Close #23446
2018-04-25 15:51:18 -07:00
Alex Rickabaugh ab5bc42da0 feat(ivy): first steps towards ngtsc mode (#23455)
This commit adds a new compiler pipeline that isn't dependent on global
analysis, referred to as 'ngtsc'. This new compiler is accessed by
running ngc with "enableIvy" set to "ngtsc". It reuses the same initialization
logic but creates a new implementation of Program which does not perform the
global-level analysis that AngularCompilerProgram does. It will be the
foundation for the production Ivy compiler.

PR Close #23455
2018-04-25 13:25:33 -07:00
Victor Berchet a35bf114eb build: make commit validation accept typical Revert messages (#23480)
fixes #23479

PR Close #23480
2018-04-22 11:49:49 -07:00
Igor Minar 0468a649af build: remove a postinstall-patch to fix rxjs (#23234)
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
Misko Hevery b64a276d4b refactor(ivy): make return value of define(Component|Directive|Pipe|Injector|Injectable) private (#23371) (#23383)
Ivy definition looks something like this:

```
class MyService {
  static ngInjectableDef = defineInjectable({
    …
  });
}
```

Here the argument to `defineInjectable` is well known public contract which needs
to be honored in backward compatible way between versions. The type of the
return value of `defineInjectable` on the other hand is private and can change
shape drastically between versions without effecting backwards compatibility of
libraries publish to NPM. To our users it is effectively an opaque token.
For this reson why declare the return value of `defineInjectable` as `never`.

PR Close #23383
2018-04-14 20:40:14 -07:00
Igor Minar 815ae29b83 build: add '@angular/elements' the framework package group 2018-04-14 03:48:32 -07:00
Igor Minar 674c3def31 revert: refactor(ivy): make return value of define(Component|Directive|Pipe|Injector|Injectable) private (#23371)
This reverts commit 2c09b707ce.
2018-04-13 23:02:29 -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
Olivier Combe d1177c75f8 refactor: update CLDR data for closure locale & use a const for undefined (#23372)
PR Close #23372
2018-04-13 16:30:23 -07:00
Alex Eagle 12f90ef428 build: move ngcontainer sources to angular/angular (#23374)
These were previously at https://github.com/alexeagle/ngcontainer

PR Close #23374
2018-04-13 16:27:59 -07:00
Miško Hevery 2c09b707ce refactor(ivy): make return value of define(Component|Directive|Pipe|Injector|Injectable) private (#23371)
Ivy definition looks something like this:

```
class MyService {
  static ngInjectableDef = defineInjectable({
    …
  });
}
```

Here the argument to `defineInjectable` is well known public contract which needs
to be honored in backward compatible way between versions. The type of the
return value of `defineInjectable` on the other hand is private and can change
shape drastically between versions without effecting backwards compatibility of
libraries publish to NPM. To our users it is effectively an `OpaqueToken`.

By prefixing the type with `ɵ` we are communicating the the outside world that
the value is not public API and is subject to change without backward compatibility.

PR Close #23371
2018-04-13 16:20:25 -07:00
Misko Hevery da31db757b feat(ivy): support injection even if no injector present (#23345)
- Remove default injection value from `inject` / `directiveInject` since
  it is not possible to set using annotations.
- Module `Injector` is stored on `LView` instead of `LInjector` data
  structure because it can change only at `LView` level. (More efficient)
- Add `ngInjectableDef` to `IterableDiffers` so that existing tests can
  pass as well as enable `IterableDiffers` to be injectable without
  `Injector`

PR Close #23345
2018-04-13 14:29:52 -07:00
Misko Hevery 6f213a74f2 feat(ivy): support generation of flags for directive injection (#23345)
This change changes:
- compiler uses `directiveInject` instead of `inject` for `Directive`s
- unifies the flags in `di` as well as `render3`
- changes the signature of `directiveInject` to match `inject` In prep for #23330
- compiler now generates flags for injection.

Compiler portion of #23342
Prep for #23330

PR Close #23345
2018-04-13 14:29:52 -07:00
George Kalpakas 08325aaffc feat(service-worker): add support for configuring navigations URLs (#23339)
The ServiceWorker will redirect navigation requests that don't match any
`asset` or `data` group to the specified index file. The rules for a
request to be classified as a navigation request are as follows:
1. Its `mode` must be `navigation`.
2. It must accept a `text/html` response.
3. Its URL must match certain criteria (see below).

By default, a navigation request can have any URL except for:
1. URLs containing `__`.
2. URLs to files (i.e. containing a file extension in the last path
   segment).

While these rules are fine in many cases, sometimes it is desirable to
configure different rules for the URLs of navigation requests (e.g.
ignore specific URLs and pass them through to the server).

This commit adds support for specifying an optional `navigationUrls`
list in `ngsw-config.json`, which contains URLs or simple globs
(currently only recognizing `!`, `*` and `**`).
Only requests whose URLs match any of the positive URLs/patterns and
none of the negative ones (i.e. URLs/patterns starting with `!`) will be
considered navigation requests (and handled accordingly by the SW).

(This is an alternative implementation to #23025.)

Fixes #20404

PR Close #23339
2018-04-13 13:13:36 -07:00
Rafael 639d52fe71 refactor: ensure all 'TODO's are consistent (#23252)
PR Close #23252
2018-04-13 13:11:01 -07:00
Alex Eagle 2e270bb96a build: include tslib in umd bundles (#23354)
Fixes #22971

PR Close #23354
2018-04-13 00:13:54 -07:00
Joey Perrott b551f844e4 feat(platform-browser): add token marking which the type of animation module nearest in the injector tree (#23075)
PR Close #23075
2018-04-12 23:17:38 -07:00
Igor Minar 58faa0c7e7 build: reorder PACKAGE_GROUP entries to make @angular/core the first one (#23303)
CLI will soon consider the first entry to be the main entry in the package group.

This will then be used to display the main entry in "ng update" listing.

PR Close #23303
2018-04-12 00:07:45 -07:00
Andrew Seguin 37d2cb4553 feat(elements): add schematics (#23298)
PR Close #23298
2018-04-11 18:13:30 -07:00
Olivier Combe ce40e85cbb refactor(common): update CLDR data to v33.0.0 (#23265)
PR Close #23265
2018-04-11 15:34:46 -07:00
Olivier Combe 5706810af2 fix(common): replace i18n locale undefined values by a const (#23265)
Fixes #22988
PR Close #23265
2018-04-11 15:34:46 -07:00