Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/actions/node/action.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
name: "Setup Node"
description: "This action install node and cache modules. It uses pnpm as package manager."
name: 'Setup Node'
description: 'This action install node and cache modules. It uses pnpm as package manager.'
inputs:
node-version:
description: "The node version to install (Default: lts)"
default: "lts/*"
description: 'The node version to install (Default: lts)'
# TODO: revert to lts/* after 20 is EOL
default: '22.x'
Comment thread
comatory marked this conversation as resolved.
required: false
working-directory:
description: "The working directory of your node package"
default: "."
description: 'The working directory of your node package'
default: '.'
required: false

runs:
using: "composite"
using: 'composite'
steps:
- uses: actions/setup-node@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cli-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:

strategy:
matrix:
node-version: ['20.x', '22.x']
node-version: ['22.x', '24.x']

steps:
- uses: actions/checkout@v4
Expand Down
540 changes: 279 additions & 261 deletions composition-go/index.global.js

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion composition-go/shim/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@
"dependencies": {
"@wundergraph/composition": "workspace:*",
"@wundergraph/cosmo-shared": "workspace:*",
"graphql": "catalog:"
"graphql": "catalog:",
"set.prototype.difference": "^1.1.7",
"set.prototype.intersection": "^1.1.8",
"set.prototype.isdisjointfrom": "^1.1.5",
"set.prototype.issubsetof": "^1.1.4",
"set.prototype.issupersetof": "^1.1.3"
},
"devDependencies": {
"@types/node": "catalog:",
Expand Down
15 changes: 13 additions & 2 deletions composition-go/shim/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import 'set.prototype.difference/auto';
import 'set.prototype.intersection/auto';
import 'set.prototype.isdisjointfrom/auto';
import 'set.prototype.issubsetof/auto';
import 'set.prototype.issupersetof/auto';
import {
federateSubgraphs as realFederateSubgraphs,
FieldConfiguration,
Expand Down Expand Up @@ -41,7 +46,10 @@ function createFederableSubgraph(subgraph: Subgraph) {
}

export function federateSubgraphs(subgraphs: Subgraph[]): FederatedGraph {
const result = realFederateSubgraphs({ subgraphs: subgraphs.map(createFederableSubgraph), version: LATEST_ROUTER_COMPATIBILITY_VERSION });
const result = realFederateSubgraphs({
subgraphs: subgraphs.map(createFederableSubgraph),
version: LATEST_ROUTER_COMPATIBILITY_VERSION,
});
if (!result.success) {
throw new Error(`could not federate schema: ${result.errors.map((e: Error) => e.message).join(', ')}`);
}
Expand All @@ -52,7 +60,10 @@ export function federateSubgraphs(subgraphs: Subgraph[]): FederatedGraph {
}

export function buildRouterConfiguration(subgraphs: Subgraph[]): string {
const result = realFederateSubgraphs({ subgraphs: subgraphs.map(createFederableSubgraph), version: LATEST_ROUTER_COMPATIBILITY_VERSION });
const result = realFederateSubgraphs({
subgraphs: subgraphs.map(createFederableSubgraph),
version: LATEST_ROUTER_COMPATIBILITY_VERSION,
});
if (!result.success) {
throw new Error(`could not federate schema: ${result.errors.map((e: Error) => e.message).join(', ')}`);
}
Expand Down
23 changes: 13 additions & 10 deletions composition-go/shim/src/polyfill.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
var self = globalThis;
var global = globalThis;

function BigInt(value) {
return value;
return value;
}

class URL {
constructor(url, base) {
// urlParse is provided by the runtime
const result = urlParse(url, base || '');
for (const prop in result) {
this[prop] = result[prop]
}
constructor(url, base) {
// urlParse is provided by the runtime
const result = urlParse(url, base || '');
for (const prop in result) {
this[prop] = result[prop];
}
}

static canParse(url, base = undefined) {
return urlCanParse(url, base || '');
}
static canParse(url, base = undefined) {
return urlCanParse(url, base || '');
}
}
1 change: 1 addition & 0 deletions composition/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
},
"devDependencies": {
"@types/lodash": "catalog:",
"@types/node": "catalog:",
Comment thread
comatory marked this conversation as resolved.
"@vitest/coverage-v8": "catalog:",
"del-cli": "catalog:",
"typescript": "catalog:",
Expand Down
Loading
Loading