File tree Expand file tree Collapse file tree 8 files changed +45
-46
lines changed Expand file tree Collapse file tree 8 files changed +45
-46
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ {
2+ "env" : {
3+ "browser" : true ,
4+ "commonjs" : true ,
5+ "es6" : true ,
6+ "node" : true
7+ },
8+ "extends" : " eslint:recommended" ,
9+ "parserOptions" : {
10+ "ecmaVersion" : 2018
11+ }
12+ }
Original file line number Diff line number Diff line change 11node_modules
22coverage
3+ .nyc_output
4+ package-lock.json
Original file line number Diff line number Diff line change 1- sudo : false
21language : node_js
2+
33node_js :
4- - " 0.10"
5- - " 0.12"
6- - " iojs"
7- script : npm run travis
4+ - 10
5+ - 12
6+ - 13
87
9- before_install :
10- - ' [ "${TRAVIS_NODE_VERSION}" != "0.10" ] || npm install -g npm'
8+ script : npm run cover
119
1210after_success :
13- - cat ./coverage/lcov.info | node_modules/.bin/ coveralls --verbose
14- - cat ./coverage/coverage.json | node_modules/ codecov.io/bin/codecov.io.js
15- - rm -rf ./coverage
11+ - npm run report: coveralls
12+ - npm run report: codecov
13+
Original file line number Diff line number Diff line change 1- # CSS Modules: CSS selector Tokenizer
1+ # CSS Modules: css-selector-tokenizer
2+ [ ![ Build Status] ( https://travis-ci.org/css-modules/css-selector-tokenizer.svg?branch=master )] ( https://travis-ci.org/css-modules/css-selector-tokenizer )
3+ [ ![ 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 )
4+ [ ![ 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 )
25
36Parses and stringifies CSS selectors.
47
@@ -71,14 +74,9 @@ npm install
7174npm test
7275```
7376
74- [ ![ Build Status] ( https://travis-ci.org/css-modules/css-selector-tokenizer.svg?branch=master )] ( https://travis-ci.org/css-modules/css-selector-tokenizer )
75-
76- * 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 )
77- * 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 )
78-
7977## Development
8078
81- - ` npm autotest ` will watch ` lib ` and ` test ` for changes and retest
79+ - ` npm test -- -w ` will watch ` lib ` and ` test ` for changes and retest
8280
8381## License
8482
Original file line number Diff line number Diff line change @@ -136,12 +136,12 @@ var parser = new Parser({
136136 "url\\((\\s*)(\"(?:[^\\\\\"]|\\\\.)*\")(\\s*)\\)" : urlMatch ,
137137 "url\\((\\s*)('(?:[^\\\\']|\\\\.)*')(\\s*)\\)" : urlMatch ,
138138 "url\\((\\s*)((?:[^\\\\)'\"]|\\\\.)*)(\\s*)\\)" : urlMatch ,
139- "([\\w\ -]+)\\((\\s*)" : nestedItemMatch ,
139+ "([\\w-]+)\\((\\s*)" : nestedItemMatch ,
140140 "(\\s*)(\\))" : nestedItemEndMatch ,
141141 ",(\\s*)" : commaMatch ,
142142 "\\s+$" : endSpacingMatch ,
143143 "\\s+" : spacingMatch ,
144- "[^\\s,\ )]+" : itemMatch
144+ "[^\\s,)]+" : itemMatch
145145 }
146146} ) ;
147147
Original file line number Diff line number Diff line change 11"use strict" ;
22
3- var stringify ;
4-
53var regexpu = require ( "regexpu-core" ) ;
64var identifierEscapeRegexp = new RegExp (
7- regexpu ( "(^[^A-Za-z_\\-\\u{00a0}-\\u{10ffff}]|^\\-\\ -|[^A-Za-z_0-9\\-\\u{00a0}-\\u{10ffff}])" , "ug" ) ,
5+ regexpu ( "(^[^A-Za-z_\\-\\u{00a0}-\\u{10ffff}]|^- -|[^A-Za-z_0-9\\-\\u{00a0}-\\u{10ffff}])" , "ug" ) ,
86 "g"
97) ;
108
@@ -15,7 +13,7 @@ function escape(str, identifier) {
1513 if ( identifier ) {
1614 return str . replace ( identifierEscapeRegexp , "\\$1" ) ;
1715 } else {
18- return str . replace ( / ( ^ [ ^ A - Z a - z _ \\ - ] | ^ \- \ -| [ ^ A - Z a - z _ 0 - 9 \\ - ] ) / g, "\\$1" ) ;
16+ return str . replace ( / ( ^ [ ^ A - Z a - z _ \\ - ] | ^ - - | [ ^ A - Z a - z _ 0 - 9 \\ - ] ) / g, "\\$1" ) ;
1917 }
2018}
2119
@@ -53,7 +51,7 @@ function stringifyWithoutBeforeAfter(tree) {
5351}
5452
5553
56- stringify = function stringify ( tree ) {
54+ function stringify ( tree ) {
5755 var str = stringifyWithoutBeforeAfter ( tree ) ;
5856 if ( tree . before ) {
5957 str = tree . before + str ;
@@ -62,6 +60,6 @@ stringify = function stringify(tree) {
6260 str = str + tree . after ;
6361 }
6462 return str ;
65- } ;
63+ }
6664
6765module . exports = stringify ;
Original file line number Diff line number Diff line change 44 "description" : " Parses and stringifies CSS selectors" ,
55 "main" : " lib/index.js" ,
66 "scripts" : {
7- "lint" : " eslint lib " ,
7+ "lint" : " eslint . " ,
88 "pretest" : " npm run lint" ,
99 "test" : " mocha" ,
10- "autotest" : " chokidar lib test -c 'npm test'" ,
11- "precover" : " npm run lint" ,
12- "cover" : " istanbul cover node_modules/mocha/bin/_mocha" ,
13- "travis" : " npm run cover -- --report lcovonly" ,
10+ "cover" : " nyc npm test" ,
11+ "report:coveralls" : " nyc report --reporter=text-lcov | coveralls" ,
12+ "report:codecov" : " nyc report --reporter=text-lcov | codecov --pipe" ,
1413 "publish-patch" : " npm test && npm version patch && git push && git push --tags && npm publish"
1514 },
1615 "repository" : {
3130 },
3231 "homepage" : " https://github.com/css-modules/css-selector-tokenizer" ,
3332 "dependencies" : {
34- "cssesc" : " ^0.1 .0" ,
35- "fastparse" : " ^1.1.1 " ,
36- "regexpu-core" : " ^1.0 .0"
33+ "cssesc" : " ^3.0 .0" ,
34+ "fastparse" : " ^1.1.2 " ,
35+ "regexpu-core" : " ^4.6 .0"
3736 },
3837 "devDependencies" : {
39- "chokidar-cli" : " ^0.2.1" ,
40- "codecov.io" : " ^0.1.2" ,
41- "coveralls" : " ^2.11.2" ,
42- "eslint" : " ^0.21.2" ,
43- "istanbul" : " ^0.3.14" ,
44- "mocha" : " ^2.2.5"
38+ "codecov" : " ^3.6.5" ,
39+ "coveralls" : " ^3.0.9" ,
40+ "eslint" : " ^6.8.0" ,
41+ "mocha" : " ^7.1.0" ,
42+ "nyc" : " ^15.0.0"
4543 },
4644 "directories" : {
4745 "test" : " test"
You can’t perform that action at this time.
0 commit comments