Skip to content

refactor: reduce code complexity - #10120

Merged
sushantdhiman merged 1 commit into
sequelize:masterfrom
SimonSchick:chore/optimize-2
Nov 12, 2018
Merged

sushantdhiman merged 1 commit into
sequelize:masterfrom
SimonSchick:chore/optimize-2

Conversation

@SimonSchick

@SimonSchick SimonSchick commented Nov 4, 2018 •

Copy link
Copy Markdown
Contributor

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

codecov Bot commented Nov 4, 2018 •

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor Author

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

@sushantdhiman sushantdhiman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some changes otherwise LGTM

Comment thread lib/associations/belongs-to-many.js Resolved
Comment thread lib/associations/has-many.js Resolved
Comment thread package.json Resolved
@SimonSchick

Copy link
Copy Markdown
Contributor Author

done

@sushantdhiman
sushantdhiman merged commit c1ac543 into sequelize:master Nov 12, 2018
@sushantdhiman

Copy link
Copy Markdown
Contributor

Thanks @SimonSchick

@SimonSchick
SimonSchick deleted the chore/optimize-2 branch March 9, 2019 11:04
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