Skip to content

Fix/deduplicate request options imports#97

Open
nelly439 wants to merge 2 commits into
Adamantine-guild:mainfrom
nelly439:fix/deduplicate-request-options-imports
Open

Fix/deduplicate request options imports#97
nelly439 wants to merge 2 commits into
Adamantine-guild:mainfrom
nelly439:fix/deduplicate-request-options-imports

Conversation

@nelly439

Copy link
Copy Markdown

Description

Semver impact:

Linked Issue

Closes #

Type of Change

  • 🐛 Bug fix (patch)
  • ✨ New feature / method (minor)
  • 💥 Breaking change (major)
  • 📝 Documentation / TypeDoc update
  • 🔧 Chore / refactor
  • 🧪 Tests only

Changes Made

Public API Changes

// New / changed exports:

Test Evidence

pnpm test:run output:

Build Evidence

pnpm build output:

Checklist

  • I have read CONTRIBUTING.md
  • This PR is linked to an open issue
  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test:run passes — all tests green
  • pnpm build succeeds — dist/ generated cleanly
  • All new public methods/types have TypeDoc comments
  • New behaviour is covered by at least one Vitest unit test
  • No new runtime dependencies added without prior maintainer approval
  • docs/ updated if public API changed
  • examples/ updated if new usage patterns were added
  • Backwards compatibility maintained (or breaking change clearly noted above)
    closes Remove duplicate RequestOptions imports in access service #83

nelly439 added 2 commits June 25, 2026 20:42
…dation

- Merge the two 'dependencies' objects in package.json into one canonical
  block (js-sha3 ^0.9.3 is unchanged — only the duplicate entry is removed)
- Add 'validate' script: npx publint, which statically checks exports,
  files, and package metadata for correctness before publish
- Add .github/workflows/ci.yml: runs validate → lint → typecheck →
  unit tests → build → smoke tests across Node 18/20/22 on every
  push/PR to main, ensuring duplicate-key and malformed-metadata regressions
  are caught automatically
- Document 'pnpm validate' in README Development section
- Remove the RequestOptions alias from src/http/http.types.ts (was
  Pick<HttpRequestOptions, 'timeoutMs' | 'signal'>). This type lived
  alongside the canonical RequestOptions in src/types/common.ts, causing
  every service to carry two import statements for the same identifier.

- Expand the canonical RequestOptions in src/types/common.ts to include
  signal?: AbortSignal so it is a superset of the old http-layer alias.
  All per-request caller options (timeoutMs, retry, signal) now come
  from one place.

- Fix all four service files (access, guilds, membership, roles) to
  import RequestOptions via a single 'import type' from ../types/common.
  The stale import from ../http/http.types has been removed from each.

- Add 'no-duplicate-imports' ESLint rule (includeExports: true) so any
  future file that imports the same specifier from two paths is caught
  during linting.

- Add a 'ci' npm script (typecheck && lint) that CI can use to verify
  both type correctness and import hygiene in one command.

No public method signatures or runtime behaviour have changed.
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.

Remove duplicate RequestOptions imports in access service

1 participant