fix: fix invalid ts import style of lib/operators#13797
Merged
WikiRik merged 2 commits intosequelize:mainfrom Dec 20, 2021
ephys:fix/issue-13791-again
Merged
fix: fix invalid ts import style of lib/operators#13797WikiRik merged 2 commits intosequelize:mainfrom ephys:fix/issue-13791-again
WikiRik merged 2 commits intosequelize:mainfrom
ephys:fix/issue-13791-again
Conversation
WikiRik
previously approved these changes
Dec 20, 2021
Member
WikiRik
left a comment
There was a problem hiding this comment.
Looks good, I did make a suggested change but it's inconsistent throughout the files either way si just see what you do with it
Member
Author
|
I don't think the failed test is related to this PR. Very strange. Can we try relaunching that test? Edit: yep, passed now :) |
Co-authored-by: Rik Smale <[email protected]>
WikiRik
approved these changes
Dec 20, 2021
Member
Member
|
v6.12.1 is on it's way in this very moment :) |
Member
Author
|
🤞 |
Contributor
|
🎉 This PR is included in version 6.12.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
4 tasks
aliatsis
pushed a commit
to creditiq/sequelize
that referenced
this pull request
Jun 2, 2022
* fix: fix invalid ts import style of lib/operators * refactor: align types/index.d.ts Co-authored-by: Rik Smale <[email protected]> Co-authored-by: Rik Smale <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
Please make sure to review and check all of these items:
npm run testornpm run test-DIALECTpass with this change (including linting)?Description Of Change
Replacement PR of #13796
Attempt to fix #13791
There was an issue in PR #13731 where
Opwas exported usingexport =but was imported usingimport Op from './operator'which is not compatible (source https://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require).This is a simple fix that changes the imports back to
import Op = require('./lib/operators')syntax.This one does not include any lint correction either as types/* is not linted and will be removed anyway (#13796 (comment))
Concerns
Things I noticed while working on this PR. Putting them here to decide between fixing them here or opening an issue.
Avoiding breaking changes
As talked about in #13796, we should stick to this import/export syntax in v6 to avoid breaking changes.
We can revisit this in v7.
Two operators.ts definitions
index.d.tsimports'../lib/operators'which points tosequelize/lib/operators.tsinstead ofsequelize/dist/lib/operators.d.ts.This could be a problem.
A potential solution to import /lib from /types would be to change the import from
../lib/operatorstosequelize/lib/operators.