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
|
@@ -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-2: DEFAULT");
|
|
9
|
-
const foo = (exports.foo = "export-2: FOO");
|
|
10
|
-
function myFunction() {
|
|
11
|
-
return "export-2: 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-2: DEFAULT';
|
|
14
|
-
|
|
15
|
-
export const foo = 'export-2: FOO';
|
|
16
|
-
|
|
17
|
-
export function myFunction(): string {
|
|
18
|
-
return 'export-2: MY_FUNCTION';
|
|
19
|
-
}
|
|
@@ -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-3: DEFAULT");
|
|
9
|
-
const foo = (exports.foo = "export-3: FOO");
|
|
10
|
-
function myFunction() {
|
|
11
|
-
return "export-3: 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-3: DEFAULT';
|
|
14
|
-
|
|
15
|
-
export const foo = 'export-3: FOO';
|
|
16
|
-
|
|
17
|
-
export function myFunction(): string {
|
|
18
|
-
return 'export-3: MY_FUNCTION';
|
|
19
|
-
}
|
|
@@ -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-4: DEFAULT");
|
|
9
|
-
const foo = (exports.foo = "export-4: FOO");
|
|
10
|
-
function myFunction() {
|
|
11
|
-
return "export-4: 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-4: DEFAULT';
|
|
14
|
-
|
|
15
|
-
export const foo = 'export-4: FOO';
|
|
16
|
-
|
|
17
|
-
export function myFunction(): string {
|
|
18
|
-
return 'export-4: MY_FUNCTION';
|
|
19
|
-
}
|
|
@@ -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
|
-
module.exports = {
|
|
14
|
-
foo: 'export-5: FOO',
|
|
15
|
-
};
|
|
@@ -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
|
-
export default 'export-6: DEFAULT';
|
|
14
|
-
|
|
15
|
-
export const foo = 'export-6: FOO';
|
|
@@ -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
|
-
module.exports = {
|
|
14
|
-
foo: 'export-7: FOO',
|
|
15
|
-
};
|
|
@@ -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
|
-
export default 'export-8: DEFAULT';
|
|
14
|
-
|
|
15
|
-
export const foo = 'export-8: FOO';
|
|
@@ -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
|
-
export default null;
|
|
14
|
-
|
|
15
|
-
export const foo = 'export-null: FOO';
|
|
@@ -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
|
-
export default 'export-primitive-default: DEFAULT';
|
|
14
|
-
|
|
15
|
-
export const foo = 'export-primitive-default: FOO';
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true,
|
|
5
|
-
});
|
|
6
|
-
exports.asyncImportMaybeSyncESM =
|
|
7
|
-
exports.asyncImportMaybeSyncCJS =
|
|
8
|
-
exports.asyncImportESM =
|
|
9
|
-
exports.asyncImportCJS =
|
|
10
|
-
void 0;
|
|
11
|
-
Object.defineProperty(exports, "default", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () {
|
|
14
|
-
return _export4.foo;
|
|
15
|
-
},
|
|
16
|
-
});
|
|
17
|
-
exports.extraData = void 0;
|
|
18
|
-
Object.defineProperty(exports, "namedDefaultExported", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _export3.default;
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
var _export = _interopRequireWildcard(require("./export-1"));
|
|
25
|
-
var importStar = _interopRequireWildcard(require("./export-2"));
|
|
26
|
-
var _exportNull = require("./export-null");
|
|
27
|
-
var _exportPrimitiveDefault = _interopRequireWildcard(
|
|
28
|
-
require("./export-primitive-default"),
|
|
29
|
-
);
|
|
30
|
-
var _export3 = _interopRequireDefault(require("./export-3"));
|
|
31
|
-
var _export4 = require("./export-4");
|
|
32
|
-
function _interopRequireDefault(e) {
|
|
33
|
-
return e && e.__esModule ? e : { default: e };
|
|
34
|
-
}
|
|
35
|
-
function _interopRequireWildcard(e, t) {
|
|
36
|
-
if ("function" == typeof WeakMap)
|
|
37
|
-
var r = new WeakMap(),
|
|
38
|
-
n = new WeakMap();
|
|
39
|
-
return (_interopRequireWildcard = function (e, t) {
|
|
40
|
-
if (!t && e && e.__esModule) return e;
|
|
41
|
-
var o,
|
|
42
|
-
i,
|
|
43
|
-
f = { __proto__: null, default: e };
|
|
44
|
-
if (null === e || ("object" != typeof e && "function" != typeof e))
|
|
45
|
-
return f;
|
|
46
|
-
if ((o = t ? n : r)) {
|
|
47
|
-
if (o.has(e)) return o.get(e);
|
|
48
|
-
o.set(e, f);
|
|
49
|
-
}
|
|
50
|
-
for (const t in e)
|
|
51
|
-
"default" !== t &&
|
|
52
|
-
{}.hasOwnProperty.call(e, t) &&
|
|
53
|
-
((i =
|
|
54
|
-
(o = Object.defineProperty) &&
|
|
55
|
-
Object.getOwnPropertyDescriptor(e, t)) &&
|
|
56
|
-
(i.get || i.set)
|
|
57
|
-
? o(f, t, i)
|
|
58
|
-
: (f[t] = e[t]));
|
|
59
|
-
return f;
|
|
60
|
-
})(e, t);
|
|
61
|
-
}
|
|
62
|
-
const extraData = (exports.extraData = {
|
|
63
|
-
foo: _exportNull.foo,
|
|
64
|
-
importStar,
|
|
65
|
-
myDefault: _export.default,
|
|
66
|
-
myFoo: _export.foo,
|
|
67
|
-
myFunction: (0, _export.myFunction)(),
|
|
68
|
-
primitiveDefault: _exportPrimitiveDefault.default,
|
|
69
|
-
primitiveFoo: _exportPrimitiveDefault.foo,
|
|
70
|
-
});
|
|
71
|
-
const asyncImportCJS = (exports.asyncImportCJS = import("./export-5"));
|
|
72
|
-
const asyncImportESM = (exports.asyncImportESM = import("./export-6"));
|
|
73
|
-
const asyncImportMaybeSyncCJS = (exports.asyncImportMaybeSyncCJS =
|
|
74
|
-
require.unstable_importMaybeSync("./export-7"));
|
|
75
|
-
const asyncImportMaybeSyncESM = (exports.asyncImportMaybeSyncESM =
|
|
76
|
-
require.unstable_importMaybeSync("./export-8"));
|
|
@@ -1,43 +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
|
-
import type {RequireWithUnstableImportMaybeSync} from './utils';
|
|
14
|
-
|
|
15
|
-
import {default as myDefault, foo as myFoo, myFunction} from './export-1';
|
|
16
|
-
import * as importStar from './export-2';
|
|
17
|
-
import {foo} from './export-null';
|
|
18
|
-
import primitiveDefault, {
|
|
19
|
-
foo as primitiveFoo,
|
|
20
|
-
} from './export-primitive-default';
|
|
21
|
-
|
|
22
|
-
declare var require: RequireWithUnstableImportMaybeSync;
|
|
23
|
-
|
|
24
|
-
export {default as namedDefaultExported} from './export-3';
|
|
25
|
-
export {foo as default} from './export-4';
|
|
26
|
-
|
|
27
|
-
export const extraData = {
|
|
28
|
-
foo,
|
|
29
|
-
importStar,
|
|
30
|
-
myDefault,
|
|
31
|
-
myFoo,
|
|
32
|
-
myFunction: myFunction() as string,
|
|
33
|
-
primitiveDefault,
|
|
34
|
-
primitiveFoo,
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const asyncImportCJS = import('./export-5');
|
|
38
|
-
export const asyncImportESM = import('./export-6');
|
|
39
|
-
|
|
40
|
-
export const asyncImportMaybeSyncCJS: unknown =
|
|
41
|
-
require.unstable_importMaybeSync('./export-7');
|
|
42
|
-
export const asyncImportMaybeSyncESM: unknown =
|
|
43
|
-
require.unstable_importMaybeSync('./export-8');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,14 +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
|
-
export type RequireWithUnstableImportMaybeSync = {
|
|
12
|
-
(id: string | number): unknown,
|
|
13
|
-
unstable_importMaybeSync: (id: string) => unknown,
|
|
14
|
-
};
|
|
@@ -1,20 +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
|
-
'use strict';
|
|
12
|
-
|
|
13
|
-
declare var __METRO_GLOBAL_PREFIX__: string;
|
|
14
|
-
declare var __DOWNLOAD_AND_EXEC_FOR_TESTS__: (path: string) => Promise<unknown>;
|
|
15
|
-
|
|
16
|
-
const key = `${global.__METRO_GLOBAL_PREFIX__ ?? ''}__loadBundleAsync`;
|
|
17
|
-
|
|
18
|
-
global[key] = async function loadBundleAsyncForTest(path: string) {
|
|
19
|
-
await __DOWNLOAD_AND_EXEC_FOR_TESTS__(path);
|
|
20
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/* secret */
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true,
|
|
5
|
-
});
|
|
6
|
-
exports.c = exports.b = exports.a = void 0;
|
|
7
|
-
let shouldBeB, shouldBeC;
|
|
8
|
-
try {
|
|
9
|
-
shouldBeB = require("./not-exists");
|
|
10
|
-
} catch {
|
|
11
|
-
shouldBeB = require("./optional-b");
|
|
12
|
-
}
|
|
13
|
-
(function requireOptionalC() {
|
|
14
|
-
try {
|
|
15
|
-
shouldBeC = require("./optional-c");
|
|
16
|
-
} catch (e) {}
|
|
17
|
-
})();
|
|
18
|
-
const a = (exports.a = require("./required-a"));
|
|
19
|
-
const b = (exports.b = shouldBeB);
|
|
20
|
-
const c = (exports.c = shouldBeC);
|
|
@@ -1,34 +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
|
-
let shouldBeB: unknown, shouldBeC: unknown;
|
|
14
|
-
try {
|
|
15
|
-
// $FlowExpectedError[cannot-resolve-module]
|
|
16
|
-
shouldBeB = require('./not-exists');
|
|
17
|
-
} catch {
|
|
18
|
-
shouldBeB = require('./optional-b');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
(function requireOptionalC() {
|
|
22
|
-
// This function is here to ensure that the `a` module is always required,
|
|
23
|
-
// even if it is not used in the code.
|
|
24
|
-
try {
|
|
25
|
-
shouldBeC = require('./optional-c');
|
|
26
|
-
} catch (e) {
|
|
27
|
-
// If the optional module is not found, we can ignore the error.
|
|
28
|
-
// This is to simulate an optional dependency that may or may not exist.
|
|
29
|
-
}
|
|
30
|
-
})();
|
|
31
|
-
|
|
32
|
-
export const a = require('./required-a');
|
|
33
|
-
export const b = shouldBeB;
|
|
34
|
-
export const c = shouldBeC;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _utils = require("./utils");
|
|
4
|
-
const normalModule = require("./subdir-conflict");
|
|
5
|
-
const contextModule = require.context("./subdir-conflict");
|
|
6
|
-
function main() {
|
|
7
|
-
return {
|
|
8
|
-
normalModule,
|
|
9
|
-
contextModule: (0, _utils.copyContextToObject)(contextModule),
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
module.exports = main();
|
|
@@ -1,27 +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
|
-
import type {RequireWithContext} from './utils';
|
|
12
|
-
|
|
13
|
-
import {copyContextToObject} from './utils';
|
|
14
|
-
|
|
15
|
-
const normalModule = require('./subdir-conflict');
|
|
16
|
-
|
|
17
|
-
declare var require: RequireWithContext;
|
|
18
|
-
const contextModule = require.context<$FlowFixMe>('./subdir-conflict');
|
|
19
|
-
|
|
20
|
-
function main() {
|
|
21
|
-
return {
|
|
22
|
-
normalModule,
|
|
23
|
-
contextModule: copyContextToObject(contextModule),
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
module.exports = main() as unknown;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const empty = require.context("./no-such-dir");
|
|
4
|
-
function main() {
|
|
5
|
-
try {
|
|
6
|
-
empty("./no-such-file.js");
|
|
7
|
-
} catch (e) {
|
|
8
|
-
return {
|
|
9
|
-
error: {
|
|
10
|
-
message: e.message,
|
|
11
|
-
code: e.code,
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
module.exports = main();
|
|
@@ -1,26 +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
|
-
import type {RequireWithContext} from './utils';
|
|
12
|
-
|
|
13
|
-
declare var require: RequireWithContext;
|
|
14
|
-
|
|
15
|
-
const empty = require.context<$FlowFixMe>('./no-such-dir');
|
|
16
|
-
|
|
17
|
-
function main() {
|
|
18
|
-
try {
|
|
19
|
-
empty('./no-such-file.js');
|
|
20
|
-
} catch (e) {
|
|
21
|
-
return {error: {message: e.message, code: e.code}};
|
|
22
|
-
}
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
module.exports = main() as unknown;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const ab = require.context("./subdir", false, /\/(a|b)\.js$/);
|
|
4
|
-
const abc = require.context("./subdir", false);
|
|
5
|
-
const abcd = require.context("./subdir", true);
|
|
6
|
-
function main() {
|
|
7
|
-
return {
|
|
8
|
-
ab: ab.keys(),
|
|
9
|
-
abc: abc.keys(),
|
|
10
|
-
abcd: abcd.keys(),
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
module.exports = main();
|