@docusaurus/plugin-client-redirects 0.0.0-4350 → 0.0.0-4351

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.
@@ -4,5 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import { PluginContext, RedirectMetadata } from './types';
7
+ import type { PluginContext, RedirectMetadata } from './types';
8
8
  export default function collectRedirects(pluginContext: PluginContext, trailingSlash: boolean | undefined): RedirectMetadata[];
@@ -4,6 +4,6 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import { RedirectMetadata } from './types';
7
+ import type { RedirectMetadata } from './types';
8
8
  export declare function createToExtensionsRedirects(paths: string[], extensions: string[]): RedirectMetadata[];
9
9
  export declare function createFromExtensionsRedirects(paths: string[], extensions: string[]): RedirectMetadata[];
package/lib/index.d.ts CHANGED
@@ -4,6 +4,6 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import { LoadContext, Plugin } from '@docusaurus/types';
8
- import { UserPluginOptions } from './types';
7
+ import type { LoadContext, Plugin } from '@docusaurus/types';
8
+ import type { UserPluginOptions } from './types';
9
9
  export default function pluginClientRedirectsPages(context: LoadContext, opts: UserPluginOptions): Plugin<unknown>;
@@ -4,6 +4,6 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import { PluginOptions, UserPluginOptions } from './types';
7
+ import type { PluginOptions, UserPluginOptions } from './types';
8
8
  export declare const DefaultPluginOptions: PluginOptions;
9
9
  export default function normalizePluginOptions(userPluginOptions?: UserPluginOptions): PluginOptions;
@@ -4,5 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import { RedirectMetadata } from './types';
7
+ import type { RedirectMetadata } from './types';
8
8
  export declare function validateRedirect(redirect: RedirectMetadata): void;
package/lib/types.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import { Props } from '@docusaurus/types';
7
+ import type { Props } from '@docusaurus/types';
8
8
  export declare type PluginOptions = {
9
9
  id: string;
10
10
  fromExtensions: string[];
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import { PluginContext, RedirectMetadata } from './types';
7
+ import type { PluginContext, RedirectMetadata } from './types';
8
8
  export declare type WriteFilesPluginContext = Pick<PluginContext, 'baseUrl' | 'outDir'>;
9
9
  export declare type RedirectFileMetadata = {
10
10
  fileAbsolutePath: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/plugin-client-redirects",
3
- "version": "0.0.0-4350",
3
+ "version": "0.0.0-4351",
4
4
  "description": "Client redirects plugin for Docusaurus.",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/plugin-client-redirects.d.ts",
@@ -18,11 +18,11 @@
18
18
  },
19
19
  "license": "MIT",
20
20
  "dependencies": {
21
- "@docusaurus/core": "0.0.0-4350",
22
- "@docusaurus/logger": "0.0.0-4350",
23
- "@docusaurus/utils": "0.0.0-4350",
24
- "@docusaurus/utils-common": "0.0.0-4350",
25
- "@docusaurus/utils-validation": "0.0.0-4350",
21
+ "@docusaurus/core": "0.0.0-4351",
22
+ "@docusaurus/logger": "0.0.0-4351",
23
+ "@docusaurus/utils": "0.0.0-4351",
24
+ "@docusaurus/utils-common": "0.0.0-4351",
25
+ "@docusaurus/utils-validation": "0.0.0-4351",
26
26
  "chalk": "^4.1.2",
27
27
  "eta": "^1.12.3",
28
28
  "fs-extra": "^10.0.0",
@@ -30,7 +30,7 @@
30
30
  "tslib": "^2.3.1"
31
31
  },
32
32
  "devDependencies": {
33
- "@docusaurus/types": "0.0.0-4350"
33
+ "@docusaurus/types": "0.0.0-4351"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "react": "^16.8.4 || ^17.0.0",
@@ -39,5 +39,5 @@
39
39
  "engines": {
40
40
  "node": ">=14"
41
41
  },
42
- "gitHead": "395433a6f915dd0e6d73223228968fdc58761fd0"
42
+ "gitHead": "6633ee41d0b5c670e9e4c18fb6ddd9c8bb05a41b"
43
43
  }
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import {uniqBy, difference, groupBy} from 'lodash';
9
- import {
9
+ import type {
10
10
  PluginContext,
11
11
  RedirectMetadata,
12
12
  PluginOptions,
@@ -19,7 +19,7 @@ import {
19
19
  import {validateRedirect} from './redirectValidation';
20
20
  import {
21
21
  applyTrailingSlash,
22
- ApplyTrailingSlashParams,
22
+ type ApplyTrailingSlashParams,
23
23
  } from '@docusaurus/utils-common';
24
24
 
25
25
  import logger from '@docusaurus/logger';
@@ -10,7 +10,7 @@ import {
10
10
  removeSuffix,
11
11
  removeTrailingSlash,
12
12
  } from '@docusaurus/utils';
13
- import {RedirectMetadata} from './types';
13
+ import type {RedirectMetadata} from './types';
14
14
 
15
15
  const ExtensionAdditionalMessage =
16
16
  'If the redirect extension system is not good enough for your usecase, you can create redirects yourself with the "createRedirects" plugin option.';
package/src/index.ts CHANGED
@@ -5,14 +5,14 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import {LoadContext, Plugin, Props} from '@docusaurus/types';
9
- import {UserPluginOptions, PluginContext, RedirectMetadata} from './types';
8
+ import type {LoadContext, Plugin, Props} from '@docusaurus/types';
9
+ import type {UserPluginOptions, PluginContext, RedirectMetadata} from './types';
10
10
 
11
11
  import normalizePluginOptions from './normalizePluginOptions';
12
12
  import collectRedirects from './collectRedirects';
13
13
  import writeRedirectFiles, {
14
14
  toRedirectFilesMetadata,
15
- RedirectFileMetadata,
15
+ type RedirectFileMetadata,
16
16
  } from './writeRedirectFiles';
17
17
  import {removePrefix, addLeadingSlash} from '@docusaurus/utils';
18
18
 
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import {PluginOptions, RedirectOption, UserPluginOptions} from './types';
8
+ import type {PluginOptions, RedirectOption, UserPluginOptions} from './types';
9
9
  import {Joi, PathnameSchema} from '@docusaurus/utils-validation';
10
10
  import {DEFAULT_PLUGIN_ID} from '@docusaurus/utils';
11
11
 
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import {RedirectMetadata} from './types';
8
+ import type {RedirectMetadata} from './types';
9
9
  import {Joi, PathnameSchema} from '@docusaurus/utils-validation';
10
10
 
11
11
  const RedirectSchema = Joi.object<RedirectMetadata>({
package/src/types.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import {Props} from '@docusaurus/types';
8
+ import type {Props} from '@docusaurus/types';
9
9
 
10
10
  export type PluginOptions = {
11
11
  id: string;
@@ -9,7 +9,7 @@ import fs from 'fs-extra';
9
9
  import path from 'path';
10
10
  import {memoize} from 'lodash';
11
11
 
12
- import {PluginContext, RedirectMetadata} from './types';
12
+ import type {PluginContext, RedirectMetadata} from './types';
13
13
  import createRedirectPageContent from './createRedirectPageContent';
14
14
  import {normalizeUrl} from '@docusaurus/utils';
15
15