93 Commits
Author SHA1 Message Date
Andrey Sitnik 69d5b399fd Fix Maximum call stack size exceeded error 2026-07-11 19:06:38 +00:00
Andrey Sitnik d3d4d735df Update ESLint config 2025-02-19 13:43:47 +00:00
Andrey Sitnik d1b31e0cb7 Typo 2024-09-14 16:37:20 +02:00
Andrey Sitnik a022e827e5 Fix error on inserting node without raws in some cases 2024-09-14 14:26:05 +00:00
Andrey Sitnik cc0e48619f Update unnecessary check 2024-09-04 09:33:10 +00:00
Andrey Sitnik 12a39c65db Update AST if it is not made by PostCSS >= 8.4.41 2024-09-01 19:03:55 +00:00
Andrey Sitnik 19afb318d6 Sort source code and fix ESLint 2024-08-31 23:26:27 +02:00
Natalie Weizenbaum 3069626bc7 Require either selector or selectors in RuleProps
This ensures that `ChildProps` requires at least one of concrete
property which indicates what type of node should be created.

Also updates `Container.normalize()` to create a `Rule()` when passed
`{selectors: ...}`.
2024-07-26 15:40:39 -07:00
Andrey Sitnik 0bad39f202 Make name more clear 2024-07-23 22:53:07 +00:00
Andrey Sitnik c7fb782e1e Allow to pass undefined to adding methods to simplify type check 2024-02-06 22:00:37 +01:00
Andrey Sitnik 584d6a8a91 Update linter 2023-09-18 23:22:49 +02:00
Andrey Sitnik 89b7f7ac78 Update dependencies and code style 2023-07-06 13:38:48 +02:00
Romain Menke 1d23b60534 fix whitespace bug 2022-11-10 23:42:08 +01:00
Romain Menke 173443ab01 recalculate the insertion index after normalizing a node 2022-09-30 11:06:51 +02:00
Andrey Sitnik e40879929c Typo 2022-08-06 20:58:41 +02:00
Andrey Sitnik 1fc766bde8 Improve AST migration 2022-08-06 20:22:49 +02:00
Jordan Pittman 1d6117c754 Fix append() failing after mutating nodes through .parent 2022-04-29 13:42:14 -04:00
Andrey Kim c5059e1501 Convert istanbul ignores to c8 2021-11-15 23:10:13 +03:00
Andrey Sitnik b95e2b1094 Set my flag after changing prototype 2021-06-17 06:19:41 +03:00
Andrey Sitnik fb1894f7ee Hot fix for broken isClean on AST dublication 2021-06-13 13:39:27 -04:00
Aleks Hudochenkov 430ee0d902 Add Document node and related API (#1498) 2021-05-16 20:15:56 +02:00
Andrey Sitnik 843ab11b6e Add Prettier 2021-03-11 19:11:37 -05:00
Andrey Sitnik cba5e2db86 Fix AST after moving nodes in visitor 2020-12-02 22:12:05 -05:00
Remco Haszing b94a22e19f Fix usage of default exports with TypeScript
This is done by assigning the property `default` for all properties that are
exported using `export default` according to their type definitions.

Closes #1424
2020-11-10 14:24:37 +01:00
Andrey Sitnik a99b67b5de Fix import order 2020-10-01 19:32:56 -04:00
Andrey Sitnik c20d10df29 Fix visiting parent on nested children changes 2020-09-23 18:47:27 -04:00
Andrey Sitnik fbb522d5f3 FIx a way to rebuild PostCSS 7 nodes 2020-09-23 12:59:52 -04:00
Adam WathanandGitHub e8f544a93b Fix #1419 (#1422)
This conditional was always returning false because it wasn't passed the necessary `this` context, so nodes were being rebuilt with tons of important properties missing.
2020-09-22 22:04:25 -04:00
Andrey Sitnik 81e5ea6668 Rebuild PostCSS 7 nodes 2020-09-21 20:40:43 -04:00
Andrey Sitnik 8f8bfe31d7 Fix child adding methods in Container 2020-09-20 12:47:05 -04:00
Andrey Sitnik 0048657b13 Add "use strict" because it may effect on tokenizer performance 2020-09-08 01:46:46 -04:00
Andrey Sitnik 887783b405 Change plugin running code and mark moved nodes as dirty 2020-09-05 00:31:30 -04:00
Andrey Sitnik 15d0f4b7e4 Speed up async visitor API 2020-09-01 00:12:25 -04:00
Andrey Sitnik 168adcf14d Clean up code 2020-08-24 21:36:07 -05:00
Andrey Sitnik 6df84fce5e Fix two args walk methods in proxies 2020-08-24 21:24:28 -05:00
Andrey Sitnik ddacc34852 Add Plugin#prepare() 2020-08-22 15:34:57 -05:00
Andrey Sitnik 6fbb0d5434 Change plugin API 2020-08-06 16:00:46 -07:00
Andrey Sitnik c3b3015661 Improve test coverage 2020-08-04 17:37:21 -07:00
Andrey Sitnik 5ad0c91e31 Add async visitor support 2020-08-04 16:37:30 -07:00
Andrey Sitnik 8aae507a45 Clean up types and replace JSDoc to TypeDoc 2020-07-08 17:55:13 -07:00
Andrey Sitnik fa6b5f9981 Add PrettierX 2020-07-06 17:24:57 -07:00
MapGridandAndrey Sitnik 982bc498c6 Fix circular dependencies (#1321)
* fix circular dependencies

* move to static methods to fix imports

* remove default import from terminal highlight
2020-06-21 19:13:53 -04:00
Andrey Sitnik f157349a49 SHortut for \S regexp 2020-06-21 19:13:53 -04:00
Andrey Sitnik 7a0bf06706 Clean up visitor API 2020-06-21 19:13:53 -04:00
Andrey Sitnik 288d2ffdb6 Clean up code 2020-06-21 19:13:53 -04:00
Andrey Sitnik 04b816cbde Remove Babel 2020-06-21 19:13:52 -04:00
Andrey Sitnik f43a45a907 Use .es6 ext for ES6 sources 2015-08-17 16:20:40 +03:00
Andrey Sitnik 3d14ec8199 Clean up code 2015-08-17 16:20:38 +03:00
Andrey Sitnik 137024f2b8 Fix depreacted getters for raw properties 2015-08-17 16:20:37 +03:00
Andrey Sitnik b76b5a34fc Move code style properties to Node#raw 2015-08-17 16:20:37 +03:00