@tarojs/helper 3.5.0-alpha.3 → 3.5.0-alpha.4

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.
Files changed (2) hide show
  1. package/dist/utils.js +11 -11
  2. package/package.json +3 -3
package/dist/utils.js CHANGED
@@ -255,7 +255,7 @@ function generateConstantsList(constants) {
255
255
  const res = {};
256
256
  if (constants && !isEmptyObject(constants)) {
257
257
  for (const key in constants) {
258
- if (lodash_1.isPlainObject(constants[key])) {
258
+ if ((0, lodash_1.isPlainObject)(constants[key])) {
259
259
  res[key] = generateConstantsList(constants[key]);
260
260
  }
261
261
  else {
@@ -315,7 +315,7 @@ function emptyDirectory(dirPath, opts = { excludes: [] }) {
315
315
  }
316
316
  exports.emptyDirectory = emptyDirectory;
317
317
  /* eslint-enable */
318
- const pascalCase = (str) => str.charAt(0).toUpperCase() + lodash_1.camelCase(str.substr(1));
318
+ const pascalCase = (str) => str.charAt(0).toUpperCase() + (0, lodash_1.camelCase)(str.substr(1));
319
319
  exports.pascalCase = pascalCase;
320
320
  function getInstalledNpmPkgPath(pkgName, basedir) {
321
321
  const resolvePath = require('resolve');
@@ -336,7 +336,7 @@ function getInstalledNpmPkgVersion(pkgName, basedir) {
336
336
  }
337
337
  exports.getInstalledNpmPkgVersion = getInstalledNpmPkgVersion;
338
338
  const recursiveMerge = (src, ...args) => {
339
- return lodash_1.mergeWith(src, ...args, (value, srcValue) => {
339
+ return (0, lodash_1.mergeWith)(src, ...args, (value, srcValue) => {
340
340
  const typeValue = typeof value;
341
341
  const typeSrcValue = typeof srcValue;
342
342
  if (typeValue !== typeSrcValue)
@@ -345,20 +345,20 @@ const recursiveMerge = (src, ...args) => {
345
345
  return value.concat(srcValue);
346
346
  }
347
347
  if (typeValue === 'object') {
348
- return exports.recursiveMerge(value, srcValue);
348
+ return (0, exports.recursiveMerge)(value, srcValue);
349
349
  }
350
350
  });
351
351
  };
352
352
  exports.recursiveMerge = recursiveMerge;
353
353
  const mergeVisitors = (src, ...args) => {
354
354
  const validFuncs = ['exit', 'enter'];
355
- return lodash_1.mergeWith(src, ...args, (value, srcValue, key, object, srcObject) => {
355
+ return (0, lodash_1.mergeWith)(src, ...args, (value, srcValue, key, object, srcObject) => {
356
356
  if (!object.hasOwnProperty(key) || !srcObject.hasOwnProperty(key)) {
357
357
  return undefined;
358
358
  }
359
359
  const shouldMergeToArray = validFuncs.indexOf(key) > -1;
360
360
  if (shouldMergeToArray) {
361
- return lodash_1.flatMap([value, srcValue]);
361
+ return (0, lodash_1.flatMap)([value, srcValue]);
362
362
  }
363
363
  const [newValue, newSrcValue] = [value, srcValue].map(v => {
364
364
  if (typeof v === 'function') {
@@ -370,7 +370,7 @@ const mergeVisitors = (src, ...args) => {
370
370
  return v;
371
371
  }
372
372
  });
373
- return exports.mergeVisitors(newValue, newSrcValue);
373
+ return (0, exports.mergeVisitors)(newValue, newSrcValue);
374
374
  });
375
375
  };
376
376
  exports.mergeVisitors = mergeVisitors;
@@ -386,7 +386,7 @@ const applyArrayedVisitors = obj => {
386
386
  };
387
387
  }
388
388
  else if (typeof funcs === 'object') {
389
- exports.applyArrayedVisitors(funcs);
389
+ (0, exports.applyArrayedVisitors)(funcs);
390
390
  }
391
391
  }
392
392
  return obj;
@@ -448,7 +448,7 @@ const getAllFilesInFloder = (floder, filter = []) => __awaiter(void 0, void 0, v
448
448
  yield Promise.all(list.map((item) => __awaiter(void 0, void 0, void 0, function* () {
449
449
  const itemPath = path.join(floder, item.name);
450
450
  if (item.isDirectory) {
451
- const _files = yield exports.getAllFilesInFloder(itemPath, filter);
451
+ const _files = yield (0, exports.getAllFilesInFloder)(itemPath, filter);
452
452
  files = [...files, ..._files];
453
453
  }
454
454
  else if (item.isFile) {
@@ -615,7 +615,7 @@ function readConfig(configPath) {
615
615
  let result = {};
616
616
  if (fs.existsSync(configPath)) {
617
617
  const importPaths = constants_1.REG_SCRIPTS.test(configPath) ? analyzeImport(configPath) : [];
618
- swcRegister_1.default({
618
+ (0, swcRegister_1.default)({
619
619
  only: [
620
620
  configPath,
621
621
  filepath => importPaths.includes(filepath)
@@ -625,7 +625,7 @@ function readConfig(configPath) {
625
625
  importPaths.concat([configPath]).forEach(item => {
626
626
  delete require.cache[item];
627
627
  });
628
- result = exports.getModuleDefaultExport(require(configPath));
628
+ result = (0, exports.getModuleDefaultExport)(require(configPath));
629
629
  }
630
630
  else {
631
631
  result = readPageConfig(configPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/helper",
3
- "version": "3.5.0-alpha.3",
3
+ "version": "3.5.0-alpha.4",
4
4
  "description": "Taro Helper",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -42,7 +42,7 @@
42
42
  "@babel/runtime": "^7.14.5",
43
43
  "@swc/core": "^1.2.147",
44
44
  "@swc/register": "^0.1.10",
45
- "@tarojs/taro": "3.5.0-alpha.3",
45
+ "@tarojs/taro": "3.5.0-alpha.4",
46
46
  "chalk": "3.0.0",
47
47
  "chokidar": "^3.3.1",
48
48
  "cross-spawn": "^7.0.3",
@@ -53,5 +53,5 @@
53
53
  "resolve": "^1.6.0",
54
54
  "yauzl": "2.10.0"
55
55
  },
56
- "gitHead": "31c8fe1b7ddfd586a21dca05d11fef5314069a69"
56
+ "gitHead": "b35cf347b6e511c93d509243867a4f67294d0c67"
57
57
  }