Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Mar 01, 2023
    • Cam Saul's avatar
      Build script overhaul 2023 (#28767) · 3c980639
      Cam Saul authored
      * Build Script overhaul
      
      * Remove stray deps.edn
      
      * Include :ci profile for build and release tests
      
      * Fix release script
      
      * Update markdown dox
      
      * Update another dox
      
      * Tweakz
      
      * Don't pin new version of data.xml to core project, just for build scripts
      
      * Ignore unrecognized options
      
      * Fix i18n/enumerate
      Unverified
      3c980639
  2. Feb 17, 2023
  3. Dec 29, 2022
  4. Nov 29, 2022
  5. Oct 20, 2022
  6. Oct 17, 2022
  7. Jul 29, 2022
  8. Jul 22, 2022
  9. Jul 04, 2022
  10. Jun 29, 2022
  11. Jun 16, 2022
    • dpsutton's avatar
      Return non-zero output from BE i18n on error (#23373) · 47b7ac9e
      dpsutton authored
      Want to return non-zero on unrecognized forms so that CI can indicate
      when forms are added that cannot be parsed.
      
      And example of a completely valid form of `trs` that we cannot identify
      with this code is
      
      ```clojure
      ;; from driver/util.clj
      (-> "Cycle detected resolving dependent visible-if properties for driver {0}: {1}"
      
          (trs driver cyclic-props)
          (ex-info {:type               qp.error-type/driver
                    :driver             driver
                    :cyclic-visible-ifs cyclic-props})
          throw)
      ```
      
      The string literal is threaded into the `trs` macro, so it validates
      correctly but we cannot identify the literal in tooling while making the
      pot file.
      
      Now output of bin/i18n/update-translation-template would be the
      following:
      
      ```shell
      ❯ ./update-translation-template
      [BABEL] Note: The code generator has deoptimised the styling of /Users/dan/projects/work/metabase/frontend/src/cljs/cljs.pprint.js as it exceeds the max of 500KB.
      [BABEL] Note: The code generator has deoptimised the styling of /Users/dan/projects/work/metabase/frontend/src/cljs/cljs-runtime/cljs.core.js as it exceeds the max of 500KB.
      [BABEL] Note: The code generator has deoptimised the styling of /Users/dan/projects/work/metabase/frontend/src/cljs/cljs.core.js as it exceeds the max of 500KB.
      ~/projects/work/metabase/bin/i18n ~/projects/work/metabase
      Warning: environ value /Users/dan/.sdkman/candidates/java/current for key :java-home has been overwritten with /Users/dan/.sdkman/candidates/java/17.0.1-zulu/zulu-17.jdk/Contents/Home
      SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
      SLF4J: Defaulting to no-operation (NOP) logger implementation
      SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
      Created pot file at  ../../locales/metabase-backend.pot
      Found 1396 forms for translations
      Grouped into 1313 distinct pot entries
      Found 1 forms that could not be analyzed
      {:file "metabase/driver/util.clj", :line 362, :original (trs driver cyclic-props), :message nil}
      
      ❯ echo $?
      1
      ```
      
      and we have an exit code of 1 so that
      https://github.com/metabase/metabase/blob/master/.github/workflows/i18n.yml
      will fail in CI.
      Unverified
      47b7ac9e
  12. Jun 10, 2022
    • Noah Moss's avatar
      Allow multi-line strings using `str` in translation macros (#22901) · 92175e0b
      Noah Moss authored
      
      * allow str form as the first argument to deferred-tru
      
      * add tests and update doc strings
      
      * migrate more setting descriptions
      
      * Handle multiline translation sources
      
      ```clojure
      enumerate=> x
      (deferred-tru
       (str
        "Whether an introductory modal should be shown after the next database connection is added. "
        "Defaults to false if any non-default database has already finished syncing for this instance."))
      enumerate=> (form->string-for-translation x)
      "Whether an introductory modal should be shown after the next database connection is added. Defaults to false if any non-default database has already finished syncing for this instance."
      ```
      
      We get the form from `(g/grasp <file> ::translate)` which returns the
      `x`. And then simply pick through it for either a string literal or a
      call to `(str <literal>+)`
      
      Co-authored-by: default avatardan sutton <dan@dpsutton.com>
      Unverified
      92175e0b
  13. Jun 08, 2022
    • dpsutton's avatar
      Create po template file (pot) from clojure (#23181) · ab2c5af3
      dpsutton authored
      * Create po template file (pot) from clojure
      
      Rather than use xgettext we can use grasp to look for translation
      sites. The reason to do this is twofold:
      
      Multiline Translated Strings
      ----------------------------
      
      We can use multiline strings in source to aide in readability. This
      [PR](https://github.com/metabase/metabase/pull/22901)
      was abandoned because we xgettext cannot be expected to combine string
      literals into a single string for translation purposes. But we can
      certainly do that with clojure code.
      
      ```clojure
      (defn- form->string-for-translation
        "Function that turns a form into the translation string. At the moment
        it is just the second arg of the form. Afterwards it will need to
        concat string literals in a `(str \"foo\" \"bar\")` situation. "
        [form]
        (second form))
      
      (defn- analyze-translations
        [roots]
        (map (fn [result]
               (let [{:keys [line _col uri]} (meta result)]
                 {:file (strip-roots uri)
                  :line line
                  :message (form->string-for-translation result)}))
             (g/grasp roots ::translate)))
      ```
      
      `form` is the literal form. So we can easily grab all of the string
      literals out of it and join them here in our script. The seam is already
      written. Then reviving the PR linked earlier would upgrade the macros to
      understand that string literals OR `(str <literal>+)` are acceptable
      clauses.
      
      Translation context
      -------------------
      
      Allowing for context in our strings. The po format allows for context in
      the file format.
      
      ```
      msgctxt "The update is about changing a record, not a timestamp"
      msgid "Failed to notify {0} Database {1} updated"
      msgstr ""
      ```
      
      See [this
      issue](https://github.com/metabase/metabase/issues/22871#issuecomment-1146947441)
      for an example situation. This wouldn't help in this particular instance
      because it is on the Frontend though.
      
      But we could have a format like
      ```clojure
      (trs "We" (comment "This is an abbreviation for Wednesday, not the
      possessive 'We'"))
      ```
      The macro strips out the `comment` form and we can use it when building
      our pot file.
      
      Note there is a difficulty with this though since all source strings
      must be unique. There can be multiple locations for each translated
      string.
      
      ```
      ,#: /metabase/models/field_values.clj:89
      ,#: /metabase/models/params/chain_filter.clj:588
      msgid "Field {0} does not exist."
      msgstr ""
      ```
      The leading commas are present to prevent commit message comments. But
      if one location has a context and the other doesn't, or even worse, if
      they have two different contexts, we have a quandry: we can only express
      one context. Probably easy to solve or warn on, but a consideration.
      
      Caught Errors
      -------------
      
      The script blew up on the following form:
      
      ```clojure
      (-> "Cycle detected resolving dependent visible-if properties for driver {0}: {1}"
          (trs driver cyclic-props))
      ```
      
      No tooling could (easily) handle this properly. Our macro assertions
      don't see the thread. But xgettext never found this translation
      literal. I warn in the pot generation so we can fix this. We could also
      have a test running in CI checking that all translations are strings and
      not symbols.
      
      Fundamental Tool
      ----------------
      
      The sky is the limit because of this fundamental grasp tool:
      
      ```clojure
      enumerate=> (first (g/grasp single-file ::translate))
      (trs "Failed to notify {0} Database {1} updated" driver id)
      enumerate=> (meta *1)
      {:line 35,
       :column 22,
       :uri "file:/Users/dan/projects/work/metabase/src/metabase/driver.clj"}
      ```
      
      We can find all usages of tru/trs and friends and get their entire form
      and location. We can easily do whatever we want after that.
      
      Verifying Translation scripts still work
      ----------------------------------------
      
      You can check a single file is valid with `msgcat <input.pot> -o
      combined.pot`. This will throw if the file is invalid.
      
      The general script still works:
      
      ```
      ❯ ./update-translation-template
      [BABEL] Note: The code generator has deoptimised the styling of /Users/dan/projects/work/metabase/frontend/src/cljs/cljs.pprint.js as it exceeds the max of 500KB.
      [BABEL] Note: The code generator has deoptimised the styling of /Users/dan/projects/work/metabase/frontend/src/cljs/cljs.core.js as it exceeds the max of 500KB.
      [BABEL] Note: The code generator has deoptimised the styling of /Users/dan/projects/work/metabase/frontend/src/cljs/cljs-runtime/cljs.core.js as it exceeds the max of 500KB.
      Warning: environ value /Users/dan/.sdkman/candidates/java/current for key :java-home has been overwritten with /Users/dan/.sdkman/candidates/java/17.0.1-zulu/zulu-17.jdk/Contents/Home
      SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
      SLF4J: Defaulting to no-operation (NOP) logger implementation
      SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
      Created pot file at  ../../locales/metabase-backend.pot  #<----- new line here
      Warning: environ value /Users/dan/.sdkman/candidates/java/current for key :java-home has been overwritten with /Users/dan/.sdkman/candidates/java/17.0.1-zulu/zulu-17.jdk/Contents/Home
      2022-06-06 15:05:57,626 INFO metabase.util :: Maximum memory available to JVM: 8.0 GB
      Warning: protocol #'java-time.core/Amount is overwriting function abs
      WARNING: abs already refers to: #'clojure.core/abs in namespace: java-time.core, being replaced by: #'java-time.core/abs
      WARNING: abs already refers to: #'clojure.core/abs in namespace: java-time, being replaced by: #'java-time/abs
      2022-06-06 15:06:01,368 WARN db.env :: WARNING: Using Metabase with an H2 application database is not recommended for production deployments. For production deployments, we highly recommend using Postgres, MySQL, or MariaDB instead. If you decide to continue to use H2, please be sure to back up the database file regularly. For more information, see https://metabase.com/docs/latest/operations-guide/migrating-from-h2.html
      2022-06-06 15:06:03,594 INFO util.encryption :: Saved credentials encryption is DISABLED for this Metabase instance. :unlock:
       For more information, see https://metabase.com/docs/latest/operations-guide/encrypting-database-details-at-rest.html
      WARNING: abs already refers to: #'clojure.core/abs in namespace: taoensso.encore, being replaced by: #'taoensso.encore/abs
      WARNING: abs already refers to: #'clojure.core/abs in namespace: kixi.stats.math, being replaced by: #'kixi.stats.math/abs
      WARNING: abs already refers to: #'clojure.core/abs in namespace: kixi.stats.test, being replaced by: #'kixi.stats.math/abs
      WARNING: abs already refers to: #'clojure.core/abs in namespace: kixi.stats.distribution, being replaced by: #'kixi.stats.math/abs
      msgcat: msgid '{0} metric' is used without plural and with plural.
      msgcat: msgid '{0} table' is used without plural and with plural.
      ```
      
      I'm not sure what the last two lines are about but I suspect they are
      preexisting conditions. their form from the final combined pot
      file (althrough again with leading commas on the filenames to prevent
      them from being omitted from the commit message)
      
      ```
      ,#: frontend/src/metabase/admin/permissions/components/PermissionsConfirm.jsx:32
      ,#: src/metabase/automagic_dashboards/core.clj
      ,#: target/classes/metabase/automagic_dashboards/core.clj
      ,#, fuzzy, javascript-format
      msgid "{0} table"
      msgid_plural "{0} tables"
      msgstr[0] ""
      "#-#-#-#-#  metabase-frontend.pot  #-#-#-#-#\n"
      "#-#-#-#-#  metabase-backend.pot (metabase)  #-#-#-#-#\n"
      msgstr[1] "#-#-#-#-#  metabase-frontend.pot  #-#-#-#-#\n"
      
      ...
      
      ,#: frontend/src/metabase/query_builder/components/view/QuestionDescription.jsx:24
      ,#: src/metabase/automagic_dashboards/core.clj
      ,#: target/classes/metabase/automagic_dashboards/core.clj
      ,#, fuzzy, javascript-format
      msgid "{0} metric"
      msgid_plural "{0} metrics"
      msgstr[0] ""
      "#-#-#-#-#  metabase-frontend.pot  #-#-#-#-#\n"
      "#-#-#-#-#  metabase-backend.pot (metabase)  #-#-#-#-#\n"
      msgstr[1] "#-#-#-#-#  metabase-frontend.pot  #-#-#-#-#\n"
      ```
      
      * Add drivers, one override, remove unused import
      
      import wasn't necessary
      forgot to check the driver sources for i18n
      for some reason grasp doesn't descend into
      
      ```clojure
      (defmacro ^:private deffingerprinter
        [field-type transducer]
        {:pre [(keyword? field-type)]}
        (let [field-type [field-type :Semantic/* :Relation/*]]
          `(defmethod fingerprinter ~field-type
             [field#]
             (with-error-handling
               (with-global-fingerprinter
                 (redux/post-complete
                  ~transducer
                  (fn [fingerprint#]
                    {:type {~(first field-type) fingerprint#}})))
               (trs "Error generating fingerprint for {0}" (sync-util/name-for-logging field#))))))
      ```
      
      I've opened an issue on [grasp](https://github.com/borkdude/grasp/issues/28)
      
      * Use vars rather than name based matching
      Unverified
      ab2c5af3
  14. May 04, 2022
  15. Apr 22, 2022
    • adam-james's avatar
      Handle Plural Translation and Path String Bugs for i18n (#21116) · b0ff7087
      adam-james authored
      The i18n in Metabase uses a service 'POEditor', which requires:
      
      1. all strings on the frontend and backend that need to have translations must be collected into a .pot file
      2. The .pot file is uploaded and people contribute translations for each phrase, per locale. These eventually get
      downloaded as locale.po (eg. German is 'de.po')
      3. Frontend and backend each take responsibility for generating required locale resources, which are then used to
      render the correct translations for the user's locale in the app.
      
      This process works just fine, but occasionally some bugs are found. These particular changes in this PR were found
      because of issue #15660 where a user reports that some of the 'binning options' are translated while others are not.
      
      Those particular strings originate form the backend via the API at `src/metabase/api/table.clj`, but the issue arises
      because the backend's locale resource files do not contain the entries for those translations. The mechanism is
      working just fine, it's the resource building process that has some issues.
      
      So, we can turn to the i18n build process, which is all found in `bin/i18n`, and is a mix of shell scripts and
      clojure.
      
      The script `update-translation-template` starts the process.
      There are a few steps in the process:
      
      1. generate metabase-frontend.pot -> uses Babel, I'm assuming this works for the purpose of this PR
      
      2. generate metabase-backend.pot  -> works fine. We can see in `locales/metabase-backend.pot`:
      
         #: src/metabase/api/table.clj
         msgid "Week"
         msgstr ""
      
      3. Join these files together with a tool 'msgcat' into metabase.pot
         - here is where we begin to see an issue.
         - there is NO entry that matches the example from 2. This is because msgcat has combined translation strings that
         match on the frontend into a single entry:
      
           #: frontend/src/metabase-lib/lib/Dimension.ts:1677
           #: frontend/src/metabase/lib/query_time.js:203
           #: frontend/src/metabase/parameters/components/widgets/DateRelativeWidget.jsx:25
           #: frontend/src/metabase/parameters/components/widgets/DateRelativeWidget.jsx:30
           #: src/metabase/api/table.clj
           msgid "Week"
           msgstr ""
      
         - and, more interestingly:
      
         #: frontend/src/metabase-lib/lib/Dimension.ts:1689
         #: frontend/src/metabase/lib/query_time.js:207 src/metabase/api/table.clj
         msgid "Quarter"
         msgstr ""
      
         - There are a bunch of #: lines, the last being the clj file, which means that "Week" is used both in the frontend
         and backend. So, the translated string can be used in both situations. The backend does handle the case of multiple
         #: paths, but does not handle the second situation, where there are actually 2 paths (space separated) in a single
         #: line.
      
      4. in the file `bin/i18n/src/create_artifacts/backend.clj` we create .edn files for each locale.
         - this is a map where the keys are the English strings and values are the translations from the locale.po file.
         - our logic in this file incorrectly assumes only a single path per #: line in the .pot file exists, and this is
         one place where things break. The 'backend-message?' predicate will fail on the second example in 3. so we don't
         ever translate that string.
         - Simultaneously, `i18n/common.clj` allows pluralized entries. In the case of "Week", we got "Week" and "Weeks"
         translated from POEditor. When a message is plural, the contents show up in a different location. Our backend code
         ignores plural, but this ends up throwing away our valid translation as well. When a message is plural, all
         translations show up in :str-plural as a seq, where the first entry is the singular translation. But, we (remove
         :pluarl?) so get nothing. This is why the binning options aren't translated. As a point of completeness: if a
         message has no plural, we correctly get the translated message from the :str key.
      
      The broken logic:
      - common.clj - po-messages-seq creates a seq of messages, where a message looks like:
      {:id "Week",
        :id-plural "Weeks",
        :str nil,
        :str-plural ("Woche" "Wochen"),
        :fuzzy? false,
        :plural? true,
        :source-references
        ("frontend/src/metabase/lib/query_time.js:203"
         "frontend/src/metabase/parameters/components/widgets/DateRelativeWidget.jsx:25"
         "frontend/src/metabase/parameters/components/widgets/DateRelativeWidget.jsx:30"
         "src/metabase/api/table.clj target/classes/metabase/api/table.clj"),
        :comment nil}
      
      or
      {:id "Day of Week",
        :id-plural nil,
        :str "Wochentag",
        :str-plural nil,
        :fuzzy? false,
        :plural? false,
        :source-references ("src/metabase/api/table.clj target/classes/metabase/api/table.clj"),
        :comment nil}
      
      Example 1 fails because the message is pluralized. :str is nil, but (first (:str-plural message)) has the correct
      translation. We are looking in the wrong spot in this case. Compare to Example 2 which does work.
      
      Notice a subtle thing that was actually wrong in examples 1 and 2 but worked by accident: some :source-references
      strings contain 2 paths. We see this failing here:
      
      {:id "Quarter",
       :id-plural "Quarters",
       :str nil,
       :str-plural ("Quartal" "Quartale"),
       :fuzzy? false,
       :plural? true,
       :source-references
       ("frontend/src/metabase/lib/query_time.js:207 src/metabase/api/table.clj" "target/classes/metabase/api/table.clj"),
       :comment nil}
      
      We can solve this different problem by using str/split in the backend-message? predicate.
      Unverified
      b0ff7087
  16. Mar 14, 2022
    • Cam Saul's avatar
      Upgrade Liquibase to latest version; remove final Java source file and need... · aaf1b601
      Cam Saul authored
      Upgrade Liquibase to latest version; remove final Java source file and need for `clojure -X:deps prep` (#20611)
      
      * Upgrade Liquibase to latest version
      
      * Try adjusting log
      
      * Fix checksums for the TWO migrations with ID = 32
      
      * FINALLY get Liquibase to use Log4j2
      
      * Set Liquibase ConsoleUIService OutputStream to null OutputStream
      
      * Manually define a package for our H2 proxy class so Java 8 works
      
      * Fix package-name determination code
      
      * Update migrations file spec
      
      * `databasechangelog` shouldn't be upper-case
      
      * Lower-case quartz table names
      
      * More MySQL fixes :wrench:
      
      * Properties for all the Quartz tables :cry:
      
      * Formatting tweaks [ci skip]
      
      * Revert a few more busted changes
      
      * Fix more busted changes
      
      * Bump Liquibase version to 4.8.0 to fix MySQL defaultValueBoolean bug
      
      * OMG I think I finally fixed MySQL
      
      * Remove Java source file and prep-deps code
      
      * Remove two more references to bin/prep.sh
      
      * Minor cleanup
      
      * Revert unneeded changes
      
      * Fix busted indentation
      
      * Don't search inside java/ anymore since it's G-O-N-E
      
      * Appease the namespace linter
      
      * Update src/metabase/db/liquibase/h2.clj
      Unverified
      aaf1b601
  17. Feb 01, 2022
  18. Sep 27, 2021
    • Pawit Pornkitprasan's avatar
      Fix {0} being shown when locale is "pt" (#17875) · 35651360
      Pawit Pornkitprasan authored
      This is a combination of 2 issues:
       1) pt got renamed to pt_BR in x.39.x but the old
          "pt" value may still be stored in the database
       2) when making a release, an unclean build
          directory may be used containing old "pt"
          resource which gets leaked into the release build
      
      1) is fixed by adding a function to treat "pt" as "pt_BR"
      to support users who were on "pt" since pre-x.39.
      (This is done by finding the closest fallback locale)
      
      2) is fixed by emptying the folder before generating locales
      so any old locales are deleted.
      
      Fixes #16690
      Unverified
      35651360
  19. Sep 14, 2021
    • pawit-metabase's avatar
      i18n: do not remove missing plural from translation (#17799) · b178e30e
      pawit-metabase authored
      The ttag library expect the plural array to be exactly the size as
      the number of plural forms defined in the header.
      
      If we remove empty plural, the array will have the wrong size and
      the library will crash when the trying to use the non-existent
      plural.
      
      By leaving the empty string there, the ttag library will correctly
      detect it and use the English version for the missing variant.
      
      This does not affect the backend because the backend does not
      support plurals.
      
      Fixes #16323
      Unverified
      b178e30e
  20. Jul 30, 2021
    • Cam Saul's avatar
      Switch to tools.deps (#16749) · 0eef2252
      Cam Saul authored
      Unverified
      0eef2252
    • Dalton's avatar
      Upgrade babel to 7.x.x and jest to 27.x.x (#17137) · 3a7c3987
      Dalton authored
      * Update babel dependencies to latest
      
      * Remove some old babel dependencies
      
      The dependencies in this commit include dependencies that have been
      renamed, such as babel-cli which is now @babel/cli. It also includes
      dependencies that have been replaced, such as babel-preset-stage-0 and
      its ilk, which have been replaced with @babel/preset-env.
      
      * Remove babel-register dependency
      
      This is referenced in our webpack.config.js file. I don't think we need
      Babel in our Node envionment, but I could be wrong, so leaving this as a
      separate commit.
      
      * Remove @babel/standalone and dependent code
      
      We're using @babel/standalone to support the writing of JSX in our
      internal-only ScratchApp editor. Unfortunately, this dependency is
      large--1.5mb not gzipped--and our current build does not intelligently
      split bundles, meaning our users our burdened by the size of this
      dependency whenever they must redownload the Metabase JS bundle.
      
      I'm removing it. We should still be able to write JS in the ScratchApp,
      but JSX no longer.
      
      * Add @babel/node to dev deps
      
      Needed by a cypress command
      
      * Add browserslist config
      
      Babel's preset-env dep needs this config to determine how to transform
      our JavaScript. By default I believe it ends up defaulting to
      "defaults."
      
      "defaults" is equivalent to the following rules:
      > 0.5%, last 2 versions, Firefox ESR, not dead
      
      A comma between rules represents a UNION operator.
      
      Per
      https://www.metabase.com/docs/latest/faq/general/supported-browsers.html
      
      
      we have deprecated IE 11 so I am including that explicitly in our
      browserslist.
      
      * Update babelrc plugins and presets
      
      - Replaced presets with preset-env and preset-react
      - Updated the names of some plugins, like transform-decorators-legacy,
        which is now @babel/plugin-proposal-decorators with an explicit
        "legacy: true" passed in the config.
      - Removed add-react-displayname because it is included in preset-react
      - Removed transform-builtin-extend because it is included in preset-env*
      - Removed syntax-trailing-function-commas because it is supported by
        all browsers we support
      
      * note: There is a "loose" config option for handling the extension of builtin
      classes. We may need it, but I am not sure.
      
      * Update babel cli args
      
      Replace -q with --quiet because -q no longer exists
      
      * Fix circular dep in auth.js by making it async
      
      Our app unfortunately contains MANY circular dependencies. Some, like
      this one, caused problems when the app instantiates because the
      "refreshCurrentUser" method is undefined when auth.js is initially run.
      
      While we should in the future avoid having circular deps in the first
      place, making them run async by requiring the dep and function run-time
      fixes this particular issue.
      
      * Fix circular dependency in metabase/redux/requests.js
      
      The handleActions and createAction methods imported from
      "metabase/lib/redux" are actually just methods from the "redux-actions"
      dependency... so importing those methods directly from that dep fixes
      this circular dependency problem.
      
      * Remove references to global.services and exports in metabase/services
      
      This line breaks the build. Git blame says the line is 5 years old, and
      I wouldn't expect such code to be used with how our app now requires
      deps.
      
      * Fix MBQLArrayClause problem caused by Array extension
      
      * Explicitly pass args from flatMap to function via anonymous cb
      
      I think the old Array.prototype.flatMap prototype must've had different
      args. They are now "currentValue, index, array" so when we passed it
      "enumeratePaths" as a callback, the second arg of enumeratePaths gets
      set to a number. This breaks the logic of enumeratePaths because it is a
      recursive function that depends on that second arg getting initialized
      as an empty array by default.
      
      * Remove code that spreads non-iterable value in array
      
      New Babel is stricter about handling this sort of code that doesn't
      match the JS spec. You can't spread an undefined value inside of an
      iterator.
      
      * Update jest and babel-jest to latest
      
      Updating Babel breaks our unit tests. Updating nothing causes every test
      to fail due to a Babel version mismatch. Updating only babel-jest causes
      the following error:
      
      TypeError: Jest: a transform must export a `process` function
      
      There may be a way around updating Jest, but updating it does not appear
      to be too difficult.
      
      * Set the testEnvironment to jsdom
      
      This was the default testEnvironment in our old version of jest. At some
      point the default was changed to node.
      
      * Remove unfinished "pending" unit tests
      
      I'm unfamiliar with this pending function, but the function no longer
      exists, causing the tests to fail.
      
      * don't pass async callback to describe
      
      * Update name of runTimersToTime to advanceTimersByTime
      
      * Fix incorrectly nested unit test
      
      * mock SVGElement.prototype.getBBox method
      
      * Don't return values in describe callback
      
      * Move variable declaration to above usage
      
      * Fix prettier error
      
      * Upgrade `documentation` library to the latest version (13.x.x)
      
      This library was the only one left that was still using Babel 6.
      
      * Return an MBQLClause instance after using Array methods
      
      * remove 'not IE 11' from browserslist
      
      * Remove mock that breaks unit test
      
      Co-authored-by: default avatarNemanja <31325167+nemanjaglumac@users.noreply.github.com>
      Unverified
      3a7c3987
  21. May 21, 2021
  22. May 13, 2021
  23. Apr 15, 2021
  24. Apr 13, 2021
  25. Mar 29, 2021
  26. Mar 17, 2021
  27. Oct 23, 2020
  28. Mar 27, 2020
  29. Aug 21, 2019
  30. Apr 11, 2019
  31. Mar 18, 2019
  32. Apr 24, 2018
  33. Apr 20, 2018
  34. Mar 02, 2018
  35. Mar 01, 2018
  36. Oct 06, 2017
  37. Sep 10, 2017
  38. Aug 23, 2017
  39. Aug 21, 2017
Loading