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
25 changes: 24 additions & 1 deletion .fallowrc.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,18 @@
"packages/parsers/src/gsapWriterParity.acorn.test.ts",
"packages/parsers/src/htmlParser.roundtrip.test.ts",
"packages/parsers/src/htmlParser.test.ts",
// @hyperframes/lint rule test files: parallel arrange/act/assert test cases
// (pre-existing structure from when lint lived in packages/core/src/lint/).
"packages/lint/src/rules/adapters.test.ts",
"packages/lint/src/rules/captions.test.ts",
"packages/lint/src/rules/composition.test.ts",
"packages/lint/src/rules/core.test.ts",
"packages/lint/src/rules/fonts.test.ts",
"packages/lint/src/rules/gsap.test.ts",
"packages/lint/src/rules/media.test.ts",
"packages/lint/src/rules/slideshow.test.ts",
"packages/lint/src/rules/textures.test.ts",
"packages/lint/src/hyperframeLinter.test.ts",
// slideshowPanelHelpers.ts: setSlideNotes/addFragment/addHotspot share an
// intentional parallel shape (signature + mapSlidesIn → exists-check →
// map/append); the per-slide mutation differs, so a shared abstraction
Expand Down Expand Up @@ -311,6 +323,13 @@
"packages/parsers/src/htmlParser.ts",
// executeGsapMutation (CRITICAL) pre-dates this PR; studio-api still lives in core.
"packages/core/src/studio-api/routes/files.ts",
// lint rule implementations and project linter: pre-existing complexity
// (moved from packages/core/src/lint/). File-level exemption avoids the
// line-shift fingerprint problem for inherited findings.
"packages/lint/src/rules/media.ts",
"packages/lint/src/rules/textures.ts",
"packages/lint/src/rules/gsap.ts",
"packages/lint/src/project.ts",
// SlideshowPanel.tsx: top-level editor panel that wires several independent
// sections (slides/inspector/branches/hotspot). Its cyclomatic count comes
// from that fan-out; splitting it would scatter shared state without
Expand All @@ -329,7 +348,7 @@
// generated table's shape test; this is dev tooling, not shipped runtime.
"packages/cli/scripts/sync-agent-dirs.ts",
// Files modified only for import-path updates (one-line changes to switch
// from @hyperframes/core/* subpaths to @hyperframes/parsers). Their complexity
// from @hyperframes/core/* subpaths to the new packages). Their complexity
// is pre-existing; the line-shift fingerprint problem makes fallow treat
// the violations as new even though no logic changed.
"packages/core/src/core.types.ts",
Expand All @@ -338,6 +357,10 @@
"packages/studio/src/hooks/gsapShared.ts",
"packages/studio/src/hooks/gsapDragPositionCommit.ts",
"packages/studio/src/hooks/gsapKeyframeCacheHelpers.ts",
"packages/cli/src/commands/lint.ts",
"packages/cli/src/commands/preview.ts",
"packages/cli/src/commands/publish.ts",
"packages/cli/src/server/studioServer.ts",
// set-version.ts: compareSemver helper has pre-existing complexity from
// semver string parsing logic; line-shift fingerprint problem from new
// packages added to PACKAGES array makes fallow treat it as new.
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/preview-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
preview:
- "packages/core/**"
- "packages/parsers/**"
- "packages/lint/**"
- "packages/player/**"
- "packages/studio/**"
- "packages/cli/**"
Expand Down Expand Up @@ -76,7 +77,7 @@ jobs:

- name: Build workspace packages (required for vite config loading)
run: |
bun run --filter '@hyperframes/parsers' build
bun run --filter '@hyperframes/{parsers,lint}' build
bun run --cwd packages/core build

- name: Run Studio preview routing regression
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ jobs:
}

publish_pkg "@hyperframes/parsers" "@hyperframes/parsers"
publish_pkg "@hyperframes/lint" "@hyperframes/lint"
publish_pkg "@hyperframes/core" "@hyperframes/core"
publish_pkg "@hyperframes/sdk" "@hyperframes/sdk"
publish_pkg "@hyperframes/engine" "@hyperframes/engine"
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ ENV PATH="/root/.bun/bin:$PATH"
# lockfile change and fails.
COPY package.json bun.lock ./
COPY packages/parsers/package.json packages/parsers/package.json
COPY packages/lint/package.json packages/lint/package.json
COPY packages/core/package.json packages/core/package.json
COPY packages/engine/package.json packages/engine/package.json
COPY packages/player/package.json packages/player/package.json
Expand All @@ -90,12 +91,13 @@ RUN bun install --frozen-lockfile

# Copy source
COPY packages/parsers/ packages/parsers/
COPY packages/lint/ packages/lint/
COPY packages/core/ packages/core/
COPY packages/engine/ packages/engine/
COPY packages/producer/ packages/producer/

# Build workspace packages so "node" export conditions resolve to built dist
RUN bun run --filter '@hyperframes/parsers' build \
RUN bun run --filter '@hyperframes/{parsers,lint}' build \
&& bun run --cwd packages/core build

# Build core runtime artifacts (needed by renderer)
Expand Down
21 changes: 21 additions & 0 deletions bun.lock

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"type": "module",
"scripts": {
"dev": "bun run studio",
"build": "bun run --filter @hyperframes/parsers build && bun run --filter @hyperframes/core build && bun run --filter '@hyperframes/{core,engine,producer,player,studio,shader-transitions,aws-lambda,gcp-cloud-run,sdk}' build && bun run --filter @hyperframes/cli build",
"build": "bun run --filter '@hyperframes/{parsers,lint}' build && bun run --filter @hyperframes/core build && bun run --filter '@hyperframes/{core,engine,producer,player,studio,shader-transitions,aws-lambda,gcp-cloud-run,sdk}' build && bun run --filter @hyperframes/cli build",
"build:producer": "bun run --filter @hyperframes/producer build",
"studio": "bun run --filter @hyperframes/studio dev",
"build:hyperframes-runtime": "bun run --filter @hyperframes/core build:hyperframes-runtime",
Expand Down
1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"@hyperframes/core": "workspace:*",
"@hyperframes/engine": "workspace:*",
"@hyperframes/gcp-cloud-run": "workspace:*",
"@hyperframes/lint": "workspace:*",
"@hyperframes/producer": "workspace:*",
"@hyperframes/studio": "workspace:*",
"@types/adm-zip": "^0.5.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default defineCommand({
async run({ args }) {
try {
const project = resolveProject(args.dir);
const lintResult = await lintProject(project);
const lintResult = await lintProject(project.dir);

if (args.json) {
const allFindings = lintResult.results.flatMap((r) => r.result.findings);
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/src/commands/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,10 @@ export default defineCommand({
const isImplicitCwd = !rawArg || rawArg === "." || rawArg === "./";
const project = resolveProject(rawArg);
const dir = project.dir;
const indexPath = project.indexPath;
const projectName = isImplicitCwd ? basename(process.env.PWD ?? dir) : project.name;

// Lint before starting — surface issues for the agent to fix.
const lintResult = await lintProject({ dir, name: projectName, indexPath });
const lintResult = await lintProject(dir);
if (lintResult.totalErrors > 0 || lintResult.totalWarnings > 0) {
console.log();
for (const line of formatLintFindings(lintResult)) console.log(line);
Expand Down
7 changes: 2 additions & 5 deletions packages/cli/src/commands/publish.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { basename, resolve } from "node:path";
import { resolve } from "node:path";
import { existsSync } from "node:fs";
import { join } from "node:path";
import { defineCommand } from "citty";
Expand Down Expand Up @@ -33,12 +33,9 @@ export default defineCommand({
async run({ args }) {
const rawArg = args.dir;
const dir = resolve(rawArg ?? ".");
const isImplicitCwd = !rawArg || rawArg === "." || rawArg === "./";
const projectName = isImplicitCwd ? basename(process.env["PWD"] ?? dir) : basename(dir);

const indexPath = join(dir, "index.html");
if (existsSync(indexPath)) {
const lintResult = await lintProject({ dir, name: projectName, indexPath });
const lintResult = await lintProject(dir);
if (lintResult.totalErrors > 0 || lintResult.totalWarnings > 0) {
console.log();
for (const line of formatLintFindings(lintResult)) console.log(line);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ export default defineCommand({

// ── Pre-render lint ──────────────────────────────────────────────────
{
const lintResult = await lintProject(project);
const lintResult = await lintProject(project.dir);
if (!quiet && (lintResult.totalErrors > 0 || lintResult.totalWarnings > 0)) {
console.log("");
for (const line of formatLintFindings(lintResult, { errorsFirst: true })) console.log(line);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/server/studioServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ export function createStudioServer(options: StudioServerOptions): StudioServer {
},

async lint(html: string, opts?: { filePath?: string }) {
const { lintHyperframeHtml } = await import("@hyperframes/core/lint");
const { lintHyperframeHtml } = await import("@hyperframes/lint");
return await lintHyperframeHtml(html, opts);
},

Expand Down
Loading
Loading