Skip to content

fix(opencode): unignore build-node.ts in gitignore#35833

Open
zhangpaopao0609 wants to merge 4 commits into
anomalyco:devfrom
zhangpaopao0609:fix-build-gitignore
Open

fix(opencode): unignore build-node.ts in gitignore#35833
zhangpaopao0609 wants to merge 4 commits into
anomalyco:devfrom
zhangpaopao0609:fix-build-gitignore

Conversation

@zhangpaopao0609

Copy link
Copy Markdown

Issue for this PR

Closes #35722

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

packages/opencode/.gitignore has a script/build-*.ts line. That glob matches script/build-node.ts, which is a committed source script (not a generated file). It is invoked by packages/desktop/scripts/prebuild.ts and predev.ts via bun script/build-node.ts, so ignoring it means a fresh clone / desktop build can lose or fail to track that file.

The script/build-*.ts rule was added in #22652 alongside other ephemeral-file ignores, so I kept the rule and only added a negation !script/build-node.ts instead of removing the whole line. This preserves the original intent (ignore ad-hoc build-*.ts wrappers) while keeping the one real source file tracked. Note script/build.ts is not affected by the glob at all, since build-* only matches the hyphenated form.

How did you verify your code works?

Checked the ignore behavior locally with git check-ignore -v:

  • script/build-node.ts -> no longer ignored (negation wins)
  • script/build-foo.ts -> still ignored by script/build-*.ts
  • script/build.ts -> not matched by the glob, unaffected

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Made with Cursor

zhangpaopao0609 and others added 4 commits July 7, 2026 20:09
The script/build-*.ts pattern hid source build scripts required by desktop prebuild/predev and package build commands.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep script/build-*.ts for ephemeral build wrappers added in anomalyco#22652, but
except script/build-node.ts which is committed source required by desktop
prebuild/predev and the node build path.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

packages/opencode .gitignore ignores required build scripts

1 participant