1
0
mirror of https://github.com/svg/svgo.git synced 2025-09-17 08:02:12 +03:00

44 Commits

Author SHA1 Message Date
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
8c593fab06 chore: bulk update all jsdoc and jsdoctypes (#2114) 2025-05-01 22:16:52 +01:00
Seth Falco
4573d0178e chore: migrate plugin types to plugin (#2111) 2025-04-30 02:16:53 +01:00
LordArugula
55ae463649 Update links in _transforms.js (#2092)
docs: fixed dead link in doc comments
2025-04-11 08:14:15 +01:00
Nathan Baulch
0eccff2794 chore: fix various typos across the project 2025-03-22 11:49:01 +00:00
Viktor Szépe
559b9ad068 chore: resolve typos 2024-05-09 10:09:31 +01:00
johnkenny54
f49b6a717d fix: transformToMatrix() returns incorrect result for scale(n,0) (#1965) 2024-02-27 22:48:19 +00:00
johnkenny54
4884d59133 fix: revamp matrixToTransform 2024-02-05 21:47:31 +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
2661dacc24 fix(convertTransform): fix scale and rotate on skew + refactors (#1916) 2023-12-31 00:59:18 +00:00
Seth Falco
c2cacc7060 chore: move health files to .github (#1906) 2023-12-27 12:54:30 +00:00
Seth Falco
22533f1ffe chore: update prettier and eslint (#1885) 2023-12-15 13:10:21 +00:00
Jon Dufresne
40544220e8 chore: tidy up eslint config and usage (#1883) 2023-12-15 12:32:20 +00:00
Seth Falco
1df2e0fa39 fix(cleanupIds): skip generated ids for malformed references (#1817)
I also had some chores pending which were trivial individually, I opted
to incorporate them here as well.

* In JSDocs, use the nullable syntax as it's more concise and familiar
from TypeScript usage.
* discord → Discord (proper nouns should match capitalization)
* Use actions/checkout v4 instead of v2
2023-11-04 12:56:20 +00:00
Bogdan Chadkin
ac8edbaf41 Fix applying transform to arc with zero radius
Ref https://github.com/svg/svgo/issues/1500
2021-08-27 01:03:11 +03:00
Bogdan Chadkin
1b02799e18 Cover convertTransform plugin with types (#1542)
In this diff covered convertTransform pluginn with types
and got rid from global state which made data flow more complex and
error prone.
2021-08-25 20:52:31 +03:00
XhmikosR
75ec2943b0 Update minor and patch dependencies (#1528)
* @rollup/plugin-node-resolve  ^11.2.0  →  ^11.2.1
* @types/jest                  ^27.0.0  →  ^27.0.1
* colorette                     ^1.2.2  →   ^1.3.0
* commander                     ^7.1.0  →   ^7.2.0
* css-tree                      ^1.1.2  →   ^1.1.3
* eslint                       ^7.22.0  →  ^7.32.0
* playwright                    ^1.9.2  →  ^1.14.0
* prettier                      ^2.2.1  →   ^2.3.2
* rollup                       ^2.42.1  →  ^2.56.2
* typescript                    ^4.2.3  →   ^4.3.5
2021-08-15 13:57:58 +03:00
Bogdan Chadkin
61657433e1 Refactor apply transforms
- handle each command separately
- handle both relative and absolute commands
- moved into _applyTransforms.js to convert eventually into plugin
- apply transforms before converting into relative

These changes makes code independent and easy to work with.
2021-03-15 21:24:23 +03:00
Bogdan Chadkin
a896d5de13 Format plugins utilities with prettier (#1394)
Note: review with hidden whitespaces
2021-03-03 01:33:44 +03:00
XhmikosR
1310210d4e Use https when possible and fix an inactive domain (#1374) 2021-02-25 13:48:18 +03:00
Bogdan Chadkin
a7cc20bb43 Setup recommended eslint preset (#1345)
This is usually enough to prevent silly mistakes.
Formatting will be done by prettier after merging pull requests.
2021-02-19 15:26:07 +03:00
GreLI
e1dd31cf84 Fix 180deg ‘convertTransform’
Fix NaN after Math.acos due to error making illegal value out of bounds
Fix #1101
2019-07-14 18:51:50 +03:00
GreLI
eeeb67d5a8 Fix convertTransform wrong rotate sign
Fix #986
2018-09-16 19:47:51 +03:00
GreLI
1a3c32bb43 Fix error due to invalid transform. Close #846 2017-11-22 22:30:02 +03:00
JoshyPHP
40bcb7f996 Fix arcto sweep flag when a transformation matrix is applied
When a transformation matrix flips the coordinates horizontally or vertically (but not both) clockwise arcs need to become counterclockwise and vice-versa.

Fixes #708
2017-06-30 14:35:02 +02:00
GreLI
9b84827382 Fixed sign losing in scale matrix. Fixes #513 2016-03-08 09:54:18 +03:00
GreLI
1d6343fdf8 Кemoved unused variable and jshint error fix 2015-11-21 13:50:17 +03:00
GreLI
da442cbb8d Amend transform parsing to parse numbers. Prevents producing NaNs in paths in case of absent numbers separator. 2015-11-21 13:46:13 +03:00
GreLI
ece38e3758 Fixed correction of out-of-range radii. Resolves #407 2015-08-05 16:42:00 +03:00
GreLI
1253a0cc16 Corrected test passing after empty transform fix 2015-07-08 16:13:54 +03:00
GreLI
a0616b0b82 Don't fail on empty transform. Fixes #394 2015-07-05 13:11:31 +03:00
Yoshiya Hinosawa
3f8e6fd15c Fix lint 2015-06-12 00:25:32 +09:00
GreLI
c1bf5baf97 Proper arcs transforming with SVD 2015-05-24 20:50:49 +03:00
GreLI
ff5e89d5bf Reworked transform manipulation 2015-05-24 20:50:47 +03:00
GreLI
d0c3355056 Separate property for transformations precision with the increased value by default. Resolves #334 2015-04-12 22:38:29 +03:00
GreLI
97a260bbf3 Proper computations with optional rotate() parameters 2015-04-06 14:47:12 +03:00
GreLI
86ab59ceb5 Take in account optional ‘rotate()’ parameters.
Fixes #243, fixes #294.
2015-03-22 18:12:09 +03:00
GreLI
bbeca0604a Transformations now apply to paths with arcs 2014-11-04 17:34:31 +03:00
deepsweet
fc36d63d99 plugins/_transforms: allow spaces at the beginning of transform 2013-04-11 17:44:26 +03:00
deepsweet
f50b4f8ca8 plugins/convertTransform: bug with trailing spaces in transform value string (fix #103) 2013-02-22 16:43:18 +02:00
deepsweet
3faa6d1de5 plugins/convertTransforms: wrong translate() shorthand (fix #94) 2013-02-06 17:45:04 +02:00
deepsweet
ea2c61ae87 minor JSHint warning fix 2012-12-23 22:18:29 +02:00
deepsweet
c29a3f9259 plugins/convertPathData: apply transforms to Path pata (close #33) 2012-12-23 14:44:52 +02:00