Skip to content

Commit 51e2bf0

Browse files
committed
chore: tighten publish workflow and docs around generated build artifacts
Restructure repository and publishing ergonomics after the TypeScript migration by moving fully to generated build artifacts, improving contributor guidance, and documenting usage with a more explicit developer-first README. Repository and workflow updates: - Stop tracking compiled output in git and treat it as generated build output. - Keep npm package output unchanged by continuing to publish via package and lifecycle build hooks. - Update with a more complete Node/TS baseline: - ignore , tsbuildinfo, coverage output, common debug logs, env-local variants, and editor/OS noise. - Update as a defense-in-depth publish filter for local-only, source-only, and tool metadata files. - Replace with in so build happens consistently during > @timmsy/riftjs@3.1.0 prepack > npm run build > @timmsy/riftjs@3.1.0 build > tsc -p tsconfig.json and > @timmsy/riftjs@3.1.0 prepack > npm run build > @timmsy/riftjs@3.1.0 build > tsc -p tsconfig.json. Documentation overhaul: - Rewrite README into a practical, step-by-step guide with clear install/setup flow. - Add separate quick-start examples for CommonJS and TypeScript users. - Expand endpoint reference with explicit inputs, outputs, option shapes, and pacing behavior. - Document supported region routing behavior and normalized error semantics. - Clarify local development lifecycle (, , optional env vars) and package output structure. - Link maintainer guidance from the README. Maintainer guidance and in-code intent notes: - Add with project scope, API stability expectations, typing standards, rate-limit posture, and release checklist. - Add maintainability comments in core TS modules to preserve implementation intent around: - strict region validation - class API surface wiring - Data Dragon base URL concurrency handling - conservative pacing defaults and sequential detail fetching - test skip semantics for no-match accounts - Standardize maintainer comment attribution to . Net effect: This commit reduces repository noise, keeps published package behavior stable, and significantly improves onboarding/maintenance clarity for both users and contributors without changing the public runtime API surface.
1 parent 3116e0e commit 51e2bf0

19 files changed

+331
-606
lines changed

.gitignore

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,30 @@
1-
node_modules
1+
# Dependencies
2+
node_modules/
3+
4+
# Environment files (keep examples committed)
25
.env
3-
test.js
6+
.env.local
7+
.env.*.local
8+
9+
# Logs
410
*.log
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
pnpm-debug.log*
15+
16+
# TypeScript incremental build metadata
17+
*.tsbuildinfo
18+
19+
# Build output (generated locally, not tracked)
20+
dist/
21+
22+
# Test and coverage output
23+
coverage/
24+
.nyc_output/
25+
26+
# OS / editor noise
27+
.DS_Store
28+
Thumbs.db
29+
.idea/
30+
.vscode/

.npmignore

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,32 @@
1+
# Local environment files
12
.env
3+
.env.local
4+
.env.*.local
25
.env.example
6+
7+
# Source and project-only files
8+
src/
9+
tsconfig.json
10+
MAINTAINER_NOTES.md
11+
.github/
12+
13+
# VCS/editor metadata
14+
.git/
315
.gitignore
4-
*.test.js
5-
test.js
16+
.DS_Store
17+
Thumbs.db
18+
.idea/
19+
.vscode/
20+
21+
# Logs and reports
622
*.log
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
pnpm-debug.log*
27+
coverage/
28+
.nyc_output/
29+
*.tsbuildinfo
30+
31+
# Node modules (safety)
32+
node_modules/

MAINTAINER_NOTES.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Maintainer Notes
2+
3+
These are personal notes for future maintenance. They are intentionally direct.
4+
5+
## Project intent
6+
7+
- Keep this package small and predictable.
8+
- The goal is to provide a thin wrapper around Riot endpoints, not an abstraction framework.
9+
- Prefer explicit methods over clever generic request builders.
10+
11+
## API stability
12+
13+
- Avoid breaking constructor behavior in `RiotAPI` and `DataDragon`.
14+
- Keep method names stable unless there is a strong reason to change them.
15+
- If a method signature changes, update:
16+
- `src/types.ts`
17+
- `README.md`
18+
- `src/test-endpoints.ts`
19+
20+
## TypeScript expectations
21+
22+
- Source of truth is always `src/`.
23+
- `dist/` is build output, committed for npm consumers and transparency.
24+
- Keep strict typing on, and do not weaken it just to silence compiler warnings.
25+
26+
## Error handling stance
27+
28+
- Error messages should stay readable in terminal logs.
29+
- `RiotAPI` should keep returning normalized `Error` messages.
30+
- Data Dragon wrappers should preserve the root error message.
31+
32+
## Rate limit and pacing
33+
34+
- Multi-request methods exist because Riot rate limits are easy to hit.
35+
- Keep pacing defaults conservative unless usage data says otherwise.
36+
- If defaults change, call it out clearly in changelog and README.
37+
38+
## Release checklist (quick)
39+
40+
1. Run `npm run build`
41+
2. Run `npm test`
42+
3. Verify `README.md` examples still match real method signatures
43+
4. Verify `package.json` points to `dist/index.js` and `dist/index.d.ts`
44+
5. Commit source and matching `dist` output together
45+
46+
## Notes to self
47+
48+
- Keep docs practical. Most users want a working snippet first.
49+
- Do not overcomplicate return types until there is clear demand.
50+
- If Riot deprecates an endpoint, mark it clearly and provide migration guidance.

0 commit comments

Comments
 (0)