Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/api/stripe.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Stripe from "stripe";

const stripe = new Stripe(process.env.STRIPE_SECRET_KEY as string, {
apiVersion: "2025-10-29.clover",
apiVersion: "2025-09-30.clover",

Check failure on line 4 in app/api/stripe.ts

View workflow job for this annotation

GitHub Actions / test (20.x)

Type '"2025-09-30.clover"' is not assignable to type '"2025-10-29.clover"'.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Critical: TypeScript error indicates incomplete revert of Stripe package.

The pipeline is failing because the Stripe types expect "2025-10-29.clover" but the code uses "2025-09-30.clover". This suggests that while the API version string is being reverted, the Stripe npm package itself may not have been reverted to its pre-PR-#83 version.

Run the following script to verify whether the Stripe package version needs to be reverted:

If PR #83 updated the Stripe package, you'll need to revert that change in package.json as well and run npm install (or your package manager equivalent) to update the lock file.


🏁 Script executed:

#!/bin/bash
# Check the current Stripe package version and what versions are available
echo "Current Stripe package version:"
cat package.json | jq '.dependencies.stripe // .devDependencies.stripe'

echo -e "\nChecking git history for Stripe package changes in PR #83:"
git log --all --oneline --grep="issue-79" -- package.json

echo -e "\nShowing Stripe package changes in the commits being reverted:"
git show 324116c:package.json | jq '.dependencies.stripe // .devDependencies.stripe' 2>/dev/null || echo "Not found in 324116c"
git show 550fe8e:package.json | jq '.dependencies.stripe // .devDependencies.stripe' 2>/dev/null || echo "Not found in 550fe8e"
git show fb9c1e4:package.json | jq '.dependencies.stripe // .devDependencies.stripe' 2>/dev/null || echo "Not found in fb9c1e4"
git show f92b460:package.json | jq '.dependencies.stripe // .devDependencies.stripe' 2>/dev/null || echo "Not found in f92b460"
git show 7671911:package.json | jq '.dependencies.stripe // .devDependencies.stripe' 2>/dev/null || echo "Not found in 7671911"

Length of output: 214


Critical: Revert of Stripe package is incomplete—package.json still has the upgraded version.

PR #83 upgraded Stripe from ^19.1.0 to ^19.3.0, which introduced support for the "2025-10-29.clover" API version. While this PR reverts the API version string in app/api/stripe.ts to "2025-09-30.clover", the package.json still references Stripe ^19.3.0. This version mismatch causes the TypeScript error because the Stripe types no longer recognize the older API version.

Fix: Revert package.json to use Stripe ^19.1.0 and run npm install to update the lock file.

🧰 Tools
🪛 GitHub Actions: Run Tests

[error] 4-4: Type '"2025-09-30.clover"' is not assignable to type '"2025-10-29.clover"'.

🪛 GitHub Check: test (20.x)

[failure] 4-4:
Type '"2025-09-30.clover"' is not assignable to type '"2025-10-29.clover"'.

🤖 Prompt for AI Agents
In app/api/stripe.ts around line 4 the API version was reverted to
"2025-09-30.clover" but package.json still pins Stripe to ^19.3.0 which causes a
types mismatch; update package.json to revert the Stripe dependency to ^19.1.0
(matching the older API), then run npm install (or npm ci) to update the
lockfile and node_modules so TypeScript uses the correct Stripe types; verify
build/typecheck succeeds and commit the updated package.json and lockfile.

});

export { stripe };
7 changes: 4 additions & 3 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,12 @@ export default function Page() {
const { showPricing, handleClosePricing } = usePricingDialog(subscription);

const { isMigrating, migrate } = usePentestgptMigration();
const searchParams = typeof window !== "undefined" ? window.location.search : "";
const { initialSeats, initialPlan } = React.useMemo(() => {
if (typeof window === "undefined") {
if (!searchParams) {
return { initialSeats: 5, initialPlan: "monthly" as const };
}
const urlParams = new URLSearchParams(window.location.search);
const urlParams = new URLSearchParams(searchParams);
const urlSeats = urlParams.get("numSeats");
const urlPlan = urlParams.get("selectedPlan");

Expand All @@ -107,7 +108,7 @@ export default function Page() {
| "yearly";

return { initialSeats: seats, initialPlan: plan };
}, [typeof window !== "undefined" ? window.location.search : ""]);
}, [searchParams]);

return (
<>
Expand Down
Loading
Loading