Skip to content

Conversation

@andrewjschuang
Copy link
Contributor

@andrewjschuang andrewjschuang commented Mar 4, 2025

This reverts commit fc05c99.

WHY

Summary by CodeRabbit

  • New Features

    • Enhanced Shopify integration with a broader set of event topics and improved header configurations for more flexible event management.
  • Chores

    • Updated the overall package and individual module versions to ensure consistency, reliability, and alignment with the latest standards.

@vercel
Copy link

vercel bot commented Mar 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Mar 4, 2025 6:25pm
pipedream-docs ⬜️ Ignored (Inspect) Mar 4, 2025 6:25pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Mar 4, 2025 6:25pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 4, 2025

Walkthrough

This 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

File(s) Change Summary
components/shopify_developer_app/package.json Updated version from "0.6.3" to "0.6.4".
components/shopify_developer_app/sources/common/constants.mjs Added new constants (DOMAIN_SUFFIX, WEBHOOK_ID, HEADER, EVENT_TOPIC, EVENT_TOPICS) and updated the exported object.
components/shopify_developer_app/sources/new-cancelled-order/*.mjs, new-customer-created/*.mjs, new-draft-order/*.mjs, new-order-created/*.mjs, new-paid-order/*.mjs, new-product-created/*.mjs, new-updated-customer/*.mjs, new-updated-order/*.mjs Updated version from "0.0.7" to "0.0.8".
components/shopify_developer_app/sources/new-event-emitted/new-event-emitted.mjs Updated version from "0.0.8" to "0.0.9".
components/shopify_developer_app/sources/new-fulfillment-event/new-fulfillment-event.mjs, new-product-updated/*.mjs Updated version from "0.0.5" to "0.0.6".
components/shopify_developer_app/sources/new-order-fulfilled/new-order-fulfilled.mjs, new-refund-created/*.mjs Updated version from "0.0.4" to "0.0.5".

Possibly related PRs

Suggested labels

User submitted, ai-assisted

Suggested reviewers

  • michelle0927

Poem

I'm a rabbit with a cheerful heart,
Hopping on code changes fresh and bright.
Versions updated, constants in sight,
My whiskers twitch with pure delight.
Cheers to new code in every byte!
🐰✨

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

components/shopify_developer_app/sources/new-cancelled-order/new-cancelled-order.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

components/shopify_developer_app/sources/new-customer-created/new-customer-created.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

components/shopify_developer_app/sources/new-event-emitted/new-event-emitted.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

  • 11 others
✨ Finishing Touches
  • 📝 Generate Docstrings

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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 280ba45 and 989347a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is 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.mjs with 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"
fi

Length 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.

@andrewjschuang andrewjschuang merged commit 4d8499a into master Mar 4, 2025
11 checks passed
@andrewjschuang andrewjschuang deleted the shopify-fix-events-constants branch March 4, 2025 18:49
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