create-grist-widget 0.3.19 → 0.3.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-grist-widget",
3
- "version": "0.3.19",
3
+ "version": "0.3.21",
4
4
  "description": "Scaffold a new Grist custom widget from the grist-widget-sdk Vite template",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -0,0 +1,44 @@
1
+ version: 2
2
+
3
+ # Weekly update PRs for this widget's npm dependencies (grist-widget-sdk
4
+ # included) and for the GitHub Actions its workflows use. Each PR runs
5
+ # .github/workflows/ci.yml (lint, test, build) before you merge it.
6
+ #
7
+ # Updates land on `dev`, the same loop as your own changes: merging one
8
+ # redeploys the live preview at /dev/ inside Grist; release it by bumping
9
+ # package.json's `version` and merging dev into main. Dependabot *security*
10
+ # updates ignore `target-branch` and always open against the default branch.
11
+ # If you delete `dev`, Dependabot reports an error until it exists again.
12
+
13
+ updates:
14
+ - package-ecosystem: "npm"
15
+ directory: "/"
16
+ schedule:
17
+ interval: "weekly"
18
+ target-branch: "dev"
19
+ # Propose a release only once it is a week old: freshly published
20
+ # versions are the ones that get yanked (or turn out compromised).
21
+ cooldown:
22
+ default-days: 7
23
+ groups:
24
+ # Minor/patch bumps arrive together as one PR. grist-widget-sdk is
25
+ # left out so its updates get a PR of their own, whose description
26
+ # links its release notes.
27
+ routine:
28
+ update-types: ["minor", "patch"]
29
+ exclude-patterns: ["grist-widget-sdk"]
30
+ # @vitejs/plugin-react pins a vite major in its peer range, so their
31
+ # majors only build when they move together.
32
+ vite:
33
+ patterns: ["vite", "@vitejs/*"]
34
+ update-types: ["major"]
35
+
36
+ - package-ecosystem: "github-actions"
37
+ # "/" covers .github/workflows/.
38
+ directory: "/"
39
+ schedule:
40
+ interval: "weekly"
41
+ target-branch: "dev"
42
+ groups:
43
+ actions:
44
+ patterns: ["*"]
@@ -0,0 +1,32 @@
1
+ name: CI
2
+
3
+ # Lints, tests and builds every pull request (yours and Dependabot's) before
4
+ # it reaches dev or main. deploy.yml only runs after a push, and only builds:
5
+ # without this workflow a pull request shows no checks at all.
6
+
7
+ on:
8
+ pull_request:
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ concurrency:
14
+ group: ci-${{ github.ref }}
15
+ cancel-in-progress: true
16
+
17
+ jobs:
18
+ check:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v7
22
+ - uses: pnpm/action-setup@v6
23
+ - uses: actions/setup-node@v7
24
+ with:
25
+ node-version: 22
26
+ # Same as deploy.yml: pnpm caching and a frozen install both need a
27
+ # committed pnpm-lock.yaml, which a fresh scaffold doesn't have.
28
+ package-manager-cache: false
29
+ - run: pnpm install
30
+ - run: pnpm lint
31
+ - run: pnpm test
32
+ - run: pnpm build
@@ -68,6 +68,8 @@ rendering all live in `src/App.tsx` — that's the one file to edit.
68
68
  | ui primitives | `src/components/ui/` |
69
69
  | Deploy workflow | `.github/workflows/deploy.yml` |
70
70
  | Deploy script (version guard, channel logic) | `scripts/deploy.mjs` |
71
+ | Pull request checks (lint, test, build) | `.github/workflows/ci.yml` |
72
+ | Dependency update PRs (weekly, against the dev branch) | `.github/dependabot.yml` |
71
73
  | Full walkthrough (dev loop, deploying, embedding) | `README.md` |
72
74
  | Changelog | `CHANGELOG.md` |
73
75
 
@@ -92,3 +94,7 @@ Full detail, including the two live URLs (`/latest/` and `/v<version>/`): `READM
92
94
  template works (see above); `pnpm test` is the trusted local loop, real Grist via `/dev/`
93
95
  is the trusted real one
94
96
  - Merging `dev` into `main` without bumping `package.json`'s `version` first
97
+ - Merging a Dependabot pull request whose `ci.yml` checks are red, or retargeting one at
98
+ `main`: updates go through `dev` like any other change. Template-file updates (this
99
+ pipeline, the build config) are applied by hand —
100
+ <https://gristwidgets.com/docs/cli/upgrading>
@@ -110,6 +110,17 @@ automatically.
110
110
  > permanently a no-op, so it's still safest to never manually re-seed
111
111
  > `gh-pages` again after that point.
112
112
 
113
+ ### Keeping it up to date
114
+
115
+ `.github/dependabot.yml` opens weekly pull requests against `dev` for your
116
+ dependencies (`grist-widget-sdk` included) and the workflows' GitHub Actions,
117
+ and `.github/workflows/ci.yml` lints, tests and builds every pull request.
118
+ Merge a green one into `dev`, check `/dev/` inside Grist, then release it
119
+ like any change (bump the version, merge `dev` into `main`). Changes to the
120
+ template's own files (this pipeline, the build config) don't reach an
121
+ existing widget that way: see
122
+ [Upgrading a widget](https://gristwidgets.com/docs/cli/upgrading).
123
+
113
124
  **One-time setup** (the workflow can't do this part for you):
114
125
 
115
126
  1. **Settings → Pages** → Source: "Deploy from a branch" → branch `gh-pages`
@@ -17,7 +17,7 @@
17
17
  "@tailwindcss/vite": "^4.3.3",
18
18
  "class-variance-authority": "^0.7.1",
19
19
  "clsx": "^2.1.1",
20
- "grist-widget-sdk": "^0.3.17",
20
+ "grist-widget-sdk": "^0.3.20",
21
21
  "lucide-react": "^1.61.0",
22
22
  "radix-ui": "^1.8.1",
23
23
  "react": "^19.3.1",