All Versions
11
Latest Version
1.6
Avg Release Cycle
103 days
Latest Release
1606 days ago

Changelog History
Page 1

  • v1.6 Changes

    January 07, 2020

    ⚑️ Updates

    General

    Nested object definitions.

    πŸ‘ Previously it was required to create a new file for each schema. Now we support declaring types within types which can be useful for ones that only make sense in a certain scope or are fairly minimal.

    Example schema declaration:

    { "some\_property" : { "type": "object", "title": "nested", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } } }
    

    JSON dependency graph output

    0️⃣ The behavior of the --print_deps output has changed to be JSON by default. This allows for tooling to be built to visualize or analyze dependency graph of your schemas.

    Given this command using our example schemas:

    plank --print\_deps Examples/PDK/pin.json 
    

    You'll get an output with it's dependencies and any inherited types (via extends keyword)

    { "pin" : ["image", "board", "user"] }
    

    CI

    πŸ— We've migrated our CI entirely to Github Actions which will make it easier for contributors to analyze logs and build failures.

    Objective-C

    • πŸ–¨ Optimizations around memory footprint of properties
    • ⚑️ Test updates for equality methods

    Java

    • βœ‚ Removed AutoValue as a dependency
    • πŸ‘Œ Support for tracking properties which are set
    • πŸ‘ ADT, equality and nullability support
    • TypeAdapters derived from Schema definitions

    πŸ”„ Changes

    πŸ“š 8ee84c2 Mention nested object types in the documentation (#258)
    πŸ‘ 2346a29 Support nested object type definitions (#256)
    85e802f Mark generated files using 'linguist-generated' (#257)
    🚚 e4e5e72 Remove trailing space after integer-based enums (#255)
    9e5c65f Missing @SerializedName annotation on integer-based enums (#253)
    fbcd34f Convert deps command output to produce JSON (#252)
    c232819 Java model potentially missing import for types contained in maps and lists (#251)
    ⬆️ 921c98f Upgrade swiftformat and swiftlint (#250)
    979e358 Java ADT partial implementation (#249)
    πŸ‘· 41c25a8 Migrate CI to Github CI/CD (#239)
    πŸ”§ eeb4918 Support configurable URI types for Java (#245)
    🌲 618acaa Optionally log unknown properties in TypeAdapter.read (#243)
    9d367a5 Java equals() should evaluate primitives first (#244)
    a27b144 Check _bits directly in internal calls (#242)
    f650f01 Order modifiers according to the Java spec (#241)
    42a168b Make generated TypeAdapter classes private (#240)
    690a266 Only allocate _bits when necessary (#238)
    55b0a25 Use transitiveProperties to gather Java imports (#237)
    fa2e15e Only import the necessary set of types (#235)
    920dcee Stop importing java.lang.annotation.Retention{Policy} (#234)
    01cf3e9 Stop importing com.google.gson.JsonElement (#233)
    6253078 Add the Plank project URL to the file comment header (#232)
    4c794b2 Java model property annotations should be sorted deterministically (#231)
    bf771de Java model TypeAdapter write method should not use delegateAdapter. (#227)
    730f8e1 Add more nullability annotations to Java models (#228)
    f683102 Java model TypeAdapter should not not instantiate its inner TypeAdapters until needed (#226)
    102d645 Java models should not include null fields when serialized into Json (#225)
    πŸ— faadfa9 Java Model Builder.build method should be annotated with NonNull (#223)
    7b054be Java model - _bits field should be deserialized if it's present in the JSON (#221)
    bc8c8fd Java Model Decorators (beta) (#217)
    πŸ— 738fb3e Builder property variables should not have @SerializedName annotation (#220)
    d4a714d Emit BOOL properties as bitfields (#208)
    βœ… 47fb542 Add equality tests for ObjC (#219)
    πŸ”€ c7fe044 Missing call to set tracking isSet-bit in Java model merging (#218)
    d3c6322 Use smaller enum types to reduce object sizes. (#207)
    πŸ›  ef88906 Use a boolean[] array for tracking set-bits so we can accommodate models with more than 32 fields (fixes integer overflow) (#216)
    32f2fe5 Add option to generate Java private setters (#212)
    πŸ— 8d23c9b Fix invalid call to Builder-setter from Java TypeAdapter (#211)
    πŸ‘ 427edd4 Add support for androidx Nullability annotations (#204)
    f368cd1 Add a static TYPE variable to java models (#201)
    ⚑️ bdd00b0 Toolchain updates (#196)
    🚚 a8e91d3 Remove local shadow variable self.properties should be used for clarity. (#202)
    a2d1022 Fix archive command to work also with Swift 5 (#200)
    d467436 Avoid use of reflection-based deserialization in Java model (#194)
    πŸ‘• 02d18ba Add linter for making sure linux main is kept up to date (#192)
    5e5ed22 Don't use ObjectiveC-based handling of reserved keywords for Java (#187)
    2dd9ed8 Add missing check for null json token (#188)
    06925b8 Use standard Java enum types for enum properties (#184)
    e63f15c For Boolean, Double and Integer properties, getters should be NonNull (#178)
    πŸ— efe3c84 Build Java sources during integration tests (#176)
    47ad603 Add custom TypeAdapter for Java models that will allow for setting _bits field (#177)
    f38aa84 Fix missing comma in Java model constructor (#175)
    ⚑️ 3cb4722 Update docs to reflect that plank is for more than Objective-C (#173)
    🚚 7d17623 Remove AutoValue from Java generated models (#159)
    ⚑️ 4372837 Update variable name substitution logic (#157)
    πŸ‘· fd4dea5 Remove unused CI directory
    πŸ‘• 1d44870 Add swiftlint / swiftformat in Package.swift, fix issues (#168)

  • v1.5 Changes

    February 27, 2019

    πŸš€ This release contains a lot of internal cleanup as well as new functionality.

    ⚑️ Updates

    Objective-C

    βž• Added isSet methods for each property which will allow callers to differentiate if a property has been set:
    This is useful for differentiating:

    • 0️⃣ Default values for primitive types (i.e. int properties will still be 0 if not set)
    • nil values for reference types (i.e. pointers to objects are nil if not set)

    Bazel

    πŸŽ‰ Initial support for building plank and integrating it within your local bazel project.

    First add plank to your WORKSPACE file

    git\_repository( name = "plank", remote = "https://github.com/pinterest/plank.git", tag = "1.5")
    

    Then you can run plank using:
    bazel run @plank//:plank -- [YOUR ARGS HERE]

    Java (alpha)

    • πŸŽ‰ Initial support is available and depends on AutoValue and GSON. AutoValue is likely to be removed soon as a requirement.
    • πŸ‘ Java support is in active development and breaking changes are likely
    • Audience is focused on Android development which could influence some of the design decisions / dependencies

    πŸ”„ Changes

    eaaccea [Objective-C] Option for adding abilities to tell if a method is set.
    fa1a00d [Objective-C] Fix issues that cause unstable output (#160)
    ⚑️ bec7ec9 Update WORKSPACE to latest rules_swift dependencies (#163)
    πŸ‘• e041f8e Enable Swiftlint for PRs (#154)
    ⚑️ 27f2219 Update README.md
    πŸ‘· ce0dbea Migrate Plank to Travis CI (#152)
    71a3a5c Fix typo (#146)
    ⚑️ c387215 Update bazel build to use rules_swift
    πŸ”¨ 7328fa0 Refactor version number to use a struct (#145)
    8053ab1 Add version to CLI (#144)
    87197a3 Add flag to avoid runtime files from getting generated (#137)
    9439de7 Fix nil-checking issue in dictionary representation (#135)
    ⚑️ 0c2bf4e Update to Swift 4.1, fix inheritance issue with equality (#133)
    ⚑️ 42838c3 Update Java enum rendering to avoid collisions when multiple enums are (#130)
    🚚 db6c647 Use fancy string enums and remove unused runtime function (#128)
    🐧 6eb769b Fix linux build (#127)
    πŸ“š 153ebe7 Use @NonNull for nonnull Java properties. Add nullability to documentation
    πŸ“š 1b4641c Add initial Java documentation
    7a0b6aa Separate CLI reference into its own page
    56097d2 Add flow documenation overview
    πŸ‘ a86117d Initial support for Java (#106)

  • v1.4.1 Changes

    March 09, 2018

    Overview

    πŸš€ This release contains additional fixes to the generation of dictionaryObjectRepresentation for cases where you have model schema with nested collections (lists within lists, maps within maps, lists within maps, ...).

    πŸ”„ Changes

    a5e132e Fix issues with nested collections in dictionaryObjectRepresentation (#126)

  • v1.4 Changes

    March 05, 2018

    βž• Additions

    • Objective-C models can now render themselves to Dictionaries
      πŸ‘ This was previously supported but had a number of edge cases where issues were present. We have now addressed those issues and we are ready to support this capability.
    • βœ… A foundation for writing more integration tests between Objective-C and Flow bridging. This can be helpful if you share schemas between them.
    • βœ… Generated ObjC models test coverage has improved for testing initialization and dictionary representation. We will continue this trend for other capabilities.

    πŸ”„ Changes

    βœ… aa069d2 Add basic Objective-C and JS bridging test (#124)
    πŸ— f09ae27 Fix Docker builds (#125)
    βͺ fe78418 Restore dictionaryObjectRepresentation for Objective-C (#122)

  • v1.3 Changes

    February 14, 2018

    πŸš€ Whats in this release?

    πŸ’₯ Breaking changes

    For Objective-C, an enum type will no longer have "Type" added to it's name. This introduced issues (#119) and was inconsistent with the logic we use for Flow.

    Previous behavior:
    A enum property some_prop on a type Foo would generate a enum named FooSomePropType

    πŸ†• New behavior:
    A enum property some_prop on a type Foo will generate a enum named FooSomeProp

    ⚑️ If you are currently using Enums you'll likely need to update references to these types in your code base but the functionality remains the same. In the future we'll strive to keep these naming strategies consistent between languages.

    πŸ›  Notable bug fixes

    • πŸ‘Œ Improve the nullability support for Objective-C
    • πŸ›  Fix the ordering of properties during generation to ensure we don't have variance in our generation.

    πŸ”„ Changes

    991a465 Align naming logic between Flow and ObjC for enums. Fix naming collis… (#120)
    f8f7c17 Correct extends field example (#117)
    πŸ›  a8d8676 Fixed missing "" (#118)
    ⚑️ 0e2668c Update README.md (#114)
    πŸ— 47fdfdd Builder setter should consider copy memoryAssignmentType (#113)
    bcc7bef Enumeration of schema properties should occur in a specific order to ensure a (#110)
    ⚑️ df1e444 Update homebrew installation instructions

  • v1.2.1 Changes

    January 17, 2018

    Summary

    • βž• Added make install to Makefile. Use PREFIX to specify a different installation path than /usr/local

    Basic Usage:

    make install
    

    Usage with custom installation path:

    make install PREFIX=/usr/local/Cellar/plank/1.2.1
    
    • βž• Address issues identified by SwiftLint
    • βž• Add documentation for Set type

    Commits

    56012d6 Add make install target to Makefile (#109)
    πŸ‘• 4c3f228 Add autocorrect step to Swiftlint (#107)
    πŸ“„ 3bdc34f Add Set to docs on property fields (#105)

  • v1.2 Changes

    December 15, 2017

    πŸš€ In this release:

    • πŸ‘Œ Support NSSet for Objective-C, Flow
    • ⚑️ Updates to nullability, equality and memory assignment for ObjC
    • πŸ›  Fix archiving to disable sandboxing and homebrew installation
    • πŸ“š Update documentation

    Commits -

    801d97e Use copy for NSURL and NSDate
    πŸ— 4bdf16d Build archives with sandboxing disabled to allow homebrew installations (#102)
    ⚑️ 386c378 Update the .PHONY target list (#98)
    πŸ‘• 5612063 Address lint warnings under swiftlint 0.24.0 (#99)
    6bd7921 Don't generate dictionary representation until we can verify it compiles (#96)
    b870223 Correct integer example (#95)
    91d26a0 Rename dictionaryRepresentation method so it doesn't conflict with Foundation's one (#94)
    🚚 56a6d99 Removes usage of deprecated characters from String (#93)
    πŸ‘ d480449 Added support for NSSet properties (#91)
    ⚑️ 4de2627 Update ObjC builder extension to be aware of nullability of properties (#88)
    🚚 8d84d74 Remove default case that will never be executed (#87)
    ad1aed3 Fix issue with generating the dictionaryRepresentation method for schemas that (#85)
    c5ed50a Expand list of reserved objc keywords to cover most conflicting case (#79)
    3fc1bea Fix make clean command(#65)
    6399daf ObjectiveCDictionaryExtension to correctly handle maps of root objects (#81)
    9bc92b3 Compare NSArrays using -isEqualToArray: (#83)
    ⚑️ c855031 Update indentation settings in plank.xcodeproj (#82)
    πŸ— f8378f6 Objective-C init extension to better handle null model dictionary in prod builds (#80)
    πŸ— 92c9a3f Bazel build support for Plank (#75)

  • v1.1 Changes

    August 17, 2017

    πŸ”– Version 1.1

    πŸ†• New CLI options

        --print_deps - Just print the path to the dependent schemas necessary to generate the schemas provided and exit.
        --no_recursive - Don't generate files recursively. Only generate the one file I ask for.
        --only_runtime - Only generate runtime files and exit.
        --lang - Comma separated list of target language(s) for generating code. Default: "objc"
        --help - Show this text and exit.
    

    πŸ‘ Flow Support

    πŸš€ This release contains an early experimental implementation of Flow type generation. Now your schema files can be used to generate multiple languages by using the --lang command line option.

    How do I use it?

    • Try it out by specifying --lang flow
    • Generate both ObjC and Flow --lang flow,objc

    πŸ“š More documentation on Flow is coming soon but you can see the current output in the Examples.

    Objective-C Generation

    • Nullability: Specifying a field as required will now influence if it is nonnull or nullable. Previously all methods were nullable.
    • πŸ†• New Method: "- (NSDictionary *)dictionaryRepresentation" allows your models to output a dictionary representation of themselves. This is intended to be the inverse of initWithModelDictionary.
    • πŸ› Bug fixes: Small number of fixes to the generated code have been made.

    πŸš€ Notable commits in this release:

    πŸ‘ 864abac Nullability support in Plank: (#64)
    6808341 Add dictionary representation to Objc models (#67)
    βœ… fc967d5 Add tests for generated models to the integration tests pipeline (#69)
    116b818 Copy the value to an ivar backed by a copy property (#72)
    πŸ‘ 0d50564 Add custom indentation support (#61)
    0️⃣ 37a6bc3 Don't camel case the description for EnumValue by default (#60)
    πŸ‘ 12db0da Add Flow Type Support (#57)
    πŸ‘• 6d226ec Fix lint warnings (#58)
    332af42 Use relative schema urls internally (#59)
    πŸš‘ 46d340f Fix critical bug where deep equality comparison contained a pointer equality (#50)
    βœ… 658c73f Add initial support for integration testing. (#48)
    🚚 aba7ecc Remove FilePrinter protocol (#46)
    ⚑️ 86873d0 Update to newest CI (#44)
    69e6d20 Add lang attribute to provide future flexibility for additional languages in (#42)
    🐎 d69c8e6 Simplify initWithModelDictionary and improve performance (#40)
    ⚑️ e8d35e3 Update Plank to Swift 3.1 (#39)
    38f6da3 Makes the code more readable via early returns / fatal errors in guards (#35)
    9fefe3a Support for no_recursive and only_runtime flags. Fix print_deps output (#32)
    πŸ–¨ 120e4d2 Add cli option for printing the dependencies of a schema (#30)

  • v1.0 Changes

    March 14, 2017

    πŸš€ This is the initial public release of plank.

  • v0.1

    March 14, 2017