mirror of https://github.com/status-im/metro.git
Fix the suppress comment regex for react_native
Reviewed By: davidaurelio Differential Revision: D4435640 fbshipit-source-id: c680aee6931979859f04c0dca47037ba6f6cba73
This commit is contained in:
parent
78df7bd070
commit
ec6d380a7a
|
@ -59,9 +59,9 @@ function compactMapping(mapping: BabelRawMapping): RawMapping {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof name !== 'string') {
|
if (typeof name !== 'string') {
|
||||||
/* $FlowFixMe(>=0.38.0 site=react_native_fb) - Flow error detected during
|
/* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow error
|
||||||
* the deployment of v0.38.0. To see the error, remove this comment and run
|
* detected during the deployment of v0.38.0. To see the error, remove this
|
||||||
* flow */
|
* comment and run flow */
|
||||||
return ([line, column, original.line, original.column]: SourceMapping);
|
return ([line, column, original.line, original.column]: SourceMapping);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,13 +80,13 @@ function addMappingsForFile(generator, mappings, module, carryOver) {
|
||||||
mapping[0] + carryOver,
|
mapping[0] + carryOver,
|
||||||
// lines start at 1, columns start at 0
|
// lines start at 1, columns start at 0
|
||||||
mapping[0] === 1 && mapping[1] + columnOffset || mapping[1],
|
mapping[0] === 1 && mapping[1] + columnOffset || mapping[1],
|
||||||
/* $FlowFixMe(>=0.38.0 site=react_native_fb) - Flow error detected during
|
/* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow error
|
||||||
* the deployment of v0.38.0. To see the error, remove this comment and
|
* detected during the deployment of v0.38.0. To see the error, remove
|
||||||
* run flow */
|
* this comment and run flow */
|
||||||
mapping[2],
|
mapping[2],
|
||||||
/* $FlowFixMe(>=0.38.0 site=react_native_fb) - Flow error detected during
|
/* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow error
|
||||||
* the deployment of v0.38.0. To see the error, remove this comment and
|
* detected during the deployment of v0.38.0. To see the error, remove
|
||||||
* run flow */
|
* this comment and run flow */
|
||||||
mapping[3],
|
mapping[3],
|
||||||
//$FlowIssue #15417846
|
//$FlowIssue #15417846
|
||||||
mapping[4],
|
mapping[4],
|
||||||
|
|
|
@ -71,8 +71,9 @@ function optimize(transformed, file, originalCode, options): TransformResult {
|
||||||
}
|
}
|
||||||
|
|
||||||
function optimizeCode(code, map, filename, inliningOptions) {
|
function optimizeCode(code, map, filename, inliningOptions) {
|
||||||
/* $FlowFixMe(>=0.38.0 site=react_native_fb) - Flow error detected during the
|
/* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow error
|
||||||
* deployment of v0.38.0. To see the error, remove this comment and run flow
|
* detected during the deployment of v0.38.0. To see the error, remove this
|
||||||
|
* comment and run flow
|
||||||
*/
|
*/
|
||||||
return babel.transform(code, {
|
return babel.transform(code, {
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|
|
@ -161,9 +161,9 @@ class Cache {
|
||||||
const ret = (Object.create(null): Record);
|
const ret = (Object.create(null): Record);
|
||||||
ret.metadata = record.metadata;
|
ret.metadata = record.metadata;
|
||||||
ret.data = Object.create(null);
|
ret.data = Object.create(null);
|
||||||
/* $FlowFixMe(>=0.36.0 site=react_native_fb) Flow error detected
|
/* $FlowFixMe(>=0.36.0 site=react_native_fb,react_native_oss) Flow
|
||||||
* during the deploy of Flow v0.36.0. To see the error, remove this
|
* error detected during the deploy of Flow v0.36.0. To see the
|
||||||
* comment and run Flow */
|
* error, remove this comment and run Flow */
|
||||||
fieldNames.forEach((field, index) =>
|
fieldNames.forEach((field, index) =>
|
||||||
ret.data[field] = ref[index]
|
ret.data[field] = ref[index]
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue