forcedotcom / salesforcedx-templates

Salesforce Templates Node Library
BSD 3-Clause "New" or "Revised" License
80 stars 57 forks source link

ci: checks for bundling #632

Closed mingxuanzhangsfdx closed 3 weeks ago

mingxuanzhangsfdx commented 1 month ago

What does this PR do?

This PR adds several checks during the CI of templates for bundling stability, including

avoid dynamic imports i. esbuild is able to report an error when dealing with dynamic imports. —supported:dynamic-import=false ii. log-override to cover dynamic imports detect fs.read* usage and send warnings if any to make developers aware of the potential risks to esbuild of such a usage. if there are modules that are not bundle-able, and we are not aware of, the test workflow should fail. i. maintain an allowlist for dependencies that are not able to be bundled and we have resolved.

What issues does this PR fix or reference?

@W-16629156@