@graphql-mesh/fusion-composition 0.8.12-alpha-20250811121914-a277abf12c16ed2cc8da9ca91833bae7c29ff511 → 0.8.12-alpha-20250811145138-a1b94793e4914d3291d4bd3f43fdc53c645cdc70
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/cjs/federation-utils.js
CHANGED
|
@@ -38,9 +38,14 @@ function importFederationDirectives(subgraph, directives) {
|
|
|
38
38
|
linkDirectives.push(importStatement);
|
|
39
39
|
}
|
|
40
40
|
// v2.0 is not supported so bump to v2.6
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
43
|
-
|
|
41
|
+
const match = importStatement.url.match(/\/v(\d+)\.(\d+)(?:$|\/)/);
|
|
42
|
+
if (match) {
|
|
43
|
+
const major = Number(match[1]);
|
|
44
|
+
const minor = Number(match[2]);
|
|
45
|
+
// Bump only older 2.x (2.0–2.5) to v2.6, leave >=2.6 as-is
|
|
46
|
+
if (major === 2 && minor < 6) {
|
|
47
|
+
importStatement.url = 'https://specs.apollo.dev/federation/v2.6';
|
|
48
|
+
}
|
|
44
49
|
}
|
|
45
50
|
importStatement.import = [...new Set([...(importStatement.import || []), ...directives])];
|
|
46
51
|
const extensions = (subgraph.extensions ||= {});
|
package/esm/federation-utils.js
CHANGED
|
@@ -30,9 +30,14 @@ export function importFederationDirectives(subgraph, directives) {
|
|
|
30
30
|
linkDirectives.push(importStatement);
|
|
31
31
|
}
|
|
32
32
|
// v2.0 is not supported so bump to v2.6
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
35
|
-
|
|
33
|
+
const match = importStatement.url.match(/\/v(\d+)\.(\d+)(?:$|\/)/);
|
|
34
|
+
if (match) {
|
|
35
|
+
const major = Number(match[1]);
|
|
36
|
+
const minor = Number(match[2]);
|
|
37
|
+
// Bump only older 2.x (2.0–2.5) to v2.6, leave >=2.6 as-is
|
|
38
|
+
if (major === 2 && minor < 6) {
|
|
39
|
+
importStatement.url = 'https://specs.apollo.dev/federation/v2.6';
|
|
40
|
+
}
|
|
36
41
|
}
|
|
37
42
|
importStatement.import = [...new Set([...(importStatement.import || []), ...directives])];
|
|
38
43
|
const extensions = (subgraph.extensions ||= {});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-mesh/fusion-composition",
|
|
3
|
-
"version": "0.8.12-alpha-
|
|
3
|
+
"version": "0.8.12-alpha-20250811145138-a1b94793e4914d3291d4bd3f43fdc53c645cdc70",
|
|
4
4
|
"description": "Basic composition utility for Fusion spec",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|