Skip to content

Conversation

@MichaelCombs28
Copy link
Member

Accept Pangea token type in service constructors. Type must be 'pangea_token' or a raw string.

Accept Pangea token type in service constructors. Type must be
'pangea_token' or a raw string.
@MichaelCombs28 MichaelCombs28 requested a review from a team as a code owner July 29, 2024 21:25
@kenany
Copy link
Member

kenany commented Jul 29, 2024

Add a release note to packages/pangea-node-sdk/CHANGELOG.md too.

Copy link
Contributor

@pangea-andrest pangea-andrest left a comment

Choose a reason for hiding this comment

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

Just one minor comment but approved anyway


this.serviceName = serviceName;
this.token = token;
if (typeof token === "string") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't be better to move this whole logic into a function?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's only used here, we can break it out later if more use comes. I'm not a fan of early abstraction, generally abstract only a rule of 3.

@MichaelCombs28 MichaelCombs28 merged commit 2e8f717 into main Jul 30, 2024
@MichaelCombs28 MichaelCombs28 deleted the PAN-15926 branch July 30, 2024 20:05
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.

5 participants