Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 52 additions & 60 deletions pages/v5.x/globals.md

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions pages/v5.x/webpack/namespaces/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ implement this method to allow the occurrence order plugin to count correctly

#### `getReference(moduleGraph)`

> Stability: 0 - Deprecated

* `moduleGraph` {ModuleGraph}
* Returns: {never}

Returns the referenced module and export

##### Deprecated

#### `getReferencedExports(moduleGraph, runtime)`

* `moduleGraph` {ModuleGraph}
Expand Down Expand Up @@ -333,13 +333,13 @@ implement this method to allow the occurrence order plugin to count correctly

#### `getReference(moduleGraph)`

> Stability: 0 - Deprecated

* `moduleGraph` {ModuleGraph}
* Returns: {never}

Returns the referenced module and export

##### Deprecated

#### `getReferencedExports(moduleGraph, runtime)`

* `moduleGraph` {ModuleGraph}
Expand Down Expand Up @@ -516,13 +516,13 @@ implement this method to allow the occurrence order plugin to count correctly

#### `getReference(moduleGraph)`

> Stability: 0 - Deprecated

* `moduleGraph` {ModuleGraph}
* Returns: {never}

Returns the referenced module and export

##### Deprecated

#### `getReferencedExports(moduleGraph, runtime)`

* `moduleGraph` {ModuleGraph}
Expand Down Expand Up @@ -693,13 +693,13 @@ implement this method to allow the occurrence order plugin to count correctly

#### `getReference(moduleGraph)`

> Stability: 0 - Deprecated

* `moduleGraph` {ModuleGraph}
* Returns: {never}

Returns the referenced module and export

##### Deprecated

#### `getReferencedExports(moduleGraph, runtime)`

* `moduleGraph` {ModuleGraph}
Expand Down
12 changes: 6 additions & 6 deletions pages/v5.x/webpack/namespaces/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -469,14 +469,14 @@ This data will be passed to restoreFromUnsafeCache later.

#### `needRebuild(fileTimestamps, contextTimestamps)`

> Stability: 0 - Deprecated

* `fileTimestamps` {Map}
* `contextTimestamps` {Map}
* Returns: {boolean}

Use needBuild instead

##### Deprecated

#### `originalSource()`

* Returns: {Source}
Expand Down Expand Up @@ -512,15 +512,15 @@ Use needBuild instead

#### `source(dependencyTemplates, runtimeTemplate[, type])`

> Stability: 0 - Deprecated

* `dependencyTemplates` {DependencyTemplates}
* `runtimeTemplate` {RuntimeTemplate}
* `type` {string}
* Returns: {Source}

Use codeGeneration() instead

##### Deprecated

#### `updateCacheModule(module)`

* `module` {Module}
Expand All @@ -543,9 +543,9 @@ and properties.

#### Static method: `getSourceBasicTypes(module)`

> Stability: 0 - Deprecated

* `module` {Module}
* Returns: {ReadonlySet}

In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.

##### Deprecated
4 changes: 2 additions & 2 deletions pages/v5.x/webpack/namespaces/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,12 @@ Block pre walking iterates the scope for block variable declarations

#### `inScope(params, fn)`

> Stability: 0 - Deprecated

* `params` {string|Identifier|Property|MemberExpression|ObjectPattern|ArrayPattern|RestElement|AssignmentPattern[]}
* `fn` {object}
* Returns: {void}

##### Deprecated

#### `isAsiPosition(pos)`

* `pos` {number}
Expand Down
24 changes: 12 additions & 12 deletions pages/v5.x/webpack/namespaces/runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -477,14 +477,14 @@ This data will be passed to restoreFromUnsafeCache later.

#### `needRebuild(fileTimestamps, contextTimestamps)`

> Stability: 0 - Deprecated

* `fileTimestamps` {Map}
* `contextTimestamps` {Map}
* Returns: {boolean}

Use needBuild instead

##### Deprecated

#### `originalSource()`

* Returns: {Source}
Expand Down Expand Up @@ -520,15 +520,15 @@ Use needBuild instead

#### `source(dependencyTemplates, runtimeTemplate[, type])`

> Stability: 0 - Deprecated

* `dependencyTemplates` {DependencyTemplates}
* `runtimeTemplate` {RuntimeTemplate}
* `type` {string}
* Returns: {Source}

Use codeGeneration() instead

##### Deprecated

#### `updateCacheModule(module)`

* `module` {Module}
Expand All @@ -546,13 +546,13 @@ and properties.

#### Static method: `getSourceBasicTypes(module)`

> Stability: 0 - Deprecated

* `module` {Module}
* Returns: {ReadonlySet}

In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.

##### Deprecated

***

## Class: `LoadScriptRuntimeModule`
Expand Down Expand Up @@ -1025,14 +1025,14 @@ This data will be passed to restoreFromUnsafeCache later.

#### `needRebuild(fileTimestamps, contextTimestamps)`

> Stability: 0 - Deprecated

* `fileTimestamps` {Map}
* `contextTimestamps` {Map}
* Returns: {boolean}

Use needBuild instead

##### Deprecated

#### `originalSource()`

* Returns: {Source}
Expand Down Expand Up @@ -1068,15 +1068,15 @@ Use needBuild instead

#### `source(dependencyTemplates, runtimeTemplate[, type])`

> Stability: 0 - Deprecated

* `dependencyTemplates` {DependencyTemplates}
* `runtimeTemplate` {RuntimeTemplate}
* `type` {string}
* Returns: {Source}

Use codeGeneration() instead

##### Deprecated

#### `updateCacheModule(module)`

* `module` {Module}
Expand All @@ -1099,9 +1099,9 @@ and properties.

#### Static method: `getSourceBasicTypes(module)`

> Stability: 0 - Deprecated

* `module` {Module}
* Returns: {ReadonlySet}

In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.

##### Deprecated
28 changes: 14 additions & 14 deletions pages/v5.x/webpack/namespaces/web.md
Original file line number Diff line number Diff line change
Expand Up @@ -469,14 +469,14 @@ This data will be passed to restoreFromUnsafeCache later.

#### `needRebuild(fileTimestamps, contextTimestamps)`

> Stability: 0 - Deprecated

* `fileTimestamps` {Map}
* `contextTimestamps` {Map}
* Returns: {boolean}

Use needBuild instead

##### Deprecated

#### `originalSource()`

* Returns: {Source}
Expand Down Expand Up @@ -512,15 +512,15 @@ Use needBuild instead

#### `source(dependencyTemplates, runtimeTemplate[, type])`

> Stability: 0 - Deprecated

* `dependencyTemplates` {DependencyTemplates}
* `runtimeTemplate` {RuntimeTemplate}
* `type` {string}
* Returns: {Source}

Use codeGeneration() instead

##### Deprecated

#### `updateCacheModule(module)`

* `module` {Module}
Expand All @@ -543,13 +543,13 @@ and properties.

#### Static method: `getSourceBasicTypes(module)`

> Stability: 0 - Deprecated

* `module` {Module}
* Returns: {ReadonlySet}

In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.

##### Deprecated

***

## Class: `FetchCompileAsyncWasmPlugin`
Expand Down Expand Up @@ -1064,14 +1064,14 @@ This data will be passed to restoreFromUnsafeCache later.

#### `needRebuild(fileTimestamps, contextTimestamps)`

> Stability: 0 - Deprecated

* `fileTimestamps` {Map}
* `contextTimestamps` {Map}
* Returns: {boolean}

Use needBuild instead

##### Deprecated

#### `originalSource()`

* Returns: {Source}
Expand Down Expand Up @@ -1107,15 +1107,15 @@ Use needBuild instead

#### `source(dependencyTemplates, runtimeTemplate[, type])`

> Stability: 0 - Deprecated

* `dependencyTemplates` {DependencyTemplates}
* `runtimeTemplate` {RuntimeTemplate}
* `type` {string}
* Returns: {Source}

Use codeGeneration() instead

##### Deprecated

#### `updateCacheModule(module)`

* `module` {Module}
Expand All @@ -1138,13 +1138,13 @@ and properties.

#### Static method: `getSourceBasicTypes(module)`

> Stability: 0 - Deprecated

* `module` {Module}
* Returns: {ReadonlySet}

In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.

##### Deprecated

***

## Class: `JsonpTemplatePlugin`
Expand All @@ -1166,9 +1166,9 @@ Apply the plugin

#### Static method: `getCompilationHooks(compilation)`

> Stability: 0 - Deprecated

* `compilation` {Compilation}
* Returns: {JsonpCompilationPluginHooks}

use JsonpChunkLoadingRuntimeModule.getCompilationHooks instead

##### Deprecated
34 changes: 34 additions & 0 deletions plugins/theme/helpers/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,38 @@ export default (ctx) => ({
typedList(entries) {
return entries.map(ctx.helpers.typedListItem).join("\n");
},

stabilityBlockquote(comment) {
if (!comment) return null;

const deprecated = comment.blockTags?.find((t) => t.tag === "@deprecated");
const isExperimental =
comment.modifierTags?.has("@experimental") ||
comment.modifierTags?.has("@beta");
const legacy = comment.blockTags?.find((t) => t.tag === "@legacy");

if (deprecated) {
const message = deprecated.content?.length
? ctx.helpers.getCommentParts(deprecated.content).trim()
: "";
return message
? `> Stability: 0 - Deprecated: ${message}`
: `> Stability: 0 - Deprecated`;
}

if (isExperimental) {
return `> Stability: 1 - Experimental`;
}

if (legacy) {
const message = legacy.content?.length
? ctx.helpers.getCommentParts(legacy.content).trim()
: "";
return message
? `> Stability: 3 - Legacy: ${message}`
: `> Stability: 3 - Legacy`;
}

return null;
},
});
Loading