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

CLI triggers own deprecation warning #4896

Open
sambostock opened this issue Nov 20, 2024 · 0 comments
Open

CLI triggers own deprecation warning #4896

sambostock opened this issue Nov 20, 2024 · 0 comments
Labels
Type: Bug Something isn't working

Comments

@sambostock
Copy link

sambostock commented Nov 20, 2024

Problem

We are triggering our own deprecation warning.

  • --api-key has been renamed to --client-id
  • If --api-key is not provided, we check for $SHOPIFY_API_KEY, and set it as --api-key
  • If --api-key is set, we emit a deprecation warning

if (!flags['api-key']) {
if (process.env.SHOPIFY_API_KEY) {
flags['api-key'] = process.env.SHOPIFY_API_KEY
}
}
if (flags['api-key']) {
await showApiKeyDeprecationWarning()
}

Solution

  • 🅰 : We continue to support $SHOPIFY_API_KEY, but stop logging a deprecation warning when we get the key from there rather than --api-key directly.
  • 🅱 : We also deprecate $SHOPIFY_API_KEY in favour of $SHOPIFY_CLIENT_ID and clarify deprecation warning.

Tip

The flags config implies it will automatically check $SHOPIFY_FLAG_APP_API_KEY/$SHOPIFY_FLAG_CLIENT_ID environment variables, if --api-key/--client-id are omitted. Maybe we should use those? Although for some reason, we have both those flags as hidden.

@sambostock sambostock added the Type: Bug Something isn't working label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant