@shapeshift-labs/frontier-lang 0.4.1 → 0.4.3

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.
@@ -0,0 +1,22 @@
1
+ import { performance } from 'node:perf_hooks';
2
+ import { compileFrontierSource } from '../dist/index.js';
3
+
4
+ const source = `
5
+ module Bench @id("mod_bench")
6
+ entity Todo @id("ent_todo") {
7
+ title @id("field_title"): Text
8
+ }
9
+ action updateTodo @id("action_update") {
10
+ input Todo
11
+ writes field_title
12
+ returns Patch
13
+ }
14
+ `;
15
+
16
+ const targets = ['typescript', 'javascript', 'rust', 'python', 'c'];
17
+ const start = performance.now();
18
+ let bytes = 0;
19
+ for (let index = 0; index < 250; index += 1) {
20
+ bytes += compileFrontierSource(source, { target: targets[index % targets.length] }).output.length;
21
+ }
22
+ console.log(JSON.stringify({ compiles: 250, bytes, durationMs: Number((performance.now() - start).toFixed(2)) }));
@@ -0,0 +1 @@
1
+ import '../bench/smoke.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapeshift-labs/frontier-lang",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "Umbrella package for Frontier Lang kernel, parser, checker, compiler, and projection packages.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -16,11 +16,14 @@
16
16
  "dist",
17
17
  "examples",
18
18
  "README.md",
19
- "LICENSE"
19
+ "LICENSE",
20
+ "bench",
21
+ "benchmarks/package-bench.mjs"
20
22
  ],
21
23
  "scripts": {
22
24
  "build": "node scripts/build.mjs",
23
25
  "test": "npm run build && node test/smoke.mjs",
26
+ "typecheck": "node ./node_modules/typescript/bin/tsc --noEmit -p test/tsconfig.json",
24
27
  "fuzz": "npm run build && node fuzz/smoke.mjs",
25
28
  "bench": "npm run build && node bench/smoke.mjs",
26
29
  "prepare": "npm run build",
@@ -53,7 +56,7 @@
53
56
  "access": "public"
54
57
  },
55
58
  "dependencies": {
56
- "@shapeshift-labs/frontier-lang-kernel": "0.3.0",
59
+ "@shapeshift-labs/frontier-lang-kernel": "0.3.1",
57
60
  "@shapeshift-labs/frontier-lang-parser": "0.3.0",
58
61
  "@shapeshift-labs/frontier-lang-checker": "0.3.0",
59
62
  "@shapeshift-labs/frontier-lang-typescript": "0.3.0",
@@ -61,6 +64,9 @@
61
64
  "@shapeshift-labs/frontier-lang-rust": "0.2.0",
62
65
  "@shapeshift-labs/frontier-lang-python": "0.2.0",
63
66
  "@shapeshift-labs/frontier-lang-c": "0.2.0",
64
- "@shapeshift-labs/frontier-lang-compiler": "0.2.1"
67
+ "@shapeshift-labs/frontier-lang-compiler": "0.2.3"
68
+ },
69
+ "devDependencies": {
70
+ "typescript": "^5.9.3"
65
71
  }
66
72
  }