Skip to content

refactor: utils #1682

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

Merged
merged 1 commit into from
Feb 25, 2019
Merged

refactor: utils #1682

merged 1 commit into from
Feb 25, 2019

Conversation

alexander-akait
Copy link
Member

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

For Bugs and Features; did you add new tests?

Motivation / Use-Case

Move utils to lib for better testing ans solve future problem when open/bonjure doesn't work without CLI

Breaking Changes

No

Additional Info

No

@codecov
Copy link

codecov bot commented Feb 22, 2019

Codecov Report

Merging #1682 into master will increase coverage by 4.55%.
The diff coverage is 87.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1682      +/-   ##
==========================================
+ Coverage   79.59%   84.14%   +4.55%     
==========================================
  Files           7        7              
  Lines         544      511      -33     
  Branches      165      155      -10     
==========================================
- Hits          433      430       -3     
+ Misses         84       64      -20     
+ Partials       27       17      -10
Impacted Files Coverage Δ
lib/utils/addEntries.js 100% <ø> (ø) ⬆️
lib/utils/createCertificate.js 100% <ø> (ø) ⬆️
lib/utils/createLogger.js 87.5% <ø> (ø) ⬆️
lib/utils/createDomain.js 100% <ø> (ø) ⬆️
lib/utils/defaultTo.js 100% <100%> (ø)
lib/utils/createConfig.js 95.06% <100%> (ø) ⬆️
lib/Server.js 79.94% <80%> (-0.22%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a2e5d12...4cefefb. Read the comment docs.

arrow-parens,
array-bracket-spacing,
space-before-function-paren
no-console
*/
Copy link
Member Author

Choose a reason for hiding this comment

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

Remove eslint comments around stylistics rules, we use prettier 👍

const createConfig = require('../lib/utils/createConfig');
const getVersions = require('../lib/utils/getVersions');
const runBonjour = require('../lib/utils/runBonjour');
const status = require('../lib/utils/status');
Copy link
Member Author

Choose a reason for hiding this comment

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

Move this to utils, we should testing their, let's do it in other PR

Copy link
Member

Choose a reason for hiding this comment

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

Thank you for separating to utils 🙏

if (!headerToCheck) headerToCheck = 'host';
if (!headerToCheck) {
headerToCheck = 'host';
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Add { and } to all construction (better reading), we should enforce this rule in eslint, let's do it in other PR

@alexander-akait
Copy link
Member Author

No changes, only refactor

@alexander-akait alexander-akait changed the title [WIP] refactor: utils refactor: utils Feb 22, 2019
@alexander-akait
Copy link
Member Author

/cc @hiroppy all works done, feel free to review

@hiroppy
Copy link
Member

hiroppy commented Feb 22, 2019

Copy link
Member

@hiroppy hiroppy left a comment

Choose a reason for hiding this comment

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

LGTM if CI is green

@alexander-akait alexander-akait merged commit 21687c3 into master Feb 25, 2019
@alexander-akait alexander-akait deleted the refactor-utils-to-lib branch February 25, 2019 09:38
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.

2 participants