aws / aws-toolkit-vscode

Amazon Q, CodeCatalyst, Local Lambda debug, SAM/CFN syntax, ECS Terminal, AWS resources
https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.amazon-q-vscode
Apache License 2.0
1.41k stars 346 forks source link

web: Fix failing web mode due to `fs-extra` import #5248

Closed nkomonen-amazon closed 1 day ago

nkomonen-amazon commented 5 days ago

Problem:

When importing the codewhisperer exports module from index.ts in web mode it was breaking due to a transitive fs-extra import.

Solution:

Export a separate module from indexCommon.ts for code that works in web or node. This file is a subset of index.ts, so behavior remains the same.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

nkomonen-amazon commented 1 day ago

@justinmk3 can we merge this now to unblock people while I make the changes we previously discussed