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

Refactor generate functions to a separate file #129

Merged
merged 3 commits into from
Jul 22, 2022

Conversation

cjbarth
Copy link
Collaborator

@cjbarth cjbarth commented Jul 22, 2022

In the spirit of #19, move some functions out of the very long saml.ts to another file without breaking class semantics. This will make it easier to land PRs with less chance of conflicts going forward.

@codecov
Copy link

codecov bot commented Jul 22, 2022

Codecov Report

Merging #129 (4582e8e) into master (4355f8f) will increase coverage by 0.31%.
The diff coverage is 70.58%.

@@            Coverage Diff             @@
##           master     #129      +/-   ##
==========================================
+ Coverage   80.19%   80.51%   +0.31%     
==========================================
  Files          11       12       +1     
  Lines         808      821      +13     
  Branches      243      243              
==========================================
+ Hits          648      661      +13     
  Misses         72       72              
  Partials       88       88              
Impacted Files Coverage Δ
src/saml/generate.ts 67.74% <67.74%> (ø)
src/metadata.ts 85.00% <100.00%> (ø)
src/saml.ts 80.69% <100.00%> (+2.69%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us.

@cjbarth cjbarth merged commit 20ceb86 into node-saml:master Jul 22, 2022
@cjbarth cjbarth deleted the generate-refactor branch July 22, 2022 18:41
@cjbarth cjbarth added the chore label Jul 23, 2022
@markstos
Copy link
Contributor

markstos commented Aug 4, 2022

If I'm reading this correctly, one key difference with #19, is that here the smaller file that's broken out still retains a this that refers to a SAML object, while #19 took a more aggressive approach by creating functions that have explicit inputs and outputs.

So while #19 prioritizes code that is easier to reason about, this PR takes a compromise approach of splitting up files which might help avoid conflicts. This PR also retains more internal API compatibility.

I'm going to follow-up more in #131.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants