i18n-json-react 0.1.1 → 0.1.2
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/bundlers/shared.cjs +3 -2
- package/native/metro.cjs +1 -1
- package/package.json +1 -1
package/bundlers/shared.cjs
CHANGED
|
@@ -4,12 +4,13 @@ const { glob, readFile, realpath, stat } = require('node:fs/promises');
|
|
|
4
4
|
const path = require('node:path');
|
|
5
5
|
|
|
6
6
|
function resolveRoot(context, root) {
|
|
7
|
-
return realpathSync(path.resolve(context, root ?? '.'));
|
|
7
|
+
return realpathSync.native(path.resolve(context, root ?? '.'));
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
function computeId(file, root) {
|
|
11
11
|
// Bundlers normally resolve linked packages to real paths. Collection must use the same identity.
|
|
12
|
-
|
|
12
|
+
// Use the native resolver, as fs/promises.realpath does, to expand Windows short-path aliases consistently.
|
|
13
|
+
const relative = path.relative(realpathSync.native(root), realpathSync.native(file)).split(path.sep).join('/');
|
|
13
14
|
return createHash('sha256').update(relative).digest('hex').slice(0, 16);
|
|
14
15
|
}
|
|
15
16
|
|
package/native/metro.cjs
CHANGED
|
@@ -26,7 +26,7 @@ async function withI18nMetro(baseConfig, options = {}) {
|
|
|
26
26
|
!FEATURE_FILE.test(result.filePath)
|
|
27
27
|
)
|
|
28
28
|
return result;
|
|
29
|
-
const file = realpathSync(result.filePath);
|
|
29
|
+
const file = realpathSync.native(result.filePath);
|
|
30
30
|
const reference = prepared.references.get(file);
|
|
31
31
|
if (!reference)
|
|
32
32
|
throw new Error(
|
package/package.json
CHANGED