@apollo/composition
Advanced tools
Comparing version 2.0.0-alpha.4 to 2.0.0-alpha.5
# CHANGELOG for `@apollo/composition` | ||
This CHANGELOG pertains only to Apollo Federation packages in the 2.x range. The Federation v0.x equivalent for this package can be found [here](https://github.com/apollographql/federation/blob/version-0.x/federation-js/CHANGELOG.md) on the `version-0.x` branch of this repo. | ||
## vNEXT | ||
> The changes noted within this `vNEXT` section have not been released yet. New PRs and commits which introduce changes should include an entry in this `vNEXT` section as part of their development. When a release is being prepared, a new header will be (manually) created below and the appropriate changes within that release will be moved into the new section. | ||
- _Nothing yet! Stay tuned._ | ||
## v2.0.0-alpha.5 | ||
- Remove `graphql@15` from peer dependencies [PR #1472](https://github.com/apollographql/federation/pull/1472). | ||
## v2.0.0-alpha.3 | ||
@@ -8,0 +16,0 @@ |
@@ -26,16 +26,2 @@ "use strict"; | ||
exports.mergeSubgraphs = mergeSubgraphs; | ||
function join(toJoin, sep = ', ', firstSep, lastSep = ' and ') { | ||
if (toJoin.length == 0) { | ||
return ''; | ||
} | ||
const first = toJoin[0]; | ||
if (toJoin.length == 1) { | ||
return first; | ||
} | ||
const last = toJoin[toJoin.length - 1]; | ||
if (toJoin.length == 2) { | ||
return first + (firstSep ? firstSep : lastSep) + last; | ||
} | ||
return first + (firstSep ? firstSep : sep) + toJoin.slice(1, toJoin.length - 1) + lastSep + last; | ||
} | ||
function printHumanReadableList(names, prefixSingle, prefixPlural) { | ||
@@ -56,3 +42,3 @@ (0, federation_internals_1.assert)(names.length > 0, 'Should not have been called with no names'); | ||
if (toDisplay.length === names.length) { | ||
return prefix + join(toDisplay); | ||
return prefix + (0, federation_internals_1.joinStrings)(toDisplay); | ||
} | ||
@@ -255,3 +241,3 @@ else { | ||
this.errors.push(code.err({ | ||
message: message + join(distribution, ' and ', ' but '), | ||
message: message + (0, federation_internals_1.joinStrings)(distribution, ' and ', ' but '), | ||
nodes | ||
@@ -264,3 +250,3 @@ })); | ||
this.errors.push(code.err({ | ||
message: message + distribution[0] + join(distribution.slice(1), ' and '), | ||
message: message + distribution[0] + (0, federation_internals_1.joinStrings)(distribution.slice(1), ' and '), | ||
nodes | ||
@@ -272,3 +258,3 @@ })); | ||
this.reportMismatch(supergraphElement, subgraphElements, mismatchAccessor, supergraphElementPrinter, otherElementsPrinter, (distribution, astNodes) => { | ||
this.hints.push(new hints_1.CompositionHint(hintId, message + distribution[0] + join(distribution.slice(1), ' and ') + (noEndOfMessageDot ? '' : '.'), supergraphElement instanceof federation_internals_1.NamedSchemaElement ? supergraphElement.coordinate : '<schema>', astNodes)); | ||
this.hints.push(new hints_1.CompositionHint(hintId, message + distribution[0] + (0, federation_internals_1.joinStrings)(distribution.slice(1), ' and ') + (noEndOfMessageDot ? '' : '.'), supergraphElement instanceof federation_internals_1.NamedSchemaElement ? supergraphElement.coordinate : '<schema>', astNodes)); | ||
}, ignorePredicate, includeMissingSources); | ||
@@ -275,0 +261,0 @@ } |
@@ -6,4 +6,8 @@ const baseConfig = require('../jest.config.base'); | ||
module.exports = { | ||
...baseConfig | ||
...baseConfig, | ||
displayName: { | ||
name: '@apollo/composition', | ||
color: 'gray' | ||
} | ||
}; | ||
{ | ||
"name": "@apollo/composition", | ||
"version": "2.0.0-alpha.4", | ||
"version": "2.0.0-alpha.5", | ||
"description": "Apollo Federation composition utilities", | ||
@@ -30,9 +30,9 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@apollo/federation-internals": "^2.0.0-alpha.4", | ||
"@apollo/query-graphs": "^2.0.0-alpha.4" | ||
"@apollo/federation-internals": "^2.0.0-alpha.5", | ||
"@apollo/query-graphs": "^2.0.0-alpha.5" | ||
}, | ||
"peerDependencies": { | ||
"graphql": "^15.7.0 || ^16.0.0" | ||
"graphql": "^16.0.0" | ||
}, | ||
"gitHead": "c32794a48598bac2e2372c23a2ea74ae187cce85" | ||
"gitHead": "efb50aa3d3742d2fed8c841569651b2b7b729f2f" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
380770
6053