@dialecte/create 0.0.1 → 0.0.2

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
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@dialecte/create",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Scaffold and generate Dialecte SDKs from an XSD schema. Runs the Python generator in WebAssembly - no Python required.",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/dialecte/create.git"
9
9
  },
10
- "type": "module",
11
10
  "bin": {
12
11
  "create-dialecte": "./dist/cli/index.js"
13
12
  },
@@ -19,17 +18,22 @@
19
18
  "python/pyproject.toml",
20
19
  "README.md"
21
20
  ],
22
- "engines": {
23
- "node": ">=20"
24
- },
21
+ "type": "module",
25
22
  "scripts": {
26
23
  "build": "tsup",
27
24
  "dev": "tsup --watch",
28
25
  "start": "node dist/cli/index.js",
29
26
  "vendor": "node scripts/vendor-wheels.mjs",
27
+ "type-check": "tsc --noEmit",
28
+ "lint:check": "oxlint",
29
+ "lint:fix": "oxlint . --fix -D correctness --ignore-path .gitignore",
30
+ "format:check": "oxfmt --check",
31
+ "format:fix": "oxfmt",
32
+ "check": "npm run type-check && npm run lint:check && npm run format:check",
30
33
  "test:py": "cd python && python -m pytest",
31
34
  "test:cli": "node scripts/smoke.mjs",
32
35
  "prepack": "find python -name __pycache__ -type d -prune -exec rm -rf {} + 2>/dev/null || true",
36
+ "prepare": "husky",
33
37
  "prepublishOnly": "npm run vendor && npm run build"
34
38
  },
35
39
  "dependencies": {
@@ -37,7 +41,13 @@
37
41
  },
38
42
  "devDependencies": {
39
43
  "@types/node": "^22.0.0",
44
+ "husky": "^9.1.7",
45
+ "oxfmt": "^0.53.0",
46
+ "oxlint": "^1.68.0",
40
47
  "tsup": "^8.5.1",
41
48
  "typescript": "^5.6.0"
49
+ },
50
+ "engines": {
51
+ "node": ">=20"
42
52
  }
43
53
  }
@@ -0,0 +1,34 @@
1
+ name: _type-perf
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ workflow_call:
6
+
7
+ jobs:
8
+ type-perf:
9
+ runs-on: ubuntu-latest
10
+ timeout-minutes: 20
11
+ steps:
12
+ - name: Checkout
13
+ uses: actions/checkout@v6
14
+
15
+ - name: Setup Node.js
16
+ uses: actions/setup-node@v6
17
+ with:
18
+ node-version: 'latest'
19
+ cache: 'npm'
20
+
21
+ - name: Restore node_modules cache
22
+ uses: actions/cache@v5
23
+ with:
24
+ path: node_modules
25
+ key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
26
+
27
+ # Fails if type-instantiation counts regress > 5% vs benchmarks/types/<version>/baseline.json.
28
+ # To intentionally update the baseline, run `npm run type-bench` and commit the result.
29
+ - name: Type-performance regression gate
30
+ run: npm run type-bench:check
31
+
32
+ # Fails if a schema-derived narrowing assertion no longer holds (IntelliSense safety net).
33
+ - name: Type-narrowing gate
34
+ run: npm run type-narrowing
@@ -2,3 +2,10 @@ node_modules/
2
2
  dist/
3
3
  *.tsbuildinfo
4
4
  .DS_Store
5
+
6
+ # type-benchmark throwaways (harness + committed baseline.json are kept)
7
+ .bench-dts
8
+ .bench-trace
9
+ .bench-*.tsconfig.json
10
+ benchmarks/types/.audit-entry.ts
11
+ benchmarks/types/*/generated/
@@ -3,11 +3,11 @@
3
3
  "version": "0.0.1",
4
4
  "description": "Dialecte SDK for __dialecteId__",
5
5
  "license": "MIT",
6
- "type": "module",
7
6
  "source": "src/index.ts",
8
7
  "files": [
9
8
  "dist"
10
9
  ],
10
+ "type": "module",
11
11
  "exports": {
12
12
  "./__version__": {
13
13
  "types": "./dist/__version__/index.d.ts",
@@ -22,6 +22,11 @@
22
22
  "build": "run-p type-check \"build-only {@}\" --",
23
23
  "build-only": "tsc -p tsconfig.json && vite build",
24
24
  "type-check": "tsc --noEmit",
25
+ "coverage:gen": "dialecte coverage",
26
+ "type-bench": "npm run coverage:gen && dialecte bench",
27
+ "type-bench:check": "npm run coverage:gen && dialecte bench --check",
28
+ "type-narrowing": "npm run coverage:gen && dialecte narrowing",
29
+ "type-audit": "dialecte audit",
25
30
  "test": "vitest",
26
31
  "doc:dev": "vitepress dev docs",
27
32
  "doc:build": "vitepress build docs",
@@ -31,6 +36,7 @@
31
36
  "@dialecte/core": "__coreVersion__"
32
37
  },
33
38
  "devDependencies": {
39
+ "@dialecte/cli": "0.0.1",
34
40
  "@tsconfig/node24": "^24.0.4",
35
41
  "@types/node": "^24.12.4",
36
42
  "@vitest/browser-playwright": "^4.1.8",
@@ -42,4 +48,4 @@
42
48
  "vitepress": "^2.0.0-alpha.17",
43
49
  "vitest": "^4.1.8"
44
50
  }
45
- }
51
+ }
@@ -30,7 +30,7 @@ export default defineConfig({
30
30
  formats: ['es'],
31
31
  },
32
32
  rollupOptions: {
33
- external: [/^@dialecte\/core/],
33
+ external: [/^@dialecte\/core/, 'dexie'],
34
34
  },
35
35
  },
36
36
  })