less 4.6.1 → 4.6.3-beta.0
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/dist/less-node.cjs +14066 -0
- package/dist/less.js +17 -8
- package/dist/less.min.js +2 -2
- package/dist/less.min.js.map +1 -1
- package/index.cjs +2 -41
- package/package.json +16 -7
- package/index.js +0 -1
package/index.cjs
CHANGED
|
@@ -1,41 +1,2 @@
|
|
|
1
|
-
// CJS
|
|
2
|
-
|
|
3
|
-
// a lazy Proxy with dynamic import() — works because render()/parse()
|
|
4
|
-
// already return promises, so the async layer is invisible.
|
|
5
|
-
const [major, minor] = process.versions.node.split('.').map(Number);
|
|
6
|
-
|
|
7
|
-
if (major >= 22 || (major === 20 && minor >= 19)) {
|
|
8
|
-
module.exports = require('./lib/less-node/index.js').default;
|
|
9
|
-
} else {
|
|
10
|
-
let _less;
|
|
11
|
-
const _loading = import('./lib/less-node/index.js').then(m => { _less = m.default; });
|
|
12
|
-
|
|
13
|
-
module.exports = new Proxy(Object.create(null), {
|
|
14
|
-
get(_, prop) {
|
|
15
|
-
if (prop === 'then' || prop === 'catch' || prop === 'finally') {
|
|
16
|
-
return undefined;
|
|
17
|
-
}
|
|
18
|
-
if (_less) {
|
|
19
|
-
return _less[prop];
|
|
20
|
-
}
|
|
21
|
-
return function (...args) {
|
|
22
|
-
return _loading.then(() => {
|
|
23
|
-
const val = _less[prop];
|
|
24
|
-
return typeof val === 'function' ? val.apply(_less, args) : val;
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
},
|
|
28
|
-
has(_, prop) {
|
|
29
|
-
return _less ? prop in _less : true;
|
|
30
|
-
},
|
|
31
|
-
ownKeys() {
|
|
32
|
-
return _less ? Reflect.ownKeys(_less) : [];
|
|
33
|
-
},
|
|
34
|
-
getOwnPropertyDescriptor(_, prop) {
|
|
35
|
-
if (_less) {
|
|
36
|
-
return Object.getOwnPropertyDescriptor(_less, prop);
|
|
37
|
-
}
|
|
38
|
-
return { configurable: true, enumerable: true };
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
}
|
|
1
|
+
// CJS entry — requires the pre-built CJS bundle
|
|
2
|
+
module.exports = require('./dist/less-node.cjs');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "less",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.3-beta.0",
|
|
4
4
|
"description": "Leaner CSS",
|
|
5
5
|
"homepage": "http://lesscss.org",
|
|
6
6
|
"author": {
|
|
@@ -26,13 +26,18 @@
|
|
|
26
26
|
"bin": {
|
|
27
27
|
"lessc": "./bin/lessc"
|
|
28
28
|
},
|
|
29
|
-
"main": "./
|
|
29
|
+
"main": "./dist/less-node.cjs",
|
|
30
30
|
"exports": {
|
|
31
31
|
".": {
|
|
32
|
+
"browser": "./dist/less.js",
|
|
32
33
|
"import": "./lib/less-node/index.js",
|
|
33
|
-
"require": "./
|
|
34
|
+
"require": "./dist/less-node.cjs",
|
|
35
|
+
"default": "./lib/less-node/index.js"
|
|
34
36
|
},
|
|
35
|
-
"./lib/*": "./lib/*"
|
|
37
|
+
"./lib/*": "./lib/*",
|
|
38
|
+
"./dist/less-node.cjs": "./dist/less-node.cjs",
|
|
39
|
+
"./dist/less.js": "./dist/less.js",
|
|
40
|
+
"./dist/less.min.js": "./dist/less.min.js"
|
|
36
41
|
},
|
|
37
42
|
"directories": {
|
|
38
43
|
"test": "./test"
|
|
@@ -42,7 +47,6 @@
|
|
|
42
47
|
"lib",
|
|
43
48
|
"!lib/**/*.map",
|
|
44
49
|
"dist",
|
|
45
|
-
"index.js",
|
|
46
50
|
"index.cjs",
|
|
47
51
|
"README.md"
|
|
48
52
|
],
|
|
@@ -53,13 +57,14 @@
|
|
|
53
57
|
"scripts": {
|
|
54
58
|
"quicktest": "grunt quicktest",
|
|
55
59
|
"test": "grunt test",
|
|
60
|
+
"test:node": "grunt test:node",
|
|
56
61
|
"test:coverage": "c8 -r lcov -r json-summary -r text-summary -r html --include=\"lib/**/*.js\" --include=\"bin/**/*.js\" --exclude=\"dist/**\" --exclude=\"**/*.test.js\" --exclude=\"**/*.spec.js\" --exclude=\"test/**\" --exclude=\"tmp/**\" --exclude=\"**/abstract-file-manager.js\" --exclude=\"**/abstract-plugin-loader.js\" grunt shell:test && node scripts/coverage-report.js && node scripts/coverage-lines.js",
|
|
57
62
|
"grunt": "grunt",
|
|
58
63
|
"lint": "eslint '**/*.{ts,js}'",
|
|
59
64
|
"lint:fix": "eslint '**/*.{ts,js}' --fix",
|
|
60
65
|
"typecheck": "tsc --noEmit",
|
|
61
66
|
"build": "node build/rollup.js --dist",
|
|
62
|
-
"prepublishOnly": "npm run typecheck && grunt dist"
|
|
67
|
+
"prepublishOnly": "npm run typecheck && grunt dist && grunt test:node"
|
|
63
68
|
},
|
|
64
69
|
"optionalDependencies": {
|
|
65
70
|
"errno": "^0.1.1",
|
|
@@ -119,7 +124,11 @@
|
|
|
119
124
|
"shx": "^0.3.2",
|
|
120
125
|
"time-grunt": "^1.3.0",
|
|
121
126
|
"typescript": "^5.7.0",
|
|
122
|
-
"uikit": "2.27.4"
|
|
127
|
+
"uikit": "2.27.4",
|
|
128
|
+
"url": "^0.11.4",
|
|
129
|
+
"path-browserify": "^1.0.1",
|
|
130
|
+
"webpack": "^5.64.6",
|
|
131
|
+
"webpack-cli": "^5.1.4"
|
|
123
132
|
},
|
|
124
133
|
"keywords": [
|
|
125
134
|
"compile less",
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./lib/less-node').default;
|