diff --git a/lib/6to5/transformation/transformers/optional-core-aliasing.js b/lib/6to5/transformation/transformers/optional-core-aliasing.js index c0db8bd9bd..62613bf198 100644 --- a/lib/6to5/transformation/transformers/optional-core-aliasing.js +++ b/lib/6to5/transformation/transformers/optional-core-aliasing.js @@ -23,7 +23,7 @@ exports.optional = true; exports.ast = { enter: function (ast, file) { - file._coreId = file.addImport("core-js/library", "core"); + file._coreId = file.addImport("6to5-runtime/core-js", "core"); }, exit: function (ast, file) { diff --git a/lib/6to5/transformation/transformers/optional-external-regenerator-runtime.js b/lib/6to5/transformation/transformers/optional-external-regenerator-runtime.js index 9294a6c76e..6fee6be612 100644 --- a/lib/6to5/transformation/transformers/optional-external-regenerator-runtime.js +++ b/lib/6to5/transformation/transformers/optional-external-regenerator-runtime.js @@ -4,7 +4,7 @@ exports.optional = true; exports.ast = { enter: function (ast, file) { - file._regeneratorId = file.addImport("regenerator/runtime-module", "regeneratorRuntime"); + file._regeneratorId = file.addImport("6to5-runtime/regenerator", "regeneratorRuntime"); } }; diff --git a/lib/6to5/transformation/transformers/optional-external-runtime.js b/lib/6to5/transformation/transformers/optional-external-runtime.js index ff39454e4d..56c14e0fc4 100644 --- a/lib/6to5/transformation/transformers/optional-external-runtime.js +++ b/lib/6to5/transformation/transformers/optional-external-runtime.js @@ -5,6 +5,6 @@ exports.optional = true; // AST is built. exports.ast = { enter: function (ast, file) { - file.opts.runtime = file.addImport(file.opts.runtime, "to5Runtime").name; + file.opts.runtime = file.addImport("6to5-runtime/6to5", "to5Runtime").name; } }; diff --git a/test/fixtures/transformation/optional-core-aliasing/aliased-constructors/expected.js b/test/fixtures/transformation/optional-core-aliasing/aliased-constructors/expected.js index 8c6ff60ed1..b517b90ea6 100644 --- a/test/fixtures/transformation/optional-core-aliasing/aliased-constructors/expected.js +++ b/test/fixtures/transformation/optional-core-aliasing/aliased-constructors/expected.js @@ -1,6 +1,6 @@ "use strict"; -var _core = require("core-js/library"); +var _core = require("6to5-runtime/core-js"); obj.constructor === Object; obj.constructor === _core.Promise; diff --git a/test/fixtures/transformation/optional-core-aliasing/es6-destructuring/expected.js b/test/fixtures/transformation/optional-core-aliasing/es6-destructuring/expected.js index 15e3ce78b9..7abd2c0cd5 100644 --- a/test/fixtures/transformation/optional-core-aliasing/es6-destructuring/expected.js +++ b/test/fixtures/transformation/optional-core-aliasing/es6-destructuring/expected.js @@ -16,7 +16,7 @@ var _slicedToArray = function (arr, i) { } }; -var _core = require("core-js/library"); +var _core = require("6to5-runtime/core-js"); var _ref = ["hello", [", ", "junk"], ["world"]]; diff --git a/test/fixtures/transformation/optional-core-aliasing/es6-for-of/expected.js b/test/fixtures/transformation/optional-core-aliasing/es6-for-of/expected.js index 2669fd4d0c..0fdc4cc4f5 100644 --- a/test/fixtures/transformation/optional-core-aliasing/es6-for-of/expected.js +++ b/test/fixtures/transformation/optional-core-aliasing/es6-for-of/expected.js @@ -1,6 +1,6 @@ "use strict"; -var _core = require("core-js/library"); +var _core = require("6to5-runtime/core-js"); for (var _iterator = _core.$for.getIterator(arr), _step; !(_step = _iterator.next()).done;) { var i = _step.value; diff --git a/test/fixtures/transformation/optional-core-aliasing/es6-spread/expected.js b/test/fixtures/transformation/optional-core-aliasing/es6-spread/expected.js index 2a41ccd997..d01fa15ace 100644 --- a/test/fixtures/transformation/optional-core-aliasing/es6-spread/expected.js +++ b/test/fixtures/transformation/optional-core-aliasing/es6-spread/expected.js @@ -4,6 +4,6 @@ var _toArray = function (arr) { return Array.isArray(arr) ? arr : _core.Array.from(arr); }; -var _core = require("core-js/library"); +var _core = require("6to5-runtime/core-js"); var lyrics = ["head", "and", "toes"].concat(_toArray(parts)); diff --git a/test/fixtures/transformation/optional-core-aliasing/es7-array-comprehensions/expected.js b/test/fixtures/transformation/optional-core-aliasing/es7-array-comprehensions/expected.js index 0bf67a612a..9ea3b708c6 100644 --- a/test/fixtures/transformation/optional-core-aliasing/es7-array-comprehensions/expected.js +++ b/test/fixtures/transformation/optional-core-aliasing/es7-array-comprehensions/expected.js @@ -1,6 +1,6 @@ "use strict"; -var _core = require("core-js/library"); +var _core = require("6to5-runtime/core-js"); var arr = (function () { var _arr = []; diff --git a/test/fixtures/transformation/optional-external-regenerator-runtime/basic/expected.js b/test/fixtures/transformation/optional-external-regenerator-runtime/basic/expected.js index 00320c54b6..275ec24ac5 100644 --- a/test/fixtures/transformation/optional-external-regenerator-runtime/basic/expected.js +++ b/test/fixtures/transformation/optional-external-regenerator-runtime/basic/expected.js @@ -1,6 +1,6 @@ "use strict"; -var _regeneratorRuntime = require("regenerator/runtime-module"); +var _regeneratorRuntime = require("6to5-runtime/regenerator"); void _regeneratorRuntime.mark(function callee$0$0() { return _regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { diff --git a/test/fixtures/transformation/optional-external-runtime/amd/expected.js b/test/fixtures/transformation/optional-external-runtime/amd/expected.js index 20e759af12..6e504dd685 100644 --- a/test/fixtures/transformation/optional-external-runtime/amd/expected.js +++ b/test/fixtures/transformation/optional-external-runtime/amd/expected.js @@ -1,6 +1,6 @@ -define(["exports", "6to5-runtime", "someModule"], function (exports, _to5Runtime2, _someModule) { +define(["exports", "6to5-runtime/6to5", "someModule"], function (exports, _to5Runtime6to5, _someModule) { "use strict"; - var _to5Runtime = _to5Runtime2; + var _to5Runtime = _to5Runtime6to5; var foo = _to5Runtime.interopRequire(_someModule); }); diff --git a/test/fixtures/transformation/optional-external-runtime/commonjs/expected.js b/test/fixtures/transformation/optional-external-runtime/commonjs/expected.js index b10bbe6f09..d660411bc0 100644 --- a/test/fixtures/transformation/optional-external-runtime/commonjs/expected.js +++ b/test/fixtures/transformation/optional-external-runtime/commonjs/expected.js @@ -1,5 +1,5 @@ "use strict"; -var _to5Runtime = require("6to5-runtime"); +var _to5Runtime = require("6to5-runtime/6to5"); var foo = _to5Runtime.interopRequireWildcard(require("someModule")); diff --git a/test/fixtures/transformation/optional-external-runtime/options.json b/test/fixtures/transformation/optional-external-runtime/options.json index 44c5164a67..5149c1159a 100644 --- a/test/fixtures/transformation/optional-external-runtime/options.json +++ b/test/fixtures/transformation/optional-external-runtime/options.json @@ -1,4 +1,3 @@ { - "runtime": "6to5-runtime", "optional": ["externalRuntime"] }