fix(adapters): add writeback/types subpaths and default export condition#21
Merged
khaliqgant merged 1 commit intomainfrom Apr 17, 2026
Merged
fix(adapters): add writeback/types subpaths and default export condition#21khaliqgant merged 1 commit intomainfrom
khaliqgant merged 1 commit intomainfrom
Conversation
@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 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
./writebacksubpath to@relayfile/adapter-notionand@relayfile/adapter-github./typessubpath to@relayfile/adapter-notion\"default\"condition to every exports entry (notion, github, slack, linear)Why
@relayfile/adapter-notionand@relayfile/adapter-githubonly exposed bare-root imports and their exports maps only declared theimportcondition. Downstream consumers running under CJS-style resolvers — in particulartsx --testused by the cloud integration tests — hitERR_PACKAGE_PATH_NOT_EXPORTEDon@relayfile/adapter-githuband had to reach intonode_modules/.../dist/writeback.jsvia fragile relative paths:With this change, the cloud writeback bridge can use clean package-root / subpath imports:
Test plan
npm run buildclean for notion, github, slack, linearnpm test -w @relayfile/adapter-notion— 18/18 passnpm test -w @relayfile/adapter-github— 167/167 passnpm test -w @relayfile/adapter-slack— 8/8 passnpm test -w @relayfile/adapter-linear— 13/13 passrequire.resolve('@relayfile/adapter-notion/writeback')→dist/writeback.jsrequire.resolve('@relayfile/adapter-notion/types')→dist/types.jsrequire.resolve('@relayfile/adapter-github/writeback')→dist/writeback.js🤖 Generated with Claude Code