Skip to content

docs(npm): README for the @extenddb/dev launcher package - #317

Open
LeeroyHannigan wants to merge 4 commits into
mainfrom
docs/npm-readme
Open

docs(npm): README for the @extenddb/dev launcher package#317
LeeroyHannigan wants to merge 4 commits into
mainfrom
docs/npm-readme

Conversation

@LeeroyHannigan

Copy link
Copy Markdown
Collaborator

What

Adds packaging/npm/README.md, rendered by npmjs.com on the @extenddb/dev package page (currently blank). Covers the quick-start, the full start() options table and returned shape, a Vitest globalSetup pattern for test suites, the supported API surface with a link to the differences doc, and the plain-HTTP/example-credential security note matching the Docker Hub dev Overview.

npm includes README.md in the tarball automatically regardless of the files whitelist, so no manifest change is needed. It appears on npmjs.com with the next version publish.

Testing done

The quick-start block was executed verbatim against the published 0.1.10 candidate with @aws-sdk/client-dynamodb v3: server starts on an ephemeral port, ListTables succeeds against the returned endpoint/credentials/region, and stop() resolves cleanly. Options documented from index.js, not memory.

The npm package pages have no README today, the same blank front door the
Docker Hub repositories had before their Overviews were published. npm
renders the package README from the published tarball and includes
README.md automatically regardless of the files whitelist, so this lands on
npmjs.com with the next version publish.

Content is written against the real launcher API in index.js (start()
options, returned shape, stop semantics) rather than from memory, and the
quick-start block was executed verbatim against the published 0.1.10
candidate with @aws-sdk/client-dynamodb v3: server starts on an ephemeral
port, ListTables succeeds against the returned endpoint/credentials/region,
stop() resolves cleanly. The vitest globalSetup example mirrors the pattern
verified in earlier launcher testing. Trademark and plain-HTTP security
notes match the Docker Hub dev Overview wording.
The quickstart mixed require() with top-level await, which Node rejects as
a file (ERR_AMBIGUOUS_MODULE_SYNTAX on current Node, SyntaxError on older):
top-level await is ESM-only while require marks the file CommonJS. Rewritten
as an ESM file with imports, executed verbatim as quickstart.mjs against the
published 0.1.10 candidate (named import from the CJS module resolves via
Node's static export detection; ListTables succeeds; stop resolves). A
one-line CommonJS note covers the require-plus-async-wrapper form.
Vitest is ESM-native and the quickstart is already ESM; the test-suite
section still showed a CommonJS globalSetup. Converted to an .mjs default
export and verified literally: the exact file from this README was extracted
and run under a real vitest with globalSetup wired, a test resolving the
env-passed endpoint/credentials passed 1/1 against the published 0.1.10
candidate, and the returned teardown stopped the server.
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.

1 participant