File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- ^10
1+ ^12
Original file line number Diff line number Diff line change 11language : node_js
22node_js :
3- - ' 8 '
4- - ' 9 '
5- - ' 10 '
3+ - ' 12 '
4+ - ' 14 '
5+ - ' 16 '
66matrix :
77 fast_finish : true
8- allow_failures :
9- - node_js : ' 8'
10- - node_js : ' 9'
118after_success :
129 - ' yarn coverage'
1310 - ' yarn coverall'
Original file line number Diff line number Diff line change 1+ # [ 2.0.0]
2+ ###### 2022-02-14
3+
4+ ###### Changed
5+ - Migration to PostCSS 8
6+ - Updated compatible node versions
7+
8+
19# [ 1.1.3]
210###### 2021-03-02
311
Original file line number Diff line number Diff line change @@ -38,17 +38,17 @@ function postCSSReplace(opts = defaults) {
3838 OnceExit ( root ) {
3939 root [ options . commentsOnly ? 'walkComments' : 'walk' ] ( ( node ) => {
4040
41- // Before we had the switch statement, we just used node.replaceValues(). This could potentially lead to
41+ // Before the switch statement was used , we used node.replaceValues(). This lead to
4242 // incorrect behaviour as described in https://github.com/gridonic/postcss-replace/issues/5.
4343 //
44- // So for example if the CSS contains at-rules like @media, calling replaceValues() would replace
44+ // For example: if the CSS contains at-rules like @media, calling replaceValues() would replace
4545 // everything inside the @media { … } statement and since we are walking through *all* nodes, we would
4646 // encounter the nodes from the @media statement again in the next iteration/call of our walk function.
4747 //
4848 // This is why we have refactored the logic of the walk function to use a switch statement in order to do
4949 // the replacement only on the relevant nodes and use the appropriate replacement logic.
5050 //
51- // Furthermore it also makes adding/handling new cases quite comfortable.
51+ // This makes adding/handling new cases quite comfortable.
5252 //
5353 // @see http://api.postcss.org/
5454 switch ( node . constructor . name ) {
Original file line number Diff line number Diff line change 11{
22 "name" : " postcss-replace" ,
3- "version" : " 1.1.3 " ,
3+ "version" : " 2.0.0 " ,
44 "author" : " Gridonic <hello@gridonic.ch>" ,
55 "license" : " MIT" ,
66 "keywords" : [
You can’t perform that action at this time.
0 commit comments