postgres-query-box 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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.1
4
+
5
+ - Releases are published from GitHub through the Publish workflow, with npm provenance. The README explains the steps.
6
+ - New `typecheck` script, run as part of `npm run check`.
7
+
3
8
  ## 0.1.0
4
9
 
5
10
  First version.
package/README.md CHANGED
@@ -174,6 +174,16 @@ npm run build # writes dist/
174
174
 
175
175
  `src/styles.css` is generated, so do not edit it by hand. `npm run css` reads the design system's Tailwind output in `scripts/tailwind.css`, keeps only the rules for classes used in `src`, scopes them under `.pqb` and writes the result. Run it whenever you add, remove or rename a class in a component. A class that is missing from `scripts/tailwind.css` is not styled. The script lists unknown class-like names at the end of its output. To use a newer Tailwind build, pass its path: `npm run css -- path/to/tailwind.css`. Colour names that start with `mds-` are renamed to `base-` as it reads them. Every rule matches elements inside `.pqb`, so a class on the element that carries `pqb` itself is not styled. Put layout classes on an inner element.
176
176
 
177
+ ### Releasing
178
+
179
+ 1. Update `version` in `package.json` and add the changes to `CHANGELOG.md`. Run `npm run css` and `npm run build` if anything changed.
180
+ 2. Commit, tag `vX.Y.Z` with the same version, and push the commit and the tag.
181
+ 3. Create a GitHub release from the tag. Mark it as a pre-release to publish under the `next` tag instead of `latest`.
182
+ 4. The Publish workflow checks the tag, runs the tests, checks `toSql` against Postgres and stages the version on npm with provenance.
183
+ 5. Approve it on npmjs.com or with `npm stage approve <id>`. Approving needs 2FA.
184
+
185
+ `npm publish` from your own machine is refused on purpose, so every version comes from the workflow and carries provenance.
186
+
177
187
  ## License
178
188
 
179
189
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postgres-query-box",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A React query box for API transaction logs: field and value suggestions, inline errors with fixes, an Advanced filter builder and saved queries.",
5
5
  "license": "MIT",
6
6
  "author": "Darshan R",
@@ -61,8 +61,9 @@
61
61
  "build": "tsup",
62
62
  "css": "node scripts/gen-css.mjs",
63
63
  "test": "vitest run",
64
- "check": "npm test && npm run build",
65
- "prepublishOnly": "npm run check"
64
+ "typecheck": "tsc --noEmit --strict --target es2022 --module esnext --moduleResolution bundler --types react types/core.d.ts types/index.d.ts",
65
+ "check": "npm run typecheck && npm test && npm run build",
66
+ "prepublishOnly": "node -e \"if (!process.env.GITHUB_ACTIONS) { console.error('Publish by creating a GitHub release. The Publish workflow adds npm provenance.'); process.exit(1) }\" && npm run check"
66
67
  },
67
68
  "dependencies": {
68
69
  "@phosphor-icons/react": "^2.1.10"