refactor: hard-fork GSD -> MSD (Make Software Done)
Mechanical rename produced by scripts/msd-rename.cjs: gsd/Gsd/GSD -> msd/Msd/MSD across contents and paths, upstream package/repo coordinates -> @golem15/msd-core and golem15com/msd-core. Deep links into upstream history, sibling upstream packages, the GSD-2 import feature, CHANGELOG.md and .changeset/ are kept as-is. Hand edits on top: MSD block-letter banner and logos, LICENSE copyright line, package/plugin identity, regenerated lockfile, install-tree fixtures, derived registries and benchmark baseline; migration checksum baseline re-locked (MSD keeps its own install state, so no install had applied the old sums); sort-order and regex-escaped expectations in tests adjusted.
This commit is contained in:
@@ -30,8 +30,8 @@ const LEGACY_PHASE_HEADING_RE = new RegExp(
|
||||
// Matches already-migrated phase headings: ### Phase M-NN: Name
|
||||
const MIGRATED_PHASE_HEADING_RE = /^#{2,4}\s*(?:\[[^\]]{1,200}\]\s*)?Phase\s+\d+-\d{2}\s*:/i;
|
||||
|
||||
// Matches milestone section headings: ## v1.0, ## Roadmap v2.0, ## ✅ v1.0, ## [GSD] v1.0, etc.
|
||||
// The optional bracket-token prefix (e.g., [GSD]) must be tested before the emoji group.
|
||||
// Matches milestone section headings: ## v1.0, ## Roadmap v2.0, ## ✅ v1.0, ## [MSD] v1.0, etc.
|
||||
// The optional bracket-token prefix (e.g., [MSD]) must be tested before the emoji group.
|
||||
const MILESTONE_HEADING_RE = /^##\s+(?:\[[^\]]{1,200}\]\s+|Roadmap\s+|[✅🚧]\s*)?v(\d+)\.(\d+)(?:\s|:)/iu;
|
||||
|
||||
// ─── Types ────────────────────────────────────────────────────────────────────
|
||||
@@ -168,10 +168,10 @@ function assignSubIndices(phaseEntries: ParsedPhaseEntry[]): Map<number, Assigne
|
||||
|
||||
/**
|
||||
* Read a phase directory name and return its numeric token (stripping project_code prefix).
|
||||
* e.g. "GSD-01-setup" → "01", "01-setup" → "01", "02-implement" → "02", "02.1-hotfix" → "02.1"
|
||||
* e.g. "MSD-01-setup" → "01", "01-setup" → "01", "02-implement" → "02", "02.1-hotfix" → "02.1"
|
||||
*/
|
||||
function extractPhaseNumFromDir(dirName: string): string | null {
|
||||
// Strip optional project_code prefix: "GSD-01-setup" → "01-setup"
|
||||
// Strip optional project_code prefix: "MSD-01-setup" → "01-setup"
|
||||
const stripped = stripProjectCodePrefix(dirName);
|
||||
// Matches: digits + optional letter + optional decimal suffix, followed by '-' or end.
|
||||
// e.g. "02.1-hotfix" → "02.1", "01-setup" → "01"
|
||||
@@ -182,9 +182,9 @@ function extractPhaseNumFromDir(dirName: string): string | null {
|
||||
|
||||
/**
|
||||
* Build the new directory name from old name and new phase ID.
|
||||
* old: "01-setup" newId: "1-02" projectCode: "GSD" → "GSD-01-02-setup"
|
||||
* old: "01-setup" newId: "1-02" projectCode: "MSD" → "MSD-01-02-setup"
|
||||
* old: "01-setup" newId: "1-02" projectCode: null → "01-02-setup"
|
||||
* old: "GSD-01-setup" newId: "1-02" projectCode: "GSD" → "GSD-01-02-setup"
|
||||
* old: "MSD-01-setup" newId: "1-02" projectCode: "MSD" → "MSD-01-02-setup"
|
||||
*/
|
||||
function buildNewDirName(oldDirName: string, newId: string, projectCode: string | null): string {
|
||||
// Strip existing project_code prefix
|
||||
@@ -428,7 +428,7 @@ function computeMigrationPlan(cwd: string, options: Record<string, unknown> = {}
|
||||
const xDotIdx = legacyNum.indexOf('.');
|
||||
const decimalSuffix = xDotIdx !== -1 ? legacyNum.slice(xDotIdx) : '';
|
||||
|
||||
// Rewrite project_code-prefixed references: "GSD-01-" → "GSD-01-02-"
|
||||
// Rewrite project_code-prefixed references: "MSD-01-" → "MSD-01-02-"
|
||||
if (projectCode) {
|
||||
const [milestoneStr, subStr] = m.newId.split('-');
|
||||
const paddedMilestone = String(parseInt(milestoneStr, 10)).padStart(2, '0');
|
||||
|
||||
Reference in New Issue
Block a user