diff --git a/modules/angular2/src/common/pipes/async_pipe.ts b/modules/angular2/src/common/pipes/async_pipe.ts index 0c6eb13482..31496e9ec4 100644 --- a/modules/angular2/src/common/pipes/async_pipe.ts +++ b/modules/angular2/src/common/pipes/async_pipe.ts @@ -33,7 +33,7 @@ class PromiseStrategy { var _promiseStrategy = new PromiseStrategy(); var _observableStrategy = new ObservableStrategy(); - +var __unused: Promise; // avoid unused import when Promise union types are erased /** * The `async` pipe subscribes to an Observable or Promise and returns the latest value it has diff --git a/modules/angular2/test/web_workers/shared/web_worker_test_util.ts b/modules/angular2/test/web_workers/shared/web_worker_test_util.ts index eb598d01d9..65255cf17e 100644 --- a/modules/angular2/test/web_workers/shared/web_worker_test_util.ts +++ b/modules/angular2/test/web_workers/shared/web_worker_test_util.ts @@ -17,6 +17,8 @@ import {MockEventEmitter} from './mock_event_emitter'; import {BaseException, WrappedException} from 'angular2/src/facade/exceptions'; import {NgZone} from 'angular2/src/core/zone/ng_zone'; +var __unused: Promise; // avoid unused import when Promise union types are erased + /** * Returns two MessageBus instances that are attached to each other. * Such that whatever goes into one's sink comes out the others source. diff --git a/npm-shrinkwrap.clean.json b/npm-shrinkwrap.clean.json index 4f590bd1e2..40cec885b3 100644 --- a/npm-shrinkwrap.clean.json +++ b/npm-shrinkwrap.clean.json @@ -1886,6 +1886,9 @@ "dargs": { "version": "4.0.1" }, + "dart-style": { + "version": "0.2.6" + }, "dart2jsaas": { "version": "0.0.16", "dependencies": { @@ -5353,7 +5356,7 @@ } }, "ts2dart": { - "version": "0.7.22", + "version": "0.7.24", "dependencies": { "source-map": { "version": "0.4.4" @@ -5836,5 +5839,5 @@ } }, "name": "angular-srcs", - "version": "2.0.0-beta.5" + "version": "2.0.0-beta.6" } diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 73a1e8d9ad..51ed922b4f 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,6 +1,6 @@ { "name": "angular-srcs", - "version": "2.0.0-beta.5", + "version": "2.0.0-beta.6", "dependencies": { "abbrev": { "version": "1.0.7", @@ -2960,6 +2960,11 @@ "from": "dargs@>=4.0.1 <5.0.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.0.1.tgz" }, + "dart-style": { + "version": "0.2.6", + "from": "dart-style@>=0.2.6 <0.3.0", + "resolved": "https://registry.npmjs.org/dart-style/-/dart-style-0.2.6.tgz" + }, "dart2jsaas": { "version": "0.0.16", "from": "dart2jsaas@>=0.0.16 <0.0.17", @@ -8530,9 +8535,8 @@ } }, "ts2dart": { - "version": "0.7.22", - "from": "https://registry.npmjs.org/ts2dart/-/ts2dart-0.7.22.tgz", - "resolved": "https://registry.npmjs.org/ts2dart/-/ts2dart-0.7.22.tgz", + "version": "0.7.24", + "from": "ts2dart@0.7.24", "dependencies": { "source-map": { "version": "0.4.4", diff --git a/tools/broccoli/angular_builder.ts b/tools/broccoli/angular_builder.ts index 032278a9d0..45d86170bb 100644 --- a/tools/broccoli/angular_builder.ts +++ b/tools/broccoli/angular_builder.ts @@ -2,7 +2,6 @@ var broccoli = require('broccoli'); var fs = require('fs'); var makeBrowserTree = require('./trees/browser_tree'); var makeNodeTree = require('./trees/node_tree'); -var makeDartTree = require('./trees/dart_tree'); var path = require('path'); var printSlowTrees = require('broccoli-slow-trees'); var Q = require('q'); @@ -111,6 +110,8 @@ export class AngularBuilder { logs: this.options.logs, projects: projects }; + // Workaround for https://github.com/dart-lang/dart_style/issues/493 + var makeDartTree = require('./trees/dart_tree'); let tree = makeDartTree(options); return new broccoli.Builder(tree); } diff --git a/tools/broccoli/broccoli-ts2dart.ts b/tools/broccoli/broccoli-ts2dart.ts index 6df6fbaccc..d14dd3530d 100644 --- a/tools/broccoli/broccoli-ts2dart.ts +++ b/tools/broccoli/broccoli-ts2dart.ts @@ -4,17 +4,18 @@ import fs = require('fs'); import fse = require('fs-extra'); import path = require('path'); -import * as ts2dart from 'ts2dart'; import {wrapDiffingPlugin, DiffingBroccoliPlugin, DiffResult} from './diffing-broccoli-plugin'; class TSToDartTranspiler implements DiffingBroccoliPlugin { static includeExtensions = ['.ts']; - private transpiler: ts2dart.Transpiler; + private transpiler: any /*ts2dart.Transpiler*/; constructor(public inputPath: string, public cachePath: string, - public options: ts2dart.TranspilerOptions) { + public options: any /*ts2dart.TranspilerOptions*/) { options.basePath = inputPath; + // Workaround for https://github.com/dart-lang/dart_style/issues/493 + var ts2dart = require('ts2dart'); this.transpiler = new ts2dart.Transpiler(options); } diff --git a/tools/build/bundle.js b/tools/build/bundle.js index c0f5693fbd..4e9ef8a464 100644 --- a/tools/build/bundle.js +++ b/tools/build/bundle.js @@ -5,11 +5,12 @@ var insert = require('gulp-insert'); var fs = require('fs-extra'); var browserify = require('browserify'); var path = require('path'); -var Builder = require('systemjs-builder'); module.exports.bundle = function(buildConfig, moduleName, outputFile, outputConfig, sfx) { var sfx = sfx || false; + // Workaround for https://github.com/dart-lang/dart_style/issues/493 + var Builder = require('systemjs-builder'); var builder = new Builder(); builder.config(buildConfig); if (sfx) {