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

Added typescript lib interface + Airbnb Eslint addition and fixes #64

Merged
merged 18 commits into from
Jun 5, 2020

Conversation

omarryhan
Copy link
Collaborator

  • Added Typescript lib interface (index.d.ts)
  • Added Airbnb Eslint configs and recommendations.
  • Auto fixed many lint errors
  • Removed NodeJS v8 testing from Travis
  • Added instructions for testing
  • Tests now require a password when running locally (While still the same when running on Travis) I did that because both dbs refused to connect locally without a password
  • Auto lint both examples
  • Moved many functions out of the lib's main closure, to make the code more clear and enforce the purity of these functions. Only the Store class is what remains in the closure (Because it requires the session object)
  • Added knex to main dependencies instead of dev dependencies.

Please squash my commits when merging, because some commits were more or less reverted and will confuse whoever looks back at them.

@omarryhan omarryhan changed the title Added typescript lib interface + Airbnb Eslint addtion and fixes Added typescript lib interface + Airbnb Eslint addition and fixes May 16, 2020
@omarryhan
Copy link
Collaborator Author

Also, I think we should create a src folder and split index.js into more than one file because it's a bit confusing with all the functions there. I thought it would be best to wait until you review this already big PR.

@gx0r gx0r merged commit 590bf98 into gx0r:master Jun 5, 2020
@gx0r
Copy link
Owner

gx0r commented Jun 5, 2020

@omarryhan well done.

@gx0r
Copy link
Owner

gx0r commented Jun 5, 2020

@omarryhan sorry I didn't seen your MR sooner. notifications can get rather cluttered on github :(

@omarryhan
Copy link
Collaborator Author

It's alright :)

@omarryhan
Copy link
Collaborator Author

Hey @llambda ,

Sorry to bother you again. Turns out there was a bug in this PR. Someone made a PR with a fix here. I merged it, then pushed a couple of other code organization chores and we're ready for a new release. Just thought I'd notify you with a ping, in case the notification didn't reach you.

@gx0r
Copy link
Owner

gx0r commented Jun 6, 2020

Many thanks !!

gx0r pushed a commit that referenced this pull request Jan 15, 2021
* Added TS support

* Added eslint

* added knex to prod dependencies instead of dev

* Removed unnecessary function input

* Fixed lint errors

* Fixed error where a bitwise operator was used instead of standard or

* Fixed lint errors in test.js
Returned KnexStore construction inside the lib's init function, because it must be dynamically created with the session object provided by user

* Added testing instructions to README

* Removed node v8 from Travis.yml

* Fixed an ignored minor lint error: Favor global import

* Fixed lint errors in example.js

* Running tests locally with passwords, because both MySQL and Postgres refuse all connections without a password
Travis should still work without db passwords, should just add ON_TRAVIS=1 in Travis's env

* Reverted some of my silly changes in index.js
Fixed lint errors in some of example-postgres.js

* Fixed the rest of the lint errors in example-postgres.js

* Fixed some ignored lint errors

* Eslint ignored index.d.ts

* Fixed bug in index.d.ts where I forgot to add new to an interface

* Added travis env variable that signals to tests that it's in fact running in Travis
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