1. 14 Jun, 2017 4 commits
  2. 13 Jun, 2017 5 commits
  3. 12 Jun, 2017 14 commits
  4. 08 Jun, 2017 10 commits
  5. 07 Jun, 2017 7 commits
    • Robert Knight's avatar
      Transform ES6 => ES5 after instrumenting code. · 18343b7f
      Robert Knight authored
      Running the code through Babelify before instrumenting it for code
      coverage resulted in incorrect statement location metadata. See the
      "statementMap" sections of the two files in
      https://gist.github.com/robertknight/4ec0f2c3509af61c31ffd574fe16cb74
      
      Since Isparta already supports ES6 internally, it can instrument the
      original untranspiled source, the problem can be resolved by switching
      the order of the transforms. See
      https://github.com/karma-runner/karma-coverage/issues/157#issuecomment-302133802
      18343b7f
    • Robert Knight's avatar
      Use pre-transpiled version of dom-anchor-fragment · 7604a92c
      Robert Knight authored
      dom-anchor-fragment's package.json specifies that the untranspiled
      source should be used in the browser, together with Browserify
      configuration.
      
      This isn't compatible with the Babelify configuration that is used to
      transpile the main client's code.
      
      Resolve the issue by configuring the client explicitly to use the
      pre-transpiled version of the source in the package.
      7604a92c
    • Robert Knight's avatar
      Update to latest version of dom-seek · 4d2b79a4
      Robert Knight authored
      The previous version of dom-seek included untranspiled source and
      provided Browserify transform configuration for an older version of
      Babelify, which is incompatible with the version being used to transform
      the client's main source.
      
      The latest dom-seek release ships pre-transpiled code which doesn't have
      this problem.
      4d2b79a4
    • Robert Knight's avatar
      Enable Babel usage in tests · 671bf001
      Robert Knight authored
       * Enable Babelify transform for Browserify in tests.
      
       * Rename `await` helper function because `await` is a reserved keyword
         in ES2015+.
      671bf001
    • Robert Knight's avatar
      Enable ES2015 transpilation in client · 5a2902c5
      Robert Knight authored
      Enable use of ES6 language features via Babel in the sidebar app and
      annotator code.
      
       - Update Babelify to the current version
       - Add preset for transpiling ES2015
      5a2902c5
    • Sean Hammond's avatar
      Don't throw if hypothesisConfig() isn't a function · 1376ebb0
      Sean Hammond authored
      Log a warning, rather than throwing an error, if
      window.hypothesisConfig() exists but isn't a function.
      
      "Warn but continue" is in line with our general approach to handling
      invalid configuration in the client. For example if there's an invalid
      js-hypothesis-config script in the page it logs a warning and continues.
      
      For some required config settings, such as config.app, if the setting is
      invalid then the client crashes out immediately because it can't
      continue. But otherwise it should warn and continue.
      1376ebb0
    • Sean Hammond's avatar
      Don't throw on invalid JSON · a6869f48
      Sean Hammond authored
      Don't throw an error when parsing an invalid js-hypothesis-config JSON
      script.
      
      This error thrown by shared.settings#jsonConfigsFrom() was caught in one
      of the places where that function is called, but not in other places
      where it's called.
      
      Move the error catching and warning logging into the shared function
      instead.
      
      This now means, for example, that boot/index.js no longer crashes
      (bringing down the entire app) if the host page contains an invalid
      js-hypothesis-config.
      
      Unfortunately since jsonConfigsFrom() is called _twice_ on page load to
      read the same js-hypothesis-config objects from the host page (it's
      called once by boot/index.js and once by annotator/config/config.js) if
      there's an invalid js-hypothesis-config a warning about it will be
      logged twice.
      a6869f48