Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
bun run --cwd packages/testing test -- --coverage
bun run --cwd packages/hikkaku test -- --coverage
bun run --cwd packages/moonscratch test -- --coverage
bun run --cwd packages/gobox test -- --coverage

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
Expand All @@ -64,4 +65,5 @@ jobs:
packages/hikkaku/coverage/lcov.info
packages/testing/coverage/lcov.info
packages/moonscratch/coverage/lcov.info
packages/gobox/coverage/lcov.info
fail_ci_if_error: false
16 changes: 15 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- vite-plugin-turbowarp-packager
- moonscratch
- testing
- gobox
release_type:
description: 'Version bump type'
required: true
Expand Down Expand Up @@ -90,7 +91,7 @@ jobs:
package="$PACKAGE_NAME"
release_type="$INPUT_RELEASE_TYPE"

if ! [[ "$package" =~ ^(hikkaku|create-hikkaku|vite-plugin-turbowarp-packager|moonscratch|testing)$ ]]; then
if ! [[ "$package" =~ ^(hikkaku|create-hikkaku|vite-plugin-turbowarp-packager|moonscratch|testing|gobox)$ ]]; then
echo "Unsupported package: $package"
exit 1
fi
Expand All @@ -114,6 +115,12 @@ jobs:
exit 1
fi

has_repository="$(node -e "const fs=require('fs');const pkg=JSON.parse(fs.readFileSync(process.argv[1],'utf8'));const repo=pkg.repository;const ok=(typeof repo==='string'&&repo.trim()!=='')||(repo&&typeof repo==='object'&&typeof repo.url==='string'&&repo.url.trim()!=='');process.stdout.write(ok?'yes':'no')" "$package_json_path")"
if [ "$has_repository" != "yes" ]; then
echo "package.json must contain a non-empty repository field: $package_json_path"
exit 1
fi
Comment on lines +118 to +122

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The repository field validation logic uses complex inline Node.js code that could be more maintainable. The logic checks if repository is either a non-empty string or an object with a non-empty url string. Consider extracting this into a separate script file for better readability and testability, similar to how version bumping might be handled.

Copilot uses AI. Check for mistakes.

if ! current_version="$(npm view "$package_name" version 2>/dev/null | tr -d '\r\n')"; then
current_version="$(node -e "const fs=require('fs');const pkg=JSON.parse(fs.readFileSync(process.argv[1],'utf8'));process.stdout.write(typeof pkg.version==='string'?pkg.version.trim():'')" "$package_json_path")"
if [ -z "$current_version" ]; then
Expand Down Expand Up @@ -199,6 +206,10 @@ jobs:
if: steps.metadata.outputs.package == 'testing'
run: bun run --cwd packages/testing build

- name: Build gobox
if: steps.metadata.outputs.package == 'gobox'
run: bun run --cwd packages/gobox build

- name: Build gpts zip
if: steps.metadata.outputs.package == 'hikkaku'
run: bun run --filter gpts-zip build
Expand All @@ -223,6 +234,9 @@ jobs:
testing)
dir='packages/testing'
;;
gobox)
dir='packages/gobox'
;;
*)
echo "Unsupported package: ${{ steps.metadata.outputs.package }}"
exit 1
Expand Down
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Project Structure & Module Organization
- `packages/hikkaku/` is the main library package. Source lives in `packages/hikkaku/src/` (e.g., `blocks/`, `core/`, `client/`, `vite/`, `utils/`).
- `packages/gobox/` provides high-level typed value/signal/function abstractions on top of `hikkaku`.
- `packages/skill/` contains skill docs and guides (`guides/`, `practices/`).
- `packages/testing/` provides Vitest-oriented Hikkaku + MoonScratch test helpers.
- `examples/example1/` is the dev playground app for running the library with Vite.
Expand Down
32 changes: 31 additions & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions docs/public/showcase/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@
},
"status": "ok"
},
{
"id": "gobox-counter",
"title": "Gobox Counter",
"path": "/showcase/gobox-counter.html",
"sourceUrl": "https://github.com/pnsk-lab/hikkaku/tree/main/examples/gobox-counter",
"status": "error",
"error": "ENOENT: no such file or directory, open '/home/nakasyou/hikkaku/hikkaku1/examples/gobox-counter/dist/project.sb3'"
},
{
"id": "json-parser",
"title": "Json Parser",
Expand Down Expand Up @@ -83,8 +91,7 @@
"title": "Simple",
"path": "/showcase/simple.html",
"sourceUrl": "https://github.com/pnsk-lab/hikkaku/tree/main/examples/simple",
"status": "error",
"error": "ENOENT: no such file or directory, open '/root/jet9/hikkaku/examples/simple/dist/project.sb3'"
"status": "ok"
},
{
"id": "tesseract",
Expand Down
18 changes: 9 additions & 9 deletions docs/reference/blocks/control.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Input: `times`, `handler`.

Output: Scratch statement block definition that is appended to the current script stack.

* `times: PrimitiveSource<number>` - number of iterations
* `times: PrimitiveSource<HikkakuNumber>` - number of iterations
* `handler: () => void` - body of the loop

Example:
Expand All @@ -34,7 +34,7 @@ Input: `condition`, `handler`.

Output: Scratch statement block definition that is appended to the current script stack.

* `condition: PrimitiveSource<boolean>`
* `condition: PrimitiveSource<HikkakuBool>`
* `handler: () => void`

Example:
Expand All @@ -52,7 +52,7 @@ Input: `condition`, `handler`.

Output: Scratch statement block definition that is appended to the current script stack.

* `condition: PrimitiveSource<boolean>`
* `condition: PrimitiveSource<HikkakuBool>`
* `handler: () => void`

Example:
Expand All @@ -71,7 +71,7 @@ Input: `variable`, `value`, `handler`.
Output: Scratch statement block definition that is appended to the current script stack.

* `variable: VariableReference`
* `value: PrimitiveSource<number>` - upper bound
* `value: PrimitiveSource<HikkakuNumber>` - upper bound
* `handler: () => void`

Example:
Expand Down Expand Up @@ -106,7 +106,7 @@ Input: `seconds`.

Output: Scratch statement block definition that is appended to the current script stack.

* `seconds: PrimitiveSource<number>`
* `seconds: PrimitiveSource<HikkakuNumber>`

Example:
```ts
Expand All @@ -123,7 +123,7 @@ Input: `condition`.

Output: Scratch statement block definition that is appended to the current script stack.

* `condition: PrimitiveSource<boolean>`
* `condition: PrimitiveSource<HikkakuBool>`

Example:
```ts
Expand All @@ -140,7 +140,7 @@ Input: `condition`, `handler`.

Output: Scratch statement block definition that is appended to the current script stack.

* `condition: PrimitiveSource<boolean>`
* `condition: PrimitiveSource<HikkakuBool>`
* `handler: () => void`

Example:
Expand All @@ -158,7 +158,7 @@ Input: `condition`, `thenHandler`, `elseHandler`.

Output: Scratch statement block definition that is appended to the current script stack.

* `condition: PrimitiveSource<boolean>`
* `condition: PrimitiveSource<HikkakuBool>`
* `thenHandler: () => void`
* `elseHandler: () => void`

Expand Down Expand Up @@ -226,7 +226,7 @@ Input: `target`.

Output: Scratch statement block definition that is appended to the current script stack.

* `target: PrimitiveSource<string>` - string
* `target: PrimitiveSource<HikkakuString>` - string

Example:
```ts
Expand Down
8 changes: 4 additions & 4 deletions docs/reference/blocks/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Input: `variable`, `value`.
Output: Scratch statement block definition that is appended to the current script stack.

* `variable: VariableReference`
* `value: PrimitiveSource<number | string>`
* `value: PrimitiveSource<HikkakuNumber | HikkakuString>`

Example:
```ts
Expand All @@ -52,7 +52,7 @@ Input: `variable`, `value`.
Output: Scratch statement block definition that is appended to the current script stack.

* `variable: VariableReference`
* `value: PrimitiveSource<number>`
* `value: PrimitiveSource<HikkakuNumber>`

Example:
```ts
Expand Down Expand Up @@ -121,7 +121,7 @@ Input: `list`, `item`.
Output: Scratch statement block definition that is appended to the current script stack.

* `list: ListReference`
* `item: PrimitiveSource<string | number>`
* `item: PrimitiveSource<HikkakuString | HikkakuNumber>`

Example:
```ts
Expand All @@ -139,7 +139,7 @@ Input: `list`, `index`.
Output: Scratch statement block definition that is appended to the current script stack.

* `list: Input value used by this block`
* `index: ListIndex` - PrimitiveSource<number | string>
* `index: ListIndex` - PrimitiveSource<HikkakuNumber | HikkakuString>

Example:
```ts
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/blocks/procedures.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ isProcedureArgument: true,
name: 'value',
type: 'stringOrNumber',
id: 'var-id',
getter: () => valueBlock('argument_reporter_string_number', { fields: { VALUE: ['value', null] } }),
getter: () => valueBlock<HikkakuString | HikkakuNumber>('argument_reporter_string_number', { fields: { VALUE: ['value', null] } }),
})
```

Expand All @@ -138,6 +138,6 @@ isProcedureArgument: true,
name: 'flag',
type: 'boolean',
id: 'flag-id',
getter: () => valueBlock('argument_reporter_boolean', { fields: { VALUE: ['flag', null] } }),
getter: () => valueBlock<HikkakuBool>('argument_reporter_boolean', { fields: { VALUE: ['flag', null] } }),
})
```
Loading