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
In Angular 1.5 there is a new helper method for creating component directives.
See https://docs.angularjs.org/guide/component for more information about components.
These kind of directives only match the `E` element form and the previously component
router only created HTML that matched directives that matched the `A` attribute form.
This commit changes the `<ng-outlet>` directive so that it generates custom HTML
elements rather divs with custom attributes to trigger the relevant component to
appear in the DOM.
Going forward, Angular 1.5 users are encouraged to create their router components
using the following style:
```
myModule.componnet('component-name', {
// component definition object
});
```
Closes angular/angular.js#13860
Closes#6076Closes#5278
BREAKING CHANGE:
The component router now creates custom element HTML rather than custom attribute
HTML, in order to create a new component. So rather than
```html
<div custom-component></div>
```
it now creates
```html
<custom-component></custom-component>
```
If you defined you router components using the `directive()` helper and
specified the `restrict` properties such that element matching was not allowed,
e.g. `restrict: 'A'` then these components will no longer be instantiated
by the component router and the outlet will be empty.
The fix is to include `E` in the `restrict` property.
`restrict: 'EA'`
Note that this does not affect directives that did not specify the `restrict`
property as the default for this property is already `EA`.
it was previously used by benchpress (see d02c0accbb) but that's no longer the case.
I also removed a bunch of extranous dependencies that should never have been part of node_modules (npm bug?)
BREAKING CHANGE:
toPromise is no longer an instance method of the `Observable` returned
by Angular, and fromPromise is no longer available as a static method.
The easiest way to account for this change in applications is to import
the auto-patching modules from rxjs, which will automatically add these
operators back to the Observable prototype.
```
import 'rxjs/add/operator/toPromise';
import 'rxjs/add/observable/fromPromise';
```
Closes#5542Closes#5626
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'`
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
In the previous commit I removed unused dependencies from package.json, but in order for the change to take
effect I needed to update npm shrinkwrap as well. That got complicated because of how npm dedupes packages.
Long story short, to clean up the mess I did the following:
- deleted npm-shrinkwrap.json and npm-shrinkwrap.clean.json
- ran: npm install
- ran: npm shrinkwrap --dev && ./tools/npm/clean-npm-shrinkwrap
This means that our npm-shrinkwrap now correctly reflects the constraints in package.json, but it also
means that some packages got updated (within the version constrain specified in package.json).
Some dependencies were intentionally not updated. e.g. mudge due to #5022
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`
We used to use different external css parsers,
depending on the `DomAdapter`. This lead to
inconsistent behavior and environment specific errors.
Closes#5006Closes#4993
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
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
These dependencies required upgrade in order for us to run on Node v4.x
chokidar 1.0.1 -> 1.1.0
karma 0.12.23 -> 0.13.10
karma-chorome-launcher 0.1.8 -> 0.2.0
karma-cli 0.0.4 -> 0.1.0
karma-dart 0.2.8 -> 0.3.0
karma-sauce-launcher 0.2.11 -> 0.2.14
This was a poorly typed attempt to mimic TypeScript's index signatures,
which we can use instead.
This eliminates a very strange type that we were exposing to users, but
not re-exporting through our public API.
Fixes#4483
This requires delicate handling of type definitions which collide, because
we use TypeScript-provided lib.d.ts for --target=es5 and lib.es6.d.ts for
--target=es6.
We need to include our polyfill typings only in the --target=es5 case,
and the usages have to be consistent with lib.es6.d.ts.
Also starting with this change we now typecheck additional modules,
so this fixes a bunch of wrong typings which were never checked before.
Fixes#3178
This change also makes us compliant with 1.6.0-dev compiler,
so we can do some experiments with apps that use 1.6 features
and compile against Angular.
We should probably add a travis build for 1.6 so we stay compatible
with both versions.
Regen-ed the CHANGELOG.md (for consistency). Seems like some old commits
are not present in new the CHANGELOG.md, but it doesn't seem worthy of
further investigation.
closes#3204, #3172
Don't precompile Dart2JS for pull requests, instead serve the dart
sources with pub serve. We were already testing with Dartium so
all we lose is some test coverage of defects exposed only by the
Dart2JS transpiler.
This still runs the dart transformer.
Fixes#3030
This makes sure just running clang-format will use whatever version is
used in the project, by loading it from the closest node_modules folder.
It also moves the clang-format dependency to the top and explicitly
passes it to gulp-clang-format, giving us more control over the version
used.
Uglify files related to angular2.min.js bundle in one task.
Include reflect.js in the bundle, which was previously missing. Minify reflect.js, zone.js, and angular2.min.js using uglify.
clang-format 1.0.17 substantially improves formatting for fat arrow functions
and array literal detection. It also fixes a number of minor formatting issues.
ts2dart's node-source-map-support dependency was updated to match the main
line patch, but this changed the SHA in the existing repo, breaking Angular's
shrink wrapped dependency.
This update changes the dependency back to an existing SHA.