Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,15 @@ jobs:
name: forgedialog-sbom
path: forgedialog-sbom.json

# The core first: the wrapper packages depend on it, so a consumer who
# installs one of them the moment it appears must find the core already
# there. `--workspaces` publishes forgedialog-react and forgedialog-vue,
# each of which needs its own trusted publisher entry on npmjs.com.
- name: Publish to npm with OIDC
if: vars.NPM_PUBLISH_ENABLED == 'true'
run: npm publish
run: |
npm publish
npm publish --workspaces
- name: Skip npm publishing until trusted publishing is enabled
if: vars.NPM_PUBLISH_ENABLED != 'true'
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
dist
packages/*/dist
coverage
playwright-report
test-results
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
dist
packages/*/dist
coverage
etc
node_modules
Expand Down
35 changes: 32 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,38 @@
# Changelog

## Unreleased
## 0.8.0

- `homepage` now points at the documentation site rather than the README anchor, so the npm
page links to the reference instead of back to GitHub.
### Breaking

- The React and Vue adapters are no longer part of this package. `forgedialog/react` and
`forgedialog/vue` are gone; install [`forgedialog-react`](https://www.npmjs.com/package/forgedialog-react)
or [`forgedialog-vue`](https://www.npmjs.com/package/forgedialog-vue) instead. The hook itself is
unchanged, so the migration is the import:

```diff
- import { useForgeDialog } from 'forgedialog/react';
+ import { useForgeDialog } from 'forgedialog-react';
```

```sh
npm install forgedialog-react # or forgedialog-vue
```

- `forgedialog` no longer declares `react` or `vue` as peer dependencies. They were optional, but
they still put two frameworks in the dependency tree of a library that advertises having none,
and every tool that reads peer dependencies had to be told to ignore them.

`forgedialog/svelte` and `forgedialog/web-component` are unchanged and stay in the core: neither
needs a framework runtime, so neither costs a peer dependency.

### Other

- The published tarball is smaller: 63 files and 117.6 KiB, down from 71 files and 120.3 KiB,
because the React and Vue builds are no longer in it.
- `npm run check:release` now checks every package a release publishes, including that each
wrapper's dependency range on the core is one this release satisfies.
- `homepage` now points at the documentation site rather than the README anchor, so the npm page
links to the reference instead of back to GitHub.

## 0.7.0

Expand Down
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,21 @@ const data = await flow.result;
Tree-shakable entry points are available at `forgedialog/core`, `forgedialog/interactions`,
`forgedialog/animations`, `forgedialog/appearance`,
`forgedialog/presentation`, and `forgedialog/workflows`. `forgedialog/interactions` exposes the
standalone draggable controller without pulling in dialog APIs. Framework integrations are exported from `forgedialog/react`,
`forgedialog/vue`, `forgedialog/svelte`, and `forgedialog/web-component`.
standalone draggable controller without pulling in dialog APIs.

React and Vue integrations are separate packages, so installing `forgedialog` never asks a project
about a framework it does not use:

```sh
npm install forgedialog forgedialog-react # or forgedialog-vue
```

```ts
import { useForgeDialog } from 'forgedialog-react';
```

Svelte and Web Components need nothing beyond the browser, so they stay in the core as
`forgedialog/svelte` and `forgedialog/web-component`.

Single-purpose entry points minimize simple dialogs further:

Expand Down
5 changes: 4 additions & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ Public consumers should import only what they need:
- `forgedialog/interactions` and `/animations` to opt into advanced runtime capabilities.
- `forgedialog/presentation` for drawers, sheets, lightboxes, loading, toast, and commands.
- `forgedialog/workflows` for branching async wizards.
- `forgedialog/react`, `/vue`, `/svelte`, or `/web-component` for lifecycle adapters.
- `forgedialog/svelte` or `/web-component` for lifecycle adapters that need no framework
runtime. The React and Vue adapters are the separate `forgedialog-react` and `forgedialog-vue`
packages, in `packages/` — a wrapper that needs a peer dependency does not belong in a core that
advertises having none.

The main `forgedialog` entry includes the complete API and default CSS. Subpath entries are
side-effect free; styles can be loaded explicitly from `forgedialog/style.css`.
Expand Down
22 changes: 21 additions & 1 deletion docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,22 @@ publisher with:
> exist first. `forgedialog` is published — 0.7.0 went out on 1 September 2026 — so that page is
> available and this can be set up now. The manual first publish described below is history for
> this package; it is kept because a fork starting from an unpublished name still needs it.
>
> **`forgedialog-react` and `forgedialog-vue` have not been published yet**, so neither has a
> settings page and neither can have a trusted publisher configured. Their first release has to be
> the manual publish described below; after that, add the same publisher entry to each of them and
> every later release goes through Actions with the core.

### 2b. One trusted publisher per package

A release publishes three packages — `forgedialog`, `forgedialog-react`, and `forgedialog-vue` —
and npm scopes trusted publishing to a single package. The same entry from step 2 has to be added
on **each** package's settings page; the workflow filename and environment are identical for all
three, only the package differs.

Miss one and the release half-succeeds: the core goes out, then `npm publish --workspaces` fails on
the wrapper, leaving a published core beside wrappers that never shipped. `npm run check:release`
does not catch this — it checks versions, not npm's publisher configuration.

### 3. Enable publishing in the workflow

Expand Down Expand Up @@ -95,9 +111,13 @@ name that has never been published, where step 2 has no settings page to configu
```sh
npm run validate:all
npm run check:release
npm publish # prompts for auth; use a granular access token scoped to this package
npm publish # the core first: the wrappers depend on it
npm publish --workspaces # forgedialog-react and forgedialog-vue
```

The order matters. A consumer who installs `forgedialog-react` the moment it appears has to find
the core version it asks for already on the registry.

`publishConfig.access` is already `public`, so no `--access` flag is needed. Afterwards, add the
trusted publisher and set `NPM_PUBLISH_ENABLED=true` so later releases go through Actions, and
delete the token you used.
Expand Down
Loading
Loading