@teardown/metro-config 2.0.61 → 2.0.62
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/dist/bun.d.ts +3 -3
- package/dist/bun.d.ts.map +1 -1
- package/dist/bun.js +5 -8
- package/dist/tsconfig-paths.d.ts +3 -3
- package/dist/tsconfig-paths.d.ts.map +1 -1
- package/dist/tsconfig-paths.js +10 -10
- package/package.json +2 -2
package/dist/bun.d.ts
CHANGED
|
@@ -16,9 +16,9 @@ export declare const BUN_BLOCK_PATTERN: RegExp;
|
|
|
16
16
|
* This resolver provides an additional layer of protection by finding alternative
|
|
17
17
|
* paths when a resolution from an existing custom resolver points to .bun.
|
|
18
18
|
*
|
|
19
|
-
* IMPORTANT: This resolver
|
|
20
|
-
*
|
|
21
|
-
*
|
|
19
|
+
* IMPORTANT: This resolver returns null when it doesn't handle resolution, signaling
|
|
20
|
+
* Metro to use its default resolution. Do NOT call context.resolveRequest as that
|
|
21
|
+
* points to the outermost resolver (e.g., Uniwind) and creates infinite loops.
|
|
22
22
|
*
|
|
23
23
|
* @param projectRoot - The project root directory
|
|
24
24
|
* @param existingResolver - Optional existing resolver from the config that should be preserved.
|
package/dist/bun.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bun.d.ts","sourceRoot":"","sources":["../src/bun.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGhD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAwB,CAAC;AAEvD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,gBAAgB,
|
|
1
|
+
{"version":3,"file":"bun.d.ts","sourceRoot":"","sources":["../src/bun.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGhD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAwB,CAAC;AAEvD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,gBAAgB,CAkCjH;AAmCD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,CAQ5E"}
|
package/dist/bun.js
CHANGED
|
@@ -26,9 +26,9 @@ exports.BUN_BLOCK_PATTERN = /.*[/\\]\.bun[/\\].*/;
|
|
|
26
26
|
* This resolver provides an additional layer of protection by finding alternative
|
|
27
27
|
* paths when a resolution from an existing custom resolver points to .bun.
|
|
28
28
|
*
|
|
29
|
-
* IMPORTANT: This resolver
|
|
30
|
-
*
|
|
31
|
-
*
|
|
29
|
+
* IMPORTANT: This resolver returns null when it doesn't handle resolution, signaling
|
|
30
|
+
* Metro to use its default resolution. Do NOT call context.resolveRequest as that
|
|
31
|
+
* points to the outermost resolver (e.g., Uniwind) and creates infinite loops.
|
|
32
32
|
*
|
|
33
33
|
* @param projectRoot - The project root directory
|
|
34
34
|
* @param existingResolver - Optional existing resolver from the config that should be preserved.
|
|
@@ -41,11 +41,8 @@ function createBunAwareResolver(projectRoot, existingResolver) {
|
|
|
41
41
|
if (existingResolver) {
|
|
42
42
|
result = existingResolver(context, moduleName, platform);
|
|
43
43
|
}
|
|
44
|
-
// If no result from existing resolver,
|
|
45
|
-
|
|
46
|
-
result = context.resolveRequest(context, moduleName, platform);
|
|
47
|
-
}
|
|
48
|
-
// If still no result, return null (shouldn't happen but be safe)
|
|
44
|
+
// If no result from existing resolver, return null to let Metro use its default
|
|
45
|
+
// Do NOT call context.resolveRequest - it points to the outermost resolver
|
|
49
46
|
if (!result) {
|
|
50
47
|
return null;
|
|
51
48
|
}
|
package/dist/tsconfig-paths.d.ts
CHANGED
|
@@ -29,9 +29,9 @@ export declare function resolveWithTsConfigPaths(moduleName: string, mappings: P
|
|
|
29
29
|
/**
|
|
30
30
|
* Create a resolver that handles tsconfig paths.
|
|
31
31
|
*
|
|
32
|
-
* IMPORTANT: This resolver
|
|
33
|
-
*
|
|
34
|
-
*
|
|
32
|
+
* IMPORTANT: This resolver returns null when it doesn't handle resolution, signaling
|
|
33
|
+
* Metro to use its default resolution. Do NOT call context.resolveRequest as that
|
|
34
|
+
* points to the outermost resolver (e.g., Uniwind) and creates infinite loops.
|
|
35
35
|
*
|
|
36
36
|
* @param projectRoot - The project root directory
|
|
37
37
|
* @param nextResolver - Optional next resolver in the chain.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsconfig-paths.d.ts","sourceRoot":"","sources":["../src/tsconfig-paths.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,UAAU,aAAa;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACjC;AAED,UAAU,WAAW;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;CACvB;AAoGD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAqB5E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,WAAW,EAAE,CAsB3F;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,MAAM,GAAG,IAAI,CA0CnG;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CAC1C,WAAW,EAAE,MAAM,EACnB,YAAY,CAAC,EAAE,gBAAgB,EAC/B,OAAO,UAAQ,GACb,gBAAgB,
|
|
1
|
+
{"version":3,"file":"tsconfig-paths.d.ts","sourceRoot":"","sources":["../src/tsconfig-paths.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,UAAU,aAAa;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACjC;AAED,UAAU,WAAW;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;CACvB;AAoGD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAqB5E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,WAAW,EAAE,CAsB3F;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,MAAM,GAAG,IAAI,CA0CnG;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CAC1C,WAAW,EAAE,MAAM,EACnB,YAAY,CAAC,EAAE,gBAAgB,EAC/B,OAAO,UAAQ,GACb,gBAAgB,CAyClB"}
|
package/dist/tsconfig-paths.js
CHANGED
|
@@ -194,9 +194,9 @@ function resolveWithTsConfigPaths(moduleName, mappings) {
|
|
|
194
194
|
/**
|
|
195
195
|
* Create a resolver that handles tsconfig paths.
|
|
196
196
|
*
|
|
197
|
-
* IMPORTANT: This resolver
|
|
198
|
-
*
|
|
199
|
-
*
|
|
197
|
+
* IMPORTANT: This resolver returns null when it doesn't handle resolution, signaling
|
|
198
|
+
* Metro to use its default resolution. Do NOT call context.resolveRequest as that
|
|
199
|
+
* points to the outermost resolver (e.g., Uniwind) and creates infinite loops.
|
|
200
200
|
*
|
|
201
201
|
* @param projectRoot - The project root directory
|
|
202
202
|
* @param nextResolver - Optional next resolver in the chain.
|
|
@@ -208,8 +208,9 @@ function createTsConfigPathsResolver(projectRoot, nextResolver, verbose = false)
|
|
|
208
208
|
if (verbose) {
|
|
209
209
|
console.log("[teardown/metro-config] No tsconfig paths found, skipping path resolution");
|
|
210
210
|
}
|
|
211
|
-
// Pass through to next resolver or Metro's default
|
|
212
|
-
|
|
211
|
+
// Pass through to next resolver or return null for Metro's default
|
|
212
|
+
// Do NOT call context.resolveRequest - it points to the outermost resolver
|
|
213
|
+
return nextResolver ?? ((_context, _moduleName, _platform) => null);
|
|
213
214
|
}
|
|
214
215
|
const mappings = buildPathMappings(projectRoot, config);
|
|
215
216
|
if (verbose) {
|
|
@@ -229,11 +230,10 @@ function createTsConfigPathsResolver(projectRoot, nextResolver, verbose = false)
|
|
|
229
230
|
}
|
|
230
231
|
// Fall back to next resolver in chain
|
|
231
232
|
if (nextResolver) {
|
|
232
|
-
|
|
233
|
-
if (result)
|
|
234
|
-
return result;
|
|
233
|
+
return nextResolver(context, moduleName, platform);
|
|
235
234
|
}
|
|
236
|
-
//
|
|
237
|
-
|
|
235
|
+
// Return null to let Metro use its default resolution
|
|
236
|
+
// Do NOT call context.resolveRequest - it points to the outermost resolver
|
|
237
|
+
return null;
|
|
238
238
|
};
|
|
239
239
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teardown/metro-config",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.62",
|
|
4
4
|
"description": "Metro configuration for Teardown - Rust-powered transforms via Facetpack",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"resolve-workspace-root": "^2.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@teardown/tsconfig": "2.0.
|
|
48
|
+
"@teardown/tsconfig": "2.0.62",
|
|
49
49
|
"@types/bun": "1.3.5",
|
|
50
50
|
"typescript": "5.9.3"
|
|
51
51
|
},
|