Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter env vars to always be valid for ESBuild #3656

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

amcaplan
Copy link
Contributor

@amcaplan amcaplan commented Apr 4, 2024

Nothing beginning with a number!

More details at https://github.com/evanw/esbuild/blob/44e746965d783646f97daf3d0617ff816727e7fb/internal/js_ast/js_ident.go#L9-L25

WHY are these changes introduced?

Fixes #3649

ESBuild has very strict rules about which ENV variables are allowed. One of the rules is no numeric characters at the beginning.

WHAT is this pull request doing?

Disallows numeric characters at the start of the ENV variable name.

How to test your changes?

For an app with an extension:

$ env '1VAR=value' p shopify app dev --path /path/to/your/app/with/ui/extensions

This should fail on main and succeed on this branch.

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've made sure that any changes to dev or deploy have been reflected in the internal flowchart.

Copy link
Contributor

github-actions bot commented Apr 4, 2024

Thanks for your contribution!

Depending on what you are working on, you may want to request a review from a Shopify team:

  • Themes: @shopify/advanced-edits
  • UI extensions: @shopify/ui-extensions-cli
    • Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/cli-foundations

Copy link
Contributor

github-actions bot commented Apr 4, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
72.02% (+0.01% 🔼)
6768/9398
🟡 Branches
69.1% (+0.02% 🔼)
3316/4799
🟡 Functions 70.82% 1806/2550
🟡 Lines
73.17% (+0.01% 🔼)
6382/8722

Test suite run success

1620 tests passing in 755 suites.

Report generated by 🧪jest coverage report action from 27ae7f3

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.

NPM Run Dev Fails After Generating Extension with Typescript / React
2 participants