@zohodesk/react-cli 1.1.9 → 1.1.10
Sign up to get free protection for your applications and to get access to all the features.
- package/.vscode/settings.json +25 -0
- package/README.md +63 -33
- package/bin/cli.js +5 -48
- package/lib/common/runPreProcess.js +66 -0
- package/lib/deprecationLogger.js +0 -1
- package/lib/loaderUtils/getCSSLoaders.js +1 -1
- package/lib/plugins/utils/fileHandling.js +13 -13
- package/lib/utils/deprecationSupport.js +7 -1
- package/npm-shrinkwrap.json +94 -2
- package/package.json +2 -2
@@ -0,0 +1,25 @@
|
|
1
|
+
{
|
2
|
+
"cSpell.words": [
|
3
|
+
"classname",
|
4
|
+
"cmjs",
|
5
|
+
"devbuild",
|
6
|
+
"escodegen",
|
7
|
+
"expublish",
|
8
|
+
"gitclone",
|
9
|
+
"hgclone",
|
10
|
+
"mockapi",
|
11
|
+
"mockserver",
|
12
|
+
"nowatchserver",
|
13
|
+
"nowatchstart",
|
14
|
+
"postpublish",
|
15
|
+
"propertytojson",
|
16
|
+
"sslcert",
|
17
|
+
"sslcertupdate",
|
18
|
+
"sstest",
|
19
|
+
"uglifycss",
|
20
|
+
"valuereplacer",
|
21
|
+
"xmlhttprequest",
|
22
|
+
"zohodesk",
|
23
|
+
"zsecurity"
|
24
|
+
]
|
25
|
+
}
|
package/README.md
CHANGED
@@ -43,6 +43,14 @@ Now to run app
|
|
43
43
|
---
|
44
44
|
|
45
45
|
# Change Logs
|
46
|
+
|
47
|
+
# 1.1.10 (2-8-2023)
|
48
|
+
|
49
|
+
**Issue Fix:**
|
50
|
+
|
51
|
+
- undefined plugin postcss issue fixed for docs.
|
52
|
+
- unnecessary deprecation warning stopped. (for exclude config)
|
53
|
+
|
46
54
|
# 1.1.9 (25-7-2023)
|
47
55
|
|
48
56
|
**Features:-**
|
@@ -53,55 +61,65 @@ Now to run app
|
|
53
61
|
- added support for pattern as function for custom chunks split logic.
|
54
62
|
- added options to split chunks base config in the key `app` => `customChunksBaseConfig` as object
|
55
63
|
- added `postCssPluginOrder` feature :
|
64
|
+
|
56
65
|
- If `app > postCssPluginOrder` or `docs > postCssPluginOrder` is set to "false", default plugin order will be followed.
|
57
|
-
- If `app > postCssPluginOrder` or `docs > postCssPluginOrder` is set to "true", order preserved in `plugins`
|
66
|
+
- If `app > postCssPluginOrder` or `docs > postCssPluginOrder` is set to "true", order preserved in `plugins` Object will be considered.
|
58
67
|
- If `app > postCssPluginOrder` or `docs > postCssPluginOrder` is set to an array with plugins in a custom order, the custom order will be considered.
|
59
68
|
|
60
|
-
- We use the same plugin names as in `patterns` for the plugins to execute successfully.
|
61
|
-
|
69
|
+
- We use the same plugin names as in `patterns` for the plugins to execute successfully.
|
62
70
|
|
63
71
|
**Issue Fix**
|
72
|
+
|
64
73
|
- fixed file path separator issue with split chunks config for vendor exclude list for windows (that was work well for mac and ubuntu only issue in windows).
|
65
74
|
- fixed cssUniqueness pattern not working in docs.
|
66
75
|
|
67
76
|
**Changes**
|
77
|
+
|
68
78
|
- previously all custom chunks are enforce true, no we have given support for enforce false for chunks on splitChunks config.
|
69
79
|
|
70
80
|
# 1.1.8
|
71
81
|
|
72
82
|
**Issue Fix**
|
73
|
-
|
83
|
+
|
84
|
+
- Docs fix for Selector Replace 'always require argument' issue.
|
74
85
|
|
75
86
|
# 1.1.7
|
76
87
|
|
77
88
|
**Feature**
|
78
|
-
- Markdown parser feature added in docs
|
79
|
-
For more info please refer to :
|
80
|
-
[details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/2.0.0/docs/MarkdownParser.md)
|
81
89
|
|
90
|
+
- Markdown parser feature added in docs
|
91
|
+
For more info please refer to :
|
92
|
+
[details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/2.0.0/docs/MarkdownParser.md)
|
82
93
|
|
83
94
|
# 1.1.6-exp.2
|
95
|
+
|
84
96
|
- fixed file path separator issue with split chunks config for vendor exclude list.
|
85
|
-
- added support for not doing enforce true for chunks on
|
97
|
+
- added support for not doing enforce true for chunks on splitChunks config.
|
86
98
|
|
87
99
|
# 1.1.5-exp.5
|
100
|
+
|
88
101
|
- fixed the issues regarding custom chunks base config schema.
|
89
102
|
|
90
103
|
# 1.1.5-exp.4
|
104
|
+
|
91
105
|
- added support for using regex expression to get group of chunks chunkId via Resource Hint plugin prefetch/preload hook.
|
92
106
|
|
93
107
|
# 1.1.5-exp.3
|
108
|
+
|
94
109
|
- added options to split chunks base config
|
95
110
|
- added support for passing custom chunks split logic as function.
|
111
|
+
|
96
112
|
# 1.1.6
|
97
113
|
|
98
114
|
**Issue Fix**
|
115
|
+
|
99
116
|
- local install react-cli spawnSync Error fix in npm 8
|
100
117
|
- babel version update issue fix (Cannot read properties of undefined (reading 'file')) and (BABEL_TRANSFORM_ERROR)
|
101
118
|
|
102
119
|
# 1.1.5-exp.2
|
103
120
|
|
104
121
|
**Issue Fix**
|
122
|
+
|
105
123
|
- local install react-cli spawnSync Error fix in npm 8
|
106
124
|
|
107
125
|
# 1.1.5
|
@@ -113,6 +131,7 @@ For more info please refer to :
|
|
113
131
|
# 1.1.4
|
114
132
|
|
115
133
|
**Issue Fix**
|
134
|
+
|
116
135
|
- global install react-cli spawnSync Error fix
|
117
136
|
- `0px` variable value conversion issue fixed
|
118
137
|
- pattern exclude for postcss plugins case fixed
|
@@ -120,6 +139,7 @@ For more info please refer to :
|
|
120
139
|
# 1.1.3
|
121
140
|
|
122
141
|
**Issue Fix**
|
142
|
+
|
123
143
|
- local install react-cli spawnSync Error fix
|
124
144
|
|
125
145
|
# 1.1.2
|
@@ -131,54 +151,63 @@ For more info please refer to :
|
|
131
151
|
# 1.1.1
|
132
152
|
|
133
153
|
**Issue Fix**
|
154
|
+
|
134
155
|
- docs component name incorrect in windows, when using --enableReactLive issue fixed.
|
135
156
|
|
136
|
-
**Feature Update**
|
157
|
+
**Feature Update**
|
158
|
+
|
137
159
|
- Support for desk-library to use Selector Replace plugin using individual script. To use `react-cli selectorReplacer [source] [target]`
|
138
160
|
|
139
161
|
# 1.1.0
|
140
162
|
|
141
163
|
**Feature Update**
|
142
|
-
|
164
|
+
|
165
|
+
- Support for desk-library to use variable conversion plugin using individual script. To use `react-cli variableConverter [source] [target]`
|
143
166
|
- pattern filter changes, new filter system instead of exclude to include or exclude files for plugins.
|
144
|
-
For more info please refer to :
|
145
|
-
[details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/2.0.0/docs/patternFiltering.md)
|
167
|
+
For more info please refer to :
|
168
|
+
[details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/2.0.0/docs/patternFiltering.md)
|
146
169
|
- React Live feature implemented for Docs.
|
147
|
-
[details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/2.0.0/docs/ReactLive.md)
|
170
|
+
[details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/2.0.0/docs/ReactLive.md)
|
148
171
|
|
149
172
|
# 1.0.3-beta.1
|
150
173
|
|
151
174
|
**Issue Fix**
|
152
|
-
- nock api not working issue fixed. This error throwing in @zohodesk/react-cli@1.0.2 version. but working in older versions ( 0.0.1-beta.178 )
|
153
175
|
|
176
|
+
- nock api not working issue fixed. This error throwing in @zohodesk/react-cli@1.0.2 version. but working in older versions ( 0.0.1-beta.178 )
|
154
177
|
|
155
178
|
# 1.0.3
|
156
179
|
|
157
180
|
**Feature Update**
|
181
|
+
|
158
182
|
- Support for global httpsCerts usage
|
159
183
|
- Support for global client_packages_group usage
|
160
|
-
- custom attribute for dynamically loading chunks, In this version we merged changes from [0.0.1-beta.167.1](#0.0.1-beta.167.1).
|
161
|
-
**Package Update**
|
162
|
-
- @zohodesk/client_packages_group@**1.0.1** ==>
|
163
|
-
|
164
|
-
|
184
|
+
- custom attribute for dynamically loading chunks, In this version we merged changes from [0.0.1-beta.167.1](#0.0.1-beta.167.1).
|
185
|
+
**Package Update**
|
186
|
+
- @zohodesk/client_packages_group@**1.0.1** ==> @zohodesk/client_packages_group@**1.0.2**
|
165
187
|
|
166
188
|
# 1.0.2
|
167
189
|
|
168
190
|
**Feature Update**
|
191
|
+
|
169
192
|
- Selector replace plugin made as a custom postcss-plugin with update to code that was unpublished in package.
|
170
193
|
|
171
194
|
# 1.0.1
|
172
195
|
|
173
196
|
**Issue Fix**
|
197
|
+
|
174
198
|
- variable conversion for px and var(--) values in same declaration was not supported, now it is supported.
|
175
199
|
- package-lock.json removed from `.npmignore`
|
176
200
|
|
177
201
|
**Feature Update**
|
202
|
+
|
178
203
|
- exclude added to Selector Plugin
|
204
|
+
|
179
205
|
# 1.0.0
|
206
|
+
|
180
207
|
## Major Release
|
208
|
+
|
181
209
|
**Changes:**
|
210
|
+
|
182
211
|
- File support added for `.webp` for `docs`, `dev` and `prod` mode
|
183
212
|
- File support added for `.webm` for `docs`, `dev` and `prod` mode
|
184
213
|
|
@@ -186,12 +215,11 @@ For more info please refer to :
|
|
186
215
|
|
187
216
|
- We have remove ssl certificate for security reasons.
|
188
217
|
So default https server won't run.
|
189
|
-
In order to make it work as before you
|
218
|
+
In order to make it work as before you need to specify two things
|
190
219
|
1. install `@zohodesk-private/client_dev_cert`
|
191
|
-
2.
|
192
|
-
|
193
|
-
|
194
|
-
|
220
|
+
2. `react-cli.app.server.httpsCerts` option example `"httpsCerts": "@zohodesk-private/client_dev_cert"`
|
221
|
+
unless configaration are proper this may break `start` , `docs` , `nowatchstart`. and mock wms `/wmsmockapi` won't work.
|
222
|
+
So Please be carefull when you update this version or above without proper configaration.
|
195
223
|
|
196
224
|
# 0.0.1-beta.178
|
197
225
|
|
@@ -204,11 +232,11 @@ For more info please refer to :
|
|
204
232
|
|
205
233
|
- We have remove ssl certificate for security reasons.
|
206
234
|
So default https server won't run.
|
207
|
-
In order to make it work as before you
|
235
|
+
In order to make it work as before you need to specify two things
|
208
236
|
1. install `@zohodesk-private/client_dev_cert`
|
209
|
-
2.
|
210
|
-
|
211
|
-
|
237
|
+
2. `react-cli.app.server.httpsCerts` option example `"httpsCerts": "@zohodesk-private/client_dev_cert"`
|
238
|
+
unless configaration are proper this may break `start` , `docs` , `nowatchstart`.
|
239
|
+
So Please be carefull when you update this version or above without proper configaration.
|
212
240
|
|
213
241
|
# 0.0.1-exp.178.2
|
214
242
|
|
@@ -222,11 +250,11 @@ For more info please refer to :
|
|
222
250
|
|
223
251
|
- We have remove ssl certificate for security reasons.
|
224
252
|
So default https server won't run.
|
225
|
-
In order to make it work as before you
|
253
|
+
In order to make it work as before you need to specify two things
|
226
254
|
1. install `@zohodesk-private/client_dev_cert`
|
227
|
-
2.
|
228
|
-
|
229
|
-
|
255
|
+
2. `react-cli.app.server.httpsCerts` option example `"httpsCerts": "@zohodesk-private/client_dev_cert"`
|
256
|
+
unless configaration are proper this may break `start` , `docs` , `nowatchstart`.
|
257
|
+
So Please be carefull when you update this version or above without proper configaration.
|
230
258
|
|
231
259
|
# 0.0.1-beta.177
|
232
260
|
|
@@ -384,8 +412,9 @@ Features:-
|
|
384
412
|
- In docs we have added `Description` for Component Props- check out it in `PropTypes` tab
|
385
413
|
|
386
414
|
# 0.0.1-beta.167.1
|
415
|
+
|
387
416
|
In this version we merged changes from [0.0.1-betaa.138.1](#0.0.1-betaa.138.1).
|
388
|
-
and with [0.0.1-beta.167](#0.0.1-beta.167) version changes.
|
417
|
+
and with [0.0.1-beta.167](#0.0.1-beta.167) version changes.
|
389
418
|
|
390
419
|
# 0.0.1-beta.167
|
391
420
|
|
@@ -649,6 +678,7 @@ impact servise related changes:-
|
|
649
678
|
- few enhancements
|
650
679
|
|
651
680
|
# 0.0.1-betaa.138.1
|
681
|
+
|
652
682
|
- new feature added for custom extra attribute for dynamically added tags by webpack.
|
653
683
|
- To enable this feature you need to enable "react-cli" => "app" => "customAttributes" => "enable"
|
654
684
|
- For more [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/9eea8df14e55584b2114b5e484ca8b751a4ba191/src/plugins/CustomAttributePlugin.md)
|
package/bin/cli.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
2
|
|
3
3
|
const path = require('path');
|
4
|
-
const {
|
5
|
-
const { spawnSync: _spawnSync, spawn } = require('child_process');
|
4
|
+
const { spawnSync: _spawnSync, execSync } = require('child_process');
|
6
5
|
const getOptions = require('../lib/utils/getOptions.js').default;
|
7
6
|
|
8
7
|
const { log } = require('../lib/utils/log.js');
|
9
8
|
const { getCliPath } = require('../lib/servers/getCliPath.js');
|
9
|
+
const { runPreProcess } = require('../src/common/runPreProcess.js');
|
10
10
|
//initPreCommitHook();
|
11
11
|
|
12
12
|
const [, , option] = process.argv;
|
@@ -24,7 +24,6 @@ function spawnSync(...args) {
|
|
24
24
|
}
|
25
25
|
|
26
26
|
const { esLint: esLintOptions } = options || {};
|
27
|
-
const { preprocess } = options;
|
28
27
|
const {
|
29
28
|
ignoreFilePaths: esLintIgnorePaths,
|
30
29
|
fix: esLintFix,
|
@@ -39,53 +38,10 @@ const babel = getCliPath('babel');
|
|
39
38
|
const propertyToJson = getCliPath('propertyToJson');
|
40
39
|
const esLint = getCliPath('eslint');
|
41
40
|
|
42
|
-
|
43
|
-
? path.join(process.cwd(), preprocess.runner)
|
44
|
-
: '';
|
45
|
-
const preprocessCli = preprocess.stopNodemon ? 'node' : nodemon;
|
46
|
-
if (preprocesserPath && existsSync(preprocesserPath)) {
|
47
|
-
// eslint-disable-next-line default-case
|
48
|
-
switch (option) {
|
49
|
-
case 'start':
|
50
|
-
case 'docs':
|
51
|
-
spawn(
|
52
|
-
preprocessCli,
|
53
|
-
[preprocesserPath, '--watch', path.parse(preprocesserPath).dir],
|
54
|
-
{
|
55
|
-
stdio: 'inherit',
|
56
|
-
cwd: path.parse(preprocesserPath).dir
|
57
|
-
}
|
58
|
-
);
|
59
|
-
// NOTE: it's ok if we not close this here
|
60
|
-
// Because when node server stops this program willbe closed So this nodemon will be killed as well
|
61
|
-
break;
|
62
|
-
case 'nowatchstart':
|
63
|
-
case 'devbuild':
|
64
|
-
case 'build:library:es':
|
65
|
-
case 'build:component:es':
|
66
|
-
case 'build:library:cmjs':
|
67
|
-
case 'build:component:cmjs':
|
68
|
-
spawnSync('node', [preprocesserPath], {
|
69
|
-
stdio: 'inherit',
|
70
|
-
cwd: preprocesserPath.slice(0, preprocesserPath.lastIndexOf('/') + 1)
|
71
|
-
});
|
72
|
-
break;
|
73
|
-
}
|
74
|
-
}
|
41
|
+
runPreProcess({ options, option, nodemon, spawnSync });
|
75
42
|
|
76
43
|
let result;
|
77
44
|
switch (option) {
|
78
|
-
case 'preprocessor':
|
79
|
-
if (preprocesserPath && existsSync(preprocesserPath)) {
|
80
|
-
result = spawnSync(preprocessCli, [preprocesserPath], {
|
81
|
-
stdio: 'inherit',
|
82
|
-
cwd: preprocesserPath.slice(0, preprocesserPath.lastIndexOf('/') + 1)
|
83
|
-
});
|
84
|
-
process.exit(result.status);
|
85
|
-
} else {
|
86
|
-
console.error(`preProcessor not exists ${preprocesserPath}`);
|
87
|
-
}
|
88
|
-
break;
|
89
45
|
case 'lint-setup': {
|
90
46
|
result = spawnSync(
|
91
47
|
'node',
|
@@ -481,8 +437,9 @@ switch (option) {
|
|
481
437
|
case '--v':
|
482
438
|
case '-v':
|
483
439
|
log(`@zohodesk/react-cli v${require('../package.json').version}`);
|
440
|
+
log(`Node Js Version : ${process.version}`);
|
441
|
+
log(`Npm Version : ${execSync('npm --version')}`);
|
484
442
|
break;
|
485
|
-
|
486
443
|
default:
|
487
444
|
log(`react-cli > Unknown option "${option}"`);
|
488
445
|
log('react-cli app <appName>');
|
@@ -0,0 +1,66 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
const path = require('path');
|
4
|
+
|
5
|
+
const {
|
6
|
+
existsSync
|
7
|
+
} = require('fs');
|
8
|
+
|
9
|
+
const {
|
10
|
+
spawn
|
11
|
+
} = require('child_process');
|
12
|
+
|
13
|
+
exports.runPreProcess = function runPreProcess({
|
14
|
+
options,
|
15
|
+
option,
|
16
|
+
nodemon,
|
17
|
+
spawnSync
|
18
|
+
}) {
|
19
|
+
const {
|
20
|
+
preprocess
|
21
|
+
} = options;
|
22
|
+
const preprocessorPath = preprocess.runner ? path.join(process.cwd(), preprocess.runner) : '';
|
23
|
+
const preprocessCli = preprocess.stopNodemon ? 'node' : nodemon;
|
24
|
+
|
25
|
+
if (preprocessorPath && existsSync(preprocessorPath)) {
|
26
|
+
const preprocessorDirPath = path.dirname(preprocessorPath);
|
27
|
+
const watchOptions = preprocessCli === nodemon ? ['--watch', preprocessorDirPath] : []; // eslint-disable-next-line default-case
|
28
|
+
|
29
|
+
switch (option) {
|
30
|
+
case 'start':
|
31
|
+
case 'docs':
|
32
|
+
spawn(preprocessCli, [preprocessorPath, ...watchOptions], {
|
33
|
+
stdio: 'inherit',
|
34
|
+
cwd: preprocessorDirPath
|
35
|
+
}); // NOTE: it's ok if we not close this here
|
36
|
+
// Because when node server stops this program will be closed So this nodemon will be killed as well
|
37
|
+
|
38
|
+
break;
|
39
|
+
|
40
|
+
case 'nowatchstart':
|
41
|
+
case 'devbuild':
|
42
|
+
case 'build:library:es':
|
43
|
+
case 'build:component:es':
|
44
|
+
case 'build:library:cmjs':
|
45
|
+
case 'build:component:cmjs':
|
46
|
+
spawnSync('node', [preprocessorPath], {
|
47
|
+
stdio: 'inherit',
|
48
|
+
cwd: preprocessorPath.slice(0, preprocessorPath.lastIndexOf('/') + 1)
|
49
|
+
});
|
50
|
+
break;
|
51
|
+
|
52
|
+
case 'preprocessor':
|
53
|
+
{
|
54
|
+
const result = spawnSync(preprocessCli, [preprocessorPath, ...watchOptions], {
|
55
|
+
stdio: 'inherit',
|
56
|
+
cwd: path.dirname(preprocessorPath)
|
57
|
+
});
|
58
|
+
process.exit(result.status);
|
59
|
+
break;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
} else if (option === 'preprocess') {
|
63
|
+
console.error(`preProcessor not exists ${preprocessorPath}`);
|
64
|
+
process.exit(0);
|
65
|
+
}
|
66
|
+
};
|
package/lib/deprecationLogger.js
CHANGED
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.deprecateMessage = deprecateMessage;
|
7
7
|
exports.deprecateOption = deprecateOption;
|
8
8
|
exports.deprecationLoggerEnd = deprecationLoggerEnd;
|
9
|
-
exports.deprecationLoggerStart = deprecationLoggerStart;
|
10
9
|
|
11
10
|
var _logger = require("./logger");
|
12
11
|
|
@@ -68,7 +68,7 @@ const getCSSLoaders = optionsObj => {
|
|
68
68
|
cssLoaderOptions.modules.getLocalIdent = (0, _cssClassNameGenerate.default)(cssUniqueness, cssHashSelectors, classNamePrefix, patterns);
|
69
69
|
}
|
70
70
|
|
71
|
-
const pluginOrder = calculatePostCssPluginOrder(postCssPluginOrder, Object.keys(plugins).filter(x => plugins[x]
|
71
|
+
const pluginOrder = calculatePostCssPluginOrder(postCssPluginOrder, Object.keys(plugins).filter(x => plugins[x] === true)); // console.log('selector weight config : ', selectorWeightConfig);
|
72
72
|
|
73
73
|
const postcssPlugins = [plugins.valueReplacer && require('../postcss-plugins/ValueReplacer')(valueReplacer), plugins.hasRTL && require('@zohodesk/postcss-rtl')({
|
74
74
|
addPrefixToSelector: function addPrefixToSelector(selector, prefix) {
|
@@ -53,23 +53,23 @@ function isFileNameMatchingPattern({
|
|
53
53
|
plugins.forEach(p => {
|
54
54
|
pluginObj[p.postcssPlugin] = p;
|
55
55
|
});
|
56
|
-
const finalPlugins =
|
57
|
-
order.forEach(key => {
|
58
|
-
const p = pluginObj[aliasNames[key]];
|
56
|
+
const finalPlugins = order.filter(key => {
|
59
57
|
const pluginSpecificFilter = filterObject[key];
|
60
58
|
|
61
59
|
if (!pluginSpecificFilter || pluginSpecificFilter.length === 0) {
|
62
|
-
|
63
|
-
}
|
64
|
-
// eslint-disable-next-line no-use-before-define
|
65
|
-
const isMatching = isFilePathMatchingPattern(filename, pluginSpecificFilter);
|
60
|
+
return true;
|
61
|
+
} // eslint-disable-next-line no-use-before-define
|
66
62
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
63
|
+
|
64
|
+
const isMatching = isFilePathMatchingPattern(filename, pluginSpecificFilter);
|
65
|
+
return isMatching;
|
66
|
+
}).map(key => {
|
67
|
+
const p = pluginObj[aliasNames[key]];
|
68
|
+
return p;
|
69
|
+
}); // if unknown key given in plugins and pattern loop will run but post-css plugin won't be available and will be undefined in array
|
70
|
+
// So we do filter as safety measure.
|
71
|
+
|
72
|
+
return finalPlugins.filter(Boolean);
|
73
73
|
}
|
74
74
|
|
75
75
|
function isFilePathMatchingPattern(filePath, patterns) {
|
@@ -109,13 +109,19 @@ function deprecationSupport(options, disableDeprecationWarning) {
|
|
109
109
|
|
110
110
|
function addExcludesToPattern(patterns, exclude, type) {
|
111
111
|
Object.keys(defaultPostCssPluginOptions).forEach(key => {
|
112
|
-
if (exclude[key]
|
112
|
+
if (!exclude[key] || exclude[key].length === 0) {
|
113
|
+
return;
|
114
|
+
}
|
115
|
+
|
116
|
+
if (patterns[key].length === 0) {
|
113
117
|
deprecateOption(`${type}.exclude.${key}`, `${type}.patterns.${key}`);
|
114
118
|
let tempArr = exclude[key];
|
115
119
|
tempArr = tempArr.map(x => _path.default.join('!**', x, '**')); // Since patterns[key] is empty we need to wildcard for allow all others.
|
116
120
|
|
117
121
|
tempArr.unshift('*');
|
118
122
|
patterns[key] = tempArr;
|
123
|
+
} else if (exclude[key].length > 0 && patterns[key].length > 0) {
|
124
|
+
deprecateOption(`${type}.exclude.${key}`, `${type}.patterns.${key}`, ` And Since you have used ${type}.patterns.${key} we won't use ${type}.exclude.${key}. So please make appropriate changes`);
|
119
125
|
}
|
120
126
|
});
|
121
127
|
}
|
package/npm-shrinkwrap.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@zohodesk/react-cli",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.10",
|
4
4
|
"lockfileVersion": 2,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "@zohodesk/react-cli",
|
9
|
-
"version": "1.1.
|
9
|
+
"version": "1.1.10",
|
10
10
|
"license": "ISC",
|
11
11
|
"dependencies": {
|
12
12
|
"@babel/cli": "7.10.5",
|
@@ -57,6 +57,7 @@
|
|
57
57
|
"jsdom": "16.4.0",
|
58
58
|
"loader-utils": "2.0.0",
|
59
59
|
"lodash-webpack-plugin": "0.11.5",
|
60
|
+
"markdown-it": "13.0.1",
|
60
61
|
"mini-css-extract-plugin": "0.10.0",
|
61
62
|
"nock": "13.2.9",
|
62
63
|
"nodemailer": "6.4.11",
|
@@ -12144,6 +12145,14 @@
|
|
12144
12145
|
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
|
12145
12146
|
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="
|
12146
12147
|
},
|
12148
|
+
"node_modules/linkify-it": {
|
12149
|
+
"version": "4.0.1",
|
12150
|
+
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz",
|
12151
|
+
"integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==",
|
12152
|
+
"dependencies": {
|
12153
|
+
"uc.micro": "^1.0.1"
|
12154
|
+
}
|
12155
|
+
},
|
12147
12156
|
"node_modules/load-json-file": {
|
12148
12157
|
"version": "1.1.0",
|
12149
12158
|
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
|
@@ -12342,6 +12351,37 @@
|
|
12342
12351
|
"node": ">=0.10.0"
|
12343
12352
|
}
|
12344
12353
|
},
|
12354
|
+
"node_modules/markdown-it": {
|
12355
|
+
"version": "13.0.1",
|
12356
|
+
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.1.tgz",
|
12357
|
+
"integrity": "sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==",
|
12358
|
+
"dependencies": {
|
12359
|
+
"argparse": "^2.0.1",
|
12360
|
+
"entities": "~3.0.1",
|
12361
|
+
"linkify-it": "^4.0.1",
|
12362
|
+
"mdurl": "^1.0.1",
|
12363
|
+
"uc.micro": "^1.0.5"
|
12364
|
+
},
|
12365
|
+
"bin": {
|
12366
|
+
"markdown-it": "bin/markdown-it.js"
|
12367
|
+
}
|
12368
|
+
},
|
12369
|
+
"node_modules/markdown-it/node_modules/argparse": {
|
12370
|
+
"version": "2.0.1",
|
12371
|
+
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
12372
|
+
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
|
12373
|
+
},
|
12374
|
+
"node_modules/markdown-it/node_modules/entities": {
|
12375
|
+
"version": "3.0.1",
|
12376
|
+
"resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz",
|
12377
|
+
"integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==",
|
12378
|
+
"engines": {
|
12379
|
+
"node": ">=0.12"
|
12380
|
+
},
|
12381
|
+
"funding": {
|
12382
|
+
"url": "https://github.com/fb55/entities?sponsor=1"
|
12383
|
+
}
|
12384
|
+
},
|
12345
12385
|
"node_modules/md5.js": {
|
12346
12386
|
"version": "1.3.5",
|
12347
12387
|
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
|
@@ -12352,6 +12392,11 @@
|
|
12352
12392
|
"safe-buffer": "^5.1.2"
|
12353
12393
|
}
|
12354
12394
|
},
|
12395
|
+
"node_modules/mdurl": {
|
12396
|
+
"version": "1.0.1",
|
12397
|
+
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
|
12398
|
+
"integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g=="
|
12399
|
+
},
|
12355
12400
|
"node_modules/media-typer": {
|
12356
12401
|
"version": "0.3.0",
|
12357
12402
|
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
@@ -17169,6 +17214,11 @@
|
|
17169
17214
|
"is-typedarray": "^1.0.0"
|
17170
17215
|
}
|
17171
17216
|
},
|
17217
|
+
"node_modules/uc.micro": {
|
17218
|
+
"version": "1.0.6",
|
17219
|
+
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
|
17220
|
+
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA=="
|
17221
|
+
},
|
17172
17222
|
"node_modules/uglify-js": {
|
17173
17223
|
"version": "3.17.3",
|
17174
17224
|
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.3.tgz",
|
@@ -28076,6 +28126,14 @@
|
|
28076
28126
|
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
|
28077
28127
|
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="
|
28078
28128
|
},
|
28129
|
+
"linkify-it": {
|
28130
|
+
"version": "4.0.1",
|
28131
|
+
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz",
|
28132
|
+
"integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==",
|
28133
|
+
"requires": {
|
28134
|
+
"uc.micro": "^1.0.1"
|
28135
|
+
}
|
28136
|
+
},
|
28079
28137
|
"load-json-file": {
|
28080
28138
|
"version": "1.1.0",
|
28081
28139
|
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
|
@@ -28234,6 +28292,30 @@
|
|
28234
28292
|
"object-visit": "^1.0.0"
|
28235
28293
|
}
|
28236
28294
|
},
|
28295
|
+
"markdown-it": {
|
28296
|
+
"version": "13.0.1",
|
28297
|
+
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.1.tgz",
|
28298
|
+
"integrity": "sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==",
|
28299
|
+
"requires": {
|
28300
|
+
"argparse": "^2.0.1",
|
28301
|
+
"entities": "~3.0.1",
|
28302
|
+
"linkify-it": "^4.0.1",
|
28303
|
+
"mdurl": "^1.0.1",
|
28304
|
+
"uc.micro": "^1.0.5"
|
28305
|
+
},
|
28306
|
+
"dependencies": {
|
28307
|
+
"argparse": {
|
28308
|
+
"version": "2.0.1",
|
28309
|
+
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
28310
|
+
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
|
28311
|
+
},
|
28312
|
+
"entities": {
|
28313
|
+
"version": "3.0.1",
|
28314
|
+
"resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz",
|
28315
|
+
"integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q=="
|
28316
|
+
}
|
28317
|
+
}
|
28318
|
+
},
|
28237
28319
|
"md5.js": {
|
28238
28320
|
"version": "1.3.5",
|
28239
28321
|
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
|
@@ -28244,6 +28326,11 @@
|
|
28244
28326
|
"safe-buffer": "^5.1.2"
|
28245
28327
|
}
|
28246
28328
|
},
|
28329
|
+
"mdurl": {
|
28330
|
+
"version": "1.0.1",
|
28331
|
+
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
|
28332
|
+
"integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g=="
|
28333
|
+
},
|
28247
28334
|
"media-typer": {
|
28248
28335
|
"version": "0.3.0",
|
28249
28336
|
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
@@ -32025,6 +32112,11 @@
|
|
32025
32112
|
"is-typedarray": "^1.0.0"
|
32026
32113
|
}
|
32027
32114
|
},
|
32115
|
+
"uc.micro": {
|
32116
|
+
"version": "1.0.6",
|
32117
|
+
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
|
32118
|
+
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA=="
|
32119
|
+
},
|
32028
32120
|
"uglify-js": {
|
32029
32121
|
"version": "3.17.3",
|
32030
32122
|
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.3.tgz",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@zohodesk/react-cli",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.10",
|
4
4
|
"description": "A CLI tool for build modern web application and libraries",
|
5
5
|
"scripts": {
|
6
6
|
"init": "node ./lib/utils/init.js",
|
@@ -80,7 +80,7 @@
|
|
80
80
|
"jsdom": "16.4.0",
|
81
81
|
"loader-utils": "2.0.0",
|
82
82
|
"lodash-webpack-plugin": "0.11.5",
|
83
|
-
"markdown-it": "
|
83
|
+
"markdown-it": "13.0.1",
|
84
84
|
"mini-css-extract-plugin": "0.10.0",
|
85
85
|
"nock": "13.2.9",
|
86
86
|
"nodemailer": "6.4.11",
|