File tree 6 files changed +2306
-1067
lines changed
6 files changed +2306
-1067
lines changed Original file line number Diff line number Diff line change 3
3
"ecmaVersion": 2018
4
4
},
5
5
"env": {
6
- "node": true
6
+ "es6": true,
7
+ "node": true,
8
+ "jest": true
7
9
},
8
10
"extends": "eslint:recommended"
9
11
}
Original file line number Diff line number Diff line change
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ This project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
5
+
6
+ ## [ 4.0.0-rc.1] ( https://github.com/postcss-modules-local-by-default/compare/v4.0.0-rc.0...v4.0.0-rc.1 ) - 2020-09-22
7
+
8
+ ### BREAKING CHANGE
9
+
10
+ - update ` icss-utils ` for PostCSS 8 compatibility
11
+
12
+ ## [ 4.0.0-rc.0] ( https://github.com/postcss-modules-local-by-default/compare/v3.0.0...v4.0.0-rc.1 ) - 2020-09-18
13
+
14
+ ### BREAKING CHANGE
15
+
16
+ - minimum supported ` Node.js ` version is ` >= 10.13.0 || >= 12.13.0 || >= 14 `
17
+ - minimum supported ` postcss ` version is ` ^8.0.3 `
18
+ - ` postcss ` was moved to ` peerDependencies ` , you need to install ` postcss ` in your project before use the plugin
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " postcss-modules-values" ,
3
- "version" : " 4.0.0-rc.0 " ,
3
+ "version" : " 4.0.0-rc.1 " ,
4
4
"description" : " PostCSS plugin for CSS Modules to pass arbitrary values between your module files" ,
5
5
"main" : " src/index.js" ,
6
6
"files" : [
14
14
"eslint" : " eslint --ignore-path .gitignore ." ,
15
15
"lint" : " yarn eslint && yarn prettier" ,
16
16
"pretest" : " yarn lint" ,
17
- "test" : " mocha" ,
18
- "autotest" : " chokidar src test -c 'npm test'" ,
19
- "cover" : " nyc mocha" ,
20
- "ci" : " yarn pretest && yarn cover" ,
17
+ "test" : " jest" ,
18
+ "test:only" : " jest" ,
19
+ "test:watch" : " jest --watch" ,
20
+ "test:coverage" : " jest --coverage --collectCoverageFrom=\" src/**/*\" " ,
21
+ "test:ci" : " yarn pretest && yarn cover" ,
21
22
"prepublishOnly" : " yarn test"
22
23
},
23
24
"repository" : {
36
37
},
37
38
"homepage" : " https://github.com/css-modules/postcss-modules-values#readme" ,
38
39
"devDependencies" : {
39
- "chokidar-cli" : " ^2.1.0" ,
40
- "codecov.io" : " ^0.1.6" ,
41
- "coveralls" : " ^3.1.0" ,
42
40
"eslint" : " ^7.9.0" ,
43
- "mocha" : " ^8.1.3" ,
44
- "nyc" : " ^15.1.0" ,
45
- "postcss" : " ^8.0.3" ,
41
+ "jest" : " ^26.4.2" ,
42
+ "postcss" : " ^8.0.7" ,
46
43
"prettier" : " ^2.1.2"
47
44
},
48
45
"dependencies" : {
49
- "icss-utils" : " ^4.1.1 "
46
+ "icss-utils" : " ^5.0.0-rc.0 "
50
47
},
51
48
"peerDependencies" : {
52
- "postcss" : " ^8.0.3 "
49
+ "postcss" : " ^8.0.0 "
53
50
}
54
51
}
Original file line number Diff line number Diff line change 1
1
"use strict" ;
2
-
3
- /* global describe, it */
4
-
5
2
const postcss = require ( "postcss" ) ;
6
- const assert = require ( "assert" ) ;
7
3
8
4
const constants = require ( "../src" ) ;
9
5
10
6
const test = ( input , expected ) => {
11
7
const processor = postcss ( [ constants ] ) ;
12
- assert . equal ( processor . process ( input ) . css , expected ) ;
8
+
9
+ expect ( expected ) . toBe ( processor . process ( input ) . css ) ;
13
10
} ;
14
11
15
12
describe ( "constants" , ( ) => {
@@ -27,9 +24,8 @@ describe("constants", () => {
27
24
const result = processor . process ( input ) ;
28
25
const warnings = result . warnings ( ) ;
29
26
30
- assert . equal ( warnings . length , 1 ) ;
31
- assert . equal (
32
- warnings [ 0 ] . text ,
27
+ expect ( warnings ) . toHaveLength ( 1 ) ;
28
+ expect ( warnings [ 0 ] . text ) . toBe (
33
29
"Invalid value definition: red blue\n@value green yellow"
34
30
) ;
35
31
} ) ;
You can’t perform that action at this time.
0 commit comments