Make prospective syntax compatible
Summary: Can't run `RNTester` app and got the error below: ![image](https://user-images.githubusercontent.com/6890034/29361000-1ae6cfce-82b8-11e7-9522-b827de2712f7.png) Make prospective syntax(trailing commas in function parameter lists and calls, supported in ES8) compatible. If correct, the `RNTester` can be started. Closes https://github.com/facebook/react-native/pull/15510 Differential Revision: D5644673 Pulled By: TheSavior fbshipit-source-id: df34638f37b81f04cea5cf7a25fc7405d4321ea6
This commit is contained in:
parent
f69638b56f
commit
9e71b6065f
|
@ -28,15 +28,15 @@ function buildRegExps(basePath, dirPaths) {
|
||||||
folderPath instanceof RegExp
|
folderPath instanceof RegExp
|
||||||
? new RegExp(
|
? new RegExp(
|
||||||
`^${escapeRegExp(
|
`^${escapeRegExp(
|
||||||
path.resolve(basePath, '.').replace(/\\/g, '/'),
|
path.resolve(basePath, '.').replace(/\\/g, '/')
|
||||||
)}/${folderPath.source}`,
|
)}/${folderPath.source}`,
|
||||||
folderPath.flags,
|
folderPath.flags
|
||||||
)
|
)
|
||||||
: new RegExp(
|
: new RegExp(
|
||||||
`^${escapeRegExp(
|
`^${escapeRegExp(
|
||||||
path.resolve(basePath, folderPath).replace(/\\/g, '/'),
|
path.resolve(basePath, folderPath).replace(/\\/g, '/')
|
||||||
)}`,
|
)}`
|
||||||
),
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue