diff --git a/build.sh b/build.sh index a801908d43..738e22cb4a 100755 --- a/build.sh +++ b/build.sh @@ -21,7 +21,7 @@ cp -r ./modules/playground/favicon.ico ./dist/ #rsync -aP ./modules/playground/* ./dist/all/playground/ mkdir ./dist/all/playground/vendor cd ./dist/all/playground/vendor -ln -s ../../../../node_modules/es6-shim/es6-shim.js . +ln -s ../../../../node_modules/core-js/client/core.js . ln -s ../../../../node_modules/zone.js/dist/zone.js . ln -s ../../../../node_modules/zone.js/dist/long-stack-trace-zone.js . ln -s ../../../../node_modules/systemjs/dist/system.src.js . diff --git a/karma-js.conf.js b/karma-js.conf.js index 0bc20e8dcf..83e4e57ce3 100644 --- a/karma-js.conf.js +++ b/karma-js.conf.js @@ -13,7 +13,7 @@ module.exports = function(config) { // Loaded through the System loader, in `test-main.js`. {pattern: 'dist/all/@angular/**/*.js', included: false, watched: true}, - 'node_modules/es6-shim/es6-shim.js', + 'node_modules/core-js/client/core.js', // include Angular v1 for upgrade module testing 'node_modules/angular/angular.min.js', diff --git a/modules/@angular/docs/bundles/overview.md b/modules/@angular/docs/bundles/overview.md index 1342ce4fbc..e8800606f0 100644 --- a/modules/@angular/docs/bundles/overview.md +++ b/modules/@angular/docs/bundles/overview.md @@ -89,4 +89,4 @@ Depending on if you are using Angular bundles or not you can either use RxJS bun ## ES6 shims (optional) -Users of pre-ES6 browsers might need to add an ES6 shim (e.g. [es6-shim](https://github.com/paulmillr/es6-shim)) +Users of pre-ES6 browsers might need to add an ES6 shim (e.g. [core-js](https://github.com/zloirock/core-js)) diff --git a/modules/@angular/http/src/index.ts b/modules/@angular/http/src/index.ts index d96615d346..027a8e753e 100644 --- a/modules/@angular/http/src/index.ts +++ b/modules/@angular/http/src/index.ts @@ -8,7 +8,7 @@ // Index to be used if Http is ever configured as a standalone npm package. // require('reflect-metadata'); -// require('es6-shim'); +// require('core-js'); // import {HTTP_PROVIDERS, JSONP_PROVIDERS, Http, Jsonp} from './http'; // import {Injector} from '@angular/core'; // export * from './http'; diff --git a/modules/@angular/package.json b/modules/@angular/package.json deleted file mode 100644 index dff4404023..0000000000 --- a/modules/@angular/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "angular2", - "version": "<%= packageJson.version %>", - "description": "Angular 2 - a web framework for modern web apps", - "homepage": "<%= packageJson.homepage %>", - "bugs": "<%= packageJson.bugs %>", - "contributors": <%= JSON.stringify(packageJson.contributors) %>, - "license": "<%= packageJson.license %>", - "repository": <%= JSON.stringify(packageJson.repository) %>, - "devDependencies": <%= JSON.stringify(packageJson.defaultDevDependencies) %>, - "peerDependencies": { - "es6-shim": "<%= packageJson.dependencies['es6-shim'] %>", - "reflect-metadata": "<%= packageJson.dependencies['reflect-metadata'] %>", - "rxjs": "<%= packageJson.dependencies['rxjs'] %>", - "zone.js": "<%= packageJson.dependencies['zone.js'] %>" - } -} diff --git a/modules/@angular/router/karma.conf.js b/modules/@angular/router/karma.conf.js index e55941d79a..4188df437a 100644 --- a/modules/@angular/router/karma.conf.js +++ b/modules/@angular/router/karma.conf.js @@ -10,7 +10,7 @@ module.exports = function(config) { files: [ // Polyfills. - 'node_modules/es6-shim/es6-shim.js', + 'node_modules/core-js/client/core.js', 'node_modules/reflect-metadata/Reflect.js', 'shims_for_IE.js', diff --git a/modules/angular1_router/karma-router.conf.js b/modules/angular1_router/karma-router.conf.js index fc7b16ae23..128f839e52 100644 --- a/modules/angular1_router/karma-router.conf.js +++ b/modules/angular1_router/karma-router.conf.js @@ -9,7 +9,7 @@ module.exports = function (config) { frameworks: ['jasmine'], files: [ - '../../node_modules/es6-shim/es6-shim.js', + '../../node_modules/core-js/client/core.js', '../../node_modules/angular/angular.js', '../../node_modules/angular-animate/angular-animate.js', '../../node_modules/angular-mocks/angular-mocks.js', diff --git a/modules/benchpress/index.ts b/modules/benchpress/index.ts index 0f09ca89c5..d06b562d1b 100644 --- a/modules/benchpress/index.ts +++ b/modules/benchpress/index.ts @@ -7,7 +7,7 @@ */ require('reflect-metadata'); -require('es6-shim'); +require('core-js'); module.exports = require('./benchpress.js'); // when bundling benchpress to one file, this is used // for getting exports out of browserify's scope. diff --git a/modules/benchpress/package.json b/modules/benchpress/package.json index c74ab3c54f..f361981461 100644 --- a/modules/benchpress/package.json +++ b/modules/benchpress/package.json @@ -10,7 +10,7 @@ "repository": <%= JSON.stringify(packageJson.repository) %>, "dependencies": { "angular2": "<%= packageJson.version %>", - "es6-shim": "<%= packageJson.dependencies['es6-shim'] %>", + "core-js": "<%= packageJson.dependencies['core-js'] %>", "reflect-metadata": "<%= packageJson.dependencies['reflect-metadata'] %>", "rxjs": "<%= packageJson.dependencies['rxjs'] %>", "selenium-webdriver": "<%= packageJson.dependencies['selenium-webdriver'] %>", diff --git a/modules/benchpress/test/firefox_extension/conf.ts b/modules/benchpress/test/firefox_extension/conf.ts index 994a46bf1c..8ceeeead85 100644 --- a/modules/benchpress/test/firefox_extension/conf.ts +++ b/modules/benchpress/test/firefox_extension/conf.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -require('es6-shim/es6-shim.js'); +require('core-js'); require('reflect-metadata'); var testHelper = require('../../src/firefox_extension/lib/test_helper.js'); diff --git a/modules/playground/src/bootstrap.ts b/modules/playground/src/bootstrap.ts index ed0eb56786..bd93217245 100644 --- a/modules/playground/src/bootstrap.ts +++ b/modules/playground/src/bootstrap.ts @@ -9,7 +9,7 @@ (function(global: any /** TODO #9100 */) { - writeScriptTag('/all/playground/vendor/es6-shim.js'); + writeScriptTag('/all/playground/vendor/core.js'); writeScriptTag('/all/playground/vendor/zone.js'); writeScriptTag('/all/playground/vendor/long-stack-trace-zone.js'); writeScriptTag('/all/playground/vendor/system.src.js'); diff --git a/modules/playground/src/web_workers/images/loader.js b/modules/playground/src/web_workers/images/loader.js index 8e7648ffe0..aaba7f956d 100644 --- a/modules/playground/src/web_workers/images/loader.js +++ b/modules/playground/src/web_workers/images/loader.js @@ -1,4 +1,4 @@ -importScripts("../../../vendor/es6-shim.js", +importScripts("../../../vendor/core.js", "../../../vendor/zone.js", "../../../vendor/long-stack-trace-zone.js", "../../../vendor/system.src.js", diff --git a/modules/playground/src/web_workers/input/loader.js b/modules/playground/src/web_workers/input/loader.js index 8fbfba90bd..114d799da3 100644 --- a/modules/playground/src/web_workers/input/loader.js +++ b/modules/playground/src/web_workers/input/loader.js @@ -1,4 +1,4 @@ -importScripts("../../../vendor/es6-shim.js", +importScripts("../../../vendor/core.js", "../../../vendor/zone.js", "../../../vendor/long-stack-trace-zone.js", "../../../vendor/system.src.js", diff --git a/modules/playground/src/web_workers/kitchen_sink/loader.js b/modules/playground/src/web_workers/kitchen_sink/loader.js index 53436e7535..42679fbad9 100644 --- a/modules/playground/src/web_workers/kitchen_sink/loader.js +++ b/modules/playground/src/web_workers/kitchen_sink/loader.js @@ -1,4 +1,4 @@ -importScripts("../../../vendor/es6-shim.js", +importScripts("../../../vendor/core.js", "../../../vendor/zone.js", "../../../vendor/long-stack-trace-zone.js", "../../../vendor/system.src.js", diff --git a/modules/playground/src/web_workers/message_broker/loader.js b/modules/playground/src/web_workers/message_broker/loader.js index 8701b0620e..157f06b0fd 100644 --- a/modules/playground/src/web_workers/message_broker/loader.js +++ b/modules/playground/src/web_workers/message_broker/loader.js @@ -1,4 +1,4 @@ -importScripts("../../../vendor/es6-shim.js", +importScripts("../../../vendor/core.js", "../../../vendor/zone.js", "../../../vendor/long-stack-trace-zone.js", "../../../vendor/system.src.js", diff --git a/modules/playground/src/web_workers/router/loader.js b/modules/playground/src/web_workers/router/loader.js index 6bbb7b8322..1e7197a200 100644 --- a/modules/playground/src/web_workers/router/loader.js +++ b/modules/playground/src/web_workers/router/loader.js @@ -1,4 +1,4 @@ -importScripts("../../../vendor/es6-shim.js", +importScripts("../../../vendor/core.js", "../../../vendor/zone.js", "../../../vendor/long-stack-trace-zone.js", "../../../vendor/system.src.js", diff --git a/modules/playground/src/web_workers/todo/loader.js b/modules/playground/src/web_workers/todo/loader.js index 2e3294d02b..4f9fabc6c3 100644 --- a/modules/playground/src/web_workers/todo/loader.js +++ b/modules/playground/src/web_workers/todo/loader.js @@ -1,4 +1,4 @@ -importScripts("../../../vendor/es6-shim.js", +importScripts("../../../vendor/core.js", "../../../vendor/zone.js", "../../../vendor/long-stack-trace-zone.js", "../../../vendor/system.src.js", diff --git a/npm-shrinkwrap.clean.json b/npm-shrinkwrap.clean.json index 508fd9b1c1..ad49c79202 100644 --- a/npm-shrinkwrap.clean.json +++ b/npm-shrinkwrap.clean.json @@ -1882,7 +1882,7 @@ "version": "1.0.0" }, "core-js": { - "version": "2.4.0" + "version": "2.4.1" }, "core-object": { "version": "0.0.2" @@ -2116,9 +2116,6 @@ "es6-module-loader": { "version": "0.17.9" }, - "es6-shim": { - "version": "0.35.0" - }, "es6-symbol": { "version": "3.0.2" }, diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 8502e0300a..a96e85f74a 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -2954,9 +2954,9 @@ "resolved": "https://registry.npmjs.org/copy-dereference/-/copy-dereference-1.0.0.tgz" }, "core-js": { - "version": "2.4.0", - "from": "core-js@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.0.tgz" + "version": "2.4.1", + "from": "core-js@latest", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz" }, "core-object": { "version": "0.0.2", @@ -3334,11 +3334,6 @@ "from": "es6-module-loader@>=0.17.4 <0.18.0", "resolved": "https://registry.npmjs.org/es6-module-loader/-/es6-module-loader-0.17.9.tgz" }, - "es6-shim": { - "version": "0.35.0", - "from": "es6-shim@0.35.0", - "resolved": "https://registry.npmjs.org/es6-shim/-/es6-shim-0.35.0.tgz" - }, "es6-symbol": { "version": "3.0.2", "from": "es6-symbol@>=3.0.2 <3.1.0", diff --git a/package.json b/package.json index 6da4ccd2cc..7fbde5c023 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "postinstall": "node tools/npm/copy-npm-shrinkwrap && webdriver-manager update" }, "dependencies": { - "es6-shim": "^0.35.0", + "core-js": "^2.4.1", "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-beta.11", "zone.js": "^0.6.17" diff --git a/tools/cjs-jasmine/index-tools.ts b/tools/cjs-jasmine/index-tools.ts index c22a52db95..b5764cb7dc 100644 --- a/tools/cjs-jasmine/index-tools.ts +++ b/tools/cjs-jasmine/index-tools.ts @@ -4,7 +4,7 @@ var glob = require('glob'); require('zone.js/dist/zone-node.js'); var JasmineRunner = require('jasmine'); var path = require('path'); -// require('es6-shim/es6-shim.js'); +// require('core-js'); require('zone.js/dist/long-stack-trace-zone.js'); require('zone.js/dist/proxy.js'); require('zone.js/dist/sync-test.js'); diff --git a/tools/cjs-jasmine/index.ts b/tools/cjs-jasmine/index.ts index 79b6a4b9fb..2f657b3194 100644 --- a/tools/cjs-jasmine/index.ts +++ b/tools/cjs-jasmine/index.ts @@ -5,7 +5,7 @@ require('zone.js/dist/zone-node.js'); var JasmineRunner = require('jasmine'); var path = require('path'); require('source-map-support').install(); -// require('es6-shim/es6-shim.js'); +// require('core-js'); require('zone.js/dist/long-stack-trace-zone.js'); require('zone.js/dist/proxy.js'); require('zone.js/dist/sync-test.js');