From d2a748e09a8446b8cc55a2f9fe2f8ee18726da8b Mon Sep 17 00:00:00 2001 From: kjgbot Date: Fri, 17 Apr 2026 13:06:29 +0200 Subject: [PATCH] fix(adapters): add writeback/types subpaths and default export condition @relayfile/adapter-notion and @relayfile/adapter-github only exposed bare-root imports, and their exports maps only declared the `import` condition. Downstream consumers running under CJS-style resolvers (notably `tsx --test` used by cloud integration tests) hit ERR_PACKAGE_PATH_NOT_EXPORTED on `@relayfile/adapter-github` and had to reach into `node_modules/.../dist/writeback.js` via relative paths. - Add `./writeback` subpath to adapter-notion and adapter-github so consumers can import writeback helpers without deep relative paths. - Add `./types` subpath to adapter-notion so `NotionWritebackRequest` and `DEFAULT_NOTION_API_VERSION` are reachable via a stable path. - Add `"default"` condition to every exports entry across notion, github, slack, and linear so resolvers without the `import` condition (tsx CJS, older bundlers) match the same ESM `.js` file. Builds and tests remain green for all four adapters. Co-Authored-By: Claude Opus 4.7 --- package-lock.json | 16 ++++++++-------- packages/github/package.json | 14 +++++++++++--- packages/linear/package.json | 6 ++++-- packages/notion/package.json | 13 ++++++++++++- packages/slack/package.json | 6 ++++-- 5 files changed, 39 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index caf9db5..3d6742d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2927,7 +2927,7 @@ }, "packages/core": { "name": "@relayfile/adapter-core", - "version": "0.1.1", + "version": "0.1.4", "license": "MIT", "dependencies": { "@scalar/postman-to-openapi": "^0.6.0", @@ -2954,10 +2954,10 @@ }, "packages/github": { "name": "@relayfile/adapter-github", - "version": "0.1.1", + "version": "0.1.4", "license": "MIT", "dependencies": { - "@relayfile/adapter-core": "file:../core" + "@relayfile/adapter-core": "^0.1.1" }, "devDependencies": { "@relayfile/sdk": "^0.1.7", @@ -2974,7 +2974,7 @@ }, "packages/gitlab": { "name": "@relayfile/adapter-gitlab", - "version": "0.1.1", + "version": "0.1.4", "license": "MIT", "dependencies": { "@relayfile/sdk": "^0.1.7" @@ -2990,7 +2990,7 @@ }, "packages/linear": { "name": "@relayfile/adapter-linear", - "version": "0.1.2", + "version": "0.1.5", "license": "MIT", "dependencies": { "@agent-relay/sdk": "^3.2.22", @@ -3007,7 +3007,7 @@ }, "packages/notion": { "name": "@relayfile/adapter-notion", - "version": "0.1.1", + "version": "0.1.4", "license": "MIT", "dependencies": { "@agent-relay/sdk": "^3.2.22", @@ -3022,7 +3022,7 @@ }, "packages/slack": { "name": "@relayfile/adapter-slack", - "version": "0.1.2", + "version": "0.1.5", "license": "MIT", "dependencies": { "@agent-relay/sdk": "^3.2.22", @@ -3039,7 +3039,7 @@ }, "packages/teams": { "name": "@relayfile/adapter-teams", - "version": "0.1.1", + "version": "0.1.4", "license": "MIT", "dependencies": { "@relayfile/sdk": "^0.1.7" diff --git a/packages/github/package.json b/packages/github/package.json index 31f143a..3490862 100644 --- a/packages/github/package.json +++ b/packages/github/package.json @@ -8,15 +8,23 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./dist/index.js" + "import": "./dist/index.js", + "default": "./dist/index.js" }, "./path-mapper": { "types": "./dist/path-mapper.d.ts", - "import": "./dist/path-mapper.js" + "import": "./dist/path-mapper.js", + "default": "./dist/path-mapper.js" }, "./adapter": { "types": "./dist/adapter.d.ts", - "import": "./dist/adapter.js" + "import": "./dist/adapter.js", + "default": "./dist/adapter.js" + }, + "./writeback": { + "types": "./dist/writeback.d.ts", + "import": "./dist/writeback.js", + "default": "./dist/writeback.js" } }, "files": [ diff --git a/packages/linear/package.json b/packages/linear/package.json index 0a8386c..2facf67 100644 --- a/packages/linear/package.json +++ b/packages/linear/package.json @@ -8,11 +8,13 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./dist/index.js" + "import": "./dist/index.js", + "default": "./dist/index.js" }, "./path-mapper": { "types": "./dist/path-mapper.d.ts", - "import": "./dist/path-mapper.js" + "import": "./dist/path-mapper.js", + "default": "./dist/path-mapper.js" } }, "files": [ diff --git a/packages/notion/package.json b/packages/notion/package.json index 0beb2d6..1f5524e 100644 --- a/packages/notion/package.json +++ b/packages/notion/package.json @@ -8,7 +8,18 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./dist/index.js" + "import": "./dist/index.js", + "default": "./dist/index.js" + }, + "./writeback": { + "types": "./dist/writeback.d.ts", + "import": "./dist/writeback.js", + "default": "./dist/writeback.js" + }, + "./types": { + "types": "./dist/types.d.ts", + "import": "./dist/types.js", + "default": "./dist/types.js" } }, "files": [ diff --git a/packages/slack/package.json b/packages/slack/package.json index 434bc2a..33341fa 100644 --- a/packages/slack/package.json +++ b/packages/slack/package.json @@ -9,11 +9,13 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./dist/index.js" + "import": "./dist/index.js", + "default": "./dist/index.js" }, "./path-mapper": { "types": "./dist/path-mapper.d.ts", - "import": "./dist/path-mapper.js" + "import": "./dist/path-mapper.js", + "default": "./dist/path-mapper.js" } }, "files": [