Skip to content

Commit 3055ed1

Browse files
Ensure composite dependencies are version limited
Use versions restricted to semver major component for additional packages added to the composite to avoid breaking compatibility.
1 parent c56954c commit 3055ed1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

ern-composite-gen/src/generateComposite.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ async function generateFullComposite(
194194
);
195195
// Also add latest version of the bridge
196196
extraJsDependencies.push(
197-
PackagePath.fromString('react-native-electrode-bridge'),
197+
PackagePath.fromString('react-native-electrode-bridge@^1.0.0'),
198198
);
199199
extraJsDependencies = [...extraJsDependencies, ...jsApiImplDependencies];
200200
}
@@ -213,8 +213,8 @@ async function generateFullComposite(
213213
installExtraPackages({
214214
cwd: outDir,
215215
extraJsDependencies: [
216-
PackagePath.fromString('ern-bundle-store-metro-asset-plugin'),
217-
PackagePath.fromString('react-native-svg-transformer'),
216+
PackagePath.fromString('ern-bundle-store-metro-asset-plugin@^1.0.0'),
217+
PackagePath.fromString('react-native-svg-transformer@^1.0.0'),
218218
...extraJsDependencies,
219219
],
220220
}),
@@ -248,9 +248,10 @@ async function generateFullComposite(
248248
// Exclude api/api impls as they are not native modules
249249
allNativeDeps.apis = [];
250250
allNativeDeps.nativeApisImpl = [];
251-
const dedupedNativeModules = nativeDepenciesVersionResolution.resolveNativeDependenciesVersionsEx(
252-
allNativeDeps,
253-
);
251+
const dedupedNativeModules =
252+
nativeDepenciesVersionResolution.resolveNativeDependenciesVersionsEx(
253+
allNativeDeps,
254+
);
254255

255256
if (dedupedNativeModules.pluginsWithMismatchingVersions.length > 0) {
256257
let errorMsg = `Mismatching native module versions detected.

0 commit comments

Comments
 (0)