1
0
mirror of https://github.com/svg/svgo.git synced 2026-01-25 18:41:39 +03:00
Commit Graph

43 Commits

Author SHA1 Message Date
Seth Falco
747cc722d9 chore: revamp how we export types (#2118) 2025-05-04 17:39:44 +01:00
Seth Falco
49954bc0d9 chores: various clean ups regardin ESM and TypeScript (#2117) 2025-05-03 09:42:29 +01:00
Seth Falco
a8a53dbd90 chore: apply more eslint rules (#2116) 2025-05-02 10:00:37 +01:00
Seth Falco
0ff7f24092 deps: upgrade rollup and @rollup/plugin-commonjs (#2110) 2025-04-29 11:07:00 +01:00
Seth Falco
df87725b19 chore: improve jsdoc types and match most files (#2108) 2025-04-29 10:35:11 +01:00
Seth Falco
71a1254895 fix: improve jsdoc types and remove excludes (#2107) 2025-04-28 22:24:16 +01:00
Seth Falco
e065d1000e deps: upgrade pixelmatch for performance improvements (#2102) 2025-04-11 16:22:50 +01:00
Seth Falco
e9c3be7a27 test: use latest version of svgo-test-suite (#2100) 2025-04-11 13:12:32 +01:00
Seth Falco
f3495ff6c9 fix(removeEmptyContainers): skip if filter is applied via styles as well (#2089)
Fixes a bug where we were too eager to remove empty containers.

We already had logic to skip removing empty containers if it had the
filter attribute, which is needed to apply a filter to the whole area.
However, the filter can also be defined through CSS. We did not
properly handle this case, and treated the node as if it had no filter
at all.

This computes the styles and checks the stylesheet as well. (We also
move the logic down to avoid computing the styles eagerly.)
2024-12-22 16:01:22 +00:00
nuintun
bf97a1f9a9 deps: upgrade css-tree and picocolors (#2083) 2024-12-21 23:46:09 +00:00
XhmikosR
1bb5bbe39e chore!: Update commander to v11 (#2004) 2024-06-07 20:23:59 +01:00
Seth Falco
f604c6979e chore: migrate to upstream sax (#2017) 2024-05-28 08:39:38 +01:00
XhmikosR
4daaa4251f chore: update ESLint to v9 and switch to flat config (#2001) 2024-05-26 13:22:23 +01:00
XhmikosR
83bfee4768 chore(tests): switch to native fetch (#2003) 2024-05-26 00:11:00 +01:00
XhmikosR
9a1c7496a5 chore: update yarn to v3.8.2 (#1989) 2024-05-14 20:07:03 +01:00
XhmikosR
3c155ccfec chore: add cross-env and rimraf so that tests work everywhere (#1988) 2024-05-14 19:28:39 +01:00
XhmikosR
2bbaba4f0a chore: update devDependencies (#1987) 2024-05-14 19:01:09 +01:00
XhmikosR
506c08aa98 chore: remove del devDependency (#1986) 2024-05-09 10:20:36 +01:00
Jon Dufresne
4bb3d8844f chore: Upgrade @types/css-tree to remove @ts-ignore comment (#1934) 2024-01-08 22:50:25 +00:00
Jon Dufresne
2442f74239 chore: convert project to us ECMAScript modules (preserving CJS compatibility) (#1905) 2024-01-03 16:17:37 +00:00
Seth Falco
967d2f1e14 deps: update css-tree and clean ts-ignores (#1911) 2023-12-27 13:51:50 +00:00
Jon Dufresne
4768af63e4 chore: Update @types/csso and correct types (#1910) 2023-12-27 13:09:56 +00:00
mozzie
90406f7967 refactor(mergePaths): improve performance on large files (#1764) 2023-12-26 00:53:44 +00:00
Seth Falco
2c408ce56f refactor: improve regression testing (#1898) 2023-12-23 06:56:46 +00:00
Seth Falco
22533f1ffe chore: update prettier and eslint (#1885) 2023-12-15 13:10:21 +00:00
Seth Falco
b740c07695 fix(inlineStyles): dont remove wrapper class if traversed (#1832) 2023-11-13 14:53:30 +00:00
Seth Falco
5aad38bcc7 fix(inlineStyles): empty css block created empty attribute (#1823)
When running this plugin on an SVG with an empty block in the CSS, it
would apply it to the matched elements by adding an empty `style`
attribute. See the test for an example.

This resolves that by just dropping the declaration if it's empty.
2023-11-07 23:20:48 +00:00
Seth Falco
e56a338234 deps: update @babel/traverse (#1813)
Updates a vulnerable dependency, only impacting dev and CI.
2023-10-22 17:29:55 +01:00
Seth Falco
197be56958 deps: update deps based on dependabot alerts (#1799)
* Deduplicate dependencies in our `yarn.lock` file with `yarn dedupe`.
* Upgrade dependencies with Dependabot alerts with `yarn up -R {}`.

This only impacted devDependencies, and does nothing to our tests or
bundle sizes, etc.
2023-09-25 21:32:55 +01:00
Seth Falco
42f7752db1 fix(cleanupIds): handle when 2 ids referenced in one attr (#1795) 2023-09-25 19:04:31 +01:00
Seth Falco
82593c6134 test: update jest (#1792) 2023-09-24 17:50:38 +01:00
Seth Falco
59ab80eed2 test: fix regression testing action (#1788)
The regression-test GitHub Action was failing for all pull requests due
to not handling the gzipped archive properly.

This resolved it by piping the response body to zlib#createGunzip
first. Also updates the relevant dependencies.

Signed-off-by: Seth Falco <seth@falco.fun>
Co-authored-by: strarsis <strarsis@gmail.com>
Co-authored-by: Bogdan Chadkin <trysound@yandex.ru>
2023-09-23 07:47:30 +01:00
Bogdan Chadkin
2f8adced74 Upgrade css-tree types 2022-11-18 12:00:54 +03:00
Bogdan Chadkin
216082c591 Remove unused json plugin 2022-11-11 13:11:54 +03:00
Bogdan Chadkin
12272958db Upgrade csso and csstree 2022-10-08 14:57:57 +03:00
Raphael Boidol
2ea65860f0 Remove stable package in favor of native stable sort (#1681) 2022-10-01 21:21:09 +03:00
Bogdan Chadkin
fdc9ceb914 Upgrade to css-select 5 2022-10-01 16:33:51 +03:00
Bogdan Chadkin
5fa6bf0e21 Upgrade checks 2022-10-01 16:08:01 +03:00
Bogdan Chadkin
4769027865 Upgrade build 2022-10-01 16:00:07 +03:00
Bogdan Chadkin
ce21f9b54a Upgrade to yarn 3 2022-10-01 15:47:29 +03:00
Bogdan Chadkin
4b4391fbe3 Refactor basic cli tests (#1595)
Moved some tests to cli.test.js and got rid from mock-stdin dependency.
2021-10-15 12:34:24 +03:00
Bogdan Chadkin
d29cec48e3 Migrate to picocolors (#1606)
Ref https://github.com/ai/nanocolors#nano-colors

Nanocolors is deprecated in favour of picocolors to avoid drama.
All dependencies already migrated. Also fixed one vulnerability.

The main change is step away from named exports and dual modules
support in favour of smaller package.
2021-10-15 12:09:54 +03:00
Bogdan Chadkin
5fb42ab47a Migrate to yarn 2 (#1602)
Yarn supports windows with custom shell, has better tools for
dependencies upgrade and more readable lockfile.

Migrated with preserving lockfile data.
2021-10-05 16:06:12 +03:00