-
Braden Shepherdson authored
This adds a cross-platform number formatting library in CLJC, which has (nearly) identical output in both JVM and JS environments. The only known differences are: - JVM Clojure has `BigDecimal` support, so isn't limited to a `double`'s range. - Exact spelling/capitalization of the full names of currencies differs. - JVM: "7.34 US Dollar" - JS: "7.34 US dollars" Some future work is required to fully land this. In particular, the `currency_in_header` logic should be moved to the table formatters, not implemented on the JS side of this change.
Braden Shepherdson authoredThis adds a cross-platform number formatting library in CLJC, which has (nearly) identical output in both JVM and JS environments. The only known differences are: - JVM Clojure has `BigDecimal` support, so isn't limited to a `double`'s range. - Exact spelling/capitalization of the full names of currencies differs. - JVM: "7.34 US Dollar" - JS: "7.34 US dollars" Some future work is required to fully land this. In particular, the `currency_in_header` logic should be moved to the table formatters, not implemented on the JS side of this change.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
shadow-cljs.edn 1.08 KiB
;; shadow-cljs configuration
{:source-paths
["shared/src"
"shared/test"]
;; TODO -- share deps with deps.edn -- see https://shadow-cljs.github.io/docs/UsersGuide.html#deps-edn
:dependencies
[[org.clojure/core.match "1.0.0"]
[medley "1.4.0"]
[net.cgrand/macrovich "0.2.1"]
[prismatic/schema "1.2.0"]
;; new stuff
[camel-snake-kebab "0.4.3"]
[com.lambdaisland/glogi "1.1.144"]]
:nrepl
{:middleware
[cider.nrepl/cider-middleware
cider.piggieback/wrap-cljs-repl
refactor-nrepl.middleware/wrap-refactor]}
:builds
{:app
{:target :npm-module
:output-dir "frontend/src/cljs/"
:entries [metabase.mbql.js
metabase.types
metabase.shared.formatting.internal.numbers-core
metabase.shared.formatting.internal.numbers
metabase.shared.formatting.numbers
metabase.shared.util
metabase.shared.util.currency
metabase.shared.parameters.parameters]}
:test
{:target :node-test
:output-to "target/node-tests.js"
:ns-regexp "-test$"
:autorun true}}}