Fix/deduplicate request options imports#97
Open
nelly439 wants to merge 2 commits into
Open
Conversation
…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.
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.
Description
Semver impact:
Linked Issue
Closes #
Type of Change
Changes Made
Public API Changes
// New / changed exports:Test Evidence
Build Evidence
Checklist
pnpm typecheckpassespnpm lintpassespnpm test:runpasses — all tests greenpnpm buildsucceeds —dist/generated cleanlydocs/updated if public API changedexamples/updated if new usage patterns were addedcloses Remove duplicate
RequestOptionsimports in access service #83