less 4.1.1 → 4.1.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/.eslintignore CHANGED
@@ -2,4 +2,5 @@ Gruntfile.js
2
2
  dist/*
3
3
  tmp/*
4
4
  lib/*
5
- test/browser/less.min.js
5
+ test/browser/less.min.js
6
+ node_modules
package/.eslintrc.json CHANGED
@@ -1,3 +1,71 @@
1
1
  {
2
- "extends": "../../.eslintrc.json"
3
- }
2
+ "parser": "@typescript-eslint/parser",
3
+ "parserOptions": {
4
+ "ecmaVersion": 2018,
5
+ "sourceType": "module"
6
+ },
7
+ "plugins": ["@typescript-eslint"],
8
+ "env": {
9
+ "browser": true,
10
+ "node": true
11
+ },
12
+ "globals": {},
13
+ "rules": {
14
+ "no-eval": 2,
15
+ "no-use-before-define": [
16
+ 2,
17
+ {
18
+ "functions": false
19
+ }
20
+ ],
21
+ "no-undef": 0,
22
+ "no-unused-vars": 1,
23
+ "no-caller": 2,
24
+ "no-eq-null": 1,
25
+ "guard-for-in": 2,
26
+ "no-implicit-coercion": [
27
+ 2,
28
+ {
29
+ "boolean": false,
30
+ "string": true,
31
+ "number": true
32
+ }
33
+ ],
34
+ "no-with": 2,
35
+ "no-mixed-spaces-and-tabs": 2,
36
+ "no-multiple-empty-lines": 2,
37
+ "dot-location": [2, "property"],
38
+ "operator-linebreak": [0, "after"],
39
+ "keyword-spacing": [2, {}],
40
+ "space-unary-ops": [
41
+ 2,
42
+ {
43
+ "words": false,
44
+ "nonwords": false
45
+ }
46
+ ],
47
+ "no-spaced-func": 2,
48
+ "space-before-function-paren": [
49
+ 1,
50
+ {
51
+ "anonymous": "ignore",
52
+ "named": "never"
53
+ }
54
+ ],
55
+ "comma-dangle": [2, "never"],
56
+ "no-trailing-spaces": 0,
57
+ "max-len": [2, 160],
58
+ "comma-style": [2, "last"],
59
+ "curly": [2, "all"],
60
+ "space-infix-ops": 2,
61
+ "spaced-comment": 1,
62
+ "space-before-blocks": [2, "always"],
63
+ "indent": [
64
+ 2,
65
+ 4,
66
+ {
67
+ "SwitchCase": 1
68
+ }
69
+ ]
70
+ }
71
+ }
package/Gruntfile.js CHANGED
@@ -12,7 +12,6 @@ module.exports = function(grunt) {
12
12
  // Report the elapsed execution time of tasks.
13
13
  require("time-grunt")(grunt);
14
14
 
15
- var COMPRESS_FOR_TESTS = false;
16
15
  var git = require("git-rev");
17
16
 
18
17
  // Sauce Labs browser
@@ -184,17 +183,11 @@ module.exports = function(grunt) {
184
183
  // Make the SauceLabs jobs
185
184
  ["all"].concat(browserTests).map(makeJob);
186
185
 
187
- var semver = require('semver');
188
186
  var path = require('path');
189
187
 
190
188
  // Handle async / await in Rollup build for tests
191
- // Remove this when Node 6 is no longer supported for the build/test process
192
- const nodeVersion = semver.major(process.versions.node);
193
189
  const tsNodeRuntime = path.resolve(path.join('node_modules', '.bin', 'ts-node'));
194
- let scriptRuntime = 'node';
195
- if (nodeVersion < 8) {
196
- scriptRuntime = tsNodeRuntime;
197
- }
190
+ const crossEnv = path.resolve(path.join('node_modules', '.bin', 'cross-env'));
198
191
 
199
192
  // Project configuration.
200
193
  grunt.initConfig({
@@ -209,7 +202,7 @@ module.exports = function(grunt) {
209
202
  build: {
210
203
  command: [
211
204
  /** Browser runtime */
212
- scriptRuntime + " build/rollup.js --dist",
205
+ "node build/rollup.js --dist",
213
206
  /** Copy to repo root */
214
207
  "npm run copy:root",
215
208
  /** Node.js runtime */
@@ -219,17 +212,19 @@ module.exports = function(grunt) {
219
212
  testbuild: {
220
213
  command: [
221
214
  "npm run build",
222
- scriptRuntime + " build/rollup.js --browser --out=./tmp/browser/less.min.js"
215
+ "node build/rollup.js --browser --out=./tmp/browser/less.min.js"
223
216
  ].join(" && ")
224
217
  },
225
218
  testcjs: {
226
219
  command: "npm run build"
227
220
  },
228
221
  testbrowser: {
229
- command: scriptRuntime + " build/rollup.js --browser --out=./tmp/browser/less.min.js"
222
+ command: "node build/rollup.js --browser --out=./tmp/browser/less.min.js"
230
223
  },
231
224
  test: {
232
225
  command: [
226
+ // https://github.com/TypeStrong/ts-node/issues/693#issuecomment-848907036
227
+ crossEnv + " TS_NODE_SCOPE=true",
233
228
  tsNodeRuntime + " test/test-es6.ts",
234
229
  "node test/index.js"
235
230
  ].join(' && ')