8 Commits

Author SHA1 Message Date
xiaoju b2185f54c0 fix: disable pnpm minimumReleaseAge in CI
CI / check (pull_request) Failing after 45s
2026-06-04 10:10:52 +00:00
xiaoju 49f096b18f fix: use corepack for pnpm in CI
CI / check (pull_request) Failing after 32s
Drop pnpm/action-setup (requires explicit version), use corepack enable instead.
Also align Node to 22 (consistent with uwf).

Closes #76
2026-06-04 10:07:28 +00:00
xiaoju 6b9ebd1796 chore: add Gitea CI workflow (build + lint + test)
CI / check (pull_request) Failing after 1m18s
小橘 🍊(NEKO Team)
2026-06-04 09:36:51 +00:00
xiaomo b3879c583a Merge pull request 'chore: use proman test instead of vitest run' (#75) from chore/proman-test-script into main
chore: use proman test instead of vitest run (#75)
2026-06-04 01:57:23 +00:00
xingyue 01d4f0fa14 chore: use proman test instead of vitest run 2026-06-04 09:51:30 +08:00
xiaomo d79d0227fa Merge pull request 'fix: resolve prompt files from package root instead of dist' (#74) from fix/prompt-path into main
fix: resolve prompt files from package root, suppress ExperimentalWarning in tests (#74)
2026-06-04 00:38:14 +00:00
tuanzi e4e4ce0f73 fix: suppress SQLite ExperimentalWarning in edge-cases and schema-validation tests
The local runCli helpers in edge-cases.test.ts (Phase 3/4/7) and raw
execFileSync calls in schema-validation.test.ts (tests 2.1, 2.3) were
missing NODE_NO_WARNINGS=1, causing ExperimentalWarning to leak into
stderr snapshots. Added env override to match what helpers.runCli
already does.
2026-06-04 00:36:38 +00:00
tuanzi 13b12ef50c fix: resolve prompt files from package root instead of dist
prompts/*.md files are not copied to dist/ during tsc build,
causing `ocas prompt setup/usage` to fail with ENOENT.

- Change join(__dirname, "prompts") → join(__dirname, "..", "prompts")
- Add prompts/ to package.json "files" for npm publishing
- Update snapshots (Node.js SQLite ExperimentalWarning + version string)
2026-06-04 00:11:28 +00:00
7 changed files with 41 additions and 4 deletions
+28
View File
@@ -0,0 +1,28 @@
name: CI
on:
push:
branches: ['*']
pull_request:
branches: [main]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: corepack enable && echo 'minimum-release-age=0' > .npmrc && pnpm install
- name: Build
run: pnpm run build
- name: Lint
run: pnpm run check
- name: Test
run: pnpm run test
+1 -1
View File
@@ -13,7 +13,7 @@
},
"scripts": {
"build": "proman build",
"test": "vitest run",
"test": "proman test",
"check": "proman check",
"format": "proman format"
},
+4
View File
@@ -14,6 +14,10 @@
"bin": {
"ocas": "dist/index.js"
},
"files": [
"dist",
"prompts"
],
"dependencies": {
"@ocas/core": "workspace:*",
"@ocas/fs": "workspace:*"
+2 -2
View File
@@ -1234,7 +1234,7 @@ switch (cmd) {
switch (sub) {
case "usage": {
const content = readFileSync(
join(__dirname, "prompts", "usage.md"),
join(__dirname, "..", "prompts", "usage.md"),
"utf-8",
);
process.stdout.write(content);
@@ -1242,7 +1242,7 @@ switch (cmd) {
}
case "setup": {
const content = readFileSync(
join(__dirname, "prompts", "setup.md"),
join(__dirname, "..", "prompts", "setup.md"),
"utf-8",
);
process.stdout.write(content);
@@ -466,5 +466,5 @@ Flags:
--epsilon <n> Cutoff threshold for render (default: 0.01)
--pipe, -p Read from stdin (put/hash: raw JSON payload; render: { type, value } envelope)
Agent: If you have not installed the ocas skill for this version (0.3.0), run \`ocas prompt setup\` and follow the instructions."
Agent: If you have not installed the ocas skill for this version (0.3.1), run \`ocas prompt setup\` and follow the instructions."
`;
+3
View File
@@ -52,6 +52,7 @@ describe("Phase 7: Edge Cases", () => {
{
encoding: "utf-8",
timeout: 10000,
env: { ...process.env, NODE_NO_WARNINGS: "1" },
},
);
return { stdout: stdout.trim(), stderr: "", exitCode: 0 };
@@ -177,6 +178,7 @@ describe("Phase 3: Variable System", () => {
{
encoding: "utf-8",
timeout: 10000,
env: { ...process.env, NODE_NO_WARNINGS: "1" },
},
);
return { stdout: stdout.trim(), stderr: "", exitCode: 0 };
@@ -379,6 +381,7 @@ describe("Phase 4: Template System", () => {
{
encoding: "utf-8",
timeout: 10000,
env: { ...process.env, NODE_NO_WARNINGS: "1" },
},
);
return { stdout: stdout.trim(), stderr: "", exitCode: 0 };
@@ -610,6 +610,7 @@ describe("Phase 2: Schema Validation", () => {
{
encoding: "utf-8",
timeout: 10000,
env: { ...process.env, NODE_NO_WARNINGS: "1" },
},
).trim();
} catch (e: unknown) {
@@ -635,6 +636,7 @@ describe("Phase 2: Schema Validation", () => {
{
encoding: "utf-8",
timeout: 10000,
env: { ...process.env, NODE_NO_WARNINGS: "1" },
},
);
} catch (e: unknown) {