grist-widget-sdk 0.3.20 → 0.3.25
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 +6 -0
- package/package.json +5 -2
- package/tsconfig/app.json +38 -0
- package/tsconfig/node.json +36 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# grist-widget-sdk
|
|
2
2
|
|
|
3
|
+
## 0.3.25
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- bbcca4d: New: shared TypeScript settings for widgets, to `extends` from a widget's own tsconfig files. `grist-widget-sdk/tsconfig/app.json` covers the browser code in `src/` (bundler resolution, `react-jsx`, `strict` and the unused-code checks); `grist-widget-sdk/tsconfig/node.json` covers `vite.config.ts`. Both are the settings scaffolded widgets have used so far, so a compiler-setting change can now reach widgets with an SDK update instead of a hand edit in each one. They need TypeScript 5.8 or later. A change that makes a check stricter can fail a widget's typecheck, so it only ships in a minor release.
|
|
8
|
+
|
|
3
9
|
## 0.3.20
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grist-widget-sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.25",
|
|
4
4
|
"description": "React hooks and helpers for Grist custom widgets",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -89,10 +89,13 @@
|
|
|
89
89
|
"types": "./dist/emulator/devtools.d.cts",
|
|
90
90
|
"default": "./dist/emulator/devtools.cjs"
|
|
91
91
|
}
|
|
92
|
-
}
|
|
92
|
+
},
|
|
93
|
+
"./tsconfig/app.json": "./tsconfig/app.json",
|
|
94
|
+
"./tsconfig/node.json": "./tsconfig/node.json"
|
|
93
95
|
},
|
|
94
96
|
"files": [
|
|
95
97
|
"dist",
|
|
98
|
+
"tsconfig",
|
|
96
99
|
"CHANGELOG.md",
|
|
97
100
|
"LICENSE"
|
|
98
101
|
],
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Shared TypeScript settings for a widget's browser code (src/).
|
|
3
|
+
//
|
|
4
|
+
// // tsconfig.app.json
|
|
5
|
+
// { "extends": "grist-widget-sdk/tsconfig/app.json", ... }
|
|
6
|
+
//
|
|
7
|
+
// The widget's own file keeps whatever names its files and packages:
|
|
8
|
+
// tsBuildInfoFile, paths and include (TypeScript resolves those relative
|
|
9
|
+
// to the file that declares them), and types (its own list of global type
|
|
10
|
+
// packages, e.g. "vite/client"; a list set there would replace this one).
|
|
11
|
+
//
|
|
12
|
+
// Needs TypeScript 5.8 or later (erasableSyntaxOnly). Making a check
|
|
13
|
+
// stricter can fail a widget's typecheck, so it only happens in a minor
|
|
14
|
+
// (breaking, before 1.0) release of grist-widget-sdk.
|
|
15
|
+
"compilerOptions": {
|
|
16
|
+
"target": "ES2022",
|
|
17
|
+
"useDefineForClassFields": true,
|
|
18
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
19
|
+
"module": "ESNext",
|
|
20
|
+
"skipLibCheck": true,
|
|
21
|
+
|
|
22
|
+
/* Bundler mode */
|
|
23
|
+
"moduleResolution": "bundler",
|
|
24
|
+
"allowImportingTsExtensions": true,
|
|
25
|
+
"verbatimModuleSyntax": true,
|
|
26
|
+
"moduleDetection": "force",
|
|
27
|
+
"noEmit": true,
|
|
28
|
+
"jsx": "react-jsx",
|
|
29
|
+
|
|
30
|
+
/* Linting */
|
|
31
|
+
"strict": true,
|
|
32
|
+
"noUnusedLocals": true,
|
|
33
|
+
"noUnusedParameters": true,
|
|
34
|
+
"erasableSyntaxOnly": true,
|
|
35
|
+
"noFallthroughCasesInSwitch": true,
|
|
36
|
+
"noUncheckedSideEffectImports": true
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Shared TypeScript settings for a widget's build config (vite.config.ts),
|
|
3
|
+
// which runs in Node.
|
|
4
|
+
//
|
|
5
|
+
// // tsconfig.node.json
|
|
6
|
+
// { "extends": "grist-widget-sdk/tsconfig/node.json", ... }
|
|
7
|
+
//
|
|
8
|
+
// The widget's own file keeps tsBuildInfoFile and include (TypeScript
|
|
9
|
+
// resolves those relative to the file that declares them) and types
|
|
10
|
+
// (e.g. "node").
|
|
11
|
+
//
|
|
12
|
+
// Needs TypeScript 5.8 or later (erasableSyntaxOnly). Making a check
|
|
13
|
+
// stricter can fail a widget's typecheck, so it only happens in a minor
|
|
14
|
+
// (breaking, before 1.0) release of grist-widget-sdk.
|
|
15
|
+
"compilerOptions": {
|
|
16
|
+
"target": "ES2023",
|
|
17
|
+
"lib": ["ES2023"],
|
|
18
|
+
"module": "ESNext",
|
|
19
|
+
"skipLibCheck": true,
|
|
20
|
+
|
|
21
|
+
/* Bundler mode */
|
|
22
|
+
"moduleResolution": "bundler",
|
|
23
|
+
"allowImportingTsExtensions": true,
|
|
24
|
+
"verbatimModuleSyntax": true,
|
|
25
|
+
"moduleDetection": "force",
|
|
26
|
+
"noEmit": true,
|
|
27
|
+
|
|
28
|
+
/* Linting */
|
|
29
|
+
"strict": true,
|
|
30
|
+
"noUnusedLocals": true,
|
|
31
|
+
"noUnusedParameters": true,
|
|
32
|
+
"erasableSyntaxOnly": true,
|
|
33
|
+
"noFallthroughCasesInSwitch": true,
|
|
34
|
+
"noUncheckedSideEffectImports": true
|
|
35
|
+
}
|
|
36
|
+
}
|