Skip to content

Commit 50844a5

Browse files
chore(deps): upgrade to latest stable
2 parents 81477c2 + 857d498 commit 50844a5

8 files changed

+45
-46
lines changed

.eslintrc

-7
This file was deleted.

.eslintrc.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
}

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
node_modules
22
coverage
3+
.nyc_output
4+
package-lock.json

.travis.yml

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
sudo: false
21
language: node_js
2+
33
node_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

1210
after_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+

README.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
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

36
Parses and stringifies CSS selectors.
47

@@ -71,14 +74,9 @@ npm install
7174
npm 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

lib/parseValues.js

+2-2
Original file line numberDiff line numberDiff 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

lib/stringify.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
"use strict";
22

3-
var stringify;
4-
53
var regexpu = require("regexpu-core");
64
var 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-Za-z_\\-]|^\-\-|[^A-Za-z_0-9\\-])/g, "\\$1");
16+
return str.replace(/(^[^A-Za-z_\\-]|^--|[^A-Za-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

6765
module.exports = stringify;

package.json

+12-14
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
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": {
@@ -31,17 +30,16 @@
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"

0 commit comments

Comments
 (0)