forked from babel/babel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reference the CommonJS helpers when a file is not explicitly a module. (
- Loading branch information
1 parent
22bcfbe
commit 023044c
Showing
13 changed files
with
67 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
23 changes: 0 additions & 23 deletions
23
...s/babel-plugin-transform-runtime/test/fixtures/use-options/corejs-useES6Modules/output.js
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
.../babel-plugin-transform-runtime/test/fixtures/use-options/corejs-useES6Modules/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import _classCallCheck from "@babel/runtime-corejs2/helpers/esm/classCallCheck"; | ||
import _possibleConstructorReturn from "@babel/runtime-corejs2/helpers/esm/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime-corejs2/helpers/esm/getPrototypeOf"; | ||
import _inherits from "@babel/runtime-corejs2/helpers/esm/inherits"; | ||
|
||
let Foo = | ||
/*#__PURE__*/ | ||
function (_Bar) { | ||
_inherits(Foo, _Bar); | ||
|
||
function Foo() { | ||
_classCallCheck(this, Foo); | ||
|
||
return _possibleConstructorReturn(this, _getPrototypeOf(Foo).apply(this, arguments)); | ||
} | ||
|
||
return Foo; | ||
}(Bar); |
File renamed without changes.
23 changes: 0 additions & 23 deletions
23
packages/babel-plugin-transform-runtime/test/fixtures/use-options/corejs/output.js
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
packages/babel-plugin-transform-runtime/test/fixtures/use-options/corejs/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import _classCallCheck from "@babel/runtime-corejs2/helpers/classCallCheck"; | ||
import _possibleConstructorReturn from "@babel/runtime-corejs2/helpers/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime-corejs2/helpers/getPrototypeOf"; | ||
import _inherits from "@babel/runtime-corejs2/helpers/inherits"; | ||
|
||
let Foo = | ||
/*#__PURE__*/ | ||
function (_Bar) { | ||
_inherits(Foo, _Bar); | ||
|
||
function Foo() { | ||
_classCallCheck(this, Foo); | ||
|
||
return _possibleConstructorReturn(this, _getPrototypeOf(Foo).apply(this, arguments)); | ||
} | ||
|
||
return Foo; | ||
}(Bar); |
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions
8
...xtures/use-options/useESModules/output.js → ...es/use-options/useESModules-cjs/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-transform-runtime/test/fixtures/use-options/useESModules-mjs/input.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
class Foo extends Bar {} |
3 changes: 3 additions & 0 deletions
3
...es/babel-plugin-transform-runtime/test/fixtures/use-options/useESModules-mjs/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"plugins": [["transform-runtime", { "useESModules": true }], "transform-classes"] | ||
} |
18 changes: 18 additions & 0 deletions
18
...ages/babel-plugin-transform-runtime/test/fixtures/use-options/useESModules-mjs/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; | ||
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf"; | ||
import _inherits from "@babel/runtime/helpers/esm/inherits"; | ||
|
||
let Foo = | ||
/*#__PURE__*/ | ||
function (_Bar) { | ||
_inherits(Foo, _Bar); | ||
|
||
function Foo() { | ||
_classCallCheck(this, Foo); | ||
|
||
return _possibleConstructorReturn(this, _getPrototypeOf(Foo).apply(this, arguments)); | ||
} | ||
|
||
return Foo; | ||
}(Bar); |