Dopamine AI Prompt Library
Open search
Menu
Submitted by
adam_c28 prompts

TypeScript Library Publishing taste

Added Nov 26, 2026

Prompt

typescript-library-publishing-taste.mdMarkdown · 22 lines · about 610 tokens
# TypeScript Library Publishing taste of a maintainer who ships small, well-typed npm packages
- Publish ESM first and add a CommonJS build only when real consumers still need `require()`. Confidence: 0.80
- Define entry points with the `exports` map and keep `main`/`types` only as fallbacks for old tooling. Confidence: 0.90
- Put `types` conditions first inside each `exports` entry so TypeScript resolves declarations correctly. Confidence: 0.85
- Build with tsup or tsdown for bundles and plain `tsc --emitDeclarationOnly` for `.d.ts` files. Confidence: 0.75
- Turn on `strict`, `noUncheckedIndexedAccess` and `exactOptionalPropertyTypes` in the library's own tsconfig. Confidence: 0.85
- Check the published package with `publint` and `@arethetypeswrong/cli` in CI before every release. Confidence: 0.90
- Whitelist shipped files with the `files` field instead of maintaining an `.npmignore`. Confidence: 0.90
- Set `"sideEffects": false` when it is true so bundlers can tree-shake unused exports. Confidence: 0.85
- Export named functions only; avoid default exports so imports stay consistent across ESM and CJS. Confidence: 0.80
- Keep runtime dependencies near zero and move framework packages to `peerDependencies`. Confidence: 0.90
- Declare a supported Node.js range in `engines` and test that range in a CI matrix. Confidence: 0.80
- Treat exported types as public API: changing or removing them is a breaking change under semver. Confidence: 0.95
- Mark internal helpers with `@internal` and strip them with `stripInternal` so they don't leak into declarations. Confidence: 0.70
- Write TSDoc comments on every public export, including an `@example` that compiles. Confidence: 0.80
- Test against the built output, not only the source, so broken `exports` paths fail in CI. Confidence: 0.85
- Add type-level tests with `expectTypeOf` or `tsd` for generics and overloads. Confidence: 0.80
- Manage versions and changelogs with Changesets, and release from CI rather than a laptop. Confidence: 0.85
- Publish with npm provenance enabled and use a granular automation token scoped to the package. Confidence: 0.85
- Ship source maps and declaration maps so "go to definition" lands on real TypeScript source. Confidence: 0.75
- Never rely on `postinstall` scripts; a library should install without running code. Confidence: 0.90
- Keep the README's first screen to install, a minimal example and a link to full docs. Confidence: 0.80

About this prompt

Content type
Code
Industries
Software Development
Models
GPT
Languages
English
Length
22 lines, about 610 tokens
Added
Nov 26, 2026
License
CC0
Request takedown
adam_c28 prompts
Profile

More from adam_c

View all

Reflective Companion, Not Advice

You are a reflective companion. Your role is to help the user understand themselves more clearly through gentle reflection. You are not a therapist, coach, guru, diagnostician, or authority over the user’s inner life. Core rules: - Reflect, do not advise. - Offer possibilities, not conclusions. - Help the user hear their own truth, not depend on you. - Never tell the user what they should do. -

Maths reviewer

I am a subject matter expert in maths specially indian content. There are HTML with me created by developers/designers. I would like to review them using pedagogical perspective and design perspective as well. Also, if any content is for lets suppose grade 8 then even grade 7 can able to understand that the HTML should be that seamless and engaging.

Performing a Popular Song at a Concert

Act as a professional singer preparing to perform at an open-air concert. You are tasked with performing a popular song such as "I Just Called to Say I Love You." Your responsibilities include rehearsing the song, engaging with the audience, and delivering a memorable performance. You will: - Practice the song thoroughly to ensure a flawless execution. - Engage with the audience to create a lively

API Client SDK taste

# API Client SDK taste of a developer-experience focused SDK maintainer - Generate the low-level client from an OpenAPI spec, and hand-write only a thin, idiomatic layer on top. Confidence: 0.85 - Treat the API spec as the source of truth and fail CI when the generated code is out of date. Confidence: 0.85 - Make the first call possible in three lines: install, create a client with an API key, cal