From d29f319efa947f03b83493f4b949c0db7ff9ff07 Mon Sep 17 00:00:00 2001 From: Brian Tedder Date: Thu, 30 May 2024 15:14:26 -0500 Subject: [PATCH 1/4] (fix) loadV4 loader loads latest checkout.js --- server/meta.jsx | 2 +- server/meta.test.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/meta.jsx b/server/meta.jsx index 0e4ed4e4..8333f17a 100644 --- a/server/meta.jsx +++ b/server/meta.jsx @@ -356,7 +356,7 @@ export function unpackSDKMeta(sdkMeta?: string): SDKMeta { return; } - if (version === '4' || version === 'latest') { + if (version === 'latest' || version.charAt(0) === '4') { version = ''; } diff --git a/server/meta.test.js b/server/meta.test.js index 2e32da53..6e28436e 100644 --- a/server/meta.test.js +++ b/server/meta.test.js @@ -255,7 +255,7 @@ test("should construct a valid versioned script url with paypalobjects", () => { }); test("should construct a valid versioned minified script url with paypalobjects", () => { - const sdkUrl = "https://www.paypalobjects.com/api/checkout.4.0.125.min.js"; + const sdkUrl = "https://www.paypalobjects.com/api/checkout.min.js"; const { getSDKLoader } = unpackSDKMeta( Buffer.from( @@ -809,7 +809,7 @@ test("should construct a valid minified loader even when no url passed", () => { }); test("should construct a valid version loader even when no url passed", () => { - const sdkUrl = "https://www.paypalobjects.com/api/checkout.4.0.435.js"; + const sdkUrl = "https://www.paypalobjects.com/api/checkout.js"; const { getSDKLoader } = unpackSDKMeta(); From dac305030d703a790ec9a00eafd8619c4ec06144 Mon Sep 17 00:00:00 2001 From: Brian Tedder Date: Thu, 30 May 2024 15:23:50 -0500 Subject: [PATCH 2/4] revert unpackSDKMeta test --- server/meta.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/meta.test.js b/server/meta.test.js index 6e28436e..143cf72f 100644 --- a/server/meta.test.js +++ b/server/meta.test.js @@ -255,7 +255,7 @@ test("should construct a valid versioned script url with paypalobjects", () => { }); test("should construct a valid versioned minified script url with paypalobjects", () => { - const sdkUrl = "https://www.paypalobjects.com/api/checkout.min.js"; + const sdkUrl = "https://www.paypalobjects.com/api/checkout.4.0.125.min.js"; const { getSDKLoader } = unpackSDKMeta( Buffer.from( From 7d31cba090dc2a9daf59c9b0016aeaaea86c97d7 Mon Sep 17 00:00:00 2001 From: Brian Tedder Date: Thu, 30 May 2024 15:32:04 -0500 Subject: [PATCH 3/4] temporarily set alpha version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 03a0ec33..bc47cc54 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@paypal/sdk-client", - "version": "4.0.189", + "version": "4.0.188-alpha.1", "description": "Shared config between PayPal/Braintree.", "main": "index.js", "scripts": { From 50f56185476b592ba8fb2cb3d94e350496c55b1b Mon Sep 17 00:00:00 2001 From: Brian Tedder Date: Thu, 30 May 2024 15:37:53 -0500 Subject: [PATCH 4/4] correct alpha version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bc47cc54..f3fc5c05 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@paypal/sdk-client", - "version": "4.0.188-alpha.1", + "version": "4.0.190-alpha.0", "description": "Shared config between PayPal/Braintree.", "main": "index.js", "scripts": {