def get_different_packages(
    old_package_json_content: PackageJson,
    new_package_json_content: PackageJson,
) -> tuple[Change, Change]:
    """Get the packages that are different between two package JSON contents.

    Args:
        old_package_json_content: The content of the old package JSON.
        new_package_json_content: The content of the new package JSON.

    Returns:
        A tuple containing two `Change` named tuples:
        - The first `Change` contains the changes in the `dependencies` section.
        - The second `Change` contains the changes in the `devDependencies` section.
    """

    def get_changes(old: dict[str, str], new: dict[str, str]) -> Change:
        """Get the changes between two dictionaries.

        Args:
            old: The old dictionary of packages.
            new: The new dictionary of packages.

        Returns:
            A `Change` named tuple containing the added and removed packages.
        """
        old_keys = set(old.keys())
        new_keys = set(new.keys())
        added = new_keys - old_keys
        removed = old_keys - new_keys
        return Change(added=added, removed=removed)

    dependencies_change = get_changes(
        old_package_json_content.get("dependencies", {}),
        new_package_json_content.get("dependencies", {}),
    )
    dev_dependencies_change = get_changes(
        old_package_json_content.get("devDependencies", {}),
        new_package_json_content.get("devDependencies", {}),
    )

    return dependencies_change, dev_dependencies_change
Get the packages that are different between two package JSON contents.

    Args:
        old_package_json_content: The content of the old package JSON.
        new_package_json_content: The content of the new package JSON.

    Returns:
        A tuple containing two `Change` named tuples:
        - The first `Change` contains the changes in the `dependencies` section.
        - The second `Change` contains the changes in the `devDependencies` section.
    
reflex/utils/exec.py