1. 24 9月, 2021 7 次提交
  2. 22 9月, 2021 2 次提交
    • Z
      Create SECURITY.md (#1580) · 08373acf
      Ziding Zhang 提交于
      To verify that the repository authorises trysound@yandex.ru as its security contact.
      08373acf
    • B
      Avoid node.parentNode in style manager (#1576) · 79ceb09d
      Bogdan Chadkin 提交于
      node.parentNode will be removed in v3 along with JSAPI class wrapper on
      each node.
      
      Style manager uses it to find inherited styles. To workaround this
      I collected all parents along with all styles. This constraints style
      manager to work only with initial ast which should not be a problem as
      each plagin execution is isolated.
      79ceb09d
  3. 16 9月, 2021 3 次提交
  4. 14 9月, 2021 3 次提交
  5. 13 9月, 2021 5 次提交
  6. 12 9月, 2021 4 次提交
    • B
      Move platform specific eol to svgo-node entry point (#1565) · 23c7f481
      Bogdan Chadkin 提交于
      `os` package in js2svg module bothered me for a long time.
      We had to hack rollup to mock it for browser.
      
      Thanks to https://github.com/svg/svgo/pull/1546 we now can pass eol from
      svgo-node entry point and simplify build.
      23c7f481
    • B
      Remove node 16 version fix (#1566) · 1f5ea7e6
      Bogdan Chadkin 提交于
      Looks like the bug with v8 internals was fixed.
      1f5ea7e6
    • B
      Add better parser errors (#1553) · 77102ed0
      Bogdan Chadkin 提交于
      Old SVGO errors were not very helpful. Packages like cssnano
      (postcss-svgo) had to deal with a lot of issues which are hard to debug
      with old errors.
      
      ```
      Error: Error in parsing SVG: Unquoted attribute value
      Line: 1
      Column: 29
      Char: 6
      File: input.svg
      ```
      
      New errors are more informative and may solve many struggles
      
      ```
      Error: SvgoParserError: input.svg:2:29: Unquoted attribute value
      
        1 | <svg viewBox="0 0 120 120">
      > 2 |   <circle fill="#ff0000" cx=60.444444" cy="60" r="50"/>
          |                             ^
        3 | </svg>
        4 |
      ```
      77102ed0
    • A
      Allow choosing EOL and appending final newline (#1546) · e8321f0c
      Adaline Valentina Simonian 提交于
      Addresses #951
      
      Adds the following options to js2svg and CLI:
      
      - eol — can be set to `lf` or `crlf`. If unspecified, js2svg uses the
        platform EOL.
      - finalNewline — defaults to false. If true, js2svg ensures any SVG
        output has a final newline.
      
      Tests added to cover both options.
      e8321f0c
  7. 11 9月, 2021 3 次提交
  8. 05 9月, 2021 3 次提交
    • B
      Refactor cleanupIDs (#1556) · 298820b8
      Bogdan Chadkin 提交于
      I still did get how id generation works but data flow is clear now at
      least.
      
      - covered with types
      - migrated to visitor plugin api
      - got rid of traverse api
      298820b8
    • B
      Refactor minifyStyles plugin (#1552) · 10792240
      Bogdan Chadkin 提交于
      - migrated to visitor plugin api
      - covered with types
      - get rid from "traverse" usage
      
      Splitted the work to collecting and modifying when root exit.
      10792240
    • B
      Refactor removeUselessStrokeAndFill (#1549) · 93143f32
      Bogdan Chadkin 提交于
      The logic is a little messy. Will be better when we drop node 12 support
      and use optional chaining.
      
      - migrated to visitor plugin api
      - covered with types
      - get rid from patching params as plugin state
      - replaced many node.computedAttr() with style manager
      - enabled and fixed removeNone param test (was merged as muted back in 2017)
      - added ability to return null and not run visitor in plugins
      93143f32
  9. 04 9月, 2021 1 次提交
  10. 01 9月, 2021 2 次提交
    • B
      Refactor reusePaths plugin (#1551) · 1e5236d8
      Bogdan Chadkin 提交于
      - migrated to visitor plugin api; combination of enter and exit helped
        to fit into single traverse
      - got rid from the only node.clone() usage in the project so no need to
        reimplement it
      - the logic is a bit simplified
      1e5236d8
    • X
      Update devDependencies (#1550) · c80ffca0
      XhmikosR 提交于
      * @rollup/plugin-commonjs      ^17.1.0  →  ^20.0.0
      * @rollup/plugin-node-resolve  ^11.2.1  →  ^13.0.4
      * jest                         ^27.0.6  →  ^27.1.0
      * playwright                   ^1.14.0  →  ^1.14.1
      * rollup                       ^2.56.2  →  ^2.56.3
      * typescript                    ^4.3.5  →   ^4.4.2
      c80ffca0
  11. 28 8月, 2021 3 次提交
  12. 27 8月, 2021 4 次提交