docusaurus-plugin-myog 0.1.0 → 0.2.0

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/README.md CHANGED
@@ -13,12 +13,16 @@ the image service requires a paid plan or card trial.
13
13
 
14
14
  ## Requirements and tested support
15
15
 
16
- - Docusaurus **3.10.2**. The peer and runtime checks require that exact release.
17
- Other releases need compatibility verification before widening support.
16
+ - Docusaurus **3.10 or a later 3.x release**: stable `@docusaurus/core`
17
+ `>=3.10.0 <4.0.0`. Tested with 3.10.0 and 3.10.2. The runtime check rejects
18
+ older releases, prereleases and Docusaurus 4, which is not supported yet.
19
+ - Docusaurus 3.10.0 itself fails plain webpack builds with webpack 5.106 or
20
+ newer, before any plugin runs (its webpackbar 6 dependency). 3.10.1 fixed
21
+ this. Use 3.10.1 or later, or Rspack.
18
22
  - Tested with the classic preset, React/react-dom **19.3.1** and **18.3.1**,
19
23
  Node.js **24.1.0** and **20.11.0**, plain **webpack** and **Rspack** builds.
20
- Rspack uses `@docusaurus/faster` 3.10.2 with `future.v4: true`; the webpack
21
- fixture explicitly disables `future.v4` and `future.faster`.
24
+ Rspack uses `@docusaurus/faster` at the core version with `future.v4: true`;
25
+ the webpack fixture explicitly disables `future.v4` and `future.faster`.
22
26
  These are representative combinations, not every combination of those values.
23
27
  - Node.js 20.11.0 or newer is required. Later Node releases are not all tested.
24
28
  - A MyOG account with the site's domain registered and an active subscription
@@ -31,17 +35,16 @@ the image service requires a paid plan or card trial.
31
35
  The integration uses the documented `configureWebpack` hook, but remapping the
32
36
  resolved theme alias and relying on core App's metadata render order are
33
37
  **undocumented internal contracts**. The build fails if the required alias is
34
- missing, unsafe to wrap, or the core version is unsupported. Keep this exact
35
- Docusaurus version until a newer release has been checked. See
38
+ missing, unsafe to wrap, or the core version is unsupported. See
36
39
  [DEVELOPMENT.md](https://github.com/MyOG-social/docusaurus-plugin-myog/blob/main/DEVELOPMENT.md)
37
40
  for the verification recipe.
38
41
 
39
42
  ## Install
40
43
 
41
- In your Docusaurus 3.10.2 site:
44
+ In your Docusaurus 3.10+ site:
42
45
 
43
46
  ```sh
44
- pnpm add --save-exact docusaurus-plugin-myog@0.1.0
47
+ pnpm add docusaurus-plugin-myog@^0.2.0
45
48
  ```
46
49
 
47
50
  Add the plugin to `docusaurus.config.ts` (or `.js`):
@@ -1,3 +1,4 @@
1
+ export declare const SUPPORTED_CORE_RANGE = ">=3.10.0 <4.0.0";
1
2
  export declare function assertSupportedVersion(version: string): void;
2
3
  export declare function wrapSiteMetadata({ aliases, wrapper }: {
3
4
  aliases: unknown;
@@ -1,12 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SUPPORTED_CORE_RANGE = void 0;
3
4
  exports.assertSupportedVersion = assertSupportedVersion;
4
5
  exports.wrapSiteMetadata = wrapSiteMetadata;
5
6
  const node_path_1 = require("node:path");
6
7
  const options_1 = require("./options");
8
+ exports.SUPPORTED_CORE_RANGE = ">=3.10.0 <4.0.0";
7
9
  function assertSupportedVersion(version) {
8
- if (version !== "3.10.2") {
9
- throw new Error(`[${options_1.PLUGIN_NAME}] Docusaurus ${version} is not supported. Use @docusaurus/core 3.10.2 or remove this plugin and use the manual guide at https://myog.social/docs/docusaurus. The SiteMetadata integration requires the tested theme alias and App render-order contracts.`);
10
+ const match = /^(\d+)\.(\d+)\.(\d+)$/.exec(version);
11
+ if (!match || Number(match[1]) !== 3 || Number(match[2]) < 10) {
12
+ throw new Error(`[${options_1.PLUGIN_NAME}] Docusaurus ${version} is not supported. Use a stable @docusaurus/core ${exports.SUPPORTED_CORE_RANGE} release or remove this plugin and use the manual guide at https://myog.social/docs/docusaurus. The SiteMetadata integration requires the tested theme alias and App render-order contracts.`);
10
13
  }
11
14
  }
12
15
  function wrapSiteMetadata({ aliases, wrapper }) {
@@ -18,7 +21,7 @@ function wrapSiteMetadata({ aliases, wrapper }) {
18
21
  !(0, node_path_1.isAbsolute)(original) ||
19
22
  original === wrapper ||
20
23
  resolved["@myog-original/SiteMetadata"] !== undefined) {
21
- throw new Error(`[${options_1.PLUGIN_NAME}] Cannot wrap the resolved @theme/SiteMetadata alias safely. Use Docusaurus 3.10.2 and remove competing SiteMetadata alias remaps, or remove this plugin and use https://myog.social/docs/docusaurus. No fallback is substituted because it could discard your site's metadata.`);
24
+ throw new Error(`[${options_1.PLUGIN_NAME}] Cannot wrap the resolved @theme/SiteMetadata alias safely. Use a supported Docusaurus release (>=3.10.0 <4.0.0) and remove competing SiteMetadata alias remaps, or remove this plugin and use https://myog.social/docs/docusaurus. No fallback is substituted because it could discard your site's metadata.`);
22
25
  }
23
26
  return {
24
27
  resolve: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docusaurus-plugin-myog",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Adds a MyOG.social og:image and twitter:image to every Docusaurus page, generated from each page's URL",
5
5
  "keywords": [
6
6
  "docusaurus",
@@ -28,8 +28,8 @@
28
28
  "node": ">=20.11.0"
29
29
  },
30
30
  "peerDependencies": {
31
- "@docusaurus/core": "3.10.2",
32
- "@docusaurus/types": "3.10.2",
31
+ "@docusaurus/core": ">=3.10.0 <4.0.0",
32
+ "@docusaurus/types": ">=3.10.0 <4.0.0",
33
33
  "react": "^18.0.0 || ^19.0.0"
34
34
  },
35
35
  "peerDependenciesMeta": {