From ec0d9253df7fed586aba5207c69d7d4bcfb67abf Mon Sep 17 00:00:00 2001 From: Dennis Schenk Date: Mon, 14 Feb 2022 11:50:06 +0100 Subject: [PATCH] Bumped version number and supported node versions --- .node-version | 2 +- .travis.yml | 9 +++------ CHANGELOG.md | 8 ++++++++ index.js | 6 +++--- package.json | 2 +- 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.node-version b/.node-version index b64e11f..b4d617f 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -^10 +^12 diff --git a/.travis.yml b/.travis.yml index 34fa8ad..40246cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,10 @@ language: node_js node_js: - - '8' - - '9' - - '10' + - '12' + - '14' + - '16' matrix: fast_finish: true - allow_failures: - - node_js: '8' - - node_js: '9' after_success: - 'yarn coverage' - 'yarn coverall' diff --git a/CHANGELOG.md b/CHANGELOG.md index 16f9de9..c54641f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# [2.0.0] +###### 2022-02-14 + +###### Changed +- Migration to PostCSS 8 +- Updated compatible node versions + + # [1.1.3] ###### 2021-03-02 diff --git a/index.js b/index.js index 37e867c..2da55c7 100644 --- a/index.js +++ b/index.js @@ -38,17 +38,17 @@ function postCSSReplace(opts = defaults) { OnceExit(root) { root[options.commentsOnly ? 'walkComments' : 'walk']((node) => { - // Before we had the switch statement, we just used node.replaceValues(). This could potentially lead to + // Before the switch statement was used, we used node.replaceValues(). This lead to // incorrect behaviour as described in https://github.com/gridonic/postcss-replace/issues/5. // - // So for example if the CSS contains at-rules like @media, calling replaceValues() would replace + // For example: if the CSS contains at-rules like @media, calling replaceValues() would replace // everything inside the @media { … } statement and since we are walking through *all* nodes, we would // encounter the nodes from the @media statement again in the next iteration/call of our walk function. // // This is why we have refactored the logic of the walk function to use a switch statement in order to do // the replacement only on the relevant nodes and use the appropriate replacement logic. // - // Furthermore it also makes adding/handling new cases quite comfortable. + // This makes adding/handling new cases quite comfortable. // // @see http://api.postcss.org/ switch (node.constructor.name) { diff --git a/package.json b/package.json index bd3b035..d04e389 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postcss-replace", - "version": "1.1.3", + "version": "2.0.0", "author": "Gridonic ", "license": "MIT", "keywords": [