From 43dbcfc7e97b7b1445b3f98d641b74690a1722b9 Mon Sep 17 00:00:00 2001 From: Stefan Warman Date: Mon, 8 Oct 2018 15:19:21 +0200 Subject: [PATCH 01/12] Create LICENSE --- LICENSE | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..abdebcd --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2015 Tobias Koppers + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From 81477c2ec013b69f54101f7dfa6bbc0d2fbe3f23 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 30 Oct 2018 14:29:34 +0100 Subject: [PATCH 02/12] 0.7.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6bcbe78..2eba535 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "css-selector-tokenizer", - "version": "0.7.0", + "version": "0.7.1", "description": "Parses and stringifies CSS selectors", "main": "lib/index.js", "scripts": { From 0700f97898a5db1c119928b56f827962f0a8a221 Mon Sep 17 00:00:00 2001 From: Avi Vahl Date: Sat, 22 Feb 2020 17:20:56 +0200 Subject: [PATCH 03/12] chore(deps): upgrade to latest stable - cleaned up travis.yml. it now runs node 10/12/13. - cleaner coverage report scripts for each service. - replaced deprecated instanbul with nyc. - removed autotest. mocha has its own watcher (npm test -- -w) --- .gitignore | 2 ++ .travis.yml | 18 ++++++++---------- lib/stringify.js | 6 ++---- package.json | 26 ++++++++++++-------------- 4 files changed, 24 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index ba2a97b..3e3c0c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ node_modules coverage +.nyc_output +package-lock.json diff --git a/.travis.yml b/.travis.yml index 48895d4..8892eee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,13 @@ -sudo: false language: node_js + node_js: - - "0.10" - - "0.12" - - "iojs" -script: npm run travis + - 10 + - 12 + - 13 -before_install: - - '[ "${TRAVIS_NODE_VERSION}" != "0.10" ] || npm install -g npm' +script: npm run cover after_success: - - cat ./coverage/lcov.info | node_modules/.bin/coveralls --verbose - - cat ./coverage/coverage.json | node_modules/codecov.io/bin/codecov.io.js - - rm -rf ./coverage + - npm run report:coveralls + - npm run report:codecov + diff --git a/lib/stringify.js b/lib/stringify.js index 1c9d6aa..f96662b 100644 --- a/lib/stringify.js +++ b/lib/stringify.js @@ -1,10 +1,8 @@ "use strict"; -var stringify; - var regexpu = require("regexpu-core"); var identifierEscapeRegexp = new RegExp( - regexpu("(^[^A-Za-z_\\-\\u{00a0}-\\u{10ffff}]|^\\-\\-|[^A-Za-z_0-9\\-\\u{00a0}-\\u{10ffff}])", "ug"), + regexpu("(^[^A-Za-z_\\-\\u{00a0}-\\u{10ffff}]|^--|[^A-Za-z_0-9\\-\\u{00a0}-\\u{10ffff}])", "ug"), "g" ); @@ -53,7 +51,7 @@ function stringifyWithoutBeforeAfter(tree) { } -stringify = function stringify(tree) { +function stringify(tree) { var str = stringifyWithoutBeforeAfter(tree); if(tree.before) { str = tree.before + str; diff --git a/package.json b/package.json index 2eba535..3bdec08 100644 --- a/package.json +++ b/package.json @@ -4,13 +4,12 @@ "description": "Parses and stringifies CSS selectors", "main": "lib/index.js", "scripts": { - "lint": "eslint lib", + "lint": "eslint .", "pretest": "npm run lint", "test": "mocha", - "autotest": "chokidar lib test -c 'npm test'", - "precover": "npm run lint", - "cover": "istanbul cover node_modules/mocha/bin/_mocha", - "travis": "npm run cover -- --report lcovonly", + "cover": "nyc npm test", + "report:coveralls": "nyc report --reporter=text-lcov | coveralls", + "report:codecov": "nyc report --reporter=text-lcov | codecov --pipe", "publish-patch": "npm test && npm version patch && git push && git push --tags && npm publish" }, "repository": { @@ -31,17 +30,16 @@ }, "homepage": "https://github.com/css-modules/css-selector-tokenizer", "dependencies": { - "cssesc": "^0.1.0", - "fastparse": "^1.1.1", - "regexpu-core": "^1.0.0" + "cssesc": "^3.0.0", + "fastparse": "^1.1.2", + "regexpu-core": "^4.6.0" }, "devDependencies": { - "chokidar-cli": "^0.2.1", - "codecov.io": "^0.1.2", - "coveralls": "^2.11.2", - "eslint": "^0.21.2", - "istanbul": "^0.3.14", - "mocha": "^2.2.5" + "codecov": "^3.6.5", + "coveralls": "^3.0.9", + "eslint": "^6.8.0", + "mocha": "^7.0.1", + "nyc": "^15.0.0" }, "directories": { "test": "test" From aa5fbbb33c4f4a0ebf237b61385a14ffe026b0b1 Mon Sep 17 00:00:00 2001 From: Avi Vahl Date: Sat, 22 Feb 2020 17:48:51 +0200 Subject: [PATCH 04/12] config(lint): stricter eslint configuration and several newly-found unneeded regex escapes. --- .eslintrc | 7 ------- .eslintrc.json | 12 ++++++++++++ lib/parseValues.js | 4 ++-- lib/stringify.js | 4 ++-- 4 files changed, 16 insertions(+), 11 deletions(-) delete mode 100644 .eslintrc create mode 100644 .eslintrc.json diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 89b84db..0000000 --- a/.eslintrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "env": { - "node": true - }, - "rules": { - } -} diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..217c525 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,12 @@ +{ + "env": { + "browser": true, + "commonjs": true, + "es6": true, + "node": true + }, + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": 2018 + } +} \ No newline at end of file diff --git a/lib/parseValues.js b/lib/parseValues.js index 97be01b..690c093 100644 --- a/lib/parseValues.js +++ b/lib/parseValues.js @@ -136,12 +136,12 @@ var parser = new Parser({ "url\\((\\s*)(\"(?:[^\\\\\"]|\\\\.)*\")(\\s*)\\)": urlMatch, "url\\((\\s*)('(?:[^\\\\']|\\\\.)*')(\\s*)\\)": urlMatch, "url\\((\\s*)((?:[^\\\\)'\"]|\\\\.)*)(\\s*)\\)": urlMatch, - "([\\w\-]+)\\((\\s*)": nestedItemMatch, + "([\\w-]+)\\((\\s*)": nestedItemMatch, "(\\s*)(\\))": nestedItemEndMatch, ",(\\s*)": commaMatch, "\\s+$": endSpacingMatch, "\\s+": spacingMatch, - "[^\\s,\)]+": itemMatch + "[^\\s,)]+": itemMatch } }); diff --git a/lib/stringify.js b/lib/stringify.js index f96662b..4673a8b 100644 --- a/lib/stringify.js +++ b/lib/stringify.js @@ -13,7 +13,7 @@ function escape(str, identifier) { if (identifier) { return str.replace(identifierEscapeRegexp, "\\$1"); } else { - return str.replace(/(^[^A-Za-z_\\-]|^\-\-|[^A-Za-z_0-9\\-])/g, "\\$1"); + return str.replace(/(^[^A-Za-z_\\-]|^--|[^A-Za-z_0-9\\-])/g, "\\$1"); } } @@ -60,6 +60,6 @@ function stringify(tree) { str = str + tree.after; } return str; -}; +} module.exports = stringify; From d45d1473cade579f38d9f566ae3ad331c0ba9747 Mon Sep 17 00:00:00 2001 From: Avi Vahl Date: Sat, 22 Feb 2020 17:58:45 +0200 Subject: [PATCH 05/12] README: update watch command also moved badges to top, and ensured https is used for codecov. --- README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5d80690..91976c9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ -# CSS Modules: CSS selector Tokenizer +# CSS Modules: css-selector-tokenizer +[![Build Status](https://travis-ci.org/css-modules/css-selector-tokenizer.svg?branch=master)](https://travis-ci.org/css-modules/css-selector-tokenizer) +[![coveralls.io](https://coveralls.io/repos/css-modules/css-selector-tokenizer/badge.svg?branch=master)](https://coveralls.io/r/css-modules/css-selector-tokenizer?branch=master) +[![codecov.io](https://codecov.io/github/css-modules/css-selector-tokenizer/coverage.svg?branch=master)](https://codecov.io/github/css-modules/css-selector-tokenizer?branch=master) Parses and stringifies CSS selectors. @@ -71,14 +74,9 @@ npm install npm test ``` -[![Build Status](https://travis-ci.org/css-modules/css-selector-tokenizer.svg?branch=master)](https://travis-ci.org/css-modules/css-selector-tokenizer) - -* Lines: [![Coverage Status](https://coveralls.io/repos/css-modules/css-selector-tokenizer/badge.svg?branch=master)](https://coveralls.io/r/css-modules/css-selector-tokenizer?branch=master) -* Statements: [![codecov.io](http://codecov.io/github/css-modules/css-selector-tokenizer/coverage.svg?branch=master)](http://codecov.io/github/css-modules/css-selector-tokenizer?branch=master) - ## Development -- `npm autotest` will watch `lib` and `test` for changes and retest +- `npm test -- -w` will watch `lib` and `test` for changes and retest ## License From 857d498d608f68e120bbd0e96f1e4c1670c561ad Mon Sep 17 00:00:00 2001 From: Avi Vahl Date: Sat, 29 Feb 2020 19:48:24 +0200 Subject: [PATCH 06/12] chore(deps): mocha@7.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3bdec08..8e05ab4 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "codecov": "^3.6.5", "coveralls": "^3.0.9", "eslint": "^6.8.0", - "mocha": "^7.0.1", + "mocha": "^7.1.0", "nyc": "^15.0.0" }, "directories": { From 2a6cb09181152200f336e9756959d1c0d639b675 Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Tue, 3 Mar 2020 13:55:29 +0300 Subject: [PATCH 07/12] chore(release): 0.7.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8e05ab4..7554b83 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "css-selector-tokenizer", - "version": "0.7.1", + "version": "0.7.2", "description": "Parses and stringifies CSS selectors", "main": "lib/index.js", "scripts": { From a51c06c523c55be4aeb147ad60c1532403dc611d Mon Sep 17 00:00:00 2001 From: Barak Igal Date: Thu, 28 May 2020 02:10:17 +0300 Subject: [PATCH 08/12] Add build to avoid using regexpu-core in runtime --- lib/parse.js | 6 +++--- lib/stringify.js | 7 ++----- lib/uni-regexp.js | 6 ++++++ package.json | 9 +++++---- scripts/build-regexpu.js | 26 ++++++++++++++++++++++++++ 5 files changed, 42 insertions(+), 12 deletions(-) create mode 100644 lib/uni-regexp.js create mode 100644 scripts/build-regexpu.js diff --git a/lib/parse.js b/lib/parse.js index 692373b..632bdfd 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -1,7 +1,7 @@ "use strict"; var Parser = require("fastparse"); -var regexpu = require("regexpu-core"); +var uniRegexp = require("./uni-regexp"); function unescape(str) { return str.replace(/\\(.)/g, "$1"); @@ -175,8 +175,8 @@ function getSelectors() { // ISO 10646 characters U+00A0 and higher, plus the hyphen (-) and the underscore (_) // // 10ffff is the maximum allowed in current Unicode - selectors[regexpu("\\.((?:\\\\.|[A-Za-z_\\-\\u{00a0}-\\u{10ffff}])(?:\\\\.|[A-Za-z_\\-0-9\\u{00a0}-\\u{10ffff}])*)", "u")] = typeMatch("class"); - selectors[regexpu("#((?:\\\\.|[A-Za-z_\\-\\u{00a0}-\\u{10ffff}])(?:\\\\.|[A-Za-z_\\-0-9\\u{00a0}-\\u{10ffff}])*)", "u")] = typeMatch("id"); + selectors[uniRegexp.typeMatchClass] = typeMatch("class"); + selectors[uniRegexp.typeMatchId] = typeMatch("id"); var selectorsSecondHalf = { ":(not|matches|has|local|global)\\((\\s*)": nestedPseudoClassStartMatch, ":((?:\\\\.|[A-Za-z_\\-0-9])+)\\(": pseudoClassStartMatch, diff --git a/lib/stringify.js b/lib/stringify.js index 4673a8b..bb63ee8 100644 --- a/lib/stringify.js +++ b/lib/stringify.js @@ -1,10 +1,7 @@ "use strict"; -var regexpu = require("regexpu-core"); -var identifierEscapeRegexp = new RegExp( - regexpu("(^[^A-Za-z_\\-\\u{00a0}-\\u{10ffff}]|^--|[^A-Za-z_0-9\\-\\u{00a0}-\\u{10ffff}])", "ug"), - "g" -); +var uniRegexp = require("./uni-regexp"); +var identifierEscapeRegexp = new RegExp(uniRegexp.identifierEscapeRegexp, "g"); function escape(str, identifier) { if(str === "*") { diff --git a/lib/uni-regexp.js b/lib/uni-regexp.js new file mode 100644 index 0000000..8133b6f --- /dev/null +++ b/lib/uni-regexp.js @@ -0,0 +1,6 @@ +/* AUTO GENERATED */ +module.exports = { + "typeMatchClass": "\\.((?:\\\\(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])|(?:[\\x2DA-Z_a-z\\xA0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]))(?:\\\\(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])|(?:[\\x2D0-9A-Z_a-z\\xA0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]))*)", + "typeMatchId": "#((?:\\\\(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])|(?:[\\x2DA-Z_a-z\\xA0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]))(?:\\\\(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])|(?:[\\x2D0-9A-Z_a-z\\xA0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]))*)", + "identifierEscapeRegexp": "(^[\\0-,\\.-@\\[-\\^`\\{-\\x9F]|^\\x2D\\x2D|[\\0-,\\.\\/:-@\\[-\\^`\\{-\\x9F])" +} \ No newline at end of file diff --git a/package.json b/package.json index 7554b83..f740571 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,10 @@ "main": "lib/index.js", "scripts": { "lint": "eslint .", - "pretest": "npm run lint", + "pretest": "npm run build && npm run lint", "test": "mocha", "cover": "nyc npm test", + "build": "node scripts/build-regexpu.js", "report:coveralls": "nyc report --reporter=text-lcov | coveralls", "report:codecov": "nyc report --reporter=text-lcov | codecov --pipe", "publish-patch": "npm test && npm version patch && git push && git push --tags && npm publish" @@ -31,15 +32,15 @@ "homepage": "https://github.com/css-modules/css-selector-tokenizer", "dependencies": { "cssesc": "^3.0.0", - "fastparse": "^1.1.2", - "regexpu-core": "^4.6.0" + "fastparse": "^1.1.2" }, "devDependencies": { "codecov": "^3.6.5", "coveralls": "^3.0.9", "eslint": "^6.8.0", "mocha": "^7.1.0", - "nyc": "^15.0.0" + "nyc": "^15.0.0", + "regexpu-core": "^4.6.0" }, "directories": { "test": "test" diff --git a/scripts/build-regexpu.js b/scripts/build-regexpu.js new file mode 100644 index 0000000..be784f4 --- /dev/null +++ b/scripts/build-regexpu.js @@ -0,0 +1,26 @@ +var fs = require("fs"); +var path = require("path"); +var regexpu = require("regexpu-core"); + +var uniReg = { + typeMatchClass: regexpu( + "\\.((?:\\\\.|[A-Za-z_\\-\\u{00a0}-\\u{10ffff}])(?:\\\\.|[A-Za-z_\\-0-9\\u{00a0}-\\u{10ffff}])*)", + "u" + ), + typeMatchId: regexpu( + "#((?:\\\\.|[A-Za-z_\\-\\u{00a0}-\\u{10ffff}])(?:\\\\.|[A-Za-z_\\-0-9\\u{00a0}-\\u{10ffff}])*)", + "u" + ), + identifierEscapeRegexp: regexpu( + "(^[^A-Za-z_\\-\\u{00a0}-\\u{10ffff}]|^--|[^A-Za-z_0-9\\-\\u{00a0}-\\u{10ffff}])", + "ug" + ), +}; + +var targetFile = path.join(__dirname, "../lib/uni-regexp.js"); + +fs.writeFileSync( + targetFile, + "/* AUTO GENERATED */\nmodule.exports = " + JSON.stringify(uniReg, null, 4) +); +console.log('Done building ' + targetFile) \ No newline at end of file From 5f438f930959daa5b68d41c4e948fda9640ca5fe Mon Sep 17 00:00:00 2001 From: Barak Igal Date: Thu, 28 May 2020 02:12:08 +0300 Subject: [PATCH 09/12] add newline in generated file --- lib/uni-regexp.js | 2 +- scripts/build-regexpu.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/uni-regexp.js b/lib/uni-regexp.js index 8133b6f..a60623d 100644 --- a/lib/uni-regexp.js +++ b/lib/uni-regexp.js @@ -3,4 +3,4 @@ module.exports = { "typeMatchClass": "\\.((?:\\\\(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])|(?:[\\x2DA-Z_a-z\\xA0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]))(?:\\\\(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])|(?:[\\x2D0-9A-Z_a-z\\xA0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]))*)", "typeMatchId": "#((?:\\\\(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])|(?:[\\x2DA-Z_a-z\\xA0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]))(?:\\\\(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])|(?:[\\x2D0-9A-Z_a-z\\xA0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]))*)", "identifierEscapeRegexp": "(^[\\0-,\\.-@\\[-\\^`\\{-\\x9F]|^\\x2D\\x2D|[\\0-,\\.\\/:-@\\[-\\^`\\{-\\x9F])" -} \ No newline at end of file +} diff --git a/scripts/build-regexpu.js b/scripts/build-regexpu.js index be784f4..32fc29e 100644 --- a/scripts/build-regexpu.js +++ b/scripts/build-regexpu.js @@ -21,6 +21,6 @@ var targetFile = path.join(__dirname, "../lib/uni-regexp.js"); fs.writeFileSync( targetFile, - "/* AUTO GENERATED */\nmodule.exports = " + JSON.stringify(uniReg, null, 4) + "/* AUTO GENERATED */\nmodule.exports = " + JSON.stringify(uniReg, null, 4) + '\n' ); console.log('Done building ' + targetFile) \ No newline at end of file From 3f803f11d45f8c89c1da1e3438831f24ef3d8f80 Mon Sep 17 00:00:00 2001 From: Barak Igal Date: Mon, 1 Jun 2020 02:17:09 +0300 Subject: [PATCH 10/12] rename build and remove from test flow --- package.json | 4 ++-- scripts/build-regexpu.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f740571..df38891 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,10 @@ "main": "lib/index.js", "scripts": { "lint": "eslint .", - "pretest": "npm run build && npm run lint", + "pretest": "npm run lint", "test": "mocha", "cover": "nyc npm test", - "build": "node scripts/build-regexpu.js", + "build-regexpu": "node scripts/build-regexpu.js", "report:coveralls": "nyc report --reporter=text-lcov | coveralls", "report:codecov": "nyc report --reporter=text-lcov | codecov --pipe", "publish-patch": "npm test && npm version patch && git push && git push --tags && npm publish" diff --git a/scripts/build-regexpu.js b/scripts/build-regexpu.js index 32fc29e..0db18c8 100644 --- a/scripts/build-regexpu.js +++ b/scripts/build-regexpu.js @@ -23,4 +23,5 @@ fs.writeFileSync( targetFile, "/* AUTO GENERATED */\nmodule.exports = " + JSON.stringify(uniReg, null, 4) + '\n' ); + console.log('Done building ' + targetFile) \ No newline at end of file From c9b823712671c75130069253aaeee0d6b589b72c Mon Sep 17 00:00:00 2001 From: Barak Igal Date: Mon, 1 Jun 2020 02:18:57 +0300 Subject: [PATCH 11/12] format --- scripts/build-regexpu.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/build-regexpu.js b/scripts/build-regexpu.js index 0db18c8..2838f50 100644 --- a/scripts/build-regexpu.js +++ b/scripts/build-regexpu.js @@ -21,7 +21,9 @@ var targetFile = path.join(__dirname, "../lib/uni-regexp.js"); fs.writeFileSync( targetFile, - "/* AUTO GENERATED */\nmodule.exports = " + JSON.stringify(uniReg, null, 4) + '\n' + "/* AUTO GENERATED */\nmodule.exports = " + + JSON.stringify(uniReg, null, 4) + + "\n" ); -console.log('Done building ' + targetFile) \ No newline at end of file +console.log("Done building " + targetFile); From b903b126bf6ed18db35bd03f941e46335b075ddc Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Tue, 21 Jul 2020 15:35:14 +0300 Subject: [PATCH 12/12] chore(release): 0.7.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index df38891..3e61900 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "css-selector-tokenizer", - "version": "0.7.2", + "version": "0.7.3", "description": "Parses and stringifies CSS selectors", "main": "lib/index.js", "scripts": {