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: reduce code complexity #10120

Merged
merged 1 commit into from Nov 12, 2018

Conversation

@SimonSchick
Copy link
Member

@SimonSchick SimonSchick commented Nov 4, 2018

Pull Request check-list

Please make sure to review and check all of these items:

  • Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Have you added new tests to prevent regressions?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Did you follow the commit message conventions explained in CONTRIBUTING.md?

Description of change

  • Cleanups remaining else (if)'s with linter help.
  • Fixed various lint warnings and made them errors so they don't come back
  • Removed some dead node 0.10.x support snippet
  • Replace .npmignore with files in package.json and exclude all redundant files for use.

On another note, is there a reason you call Error.captureStackTrace(this, this.constructor); on all error errors?
Are you doing to to prevent it from capturing the first stack frame?

This will be my last code cleanup PR until v5 is out.

@codecov
Copy link

@codecov codecov bot commented Nov 4, 2018

Codecov Report

Merging #10120 into master will increase coverage by 0.01%.
The diff coverage is 86.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10120      +/-   ##
==========================================
+ Coverage   96.33%   96.35%   +0.01%     
==========================================
  Files          63       63              
  Lines        9431     9426       -5     
==========================================
- Hits         9085     9082       -3     
+ Misses        346      344       -2
Impacted Files Coverage Δ
lib/associations/belongs-to-many.js 97.68% <0%> (+0.64%) ⬆️
lib/query-interface.js 89.56% <0%> (ø) ⬆️
lib/dialects/abstract/connection-manager.js 90% <100%> (ø) ⬆️
lib/dialects/mssql/query-generator.js 95.83% <100%> (ø) ⬆️
lib/associations/has-many.js 97.64% <100%> (-0.03%) ⬇️
lib/dialects/sqlite/query-interface.js 100% <100%> (ø) ⬆️
lib/utils/validator-extras.js 97.56% <100%> (ø) ⬆️
lib/dialects/sqlite/query.js 98.75% <100%> (ø) ⬆️
lib/sql-string.js 91.17% <100%> (ø) ⬆️
...dialects/abstract/query-generator/helpers/quote.js 94.44% <100%> (ø) ⬆️
... and 14 more

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 b896ba4...76231aa. Read the comment docs.

@SimonSchick SimonSchick force-pushed the SimonSchick:chore/optimize-2 branch from e2e0741 to 4769e12 Nov 4, 2018
@SimonSchick
Copy link
Member Author

@SimonSchick SimonSchick commented Nov 7, 2018

Hey @sushantdhiman you think we can get my last 2 PRs in before v5 goes live? :)

Copy link
Contributor

@sushantdhiman sushantdhiman left a comment

Some changes otherwise LGTM

lib/associations/belongs-to-many.js Outdated Show resolved Hide resolved
lib/associations/has-many.js Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
@SimonSchick SimonSchick force-pushed the SimonSchick:chore/optimize-2 branch from 4769e12 to 76231aa Nov 12, 2018
@SimonSchick
Copy link
Member Author

@SimonSchick SimonSchick commented Nov 12, 2018

done

@sushantdhiman sushantdhiman merged commit c1ac543 into sequelize:master Nov 12, 2018
3 of 4 checks passed
3 of 4 checks passed
codecov/patch 86.72% of diff hit (target 96.33%)
Details
codecov/project 96.35% (+0.01%) compared to b896ba4
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@sushantdhiman
Copy link
Contributor

@sushantdhiman sushantdhiman commented Nov 12, 2018

Thanks @SimonSchick

@SimonSchick SimonSchick deleted the SimonSchick:chore/optimize-2 branch Mar 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants