refactor(docs): extract loadVersion() without changing the behavior (#11230)

* refactor, extract loadVersion() without changing behavior

* Add minimal test case for loadVersion()

* Add minimal test case for loadVersion()

* more refactor, rename index.ts to version.ts

* fix tests

* empty
This commit is contained in:
Sébastien Lorber 2025-06-02 18:44:07 +02:00 committed by GitHub
parent dacfc17fb4
commit 18b47fdfc1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 281 additions and 121 deletions

View file

@ -19,7 +19,7 @@ import type {
PluginOptions,
VersionMetadata,
} from '@docusaurus/plugin-content-docs';
import type {VersionContext} from './index';
import type {VersionContext} from './version';
/** Add a prefix like `community_version-1.0.0`. No-op for default instance. */
function addPluginIdPrefix(fileOrDir: string, pluginId: string): string {