Commit Graph
18 Commits
Author SHA1 Message Date
Paul Beusterien eabe8d46a0 Update and apply swiftformat fix (#6239) 2020-08-09 14:48:00 -07:00
Paul Beusterien 202df4134d Update swiftformat and control its version via mint (#6229) 2020-08-07 17:05:17 -07:00
Paul Beusterien 01bf549253 Update formatters (#5933) 2020-06-26 14:34:27 -07:00
Lorenzo Fiamingo 9f17a76e82 Spelling error in FirestoreDecodingError (#5520) 2020-05-12 13:53:48 -07:00
Paul Beusterien b90ddf1339 Limit Swift line lengths to 100 (#5315) 2020-04-08 10:48:24 -07:00
Paul Beusterien 69f9a45de6 Update swiftformat to 0.44.6 (#5263) 2020-04-02 08:40:25 -07:00
Gil c17e1dfad8 Permanently fix formatting presubmit warnings in google3 (#4527) 2019-12-18 13:27:45 -08:00
Gil 539ff07fd1 Avoid references to DocumentIDProtocol in Swift < 5.1 (#4092) 2019-10-16 11:41:50 -07:00
Gil 53e91860e0 Rewrite SelfDocumentID as a property wrapper (#4031)
* Rewrite SelfDocumentID as a property wrapper

Make wrapped types conform to DocumentReferenceConvertible and use that
protocol to implement the conversion.

* Change DocumentReferenceConvertible to DocumentIDWrappable

* Make ServerTimestampWrappable use static functions

Use the same form as DocumentIDWrappable.

* Update extension String: ServerTimestampWrappable

* Use #if compiler, not #if swift

The FirebaseFirestoreSwift module is declared as conforming to Swift
4.0 so #if swift is still false, even when compiling with Swift 5.1.
Using #if compiler will see the actual compiler version. Property
wrappers don't depend on runtime features, so this works.

Also, allow Wrappable protocols to throw during conversions.
2019-10-15 12:59:36 -07:00
Gil 847d72759d Fix formatting that was somehow ignored (#4002)
* Fix formatting that somehow was ignored.

* Minor tweaks to style.sh

... reflecting updated source layout.
2019-10-07 09:10:47 -07:00
Gil 228537cb66 Provide better error messages when encoding is not available (#3953)
* Rewrite FirestoreEncoderTests using assertThat

* Throw invalidValue for use of invalid top-level values

* Provide an message for not supported errors
2019-10-01 10:04:52 -07:00
wu-hui b45bd79ec3 Add @DocumentId equivalent to Swift Codable (#3762)
* Commit with failed optional test case.

* Integration Test and cleanup

* swiftformat

* better doc formatting

* addressing comments

* rename to SelfDocumentID

* Addressing Comments

* fix comment
2019-09-26 12:02:04 -07:00
Hui-Wu d709b9f2b5 Allow firestore api to work with Codable objects + ExplicitNull + Integration tests (#3261)
* Convinience api for codables

* Integration Tests

* ExplicitNull implementation
2019-09-26 12:02:04 -07:00
Morgan Chen 390966620a Fix token fetch not invoking callback for unchanged token (#3251) 2019-09-26 12:02:04 -07:00
Hui-Wu 34023c30ea FieldValue and DocumentReference codable support. (#3231)
* working serverTimestamp

* working FieldValue. Still need: document ref and ability to Eq of FieldValue

* DocumentReference implemented and testing works

* clean up header search path

* improving FieldValue enum comments

* run through formatting

* addressing comments

* formatted with swiftformat 0.35.7

* add missing bool->BOOL change

* undo unintended swift version change

* remove unwanted proj file change
2019-09-26 12:02:03 -07:00
Hui-Wu 5fdfc9d413 Firestore swift Codable support (#3198)
FirestoreEncoder/Decoder and Timestamp/GeoPoint codable support.
2019-09-26 12:02:03 -07:00
Marek Gilbert f7d26168ca Rename JSONEncoder; prep for split 2019-09-26 12:02:03 -07:00
Gil 2bf7542573 Pristine copy of JSONEncoder.swift (#3794)
From
https://github.com/apple/swift/commit/3391b746d9fb36d7bbf428bdc3f5f69e2bb9ac6f
pulled with the tag swift-DEVELOPMENT-SNAPSHOT-2019-09-04-a.
2019-09-26 11:03:05 -07:00