Skip to content

fix!: isolate Axios from native and shared runtime imports - #97

Closed
urbankrepel-povio wants to merge 1 commit into
mainfrom
codex/optional-axios-peer
Closed

urbankrepel-povio wants to merge 1 commit into
mainfrom
codex/optional-axios-peer

Conversation

@urbankrepel-povio

@urbankrepel-povio urbankrepel-povio commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Native consumers still needed Axios despite its optional peer metadata: the root entry point eagerly re-exported the Axios client, and shared REST utility declarations imported Axios types. Importing the built root with Axios unavailable reproduced the runtime failure.

Confine Axios-specific exports to /axios and remove Axios types from shared utilities. Message matching accepts unknown errors; filename extraction supports native Headers and Axios-style records. Add an isolated published-artifact consumer check to CI that imports non-Axios entry points and compiles declarations with skipLibCheck disabled without Axios, then verifies the Axios entry point with Axios installed.

Breaking change: move root imports of RestClient, RestInterceptor, RequestInfo, RequestConfig, Response, and IRestClient to @povio/openapi-codegen-cli/axios. NativeRestClient and shared helpers remain available from the root. The README documents this migration.

Local validation:

  • Typecheck and lint passed.
  • Full TypeScript and required-native suites: 791 passed, 13 skipped each.
  • Built artifact runtime and declaration checks passed without Axios; /axios failed as expected when blocked and passed when installed.
  • Tree-shaking checks and git diff --check passed.

CI results are separate from these local checks.

@urbankrepel-povio urbankrepel-povio changed the title docs: clarify optional Axios dependency fix!: isolate Axios from native and shared runtime imports Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants