branch: externals/tomelr commit a1fa47379ee104c4292d185ebcfdc8719d499d84 Author: Kaushal Modi <kaushal.m...@gmail.com> Commit: Kaushal Modi <kaushal.m...@gmail.com>
chore: Add CHANGELOG generated using git cliff tool --- CHANGELOG.org | 166 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile | 6 ++- doc/cliff.toml | 129 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 300 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.org b/CHANGELOG.org new file mode 100644 index 0000000000..121a12c20a --- /dev/null +++ b/CHANGELOG.org @@ -0,0 +1,166 @@ +# This file is auto-generated by running 'make changelog' from the repo root. + +* Changelog + +All notable changes to this project will be documented in this file. + +** *0.1.0* - <2022-05-03> + +[[https://github.com/kaushalmodi/tomelr/compare/4434ccc64b1e311b53e8ecc906113bba2e16fa98...568de5efb250c0bb4f19495c69b8b42b41fb186d][4434ccc...568de5e]] + +*** :sparkles: Features +:PROPERTIES: +:CUSTOM_ID: features-v0.1.0 +:END: + +- Support string keys ([[https://github.com/kaushalmodi/tomelr/commit/ed13b73e9b68ac2c51f3545ac337bbfeba063a42][ed13b73]]) +- Auto-coerce string to boolean ([[https://github.com/kaushalmodi/tomelr/commit/ebe5959174812ffc3cf7d88040b854599b15a88a][ebe5959]]) +- Auto-coerce string to integers ([[https://github.com/kaushalmodi/tomelr/commit/a25d952a17d344ac3d7396ae78a34e21b9ada14e][a25d952]]) + +*** :bug: Bug Fixes +:PROPERTIES: +:CUSTOM_ID: bug-fixes-v0.1.0 +:END: + +- Auto-stringify symbols like 1.10.1 ([[https://github.com/kaushalmodi/tomelr/commit/ae983711be15d95abd22ae4d7b8c116031de60a0][ae98371]]) +- Auto-stringify and auto-quote symbol values ([[https://github.com/kaushalmodi/tomelr/commit/ec381fd723c9801caa2353a40d41e8cc8096ea29][ec381fd]]) +- Boolean coercing when value is a symbol true or false ([[https://github.com/kaushalmodi/tomelr/commit/c2d1328c4404e6af920dc431ba57ee00eef4ba36][c2d1328]]) +- Integer coercing of a number strings with underscores ([[https://github.com/kaushalmodi/tomelr/commit/a676192b435474fbff53fe361dbf983e3b8ac799][a676192]]) + +*** :recycle: Refactor +:PROPERTIES: +:CUSTOM_ID: refactor-v0.1.0 +:END: + +- Don't attempt to triple-quote TOML keys … Triple-quote only when the `type' input of `tomelr--print-stringlike' … is nil. ([[https://github.com/kaushalmodi/tomelr/commit/334b7cba54001708e6819b9df0abf0c553c0d0a2][334b7cb]]) +- Minor code reorg ([[https://github.com/kaushalmodi/tomelr/commit/b2ba4c46b59d7baa4a6d02ba64657c08776d2d0e][b2ba4c4]]) + +*** :hammer: Testing +:PROPERTIES: +:CUSTOM_ID: testing-v0.1.0 +:END: + +- Add a test for string scalar with blank lines ([[https://github.com/kaushalmodi/tomelr/commit/57bed2cca8b648d2abc6da525a3420b3e968efb4][57bed2c]]) + +** *0.0.2* - <2022-05-02> + +[[https://github.com/kaushalmodi/tomelr/compare/3aa4dc1dbdce5875166b9db76b6de0a0ad679b33...45542fb234fcc4fea50a5fed0c7682d0d3db0f9b][3aa4dc1...45542fb]] + +*** :bug: Bug Fixes +:PROPERTIES: +:CUSTOM_ID: bug-fixes-v0.0.2 +:END: + +- TT with key with array value are detected correctly … Use json-alist-p and json-plist-p for TOML Table detection. This … uncomplicated the TOML Table logic quite a bit. … Caveat: Lists of plist need t… ([[https://github.com/kaushalmodi/tomelr/commit/044b5e1a042aa1058792af607b1d7cd4cc70d144][044b5e1]]) +- List format array of plists now detected as TOML Table Array … Also simplify tomelr--toml-table-array-p. ([[https://github.com/kaushalmodi/tomelr/commit/171e5a76824f30730a9e80384a18f3888dd3cc2a][171e5a7]]) +- Compatibility for emacs 26.3 … listp also works instead of proper-list-p here. So use that instead. … proper-list-p was introduced in emacs 27.x. ([[https://github.com/kaushalmodi/tomelr/commit/d86fd721ce4746550038e53dffe34885b06e9225][d86fd72]]) + +*** :memo: Documentation +:PROPERTIES: +:CUSTOM_ID: documentation-v0.0.2 +:END: + +- Remove an invalid example ([[https://github.com/kaushalmodi/tomelr/commit/dc9b2a63f8536d0ee14e480af5f8f273b1a117a9][dc9b2a6]]) + +*** :recycle: Refactor +:PROPERTIES: +:CUSTOM_ID: refactor-v0.0.2 +:END: + +- Clean up unused code … Use json-alist-p and json-plist-p directly where applicable. ([[https://github.com/kaushalmodi/tomelr/commit/f9d670e1656f1400b544ff27980657cbf5f8357b][f9d670e]]) +- Remove unnecessary tomelr-encode-keyword … Also, The "keyword" term was confusing here; "boolean" makes more … sense. ([[https://github.com/kaushalmodi/tomelr/commit/41ccea4ebe0619bd6d38d3d8c2174e0b27587df0][41ccea4]]) +- Use `tomelr--toml-table-p` ([[https://github.com/kaushalmodi/tomelr/commit/4386d99a8596fa244c818b8ae9f341feeeb0b677][4386d99]]) + +*** :hammer: Testing +:PROPERTIES: +:CUSTOM_ID: testing-v0.0.2 +:END: + +- Add tests for json.el functions used in tomelr ([[https://github.com/kaushalmodi/tomelr/commit/406f4922a8677f07d14190d48061ae60169825d5][406f492]]) + +*** :bento: Other +:PROPERTIES: +:CUSTOM_ID: other-v0.0.2 +:END: + +- Revert "doc: Update the medley example" … This reverts commit commit # [[https://github.com/kaushalmodi/tomelr/commit/26f1fc2f3c0245e69c8c72b0cd01024f9d53078b][26f1fc2]]. ([[https://github.com/kaushalmodi/tomelr/commit/df0e73334f918ee9de7e1f0a7cd0fb9037a79faa][df0e733]]) + +** *0.0.1* - <2022-04-30> + +*** :boom: Breaking +:PROPERTIES: +:CUSTOM_ID: breaking-v0.0.1 +:END: + +- Set boolean false using :false value … This is so that null vs false can be distinguished in JSON. … If a lisp data value is nil, that key will be absent in TOML. ([[https://github.com/kaushalmodi/tomelr/commit/2ea3b5e032629a3974e2733f849cf47259e80e0d][2ea3b5e]]) + +*** :sparkles: Features +:PROPERTIES: +:CUSTOM_ID: features-v0.0.1 +:END: + +- Add s-exp->toml examples and spec ([[https://github.com/kaushalmodi/tomelr/commit/8bc506af5acd6e8f3ce47890185c5f4db1c3eb3e][8bc506a]]) +- Add plist example ([[https://github.com/kaushalmodi/tomelr/commit/846676a172d2bdd39e1e8b5628a7e88a3605f68b][846676a]]) +- First cut -- Port json-encode from json.el to tomelr-encode … Contains only the fixes needed to make the boolean key-value pair look … right in TOML. ([[https://github.com/kaushalmodi/tomelr/commit/52dc93201deb02a3d380d841e839f5f3e5f32c95][52dc932]]) +- Encode to multi-line TOML string automatically … .. if the string has newlines or quote chars. ([[https://github.com/kaushalmodi/tomelr/commit/7d8d41f15b6d5a2d2325160490482b133c56f845][7d8d41f]]) +- Recognize local date format YYYY-MM-DD ([[https://github.com/kaushalmodi/tomelr/commit/1d65064ffa0c6e1d5e9cb14a31de8ada38dc3395][1d65064]]) +- Recognize RFC 3339 formatted date-time + offset ([[https://github.com/kaushalmodi/tomelr/commit/91800b26b8bff6b89fce887fbcadb9e956f412dd][91800b2]]) +- Skip converting keys whose values are nil ([[https://github.com/kaushalmodi/tomelr/commit/69217d47a65cb987d7d1ce32d3db5566a169ceca][69217d4]]) +- Convert Lisp lists to TOML arrays ([[https://github.com/kaushalmodi/tomelr/commit/96c890a68b9a587283bc7522c3893370cc522ca6][96c890a]]) +- Support basic TOML tables ([[https://github.com/kaushalmodi/tomelr/commit/cedb75df72f9aed0ad990b631f32d71f6ba1b79d][cedb75d]]) +- Support nested TOML tables ([[https://github.com/kaushalmodi/tomelr/commit/a1f434f03a761c50cd9813e27d5441d6b2c2902d][a1f434f]]) +- Add basic support for S-exp plists -> TOML conversion … Support added for scalars and lists. … Pending: tables, arrays of tables, etc. ([[https://github.com/kaushalmodi/tomelr/commit/2810504e840d8038b9a06fff732889f0f8cc73c8][2810504]]) +- Support basic TOML Table Arrays ([[https://github.com/kaushalmodi/tomelr/commit/ad8366d904dea6fc3f4af5bf57bcd92c6b37f57e][ad8366d]]) +- Make a very basic nested array of TTA work ([[https://github.com/kaushalmodi/tomelr/commit/a7b3a5703729682e88d6352932e235cbe04deb28][a7b3a57]]) +- Support (lightly tested) nested TOML Table Arrays ([[https://github.com/kaushalmodi/tomelr/commit/10a1994aedcbd95c35096b257cf1e9e6fd4554cb][10a1994]]) +- Implement everything planned in the initial spec … Fix converting of array of TOML tables represented by S-exp vectors. ([[https://github.com/kaushalmodi/tomelr/commit/e2b313ca3b3e4c98c18749671ac59bc1fe319c52][e2b313c]]) + +*** :bug: Bug Fixes +:PROPERTIES: +:CUSTOM_ID: bug-fixes-v0.0.1 +:END: + +- Dates will be strings in Lisp … refactor: Move "lists of lists" to a different section ([[https://github.com/kaushalmodi/tomelr/commit/28642f2e787a5424ebff30bbb6f7df2af54d6329][28642f2]]) +- Require subr-x for older Emacs versions ([[https://github.com/kaushalmodi/tomelr/commit/af40c0b40f8d3fe61ac711c00a32d6747d4e55e7][af40c0b]]) +- Use `=` and `length` separately instead of `length=` … length= does not exist on 27.2 and older Emacs versions. … It was added in Emacs 28.1 in … https://git.savannah.gnu.org/cgit/emacs.git/comm… ([[https://github.com/kaushalmodi/tomelr/commit/98c9b8c1fc9eb3fbc0016d6692ae8aed95bbe003][98c9b8c]]) +- Don't run plist to TOML conversion test on emacs 26.3 and older ([[https://github.com/kaushalmodi/tomelr/commit/c0962ba15f0cf7ff944e822f623b2800b5ebfd73][c0962ba]]) +- Attempt to make tomelr--toml-table-p more robust ([[https://github.com/kaushalmodi/tomelr/commit/ca9245038a74f272b246979271cbf2adef09eb89][ca92450]]) +- Support TOML tables specified as plists ([[https://github.com/kaushalmodi/tomelr/commit/4c419bcee218a95d6669a5b198d1b71f6a8e7691][4c419bc]]) +- Support TOML tables arrays specified as plist vector ([[https://github.com/kaushalmodi/tomelr/commit/cff1f8aa890d8c08fe26243870d59aa39f602156][cff1f8a]]) +- Stricter condition before starting TOML table array check ([[https://github.com/kaushalmodi/tomelr/commit/38160ef271493293166f81ce1a3d52b58a484a8e][38160ef]]) +- Don't let array of TOML tables be recognized as TOML tables ([[https://github.com/kaushalmodi/tomelr/commit/0eb4fa04ac3e6741f743ba451b1ec7a019989b5e][0eb4fa0]]) +- Don't let TOML tables be recognized as TOML tables arrays ([[https://github.com/kaushalmodi/tomelr/commit/5959b90ffa499281306473c83b669353ecb85073][5959b90]]) +- Correct the spec for nested array of tables ([[https://github.com/kaushalmodi/tomelr/commit/baf81228bc812de55e4df9340dd34cc8cc5a2ab8][baf8122]]) +- Better detection of nested TTA, but still wip … This fix also breaks the plist support for TTA ([[https://github.com/kaushalmodi/tomelr/commit/0f4e7b4f2c40a2cdce735d614eba9b7ac4640d06][0f4e7b4]]) +- Detect TT with sub-tables correctly ([[https://github.com/kaushalmodi/tomelr/commit/b64eb07e99e9ab45cc88dc6b628f8bc828a0dc28][b64eb07]]) +- Detect nested TTA correctly when not present in first TT key ([[https://github.com/kaushalmodi/tomelr/commit/a33dbd1286cd1f539c1e07bd21dc60464dd2f667][a33dbd1]]) + +*** :memo: Documentation +:PROPERTIES: +:CUSTOM_ID: documentation-v0.0.1 +:END: + +- Add LOGBOOK drawer example ([[https://github.com/kaushalmodi/tomelr/commit/d96a3b235b9dc7181f8140cf23b75d28a853c941][d96a3b2]]) +- Discover `json-encoding-pretty-print` variable! ([[https://github.com/kaushalmodi/tomelr/commit/732140041e91528a7ee3c730ce10bac0931698c4][7321400]]) +- Add spec for nested tables and arrays of tables ([[https://github.com/kaushalmodi/tomelr/commit/bb85106ee98c1ee04100db9d298510b3f57e0751][bb85106]]) + +*** :recycle: Refactor +:PROPERTIES: +:CUSTOM_ID: refactor-v0.0.1 +:END: + +- Move TOML Table detection logic to a separate fn ([[https://github.com/kaushalmodi/tomelr/commit/3c068fb9d9319d2876de359d2bc9068b857e091b][3c068fb]]) + +*** :hammer: Testing +:PROPERTIES: +:CUSTOM_ID: testing-v0.0.1 +:END: + +- Add test for boolean scalar key-value pairs ([[https://github.com/kaushalmodi/tomelr/commit/05d2cafcd989b977fa3e9d05e293e9f8bae22fc4][05d2caf]]) +- Add test for integer scalar key-value pairs ([[https://github.com/kaushalmodi/tomelr/commit/c872e9efc1bcf0d9310160f825032c602500c346][c872e9e]]) +- Add test for float scalar key-value pairs ([[https://github.com/kaushalmodi/tomelr/commit/9c91e0dc07291aae8a8b2b4dd1cea52583165e14][9c91e0d]]) +- Add test for TOML Array of Arrays ([[https://github.com/kaushalmodi/tomelr/commit/f37841cc781ce322ba31806cf9ef1ca7578f5714][f37841c]]) +- Test that 'false is also considered as boolean false in TOML ([[https://github.com/kaushalmodi/tomelr/commit/6bbe740e52d40a5d87d62805af3ed89cc16779b9][6bbe740]]) +- Test `tomelr--toml-table-p` ([[https://github.com/kaushalmodi/tomelr/commit/0d4674f782bee99ee36aca079ede57adeccc384f][0d4674f]]) + +# This file is generated by git-cliff by running 'make changelog' from the repo root. diff --git a/Makefile b/Makefile index 550b82562d..2a2d9afeb6 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,11 @@ TEST_DIR=$(shell pwd)/test # Run all tests by default. MATCH ?= -.PHONY: test +.PHONY: test changelog test: $(EMACS) --batch -L . -L $(TEST_DIR) -l all-tests.el -eval '(ert-run-tests-batch-and-exit "$(MATCH)")' + +# Requires https://github.com/orhun/git-cliff to be installed. +changelog: + git cliff -c ./doc/cliff.toml > ./CHANGELOG.org diff --git a/doc/cliff.toml b/doc/cliff.toml new file mode 100644 index 0000000000..6ba837858f --- /dev/null +++ b/doc/cliff.toml @@ -0,0 +1,129 @@ +# configuration file for git-cliff (0.1.0) +# https://github.com/orhun/git-cliff +# Run 'make changelog' to update <repo>/CHANGELOG.org. + +[changelog] + # changelog header + header = """ +# This file is auto-generated by running 'make changelog' from the repo root. + +* Changelog\n +All notable changes to this project will be documented in this file.\n +""" + + # template for the changelog body + # https://tera.netlify.app/docs/#introduction + body = """ +{% if version %}\ + ** *{{ version | trim_start_matches(pat="v") }}* - <{{ timestamp | date(format="%Y-%m-%dT%H:%M:%S%.3fZ") | date(timezone="America/New_York") }}> +{% else %}\ + ** :fire: *unreleased* +{% endif %}\ +{% if previous %}\ + {% if previous.commit_id %} + [[https://github.com/kaushalmodi/tomelr/compare/{{ previous.commit_id }}...{{ commit_id }}]\ + [{{ previous.commit_id | truncate(length=7, end="") }}...{{ commit_id | truncate(length=7, end="") }}]] + {% endif %}\ +{% endif %}\ +{% for group, commits in commits | group_by(attribute="group") %} + {% set group_minus_html = group | striptags -%} + {% set group_array = group_minus_html | split(pat=":") -%} + {# If group_minus_html = ":memo: Documentation", split that by : so that you + get an array: ["", "memo", "Documentation"], and then use the element + from index 2 to derive the CUSTOM_ID. + -#} + ***{{ group_minus_html }} + :PROPERTIES: + :CUSTOM_ID: {{ group_array.2 | slugify }}{% if version %}-{{ version }}{% endif %} + :END: + {% for commit in commits %} + - {{ commit.message + | trim_end + | truncate(length=200) + | upper_first }} ([[https://github.com/kaushalmodi/tomelr/commit/{{ commit.id }}][{{ commit.id | truncate(length=7, end="") }}]])\ + {% endfor %} +{% endfor %}\n +""" + + # remove the leading and trailing whitespace from the template + trim = true + + # changelog footer + footer = """ +# This file is generated by git-cliff by running 'make changelog' from the repo root. +""" + +[git] + # parse the commits based on https://www.conventionalcommits.org + conventional_commits = true + # filter out the commits that are not conventional + filter_unconventional = false + + # preprocess the git log messages before git-cliff parses them. + # https://github.com/orhun/git-cliff/issues/77#issuecomment-1090234236 + commit_preprocessors = [ + { pattern = " *\\n* *$", replace = ""}, # Remove trailing spaces and newlines. + { pattern = "\\n+", replace = " … "}, # Replace consecutive newlines with " … ". + { pattern = " +", replace = " "}, # Replace multiple spaces with a single space. + { pattern = "\\[\\[", replace = "[["}, # Break Org-link-like syntax in commit messages by injecting zero-width-space (ZWS) between "[[". + { pattern = "file:", replace = "file:"}, # Break Org-file-link-like syntax in commit messages by injecting ZWS between "file" and ":". + { pattern = "https://github.com/kaushalmodi/tomelr/issues/([0-9]+)(#issuecomment-[0-9]+)*", replace = "Issue # [[${0}][${1}]]"}, # Turn issue links for this repo into Org links with desc. + { pattern = "https://github.com/kaushalmodi/tomelr/pull/([0-9]+)", replace = "PR # [[${0}][${1}]]"}, # Turn PR links for this repo into Org links with desc. + { pattern = "([^\\[])(https://github.com/([^ ]+)/(issues|pull)/([0-9]+)(#issuecomment-[0-9]+)*)", replace = "${1}[[${2}][${3} #${5}]]"}, # Turn external issue links into Org links with desc. + { pattern = "Merge pull request #([0-9]+) from [^ ]+", replace = "PR # [[https://github.com/kaushalmodi/tomelr/pull/${1}][${1}]]:"}, # Turn PR references into links. + { pattern = "https://github.com/kaushalmodi/tomelr/commit/([a-f0-9]{7})[a-f0-9]*", replace = "commit # [[${0}][${1}]]"}, # Hyperlink commit references. + { pattern = "([ \\n])(([a-f0-9]{7})[a-f0-9]*)", replace = "${1}commit # [[https://github.com/kaushalmodi/tomelr/commit/${2}][${3}]]"}, # Hyperlink commit references. + { pattern = "[*_+=~]", replace = "${0}"}, # Break more valid Org markup by injecting ZWS that shows up in git logs. + ] + + # regex for parsing and grouping commits + commit_parsers = [ + { message = "\\[skip ci\\]", skip = true}, + { message = "empty commit", skip = true}, + + # https://www.conventionalcommits.org/en/v1.0.0/#summary + { message = "^[^ ]+!:" , group = "<!-- 0 --> :boom: Breaking"}, + { message = "^feat" , group = "<!-- 1.0 --> :sparkles: Features"}, + { message = "^perf" , group = "<!-- 2 --> :zap: Performance"}, + { message = "^fix" , group = "<!-- 3 --> :bug: Bug Fixes"}, + { message = "^docs?" , group = "<!-- 4.0 --> :memo: Documentation"}, + { message = "^refactor" , group = "<!-- 5 --> :recycle: Refactor"}, + { message = "^test" , group = "<!-- 6 --> :hammer: Testing"}, + { message = "^(chore.*|ci:)", skip = true}, + { body = "BREAKING CHANGE:" , group = "<!-- 0 --> :boom: Breaking"}, + + # Non-conventional + { message = "^minor", skip = true}, + { message = "^style", skip = true}, + { message = "^([Cc]leanup|[Cc]onsisten|[Tt]ypo)", skip = true}, + { message = "^tool", skip = true}, # Commits related to tools like git-cliff, Makefile, etc. + { message = "^[Cc]heckdoc [Ff]ixes$", skip = true}, # Commits to make emacs-lisp checkdoc pass. + { message = "^[Pp]ass [Cc]heckdoc$", skip = true}, # Commits to make emacs-lisp checkdoc pass. + { message = "([Bb]reaking|BREAKING|[Nn]otice|NOTICE)", group = "<!-- 0 --> :boom: Breaking"}, + { message = "^PR #" , group = "<!-- 1.1 --> :rocket: PR Merges"}, + { message = "Fixes Issue #" , group = "<!-- 1.2 --> :white_check_mark: Issue Fixes"}, + { message = "^([Pp]erf|[Ss]peed|[Oo]ptimiz|[Ii]mprov)", group = "<!-- 2 --> :zap: Performance"}, + { message = "^[Ff]ix" , group = "<!-- 3 --> :bug: Bug Fixes"}, + { message = "^[Dd]oc" , group = "<!-- 4.0 --> :memo: Documentation"}, + { message = "update .*[Dd]oc" , group = "<!-- 4.0 --> :memo: Documentation"}, + { message = "([Rr]efactor|[Rr]ename|[Ss]implify|[Cc]leanup)", group = "<!-- 5 --> :recycle: Refactor"}, + { message = "([Tt]ravis|gha|GHA)", skip = true}, + { message = "^[Aa]dd" , group = "<!-- 1.0 --> :sparkles: Features"}, + + # All other commits + { message = ".*", group = "<!-- 7 --> :bento: Other"}, + ] + # filter out the commits that are not matched by commit parsers + filter_commits = false + # glob pattern for matching git tags + tag_pattern = "v[0-9]*" + # regex for skipping tags + # skip_tags = "v0.1.0-beta.1" + # regex for ignoring tags + # ignore_tags = "" + # sort the tags chronologically + date_order = true + # sort the commits inside sections by oldest/newest order + sort_commits = "oldest" + +# Emoji ideas: https://gitmoji.dev/