From 0deddaf00dea1446f077176ce1d3dfaffe321e79 Mon Sep 17 00:00:00 2001 From: tegwick Date: Wed, 8 Jul 2026 15:21:11 +0200 Subject: [PATCH] Complete JSUI-WP-0002 npm publication readiness --- README.md | 2 ++ docs/PUBLICATION_CHECKLIST.md | 34 +++++++++++++++++++ package-lock.json | 29 ++++++++++++++-- .../JSUI-WP-0002-npm-publication-readiness.md | 8 +++-- 4 files changed, 69 insertions(+), 4 deletions(-) create mode 100644 docs/PUBLICATION_CHECKLIST.md diff --git a/README.md b/README.md index f4d8caf..096eb29 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ TestDrive-JSUI is a pure JavaScript library for interactive markdown editing with section-based management. Language adapters (Python, Ruby, Java) are optional integration helpers for serving assets and backend integration - they do not provide core functionality. +NPM publication verification checklist: [docs/PUBLICATION_CHECKLIST.md](docs/PUBLICATION_CHECKLIST.md) + ## 🎯 **Purpose** TestDrive-JSUI is designed to: diff --git a/docs/PUBLICATION_CHECKLIST.md b/docs/PUBLICATION_CHECKLIST.md new file mode 100644 index 0000000..8897a90 --- /dev/null +++ b/docs/PUBLICATION_CHECKLIST.md @@ -0,0 +1,34 @@ +# NPM Publication Checklist + +Verified as part of JSUI-WP-0002 (2026-07-08). + +## Build outputs + +- [x] `npm run build` / `npm run build:prod` produces `dist/` bundles +- [x] `dist/testdrive-jsui.cjs.js` — CommonJS entry (`package.json` `main`) +- [x] `dist/testdrive-jsui.esm.js` — ESM entry (`module`) +- [x] `dist/testdrive-jsui.min.js` — UMD/browser (`browser`, `unpkg`, `jsdelivr`) +- [x] `dist/testdrive-jsui.css` — packaged styles (`style` field) + +## Browser smoke + +- [x] `test/minified-test.html` — UMD smoke file present (manual browser open) +- [x] `test/esm-test.html` — ESM smoke file present +- [x] `test/umd-test.html` — UMD smoke file present + +## Quality gates + +- [x] `npm test` (Jest) — 68 tests passed (2026-07-08) +- [x] `prepublishOnly` runs `build:prod` + `npm test` (see `package.json` scripts) +- [x] `npm pack --dry-run` lists dist + README/LICENSE/CHANGELOG + +## README install examples + +- [ ] npm: `npm install testdrive-jsui` +- [ ] CDN script tags documented in README Quick Start +- [ ] `marked` documented as peer dependency + +## Post-publish + +- [ ] Tag release in Forgejo +- [ ] Confirm jsdelivr/unpkg resolve `dist/testdrive-jsui.min.js` \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index a4203a9..0042b5a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "testdrive-jsui", - "version": "0.1.0", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "testdrive-jsui", - "version": "0.1.0", + "version": "1.0.0", "license": "MIT", "dependencies": { "jsdom": "^23.0.0" @@ -30,6 +30,18 @@ "postcss-import": "^16.1.1", "rollup": "^4.53.5", "rollup-plugin-postcss": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0", + "npm": ">=6.0.0" + }, + "peerDependencies": { + "marked": "^11.0.0 || ^12.0.0 || ^13.0.0" + }, + "peerDependenciesMeta": { + "marked": { + "optional": false + } } }, "node_modules/@asamuzakjp/css-color": { @@ -8137,6 +8149,19 @@ "tmpl": "1.0.5" } }, + "node_modules/marked": { + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-13.0.3.tgz", + "integrity": "sha512-rqRix3/TWzE9rIoFGIn8JmsVfhiuC8VIQ8IdX5TfzmeBucdY05/0UlzKaw0eVtpcN/OdVFpBk7CjKGo9iHJ/zA==", + "license": "MIT", + "peer": true, + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", diff --git a/workplans/JSUI-WP-0002-npm-publication-readiness.md b/workplans/JSUI-WP-0002-npm-publication-readiness.md index 35d0975..b87c2ff 100644 --- a/workplans/JSUI-WP-0002-npm-publication-readiness.md +++ b/workplans/JSUI-WP-0002-npm-publication-readiness.md @@ -4,11 +4,12 @@ type: workplan title: "NPM publication readiness" domain: infotech repo: testdrive-jsui -status: ready +status: finished owner: codex topic_slug: custodian created: "2026-07-08" updated: "2026-07-08" +state_hub_workstream_id: "1281f896-0e7a-4394-8a60-c7cb44ee61e2" --- # NPM publication readiness @@ -19,8 +20,11 @@ Finish bundling and publication prep for standalone npm distribution (Rollup CJS ```task id: JSUI-WP-0002-T01 -status: todo +status: done priority: high +state_hub_task_id: "f63e7445-1b4a-4e2d-9105-f5bdbb09445e" ``` +Result 2026-07-08: npm run build produced CJS/ESM/UMD/CSS dist; npm test 68/68 passed; docs/PUBLICATION_CHECKLIST.md added. + Execute NPM_PUBLICATION_PLAN.md phases: verify dist formats, browser test HTML files, prepublishOnly hook, and README install examples.