Просмотр исходного кода

Remove the es6-promise polyfill.

Amber requires a native Promise and no longer ships or scaffolds the
polyfill; the AMD path this package declared for it was what put
amber/es6-promise back into every config.js generated around it. The
deploy, devel and test-runner bundles now require the app directly,
and the devDependency goes with it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Herby Vojčík 2 дней назад
Родитель
Сommit
317b0cda66
3 измененных файлов с 5 добавлено и 12 удалено
  1. 5 6
      Gruntfile.js
  2. 0 5
      es6-promise.amd.json
  3. 0 1
      package.json

+ 5 - 6
Gruntfile.js

@@ -29,9 +29,8 @@ module.exports = function (grunt) {
     grunt.registerTask('devel', ['amdconfig:app', 'requirejs:devel']);
     grunt.registerTask('deploy', ['amdconfig:app', 'requirejs:deploy']);
 
-    var polyfillThenPromiseApp = function () {
-        define(["require", "amber/es6-promise"], function (require, promiseLib) {
-            promiseLib.polyfill();
+    var promiseApp = function () {
+        define(["require"], function (require) {
             return new Promise(function (resolve, reject) {
                 require(["__app__"], resolve, reject);
             });
@@ -73,7 +72,7 @@ module.exports = function (grunt) {
                 options: {
                     mainConfigFile: "config.js",
                     rawText: {
-                        "app": '(' + polyfillThenPromiseApp + '());',
+                        "app": '(' + promiseApp + '());',
                         "__app__": 'define(["deploy", "amber/core/Platform-Browser"],function(x){return x});'
                     },
                     pragmas: {
@@ -90,7 +89,7 @@ module.exports = function (grunt) {
                 options: {
                     mainConfigFile: "config.js",
                     rawText: {
-                        "app": '(' + polyfillThenPromiseApp + '());',
+                        "app": '(' + promiseApp + '());',
                         "__app__": 'define(["devel", "amber/core/Platform-Browser"],function(x){return x});'
                     },
                     include: ['config', 'node_modules/requirejs/require', 'app', '__app__'],
@@ -110,7 +109,7 @@ module.exports = function (grunt) {
                                 });
                             });
                         } + "());",
-                        "app": "(" + polyfillThenPromiseApp + "());"
+                        "app": "(" + promiseApp + "());"
                     },
                     paths: {"amber_devkit": helpers.libPath},
                     pragmas: {

+ 0 - 5
es6-promise.amd.json

@@ -1,5 +0,0 @@
-{
-  "paths": {
-    "amber/es6-promise": ["./es6-promise", "./dist/es6-promise", "./promise"]
-  }
-}

+ 0 - 1
package.json

@@ -38,7 +38,6 @@
     "@ambers/helios": ">=0.10.0",
     "@ambers/ide-starter-modal": "^0.2.0",
     "@ambers/sdk": "^0.12.0",
-    "es6-promise": "^4.2.4",
     "grunt": "^1.0.3",
     "grunt-contrib-clean": "^1.1.0",
     "grunt-contrib-requirejs": "^1.0.0",