diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 26eab00..fa9ec0d 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - node: [10, 12, 14] + node: [12, 14, 16] os: [ubuntu-latest] steps: diff --git a/changelog.md b/changelog.md index f0871e8..90ae404 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,18 @@ +## 0.16.0 (2021-06-03) + +* ci: drop support old node ([5f85311](https://github.com/posthtml/posthtml/commit/5f85311)) +* build: update depdev ([4d1a12f](https://github.com/posthtml/posthtml/commit/4d1a12f)) +* build(deps): bump handlebars from 4.7.6 to 4.7.7 ([0473fcb](https://github.com/posthtml/posthtml/commit/0473fcb)) +* build(deps): bump hosted-git-info from 2.8.8 to 2.8.9 ([c53be65](https://github.com/posthtml/posthtml/commit/c53be65)) +* build(deps): bump lodash from 4.17.20 to 4.17.21 ([3e73913](https://github.com/posthtml/posthtml/commit/3e73913)) +* test: fix match content false ([b07aa0b](https://github.com/posthtml/posthtml/commit/b07aa0b)) +* Update readme.md ([dc74d4f](https://github.com/posthtml/posthtml/commit/dc74d4f)) + + + ## 0.15.2 (2021-04-13) +* 0.15.2 ([64a1aeb](https://github.com/posthtml/posthtml/commit/64a1aeb)) * build: update dependencies ([a7a5d59](https://github.com/posthtml/posthtml/commit/a7a5d59)) * build(deps): bump ini from 1.3.5 to 1.3.8 ([919a412](https://github.com/posthtml/posthtml/commit/919a412)) * build(deps): bump y18n from 4.0.0 to 4.0.1 ([0d8d16e](https://github.com/posthtml/posthtml/commit/0d8d16e)) diff --git a/lib/index.js b/lib/index.js index 19fa6f5..b20d79f 100644 --- a/lib/index.js +++ b/lib/index.js @@ -2,7 +2,7 @@ const pkg = require('../package.json') const Api = require('./api.js') let { default: parser } = require('posthtml-parser') -let render = require('posthtml-render') +let { default: render } = require('posthtml-render') /** * @author Ivan Voischev (@voischev), diff --git a/package-lock.json b/package-lock.json index 6fa3324..19a56d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "posthtml", - "version": "0.15.2", + "version": "0.16.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1146,6 +1146,12 @@ } } }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, "indent-string": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", @@ -1547,12 +1553,12 @@ } }, "dom-serializer": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.1.tgz", - "integrity": "sha512-Pv2ZluG5ife96udGgEDovOOOA5UELkltfJpnIExPrAk1LTvecolUGn6lIaoLh86d83GiB86CjzciMd9BuRB71Q==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", + "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", "requires": { "domelementtype": "^2.0.1", - "domhandler": "^4.0.0", + "domhandler": "^4.2.0", "entities": "^2.0.0" } }, @@ -1562,21 +1568,21 @@ "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==" }, "domhandler": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.1.0.tgz", - "integrity": "sha512-/6/kmsGlMY4Tup/nGVutdrK9yQi4YjWVcVeoQmixpzjOUK1U7pQkvAPHBJeUxOgxF0J8f8lwCJSlCfD0V4CMGQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.0.tgz", + "integrity": "sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA==", "requires": { "domelementtype": "^2.2.0" } }, "domutils": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.5.2.tgz", - "integrity": "sha512-MHTthCb1zj8f1GVfRpeZUbohQf/HdBos0oX5gZcQFepOZPLLRyj6Wn7XS7EMnY7CVpwv8863u2vyE83Hfu28HQ==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.6.0.tgz", + "integrity": "sha512-y0BezHuy4MDYxh6OvolXYsH+1EMGmFbwv5FKW7ovwMG6zTPWqNPq3WF9ayZssFq+UlKdffGLbOEaghNdaOm1WA==", "requires": { "dom-serializer": "^1.0.1", "domelementtype": "^2.2.0", - "domhandler": "^4.1.0" + "domhandler": "^4.2.0" } }, "dot-prop": { @@ -1896,6 +1902,12 @@ "locate-path": "^2.0.0" } }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, "load-json-file": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", @@ -2468,6 +2480,12 @@ "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", "dev": true }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, "indent-string": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", @@ -2785,9 +2803,9 @@ "dev": true }, "handlebars": { - "version": "4.7.6", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", - "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", "dev": true, "requires": { "minimist": "^1.2.5", @@ -2831,10 +2849,13 @@ "dev": true }, "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", - "dev": true + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.8.tgz", + "integrity": "sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } }, "html-escaper": { "version": "2.0.2", @@ -3428,9 +3449,9 @@ } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "lodash._reinterpolate": { @@ -3633,6 +3654,12 @@ "path-exists": "^4.0.0" } }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, "locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -4038,17 +4065,6 @@ "resolve": "^1.17.0", "semver": "^7.3.2", "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "hosted-git-info": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.7.tgz", - "integrity": "sha512-fWqc0IcuXs+BmE9orLDyVykAG9GJtGLGuZAAqgcckPgv5xad4AcXGIv8galtQvlwutxSlaMcdw7BUtq2EIvqCQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } } }, "normalize-path": { @@ -4458,17 +4474,17 @@ } }, "posthtml-parser": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.7.2.tgz", - "integrity": "sha512-LjEEG/3fNcWZtBfsOE3Gbyg1Li4CmsZRkH1UmbMR7nKdMXVMYI3B4/ZMiCpaq8aI1Aym4FRMMW9SAOLSwOnNsQ==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.9.0.tgz", + "integrity": "sha512-Ybw75S+aNJuXCoCUBF2drLRip18cwbT4IBKAT6Xx7VU6FxjuDIV5VofPZRQzgwzGsASZ++5JpRhK3vagPZ4JIQ==", "requires": { "htmlparser2": "^6.0.0" } }, "posthtml-render": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/posthtml-render/-/posthtml-render-1.4.0.tgz", - "integrity": "sha512-W1779iVHGfq0Fvh2PROhCe2QhB8mEErgqzo1wpIt36tCgChafP+hbXIhLDOM8ePJrZcFs0vkNEtdibEWVqChqw==" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/posthtml-render/-/posthtml-render-2.0.2.tgz", + "integrity": "sha512-By40bprm6+wkcA+ss+TMQXMbDmKJAsynDJJlgV2xorLM7bMUG3k0WSmzfeyNRlfta9pPkDreB8m2EaN433ZtxQ==" }, "prelude-ls": { "version": "1.2.1", @@ -4553,6 +4569,12 @@ "path-type": "^3.0.0" }, "dependencies": { + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", diff --git a/package.json b/package.json index 7d35814..6e99ce7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "posthtml", - "version": "0.15.2", + "version": "0.16.0", "description": "HTML/XML processor", "keywords": [ "html", @@ -20,11 +20,11 @@ "lib" ], "engines": { - "node": ">=10.0.0" + "node": ">=12.0.0" }, "dependencies": { - "posthtml-parser": "^0.7.2", - "posthtml-render": "^1.3.1" + "posthtml-parser": "^0.9.0", + "posthtml-render": "^2.0.2" }, "devDependencies": { "@commitlint/cli": "^11.0.0", diff --git a/readme.md b/readme.md index f0fa102..9cb9307 100644 --- a/readme.md +++ b/readme.md @@ -856,7 +856,7 @@ See [PostHTML Guidelines](plugins/guide.md) and [CONTRIBUTING](CONTRIBUTING.md). Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/posthtml#backer)] - + ## LICENSE diff --git a/test/api.js b/test/api.js index 8b622a0..e3065fb 100644 --- a/test/api.js +++ b/test/api.js @@ -238,8 +238,8 @@ describe('API', () => { }) it('false', done => { - const html = '
' - const reference = '
' + const html = '
' + const reference = '
' test(html, reference, plugin, {}, done) diff --git a/test/parser.js b/test/parser.js index dbd5f8f..ad6ac21 100644 --- a/test/parser.js +++ b/test/parser.js @@ -5,7 +5,7 @@ const { it, describe } = require('mocha') const { expect } = require('chai') const { default: parser } = require('posthtml-parser') -const render = require('posthtml-render') +const { default: render } = require('posthtml-render') const html = readFileSync( path.resolve(__dirname, 'templates/parser.html'), 'utf8'