Skip to content

fix(init): add ws-config write to postinstall for external package manager mode#10147

Merged
davidfirst merged 2 commits into
masterfrom
fix/external-pm-ws-config-write
Jan 8, 2026
Merged

fix(init): add ws-config write to postinstall for external package manager mode#10147
davidfirst merged 2 commits into
masterfrom
fix/external-pm-ws-config-write

Conversation

@davidfirst
Copy link
Copy Markdown
Member

When initializing a workspace with externalPackageManager: true, the postinstall script now includes bit ws-config write to ensure TypeScript config files are generated after running the external package manager's install.

Previously the postinstall was:

"postinstall": "bit link && bit compile"

Now it's:

"postinstall": "bit link && bit compile && bit ws-config write"

This ensures that tsconfig files in bit-components/ are properly generated, which is required for IDE support and TypeScript compilation.

Copilot AI review requested due to automatic review settings January 8, 2026 16:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the initialization workflow for workspaces using external package managers by adding bit ws-config write to the postinstall script. This ensures TypeScript configuration files are automatically generated in the bit-components/ directory after running the external package manager's install command, which is essential for IDE support and TypeScript compilation.

Key Changes:

  • Updates postinstall script from 'bit link && bit compile' to 'bit link && bit compile && bit ws-config write' for external package manager mode
  • Applied consistently to both existing and new package.json scenarios

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scopes/harmony/host-initializer/create-consumer.ts Outdated
Comment thread scopes/harmony/host-initializer/create-consumer.ts Outdated
…nager mode

- Add EXTERNAL_PM_POSTINSTALL_SCRIPT constant to avoid duplication
- Update removePostInstallScript to use the constant
- Update E2E tests to use the constant
@davidfirst
Copy link
Copy Markdown
Member Author

Addressed Copilot review comments:

  • Created EXTERNAL_PM_POSTINSTALL_SCRIPT constant to eliminate duplication
  • Updated removePostInstallScript() to use the constant
  • Updated all E2E tests to use the constant

@davidfirst davidfirst enabled auto-merge (squash) January 8, 2026 16:46
@davidfirst davidfirst merged commit 38c282d into master Jan 8, 2026
12 checks passed
@davidfirst davidfirst deleted the fix/external-pm-ws-config-write branch January 8, 2026 17:02
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