@contractspec/tool.typescript 3.7.5 → 3.7.8
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 +21 -0
- package/README.md +29 -56
- package/base.json +24 -24
- package/nextjs.json +10 -10
- package/package.json +21 -21
- package/react-library.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @contractspec/tool.typescript
|
|
2
2
|
|
|
3
|
+
## 3.7.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1a44cb6: feat: improve examples to increase coverage of Contracts type
|
|
8
|
+
|
|
9
|
+
## 3.7.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- fix: release
|
|
14
|
+
|
|
15
|
+
## 3.7.6
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- fix: release manifest
|
|
20
|
+
|
|
3
21
|
## 3.7.5
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -358,14 +376,17 @@
|
|
|
358
376
|
feat: Contract layers support (features, examples, app-configs)
|
|
359
377
|
|
|
360
378
|
### New CLI Commands
|
|
379
|
+
|
|
361
380
|
- `contractspec list layers` - List all contract layers with filtering
|
|
362
381
|
|
|
363
382
|
### Enhanced Commands
|
|
383
|
+
|
|
364
384
|
- `contractspec ci` - New `layers` check category validates features/examples/config
|
|
365
385
|
- `contractspec doctor` - New `layers` health checks
|
|
366
386
|
- `contractspec integrity` - Now shows layer statistics
|
|
367
387
|
|
|
368
388
|
### New APIs
|
|
389
|
+
|
|
369
390
|
- `discoverLayers()` - Scan workspace for all layer files
|
|
370
391
|
- `scanExampleSource()` - Parse ExampleSpec from source code
|
|
371
392
|
- `isExampleFile()` - Check if file is an example spec
|
package/README.md
CHANGED
|
@@ -1,62 +1,35 @@
|
|
|
1
1
|
# @contractspec/tool.typescript
|
|
2
2
|
|
|
3
|
-
Website: https://contractspec.io
|
|
3
|
+
Website: https://contractspec.io
|
|
4
4
|
|
|
5
|
-
**Shared TypeScript configuration presets
|
|
5
|
+
**Shared TypeScript configuration presets (base, nextjs, react-library) extended by every package's `tsconfig.json` in the monorepo.**
|
|
6
|
+
|
|
7
|
+
## What It Provides
|
|
8
|
+
|
|
9
|
+
- **Layer**: tool
|
|
10
|
+
- **Consumers**: all monorepo packages (via `"extends": "@contractspec/tool.typescript/..."`)
|
|
6
11
|
|
|
7
12
|
## Installation
|
|
8
13
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"include": ["src"]
|
|
32
|
-
}
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Next.js App
|
|
36
|
-
|
|
37
|
-
```json
|
|
38
|
-
{
|
|
39
|
-
"extends": "@contractspec/tool.typescript/nextjs.json",
|
|
40
|
-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"]
|
|
41
|
-
}
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### React Library
|
|
45
|
-
|
|
46
|
-
```json
|
|
47
|
-
{
|
|
48
|
-
"extends": "@contractspec/tool.typescript/react-library.json",
|
|
49
|
-
"compilerOptions": {
|
|
50
|
-
"outDir": "./dist"
|
|
51
|
-
},
|
|
52
|
-
"include": ["src"]
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## Key Settings (base)
|
|
57
|
-
|
|
58
|
-
- `strict: true` -- all strict checks enabled
|
|
59
|
-
- `module: "Preserve"` -- bundler-compatible module resolution
|
|
60
|
-
- `noUncheckedIndexedAccess: true` -- safer array/object access
|
|
61
|
-
- `verbatimModuleSyntax: true` -- explicit import/export types
|
|
62
|
-
- `target: "esnext"` -- latest ECMAScript features
|
|
14
|
+
`npm install @contractspec/tool.typescript`
|
|
15
|
+
|
|
16
|
+
or
|
|
17
|
+
|
|
18
|
+
`bun add @contractspec/tool.typescript`
|
|
19
|
+
|
|
20
|
+
## Local Commands
|
|
21
|
+
|
|
22
|
+
- `bun run publish:pkg` — bun publish --tolerate-republish --ignore-scripts --verbose
|
|
23
|
+
- `bun run publish:pkg:canary` — bun publish:pkg --tag canary
|
|
24
|
+
|
|
25
|
+
## Recent Updates
|
|
26
|
+
|
|
27
|
+
- Replace eslint+prettier by biomejs to optimize speed
|
|
28
|
+
- PublishConfig not supported by bun
|
|
29
|
+
- Migrate non-app builds to shared Bun toolchain
|
|
30
|
+
|
|
31
|
+
## Notes
|
|
32
|
+
|
|
33
|
+
- Compiler option changes propagate to every package -- verify with `bun run typecheck` across the repo
|
|
34
|
+
- Do not weaken strict-mode settings (`strict`, `noUncheckedIndexedAccess`, etc.)
|
|
35
|
+
- Adding a new preset file requires documenting which packages should use it
|
package/base.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"noEmit": false,
|
|
5
|
+
"declaration": true,
|
|
6
|
+
"emitDeclarationOnly": true,
|
|
7
|
+
"declarationMap": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"incremental": true,
|
|
10
|
+
"isolatedModules": true,
|
|
11
|
+
"jsx": "preserve",
|
|
12
|
+
"lib": ["esnext", "DOM", "DOM.Iterable"],
|
|
13
|
+
"module": "Preserve",
|
|
14
|
+
"moduleDetection": "force",
|
|
15
|
+
"moduleResolution": "bundler",
|
|
16
|
+
"noUncheckedIndexedAccess": true,
|
|
17
|
+
"resolveJsonModule": true,
|
|
18
|
+
"verbatimModuleSyntax": true,
|
|
19
|
+
"skipLibCheck": true,
|
|
20
|
+
"strict": true,
|
|
21
|
+
"target": "esnext",
|
|
22
|
+
"experimentalDecorators": true,
|
|
23
|
+
"strictPropertyInitialization": false,
|
|
24
|
+
"plugins": [{ "name": "next" }]
|
|
25
|
+
}
|
|
26
26
|
}
|
package/nextjs.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "./base.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"plugins": [{ "name": "next" }],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"moduleResolution": "Bundler",
|
|
8
|
+
"allowJs": true,
|
|
9
|
+
"jsx": "react-jsx",
|
|
10
|
+
"noEmit": true
|
|
11
|
+
}
|
|
12
12
|
}
|
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
"name": "@contractspec/tool.typescript",
|
|
3
|
+
"version": "3.7.8",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
|
|
6
|
+
"publish:pkg:canary": "bun publish:pkg --tag canary"
|
|
7
|
+
},
|
|
8
|
+
"devDependencies": {
|
|
9
|
+
"typescript": "^5.9.3"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public",
|
|
14
|
+
"registry": "https://registry.npmjs.org/"
|
|
15
|
+
},
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/lssm-tech/contractspec.git",
|
|
20
|
+
"directory": "packages/tools/typescript"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://contractspec.io"
|
|
23
23
|
}
|
package/react-library.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "./base.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"jsx": "react-jsx"
|
|
6
|
+
}
|
|
7
7
|
}
|