-
Notifications
You must be signed in to change notification settings - Fork 1
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
Code cleanup, expand README, fix some minor bugs #20
Conversation
- Upgraded __get_request to match __write_data better and have less redundant code - Fixed __write_data overwriting keys sometimes - Failed GET requests now reject directly - added collectionName to typescript - return TypeErrors more consistently
mostly ternary hell, ridiculous indentation, and string concatenation
not future proof
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For real, what's the point of modifying my code, you're just modifying code to modify code.
It's useless, and you removed my sec
function. Why, I don't know, but if I made it, it's so that I can modify the content later if needed
I'm just trying to make the code cleaner, it was really inconsistent before and most of the changes are simply running a formatter and linter. |
also improve tests substantially
(from changelog, make sure to add the release number and date when this gets merged)
Added
Collection.collectionName
as a readonly property for TypeScript usage.array-splice
edit fields.array-contains-none
option for array fields.JSONDatabase
PHP class to reduce repetitive code.original
option forreadRaw
to not insert ID fields, for easier non-relational collection usage.Changed
TypeError
s instead of regularError
s.firestorm.table(name)
method, sincefirestorm.collection(name)
does exactly the same thing.editField
andeditFieldBulk
now return confirmations like all other write methods.editField
andeditFieldBulk
now reject with a descriptive error message on failure rather than silently failing.Fixed
Collection.searchKeys
andCollection.values
not returning properError
objects sometimes.files.upload
not allowing theform-data
package's typing ofFormData
in TypeScript.Collection
class being exported in TypeScript despite the actual class being private.array-splice
edit fields being incorrectly typed asarray-slice
.Collection.remove
rejecting numeric keys, despiteCollection.removeBulk
not doing so.editField
andeditFieldBulk
validation issues.