Open
Conversation
bc79a1b to
8344854
Compare
75712a2 to
ec7eca4
Compare
This replaces the prior sqids-java/sqids-javascript integration with a native
Clojure/ClojureScript implementation while keeping the public API stable. The
algorithm now lives in focused CLJC namespaces for alphabet, block-list,
encoding, decoding, initialization, results, and platform helpers, with the
bundled blocklist moved to resources and refreshed by a Babashka updater.
Internally, encode/decode now flow through a total result-based core so
validation and error handling are explicit and testable across platforms. Only
`org.sqids.clojure/{sqids,encode,decode}` throw. Cross-namespace encode/decode
fdefs live in `org.sqids.clojure.invariants`, which allows a stronger
encode-side round-trip property without creating implementation cycles.
Generator-heavy spec support also moved into mirrored
`org.sqids.clojure.generators/*` namespaces to keep runtime files readable.
Tooling and CI were modernized around Kaocha as the single test entrypoint,
100% coverage enforcement, machine-readable coverage outputs, JUnit artifacts,
and a parity harness plus CI job against `sqids-spec`. The repo now uses local
wrappers for clj-kondo and cljstyle, stricter lint policy, markdownlint and
prettier hooks, and refreshed AGENTS/README guidance for the current workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sqids-java/sqids-javascriptbridge with a pure in-repo CLJC Sqids implementation.org.sqids.clojure/{sqids,encode,decode}while moving internal code to total, non-throwing result envelopes. Only the public entrypoints throw.alphabet,block_list,encoding,decoding,init,results, platform helpers, and cross-namespaceinvariants.org.sqids.clojure.generators/*namespaces so the runtime files stay readable.resources/org/sqids/clojure/blocklist.jsonand add a Babashkabin/update-blocklistscript to refresh it.Testing, Specs, and Parity
bin/kaocha.clojure.spec.test.checksuites intests.edn.encode/decodefdefs intoorg.sqids.clojure.invariantsso they can express stronger round-trip properties without cyclic implementation dependencies.sqids/sqids-specto compare reference outputs with this implementation.Tooling and CI
clj-kondoconfiguration and local wrappers forclj-kondo,cljstyle, and Kaocha.clj-kondo,cljstyle,shfmt,shellcheck,prettier,markdownlint-cli2).DeLaGuardo/setup-clojure, upload coverage/JUnit artifacts, and run the new parity job.Documentation
README.md,CHANGELOG.md, andAGENTS.mdto reflect the current architecture, commands, invariants, and contributor workflow.Validation
bin/kaocha(169 tests, 962 assertions, 0 failures,100%forms /100%lines)pre-commit run --all-files