@diagonal-hq/pages 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ The package is ESM JavaScript with declarations. Its `exports` map has the packa
|
|
|
8
8
|
|
|
9
9
|
React, React DOM, and `@inertiajs/react` are peer dependencies. The workspace installs them, so the application has one React instance and one Inertia instance.
|
|
10
10
|
|
|
11
|
-
The package must not depend on `@diagonal-hq/
|
|
11
|
+
The package must not depend on `@diagonal-hq/workflows` or `@diagonal-hq/cli`. It must not import them, or the old workflow module name `@diagonal/workflow`, from a source file. `npm run lint:package-boundaries` (`scripts/check-package-boundaries.mjs`) checks the manifest and the sources. CI runs it.
|
|
12
12
|
|
|
13
13
|
## Build the package
|
|
14
14
|
|
|
@@ -20,13 +20,17 @@ The package must not depend on `@diagonal-hq/workflow` or `@diagonal-hq/cli`. It
|
|
|
20
20
|
|
|
21
21
|
## Publish the package
|
|
22
22
|
|
|
23
|
-
The `Publish npm package` workflow (`.github/workflows/publish-npm-package.yml`) publishes the package to npm
|
|
23
|
+
The `Publish npm package` workflow (`.github/workflows/publish-npm-package.yml`) publishes the package to npm after each push to `main`. You can also run it from the Actions tab.
|
|
24
24
|
|
|
25
|
-
1.
|
|
26
|
-
2.
|
|
27
|
-
3.
|
|
25
|
+
1. The build job builds and packs the package. It compares the packed files with the tarball that npm has for the version in `package.json`. The `version` field does not count.
|
|
26
|
+
2. When the files differ, a model reads the diff and the commit subjects since that publish. It classifies the change as breaking, feature, or fix. Before 1.0.0, a breaking change raises the minor part, and other changes raise the patch part. From 1.0.0, the workflow follows semantic versioning.
|
|
27
|
+
3. The build job packs the package again at the new version and runs the smoke test on the tarball.
|
|
28
|
+
4. The commit job commits the new version to `main` with an `[automated] release:` commit.
|
|
29
|
+
5. The publish job runs in the `npm-publish` environment and publishes the tested bytes with npm trusted publishing. It does not build again. It refuses a version that npm already has.
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
To choose a version yourself, such as 1.0.0 or a prerelease, set `version` in `package.json` to a version that npm does not have, and merge the change. The workflow publishes that version as it is. A version with a prerelease part, such as `0.2.0-next.1`, gets the `next` tag. Other versions get `latest`. The workflow does not raise a prerelease version. Set the next version by hand.
|
|
32
|
+
|
|
33
|
+
The model call uses the `OPENROUTER_API_KEY` secret. When the call fails, the release fails. The workflow does not guess a version.
|
|
30
34
|
|
|
31
35
|
npm must list `Diagonal-HQ/diagonal`, the `publish-npm-package.yml` workflow, and the `npm-publish` environment as the trusted publisher of `@diagonal-hq/pages`.
|
|
32
36
|
|