create-grist-widget 0.3.19 → 0.3.22
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
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
ignore:
|
|
36
|
+
# TypeScript 7 (the native port) drops the JavaScript compiler API that
|
|
37
|
+
# typescript-eslint is built on: `pnpm lint` fails with "typescript-eslint
|
|
38
|
+
# does not support TS 7.0". Remove this once typescript-eslint supports it.
|
|
39
|
+
- dependency-name: "typescript"
|
|
40
|
+
versions: [">=7"]
|
|
41
|
+
|
|
42
|
+
- package-ecosystem: "github-actions"
|
|
43
|
+
# "/" covers .github/workflows/.
|
|
44
|
+
directory: "/"
|
|
45
|
+
schedule:
|
|
46
|
+
interval: "weekly"
|
|
47
|
+
target-branch: "dev"
|
|
48
|
+
groups:
|
|
49
|
+
actions:
|
|
50
|
+
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
|
package/template/AGENTS.md
CHANGED
|
@@ -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>
|
package/template/README.md
CHANGED
|
@@ -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`
|
package/template/package.json
CHANGED