Skip to content

move test fns outside of top level index to fix filter and slice errors#10

Merged
harryalbert merged 3 commits intomainfrom
harry/app-4061-opencode-plugin-error-on-startup
Apr 17, 2026
Merged

move test fns outside of top level index to fix filter and slice errors#10
harryalbert merged 3 commits intomainfrom
harry/app-4061-opencode-plugin-error-on-startup

Conversation

@harryalbert
Copy link
Copy Markdown
Contributor

@harryalbert harryalbert commented Apr 14, 2026

A user reported that "/opencode-warp@0.1.1 crashes on startup hooks with errors like "parts.filter is not a function" and "str.slice is not a function"."

Both of these errors seem to be coming from test helper functions that are exported from the top level index.ts fn in our plugin module. In older versions of opencode, each function exported out of a module is automatically called as a plugin builder, so it makes sense that these functions would cause compilation errors because they are not meant to be called as plugin builders.

The fix is just to move the helper functions to their own util file.

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@harryalbert harryalbert changed the title move tests fns outside of top level index move Test fns outside of top level index to fix filter and slice errors Apr 14, 2026
@harryalbert harryalbert requested a review from zachbai April 14, 2026 21:51
@harryalbert harryalbert marked this pull request as ready for review April 14, 2026 21:51
@harryalbert harryalbert changed the title move Test fns outside of top level index to fix filter and slice errors move test fns outside of top level index to fix filter and slice errors Apr 14, 2026
xiaogaozi added a commit to xiaogaozi/opencode-warp that referenced this pull request Apr 15, 2026
Move utility functions to dedicated src/utils.ts module for better
code organization and reusability across the codebase.

Closes: warpdotdev#10
@harryalbert harryalbert force-pushed the harry/app-4061-opencode-plugin-error-on-startup branch from eababe2 to ec75942 Compare April 17, 2026 15:18
Copy link
Copy Markdown
Contributor Author

harryalbert commented Apr 17, 2026

Merge activity

  • Apr 17, 4:11 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 17, 4:11 PM UTC: @harryalbert merged this pull request with Graphite.

@harryalbert harryalbert merged commit e60e068 into main Apr 17, 2026
2 checks passed
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.

2 participants