@contractspec/tool.typescript 3.7.6 → 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 CHANGED
@@ -1,5 +1,17 @@
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
+
3
15
  ## 3.7.6
4
16
 
5
17
  ### Patch Changes
@@ -364,14 +376,17 @@
364
376
  feat: Contract layers support (features, examples, app-configs)
365
377
 
366
378
  ### New CLI Commands
379
+
367
380
  - `contractspec list layers` - List all contract layers with filtering
368
381
 
369
382
  ### Enhanced Commands
383
+
370
384
  - `contractspec ci` - New `layers` check category validates features/examples/config
371
385
  - `contractspec doctor` - New `layers` health checks
372
386
  - `contractspec integrity` - Now shows layer statistics
373
387
 
374
388
  ### New APIs
389
+
375
390
  - `discoverLayers()` - Scan workspace for all layer files
376
391
  - `scanExampleSource()` - Parse ExampleSpec from source code
377
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** for the ContractSpec monorepo.
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
- ```bash
10
- bun add -D @contractspec/tool.typescript
11
- ```
12
-
13
- ## Available Configs
14
-
15
- | Config | File | Use Case |
16
- | --- | --- | --- |
17
- | Base | `base.json` | Default strict config for all packages |
18
- | Next.js | `nextjs.json` | Next.js apps with App Router |
19
- | React Library | `react-library.json` | React component libraries |
20
-
21
- ## Usage
22
-
23
- Extend from your `tsconfig.json`:
24
-
25
- ```json
26
- {
27
- "extends": "@contractspec/tool.typescript/base.json",
28
- "compilerOptions": {
29
- "outDir": "./dist"
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
- "$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
- }
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
- "$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
- }
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
- "name": "@contractspec/tool.typescript",
3
- "version": "3.7.6",
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"
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
  }
@@ -1,7 +1,7 @@
1
1
  {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "extends": "./base.json",
4
- "compilerOptions": {
5
- "jsx": "react-jsx"
6
- }
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./base.json",
4
+ "compilerOptions": {
5
+ "jsx": "react-jsx"
6
+ }
7
7
  }