-
Notifications
You must be signed in to change notification settings - Fork 626
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use babel runtime instead of relying on global babelHelpers and regen…
…erator
- Loading branch information
1 parent
d7ddbba
commit d717970
Showing
8 changed files
with
103 additions
and
14 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
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
25 changes: 25 additions & 0 deletions
25
packages/metro/src/JSTransformer/worker/__tests__/__snapshots__/worker-test.js.snap
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 |
---|---|---|
@@ -1,3 +1,28 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`code transformation worker: reports filename when encountering unsupported dynamic dependency 1`] = `"/root/local/file.js:3:10: calls to \`require\` expect exactly 1 string literal argument, but this was found: \`require(a)\`."`; | ||
|
||
exports[`code transformation worker: transforms an es module with regenerator 1`] = ` | ||
"__d(function (global, _$$_REQUIRE, module, exports, _dependencyMap) { | ||
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0], \\"@babel/runtime/helpers/interopRequireDefault\\"); | ||
Object.defineProperty(exports, \\"__esModule\\", { | ||
value: true | ||
}); | ||
exports.test = test; | ||
var _regenerator = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1], \\"@babel/runtime/regenerator\\")); | ||
function test() { | ||
return _regenerator.default.async(function test$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
case \\"end\\": | ||
return _context.stop(); | ||
} | ||
} | ||
}, null, this); | ||
} | ||
});" | ||
`; |
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 |
---|---|---|
|
@@ -497,9 +497,22 @@ | |
dependencies: | ||
"@babel/helper-plugin-utils" "7.0.0-beta.54" | ||
|
||
<<<<<<< HEAD | ||
"@babel/[email protected]": | ||
version "7.0.0-beta.54" | ||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0-beta.54.tgz#4f0852df0f4b1db2426c40facd8fe5f028a3dbc9" | ||
======= | ||
"@babel/[email protected]": | ||
version "7.0.0-beta.48" | ||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.0.0-beta.48.tgz#166ceb0a96948507c851edbd9e9c5aa98f8ead71" | ||
dependencies: | ||
"@babel/helper-module-imports" "7.0.0-beta.48" | ||
"@babel/helper-plugin-utils" "7.0.0-beta.48" | ||
|
||
"@babel/[email protected]": | ||
version "7.0.0-beta.48" | ||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0-beta.48.tgz#5cc1c14bbc4f5132e5bd1ecf7ff3e9adeb9dfe35" | ||
>>>>>>> Use babel runtime instead of relying on global babelHelpers and regenerator | ||
dependencies: | ||
"@babel/helper-plugin-utils" "7.0.0-beta.54" | ||
|
||
|
@@ -5152,9 +5165,15 @@ regenerator-runtime@^0.11.0: | |
version "0.11.0" | ||
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz#7e54fe5b5ccd5d6624ea6255c3473be090b802e1" | ||
|
||
<<<<<<< HEAD | ||
regenerator-transform@^0.13.3: | ||
version "0.13.3" | ||
resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb" | ||
======= | ||
regenerator-transform@^0.12.3: | ||
version "0.12.4" | ||
resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.12.4.tgz#aa9b6c59f4b97be080e972506c560b3bccbfcff0" | ||
>>>>>>> Use babel runtime instead of relying on global babelHelpers and regenerator | ||
dependencies: | ||
private "^0.1.6" | ||
|
||
|