postcss-calc 7.0.1 → 7.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss-calc",
3
- "version": "7.0.1",
3
+ "version": "7.0.2",
4
4
  "description": "PostCSS plugin to reduce calc()",
5
5
  "keywords": [
6
6
  "css",
@@ -17,7 +17,7 @@
17
17
  "scripts": {
18
18
  "prepublish": "npm run build",
19
19
  "build": "del-cli dist && cross-env BABEL_ENV=publish babel src --out-dir dist --ignore src/__tests__/**/*.js && jison src/parser.jison -o dist/parser.js",
20
- "pretest": "eslint src && npm run build",
20
+ "pretest": "npm run build && eslint src",
21
21
  "test": "ava"
22
22
  },
23
23
  "author": "Andy Jansson",
@@ -25,7 +25,10 @@
25
25
  "repository": "https://github.com/postcss/postcss-calc.git",
26
26
  "eslintConfig": {
27
27
  "parser": "babel-eslint",
28
- "extends": "eslint-config-i-am-meticulous"
28
+ "extends": "eslint-config-i-am-meticulous",
29
+ "rules": {
30
+ "curly": "error"
31
+ }
29
32
  },
30
33
  "devDependencies": {
31
34
  "@babel/cli": "^7.1.2",
@@ -33,7 +36,7 @@
33
36
  "@babel/polyfill": "^7.0.0",
34
37
  "@babel/preset-env": "^7.1.0",
35
38
  "@babel/register": "^7.0.0",
36
- "ava": "^1.0.0-beta.8",
39
+ "ava": "^1.4.1",
37
40
  "babel-eslint": "^10.0.1",
38
41
  "babel-plugin-add-module-exports": "^1.0.0",
39
42
  "cross-env": "^5.2.0",
@@ -45,10 +48,9 @@
45
48
  "jison-gho": "^0.6.1-215"
46
49
  },
47
50
  "dependencies": {
48
- "css-unit-converter": "^1.1.1",
49
- "postcss": "^7.0.5",
50
- "postcss-selector-parser": "^5.0.0-rc.4",
51
- "postcss-value-parser": "^3.3.1"
51
+ "postcss": "^7.0.27",
52
+ "postcss-selector-parser": "^6.0.2",
53
+ "postcss-value-parser": "^4.0.2"
52
54
  },
53
55
  "ava": {
54
56
  "require": [
@@ -1,46 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _cssUnitConverter = _interopRequireDefault(require("css-unit-converter"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
12
- function convertNodes(left, right, precision) {
13
- switch (left.type) {
14
- case 'LengthValue':
15
- case 'AngleValue':
16
- case 'TimeValue':
17
- case 'FrequencyValue':
18
- case 'ResolutionValue':
19
- return convertAbsoluteLength(left, right, precision);
20
-
21
- default:
22
- return {
23
- left,
24
- right
25
- };
26
- }
27
- }
28
-
29
- function convertAbsoluteLength(left, right, precision) {
30
- if (right.type === left.type) {
31
- right = {
32
- type: left.type,
33
- value: (0, _cssUnitConverter.default)(right.value, right.unit, left.unit, precision),
34
- unit: left.unit
35
- };
36
- }
37
-
38
- return {
39
- left,
40
- right
41
- };
42
- }
43
-
44
- var _default = convertNodes;
45
- exports.default = _default;
46
- module.exports = exports.default;