@docusaurus/core 2.0.0 → 2.0.1

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.
@@ -1,38 +1,37 @@
1
+ "use strict";
1
2
  /**
2
3
  * Copyright (c) Facebook, Inc. and its affiliates.
3
4
  *
4
5
  * This source code is licensed under the MIT license found in the
5
6
  * LICENSE file in the root directory of this source tree.
6
7
  */
7
-
8
- const path = require('path');
9
- const fs = require('fs-extra');
10
- const {waitFile} = require('wait-file');
11
-
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ const tslib_1 = require("tslib");
10
+ const path_1 = tslib_1.__importDefault(require("path"));
11
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
12
+ const wait_on_1 = tslib_1.__importDefault(require("wait-on"));
12
13
  class WaitPlugin {
13
- constructor(options) {
14
- this.filepath = options.filepath;
15
- }
16
-
17
- apply(compiler) {
18
- // Before finishing the compilation step
19
- compiler.hooks.make.tapAsync('WaitPlugin', (compilation, callback) => {
20
- // To prevent 'waitFile' error on waiting non-existing directory
21
- fs.ensureDir(path.dirname(this.filepath), () => {
22
- // Wait until file exist
23
- waitFile({
24
- resources: [this.filepath],
25
- interval: 300,
26
- })
27
- .then(() => {
28
- callback();
29
- })
30
- .catch((error) => {
31
- console.warn(`WaitPlugin error: ${error}`);
32
- });
33
- });
34
- });
35
- }
14
+ constructor(options) {
15
+ this.filepath = options.filepath;
16
+ }
17
+ apply(compiler) {
18
+ // Before finishing the compilation step
19
+ compiler.hooks.make.tapAsync('WaitPlugin', (compilation, callback) => {
20
+ // To prevent 'waitFile' error on waiting non-existing directory
21
+ fs_extra_1.default.ensureDir(path_1.default.dirname(this.filepath), {}, () => {
22
+ // Wait until file exist
23
+ (0, wait_on_1.default)({
24
+ resources: [this.filepath],
25
+ interval: 300,
26
+ })
27
+ .then(() => {
28
+ callback();
29
+ })
30
+ .catch((error) => {
31
+ console.warn(`WaitPlugin error: ${error}`);
32
+ });
33
+ });
34
+ });
35
+ }
36
36
  }
37
-
38
- module.exports = WaitPlugin;
37
+ exports.default = WaitPlugin;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@docusaurus/core",
3
3
  "description": "Easy to Maintain Open Source Documentation Websites",
4
- "version": "2.0.0",
4
+ "version": "2.0.1",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -43,13 +43,13 @@
43
43
  "@babel/runtime": "^7.18.6",
44
44
  "@babel/runtime-corejs3": "^7.18.6",
45
45
  "@babel/traverse": "^7.18.8",
46
- "@docusaurus/cssnano-preset": "2.0.0",
47
- "@docusaurus/logger": "2.0.0",
48
- "@docusaurus/mdx-loader": "2.0.0",
46
+ "@docusaurus/cssnano-preset": "2.0.1",
47
+ "@docusaurus/logger": "2.0.1",
48
+ "@docusaurus/mdx-loader": "2.0.1",
49
49
  "@docusaurus/react-loadable": "5.5.2",
50
- "@docusaurus/utils": "2.0.0",
51
- "@docusaurus/utils-common": "2.0.0",
52
- "@docusaurus/utils-validation": "2.0.0",
50
+ "@docusaurus/utils": "2.0.1",
51
+ "@docusaurus/utils-common": "2.0.1",
52
+ "@docusaurus/utils-validation": "2.0.1",
53
53
  "@slorber/static-site-generator-webpack-plugin": "^4.0.7",
54
54
  "@svgr/webpack": "^6.2.1",
55
55
  "autoprefixer": "^10.4.7",
@@ -106,8 +106,8 @@
106
106
  "webpackbar": "^5.0.2"
107
107
  },
108
108
  "devDependencies": {
109
- "@docusaurus/module-type-aliases": "2.0.0",
110
- "@docusaurus/types": "2.0.0",
109
+ "@docusaurus/module-type-aliases": "2.0.1",
110
+ "@docusaurus/types": "2.0.1",
111
111
  "@types/detect-port": "^1.3.2",
112
112
  "@types/react-dom": "^18.0.6",
113
113
  "@types/react-router-config": "^5.0.6",
@@ -127,5 +127,5 @@
127
127
  "engines": {
128
128
  "node": ">=16.14"
129
129
  },
130
- "gitHead": "2a9e8f5ec807e49a973fc72326f1ef26092e977e"
130
+ "gitHead": "1ddee1c29cabf9bb52e4d78af6ebfaaabb1bc1f9"
131
131
  }