@clusterflick/catalogue 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.
Files changed (2) hide show
  1. package/README.md +16 -12
  2. package/package.json +4 -2
package/README.md CHANGED
@@ -50,21 +50,25 @@ From the repo root:
50
50
  no Node types.
51
51
  - `npm run check -w @clusterflick/catalogue` builds it and imports every subpath
52
52
  from `dist/` in Node, as a Worker's bundler would find them. CI runs it.
53
+ - `npm test -w @clusterflick/catalogue` runs only the package's tests, with its
54
+ own `vitest.config.ts`: the site's also loads Storybook, which needs the
55
+ site's data downloaded. CI and the publish workflow run it.
53
56
 
54
57
  ## Publishing
55
58
 
56
- Bump `version` in `package.json` (semver: a change to the data model or to a
57
- function's signature is a major version while the Workers depend on it), then
58
- publish. The first release is published by hand, since npm's trusted publishing
59
- is set up in a package's settings once it exists:
60
-
61
- ```sh
62
- npm login
63
- npm publish -w @clusterflick/catalogue --access public
64
- ```
65
-
66
- `prepack` builds `dist/` first. Later releases are to be published from GitHub
67
- Actions with trusted publishing, which needs no npm token.
59
+ A release is a version bump in `package.json`, pushed to `main` (semver: a
60
+ change to the data model or to a function's signature is a major version while
61
+ the Workers depend on it). `.github/workflows/publish-catalogue.yml` runs on
62
+ every push that touches the package and publishes only a version npm doesn't
63
+ have yet, after the site's tests and `check`; a push without a bump finds its
64
+ version already published and stops.
65
+
66
+ It publishes with npm's trusted publishing: the workflow proves who it is with
67
+ an OIDC token, so no npm token is stored anywhere, and each release carries
68
+ provenance linking it to the commit and run that built it. The trusted
69
+ publisher is configured in the package's settings on npmjs.com and names that
70
+ workflow file, so renaming the file means updating it there. 0.1.0 was
71
+ published by hand, before the package existed to configure.
68
72
 
69
73
  ## Licence
70
74
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clusterflick/catalogue",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Clusterflick's listings: the data model, filters, places and occasions, shared by the site and its Workers.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -39,10 +39,12 @@
39
39
  "scripts": {
40
40
  "build": "node build.mjs",
41
41
  "check": "npm run build && node check.mjs",
42
+ "test": "vitest run",
42
43
  "prepack": "npm run build"
43
44
  },
44
45
  "devDependencies": {
45
46
  "esbuild": "0.27.2",
46
- "typescript": "5.9.3"
47
+ "typescript": "5.9.3",
48
+ "vitest": "4.0.18"
47
49
  }
48
50
  }