Skip to content

Commit bd00f03

Browse files
alexander-akaitjonathantneal
authored andcommitted
chore(deps): update
1 parent b1da0fa commit bd00f03

11 files changed

+2960
-5150
lines changed

.babelrc

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
{
2-
"presets": ["es2015-loose", "stage-0"],
3-
"plugins": ["add-module-exports", "precompile-charcodes"],
4-
"env": {
5-
"development": {
6-
"sourceMaps": "inline"
2+
"presets": [
3+
["@babel/preset-env", { "loose": true }]
4+
],
5+
"plugins": [
6+
"@babel/proposal-class-properties",
7+
"add-module-exports"
8+
],
9+
"env": {
10+
"development": {
11+
"sourceMaps": "inline"
12+
}
713
}
8-
}
914
}

package-lock.json

Lines changed: 2901 additions & 5086 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,23 @@
22
"name": "postcss-selector-parser",
33
"version": "5.0.0",
44
"devDependencies": {
5-
"ava": "^0.25.0",
6-
"babel-cli": "^6.26.0",
7-
"babel-core": "^6.26.3",
8-
"babel-eslint": "^8.2.3",
9-
"babel-plugin-add-module-exports": "^0.2.0",
10-
"babel-plugin-precompile-charcodes": "^1.1.0",
11-
"babel-preset-es2015": "^6.24.1",
12-
"babel-preset-es2015-loose": "^7.0.0",
13-
"babel-preset-stage-0": "^6.24.1",
14-
"babel-register": "^6.26.0",
5+
"@babel/cli": "^7.2.3",
6+
"@babel/core": "^7.3.3",
7+
"@babel/plugin-proposal-class-properties": "^7.3.3",
8+
"@babel/preset-env": "^7.3.1",
9+
"@babel/register": "^7.0.0",
10+
"ava": "^1.2.1",
11+
"babel-eslint": "^10.0.1",
12+
"babel-plugin-add-module-exports": "^1.0.0",
1513
"coveralls": "^3.0.2",
1614
"del-cli": "^1.1.0",
17-
"eslint": "^4.19.1",
18-
"eslint-plugin-babel": "^3.3.0",
15+
"eslint": "^5.14.1",
16+
"eslint-plugin-babel": "^5.3.0",
1917
"eslint-plugin-import": "^2.14.0",
2018
"glob": "^7.1.3",
2119
"minimist": "^1.2.0",
22-
"nyc": "^11.7.3",
23-
"postcss": "^7.0.7",
20+
"nyc": "^13.3.0",
21+
"postcss": "^7.0.14",
2422
"semver": "^5.6.0"
2523
},
2624
"main": "dist/index.js",
@@ -64,7 +62,9 @@
6462
],
6563
"repository": "postcss/postcss-selector-parser",
6664
"ava": {
67-
"require": "babel-register",
65+
"require": [
66+
"@babel/register"
67+
],
6868
"concurrency": 5
6969
},
7070
"nyc": {

src/__tests__/__snapshots__/postcss.js.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,6 @@ Generated by [AVA](https://ava.li).
124124
| ^␊
125125
`
126126

127-
## bad whitespace instead of namespace token
128-
129-
> Snapshot 1
130-
131-
`CssSyntaxError: <css input>:1:2: Expected an attribute, found " " instead.␊
132-
133-
> 1 | [ |href=test] {}␊
134-
| ^␊
135-
`
136-
137127
## missing open parenthesis
138128

139129
> Snapshot 1
-43 Bytes
Binary file not shown.

src/__tests__/combinators.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ test('multiple combinators with whitespaces', 'h1 + h2 > h3', (t, tree) => {
115115
t.deepEqual(tree.nodes[0].nodes[3].value, '>', 'should have a combinator');
116116
});
117117

118-
test('multiple combinators with whitespaces', 'h1+ h2 >h3', (t, tree) => {
118+
test('multiple combinators with whitespaces (2)', 'h1+ h2 >h3', (t, tree) => {
119119
t.deepEqual(tree.nodes[0].nodes[1].value, '+', 'should have a combinator');
120120
t.deepEqual(tree.nodes[0].nodes[3].value, '>', 'should have a combinator');
121121
});

src/__tests__/comments.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ test('comments', '/*test comment*/h2', (t, tree) => {
55
t.deepEqual(tree.nodes[0].nodes[1].value, 'h2');
66
});
77

8-
test('comments', '.a /*test comment*/label', (t, tree) => {
8+
test('comments (2)', '.a /*test comment*/label', (t, tree) => {
99
t.deepEqual(tree.nodes[0].nodes[0].type, 'class');
1010
t.deepEqual(tree.nodes[0].nodes[1].type, 'combinator');
1111
t.deepEqual(tree.nodes[0].nodes[1].value, ' ');
@@ -14,7 +14,7 @@ test('comments', '.a /*test comment*/label', (t, tree) => {
1414
t.deepEqual(tree.nodes[0].nodes[2].type, 'tag');
1515
});
1616

17-
test('comments', '.a /*test comment*/ label', (t, tree) => {
17+
test('comments (3)', '.a /*test comment*/ label', (t, tree) => {
1818
t.deepEqual(tree.nodes[0].nodes[0].type, 'class');
1919
t.deepEqual(tree.nodes[0].nodes[1].type, 'combinator');
2020
t.deepEqual(tree.nodes[0].nodes[1].value, ' ');

src/__tests__/exceptions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ throws('missing closing parenthesis in pseudo', ':not([attr="test"]:not([attr="t
2121
throws('bad syntax', '-moz-osx-font-smoothing: grayscale');
2222

2323
throws('missing backslash for semicolon', '.;');
24-
throws('missing backslash for semicolon', '.\;');
24+
throws('missing backslash for semicolon (2)', '.\;');
2525
throws('unexpected / foo', '-Option\/root', "Unexpected '/'. Escaping special characters with \\ may help.");
2626
throws('bang in selector', '.foo !optional', "Unexpected '!'. Escaping special characters with \\ may help.");

src/__tests__/nonstandard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ test('sass escapes', '.#{$classname}', (t, tree) => {
2424
t.deepEqual(tree.nodes[0].nodes[0].value, "#{$classname}");
2525
});
2626

27-
test('sass escapes', '[lang=#{$locale}]', (t, tree) => {
27+
test('sass escapes (2)', '[lang=#{$locale}]', (t, tree) => {
2828
t.deepEqual(tree.nodes[0].nodes.map(n => n.type), ["attribute"]);
2929
t.deepEqual(tree.nodes[0].nodes[0].value, "#{$locale}");
3030
});

src/__tests__/util/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ test.serial = (spec, input, callback) => test(spec, input, callback, false, fals
3333

3434
export const throws = (spec, input, validator) => {
3535
ava(`${spec} (throws)`, t => {
36-
t.throws(() => parser().processSync(input), validator);
36+
t.throws(() => parser().processSync(input), validator || Error);
3737
});
3838
};
3939

src/tokenTypes.js

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
export const ampersand = `&`.charCodeAt(0);
2-
export const asterisk = `*`.charCodeAt(0);
3-
export const at = `@`.charCodeAt(0);
4-
export const comma = `,`.charCodeAt(0);
5-
export const colon = `:`.charCodeAt(0);
6-
export const semicolon = `;`.charCodeAt(0);
7-
export const openParenthesis = `(`.charCodeAt(0);
8-
export const closeParenthesis = `)`.charCodeAt(0);
9-
export const openSquare = `[`.charCodeAt(0);
10-
export const closeSquare = `]`.charCodeAt(0);
11-
export const dollar = `$`.charCodeAt(0);
12-
export const tilde = `~`.charCodeAt(0);
13-
export const caret = `^`.charCodeAt(0);
14-
export const plus = `+`.charCodeAt(0);
15-
export const equals = `=`.charCodeAt(0);
16-
export const pipe = `|`.charCodeAt(0);
17-
export const greaterThan = `>`.charCodeAt(0);
18-
export const space = ` `.charCodeAt(0);
19-
export const singleQuote = `'`.charCodeAt(0);
20-
export const doubleQuote = `"`.charCodeAt(0);
21-
export const slash = `/`.charCodeAt(0);
22-
export const bang = `!`.charCodeAt(0);
1+
export const ampersand = 38; // `&`.charCodeAt(0);
2+
export const asterisk = 42; // `*`.charCodeAt(0);
3+
export const at = 64; // `@`.charCodeAt(0);
4+
export const comma = 44; // `,`.charCodeAt(0);
5+
export const colon = 58; // `:`.charCodeAt(0);
6+
export const semicolon = 59; // `;`.charCodeAt(0);
7+
export const openParenthesis = 40; // `(`.charCodeAt(0);
8+
export const closeParenthesis = 41; // `)`.charCodeAt(0);
9+
export const openSquare = 91; // `[`.charCodeAt(0);
10+
export const closeSquare = 93; // `]`.charCodeAt(0);
11+
export const dollar = 36; // `$`.charCodeAt(0);
12+
export const tilde = 126; // `~`.charCodeAt(0);
13+
export const caret = 94; // `^`.charCodeAt(0);
14+
export const plus = 43; // `+`.charCodeAt(0);
15+
export const equals = 61; // `=`.charCodeAt(0);
16+
export const pipe = 124; // `|`.charCodeAt(0);
17+
export const greaterThan = 62; // `>`.charCodeAt(0);
18+
export const space = 32; // ` `.charCodeAt(0);
19+
export const singleQuote = 39; // `'`.charCodeAt(0);
20+
export const doubleQuote = 34; // `"`.charCodeAt(0);
21+
export const slash = 47; // `/`.charCodeAt(0);
22+
export const bang = 33; // `!`.charCodeAt(0);
2323

24-
export const backslash = '\\'.charCodeAt(0);
25-
export const cr = '\r'.charCodeAt(0);
26-
export const feed = '\f'.charCodeAt(0);
27-
export const newline = '\n'.charCodeAt(0);
28-
export const tab = '\t'.charCodeAt(0);
24+
export const backslash = 92; // '\\'.charCodeAt(0);
25+
export const cr = 13; // '\r'.charCodeAt(0);
26+
export const feed = 12; // '\f'.charCodeAt(0);
27+
export const newline = 10; // '\n'.charCodeAt(0);
28+
export const tab = 9; // '\t'.charCodeAt(0);
2929

3030
// Expose aliases primarily for readability.
3131
export const str = singleQuote;

0 commit comments

Comments
 (0)