Skip to content
Merged
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
2 changes: 1 addition & 1 deletion examples/builtin-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"graphql-yoga": "^5.18.0"
},
"devDependencies": {
"@types/node": "^25.3.2"
"@types/node": "^25.3.3"
}
}
2 changes: 1 addition & 1 deletion examples/composed-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"graphql-yoga": "^5.18.0"
},
"devDependencies": {
"@types/node": "^25.3.2"
"@types/node": "^25.3.3"
}
}
2 changes: 1 addition & 1 deletion examples/travel-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"graphql-yoga": "^5.18.0"
},
"devDependencies": {
"@types/node": "^25.3.2"
"@types/node": "^25.3.3"
}
}
2 changes: 1 addition & 1 deletion examples/weather-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"graphql-yoga": "^5.18.0"
},
"devDependencies": {
"@types/node": "^25.3.2"
"@types/node": "^25.3.3"
}
}
2 changes: 1 addition & 1 deletion examples/without-graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"@stackables/bridge": "workspace:*"
},
"devDependencies": {
"@types/node": "^25.3.2"
"@types/node": "^25.3.3"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"devDependencies": {
"@changesets/changelog-github": "^0.6.0",
"@changesets/cli": "^2.29.8",
"@changesets/cli": "^2.30.0",
"@eslint/js": "^10.0.1",
"@tsconfig/node24": "^24.0.4",
"eslint": "^10.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"devDependencies": {
"@stackables/bridge-parser": "workspace:*",
"@types/node": "^25.3.2",
"@types/node": "^25.3.3",
"fast-check": "^4.5.3",
"typescript": "^5.9.3"
},
Expand Down
11 changes: 10 additions & 1 deletion packages/bridge-compiler/test/fuzz-compile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,16 @@ const AsyncFunction = Object.getPrototypeOf(async function () {})
...args: string[]
) => (...args: unknown[]) => Promise<unknown>;

const identifierArb = fc.stringMatching(/^[a-zA-Z_][a-zA-Z0-9_]{0,20}$/);
const forbiddenPathSegments = new Set([
"__proto__",
"prototype",
"constructor",
]);

const identifierArb = fc
.stringMatching(/^[a-zA-Z_][a-zA-Z0-9_]{0,20}$/)
// Runtime blocks unsafe traversal segments; fuzz should stay in valid domain.
.filter((segment) => !forbiddenPathSegments.has(segment));
const canonicalIdentifierArb = fc.constantFrom(
"a",
"b",
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@stackables/bridge-types": "workspace:*"
},
"devDependencies": {
"@types/node": "^25.3.2",
"@types/node": "^25.3.3",
"typescript": "^5.9.3"
},
"publishConfig": {
Expand Down
8 changes: 4 additions & 4 deletions packages/bridge-graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
"devDependencies": {
"@graphql-tools/executor-http": "^3.1.0",
"@stackables/bridge-parser": "workspace:*",
"@types/node": "^25.3.2",
"graphql": "^16.13.0",
"@types/node": "^25.3.3",
"graphql": "^16.13.1",
"graphql-yoga": "^5.18.0",
"typescript": "^5.9.3"
},
"peerDependencies": {
"graphql": "^16",
"@graphql-tools/utils": "^11"
"@graphql-tools/utils": "^11",
"graphql": "^16"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/bridge-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
"dependencies": {
"@stackables/bridge-core": "workspace:*",
"@stackables/bridge-stdlib": "workspace:*",
"chevrotain": "^11.1.2"
"chevrotain": "^11.2.0"
},
"devDependencies": {
"@types/node": "^25.3.2",
"@types/node": "^25.3.3",
"typescript": "^5.9.3"
},
"publishConfig": {
Expand Down
27 changes: 26 additions & 1 deletion packages/bridge-parser/src/bridge-format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,29 @@ export function parseBridge(text: string): BridgeDocument {

const BRIDGE_VERSION = "1.5";

const RESERVED_BARE_VALUE_KEYWORDS = new Set([
"version",
"bridge",
"tool",
"define",
"with",
"input",
"output",
"context",
"const",
"from",
"as",
"alias",
"on",
"error",
"continue",
"break",
"throw",
"panic",
"if",
"pipe",
]);

/** Serialize a ControlFlowInstruction to its textual form. */
function serializeControl(ctrl: ControlFlowInstruction): string {
if (ctrl.kind === "throw") return `throw ${JSON.stringify(ctrl.message)}`;
Expand Down Expand Up @@ -77,7 +100,9 @@ function needsQuoting(v: string): boolean {
if (v === "true" || v === "false" || v === "null") return false;
if (/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/.test(v)) return false; // number
if (/^\/[\w./-]+$/.test(v)) return false; // /path
if (/^[a-zA-Z_][\w-]*$/.test(v)) return false; // identifier / keyword
if (/^[a-zA-Z_][\w-]*$/.test(v)) {
return RESERVED_BARE_VALUE_KEYWORDS.has(v);
}
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-stdlib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"lru-cache": "^11.2.6"
},
"devDependencies": {
"@types/node": "^25.3.2",
"@types/node": "^25.3.3",
"typescript": "^5.9.3"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-syntax-highlight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
},
"devDependencies": {
"@stackables/bridge": "workspace:*",
"@types/node": "^25.3.2",
"@types/node": "^25.3.3",
"@types/vscode": "^1.109.0",
"esbuild": "^0.27.3",
"typescript": "^5.9.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"license": "MIT",
"devDependencies": {
"@types/node": "^25.3.2",
"@types/node": "^25.3.3",
"typescript": "^5.9.3"
},
"publishConfig": {
Expand Down
6 changes: 3 additions & 3 deletions packages/bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
"devDependencies": {
"@graphql-tools/executor-http": "^3.1.0",
"@stackables/bridge-compiler": "workspace:*",
"@types/node": "^25.3.2",
"graphql": "^16.13.0",
"@types/node": "^25.3.3",
"graphql": "^16.13.1",
"graphql-yoga": "^5.18.0",
"typescript": "^5.9.3"
},
"dependencies": {
"@stackables/bridge-parser": "workspace:*",
"@stackables/bridge-core": "workspace:*",
"@stackables/bridge-graphql": "workspace:*",
"@stackables/bridge-parser": "workspace:*",
"@stackables/bridge-stdlib": "workspace:*"
},
"publishConfig": {
Expand Down
16 changes: 16 additions & 0 deletions packages/bridge/test/bridge-format.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1266,3 +1266,19 @@ bridge Query.test {
);
});
});

describe("serializeBridge string keyword quoting", () => {
test("keeps reserved-word strings quoted in constant wires", () => {
const src = `version 1.5
bridge Query.test {
with input as i
with output as o

o.value = "const"
}`;

const serialized = serializeBridge(parseBridge(src));
assert.ok(serialized.includes('o.value = "const"'), serialized);
assert.doesNotThrow(() => parseBridge(serialized));
});
});
4 changes: 2 additions & 2 deletions packages/docs-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
},
"devDependencies": {
"@astrojs/check": "^0.9.6",
"@types/node": "^25.3.2",
"@types/node": "^25.3.3",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@yeskunall/astro-umami": "^0.0.7",
"typescript": "^5.9.3",
"wrangler": "^4.69.0"
"wrangler": "^4.70.0"
}
}
18 changes: 9 additions & 9 deletions packages/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
"preview": "vite preview"
},
"dependencies": {
"@codemirror/autocomplete": "^6.20.0",
"@codemirror/autocomplete": "^6.20.1",
"@codemirror/commands": "^6.10.2",
"@codemirror/lang-json": "^6.0.2",
"@codemirror/language": "^6.12.2",
"@codemirror/lint": "^6.9.4",
"@codemirror/lint": "^6.9.5",
"@codemirror/state": "^6.5.4",
"@codemirror/view": "^6.39.15",
"@codemirror/view": "^6.39.16",
"@lezer/highlight": "^1.2.3",
"@radix-ui/react-dialog": "1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16",
Expand All @@ -29,23 +29,23 @@
"clsx": "2.1.1",
"cm6-graphql": "^0.2.1",
"codemirror": "^6.0.2",
"graphql": "^16.13.0",
"lucide-react": "0.575.0",
"graphql": "^16.13.1",
"lucide-react": "0.577.0",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"react-resizable-panels": "4.6.5",
"react-resizable-panels": "4.7.1",
"tailwind-merge": "3.5.0"
},
"devDependencies": {
"@cloudflare/vite-plugin": "^1.25.6",
"@cloudflare/workers-types": "^4.20260305.0",
"@cloudflare/vite-plugin": "^1.26.0",
"@cloudflare/workers-types": "^4.20260305.1",
"@tailwindcss/vite": "4.2.1",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^5.1.4",
"tailwindcss": "4.2.1",
"typescript": "^5.9.3",
"vite": "^7.3.1",
"wrangler": "^4.69.0"
"wrangler": "^4.70.0"
}
}
Loading