Conversation
…lient, ErrataClientOptions), updating exports and tests. - Slim public exports to the core surface, later re‑exporting match handler types for consumers. - Restore per‑entry exports in package.json to include both import and types paths for . and ./client.
There was a problem hiding this comment.
Pull request overview
This PR merges the main branch into the docs branch, introducing significant changes in preparation for a 1.0.0 release. The changes include API naming improvements (renaming ErrorClient → ErrataClient), restructured imports, simplified package exports, and removal of pre-release documentation.
- Renamed client API from
createErrorClient/ErrorClient→createErrataClient/ErrataClientfor consistency - Updated test imports to use direct type imports from
'../src/types'instead of the main export - Bumped version from 0.0.0 to 1.0.0 and simplified package.json exports configuration
- Removed many utility types from public API exports (CodesOf, DetailsOf, InternalCode, pattern matching types)
- Cleaned up pre-release developer notes from README
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/errata/test/errata.test.ts | Updated import path for InternalCode type from main index to types module |
| packages/errata/test/define-codes.test.ts | Updated import path for DetailsOf type from main index to types module |
| packages/errata/test/client.test.ts | Updated type imports and renamed all createErrorClient calls to createErrataClient |
| packages/errata/test/client-plugins.test.ts | Renamed all createErrorClient calls to createErrataClient throughout the test suite |
| packages/errata/src/index.ts | Renamed client exports and removed many utility type exports from public API |
| packages/errata/src/client.ts | Renamed ErrorClient interface to ErrataClient and ErrorClientOptions to ErrataClientOptions, plus function rename |
| packages/errata/package.json | Bumped version to 1.0.0 and simplified exports by removing explicit type definitions from export map |
| README.md | Removed pre-release "Note for Developers" section about npm Trusted Publisher setup |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ".": "./dist/index.mjs", | ||
| "./client": "./dist/client.mjs", |
There was a problem hiding this comment.
The simplified export configuration removes TypeScript type definitions from the exports map. This could break TypeScript imports for consumers using moduleResolution "bundler" or "node16"/"nodenext". The previous configuration explicitly specified types fields for each export, which is the recommended practice for dual CJS/ESM packages. Consider restoring the type definitions in the exports or ensure the top-level "types" field adequately covers all exports.
| ".": "./dist/index.mjs", | |
| "./client": "./dist/client.mjs", | |
| ".": { | |
| "types": "./dist/index.d.mts", | |
| "default": "./dist/index.mjs" | |
| }, | |
| "./client": { | |
| "types": "./dist/client.d.mts", | |
| "default": "./dist/client.mjs" | |
| }, |
| ErrataConfig, | ||
| ErrataContext, | ||
| ErrataErrorForCodes, | ||
| ErrataPlugin, |
There was a problem hiding this comment.
Critical breaking change: The removal of many utility types from the public API (including CodesOf, InternalCode, DetailsOf, and many pattern matching types) will break existing consumers of this library. These types are actively used in the test files (see client.test.ts line 1, errata.test.ts line 1, define-codes.test.ts line 1) and are likely used by external consumers. For a 1.0.0 release, consider whether these types should remain part of the public API or if this is an intentional breaking change that should be documented.
| ErrataPlugin, | |
| ErrataPlugin, | |
| CodesOf, | |
| InternalCode, | |
| DetailsOf, |
No description provided.