@e-mc/module 0.13.3 → 0.13.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 (3) hide show
  1. package/README.md +6 -6
  2. package/index.js +3 -10
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  ## Interface
11
11
 
12
- * [View Source](https://www.unpkg.com/@e-mc/types@0.13.3/lib/index.d.ts)
12
+ * [View Source](https://www.unpkg.com/@e-mc/types@0.13.4/lib/index.d.ts)
13
13
 
14
14
  ```typescript
15
15
  import type { LogStatus } from "./squared";
@@ -421,11 +421,11 @@ interface LoggerModule {
421
421
 
422
422
  ## References
423
423
 
424
- - https://www.unpkg.com/@e-mc/types@0.13.3/lib/core.d.ts
425
- - https://www.unpkg.com/@e-mc/types@0.13.3/lib/logger.d.ts
426
- - https://www.unpkg.com/@e-mc/types@0.13.3/lib/module.d.ts
427
- - https://www.unpkg.com/@e-mc/types@0.13.3/lib/node.d.ts
428
- - https://www.unpkg.com/@e-mc/types@0.13.3/lib/settings.d.ts
424
+ - https://www.unpkg.com/@e-mc/types@0.13.4/lib/core.d.ts
425
+ - https://www.unpkg.com/@e-mc/types@0.13.4/lib/logger.d.ts
426
+ - https://www.unpkg.com/@e-mc/types@0.13.4/lib/module.d.ts
427
+ - https://www.unpkg.com/@e-mc/types@0.13.4/lib/node.d.ts
428
+ - https://www.unpkg.com/@e-mc/types@0.13.4/lib/settings.d.ts
429
429
 
430
430
  * https://www.npmjs.com/package/@types/node
431
431
 
package/index.js CHANGED
@@ -878,7 +878,7 @@ class Module extends EventEmitter {
878
878
  static LOG_STYLE_NOTICE = Object.freeze({ titleBgColor: 'bgGrey', titleColor: 'white' });
879
879
  static LOG_STYLE_REVERSE = Object.freeze({ titleBgColor: 'bgWhite', titleColor: 'black', messageBgColor: 'bgGrey' });
880
880
  static get VERSION() {
881
- return "0.13.3";
881
+ return "0.13.4";
882
882
  }
883
883
  static get LOG_TYPE() {
884
884
  return types_1.LOG_TYPE;
@@ -1542,11 +1542,7 @@ class Module extends EventEmitter {
1542
1542
  return false;
1543
1543
  }
1544
1544
  try {
1545
- let target = fs.statSync(value);
1546
- if (target.isSymbolicLink()) {
1547
- target = fs.statSync(fs.realpathSync(value));
1548
- }
1549
- return target.isDirectory();
1545
+ return fs.statSync(value).isDirectory();
1550
1546
  }
1551
1547
  catch {
1552
1548
  return false;
@@ -1608,10 +1604,7 @@ class Module extends EventEmitter {
1608
1604
  return '';
1609
1605
  }
1610
1606
  static joinPath(...values) {
1611
- let normalize = false;
1612
- if (typeof values.at(-1) === 'boolean') {
1613
- normalize = values.pop();
1614
- }
1607
+ const normalize = typeof values.at(-1) === 'boolean' && values.pop();
1615
1608
  const paths = values.filter(item => (0, types_1.isString)(item)).map(value => this.toPosix(value, normalize));
1616
1609
  let result = paths[0] || '';
1617
1610
  for (let i = 1; i < paths.length; ++i) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/module",
3
- "version": "0.13.3",
3
+ "version": "0.13.4",
4
4
  "description": "Module base class for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -19,7 +19,7 @@
19
19
  "license": "BSD-3-Clause",
20
20
  "homepage": "https://github.com/anpham6/e-mc#readme",
21
21
  "dependencies": {
22
- "@e-mc/types": "0.13.3",
22
+ "@e-mc/types": "0.13.4",
23
23
  "chalk": "4.1.2",
24
24
  "file-type": "^20.5.0",
25
25
  "js-yaml": "^4.1.0",