Commit Graph

630 Commits

Author SHA1 Message Date
Chuck Jazdzewski 85c1927993 build(broccoli): AngularBuilder compiles with TypeScript 1.8+.
Beginning with 1.8, if a modules has both a .ts and .d.ts file, the .js
file is not written.

Closes #7947
2016-04-08 19:24:04 +00:00
Tim Blasi 26a3390549 refactor(dart/transform): Remove deprecated angular2/bootstrap
BREAKING CHANGE

Remove the deprecated angular2/bootstrap.ts &
angular2/bootstrap_static.ts libraries.

Browser entry points should import angular2/platform/browser which
supplies the `bootstrap` function.

Closes #7650
2016-04-08 18:28:35 +00:00
Alex Eagle 9a1959f77a build(tslint): re-enable linter and fix violations
fixes #7798

Closes #7800
2016-04-07 23:11:02 +00:00
Chuck Jazdzewski c17dc1c057 fix(7837): MetadataCollector takes no parameters for the constructor.
MetadataCollector no longer requires a ts.LanguageService parameter
it didn't use.

Closes #7838
2016-04-07 21:38:07 +00:00
vsavkin 8db97b0b7a fix(forms): support both value and ng-value 2016-04-06 14:37:57 -07:00
Kara Erickson 74e2bd7e3e fix(select): support objects as select values
Closes #4843

Closes #7842
2016-04-06 17:05:38 +00:00
vsavkin 52d3980d02 Revert "feat(transformers): changes transformers to collect information about providers and resolve identifiers during linking"
This reverts commit 4e9809bcb2.
2016-04-06 09:26:03 -07:00
vsavkin 4e9809bcb2 feat(transformers): changes transformers to collect information about providers and resolve identifiers during linking
Closes #7380
2016-04-04 22:59:43 +00:00
Chuck Jazdzewski 506f4ce1e5 feat(compiler): Resolvers now use DI to create reflector
Also introduced ReflectorReader when only read-only access to the reflector
is needed.

Closes #7762
2016-03-28 13:52:32 -05:00
Chuck Jazdzewski 111afcdff1 fix(build): MetadataCollector correctly collects property metadata
Fixes #7772

Closes #7773
2016-03-25 21:52:06 +00:00
Chuck Jazdzewski 85f3dc2fb5 chore(build): Produce .d.ts files for build tools
Closes #7763
2016-03-25 18:23:00 +00:00
Chuck Jazdzewski 09f4d6f52d chore(refactor): Refactored metadata collector
Renamed MetadataExtractor to MetadataCollector
Reorganized to split src from tests

Closes #7492
2016-03-24 18:52:06 +00:00
Chuck Jazdzewski 3f57fa6e0e chore(build): Added tests for metadata extractor
Adds unit test to metadata extractor classes
Fixes issues found while testing
2016-03-24 18:52:06 +00:00
Chuck Jazdzewski ae876d1317 feat(build): Persisting decorator metadata
This allows determing what the runtime metadata will be for a
class without having to loading and running the corresponding
.js file.
2016-03-24 18:52:06 +00:00
Misko Hevery 2f581ffc88 fix(router): RouterOutlet loads component twice in a race condition
Closes #7497

Closes #7545
2016-03-16 22:34:54 +00:00
Jeremy Elbourn d61aaac400 chore(): remove all angular2_material code. 2016-03-16 13:37:37 -07:00
Misko Hevery 310620fd12 chore: upgrade to new Zone.js API v0.6.2
BREAKING CHANGE

Removed deprecated API from NgZone
- `NgZone.overrideOnTurnStart`
- `NgZone.overrideOnTurnDone`
- `NgZone.overrideOnEventDone`
- `NgZone.overrideOnErrorHandler`

Rename NgZone API
- `NgZone.onTurnStart` => `NgZone.onUnstable`
- `NgZone.onTurnDone` => `NgZone.onMicrotaskEmpty`
- `NgZone.onEventDone` => `NgZone.onStable`

Closes #7345
2016-03-16 18:05:09 +00:00
Brian Ford f9fb72fb0e chore(core): remove @View annotation
Closes #7495
2016-03-14 23:26:20 +00:00
Kara Erickson df1f78e302 feat(i18n): add ngPlural directive 2016-03-10 09:55:21 -08:00
Misko Hevery 14f0e9ada8 chore: fix DDC errors / warnings
Closes #7195
2016-03-08 22:17:32 +00:00
Igor Minar d9e78e4fa8 build(analytics): allow build analytics to take previous exit code as the first argument 2016-03-05 19:54:22 +00:00
Igor Minar 10fedd0dfc ci(analytics): correctly report CI job errors as errors 2016-03-05 19:54:22 +00:00
Igor Minar 315e73c47c ci(analytics): report Travis ID without the build number prefix
We need to track latency of individual jobs over time, but don't care to know what's the build ID that these jobs are associted with.
2016-03-05 19:54:22 +00:00
Igor Minar 912717ff31 ci(analytics): fix TRAVIS_PULL_REQUEST reporting
process.env.TRAVIS_PULL_REQUEST contains a string and not a boolean value, so we need
to compare it to a string literal rather than do boolean arithmetics.
2016-03-05 19:54:22 +00:00
Misko Hevery 6402d61f69 chore: fix up ngClass for types/export missing public API
Closes #7202
2016-03-04 08:03:55 +00:00
Julie Ralph 5a59e44765 chore(test): migrate Dart tests to package:test
Instead of running with karma and the karma-dart shim, run dart
tests directly using the new package:test runner. This migrates
away from package:unittest.

Fixes a couple tests, mostly associated with depending on absolute
URLs or editing the test providers after an injector had already
been created.

Remove karma-dart and associated files. Change gupfiles to run tests
via `pub run test` instead.
2016-03-04 02:27:44 +00:00
Brian Ford 75343eb340 feat(router): add regex matchers
@petebacondarwin deserves credit for most of this commit.

This allows you to specify a regex and serializer function instead
of the path DSL in your route declaration.

```
@RouteConfig([
  { regex: '[a-z]+.[0-9]+',
    serializer: (params) => `{params.a}.params.b}`,
    component: MyComponent }
])
class Component {}
```

Closes #7325
Closes #7126
2016-03-02 16:08:19 -08:00
Tobias Bosch f60fa14767 feat(core): drop `ChangeDetectionStrategy.OnPushObserve`
BREAKING CHANGE:

`OnPushObserve` was an experimental
feature for Dart and had
conceptual performance problems,
as setting up observables is slow.
Use `OnPush` instead.
2016-03-01 13:28:10 -08:00
Kara Erickson 59629a0801 feat(i18n): added i18nPlural and i18nSelect pipes
Closes #7268
2016-03-01 16:40:48 +00:00
Tobias Bosch b5e6319fa9 feat(core): add more debug APIs to inspect the application form a browser
Adds `window.getAllAngularRootElements()`
Adds `ng.coreTokens.ApplicationRef`
Adds `ng.coreTokens.Ngzone`

Closes #7045
Closes #7161
2016-03-01 16:01:28 +00:00
Tobias Bosch c9a3df970b feat(di): drop support for injecting types with generics in Dart
BREAKING CHANGE:
In Dart we used to support injecting types with generics. As this feature is hard to implement with the upcoming codegen we are dropping it.

Merge cl/115454020 in G3 with this change.
Closes #7262
2016-03-01 05:43:49 +00:00
Tim Blasi f72f137261 ci(dart): Uncomment dart.dev build and make it required
Workaround for https://github.com/dart-lang/dartdoc/issues/1099: remove
the `--input=.` parameter to `dartdoc`.

Closes #6823, #6410

Closes #6958
2016-03-01 01:21:27 +00:00
vsavkin ebe531bf92 feat(transformers): collect data needed for the template compiler
Closes #7299
2016-02-26 17:56:40 +00:00
Robert Ferentz 6ef2121e6a feat(pipes): add ReplacePipe for string manipulation
add commonly used pipe that is missing  from framework.

feat(pipes): add ReplacePipe for string manipulation

add commonly used pipe that is missing  from framework.

feat(pipes): add ReplacePipe for string manipulation

add commonly used pipe that is missing  from framework.

feat(pipes): add ReplacePipe for string manipulation

add commonly used pipe that is missing  from framework.

feat(pipes): add ReplacePipe for string manipulation

add commonly used pipe that is missing  from framework.

feat(pipes): add ReplacePipe for string manipulation

add commonly used pipe that is missing  from framework.

feat(pipes): add ReplacePipe for string manipulation

add commonly used pipe that is missing  from framework.

feat(pipes): add ReplacePipe for string manipulation

add commonly used pipe that is missing  from framework.

feat(pipes): add ReplacePipe for string manipulation

add commonly used pipe that is missing  from framework.

feat(pipes): add ReplacePipe for string manipulation

add commonly used pipe that is missing  from framework.

feat(pipes): add ReplacePipe for string manipulation

add commonly used pipe that is missing  from framework.

feat(pipes): add ReplacePipe for string manipulation

add commonly used pipe that is missing  from framework.

feat(pipes): add ReplacePipe for string manipulation

add commonly used pipe that is missing  from framework.

feat(pipes): add ReplacePipe for string manipulation

add commonly used pipe that is missing  from framework.
2016-02-25 22:56:13 +00:00
Alec Wiseman 38cb526f60 feat(forms/validators): pattern validator
Adding static pattern validation method to Validators

Adding a directive for the pattern validator

Applying clang-format rules to modified files

Updating public api spec for new pattern validator

Adding pattern validator to public api guard tool

For #5411

Closes #5561
2016-02-25 22:39:15 +00:00
vsavkin 4b3b5d7c53 cleanup(build): fix jsserve not to throw 2016-02-25 13:39:02 -08:00
Tobias Bosch e1f6679c75 chore: make incremental dart tests work again 2016-02-25 10:26:11 -08:00
Misko Hevery 8bb66a5eb3 chore: noImplicitAny fixes 2016-02-24 15:29:00 -08:00
laco0416 e7470d557d feat(core): Add `QueryList.forEach` to public api. 2016-02-19 19:23:46 -05:00
Victor Berchet c6afea61f1 fix(DomRenderer): correctly handle namespaced attributes 2016-02-19 19:23:46 -05:00
Alex Eagle ae275fa4e4 chore(ts2dart): update ts2dart to 0.7.24 2016-02-12 20:45:35 -08:00
Brian Ford efb89b83e1 Revert "fix(DomRenderer): correctly handle namespaced attributes"
This reverts commit 61cf499b0b.
2016-02-11 13:44:16 -08:00
Alex Eagle 3d715a2f7b fix(typings): publish es6 typings rather than postinstall.
Despite local testing, multiple users failed to run the postinstall to install typings.
Instead, we can distribute the typings we installed locally.

This is an alternative to #7003.
This also reverts rxjs to beta.1 since we have errors using beta.2, being addressed
in #7001.

Fixes #7000
2016-02-11 11:04:42 -08:00
Victor Berchet 61cf499b0b fix(DomRenderer): correctly handle namespaced attributes
Closes #6363
2016-02-10 22:34:13 +00:00
vsavkin e725542703 fix(forms): add support for radio buttons
Closes #6877
2016-02-09 19:47:50 +00:00
Igor Minar b86829f492 revert: feat(transformers): collect information about di dependencies and providers
This reverts commit 86c40f8474.

Reason: new issues were discovered during the g3sync. @vsavkin is working on fixing them.
2016-02-08 12:15:03 -08:00
vsavkin 86c40f8474 feat(transformers): collect information about di dependencies and providers 2016-02-05 21:56:33 +00:00
Alex Eagle 2a70f4e4c7 fix(typings): Don't expose typing dependencies to users.
This resolves Duplicate Identifier issues seen by many users,
at the expense of more typings installation required in some
cases.

Removes the quickstart hack of placing all needed dependencies
typings files in our distribution. Removes dependencies on
nodejs from angular2/core.

Fixes #5973
Fixes #5807
Fixes #6266

Angular now depends on es6-promise and es6-collections
(and a handful of manual typings) rather than all of es6-shim.

Fixes #5242

We previously had an undocumented breaking change, this is now
documented in this commit.

Fixes #6817

BREAKING CHANGE:

Transitive typings are no longer included in the distribution.
You may need to install typings in your project using
http://github.com/typings/typings

Users now must rely on getting typings from:
- one of the peerDependencies, such as rxjs, which exposes
  typings via the moduleResolution=node mechanism.
  (see https://github.com/Microsoft/TypeScript/wiki/Typings-for-npm-packages)
  This happens automatically.
- Using --target ES5 now requires manual installation of
  es6-promise and es6-collections typings.
- Using some angular APIs may introduce a dependency on eg. nodejs
  or jasmine, and those typings need manual installation as well.

Closes #6267
2016-02-04 22:42:40 +00:00
Alex Eagle 2f31c4c1c5 chore(typings): use mainline DefinitelyTyped repo rather than a fork.
The upstream Jasmine typings don't define a type for the global
object with Jasmine methods polluting it, so just use any.

Also zone.js has a different name upstream.
2016-02-04 22:42:40 +00:00
Kara Erickson cee2318110 feat(ngFor): add custom trackBy function support
Make it possible to track items in iterables in custom ways (e.g. by ID or index), rather than simply by identity.

Closes #6779
2016-02-03 01:03:31 +00:00
Julie Ralph a78dcfa5f3 chore(tests): fix broken linker integration test and fix DebugNode export
Fixes two small issues introduced with pr #6555
2016-01-29 14:29:49 -08:00
Julie Ralph e1bf3d33f8 feat(debug): replace DebugElement with new Debug DOM
Now, using `ng.probe(element)` in the browser console returns
a DebugElement when in dev mode.

`ComponentFixture#debugElement` also returns a new DebugElement.

Breaking Change:

This is a breaking change for unit tests. The API for the DebugElement
has changed. Now, there is a DebugElement or DebugNode for every node
in the DOM, not only nodes with an ElementRef. `componentViewChildren` is
removed, and `childNodes` is a list of ElementNodes corresponding to every
child in the DOM. `query` no longer takes a scope parameter, since
the entire rendered DOM is included in the `childNodes`.

Before:

```
componentFixture.debugElement.componentViewChildren[0];
```

After
```
// Depending on the DOM structure of your component, the
// index may have changed or the first component child
// may be a sub-child.
componentFixture.debugElement.children[0];
```

Before:

```
debugElement.query(By.css('div'), Scope.all());
```

After:

```
debugElement.query(By.css('div'));
```

Before:

```
componentFixture.debugElement.elementRef;
```

After:

```
componentFixture.elementRef;
```
2016-01-29 11:28:10 -08:00
vsavkin 68a799af2e tools: implement public api spec
Closes #6309
2016-01-27 21:19:05 +00:00
Jason Teplitz 8bea667a0b feat(WebWorker): Add Router Support for WebWorker Apps
Closes #3563.
2016-01-26 21:07:12 -08:00
Pawel Kozlowski 9c96b8affc chore: track size of a "Hello world" app built with SystemJS
Closes #6621
2016-01-26 02:54:03 +00:00
Alex Eagle 4a414420e9 fix(bundles): testing bundle should include browser platform
Closes #6626
2016-01-22 06:12:58 +00:00
Igor Minar fb6335ab60 build(gulp): fail hard w/ legacy node version and provide clear upgrade instructions
Closes #6213
2016-01-22 03:25:34 +00:00
Igor Minar a0d25db4a5 build(npm): add tools/npm/reshrinkwrap script and update docs 2016-01-22 03:25:33 +00:00
Igor Minar 625474c4e2 build(npm): update to mock-fs@3.6.0 2016-01-22 03:25:33 +00:00
Igor Minar 3778ac26aa build(tools): npm/copy-npm-shrinkwrap should gracefully handle situation when shrinkwrap file is missing
This situation occurs during mas update of all dependencies, so we should not throw errors when this happens.
2016-01-22 03:25:32 +00:00
Brian Ford 6cfc6f5bb2 build(npm): upgrade to npm v3
Closes #3193
2016-01-22 03:25:32 +00:00
Pawel Kozlowski f7424d5aeb chore: track size of a "Hello world" app built with WebPack
Closes #6434
2016-01-21 01:28:35 +00:00
Victor Berchet a4b5cb8376 build(node): split test and src compilation units 2016-01-19 21:15:16 -08:00
Tim Blasi bd015f14e8 build(dartanalyzer): Ignore TODOs during build
The newest version of the analyzer emits hints when it encounters TODOs
in code, which is breaking the Dart dev version of our build.

Ignore TODOs for the purpose of build health.

See #6410
2016-01-15 22:53:09 +00:00
Tim Blasi 4d0c2ed1f6 test(dart/transform): Update dependencies & fix Dart tests
Widen version dependencies for `package:angular`, `package:code_transformers`,
and `package:observe`.

`package:guinness` uses `package:unittest` while
the newest versions of `package:code_transformers` use `package:test`.
This causes our end-to-end Dart transformer tests (which use testing
code in `package:code_transformers`) to be skipped.

To fix this:
- Move e2e tests to run in a separate file
- Run `gulp test.server.dart` tests serially

Closes #5922

Closes #5935
2016-01-14 00:29:03 +00:00
Julie Ralph b0cebdba6b feat(test): allow tests to specify the platform and application providers used
With providers split into bundles, the test injector is now able to
use providers for a given bundle. Suggested provider lists for tests are
available in `angular2/platform/testing/<platform>`.

Change the providers for a test suite using `setBaseTestProviders`. This
should be done once at the start of the test suite, before any test cases
run.

BREAKING CHANGE: Tests are now required to use `setBaseTestProviders`
to set up. Assuming your tests are run on a browser, setup would change
as follows.

Before:

```js
// Somewhere in test setup
import {BrowserDomAdapter} from 'angular2/src/platform/browser/browser_adapter';
BrowserDomAdapter.makeCurrent
```

After:

```js
// Somewhere in the test setup
import {setBaseTestProviders} from 'angular2/testing';
import {
  TEST_BROWSER_PLATFORM_PROVIDERS,
  TEST_BROWSER_APPLICATION_PROVIDERS
} from 'angular2/platform/testing/browser';

setBaseTestProviders(TEST_BROWSER_PLATFORM_PROVIDERS,
                     TEST_BROWSER_APPLICATION_PROVIDERS);
```

Closes #5351, Closes #5585

Closes #5975
2016-01-13 02:11:06 +00:00
Tobias Bosch a08f50badd chore(build): allow to run examples and benchmarks without bundles
The bundles will only be used if the flag `--useBundles` is passed to `gulp build.js`.
2016-01-05 08:27:24 -08:00
Victor Berchet 8516473340 build(broccoli-typescript): check for map files before deleting them
fixes #5610
Closes #6065
2015-12-23 02:59:11 +00:00
Jeff Cross 00822c3415 chore(publish): add Rx bundles to code.angularjs.org publish step
Closes #5904
Closes #5909
2015-12-15 17:12:42 +00:00
vsavkin 3dca9d522a feat(core): enable dev mode by default
BREAKING CHANGE

Before

Previously Angular would run in dev prod mode by default, and you could enable the dev mode by calling enableDevMode.

After

Now, Angular runs in the dev mode by default, and you can enable the prod mode by calling enableProdMode.
2015-12-15 08:34:44 -08:00
Igor Minar de996ec50b build(publish.sh): uncomment prepare steps for existing tmp repo
I tested these steps manually and they seem to work well.
2015-12-15 03:31:47 -08:00
Pawel Kozlowski 61b9468596 fix(bundles): rename UMD bundles
BREAKING CHANGE:

UMD bundles were renamed:
* `angular2.umd.js` -> `angular2-all.umd.js`
* `angular2-testing.umd.js` -> `angular2-all-testing.umd.js`

Closes #5898
2015-12-15 10:24:32 +00:00
Pawel Kozlowski 42b74f524a chore(bundles): use RxJS bundles 2015-12-14 22:08:16 -08:00
Igor Minar d3a79db48d build(publish.sh): do not error when tmp/code.angularjs.org already exists
I'm not sure what's the best way to update the shallow repo and I'm in a state where there is nothing to be
updated so I'll revisit the proper fix the next time I'm doing a release unless someone beats me to it.

Closes #5872
2015-12-15 05:45:10 +00:00
Pawel Kozlowski 2983558e5e fix(bundles): remove polyfills from angular2.js bundle
BREAKING CHANGE:

Previously `angular2.js`, `angular2.min.js` and `angular2.dev.js` bundles
would have zone.js and reflect-metadata pre-appended. New bundles don't
contain zone.js nor reflect-metadata - those external dependencies can
be easily loaded into a browser using `angular2-polyfills.js`

Closes #5881
2015-12-14 21:34:56 +00:00
Pawel Kozlowski 4deaf0bdd3 chore(bundles): align content of System.register and UMD bundles
Closes #5856
2015-12-14 20:48:29 +00:00
Pawel Kozlowski 539c5633bf chore(bundles): add http and router mocks to angular2-testing
Closes #5830
2015-12-14 19:04:03 +00:00
Tobias Bosch 200dc00dbb fix(angular2): remove `angular2.ts` module
Closes #5815
Closes #5844

BREAKING CHANGE:

`angular2/angular2` was removed. Use the correct import from one of the barrels. E.g. `angular2/core`, `angular2/platform/browser`,  `angular2/common`, …

Note: This only applies to JavaScript, Dart is not changed.
2015-12-11 14:21:33 -08:00
Igor Minar 51cb7586e0 build(npm): update to typescript@1.7.3 + fix broccoli-typescript + fix src 2015-12-10 01:32:44 +00:00
Matias Niemelä 28860d35b2 feat(core): provide support for relative assets for components
Assets defined for `templateUrl` and `styleUrls` can now be loaded
in relative to where the component file is placed so long as the
`moduleId` is set within the component annotation.

Closes #5634
2015-12-09 16:28:49 -08:00
Matias Niemelä 5f0ce30ee6 revert: feat(core): provide support for relative assets for components 2015-12-09 16:26:42 -08:00
Matias Niemelä db096a5e22 feat(core): provide support for relative assets for components
Assets defined for `templateUrl` and `styleUrls` can now be loaded
in relative to where the component file is placed so long as the
`moduleId` is set within the component annotation.

Closes #5634

Closes #5634
2015-12-09 22:04:00 +00:00
Pawel Kozlowski 56a254e6a5 chore: enforce import checks for the 'upgrade' barrel
Closes #5741
2015-12-09 21:04:41 +00:00
Pawel Kozlowski d6d759d722 feat(bundles): add angular-testing UMD bundle
Closes #5581

Closes #5734
2015-12-09 19:36:18 +00:00
Pawel Kozlowski fb4f1e8dc9 fix(bundles): clean-up and re-organize UMD bundles
Fixes #5593
Part of #5665

BREAKING CHANGE:

Number and content of UMD bundles have changed:
- we only publish one bundle that contains: core, common, platform/browser, http, router, instrumentation and upgrade
- exported names have changed and now:
  - core is exported as `ng.core`
  - common is exported as `ng.common`
  - platform/browser is exported as `ng.platform.browser`
  - http is exported as `ng.http`
  - router is exported as `ng.router`
  - instrumentation is exported as `ng.instrumentation`
  - upgrade is exported as `ng.upgrade`

Closes #5697
2015-12-08 21:50:00 +00:00
Tero Parviainen daaa8ee1cd fix(compiler): support properties on SVG elements
Have DomElementSchemaRegistry support namespaced elements,
so that it does not fail when directives are applied in SVG (or xlink).
Without this fix, directives or property bindings cannot be
used in SVG.

Related to #5547

Closes #5653
2015-12-08 02:18:07 +00:00
vsavkin 7e18d4c539 feat(sourcemaps): use inline source maps and inline sources in node_tree
Closes #5617
2015-12-04 22:01:58 +00:00
vsavkin 22e9590981 feat(typings): import global-es6.d.ts in core
Currently, importing from 'angular2/angular2', in addition to providing Angular tokens, brings in global-es6.d.ts. Since we are deprecating 'angular2/angular2', we need to do the same in 'angular2/core'.
2015-12-04 22:01:58 +00:00
Pawel Kozlowski 688469c221 refactor(broccoli-check-imports): allow imports from self by default
Closes #5573
2015-12-03 22:06:20 +00:00
Pawel Kozlowski 7a1fbf1c3a chore(build): enforce import checks for the http module
Closes #5460
2015-12-03 22:06:20 +00:00
Rob Wormald 5514dc19d9 refactor(facade): use rxjs package
move to new RxJS distribution.

BREAKING CHANGE:

RxJS imports now are via `rxjs` instead of `@reactivex/rxjs`
Individual operators can be imported `import 'rxjs/operators/map'`
2015-12-02 16:02:34 -08:00
Rob Wormald a16ac84840 refactor(async): use ultralight Observable
Closes #5283
2015-12-02 16:02:34 -08:00
Igor Minar 7f783289ab build: improve the environmental check and warnings
- we now correctly print errors even on old Node versions
- we print error messages even when node_modules are missing or messed up
- error messages looks better

Closes #5230
2015-12-02 13:03:51 -08:00
Jeff Cross 922da62720 chore(browser_tree): fix formatting 2015-12-01 13:44:41 -08:00
vsavkin 87ac36f65b fix(build): include benchpress into browser_tree 2015-12-01 12:42:22 -08:00
Igor Minar a8c3b9d67c build(gulp): lazy-require modules in order to improve startup time
Closes #5498
2015-11-30 21:36:57 +00:00
Brian Ford 6ddfff5cd5 refactor(router): improve recognition and generation pipeline
This is a big change. @matsko also deserves much of the credit for the implementation.

Previously, `ComponentInstruction`s held all the state for async components.
Now, we introduce several subclasses for `Instruction` to describe each type of navigation.

BREAKING CHANGE:

Redirects now use the Link DSL syntax. Before:

```
@RouteConfig([
	{ path: '/foo', redirectTo: '/bar' },
	{ path: '/bar', component: BarCmp }
])
```

After:

```
@RouteConfig([
	{ path: '/foo', redirectTo: ['Bar'] },
	{ path: '/bar', component: BarCmp, name: 'Bar' }
])
```

BREAKING CHANGE:

This also introduces `useAsDefault` in the RouteConfig, which makes cases like lazy-loading
and encapsulating large routes with sub-routes easier.

Previously, you could use `redirectTo` like this to expand a URL like `/tab` to `/tab/posts`:

@RouteConfig([
	{ path: '/tab', redirectTo: '/tab/users' }
	{ path: '/tab', component: TabsCmp, name: 'Tab' }
])
AppCmp { ... }

Now the recommended way to handle this is case is to use `useAsDefault` like so:

```
@RouteConfig([
	{ path: '/tab', component: TabsCmp, name: 'Tab' }
])
AppCmp { ... }

@RouteConfig([
	{ path: '/posts', component: PostsCmp, useAsDefault: true, name: 'Posts' },
	{ path: '/users', component: UsersCmp, name: 'Users' }
])
TabsCmp { ... }
```

In the above example, you can write just `['/Tab']` and the route `Users` is automatically selected as a child route.

Closes #4728
Closes #4228
Closes #4170
Closes #4490
Closes #4694
Closes #5200

Closes #5475
2015-11-30 17:06:03 +00:00
vsavkin 87d56acdaa fix(build): fix source maps
Closes #5444
2015-11-24 19:33:27 +00:00
vsavkin 8daa9b202d cleanup(testing): create top level files for mocks
Closes #5381
2015-11-24 19:29:52 +00:00
vsavkin 89eefcd7b5 cleanup(tooling): move tooling to the browser platform and rename profile into instrumentation
BREAKING CHANGE

Before

import * as p from 'angular2/profile';
import * as t from 'angular2/tools';

After

import * as p from 'angular2/instrumentation';
import * as t from 'angular2/platform/browser';
2015-11-24 19:29:52 +00:00
Tim Blasi 31f85f0297 chore(analytics): Build hello_world, check constraints
Create gulp targets to build `hello_world` and check its gzipped size
against size constraints.

See #5312, #5314
2015-11-23 20:10:04 +00:00
Tim Blasi 225b9d306b chore(analytics): Generalize file size analytics
Move file size analytics code into a reusable module.

See #5312, #5314
2015-11-23 20:10:04 +00:00
vsavkin 5ba9ced1ab cleanup(core): stop reexporting angular2/common from angular2/core
All common directives, forms, and pipes have been moved out of angular2/core,
but we kept reexporting them to make transition easier.

This commit removes the reexports.

BREAKING CHANGE

Before

import {NgIf} from 'angular2/core';

After

import {NgIf} from 'angular2/common';

Closes #5362
2015-11-19 19:54:27 +00:00
vsavkin 2c8fcec432 refactor(core): move render/dom from core
Currently, core depends on DomRenderer, which depends on the browser.
This means that if you depend on angular2/core, you will always
pull in the browser dom adapter and the browser render, regardless
if you need them or not.

This PR moves the browser dom adapter and the browser renderer out of core.

BREAKING CHANGE

If you import browser adapter or dom renderer directly (not via angular2/core),
you will have to change the import path.
2015-11-17 15:53:55 -08:00
Alex Rickabaugh b571baab68 fix(examples): Don't generate Dart code for TS examples in nested directories. 2015-11-17 11:24:02 -08:00
vsavkin 4e585bca28 feat(build): add an option to disable type checks when running tests
Since editors and IDEs do typechecking and show errors in place,
often there is no benefit to running type checking in our test pipeline.
This PR allows you to disable type checking:

gulp test.unit.js --noTypeChecks

This commit also makes es6 generation optional.

fix(build): removes unnecessary circular dependencies

Closes #5299
2015-11-17 00:45:49 +00:00
Igor Minar 41dfaf393b build(analytics): track bundle size
This will send bundle sizes (before and after gzip) to Google Analytics so that we can
track bundle size over time for every bundle we produce.

Closes #5294
2015-11-16 21:42:50 +00:00
vsavkin 6d70cd78ec fix(build): fix npm install not to depend on minimist
Closes #5282
2015-11-13 23:56:43 +00:00
Igor Minar 1d9c44b34f build: add --projects a.k.a the turbo button
we can now filter build graph via --project flag to speed up build performance

usage:

gulp test.unit.js --project=angular2,angular2_material

Closes #5272
2015-11-13 22:50:38 +00:00
Igor Minar 2ecbd0eaaf build(analytics): fix bug that prevented us from collecting OS info 2015-11-13 22:50:38 +00:00
Igor Minar 8ab7781b2d build(analytics): keep track of --projects value via a custom dimension 2015-11-13 22:50:38 +00:00
Igor Minar cf0183ac7f build(DiffingPluginWrapper): ignore null/undefined input trees
this is handy to conditionally create build graph but keep mergeTree() declarative - any input tree passed into
mergeTree that is null or undefined will simply be ignored
2015-11-13 22:50:38 +00:00
vsavkin 0eab4fc72c feat(core): extract platforms out of core
Currently, core depends on the browser, which means that other platforms (e.g., NativeScript or webworker) cannot use the bootstrapping logic core provides.
This PR extract makes bootstrapping logic in core completely platform-independent. The browser-specific code was moved to "angular2/platforms/browser".

BREAKING CHANGE

A few private helpers (e.g., platformCommon or applicationCommon) were removed or replaced with other helpers. Look at PLATFORM_COMMON_PROVIDERS, APPLICATION_COMMON_PROVIDERS, BROWSER_PROVIDERS, BROWSER_APP_PROVIDERS to see if they export the providers you need.

Closes #5219

Closes #5280
2015-11-13 19:26:14 +00:00
vsavkin 78280a48af Revert "feat(core): extract platforms out of core"
This reverts commit 3f4628c0b0.
2015-11-12 13:40:29 -08:00
vsavkin 3f4628c0b0 feat(core): extract platforms out of core
Currently, core depends on the browser, which means that other platforms (e.g., NativeScript or webworker) cannot use the bootstrapping logic core provides.
This PR extract makes bootstrapping logic in core completely platform-independent. The browser-specific code was moved to "angular2/platforms/browser".

BREAKING CHANGE

A few private helpers (e.g., platformCommon or applicationCommon) were removed or replaced with other helpers. Look at PLATFORM_COMMON_PROVIDERS, APPLICATION_COMMON_PROVIDERS, BROWSER_PROVIDERS, BROWSER_APP_PROVIDERS to see if they export the providers you need.

Closes #5219
2015-11-12 16:57:03 +00:00
vsavkin 79472b77ca refactor(core): move facades out of core
This is part of ongoing work to make core platform-independent.

BREAKING CHANGE

All private exports from 'angular2/src/core/facade/{lang,collection,exception_handler}' should be replaced with 'angular2/src/facade/{lang,collection,exception_handler}'.
2015-11-07 01:36:06 +00:00
Pawel Kozlowski c6ad269f43 chore(build): remove es5build.js
Fixes #5030

Closes #5144
2015-11-06 18:22:57 +00:00
Alex Rickabaugh aa70275b01 chore(tests): Enable dev mode in all Angular tests.
Closes #5106
2015-11-06 07:07:04 +00:00
vsavkin 695923dcd6 refactor(core): move directives, pipes, and forms into common
BREAKING CHANGE

All private exports from 'angular2/src/core/{directives,pipes,forms}' should be replaced with 'angular2/src/common/{directives,pipes,formis}'

Closes #5153
2015-11-05 23:00:32 +00:00
vsavkin 6edd964a83 chore(core): move compiler out of core
BREAKING CHANGE

All imports from 'angular2/core/compiler' should be changed to 'angular2/compiler'.
2015-11-05 14:44:52 -08:00
Tobias Bosch 37c65b74e3 chore: fix incremental test.unit.dart
Always pass the global typings to ts2dart, independent of the result of the riffing

Closes #4881

Closes #5070
2015-11-02 20:46:27 +00:00
Misko Hevery 1b78342e23 chore(ngUpgrade): Move into Angular2
This is moving ngUpgrade into the main repository per #4838.
The ngUpgrade is published from the main import consistent with
https://docs.google.com/document/d/1rbVTKTYLz6p2smQNYI8h4-QN-m2PS6F3iQIDmSzn0Ww/edit#heading=h.6cxvr9awtf5r
Closes #4931
2015-10-31 20:48:27 -07:00
Brian Ford 53bddec1d2 fix(router): respond to hashchange events
Previously if the URL changed in `HashLocation` mode, the router would not pick up the change.
This adds a listener in `HashLocationStrategy` for `hashchange` events to fix the problem.

Closes #5013
2015-10-30 15:04:31 -07:00
Rob Wormald ca3986f31d refactor(async): refactor EventEmitter
Refactor EventEmitter and Async Facade to match ES7 Observable semantics, properly use RxJS typedefs, make EventEmitter inherit from RxJS Subject. Closes #4149.

BREAKING CHANGE:
- consumers of EventEmitter no longer need to call .toRx()
- EventEmitter is now generic and requires a type - e.g. `EventEmitter<string>`
- EventEmitter and Observable now use the `.subscribe(generatorOrNext, error, complete)` method instead of `.observer(generator)`
- ObservableWrapper uses `callNext/callError/callComplete` instead of `callNext/callThrow/callReturn`
2015-10-29 23:06:16 +00:00
Igor Minar 6815acea32 chore(vscode): add jsconfig.json and remove .settings dir
VSCode recognizes jsconfig.json for es6 code in the same way as it recognizes tsconfig.json for ts code.

Closes #4955
2015-10-29 13:53:21 +00:00
Igor Minar b329a58416 build(analytics): track TRAVIS_JOB_NUMBER as a custom dimension 2015-10-29 13:53:21 +00:00
Igor Minar ae7f76e91f build(analytics): add support for tracking npm installs
Since the very first npm install is called while node_modules is empty, we need to ignore it, but we can track
the start timestamp and record the install even once the installation is completed.
2015-10-29 13:53:21 +00:00
Alex Eagle 098201d0b8 fix(lint): enforce that module-private members have @internal.
This is needed to prevent leaking internal APIs to users via our published .d.ts typings.
Fixes #4645

Closes #4989
2015-10-28 22:14:48 +00:00
Tobias Bosch bc10dc3ed0 fix(benchmarks): update react and polymer benchmarks and get tree update numbers for all of the benchmarks as well.
Closes #4709
2015-10-28 13:17:01 -07:00
Alex Eagle c90e1920f5 chore(tslint): disallow variable names that look like keywords.
We've had issues such as the one I documented: https://github.com/Microsoft/TypeScript/issues/5187
This tslint check prevents this happening again.
This change also updates to the newest tslint which gets typings from npm.

Closes #4970
2015-10-28 18:31:21 +00:00
Martin Probst c02f2bdab0 chore: adjust formatting to new clang-format.
- fixes wrapping for object literal keys called `template`.
- spacing in destructuring expressions.
- changes to keep trailing return types of functions closer to their
  function declaration.
- better formatting of string literals.

Closes #4828
2015-10-28 11:19:10 +01:00
Alex Eagle a881f09b77 chore(typings): don't expose es6-shim typing.
Also clean up unused typings generation; we publish the node tree, not browser tree.
Fixes #4882

Closes #4928
2015-10-28 04:24:50 +00:00
Misko Hevery 9d0d33f95a feat(ngUpgrade): simple example 2015-10-19 12:43:28 -07:00
Tim Blasi cf9d4662c9 refactor(dart/transform): Update protobuf dependencies
Update
- libprotoc to 2.6.1
- dart-protoc-plugin to 0.5.0
- pkg/protobuf 0.5.0

Closes #4681
2015-10-19 10:32:17 -07:00
Igor Minar 2c98a0f771 build(broccoli-typescript): add support for moduleResolution=node
Closes #4779
2015-10-18 16:44:30 +00:00
Igor Minar b09788993d build(broccoli): make broccoli-typescript consume tsconfig style option
Previously it supported a weird mixture of tsconfig and internal options.
2015-10-18 16:44:30 +00:00
kutyel e4e74ae65c chore: rename modules/examples to modules/playground
The directory contains code authored in a style that makes it transpilable to dart. As such, these are not idiomatic examples of Angular 2 usage.

The main purpose of this directory is to enable experimentation with Angular within the angular/angular repository.

Closes #4342

Closes #4639
2015-10-18 11:48:43 +00:00
Jeff Cross 57649d1839 fix(publish): emit type declarations with CJS build
Closes #4706
Closes #4708
2015-10-13 22:17:12 +00:00
Julie Ralph f529236bfc refactor(test): rename test_lib to testing
Old test_lib is now testing_internal
test_lib_public is now testing
2015-10-13 10:36:49 -07:00
Julie Ralph a1fa2e472f feat(test): Add an external version of the test library
Adds test adapters for TypeScript and JavaScript only, exported
as part of the test_lib module. These work with the Jasmine test
framework, and allow use of the test injector within test blocks
via the `inject` function.

See #4572, #4177, #4035, #2783

This includes the TestComponentBuilder. It allows using the
test injector with Jasmine bindings, and waits for returned
promises before completing async test blocks.
2015-10-12 23:14:03 -07:00
Igor Minar da1272f368 build(analytics): add basic build-analytics to the project
This is pretty experimental, but the goal is to track the performance
of our build over time so that we can more easily track perf regressions.

Currently it's integrated only with gulp tasks, but I'd like to expand it
to tracking travis jobs, protractor/benchpress test runs, npm installs, etc.

No PII is being collected. And the data is collected via a Google Analytics
property owned by the Angular team account.

Closes #4672
2015-10-12 03:50:00 +00:00
Alex Eagle 867c08ac84 chore(typings): mark underscore methods @internal.
This allows TypeScript to produce an API surface which matches the Dart semantics.
I found these with:
gulp build.js.dev && find dist/js/dev/es5/angular2/src -name "*.d.ts" -exec grep -H -n '^ *_' {} \;

Closes #4638
2015-10-10 02:18:33 +00:00
Alex Eagle 95f984615b Produce .d.ts files from our typescript compilation.
Deliver them into our npm module output so users can consume them directly.

Fixes #3082
2015-10-10 02:18:33 +00:00
vsavkin bc8c194665 temporary ignore warnings about unused unimplemented 2015-10-08 13:54:44 -07:00
Rado Kirov f7b75330e0 chore(test): make e2e tests use the bundles.
After this change, only web_worker thread in its e2e test is not using
the bundles.

Closes #4565
2015-10-07 01:17:19 +00:00
Brian Ford 6117a7037b chore(build): copy bundles so they can be used with e2e tests 2015-10-06 10:55:08 -07:00
Igor Minar 4d9de666c8 chore: remove dead code 2015-10-06 10:12:53 -07:00
Alex Eagle 6093e28b61 fix(typings): repair broken typechecks
We had the typechecker disabled by accident, and many problems snuck in

Fixes #4507

Closes #4508
2015-10-06 13:28:17 +00:00
Alex Eagle ae6f549f10 chore(typings): re-enable type-checking on the browser trees 2015-10-06 13:28:17 +00:00
Igor Minar e21bf120b9 build(travis): add travis log folding for verbose tasks 2015-10-03 21:33:57 +00:00