-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
feb78c7
commit c4320a6
Showing
13 changed files
with
106 additions
and
20 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
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
11 changes: 11 additions & 0 deletions
11
packages/babel-plugin-transform-runtime/test/regression.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
it("module.exports.default is correctly updated", () => { | ||
const typeofHelper = require("@babel/runtime/helpers/typeof"); | ||
|
||
expect(typeof typeofHelper).toBe("function"); | ||
expect(typeof typeofHelper.default).toBe("function"); | ||
|
||
typeofHelper(); | ||
|
||
expect(typeof typeofHelper).toBe("function"); | ||
expect(typeof typeofHelper.default).toBe("function"); | ||
}); |
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
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
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
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,17 @@ | ||
import _Symbol from "@babel/runtime-corejs2/core-js/symbol"; | ||
import _Symbol$iterator from "@babel/runtime-corejs2/core-js/symbol/iterator"; | ||
export default function _typeof(obj) { | ||
"@babel/helpers - typeof"; | ||
|
||
if (typeof _Symbol === "function" && typeof _Symbol$iterator === "symbol") { | ||
_typeof = function _typeof(obj) { | ||
return typeof obj; | ||
}; | ||
} else { | ||
_typeof = function _typeof(obj) { | ||
return obj && typeof _Symbol === "function" && obj.constructor === _Symbol && obj !== _Symbol.prototype ? "symbol" : typeof obj; | ||
}; | ||
} | ||
|
||
return _typeof(obj); | ||
} |
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,26 @@ | ||
var _Symbol = require("@babel/runtime-corejs2/core-js/symbol"); | ||
|
||
var _Symbol$iterator = require("@babel/runtime-corejs2/core-js/symbol/iterator"); | ||
|
||
function _typeof(obj) { | ||
"@babel/helpers - typeof"; | ||
|
||
if (typeof _Symbol === "function" && typeof _Symbol$iterator === "symbol") { | ||
module.exports = _typeof = function _typeof(obj) { | ||
return typeof obj; | ||
}; | ||
|
||
module.exports["default"] = module.exports, module.exports.__esModule = true; | ||
} else { | ||
module.exports = _typeof = function _typeof(obj) { | ||
return obj && typeof _Symbol === "function" && obj.constructor === _Symbol && obj !== _Symbol.prototype ? "symbol" : typeof obj; | ||
}; | ||
|
||
module.exports["default"] = module.exports, module.exports.__esModule = true; | ||
} | ||
|
||
return _typeof(obj); | ||
} | ||
|
||
module.exports = _typeof; | ||
module.exports["default"] = module.exports, module.exports.__esModule = true; |
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
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
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
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,15 @@ | ||
export default function _typeof(obj) { | ||
"@babel/helpers - typeof"; | ||
|
||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { | ||
_typeof = function _typeof(obj) { | ||
return typeof obj; | ||
}; | ||
} else { | ||
_typeof = function _typeof(obj) { | ||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; | ||
}; | ||
} | ||
|
||
return _typeof(obj); | ||
} |
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,22 @@ | ||
function _typeof(obj) { | ||
"@babel/helpers - typeof"; | ||
|
||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { | ||
module.exports = _typeof = function _typeof(obj) { | ||
return typeof obj; | ||
}; | ||
|
||
module.exports["default"] = module.exports, module.exports.__esModule = true; | ||
} else { | ||
module.exports = _typeof = function _typeof(obj) { | ||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; | ||
}; | ||
|
||
module.exports["default"] = module.exports, module.exports.__esModule = true; | ||
} | ||
|
||
return _typeof(obj); | ||
} | ||
|
||
module.exports = _typeof; | ||
module.exports["default"] = module.exports, module.exports.__esModule = true; |