Skip to content

Commit b1ddd2f

Browse files
committed
feat: v2.0.2 - Node.js runtime compatibility & architecture refactor
1 parent 6f0018a commit b1ddd2f

File tree

659 files changed

+75548
-26472
lines changed

Some content is hidden

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

659 files changed

+75548
-26472
lines changed

.claude/agents/a-agent-like-linus-keep-it-sim.md

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

.claude/agents/dao-qi-harmony-designer.md

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

.claude/agents/simplicity-auditor.md

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

.claude/agents/test-agent.md

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

.claude/agents/test-writer.md

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

.eslintrc.cjs

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,42 @@
11
module.exports = {
2-
extends: [
3-
'eslint:recommended',
4-
'@typescript-eslint/recommended',
5-
],
2+
extends: ['eslint:recommended'],
63
parser: '@typescript-eslint/parser',
7-
plugins: ['@typescript-eslint'],
4+
plugins: ['@typescript-eslint', 'react-hooks'],
85
root: true,
96
env: {
107
node: true,
118
es2022: true,
129
},
10+
parserOptions: {
11+
ecmaVersion: 2022,
12+
sourceType: 'module',
13+
},
1314
rules: {
14-
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
15-
'@typescript-eslint/no-explicit-any': 'warn',
16-
'@typescript-eslint/no-non-null-assertion': 'off',
15+
'no-unused-vars': 'off',
16+
'no-empty': 'off',
17+
'no-empty-pattern': 'off',
18+
'no-undef': 'off',
19+
'no-mixed-spaces-and-tabs': 'off',
20+
'no-control-regex': 'off',
21+
'no-constant-condition': 'off',
22+
'no-extra-boolean-cast': 'off',
23+
'no-extra-semi': 'off',
24+
'no-redeclare': 'off',
25+
'no-inner-declarations': 'off',
26+
'no-useless-catch': 'off',
27+
'no-unreachable': 'off',
28+
'no-case-declarations': 'off',
29+
'no-useless-escape': 'off',
30+
'no-prototype-builtins': 'off',
31+
'require-yield': 'off',
32+
'@typescript-eslint/no-unused-vars': 'off',
33+
'@typescript-eslint/no-explicit-any': 'off',
1734
},
18-
ignorePatterns: ['dist/', 'node_modules/', 'cli.js'],
19-
}
35+
ignorePatterns: [
36+
'dist/',
37+
'node_modules/',
38+
'vendor/',
39+
'cli.js',
40+
'cli-acp.js',
41+
],
42+
}

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ci-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
test:
15+
name: ${{ matrix.os }}
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [ubuntu-latest, macos-latest, windows-latest]
21+
env:
22+
KODE_SKIP_BINARY_DOWNLOAD: "1"
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Bun
28+
uses: oven-sh/setup-bun@v1
29+
with:
30+
bun-version: latest
31+
32+
- name: Install
33+
run: bun install
34+
35+
- name: Format
36+
run: bun run format:check
37+
38+
- name: Typecheck
39+
run: bun run typecheck
40+
41+
- name: Test
42+
run: bun test
43+
44+
- name: Build
45+
run: bun run build
46+

.github/workflows/dev-release.yml

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
name: Dev Release (main)
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
concurrency:
8+
group: dev-release-${{ github.ref }}
9+
cancel-in-progress: false
10+
11+
jobs:
12+
compute-version:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
dev_version: ${{ steps.version.outputs.dev_version }}
16+
tag_name: ${{ steps.version.outputs.tag_name }}
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '20.18.1'
25+
26+
- name: Compute dev version
27+
id: version
28+
run: |
29+
BASE_VERSION=$(node -p "require('./package.json').version")
30+
DEV_VERSION="${BASE_VERSION}-dev.${{ github.run_number }}"
31+
echo "dev_version=${DEV_VERSION}" >> "${GITHUB_OUTPUT}"
32+
echo "tag_name=v${DEV_VERSION}" >> "${GITHUB_OUTPUT}"
33+
echo "Dev version: ${DEV_VERSION}"
34+
35+
build-binaries:
36+
needs: compute-version
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
include:
41+
- os: ubuntu-latest
42+
target: bun-linux-x64
43+
asset: kode-linux-x64
44+
- os: ubuntu-latest
45+
target: bun-linux-arm64
46+
asset: kode-linux-arm64
47+
- os: macos-latest
48+
target: bun-darwin-x64
49+
asset: kode-darwin-x64
50+
- os: macos-latest
51+
target: bun-darwin-arm64
52+
asset: kode-darwin-arm64
53+
- os: windows-latest
54+
target: bun-windows-x64
55+
asset: kode-win32-x64.exe
56+
runs-on: ${{ matrix.os }}
57+
env:
58+
KODE_SKIP_BINARY_DOWNLOAD: "1"
59+
steps:
60+
- name: Checkout
61+
uses: actions/checkout@v4
62+
63+
- name: Setup Node.js
64+
uses: actions/setup-node@v4
65+
with:
66+
node-version: '20.18.1'
67+
68+
- name: Setup Bun
69+
uses: oven-sh/setup-bun@v1
70+
with:
71+
bun-version: latest
72+
73+
- name: Install
74+
run: bun install
75+
76+
- name: Set package.json version (dev)
77+
run: node -e "const fs=require('fs');const p=JSON.parse(fs.readFileSync('package.json'));p.version='${{ needs.compute-version.outputs.dev_version }}';fs.writeFileSync('package.json',JSON.stringify(p,null,2)+'\n')"
78+
79+
- name: Build binary
80+
run: bun build src/entrypoints/index.ts --compile --target=${{ matrix.target }} --format=esm --outfile=${{ matrix.asset }}
81+
82+
- name: Make binary executable
83+
if: runner.os != 'Windows'
84+
run: chmod +x ${{ matrix.asset }}
85+
86+
- name: Upload binary artifact
87+
uses: actions/upload-artifact@v4
88+
with:
89+
name: ${{ matrix.asset }}
90+
path: ${{ matrix.asset }}
91+
if-no-files-found: error
92+
93+
publish-npm:
94+
needs: compute-version
95+
runs-on: ubuntu-latest
96+
env:
97+
KODE_SKIP_BINARY_DOWNLOAD: "1"
98+
steps:
99+
- name: Checkout
100+
uses: actions/checkout@v4
101+
102+
- name: Setup Node.js
103+
uses: actions/setup-node@v4
104+
with:
105+
node-version: '20.18.1'
106+
registry-url: 'https://registry.npmjs.org'
107+
108+
- name: Setup Bun
109+
uses: oven-sh/setup-bun@v1
110+
with:
111+
bun-version: latest
112+
113+
- name: Install
114+
run: bun install
115+
116+
- name: Set package.json version (dev)
117+
run: node -e "const fs=require('fs');const p=JSON.parse(fs.readFileSync('package.json'));p.version='${{ needs.compute-version.outputs.dev_version }}';fs.writeFileSync('package.json',JSON.stringify(p,null,2)+'\n')"
118+
119+
- name: Typecheck
120+
run: bun run typecheck
121+
122+
- name: Test
123+
run: bun test
124+
125+
- name: Build (npm)
126+
run: bun run build:npm
127+
128+
- name: Prepublish check
129+
run: bun run scripts/prepublish-check.js
130+
131+
- name: "Publish npm (dist-tag: dev)"
132+
run: npm publish --tag dev --access public --ignore-scripts
133+
env:
134+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
135+
136+
prerelease:
137+
needs: [compute-version, build-binaries, publish-npm]
138+
runs-on: ubuntu-latest
139+
permissions:
140+
contents: write
141+
steps:
142+
- name: Download binary artifacts
143+
uses: actions/download-artifact@v4
144+
with:
145+
path: artifacts
146+
147+
- name: Create checksums
148+
run: |
149+
find artifacts -type f -maxdepth 2 -print0 | sort -z | xargs -0 shasum -a 256 > checksums-sha256.txt
150+
echo "Checksums:"
151+
head -n 20 checksums-sha256.txt
152+
153+
- name: Create GitHub prerelease
154+
uses: softprops/action-gh-release@v2
155+
with:
156+
tag_name: ${{ needs.compute-version.outputs.tag_name }}
157+
name: ${{ needs.compute-version.outputs.tag_name }}
158+
prerelease: true
159+
files: |
160+
artifacts/**/*
161+
checksums-sha256.txt

0 commit comments

Comments
 (0)