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
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#5973Fixes#5807Fixes#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
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.
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;
```
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
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#5922Closes#5935
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#5585Closes#5975
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.
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
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
Closes#5815Closes#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.
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
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#5634Closes#5634
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
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 #5547Closes#5653
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'.
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'`