Skip to content

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

Open
harryalbert wants to merge 1 commit intomainfrom
harry/app-4061-opencode-plugin-error-on-startup
Open

move test fns outside of top level index to fix filter and slice errors#10
harryalbert wants to merge 1 commit 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
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.

1 participant