Commit 6df62607515cd10bef7634cee1580ad1fc3d542d
1 parent
fc1bfe4a
Change default --json from 1 to latest
Showing
4 changed files
with
13 additions
and
6 deletions
ChangeLog
| 1 | 1 | 2022-04-16 Jay Berkenbilt <ejb@ql.org> |
| 2 | 2 | |
| 3 | + * Breaking CLI change: the default value for --json is now | |
| 4 | + "latest" rather than "1". At this moment, "1" is the latest | |
| 5 | + version, but version "2" will be added before the release of | |
| 6 | + qpdf 11. | |
| 7 | + | |
| 3 | 8 | * Perform code cleanup including some source-compatible but not |
| 4 | 9 | binary compatible changes to function signatures. |
| 5 | 10 | ... | ... |
TODO
| ... | ... | @@ -6,7 +6,6 @@ Next |
| 6 | 6 | * Stay on top of https://github.com/pikepdf/pikepdf/pull/315 |
| 7 | 7 | |
| 8 | 8 | In order: |
| 9 | -* ABI including --json default is latest | |
| 10 | 9 | * json v2 |
| 11 | 10 | |
| 12 | 11 | Other (do in any order): |
| ... | ... | @@ -480,7 +479,6 @@ This is a list of changes to make next time there is an ABI change. |
| 480 | 479 | Comments appear in the code prefixed by "ABI" |
| 481 | 480 | |
| 482 | 481 | * Search for ABI to find items not listed here. |
| 483 | -* Switch default --json to latest | |
| 484 | 482 | * See where anonymous namespaces can be used to keep things private to |
| 485 | 483 | a source file. Search for `(class|struct)` in **/*.cc. |
| 486 | 484 | * After removing legacy QPDFNameTreeObjectHelper and | ... | ... |
libqpdf/QPDFJob_config.cc
| ... | ... | @@ -234,10 +234,7 @@ QPDFJob::Config::json() |
| 234 | 234 | QPDFJob::Config* |
| 235 | 235 | QPDFJob::Config::json(std::string const& parameter) |
| 236 | 236 | { |
| 237 | - if (parameter.empty()) { | |
| 238 | - // The default value is 1 for backward compatibility. | |
| 239 | - o.m->json_version = 1; | |
| 240 | - } else if (parameter == "latest") { | |
| 237 | + if (parameter.empty() || (parameter == "latest")) { | |
| 241 | 238 | o.m->json_version = 1; |
| 242 | 239 | } else { |
| 243 | 240 | o.m->json_version = QUtil::string_to_int(parameter.c_str()); | ... | ... |
manual/release-notes.rst
| ... | ... | @@ -57,6 +57,13 @@ For a detailed list of changes, please see the file |
| 57 | 57 | ``autopkgtest`` framework but can be used by others. See |
| 58 | 58 | :file:`pkg-test/README.md` for details. |
| 59 | 59 | |
| 60 | + - CLI: breaking changes | |
| 61 | + | |
| 62 | + - The default json output version when :qpdf:ref:`--json` is | |
| 63 | + specified has been changed from ``1`` to ``latest``. | |
| 64 | + | |
| 65 | + - API: breaking changes | |
| 66 | + | |
| 60 | 67 | - Other changes |
| 61 | 68 | |
| 62 | 69 | - A new chapter on contributing to qpdf has been added to the | ... | ... |