create-grist-widget 0.3.29 → 0.3.30
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 +1 -1
- package/src/upgrade.mjs +5 -3
- package/template/AGENTS.md +3 -2
- package/template/package.json +1 -1
package/package.json
CHANGED
package/src/upgrade.mjs
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
// predates the SDK's base once (SDK_TSCONFIGS), merges package.json's
|
|
8
8
|
// template-set scripts and dependency versions, and prunes pnpm age
|
|
9
9
|
// exceptions that no longer matter. It never touches anything else: src/app/
|
|
10
|
-
// (smoke test included), src/components/ui/, src/index.css,
|
|
11
|
-
// every file the widget added are the widget's own. It runs on a clean `dev`,
|
|
10
|
+
// (smoke test included), src/components/ui/, src/index.css, components.json,
|
|
11
|
+
// README.md and every file the widget added are the widget's own. It runs on a clean `dev`,
|
|
12
12
|
// so what it changed is one `git diff` to review.
|
|
13
13
|
|
|
14
14
|
import { execFileSync } from "node:child_process"
|
|
@@ -27,6 +27,9 @@ import path from "node:path"
|
|
|
27
27
|
* The files the template writes and keeps identical in every widget. Listed
|
|
28
28
|
* in the template's AGENTS.md and on the Upgrading a widget page too
|
|
29
29
|
* (tests/upgrade.test.mjs checks all three agree with the template itself).
|
|
30
|
+
*
|
|
31
|
+
* components.json isn't one: it is shadcn's configuration, and a widget adds
|
|
32
|
+
* the registries `shadcn add` installs from to it.
|
|
30
33
|
*/
|
|
31
34
|
export const TEMPLATE_FILES = [
|
|
32
35
|
".github/dependabot.yml",
|
|
@@ -36,7 +39,6 @@ export const TEMPLATE_FILES = [
|
|
|
36
39
|
".prettierrc",
|
|
37
40
|
"AGENTS.md",
|
|
38
41
|
"CLAUDE.md",
|
|
39
|
-
"components.json",
|
|
40
42
|
"eslint.config.js",
|
|
41
43
|
"src/components/theme-provider.tsx",
|
|
42
44
|
"src/lib/utils.ts",
|
package/template/AGENTS.md
CHANGED
|
@@ -35,14 +35,15 @@ mapping, and rendering all live in `src/app/App.tsx` — that's the file to edit
|
|
|
35
35
|
- **The template's:** `src/main.tsx`, `src/components/theme-provider.tsx`,
|
|
36
36
|
`src/lib/utils.ts`, `src/vite-env.d.ts`, the workflows and Dependabot config,
|
|
37
37
|
`vite.config.ts`, `tsconfig.json`, `eslint.config.js`, the Prettier config,
|
|
38
|
-
`
|
|
38
|
+
`CLAUDE.md` and this file.
|
|
39
39
|
Leave them as they are: `pnpm exec create-grist-widget upgrade` rewrites them to the
|
|
40
40
|
template of the `create-grist-widget` version the widget depends on
|
|
41
41
|
(<https://gristwidgets.com/docs/cli/upgrading>), and a local edit would be lost.
|
|
42
42
|
- **The widget's:** everything else. `src/app/` holds its code and tests, the smoke test
|
|
43
43
|
included: put every new component, hook, helper and asset there. `src/components/ui/`
|
|
44
44
|
holds the shadcn primitives, where `shadcn add` writes (next to any other registry
|
|
45
|
-
folder it installs),
|
|
45
|
+
folder it installs), `src/index.css` the theme, and `components.json` shadcn's
|
|
46
|
+
configuration, registries included. `tsconfig.app.json` and
|
|
46
47
|
`tsconfig.node.json` keep the widget's own paths and types (their compiler settings come
|
|
47
48
|
from `grist-widget-sdk`). `README.md`, `index.html`, `public/` and
|
|
48
49
|
`pnpm-workspace.yaml` are the widget's too, and so is `package.json`, apart from the
|
package/template/package.json
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@types/react": "^19.3.0",
|
|
36
36
|
"@types/react-dom": "^19.3.0",
|
|
37
37
|
"@vitejs/plugin-react": "^6.1.2",
|
|
38
|
-
"create-grist-widget": "^0.3.
|
|
38
|
+
"create-grist-widget": "^0.3.30",
|
|
39
39
|
"eslint": "^10.13.0",
|
|
40
40
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
41
41
|
"eslint-plugin-react-refresh": "^0.5.7",
|