Conversation
There was a problem hiding this comment.
Pull request overview
Adds exports fields to several @autobe/* packages to define package entrypoints (and allow ./package.json access), with the apparent goal of improving packaging/consumption behavior as these packages are published.
Changes:
- Add top-level
exportsmapping.to./src/index.ts(and allow./package.json) in multiple packages. - Add/extend
publishConfig.exportsto map published entrypoints to./lib/*outputs.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/utils/package.json | Adds exports and moves/extends publishConfig with a lib-based exports map |
| packages/rpc/package.json | Adds exports and moves/extends publishConfig with a lib-based exports map |
| packages/interface/package.json | Adds exports and moves/extends publishConfig with a lib-based exports map |
| packages/filesystem/package.json | Adds top-level exports and extends publishConfig with a lib-based exports map |
| packages/compiler/package.json | Adds top-level exports and extends publishConfig with a lib-based exports map |
| packages/benchmark/package.json | Adds exports and moves/extends publishConfig with a lib-based exports map |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "main": "src/index.ts", | ||
| "exports": { | ||
| ".": "./src/index.ts", |
There was a problem hiding this comment.
The new top-level exports points to ./src/index.ts. Because exports takes precedence over main, consumers (including Node at runtime) will resolve to a .ts file, even though the package build outputs lib/*.js. If this package is meant to be consumable after prepack/publish, the top-level exports should point at ./lib/index.js (and types to ./lib/index.d.ts) instead of relying on publishConfig.exports (which package resolvers don’t use).
| "main": "src/index.ts", | |
| "exports": { | |
| ".": "./src/index.ts", | |
| "main": "lib/index.js", | |
| "types": "lib/index.d.ts", | |
| "exports": { | |
| ".": { | |
| "types": "./lib/index.d.ts", | |
| "default": "./lib/index.js" | |
| }, |
| "main": "src/index.ts", | ||
| "exports": { | ||
| ".": "./src/index.ts", |
There was a problem hiding this comment.
The new top-level exports points to ./src/index.ts. Because exports takes precedence over main, consumers (including Node at runtime) will resolve to a .ts file, even though the package build outputs lib/*.js. If this package is meant to be consumable after prepack/publish, the top-level exports should point at ./lib/index.js (and types to ./lib/index.d.ts) instead of relying on publishConfig.exports (which package resolvers don’t use).
| "main": "src/index.ts", | |
| "exports": { | |
| ".": "./src/index.ts", | |
| "main": "lib/index.js", | |
| "types": "lib/index.d.ts", | |
| "exports": { | |
| ".": { | |
| "types": "./lib/index.d.ts", | |
| "default": "./lib/index.js" | |
| }, |
| "main": "src/index.ts", | ||
| "exports": { | ||
| ".": "./src/index.ts", |
There was a problem hiding this comment.
The new top-level exports points to ./src/index.ts. Because exports takes precedence over main, consumers (including Node at runtime) will resolve to a .ts file, even though the package build outputs lib/*.js. If this package is meant to be consumable after prepack/publish, the top-level exports should point at ./lib/index.js (and types to ./lib/index.d.ts) instead of relying on publishConfig.exports (which package resolvers don’t use).
| "main": "src/index.ts", | |
| "exports": { | |
| ".": "./src/index.ts", | |
| "main": "lib/index.js", | |
| "types": "lib/index.d.ts", | |
| "exports": { | |
| ".": "./lib/index.js", |
| "main": "src/index.ts", | ||
| "exports": { | ||
| ".": "./src/index.ts", |
There was a problem hiding this comment.
The new top-level exports points to ./src/index.ts. Because exports takes precedence over main, consumers (including Node at runtime) will resolve to a .ts file, even though the package build outputs lib/*.js. If this package is meant to be consumable after prepack/publish, the top-level exports should point at ./lib/index.js (and types to ./lib/index.d.ts) instead of relying on publishConfig.exports (which package resolvers don’t use).
| "main": "src/index.ts", | |
| "exports": { | |
| ".": "./src/index.ts", | |
| "main": "lib/index.js", | |
| "types": "lib/index.d.ts", | |
| "exports": { | |
| ".": { | |
| "types": "./lib/index.d.ts", | |
| "default": "./lib/index.js" | |
| }, |
| "main": "src/index.ts", | ||
| "exports": { | ||
| ".": "./src/index.ts", |
There was a problem hiding this comment.
The new top-level exports points to ./src/index.ts. Because exports takes precedence over main, consumers (including Node at runtime) will resolve to a .ts file, even though the package build outputs lib/*.js. If this package is meant to be consumable after prepack/publish, the top-level exports should point at ./lib/index.js (and types to ./lib/index.d.ts) instead of relying on publishConfig.exports (which package resolvers don’t use).
| "main": "src/index.ts", | |
| "exports": { | |
| ".": "./src/index.ts", | |
| "main": "lib/index.js", | |
| "types": "lib/index.d.ts", | |
| "exports": { | |
| ".": { | |
| "types": "./lib/index.d.ts", | |
| "default": "./lib/index.js" | |
| }, |
| "main": "src/index.ts", | ||
| "exports": { | ||
| ".": "./src/index.ts", |
There was a problem hiding this comment.
The new top-level exports points to ./src/index.ts. Because exports takes precedence over main, consumers (including Node at runtime) will resolve to a .ts file, even though the package build outputs lib/*.js. If this package is meant to be consumable after prepack/publish, the top-level exports should point at ./lib/index.js (and types to ./lib/index.d.ts) instead of relying on publishConfig.exports (which package resolvers don’t use).
| "main": "src/index.ts", | |
| "exports": { | |
| ".": "./src/index.ts", | |
| "main": "lib/index.js", | |
| "types": "lib/index.d.ts", | |
| "exports": { | |
| ".": { | |
| "types": "./lib/index.d.ts", | |
| "default": "./lib/index.js" | |
| }, |
Not
agentpackage yet, but someday soon.