Skip to content

feat(nodejs): add pre and post install scripts with coder exp sync support#802

Open
blinkagent[bot] wants to merge 8 commits intomainfrom
feat/nodejs-pre-post-install-scripts
Open

feat(nodejs): add pre and post install scripts with coder exp sync support#802
blinkagent[bot] wants to merge 8 commits intomainfrom
feat/nodejs-pre-post-install-scripts

Conversation

@blinkagent
Copy link
Copy Markdown
Contributor

@blinkagent blinkagent bot commented Mar 13, 2026

Description

Add pre_install_script and post_install_script variables to the thezoker/nodejs module, following the pattern established by other registry modules (agent-helper, claude-code, aider, goose, amazon-q, etc.). Scripts use coder exp sync for reliable execution ordering, enabling dependency coordination between modules.

Changes:

  • Added pre_install_script and post_install_script optional variables (default null)
  • Wrapped install in coder exp sync want/start/complete flow
  • Added conditional coder_script resources for pre/post install
  • Added outputs for cross-module coordination
  • New nodejs.tftest.hcl with 5 test cases
  • Updated README with documentation and examples

Type of Change

  • New module
  • New template
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/thezoker/modules/nodejs
New version: N/A (enhancement to existing module)
Breaking change: [ ] Yes [x] No

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun fmt)
  • Changes tested locally
  • terraform validate success
  • terraform test — 5 passed, 0 failed
  • Backward compatible (new variables default to null)

Related Issues

None

…pport

Add pre_install_script and post_install_script variables to the nodejs
module following the pattern used by other registry modules (agent-helper,
claude-code, aider, etc.). Scripts use coder exp sync for reliable
execution ordering, enabling dependency coordination between modules.

Changes:
- Add pre_install_script and post_install_script optional variables
- Wrap install script with coder exp sync want/start/complete
- Add conditional pre/post install coder_script resources
- Export sync script names as outputs for cross-module coordination
- Add nodejs.tftest.hcl with 5 test cases
- Update README with pre/post install documentation and examples
- Bump version references to 1.0.14
blink-so bot and others added 7 commits March 13, 2026 14:23
Remove all the coder exp sync machinery, separate script resources,
locals, and outputs. Simply pass the scripts as template variables
into run.sh and eval them before/after the nvm install.
… install scripts

- Base64 encode pre/post install scripts to safely handle special characters
- Use separate coder_script resources for pre_install, install, and post_install
- Add coder exp sync want/start/complete for execution ordering
- Base64 encode the main install script (run.sh) via templatefile + base64encode
- Revert run.sh to original (no pre/post install handling)
- Add sync name outputs for cross-module dependency coordination
- Update README with cross-module coordination documentation
- Add output assertions to tests
@DevelopmentCats
Copy link
Copy Markdown
Contributor

I have tested this and it works well

Using these exp sync commands the claude-code module can now use nodejs and wait on nodejs before claude-code installs.

The pre and post install scripts are just for flexibility if someone wants to just use the node module, and post install commands to install whatever they would need.

@matifali matifali requested review from 35C4n0r and removed request for matifali March 24, 2026 09:21
@35C4n0r
Copy link
Copy Markdown
Collaborator

35C4n0r commented Mar 24, 2026

@matifali
Copy link
Copy Markdown
Member

@DevelopmentCats @matifali should we use registry.coder.com/modules/coder/agent-helper here ?

I am ok if we had a more generic name for that module. may be script-helper or coder-helper

@DevelopmentCats
Copy link
Copy Markdown
Contributor

We totally could use that module here instead, I assumed that it was for agents only based on the name but if we are cool making it more generalized I'll go ahead and do that

@35C4n0r
Copy link
Copy Markdown
Collaborator

35C4n0r commented Mar 24, 2026

I assumed that it was for agents only based on the name but if we are cool making it more generalized I'll go ahead and do that

This was the idea I had in mind, but we later discussed that we want it to be usable for general purpose too.

@35C4n0r
Copy link
Copy Markdown
Collaborator

35C4n0r commented Mar 24, 2026

@DevelopmentCats @matifali should we use registry.coder.com/modules/coder/agent-helper here ?

I am ok if we had a more generic name for that module. may be script-helper or coder-helper

If we want to change it, this is the right time to do it. Since none of the modules reference it rn.

@DevelopmentCats
Copy link
Copy Markdown
Contributor

DevelopmentCats commented Mar 25, 2026

@DevelopmentCats @matifali should we use registry.coder.com/modules/coder/agent-helper here ?

I am ok if we had a more generic name for that module. may be script-helper or coder-helper

If we want to change it, this is the right time to do it. Since none of the modules reference it rn.

Since we haven't nested this into any other modules quite yet, do you think we are good to just completely remove old tags and rename the agent-helper module then?

If so I will go ahead and start up a PR for this @matifali @35C4n0r

@matifali
Copy link
Copy Markdown
Member

Since we haven't nested this into any other modules quite yet, do you think we are good to just completely remove old tags and rename the agent-helper module then?

Yes

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.

3 participants