@docusaurus/plugin-content-docs 0.0.0-4753 → 0.0.0-4756

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/lastUpdate.js CHANGED
@@ -26,14 +26,17 @@ async function getFileLastUpdate(filePath) {
26
26
  return { timestamp: result.timestamp, author: result.author };
27
27
  }
28
28
  catch (err) {
29
- if (err instanceof utils_1.GitNotFoundError && !showedGitRequirementError) {
30
- logger_1.default.warn('Sorry, the docs plugin last update options require Git.');
31
- showedGitRequirementError = true;
29
+ if (err instanceof utils_1.GitNotFoundError) {
30
+ if (!showedGitRequirementError) {
31
+ logger_1.default.warn('Sorry, the docs plugin last update options require Git.');
32
+ showedGitRequirementError = true;
33
+ }
32
34
  }
33
- else if (err instanceof utils_1.FileNotTrackedError &&
34
- !showedFileNotTrackedError) {
35
- logger_1.default.warn('Cannot infer the update date for some files, as they are not tracked by git.');
36
- showedFileNotTrackedError = true;
35
+ else if (err instanceof utils_1.FileNotTrackedError) {
36
+ if (!showedFileNotTrackedError) {
37
+ logger_1.default.warn('Cannot infer the update date for some files, as they are not tracked by git.');
38
+ showedFileNotTrackedError = true;
39
+ }
37
40
  }
38
41
  else {
39
42
  logger_1.default.warn(err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/plugin-content-docs",
3
- "version": "0.0.0-4753",
3
+ "version": "0.0.0-4756",
4
4
  "description": "Docs plugin for Docusaurus.",
5
5
  "main": "lib/index.js",
6
6
  "exports": {
@@ -23,11 +23,11 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
- "@docusaurus/core": "0.0.0-4753",
27
- "@docusaurus/logger": "0.0.0-4753",
28
- "@docusaurus/mdx-loader": "0.0.0-4753",
29
- "@docusaurus/utils": "0.0.0-4753",
30
- "@docusaurus/utils-validation": "0.0.0-4753",
26
+ "@docusaurus/core": "0.0.0-4756",
27
+ "@docusaurus/logger": "0.0.0-4756",
28
+ "@docusaurus/mdx-loader": "0.0.0-4756",
29
+ "@docusaurus/utils": "0.0.0-4756",
30
+ "@docusaurus/utils-validation": "0.0.0-4756",
31
31
  "combine-promises": "^1.1.0",
32
32
  "fs-extra": "^10.0.1",
33
33
  "import-fresh": "^3.3.0",
@@ -39,8 +39,8 @@
39
39
  "webpack": "^5.70.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@docusaurus/module-type-aliases": "0.0.0-4753",
43
- "@docusaurus/types": "0.0.0-4753",
42
+ "@docusaurus/module-type-aliases": "0.0.0-4756",
43
+ "@docusaurus/types": "0.0.0-4756",
44
44
  "@types/js-yaml": "^4.0.5",
45
45
  "@types/picomatch": "^2.3.0",
46
46
  "commander": "^5.1.0",
@@ -56,5 +56,5 @@
56
56
  "engines": {
57
57
  "node": ">=14"
58
58
  },
59
- "gitHead": "61ef11a14262b1821e65c45bb703698bffc891e5"
59
+ "gitHead": "898f8d2e375b927bc51dde4d642119fb5f9f05c3"
60
60
  }
package/src/lastUpdate.ts CHANGED
@@ -31,17 +31,18 @@ export async function getFileLastUpdate(
31
31
  });
32
32
  return {timestamp: result.timestamp, author: result.author};
33
33
  } catch (err) {
34
- if (err instanceof GitNotFoundError && !showedGitRequirementError) {
35
- logger.warn('Sorry, the docs plugin last update options require Git.');
36
- showedGitRequirementError = true;
37
- } else if (
38
- err instanceof FileNotTrackedError &&
39
- !showedFileNotTrackedError
40
- ) {
41
- logger.warn(
42
- 'Cannot infer the update date for some files, as they are not tracked by git.',
43
- );
44
- showedFileNotTrackedError = true;
34
+ if (err instanceof GitNotFoundError) {
35
+ if (!showedGitRequirementError) {
36
+ logger.warn('Sorry, the docs plugin last update options require Git.');
37
+ showedGitRequirementError = true;
38
+ }
39
+ } else if (err instanceof FileNotTrackedError) {
40
+ if (!showedFileNotTrackedError) {
41
+ logger.warn(
42
+ 'Cannot infer the update date for some files, as they are not tracked by git.',
43
+ );
44
+ showedFileNotTrackedError = true;
45
+ }
45
46
  } else {
46
47
  logger.warn(err);
47
48
  }