Skip to content

PR 3/N: publish as @textcortex/slidewise via changesets + CI#7

Draft
karthikmudunuri wants to merge 1 commit intokarthikmudunuri/style-isolationfrom
karthikmudunuri/publish-workflow
Draft

PR 3/N: publish as @textcortex/slidewise via changesets + CI#7
karthikmudunuri wants to merge 1 commit intokarthikmudunuri/style-isolationfrom
karthikmudunuri/publish-workflow

Conversation

@karthikmudunuri
Copy link
Copy Markdown
Member

Third PR in the integration plan. Stacked on top of #6 — review/merge that first (which is on #5, on #4).

Summary

Wires Slidewise up to be released as @textcortex/slidewise via changesets and GitHub Actions, so platform hosts can pin a real semver range instead of cross-repo workspace deps.

What's added

  • package.json — scoped to @textcortex/slidewise, publishConfig (access: restricted, default registry npmjs.org), repo/homepage/bugs metadata, changeset / version-packages / release scripts. React and react-dom moved from dependencies to devDependenciespeerDependencies still declares the runtime contract (>=19), so consumers don't end up with a duplicate React.
  • .changeset/ — initialised by changesets init. Default config matches our publish settings. First changeset (initial-1-0-0.md) marks v1.0.0 as the public API contract.
  • .github/workflows/ci.yml — typecheck + vitest + build:lib on every PR and push to main.
  • .github/workflows/release.yml — on push to main, runs the same checks then changesets/action. With pending changesets present it opens (or updates) a "Version Packages" PR; once that PR merges it publishes to the registry. Skips publish if NPM_TOKEN is unset.
  • README.md — quick-start with the real SlidewiseFileEditor API (loadBlob/saveBlob), lower-level SlidewiseEditor example, programmatic parsePptx/serializeDeck/migrate snippet, release docs, repo layout.
  • src/index.ts — re-exports migrate and CURRENT_DECK_VERSION so the README's persistence snippet compiles for consumers.

Release flow once merged

  1. Merge this PR.
  2. CI on main sees a pending changeset; opens a "Version Packages" PR bumping 0.2.0 → 1.0.0 and writing CHANGELOG entries.
  3. Maintainer reviews and merges the Version Packages PR.
  4. CI runs again, finds no pending changesets, runs changeset publish → first release of @textcortex/slidewise@1.0.0 to the registry.

Open items for the platform team

These don't block merging this PR but they gate the first actual publish:

  • Registry decision: keep npmjs.org with a paid @textcortex scope, or point publishConfig.registry at an internal Verdaccio / GitHub Packages npm registry.
  • NPM_TOKEN secret: add an automation token with publish rights for the @textcortex scope (or whatever registry the team picks) to repo Actions secrets.
  • Branch protection: require the CI / Typecheck, test, build check on main once the workflow has run once.

Test plan

  • pnpm exec tsc -b clean
  • pnpm test — 14/14
  • pnpm run build:lib — emits dist/slidewise.css (159 kB) + dist/index.mjs (864 kB), no errors
  • pnpm exec changeset status — reports the pending v1.0.0 major bump
  • Verify CI workflow runs green once the workflow file exists on main
  • Platform team confirms registry + adds NPM_TOKEN

Wires Slidewise up to be released as @textcortex/slidewise via
changesets and GitHub Actions, so platform hosts can pin a real semver
range instead of cross-repo workspace deps.

What's added
  * package.json — scoped to @textcortex/slidewise, publishConfig
    (access: restricted, registry: npm), repo/homepage/bugs metadata,
    changeset/version-packages/release scripts. React and react-dom
    moved from dependencies to devDependencies; peerDependencies still
    declares the runtime contract (>=19), so consumers don't end up
    with a duplicate React.
  * .changeset/ — initialised by `changesets init`. Default config
    matches our publish settings (access: restricted, baseBranch: main).
    First changeset (`initial-1-0-0.md`) marks v1.0.0 as the public API
    contract.
  * .github/workflows/ci.yml — runs typecheck, vitest, and build:lib on
    every PR and push to main.
  * .github/workflows/release.yml — on push to main, runs the same
    checks then `changesets/action`. With pending changesets present
    it opens (or updates) a "Version Packages" PR; once that PR merges
    it publishes to the registry. Skips publish if NPM_TOKEN is unset.
  * README.md — quick-start with the real SlidewiseFileEditor API
    (loadBlob/saveBlob), lower-level SlidewiseEditor example, programmatic
    parsePptx/serializeDeck/migrate snippet, release docs, repo layout.
  * src/index.ts — re-exports `migrate` and `CURRENT_DECK_VERSION` so
    the README's persistence snippet compiles for consumers.

Open items for the platform team (not blocking merge of this PR; they
gate the first actual publish):
  - Confirm registry: keep npmjs.org with a paid @textcortex scope, or
    point publishConfig.registry at an internal Verdaccio / GitHub
    Packages.
  - Add NPM_TOKEN secret to the repo (automation token with publish
    rights for @textcortex).
  - When ready, merge this PR; CI will open a "Version Packages" PR
    bumping 0.2.0 → 1.0.0 and consuming the initial changeset; merging
    that triggers the first publish.
@karthikmudunuri karthikmudunuri marked this pull request as draft May 5, 2026 17:58
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