-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Shopify Developer - Revert "reference constants from shopify app" #15810
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
Conversation
This reverts commit fc05c99.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
WalkthroughThis pull request performs version number updates across multiple files in the Shopify developer app component and introduces new constant definitions in the constants file. The version bumps are applied to the main package manifest and several event source modules. Additionally, the constants file is modified to define and export new constants used for Shopify integration, replacing a previous import. Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
components/shopify_developer_app/sources/new-cancelled-order/new-cancelled-order.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/shopify_developer_app/sources/new-customer-created/new-customer-created.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/shopify_developer_app/sources/new-event-emitted/new-event-emitted.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
components/shopify_developer_app/sources/common/constants.mjs (1)
9-98: Comprehensive event topic definitions aid in webhook subscription management.The EVENT_TOPIC object provides a complete list of available Shopify webhook topics, which will help prevent typos and provide better IDE autocompletion when subscribing to webhooks.
One minor issue: Line 96 has an inconsistent naming convention with
EVENT_TOPICS_THEMES_UPDATE(contains "EVENT_TOPICS" in the name) and its value doesn't follow the resource/action pattern used by other constants.- EVENT_TOPICS_THEMES_UPDATE: "event-topics-themes-update", + THEMES_UPDATE_ALT: "event-topics-themes-update",Or if this is a duplicate of the THEMES_UPDATE constant, consider removing it:
- EVENT_TOPICS_THEMES_UPDATE: "event-topics-themes-update",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (15)
components/shopify_developer_app/package.json(1 hunks)components/shopify_developer_app/sources/common/constants.mjs(1 hunks)components/shopify_developer_app/sources/new-cancelled-order/new-cancelled-order.mjs(1 hunks)components/shopify_developer_app/sources/new-customer-created/new-customer-created.mjs(1 hunks)components/shopify_developer_app/sources/new-draft-order/new-draft-order.mjs(1 hunks)components/shopify_developer_app/sources/new-event-emitted/new-event-emitted.mjs(1 hunks)components/shopify_developer_app/sources/new-fulfillment-event/new-fulfillment-event.mjs(1 hunks)components/shopify_developer_app/sources/new-order-created/new-order-created.mjs(1 hunks)components/shopify_developer_app/sources/new-order-fulfilled/new-order-fulfilled.mjs(1 hunks)components/shopify_developer_app/sources/new-paid-order/new-paid-order.mjs(1 hunks)components/shopify_developer_app/sources/new-product-created/new-product-created.mjs(1 hunks)components/shopify_developer_app/sources/new-product-updated/new-product-updated.mjs(1 hunks)components/shopify_developer_app/sources/new-refund-created/new-refund-created.mjs(1 hunks)components/shopify_developer_app/sources/new-updated-customer/new-updated-customer.mjs(1 hunks)components/shopify_developer_app/sources/new-updated-order/new-updated-order.mjs(1 hunks)
✅ Files skipped from review due to trivial changes (14)
- components/shopify_developer_app/package.json
- components/shopify_developer_app/sources/new-order-fulfilled/new-order-fulfilled.mjs
- components/shopify_developer_app/sources/new-cancelled-order/new-cancelled-order.mjs
- components/shopify_developer_app/sources/new-paid-order/new-paid-order.mjs
- components/shopify_developer_app/sources/new-updated-customer/new-updated-customer.mjs
- components/shopify_developer_app/sources/new-draft-order/new-draft-order.mjs
- components/shopify_developer_app/sources/new-refund-created/new-refund-created.mjs
- components/shopify_developer_app/sources/new-customer-created/new-customer-created.mjs
- components/shopify_developer_app/sources/new-product-created/new-product-created.mjs
- components/shopify_developer_app/sources/new-updated-order/new-updated-order.mjs
- components/shopify_developer_app/sources/new-product-updated/new-product-updated.mjs
- components/shopify_developer_app/sources/new-order-created/new-order-created.mjs
- components/shopify_developer_app/sources/new-fulfillment-event/new-fulfillment-event.mjs
- components/shopify_developer_app/sources/new-event-emitted/new-event-emitted.mjs
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
🔇 Additional comments (5)
components/shopify_developer_app/sources/common/constants.mjs (5)
1-2: Constants definition matches Shopify's standards.These constants correctly define the standard Shopify domain suffix and webhook identifier parameter.
4-7: Header constants follow Shopify webhook standards.The HEADER object properly defines the standard HTTP header names used by Shopify for webhook deliveries, which is important for consistent header parsing.
100-100: Helpful utility array creation.Creating an array of all event topics simplifies use cases that need to iterate through all available topics.
102-108: Clean, organized export structure.The export structure is clean and provides a well-organized interface for importing modules to access these constants.
1-108:✅ Verification successful
Verify impacts of replacing imported constants with local definitions.
This file appears to be replacing imported constants from
@pipedream/shopify/sources/common/constants.mjswith local definitions. This change could impact other parts of the codebase that expect the same structure or values from the previous import.
🏁 Script executed:
#!/bin/bash # Look for usages of the constants in other files to ensure compatibility echo "Searching for imports of this constants file..." rg -F "from .*shopify_developer_app/sources/common/constants" --type js echo -e "\nChecking for any other files that might import from @pipedream/shopify/sources/common/constants.mjs..." rg -F "from '@pipedream/shopify/sources/common/constants'" --type js rg -F 'from "@pipedream/shopify/sources/common/constants"' --type js echo -e "\nVerifying the structure of the original constants file..." if [ -f "components/@pipedream/shopify/sources/common/constants.mjs" ]; then cat "components/@pipedream/shopify/sources/common/constants.mjs" fiLength of output: 750
No Impact Found on Replacing Imported Constants with Local Definitions
After running searches for imports both from the local constants file and the original
@pipedream/shopify/sources/common/constants.mjs, there were no references found that indicate external dependencies on the original file’s structure or constant values. This suggests that replacing the imported constants with local definitions in this file is unlikely to break any other parts of the codebase. Please continue to stay attentive to any hidden dependencies if future changes occur, but the current verification indicates this change is safe.
This reverts commit fc05c99.
WHY
Summary by CodeRabbit
New Features
Chores