Skip to content

Commit 0de5087

Browse files
Migrate to ReScript and Deno (#4)
BREAKING CHANGE: Complete rewrite to follow Hyperpolymath Language Standard This commit migrates the entire codebase from TypeScript/Node.js/npm to ReScript/Deno following the Hyperpolymath Language Policy. Changes: - Convert all TypeScript source files to ReScript - Remove package.json and all npm-related files - Remove TypeScript config files (tsconfig.json, jest.config.js, etc.) - Update deno.json for ReScript-only workflow - Add Mustfile.epx for deployment state management - Add config.ncl for Nickel-based configuration - Update justfile with ReScript/Deno commands - Add language policy enforcement workflow - Update README.adoc and CLAUDE.md for new stack - Add .gitignore entries for banned files New Features: - CRDT support (G-Counter, PN-Counter, LWW-Register, LWW-Map, OR-Set) - Modern cryptography (SHA-256+, AES-256-GCM, ECDSA, ECDH) - Post-quantum crypto preparation (Kyber) Enforcement: - TypeScript files are now BANNED - npm/yarn/pnpm/bun are now BANNED - Makefile is now BANNED (use justfile) - CI workflow rejects non-compliant PRs Co-authored-by: Claude <noreply@anthropic.com>
1 parent 3dbfafc commit 0de5087

87 files changed

Lines changed: 5941 additions & 8794 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.json

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# SPDX-License-Identifier: MIT
2+
# SPDX-FileCopyrightText: 2024 Hyperpolymath
3+
#
4+
# Language Policy Enforcement Workflow
5+
# Rejects PRs that violate the Hyperpolymath Language Standard
6+
7+
name: Language Policy
8+
9+
on:
10+
pull_request:
11+
branches: [main, develop]
12+
push:
13+
branches: [main, develop]
14+
15+
jobs:
16+
enforce-policy:
17+
name: Enforce Language Policy
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Check for banned TypeScript files
23+
run: |
24+
if find . -name "*.ts" -not -path "./node_modules/*" | grep -q .; then
25+
echo "❌ ERROR: TypeScript files detected (BANNED)"
26+
echo "TypeScript is not allowed in this project. Use ReScript instead."
27+
find . -name "*.ts" -not -path "./node_modules/*"
28+
exit 1
29+
fi
30+
echo "✅ No TypeScript files found"
31+
32+
- name: Check for banned TSX files
33+
run: |
34+
if find . -name "*.tsx" -not -path "./node_modules/*" | grep -q .; then
35+
echo "❌ ERROR: TSX files detected (BANNED)"
36+
echo "TSX is not allowed in this project. Use ReScript instead."
37+
find . -name "*.tsx" -not -path "./node_modules/*"
38+
exit 1
39+
fi
40+
echo "✅ No TSX files found"
41+
42+
- name: Check for package.json (npm)
43+
run: |
44+
if [ -f package.json ]; then
45+
echo "❌ ERROR: package.json detected (BANNED)"
46+
echo "npm is not allowed. Use deno.json for dependencies."
47+
exit 1
48+
fi
49+
echo "✅ No package.json found"
50+
51+
- name: Check for package-lock.json
52+
run: |
53+
if [ -f package-lock.json ]; then
54+
echo "❌ ERROR: package-lock.json detected (BANNED)"
55+
exit 1
56+
fi
57+
echo "✅ No package-lock.json found"
58+
59+
- name: Check for node_modules
60+
run: |
61+
if [ -d node_modules ]; then
62+
echo "❌ ERROR: node_modules detected (BANNED)"
63+
echo "node_modules is not allowed. Use Deno imports."
64+
exit 1
65+
fi
66+
echo "✅ No node_modules found"
67+
68+
- name: Check for yarn.lock
69+
run: |
70+
if [ -f yarn.lock ]; then
71+
echo "❌ ERROR: yarn.lock detected (BANNED)"
72+
exit 1
73+
fi
74+
echo "✅ No yarn.lock found"
75+
76+
- name: Check for pnpm-lock.yaml
77+
run: |
78+
if [ -f pnpm-lock.yaml ]; then
79+
echo "❌ ERROR: pnpm-lock.yaml detected (BANNED)"
80+
exit 1
81+
fi
82+
echo "✅ No pnpm-lock.yaml found"
83+
84+
- name: Check for bun.lockb
85+
run: |
86+
if [ -f bun.lockb ]; then
87+
echo "❌ ERROR: bun.lockb detected (BANNED)"
88+
exit 1
89+
fi
90+
echo "✅ No bun.lockb found"
91+
92+
- name: Check for Makefile
93+
run: |
94+
if [ -f Makefile ] || [ -f makefile ] || [ -f GNUmakefile ]; then
95+
echo "❌ ERROR: Makefile detected (BANNED)"
96+
echo "Makefile is not allowed. Use justfile instead."
97+
exit 1
98+
fi
99+
echo "✅ No Makefile found"
100+
101+
- name: Check for Go files
102+
run: |
103+
if find . -name "*.go" | grep -q .; then
104+
echo "❌ ERROR: Go files detected (BANNED)"
105+
echo "Go is not allowed. Use Rust instead."
106+
find . -name "*.go"
107+
exit 1
108+
fi
109+
echo "✅ No Go files found"
110+
111+
- name: Verify deno.json exists
112+
run: |
113+
if [ ! -f deno.json ]; then
114+
echo "❌ ERROR: deno.json not found"
115+
echo "This project requires Deno configuration."
116+
exit 1
117+
fi
118+
echo "✅ deno.json found"
119+
120+
- name: Verify bsconfig.json exists
121+
run: |
122+
if [ ! -f bsconfig.json ]; then
123+
echo "❌ ERROR: bsconfig.json not found"
124+
echo "This project requires ReScript configuration."
125+
exit 1
126+
fi
127+
echo "✅ bsconfig.json found"
128+
129+
- name: Verify justfile exists
130+
run: |
131+
if [ ! -f justfile ]; then
132+
echo "❌ ERROR: justfile not found"
133+
echo "This project requires a justfile for task running."
134+
exit 1
135+
fi
136+
echo "✅ justfile found"
137+
138+
- name: Language policy check passed
139+
run: |
140+
echo "✅ All language policy checks passed!"
141+
echo ""
142+
echo "Allowed: ReScript, Deno, Rust, Bash, Nickel"
143+
echo "Banned: TypeScript, Node.js, npm, Go, Makefile"

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@ erl_crash.dump
4040
# ReScript
4141
/lib/bs/
4242
/.bsb.lock
43+
*.bs.js
44+
.merlin
45+
46+
# BANNED files (should never be committed)
47+
package.json
48+
package-lock.json
49+
yarn.lock
50+
pnpm-lock.yaml
51+
bun.lockb
52+
Makefile
53+
makefile
54+
GNUmakefile
4355

4456
# Python (SaltStack only)
4557
__pycache__/

.prettierrc.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)