@docusaurus/utils 0.0.0-4816 → 0.0.0-4819

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/lib/pathUtils.js CHANGED
@@ -10,7 +10,7 @@ exports.addTrailingPathSeparator = exports.escapePath = exports.aliasedSitePath
10
10
  const tslib_1 = require("tslib");
11
11
  const path_1 = tslib_1.__importDefault(require("path"));
12
12
  // Based on https://github.com/gatsbyjs/gatsby/pull/21518/files
13
- // MacOS (APFS) and Windows (NTFS) filename length limit = 255 chars,
13
+ // macOS (APFS) and Windows (NTFS) filename length limit = 255 chars,
14
14
  // Others = 255 bytes
15
15
  const MAX_PATH_SEGMENT_CHARS = 255;
16
16
  const MAX_PATH_SEGMENT_BYTES = 255;
@@ -21,7 +21,7 @@ const isWindows = () => process.platform === 'win32';
21
21
  const isNameTooLong = (str) =>
22
22
  // Not entirely correct: we can't assume FS from OS. But good enough?
23
23
  isMacOs() || isWindows()
24
- ? str.length + SPACE_FOR_APPENDING > MAX_PATH_SEGMENT_CHARS // MacOS (APFS) and Windows (NTFS) filename length limit (255 chars)
24
+ ? str.length + SPACE_FOR_APPENDING > MAX_PATH_SEGMENT_CHARS // macOS (APFS) and Windows (NTFS) filename length limit (255 chars)
25
25
  : Buffer.from(str).length + SPACE_FOR_APPENDING > MAX_PATH_SEGMENT_BYTES; // Other (255 bytes)
26
26
  exports.isNameTooLong = isNameTooLong;
27
27
  function shortName(str) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/utils",
3
- "version": "0.0.0-4816",
3
+ "version": "0.0.0-4819",
4
4
  "description": "Node utility functions for Docusaurus packages.",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "license": "MIT",
20
20
  "dependencies": {
21
- "@docusaurus/logger": "0.0.0-4816",
21
+ "@docusaurus/logger": "0.0.0-4819",
22
22
  "@svgr/webpack": "^6.2.1",
23
23
  "file-loader": "^6.2.0",
24
24
  "fs-extra": "^10.0.1",
@@ -38,12 +38,12 @@
38
38
  "node": ">=14"
39
39
  },
40
40
  "devDependencies": {
41
- "@docusaurus/types": "0.0.0-4816",
41
+ "@docusaurus/types": "0.0.0-4819",
42
42
  "@types/dedent": "^0.7.0",
43
43
  "@types/github-slugger": "^1.3.0",
44
44
  "@types/micromatch": "^4.0.2",
45
45
  "@types/react-dom": "^17.0.14",
46
46
  "dedent": "^0.7.0"
47
47
  },
48
- "gitHead": "d5a8e65a97b9895a6cda1b858ea40a534e8a2483"
48
+ "gitHead": "f91fc42f44d6a94159c7d777ca5a776b1c623110"
49
49
  }
package/src/pathUtils.ts CHANGED
@@ -8,7 +8,7 @@
8
8
  import path from 'path';
9
9
 
10
10
  // Based on https://github.com/gatsbyjs/gatsby/pull/21518/files
11
- // MacOS (APFS) and Windows (NTFS) filename length limit = 255 chars,
11
+ // macOS (APFS) and Windows (NTFS) filename length limit = 255 chars,
12
12
  // Others = 255 bytes
13
13
  const MAX_PATH_SEGMENT_CHARS = 255;
14
14
  const MAX_PATH_SEGMENT_BYTES = 255;
@@ -21,7 +21,7 @@ const isWindows = () => process.platform === 'win32';
21
21
  export const isNameTooLong = (str: string): boolean =>
22
22
  // Not entirely correct: we can't assume FS from OS. But good enough?
23
23
  isMacOs() || isWindows()
24
- ? str.length + SPACE_FOR_APPENDING > MAX_PATH_SEGMENT_CHARS // MacOS (APFS) and Windows (NTFS) filename length limit (255 chars)
24
+ ? str.length + SPACE_FOR_APPENDING > MAX_PATH_SEGMENT_CHARS // macOS (APFS) and Windows (NTFS) filename length limit (255 chars)
25
25
  : Buffer.from(str).length + SPACE_FOR_APPENDING > MAX_PATH_SEGMENT_BYTES; // Other (255 bytes)
26
26
 
27
27
  export function shortName(str: string): string {