GHC 2017-10-30

4 comments.

, https://git.io/vFqzA in Homebrew/homebrew-core
Submitted https://github.com/svg/svgo/issues/820. It's probably prudent to hold this until there's a reply.

, https://git.io/vFqzx in svg/svgo
v1.0.0 regression: "TypeError: Object.defineProperty called on non-object" on certain SVGs
==========================================================================================

Take this SVG for example:

![](https://rawgit.com/zmwangx/f1e79da72dcc724108840b7d53c158af/raw/36eb4004156a52cdc5cc40005bcf13f6c0000eb9/sample.svg)

```svg
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
  <foreignObject width="100%" height="100%">
    <style>div { color: red; }</style>
    <body xmlns="http://www.w3.org/1999/xhtml"><div>hello, world</div></body>
  </foreignObject>
</svg>
```

This looks like valid SVG to my eyes; it displays fine, and svgo v0.7.2 handles it just fine. However, with svgo v1.0.0:

```console
$ svgo sample.svg
TypeError: Object.defineProperty called on non-object
    at Function.defineProperty (<anonymous>)
    at CSSStyleDeclaration.addStyleHandler (/usr/local/lib/node_modules/svgo/lib/svgo/css-style-declaration.js:36:12)
    at CSSStyleDeclaration.hasStyle (/usr/local/lib/node_modules/svgo/lib/svgo/css-style-declaration.js:26:10)
    at CSSStyleDeclaration.setProperty (/usr/local/lib/node_modules/svgo/lib/svgo/css-style-declaration.js:242:10)
    at Object.fn (/usr/local/lib/node_modules/svgo/plugins/inlineStyles.js:156:34)
    at Object.<anonymous> (/usr/local/lib/node_modules/svgo/node_modules/css-tree/lib/walker/create.js:133:26)
    at List.each (/usr/local/lib/node_modules/svgo/node_modules/css-tree/lib/utils/list.js:143:12)
    at Object.walkDeclarations (/usr/local/lib/node_modules/svgo/node_modules/css-tree/lib/walker/create.js:131:27)
    at Object.walkDeclarations (/usr/local/lib/node_modules/svgo/node_modules/css-tree/lib/walker/create.js:124:34)
    at Object.walkDeclarations (/usr/local/lib/node_modules/svgo/node_modules/css-tree/lib/walker/create.js:285:30)
```

, https://git.io/vFq8y in Homebrew/homebrew-core
The test should fail here because the command line syntax has changed. That's an easy change, but I might have hit a showstopper on the first image I fed into v1.0.0, so please hold on while I sort this out (see if it's wrong with my local environment, or report it).

, https://git.io/vFq8S in Homebrew/homebrew-core
svgo 1.0.0
==========

Created with `brew bump-formula-pr`.