|
| 1 | +diff --git a/packages/gatsby/index.d.ts b/packages/gatsby/index.d.ts |
| 2 | +index 4ed2e22114..df803ef8b4 100644 |
| 3 | +--- a/packages/gatsby/index.d.ts |
| 4 | ++++ b/packages/gatsby/index.d.ts |
| 5 | +@@ -350,7 +350,7 @@ export interface GatsbyNode< |
| 6 | + callback: PluginCallback<void> |
| 7 | + ): void | Promise<void> |
| 8 | + |
| 9 | +- /** Called at the end of the bootstrap process after all other extension APIs have been called. If you indend to use this API in a plugin, use "unstable_onPluginInit" instead. */ |
| 10 | ++ /** Called at the end of the bootstrap process after all other extension APIs have been called. If you indend to use this API in a plugin, use "onPluginInit" instead. */ |
| 11 | + onPreBootstrap?( |
| 12 | + args: ParentSpanPluginArgs, |
| 13 | + options: PluginOptions, |
| 14 | +@@ -376,18 +376,18 @@ export interface GatsbyNode< |
| 15 | + * @gatsbyVersion 3.9.0 |
| 16 | + * @example |
| 17 | + * let createJobV2 |
| 18 | +- * exports.unstable_onPluginInit = ({ actions }) => { |
| 19 | ++ * exports.onPluginInit = ({ actions }) => { |
| 20 | + * // Store job creation action to use it later |
| 21 | + * createJobV2 = actions.createJobV2 |
| 22 | + * } |
| 23 | + */ |
| 24 | +- unstable_onPluginInit?( |
| 25 | ++ onPluginInit?( |
| 26 | + args: ParentSpanPluginArgs, |
| 27 | + options: PluginOptions, |
| 28 | + callback: PluginCallback<void> |
| 29 | + ): void | Promise<void> |
| 30 | + |
| 31 | +- /** The first API called during Gatsby execution, runs as soon as plugins are loaded, before cache initialization and bootstrap preparation. If you indend to use this API in a plugin, use "unstable_onPluginInit" instead. */ |
| 32 | ++ /** The first API called during Gatsby execution, runs as soon as plugins are loaded, before cache initialization and bootstrap preparation. If you indend to use this API in a plugin, use "onPluginInit" instead. */ |
| 33 | + onPreInit?( |
| 34 | + args: ParentSpanPluginArgs, |
| 35 | + options: PluginOptions, |
| 36 | +diff --git a/packages/gatsby/scripts/__tests__/api.js b/packages/gatsby/scripts/__tests__/api.js |
| 37 | +index c0b7735a76..593059e8ce 100644 |
| 38 | +--- a/packages/gatsby/scripts/__tests__/api.js |
| 39 | ++++ b/packages/gatsby/scripts/__tests__/api.js |
| 40 | +@@ -57,7 +57,7 @@ it("generates the expected api output", done => { |
| 41 | + "resolvableExtensions": Object {}, |
| 42 | + "setFieldsOnGraphQLNodeType": Object {}, |
| 43 | + "sourceNodes": Object {}, |
| 44 | +- "unstable_onPluginInit": Object { |
| 45 | ++ "onPluginInit": Object { |
| 46 | + "version": "3.9.0", |
| 47 | + }, |
| 48 | + "unstable_shouldOnCreateNode": Object { |
| 49 | +diff --git a/packages/gatsby/src/utils/api-node-docs.ts b/packages/gatsby/src/utils/api-node-docs.ts |
| 50 | +index 793386f614..06b2259350 100644 |
| 51 | +--- a/packages/gatsby/src/utils/api-node-docs.ts |
| 52 | ++++ b/packages/gatsby/src/utils/api-node-docs.ts |
| 53 | +@@ -415,14 +415,13 @@ export const onPreInit = true |
| 54 | + * |
| 55 | + * @example |
| 56 | + * let createJobV2 |
| 57 | +- * exports.unstable_onPluginInit = ({ actions }) => { |
| 58 | ++ * exports.onPluginInit = ({ actions }) => { |
| 59 | + * // store job creation action to use it later |
| 60 | + * createJobV2 = actions.createJobV2 |
| 61 | + * } |
| 62 | + * @gatsbyVersion 3.9.0 |
| 63 | + */ |
| 64 | +-// eslint-disable-next-line @typescript-eslint/naming-convention |
| 65 | +-export const unstable_onPluginInit = true |
| 66 | ++export const onPluginInit = true |
| 67 | + |
| 68 | + /** |
| 69 | + * Called once Gatsby has initialized itself and is ready to bootstrap your site. |
0 commit comments