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

Fix NPM separator warning for negated flags #2930

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

gonzaloriestra
Copy link
Contributor

WHY are these changes introduced?

In #2348 we added a warning when using NPM and passing flags without the separator (--).

But it turns out that NPM removes the no_ prefix for the flags. For example, passing --no-release will result in a npm_config_release environment variable. So our code to show the warning wasn't working in that case.

WHAT is this pull request doing?

Ignore the no_ prefix from the flags to show the warning in all cases

How to test your changes?

npm run shopify app deploy --no-release -- --path your-app

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.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2023

Thanks for your contribution!

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

  • Themes: @shopify/theme-code-tools
  • UI extensions: @shopify/ui-extensions-cli
    • Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/cli-foundations

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2023

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
73.93% (+0% 🔼)
6068/8208
🟡 Branches
71.2% (+0.1% 🔼)
2967/4167
🟡 Functions
72.34% (-0.14% 🔻)
1543/2133
🟡 Lines
75.25% (+0.01% 🔼)
5757/7650
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / app.ts
88.73% (+2.07% 🔼)
61.54% (-1.62% 🔻)
83.33% (-3.76% 🔻)
93.55% (+3.67% 🔼)
🟢
... / extension-instance.ts
83.67% (-1.02% 🔻)
76%
87.5% (-3.13% 🔻)
84.62% (-1.1% 🔻)
🟢
... / context.ts
89.45% (-0.69% 🔻)
88.49%
84.21% (-3.29% 🔻)
90.15% (-0.4% 🔻)

Test suite run success

1441 tests passing in 671 suites.

Report generated by 🧪jest coverage report action from 46a72a6

@gonzaloriestra gonzaloriestra marked this pull request as ready for review October 5, 2023 08:09
@gonzaloriestra gonzaloriestra requested review from a team, isaacroldan and amcaplan and removed request for a team October 5, 2023 08:09
@gonzaloriestra gonzaloriestra added this pull request to the merge queue Oct 5, 2023
Merged via the queue into main with commit aa7a547 Oct 5, 2023
1 check passed
@gonzaloriestra gonzaloriestra deleted the fix-npm-separator-warning branch October 5, 2023 08:55
@shopify-shipit shopify-shipit bot temporarily deployed to nightly October 5, 2023 10:17 Inactive
@shopify-shipit shopify-shipit bot temporarily deployed to experimental October 9, 2023 09:43 Inactive
@shopify-shipit shopify-shipit bot temporarily deployed to production October 19, 2023 13:18 Inactive
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.

2 participants