metro 0.85.0 → 0.87.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +14 -14
- package/src/DeltaBundler/Serializers/getExplodedSourceMap.d.ts +3 -2
- package/src/DeltaBundler/Serializers/getExplodedSourceMap.js.flow +2 -1
- package/src/DeltaBundler/Serializers/helpers/getSourceMapInfo.d.ts +3 -2
- package/src/DeltaBundler/Serializers/helpers/getSourceMapInfo.js.flow +2 -1
- package/src/DeltaBundler/Serializers/sourceMapGenerator.d.ts +4 -4
- package/src/DeltaBundler/Serializers/sourceMapGenerator.js +2 -2
- package/src/DeltaBundler/Serializers/sourceMapGenerator.js.flow +7 -5
- package/src/Server/symbolicate.js +66 -33
- package/src/Server/symbolicate.js.flow +79 -40
- package/src/index.d.ts +1 -23
- package/src/index.flow.js +1 -15
- package/src/index.flow.js.flow +0 -20
- package/src/node-haste/DependencyGraph/ModuleResolution.js +2 -0
- package/src/node-haste/DependencyGraph/ModuleResolution.js.flow +3 -0
- package/src/node-haste/DependencyGraph/createFileMap.js +23 -30
- package/src/node-haste/DependencyGraph/createFileMap.js.flow +23 -37
- package/src/DeltaBundler/__fixtures__/hasteImpl.js +0 -17
- package/src/integration_tests/basic_bundle/AssetRegistry.js +0 -7
- package/src/integration_tests/basic_bundle/AssetRegistry.js.flow +0 -17
- package/src/integration_tests/basic_bundle/Bar.js +0 -7
- package/src/integration_tests/basic_bundle/Bar.js.flow +0 -15
- package/src/integration_tests/basic_bundle/ErrorBundle.js +0 -8
- package/src/integration_tests/basic_bundle/ErrorBundle.js.flow +0 -23
- package/src/integration_tests/basic_bundle/Foo.js +0 -7
- package/src/integration_tests/basic_bundle/Foo.js.flow +0 -15
- package/src/integration_tests/basic_bundle/TestBigInt.js +0 -5
- package/src/integration_tests/basic_bundle/TestBigInt.js.flow +0 -17
- package/src/integration_tests/basic_bundle/TestBundle.js +0 -13
- package/src/integration_tests/basic_bundle/TestBundle.js.flow +0 -21
- package/src/integration_tests/basic_bundle/TestPolyfill.js +0 -3
- package/src/integration_tests/basic_bundle/TestPolyfill.js.flow +0 -13
- package/src/integration_tests/basic_bundle/TypeScript.ts +0 -16
- package/src/integration_tests/basic_bundle/build-errors/cannot-resolve-import.js +0 -7
- package/src/integration_tests/basic_bundle/build-errors/cannot-resolve-import.js.flow +0 -17
- package/src/integration_tests/basic_bundle/build-errors/cannot-resolve-multi-line-import-with-escapes.js +0 -4
- package/src/integration_tests/basic_bundle/build-errors/cannot-resolve-multi-line-import-with-escapes.js.flow +0 -29
- package/src/integration_tests/basic_bundle/build-errors/cannot-resolve-multi-line-import.js +0 -4
- package/src/integration_tests/basic_bundle/build-errors/cannot-resolve-multi-line-import.js.flow +0 -29
- package/src/integration_tests/basic_bundle/build-errors/cannot-resolve-require-with-embedded-comment.js +0 -4
- package/src/integration_tests/basic_bundle/build-errors/cannot-resolve-require-with-embedded-comment.js.flow +0 -17
- package/src/integration_tests/basic_bundle/build-errors/cannot-resolve-require.js +0 -4
- package/src/integration_tests/basic_bundle/build-errors/cannot-resolve-require.js.flow +0 -17
- package/src/integration_tests/basic_bundle/build-errors/cannot-resolve-specifier-with-escapes.js +0 -4
- package/src/integration_tests/basic_bundle/build-errors/cannot-resolve-specifier-with-escapes.js.flow +0 -19
- package/src/integration_tests/basic_bundle/build-errors/inline-requires-cannot-resolve-import.js +0 -7
- package/src/integration_tests/basic_bundle/build-errors/inline-requires-cannot-resolve-import.js.flow +0 -17
- package/src/integration_tests/basic_bundle/build-errors/inline-requires-cannot-resolve-require.js +0 -4
- package/src/integration_tests/basic_bundle/build-errors/inline-requires-cannot-resolve-require.js.flow +0 -17
- package/src/integration_tests/basic_bundle/excluded_from_file_map.js +0 -7
- package/src/integration_tests/basic_bundle/excluded_from_file_map.js.flow +0 -11
- package/src/integration_tests/basic_bundle/import-export/export-1.js +0 -12
- package/src/integration_tests/basic_bundle/import-export/export-1.js.flow +0 -19
- package/src/integration_tests/basic_bundle/import-export/export-2.js +0 -12
- package/src/integration_tests/basic_bundle/import-export/export-2.js.flow +0 -19
- package/src/integration_tests/basic_bundle/import-export/export-3.js +0 -12
- package/src/integration_tests/basic_bundle/import-export/export-3.js.flow +0 -19
- package/src/integration_tests/basic_bundle/import-export/export-4.js +0 -12
- package/src/integration_tests/basic_bundle/import-export/export-4.js.flow +0 -19
- package/src/integration_tests/basic_bundle/import-export/export-5.js +0 -5
- package/src/integration_tests/basic_bundle/import-export/export-5.js.flow +0 -15
- package/src/integration_tests/basic_bundle/import-export/export-6.js +0 -8
- package/src/integration_tests/basic_bundle/import-export/export-6.js.flow +0 -15
- package/src/integration_tests/basic_bundle/import-export/export-7.js +0 -5
- package/src/integration_tests/basic_bundle/import-export/export-7.js.flow +0 -15
- package/src/integration_tests/basic_bundle/import-export/export-8.js +0 -8
- package/src/integration_tests/basic_bundle/import-export/export-8.js.flow +0 -15
- package/src/integration_tests/basic_bundle/import-export/export-null.js +0 -8
- package/src/integration_tests/basic_bundle/import-export/export-null.js.flow +0 -15
- package/src/integration_tests/basic_bundle/import-export/export-primitive-default.js +0 -8
- package/src/integration_tests/basic_bundle/import-export/export-primitive-default.js.flow +0 -15
- package/src/integration_tests/basic_bundle/import-export/index.js +0 -76
- package/src/integration_tests/basic_bundle/import-export/index.js.flow +0 -43
- package/src/integration_tests/basic_bundle/import-export/utils.js +0 -1
- package/src/integration_tests/basic_bundle/import-export/utils.js.flow +0 -14
- package/src/integration_tests/basic_bundle/loadBundleAsyncForTest.js +0 -6
- package/src/integration_tests/basic_bundle/loadBundleAsyncForTest.js.flow +0 -20
- package/src/integration_tests/basic_bundle/not_a_source_file.xyz +0 -1
- package/src/integration_tests/basic_bundle/optional-dependencies/index.js +0 -20
- package/src/integration_tests/basic_bundle/optional-dependencies/index.js.flow +0 -34
- package/src/integration_tests/basic_bundle/optional-dependencies/optional-b.js +0 -3
- package/src/integration_tests/basic_bundle/optional-dependencies/optional-b.js.flow +0 -11
- package/src/integration_tests/basic_bundle/optional-dependencies/optional-c.js +0 -3
- package/src/integration_tests/basic_bundle/optional-dependencies/optional-c.js.flow +0 -11
- package/src/integration_tests/basic_bundle/optional-dependencies/required-a.js +0 -3
- package/src/integration_tests/basic_bundle/optional-dependencies/required-a.js.flow +0 -11
- package/src/integration_tests/basic_bundle/polyfill.js +0 -3
- package/src/integration_tests/basic_bundle/require-context/conflict.js +0 -12
- package/src/integration_tests/basic_bundle/require-context/conflict.js.flow +0 -27
- package/src/integration_tests/basic_bundle/require-context/empty.js +0 -17
- package/src/integration_tests/basic_bundle/require-context/empty.js.flow +0 -26
- package/src/integration_tests/basic_bundle/require-context/matching.js +0 -13
- package/src/integration_tests/basic_bundle/require-context/matching.js.flow +0 -27
- package/src/integration_tests/basic_bundle/require-context/mode-eager.js +0 -11
- package/src/integration_tests/basic_bundle/require-context/mode-eager.js.flow +0 -25
- package/src/integration_tests/basic_bundle/require-context/mode-lazy-once.js +0 -11
- package/src/integration_tests/basic_bundle/require-context/mode-lazy-once.js.flow +0 -25
- package/src/integration_tests/basic_bundle/require-context/mode-lazy.js +0 -11
- package/src/integration_tests/basic_bundle/require-context/mode-lazy.js.flow +0 -25
- package/src/integration_tests/basic_bundle/require-context/mode-sync.js +0 -9
- package/src/integration_tests/basic_bundle/require-context/mode-sync.js.flow +0 -24
- package/src/integration_tests/basic_bundle/require-context/subdir/a.js +0 -3
- package/src/integration_tests/basic_bundle/require-context/subdir/a.js.flow +0 -11
- package/src/integration_tests/basic_bundle/require-context/subdir/b.js +0 -7
- package/src/integration_tests/basic_bundle/require-context/subdir/b.js.flow +0 -11
- package/src/integration_tests/basic_bundle/require-context/subdir/c.js +0 -3
- package/src/integration_tests/basic_bundle/require-context/subdir/c.js.flow +0 -11
- package/src/integration_tests/basic_bundle/require-context/subdir/nested/d.js +0 -3
- package/src/integration_tests/basic_bundle/require-context/subdir/nested/d.js.flow +0 -11
- package/src/integration_tests/basic_bundle/require-context/subdir-conflict/index.js +0 -3
- package/src/integration_tests/basic_bundle/require-context/subdir-conflict/index.js.flow +0 -11
- package/src/integration_tests/basic_bundle/require-context/utils.js +0 -18
- package/src/integration_tests/basic_bundle/require-context/utils.js.flow +0 -44
- package/src/integration_tests/basic_bundle/require-resolveWeak/import-and-resolveWeak.js +0 -13
- package/src/integration_tests/basic_bundle/require-resolveWeak/import-and-resolveWeak.js.flow +0 -33
- package/src/integration_tests/basic_bundle/require-resolveWeak/multiple.js +0 -10
- package/src/integration_tests/basic_bundle/require-resolveWeak/multiple.js.flow +0 -23
- package/src/integration_tests/basic_bundle/require-resolveWeak/never-required.js +0 -8
- package/src/integration_tests/basic_bundle/require-resolveWeak/never-required.js.flow +0 -21
- package/src/integration_tests/basic_bundle/require-resolveWeak/require-and-resolveWeak.js +0 -13
- package/src/integration_tests/basic_bundle/require-resolveWeak/require-and-resolveWeak.js.flow +0 -33
- package/src/integration_tests/basic_bundle/require-resolveWeak/subdir/counter-module.js +0 -9
- package/src/integration_tests/basic_bundle/require-resolveWeak/subdir/counter-module.js.flow +0 -18
- package/src/integration_tests/basic_bundle/require-resolveWeak/subdir/throwing-module.js +0 -3
- package/src/integration_tests/basic_bundle/require-resolveWeak/subdir/throwing-module.js.flow +0 -11
- package/src/integration_tests/basic_bundle/require-resolveWeak/utils.js +0 -1
- package/src/integration_tests/basic_bundle/require-resolveWeak/utils.js.flow +0 -14
- package/src/integration_tests/basic_bundle/test.png +0 -0
- package/src/integration_tests/execBundle.js +0 -12
- package/src/integration_tests/execBundle.js.flow +0 -19
- package/src/integration_tests/metro.config.js +0 -46
|
@@ -36,36 +36,29 @@ function _interopRequireWildcard(e, t) {
|
|
|
36
36
|
function _interopRequireDefault(e) {
|
|
37
37
|
return e && e.__esModule ? e : { default: e };
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (!ignorePattern) {
|
|
43
|
-
return / ^/;
|
|
39
|
+
const flattenBlockList = (regexes) => {
|
|
40
|
+
if (!Array.isArray(regexes)) {
|
|
41
|
+
return regexes;
|
|
44
42
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if (Array.isArray(ignorePattern)) {
|
|
65
|
-
return combine(ignorePattern);
|
|
66
|
-
}
|
|
67
|
-
return ignorePattern;
|
|
68
|
-
}
|
|
43
|
+
return new RegExp(
|
|
44
|
+
regexes
|
|
45
|
+
.map((regex, index) => {
|
|
46
|
+
if (regex.flags !== regexes[0].flags) {
|
|
47
|
+
throw new Error(
|
|
48
|
+
"Cannot combine blockList patterns, because they have different flags:\n" +
|
|
49
|
+
" - Pattern 0: " +
|
|
50
|
+
regexes[0].toString() +
|
|
51
|
+
"\n" +
|
|
52
|
+
` - Pattern ${index}: ` +
|
|
53
|
+
regexes[index].toString(),
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
return "(" + regex.source + ")";
|
|
57
|
+
})
|
|
58
|
+
.join("|"),
|
|
59
|
+
regexes[0]?.flags ?? "",
|
|
60
|
+
);
|
|
61
|
+
};
|
|
69
62
|
function createFileMap(config, options) {
|
|
70
63
|
const watch = options?.watch == null ? !_ciInfo.default.isCI : options.watch;
|
|
71
64
|
const { enabled: autoSaveEnabled, ...autoSaveOpts } =
|
|
@@ -115,7 +108,7 @@ function createFileMap(config, options) {
|
|
|
115
108
|
]),
|
|
116
109
|
),
|
|
117
110
|
healthCheck: config.watcher.healthCheck,
|
|
118
|
-
ignorePattern:
|
|
111
|
+
ignorePattern: flattenBlockList(config.resolver.blockList),
|
|
119
112
|
maxWorkers: config.maxWorkers,
|
|
120
113
|
plugins,
|
|
121
114
|
retainAllFiles: true,
|
|
@@ -19,43 +19,29 @@ import MetroFileMap, {
|
|
|
19
19
|
HastePlugin,
|
|
20
20
|
} from 'metro-file-map';
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const ignorePattern = blacklistRE || blockList;
|
|
26
|
-
|
|
27
|
-
// If neither option has been set, use default pattern
|
|
28
|
-
if (!ignorePattern) {
|
|
29
|
-
return / ^/;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const combine = (regexes: Array<RegExp>) =>
|
|
33
|
-
new RegExp(
|
|
34
|
-
regexes
|
|
35
|
-
.map((regex, index) => {
|
|
36
|
-
if (regex.flags !== regexes[0].flags) {
|
|
37
|
-
throw new Error(
|
|
38
|
-
'Cannot combine blockList patterns, because they have different flags:\n' +
|
|
39
|
-
' - Pattern 0: ' +
|
|
40
|
-
regexes[0].toString() +
|
|
41
|
-
'\n' +
|
|
42
|
-
` - Pattern ${index}: ` +
|
|
43
|
-
regexes[index].toString(),
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
return '(' + regex.source + ')';
|
|
47
|
-
})
|
|
48
|
-
.join('|'),
|
|
49
|
-
regexes[0]?.flags ?? '',
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
// If ignorePattern is an array, merge it into one
|
|
53
|
-
if (Array.isArray(ignorePattern)) {
|
|
54
|
-
return combine(ignorePattern);
|
|
22
|
+
const flattenBlockList = (regexes: ConfigT['resolver']['blockList']) => {
|
|
23
|
+
if (!Array.isArray(regexes)) {
|
|
24
|
+
return regexes;
|
|
55
25
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
26
|
+
return new RegExp(
|
|
27
|
+
regexes
|
|
28
|
+
.map((regex, index) => {
|
|
29
|
+
if (regex.flags !== regexes[0].flags) {
|
|
30
|
+
throw new Error(
|
|
31
|
+
'Cannot combine blockList patterns, because they have different flags:\n' +
|
|
32
|
+
' - Pattern 0: ' +
|
|
33
|
+
regexes[0].toString() +
|
|
34
|
+
'\n' +
|
|
35
|
+
` - Pattern ${index}: ` +
|
|
36
|
+
regexes[index].toString(),
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
return '(' + regex.source + ')';
|
|
40
|
+
})
|
|
41
|
+
.join('|'),
|
|
42
|
+
regexes[0]?.flags ?? '',
|
|
43
|
+
);
|
|
44
|
+
};
|
|
59
45
|
|
|
60
46
|
export default function createFileMap(
|
|
61
47
|
config: ConfigT,
|
|
@@ -126,7 +112,7 @@ export default function createFileMap(
|
|
|
126
112
|
]),
|
|
127
113
|
),
|
|
128
114
|
healthCheck: config.watcher.healthCheck,
|
|
129
|
-
ignorePattern:
|
|
115
|
+
ignorePattern: flattenBlockList(config.resolver.blockList),
|
|
130
116
|
maxWorkers: config.maxWorkers,
|
|
131
117
|
plugins,
|
|
132
118
|
retainAllFiles: true,
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
module.exports = {
|
|
5
|
-
getHasteName(filename) {
|
|
6
|
-
const matches = fs
|
|
7
|
-
.readFileSync(filename, "utf8")
|
|
8
|
-
.match(/@providesModule ([^\n]+)/);
|
|
9
|
-
if (!matches) {
|
|
10
|
-
return undefined;
|
|
11
|
-
}
|
|
12
|
-
return matches[1];
|
|
13
|
-
},
|
|
14
|
-
getCacheKey() {
|
|
15
|
-
return "hasteImplFixture";
|
|
16
|
-
},
|
|
17
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @format
|
|
8
|
-
* @flow strict
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
'use strict';
|
|
12
|
-
|
|
13
|
-
module.exports = {
|
|
14
|
-
registerAsset(data: unknown): unknown {
|
|
15
|
-
return data;
|
|
16
|
-
},
|
|
17
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @format
|
|
8
|
-
* @flow strict
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
'use strict';
|
|
12
|
-
|
|
13
|
-
const Foo = require('./Foo');
|
|
14
|
-
|
|
15
|
-
module.exports = {type: 'bar', foo: Foo.type};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @format
|
|
8
|
-
* @flow strict
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
'use strict';
|
|
12
|
-
|
|
13
|
-
// Add a random require to fill the bundle with some sourcecode.
|
|
14
|
-
require('./AssetRegistry');
|
|
15
|
-
|
|
16
|
-
const calcSum = (value: string) => {
|
|
17
|
-
// some random function
|
|
18
|
-
const error = new Error('SOURCEMAP: value: ' + value);
|
|
19
|
-
|
|
20
|
-
return error;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
module.exports = calcSum('anything') as Error;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @format
|
|
8
|
-
* @flow strict
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
'use strict';
|
|
12
|
-
|
|
13
|
-
const asset = require('./test.png');
|
|
14
|
-
|
|
15
|
-
module.exports = {type: 'foo', asset};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @format
|
|
8
|
-
* @flow strict-local
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
'use strict';
|
|
12
|
-
|
|
13
|
-
// $FlowFixMe[signature-verification-failure]
|
|
14
|
-
var a = 2n;
|
|
15
|
-
// $FlowFixMe[signature-verification-failure]
|
|
16
|
-
var b = 3n;
|
|
17
|
-
module.exports = a ** b;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @format
|
|
8
|
-
* @flow strict
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
'use strict';
|
|
12
|
-
|
|
13
|
-
const Bar = require('./Bar');
|
|
14
|
-
const Foo = require('./Foo');
|
|
15
|
-
// $FlowFixMe[untyped-import]: Flow doesn't understand TypeScript
|
|
16
|
-
// $FlowFixMe[cannot-resolve-module]: Flow doesn't understand TypeScript
|
|
17
|
-
const TypeScript = require('./TypeScript');
|
|
18
|
-
|
|
19
|
-
Object.keys({...Bar});
|
|
20
|
-
|
|
21
|
-
module.exports = {Foo, Bar, TypeScript};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @format
|
|
8
|
-
* @flow strict
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
'use strict';
|
|
12
|
-
|
|
13
|
-
module.exports = global.POLYFILL_IS_INJECTED;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export const type = 'TypeScript' as string
|
|
9
|
-
export const test = true as boolean
|
|
10
|
-
|
|
11
|
-
// Exporting default interface was broken before Babel 7.0.0-beta.56
|
|
12
|
-
export default interface A {}
|
|
13
|
-
|
|
14
|
-
export class B {
|
|
15
|
-
constructor(public name: string){}
|
|
16
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @flow strict-local
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
// $FlowExpectedError[cannot-resolve-module]
|
|
12
|
-
import type DoesNotExistT from './does-not-exist';
|
|
13
|
-
|
|
14
|
-
// $FlowExpectedError[cannot-resolve-module]
|
|
15
|
-
import DoesNotExist from './does-not-exist';
|
|
16
|
-
|
|
17
|
-
global.x = DoesNotExist as DoesNotExistT;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @flow strict-local
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/* eslint-disable no-unused-vars */
|
|
12
|
-
|
|
13
|
-
// $FlowExpectedError[cannot-resolve-module]
|
|
14
|
-
import type DoesNotExistT from './does-not\'"-exist';
|
|
15
|
-
|
|
16
|
-
import {
|
|
17
|
-
aaaaaaaaaa,
|
|
18
|
-
bbbbbbbbbb,
|
|
19
|
-
cccccccccc,
|
|
20
|
-
dddddddddd,
|
|
21
|
-
eeeeeeeeee,
|
|
22
|
-
ffffffffff,
|
|
23
|
-
gggggggggg,
|
|
24
|
-
hhhhhhhhhh,
|
|
25
|
-
iiiiiiiiii,
|
|
26
|
-
// $FlowExpectedError[cannot-resolve-module]
|
|
27
|
-
} from './does-not\'"-exist';
|
|
28
|
-
|
|
29
|
-
global.x = aaaaaaaaaa as DoesNotExistT;
|
package/src/integration_tests/basic_bundle/build-errors/cannot-resolve-multi-line-import.js.flow
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @flow strict-local
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/* eslint-disable no-unused-vars */
|
|
12
|
-
|
|
13
|
-
// $FlowExpectedError[cannot-resolve-module]
|
|
14
|
-
import type DoesNotExistT from './does-not-exist';
|
|
15
|
-
|
|
16
|
-
import {
|
|
17
|
-
aaaaaaaaaa,
|
|
18
|
-
bbbbbbbbbb,
|
|
19
|
-
cccccccccc,
|
|
20
|
-
dddddddddd,
|
|
21
|
-
eeeeeeeeee,
|
|
22
|
-
ffffffffff,
|
|
23
|
-
gggggggggg,
|
|
24
|
-
hhhhhhhhhh,
|
|
25
|
-
iiiiiiiiii,
|
|
26
|
-
// $FlowExpectedError[cannot-resolve-module]
|
|
27
|
-
} from './does-not-exist';
|
|
28
|
-
|
|
29
|
-
global.x = aaaaaaaaaa as DoesNotExistT;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @flow strict-local
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
// $FlowExpectedError[cannot-resolve-module]
|
|
12
|
-
import type DoesNotExistT from './foo';
|
|
13
|
-
|
|
14
|
-
// $FlowExpectedError[cannot-resolve-module]
|
|
15
|
-
const DoesNotExist = require('./foo' /* ./foo */);
|
|
16
|
-
|
|
17
|
-
global.x = DoesNotExist as DoesNotExistT;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @flow strict-local
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
// $FlowExpectedError[cannot-resolve-module]
|
|
12
|
-
import type DoesNotExistT from './does-not-exist';
|
|
13
|
-
|
|
14
|
-
// $FlowExpectedError[cannot-resolve-module]
|
|
15
|
-
const DoesNotExist = require('./does-not-exist');
|
|
16
|
-
|
|
17
|
-
global.x = DoesNotExist as DoesNotExistT;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @flow strict-local
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/* eslint-disable no-unused-vars */
|
|
12
|
-
|
|
13
|
-
// $FlowExpectedError[cannot-resolve-module]
|
|
14
|
-
import type DoesNotExistT from './does-not\'"-exist';
|
|
15
|
-
|
|
16
|
-
// $FlowExpectedError[cannot-resolve-module]
|
|
17
|
-
import {DoesNotExist} from './does-not\'"-exist';
|
|
18
|
-
|
|
19
|
-
global.x = DoesNotExist as DoesNotExistT;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @flow strict-local
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
// $FlowExpectedError[cannot-resolve-module]
|
|
12
|
-
import type DoesNotExistT from './does-not-exist';
|
|
13
|
-
|
|
14
|
-
// $FlowExpectedError[cannot-resolve-module]
|
|
15
|
-
import DoesNotExist from './does-not-exist';
|
|
16
|
-
|
|
17
|
-
global.x = DoesNotExist as DoesNotExistT;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @flow strict-local
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
// $FlowExpectedError[cannot-resolve-module]
|
|
12
|
-
import type DoesNotExistT from './does-not-exist';
|
|
13
|
-
|
|
14
|
-
// $FlowExpectedError[cannot-resolve-module]
|
|
15
|
-
const DoesNotExist = require('./does-not-exist');
|
|
16
|
-
|
|
17
|
-
global.x = DoesNotExist as DoesNotExistT;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @flow strict-local
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
export default '/* secret */';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true,
|
|
5
|
-
});
|
|
6
|
-
exports.foo = exports.default = void 0;
|
|
7
|
-
exports.myFunction = myFunction;
|
|
8
|
-
var _default = (exports.default = "export-1: DEFAULT");
|
|
9
|
-
const foo = (exports.foo = "export-1: FOO");
|
|
10
|
-
function myFunction() {
|
|
11
|
-
return "export-1: MY_FUNCTION";
|
|
12
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @format
|
|
8
|
-
* @flow strict
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
'use strict';
|
|
12
|
-
|
|
13
|
-
export default 'export-1: DEFAULT';
|
|
14
|
-
|
|
15
|
-
export const foo = 'export-1: FOO';
|
|
16
|
-
|
|
17
|
-
export function myFunction(): string {
|
|
18
|
-
return 'export-1: MY_FUNCTION';
|
|
19
|
-
}
|