Skip to content
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

v2.0.0-rc.0 - Edge runtime support and more. #45

Merged
merged 9 commits into from
Sep 26, 2024
Merged

Conversation

vijayasingam-paddle
Copy link
Contributor

@vijayasingam-paddle vijayasingam-paddle commented Sep 25, 2024

2.0.0-rc.0 - 2024-09-26

Breaking changes: This version includes major improvements that introduce breaking changes. These are called out below.

Added

  • Added support for edge runtime.

Changed

  • Breaking change: Updated the minimum required Node.js version to v18.
  • Breaking change: WebhooksValidator.isValidSignature now returns a promise.
  • Enabled conditional exports based on runtimes.
  • Switched from node-fetch to native fetch API.

@@ -4,9 +4,9 @@
* Changes may be overwritten as part of auto-generation.
*/

import { type ISubscriptionPreviewResponse, ISubscriptionResponse } from '../../../types';

Choose a reason for hiding this comment

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

You can't do type imports in deno then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think this is a deno runtime requirenent. There is a lint rule which preferred adding type keyword if they were types.

Somehow it stopped adding it now 🤷

false,
],
[
'InValid timestamp',

Choose a reason for hiding this comment

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

Spelling if you're worried about that sort of thing in a test 😄

});
EdgeRuntime.initialize();
});
test.each([
Copy link

@samcolby samcolby Sep 26, 2024

Choose a reason for hiding this comment

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

Absolutely not a blocker. I find this so much easier to read and you get proper types for the test cases too

https://github.com/PaddleHQ/dashboard/blob/1afca98e5c8b782f41ca1b490bae5eefde8a67b7/apps/one-dashboard/src/utils/abs-money.test.ts#L3

byteHexMapping[i] = i.toString(16).padStart(2, '0');
}

export class EdgeCrypto implements CryptoProvider {

Choose a reason for hiding this comment

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

Do you have any tests for this?

Choose a reason for hiding this comment

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

Specifically the computeHmac function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we do have a test to assert it is generating correct HMAC here

CHANGELOG.md Outdated
- Added support for Bun, deno and edge runtimes.
- Added support for edge runtime.

Choose a reason for hiding this comment

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

Did you mean to remove deno from here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, I need to run some more tests before marking it as fully supported.

samcolby
samcolby previously approved these changes Sep 26, 2024
Copy link

@samcolby samcolby left a comment

Choose a reason for hiding this comment

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

🔥

@vijayasingam-paddle vijayasingam-paddle marked this pull request as ready for review September 26, 2024 08:47
@vijayasingam-paddle vijayasingam-paddle requested a review from a team as a code owner September 26, 2024 08:47
mikeymike
mikeymike previously approved these changes Sep 26, 2024
@vijayasingam-paddle vijayasingam-paddle changed the title v2.0.0-beta.0 - Edge runtime support and more. v2.0.0-rc.0 - Edge runtime support and more. Sep 26, 2024
@vijayasingam-paddle vijayasingam-paddle merged commit 0f73f54 into main Sep 26, 2024
6 checks passed
@vijayasingam-paddle vijayasingam-paddle deleted the v2_beta branch September 26, 2024 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants