chore: fork dsh-better-sidebar v0.18.0 as dsh-apes-sidebar v1.0.0

- Rename dsh-better-sidebar → dsh-apes-sidebar across 74 files (262 occurrences)
- Bump version 0.18.0 → 1.0.0 (package.json + dsh.plugin.json + SIDEBAR_SERVICE_VERSION)
- Add forkedFrom metadata to package.json (upstream pin: commit 9e1a034)
- Add fork notice banner to README.md (MIT attribution preserved)
- Keep original MIT copyright (c) 2026 dsh-external
- Full gate green: typecheck + build (6 bundles) + test (1241 passed / 9 skipped)
This commit is contained in:
figmar
2026-09-06 18:09:09 +08:00
parent 9e1a034527
commit 2a7e030b3b
75 changed files with 275 additions and 267 deletions
+9 -9
View File
@@ -1,15 +1,15 @@
/**
* tsdown build for dsh-better-sidebar: the host-half lib (lib/index.js and
* tsdown build for dsh-apes-sidebar: the host-half lib (lib/index.js and
* the lib/invariant.js companion, ESM node) plus the two browser client
* bundles (lib/client.js and lib/client-registry.js, CJS closure factory) —
* one per install channel:
*
* - `lib/client.js` serves the official profile channel, registering with
* the package-name id `dsh-better-sidebar` (the client-modules compose
* the package-name id `dsh-apes-sidebar` (the client-modules compose
* keys on the package name; keep it in sync with package.json `name`),
* - `lib/client-registry.js` serves the plugin-registry channel
* (dsh.plugin.json), registering with the manifest id
* `dsh-external/dsh-better-sidebar` (the registry browser-side `arrive()`
* `dsh-external/dsh-apes-sidebar` (the registry browser-side `arrive()`
* check requires bundle id === plugin id).
*
* Both bundles replicate the official DSH client-bundle preset
@@ -119,9 +119,9 @@ function browserSourcePath(source: string, sourcemapPath: string): string {
/**
* One client bundle build for a plugin id. The same src/client/index.tsx is
* compiled twice with only the registered id and the output file name
* differing: the official channel uses the package name (`dsh-better-sidebar`)
* differing: the official channel uses the package name (`dsh-apes-sidebar`)
* and the registry channel uses the manifest id
* (`dsh-external/dsh-better-sidebar`).
* (`dsh-external/dsh-apes-sidebar`).
* @param pluginId - the `__ModuleLoader__.load({ id })` value and the
* data-plugin style-tag prefix of this bundle.
* @param entryFile - the output file name under lib/.
@@ -186,7 +186,7 @@ function clientBundle(pluginId: string, entryFile: string): UserConfig {
* loader (src/client/chunk-loader.ts) materializes it with a require built
* from the module table's seed words.
*
* Chunk css tags use the constant plugin id `dsh-better-sidebar` (matching
* Chunk css tags use the constant plugin id `dsh-apes-sidebar` (matching
* the official channel; the registry channel re-injects an identical copy
* of the shared module css — same content, no functional impact).
* @param name - chunk name; entry src/client/chunks/<name>.tsx, output
@@ -216,7 +216,7 @@ function chunkBundle(name: string): UserConfig {
noExternal: (id: string) => (CLIENT_EXTERNALS.includes(id) ? undefined : true),
plugins: [
purityGatePlugin(),
makeCssPlugin('dsh-better-sidebar'),
makeCssPlugin('dsh-apes-sidebar'),
...(name === 'mermaid' ? [mermaidChunkAliases()] : []),
],
outputOptions: {
@@ -341,9 +341,9 @@ export default [
clean: false,
},
// Official profile channel: bundle id = package name (package.json `name`).
clientBundle('dsh-better-sidebar', 'client.js'),
clientBundle('dsh-apes-sidebar', 'client.js'),
// Plugin-registry channel: bundle id = manifest id (dsh.plugin.json `id`).
clientBundle('dsh-external/dsh-better-sidebar', 'client-registry.js'),
clientBundle('dsh-external/dsh-apes-sidebar', 'client-registry.js'),
// Lazy chunks: shared by both channels, fetched on first use through the
// plugin's /sidebar/bundle route (see src/client/chunk-loader.ts).
...CHUNKS.map(chunkBundle),