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

Prefer ES6 classes to prototypical inheritance #316

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

cjbarth
Copy link
Contributor

@cjbarth cjbarth commented Jun 17, 2023

No description provided.

@codecov
Copy link

codecov bot commented Jun 17, 2023

Codecov Report

Merging #316 (c00ba2e) into master (78329fb) will decrease coverage by 1.07%.
The diff coverage is 83.01%.

@@            Coverage Diff             @@
##           master     #316      +/-   ##
==========================================
- Coverage   82.74%   81.67%   -1.07%     
==========================================
  Files           5        5              
  Lines         875      824      -51     
==========================================
- Hits          724      673      -51     
  Misses        151      151              
Impacted Files Coverage Δ
lib/c14n-canonicalization.js 64.65% <64.03%> (-3.32%) ⬇️
lib/exclusive-canonicalization.js 85.48% <85.24%> (-1.29%) ⬇️
lib/signed-xml.js 82.55% <87.56%> (-0.81%) ⬇️
lib/enveloped-signature.js 95.00% <94.44%> (-0.46%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cjbarth cjbarth marked this pull request as ready for review June 18, 2023 11:39
@cjbarth
Copy link
Contributor Author

cjbarth commented Jun 18, 2023

It appears that GitHub's diff tool is really bad in this case. If you pull the branch and use another tool it should be much easier to see that all that was done was to convert from prototypical inheritance to ES6 classes. This will greatly aid in adding to and updating index.d.ts and @typedef JSDoc directives. It also makes clear which parts belong to the class and which don't. I foresee breaking up signed-xml.js into multiple files so that we only have one class per file in a future PR.

@cjbarth cjbarth requested a review from LoneRifle June 18, 2023 11:43
Copy link
Collaborator

@LoneRifle LoneRifle left a comment

Choose a reason for hiding this comment

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

lgtm. for future reference, experiment with unified/split views and hiding whitespace if the PR diff appears mangled, especially if it is known that the changes are mostly mechanical

@cjbarth
Copy link
Contributor Author

cjbarth commented Jun 21, 2023

@LoneRifle , that is a good tip. Hiding whitespace and turning off annotations shows how simple this PR really is. Thanks!

@cjbarth cjbarth merged commit 41502e9 into node-saml:master Jun 21, 2023
@cjbarth cjbarth deleted the use-classes branch June 21, 2023 12:40
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.

2 participants