From fa7c15bfe493ead227de26d50205825cc308cf9a Mon Sep 17 00:00:00 2001 From: Upd4ting Date: Thu, 20 Aug 2026 15:54:11 +0000 Subject: [PATCH 1/2] fix: support interface-core 0.0.11 --- package.json | 2 +- playground/package.json | 2 +- pnpm-lock.yaml | 42 +++++++++++++------------- src/implementations/api/index.ts | 2 ++ src/test/controller-resolution.test.ts | 6 +++- 5 files changed, 30 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 36461b7..42c26e1 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "dependencies": { "@antelopejs/interface-api": ">=0.0.11 <1.0.0", "@antelopejs/interface-api-util": "^0.1.1", - "@antelopejs/interface-core": "^0.0.6", + "@antelopejs/interface-core": ">=0.0.6 <1.0.0", "reflect-metadata": "^0.2.2", "ws": "^8.20.0" }, diff --git a/playground/package.json b/playground/package.json index 91f7d8a..10b6198 100644 --- a/playground/package.json +++ b/playground/package.json @@ -8,7 +8,7 @@ "dependencies": { "@antelopejs/interface-api": "^0.0.8", "@antelopejs/interface-api-util": "^0.1.1", - "@antelopejs/interface-core": "^0.0.6" + "@antelopejs/interface-core": ">=0.0.6 <1.0.0" }, "devDependencies": { "@types/node": "^20.5.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1b0f70f..d27be23 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,13 +10,13 @@ importers: dependencies: '@antelopejs/interface-api': specifier: '>=0.0.11 <1.0.0' - version: 0.0.11(@antelopejs/interface-core@0.0.6) + version: 0.0.11(@antelopejs/interface-core@0.0.11) '@antelopejs/interface-api-util': specifier: ^0.1.1 - version: 0.1.1(@antelopejs/interface-api@0.0.11(@antelopejs/interface-core@0.0.6))(@antelopejs/interface-core@0.0.6) + version: 0.1.1(@antelopejs/interface-api@0.0.11(@antelopejs/interface-core@0.0.11))(@antelopejs/interface-core@0.0.11) '@antelopejs/interface-core': - specifier: ^0.0.6 - version: 0.0.6 + specifier: '>=0.0.6 <1.0.0' + version: 0.0.11 reflect-metadata: specifier: ^0.2.2 version: 0.2.2 @@ -59,13 +59,13 @@ importers: dependencies: '@antelopejs/interface-api': specifier: ^0.0.8 - version: 0.0.8(@antelopejs/interface-core@0.0.6) + version: 0.0.8(@antelopejs/interface-core@0.0.11) '@antelopejs/interface-api-util': specifier: ^0.1.1 - version: 0.1.1(@antelopejs/interface-api@0.0.8(@antelopejs/interface-core@0.0.6))(@antelopejs/interface-core@0.0.6) + version: 0.1.1(@antelopejs/interface-api@0.0.8(@antelopejs/interface-core@0.0.11))(@antelopejs/interface-core@0.0.11) '@antelopejs/interface-core': - specifier: ^0.0.6 - version: 0.0.6 + specifier: '>=0.0.6 <1.0.0' + version: 0.0.11 devDependencies: '@types/node': specifier: ^20.5.7 @@ -95,8 +95,8 @@ packages: peerDependencies: '@antelopejs/interface-core': '>=0.0.3 <1.0.0' - '@antelopejs/interface-core@0.0.6': - resolution: {integrity: sha512-OMna86iT/ylL6wJl6FCPw9ieddULXGs4jTmeiDBNEXYQ9acnVXjS/+SaN0UR0h7oY7WTD9VwKXVwG95qjNIA1w==} + '@antelopejs/interface-core@0.0.11': + resolution: {integrity: sha512-eKE3F9XY0eIzdLBXms8QAY4BHmA8+XXZnta0vZ411q9GiSbI2S1Q3lfYzmnXU4ZK9i+/SIYPplOsA02gIdxODg==} '@biomejs/biome@2.3.2': resolution: {integrity: sha512-8e9tzamuDycx7fdrcJ/F/GDZ8SYukc5ud6tDicjjFqURKYFSWMl0H0iXNXZEGmcmNUmABgGuHThPykcM41INgg==} @@ -1231,25 +1231,25 @@ packages: snapshots: - '@antelopejs/interface-api-util@0.1.1(@antelopejs/interface-api@0.0.11(@antelopejs/interface-core@0.0.6))(@antelopejs/interface-core@0.0.6)': + '@antelopejs/interface-api-util@0.1.1(@antelopejs/interface-api@0.0.11(@antelopejs/interface-core@0.0.11))(@antelopejs/interface-core@0.0.11)': dependencies: - '@antelopejs/interface-api': 0.0.11(@antelopejs/interface-core@0.0.6) - '@antelopejs/interface-core': 0.0.6 + '@antelopejs/interface-api': 0.0.11(@antelopejs/interface-core@0.0.11) + '@antelopejs/interface-core': 0.0.11 - '@antelopejs/interface-api-util@0.1.1(@antelopejs/interface-api@0.0.8(@antelopejs/interface-core@0.0.6))(@antelopejs/interface-core@0.0.6)': + '@antelopejs/interface-api-util@0.1.1(@antelopejs/interface-api@0.0.8(@antelopejs/interface-core@0.0.11))(@antelopejs/interface-core@0.0.11)': dependencies: - '@antelopejs/interface-api': 0.0.8(@antelopejs/interface-core@0.0.6) - '@antelopejs/interface-core': 0.0.6 + '@antelopejs/interface-api': 0.0.8(@antelopejs/interface-core@0.0.11) + '@antelopejs/interface-core': 0.0.11 - '@antelopejs/interface-api@0.0.11(@antelopejs/interface-core@0.0.6)': + '@antelopejs/interface-api@0.0.11(@antelopejs/interface-core@0.0.11)': dependencies: - '@antelopejs/interface-core': 0.0.6 + '@antelopejs/interface-core': 0.0.11 - '@antelopejs/interface-api@0.0.8(@antelopejs/interface-core@0.0.6)': + '@antelopejs/interface-api@0.0.8(@antelopejs/interface-core@0.0.11)': dependencies: - '@antelopejs/interface-core': 0.0.6 + '@antelopejs/interface-core': 0.0.11 - '@antelopejs/interface-core@0.0.6': + '@antelopejs/interface-core@0.0.11': dependencies: reflect-metadata: 0.2.2 diff --git a/src/implementations/api/index.ts b/src/implementations/api/index.ts index 404444b..d05e4cd 100644 --- a/src/implementations/api/index.ts +++ b/src/implementations/api/index.ts @@ -298,3 +298,5 @@ export const routesProxy = { return routes; }, }; + +export const internal = { routesProxy }; diff --git a/src/test/controller-resolution.test.ts b/src/test/controller-resolution.test.ts index ad7b304..53d144d 100644 --- a/src/test/controller-resolution.test.ts +++ b/src/test/controller-resolution.test.ts @@ -6,7 +6,7 @@ import { type RouteHandler, } from "@antelopejs/interface-api"; import { GetMetadata } from "@antelopejs/interface-core"; -import { routesProxy } from "../implementations/api"; +import { internal, routesProxy } from "../implementations/api"; import { requestListener } from "../server"; const TEST_HOST = "127.0.0.1"; @@ -114,6 +114,10 @@ describe("Controller resolution", () => { await close(server); }); + it("exposes the route proxy through the nested interface contract", () => { + assert.equal(internal.routesProxy, routesProxy); + }); + it("isolates computed properties across concurrent requests", async () => { const Controller = createController(); const properties = { From 841d083f86857f4e3abe1f07ce269b19a026c695 Mon Sep 17 00:00:00 2001 From: Upd4ting Date: Thu, 20 Aug 2026 17:34:53 +0000 Subject: [PATCH 2/2] test: exercise strict interface attachment --- src/test/controller-resolution.test.ts | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/test/controller-resolution.test.ts b/src/test/controller-resolution.test.ts index 53d144d..a5dbb07 100644 --- a/src/test/controller-resolution.test.ts +++ b/src/test/controller-resolution.test.ts @@ -1,12 +1,14 @@ import assert from "node:assert"; +import { spawnSync } from "node:child_process"; import { createServer, type Server } from "node:http"; +import { resolve } from "node:path"; import { type ComputedParameter, ControllerMeta, type RouteHandler, } from "@antelopejs/interface-api"; import { GetMetadata } from "@antelopejs/interface-core"; -import { internal, routesProxy } from "../implementations/api"; +import { routesProxy } from "../implementations/api"; import { requestListener } from "../server"; const TEST_HOST = "127.0.0.1"; @@ -114,8 +116,21 @@ describe("Controller resolution", () => { await close(server); }); - it("exposes the route proxy through the nested interface contract", () => { - assert.equal(internal.routesProxy, routesProxy); + it("attaches the full implementation through the nested interface contract", () => { + const result = spawnSync( + process.execPath, + [ + "-e", + `const { ImplementInterface } = require("@antelopejs/interface-core"); + ImplementInterface( + require("@antelopejs/interface-api"), + require("./dist/implementations/api"), + );`, + ], + { cwd: resolve(__dirname, "../.."), encoding: "utf8" }, + ); + + assert.equal(result.status, 0, result.stderr); }); it("isolates computed properties across concurrent requests", async () => {