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:
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
process.env.GSD_TEST_MODE = '1';
|
||||
process.env.MSD_TEST_MODE = '1';
|
||||
|
||||
const { test, describe, before, after, beforeEach } = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
@@ -42,7 +42,7 @@ function runRenderRaw(args = []) {
|
||||
return toLegacyResult(r);
|
||||
}
|
||||
|
||||
before(() => { tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-changeset-')); });
|
||||
before(() => { tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-changeset-')); });
|
||||
after(() => { cleanup(tmp); });
|
||||
|
||||
// Fixtures for extract tests (#3496)
|
||||
@@ -332,15 +332,15 @@ describe('changeset cli extract: version-range changelog extraction (#3496)', ()
|
||||
// Reads a product workflow .md file (not CJS source) to verify
|
||||
// the user-facing instruction was wired; there is no behavioural runtime to invoke.
|
||||
test('F1: workflows/update.md contains concrete extract subcommand invocation', (_t) => {
|
||||
const workflowPath = path.join(ROOT, 'gsd-core', 'workflows', 'update.md');
|
||||
const workflowPath = path.join(ROOT, 'msd-core', 'workflows', 'update.md');
|
||||
const workflowText = fs.readFileSync(workflowPath, 'utf8');
|
||||
// The invocation uses either a direct path or an intermediate variable:
|
||||
// node "$GSD_DIR/scripts/changeset/cli.cjs" extract
|
||||
// node "$GSD_CHANGESET_CLI" extract
|
||||
// node "$MSD_DIR/scripts/changeset/cli.cjs" extract
|
||||
// node "$MSD_CHANGESET_CLI" extract
|
||||
// Accept either form so future refactors don't immediately trip this anchor.
|
||||
assert.ok(
|
||||
workflowText.includes('cli.cjs" extract') || workflowText.includes('cli.cjs extract') ||
|
||||
(workflowText.includes('GSD_CHANGESET_CLI') && workflowText.includes('" extract')),
|
||||
(workflowText.includes('MSD_CHANGESET_CLI') && workflowText.includes('" extract')),
|
||||
'update.md must invoke cli.cjs extract (fix for #3496 BLOCKER 1)',
|
||||
);
|
||||
assert.ok(
|
||||
@@ -357,25 +357,25 @@ describe('changeset cli extract: version-range changelog extraction (#3496)', ()
|
||||
);
|
||||
});
|
||||
|
||||
// F2: update.md must use the INSTALLED path ($GSD_DIR/scripts/changeset/cli.cjs),
|
||||
// NOT the old broken path ($GSD_DIR/gsd-core/scripts/changeset/cli.cjs).
|
||||
// F2: update.md must use the INSTALLED path ($MSD_DIR/scripts/changeset/cli.cjs),
|
||||
// NOT the old broken path ($MSD_DIR/msd-core/scripts/changeset/cli.cjs).
|
||||
// The installer copies scripts/changeset/ into <configDir>/scripts/changeset/,
|
||||
// so the runtime path is $GSD_DIR/scripts/changeset/cli.cjs (#935).
|
||||
// so the runtime path is $MSD_DIR/scripts/changeset/cli.cjs (#935).
|
||||
// allow-test-rule: source-text-is-the-product
|
||||
// Reads a product workflow .md file (not CJS source) to verify
|
||||
// the runtime install path contract; there is no behavioural runtime to invoke.
|
||||
test('F2: update.md CLI path is $GSD_DIR/scripts/changeset/cli.cjs (not gsd-core/scripts/…) (#935)', (_t) => {
|
||||
const workflowPath = path.join(ROOT, 'gsd-core', 'workflows', 'update.md');
|
||||
test('F2: update.md CLI path is $MSD_DIR/scripts/changeset/cli.cjs (not msd-core/scripts/…) (#935)', (_t) => {
|
||||
const workflowPath = path.join(ROOT, 'msd-core', 'workflows', 'update.md');
|
||||
const workflowText = fs.readFileSync(workflowPath, 'utf8');
|
||||
// The correct installed path must appear somewhere in the update workflow
|
||||
assert.ok(
|
||||
workflowText.includes('scripts/changeset/cli.cjs'),
|
||||
'update.md must reference scripts/changeset/cli.cjs',
|
||||
);
|
||||
// The old broken path ($GSD_DIR/gsd-core/scripts/changeset/cli.cjs) must not appear
|
||||
// The old broken path ($MSD_DIR/msd-core/scripts/changeset/cli.cjs) must not appear
|
||||
assert.ok(
|
||||
!workflowText.includes('gsd-core/scripts/changeset/cli.cjs'),
|
||||
'update.md must NOT reference the old gsd-core/scripts/changeset/cli.cjs path (fix for #935)',
|
||||
!workflowText.includes('msd-core/scripts/changeset/cli.cjs'),
|
||||
'update.md must NOT reference the old msd-core/scripts/changeset/cli.cjs path (fix for #935)',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -384,12 +384,12 @@ describe('changeset cli extract: version-range changelog extraction (#3496)', ()
|
||||
// Reads a product workflow .md file (not CJS source) to verify
|
||||
// the guard is present; there is no behavioural runtime to invoke.
|
||||
test('F3: update.md has an explicit guard when changeset CLI is missing (#935)', (_t) => {
|
||||
const workflowPath = path.join(ROOT, 'gsd-core', 'workflows', 'update.md');
|
||||
const workflowPath = path.join(ROOT, 'msd-core', 'workflows', 'update.md');
|
||||
const workflowText = fs.readFileSync(workflowPath, 'utf8');
|
||||
// The workflow must check for CLI existence before invoking it
|
||||
assert.ok(
|
||||
workflowText.includes('GSD_CHANGESET_CLI') && workflowText.includes('! -f'),
|
||||
'update.md must guard against a missing changeset CLI with [ ! -f "$GSD_CHANGESET_CLI" ] (#935)',
|
||||
workflowText.includes('MSD_CHANGESET_CLI') && workflowText.includes('! -f'),
|
||||
'update.md must guard against a missing changeset CLI with [ ! -f "$MSD_CHANGESET_CLI" ] (#935)',
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -483,7 +483,7 @@ describe('changeset cli verify subcommand (not yet implemented — TDD red step)
|
||||
const FIXTURE_URL_HEADING = [
|
||||
'# Changelog',
|
||||
'',
|
||||
'## [1.3.1](https://www.npmjs.com/package/@opengsd/gsd-core/v/1.3.1) - 2026-06-04',
|
||||
'## [1.3.1](https://www.npmjs.com/package/@golem15/msd-core/v/1.3.1) - 2026-06-04',
|
||||
'',
|
||||
'### Fixed',
|
||||
'',
|
||||
@@ -647,7 +647,7 @@ describe('changeset cli render --allow-empty', () => {
|
||||
// Test 1: --allow-empty with zero fragments writes a dated heading +
|
||||
// placeholder, and subsequent verify exits 0.
|
||||
test('--allow-empty with zero fragments writes dated heading + placeholder; verify exits 0', () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-ae-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-ae-'));
|
||||
try {
|
||||
fs.mkdirSync(path.join(dir, '.changeset'), { recursive: true });
|
||||
// Only a README — no fragment files.
|
||||
@@ -690,7 +690,7 @@ describe('changeset cli render --allow-empty', () => {
|
||||
// Test 2: render WITHOUT --allow-empty and zero fragments early-exits —
|
||||
// CHANGELOG is not created / not modified. Regression lock.
|
||||
test('render without --allow-empty and zero fragments does NOT write CHANGELOG', () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-ae-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-ae-'));
|
||||
try {
|
||||
fs.mkdirSync(path.join(dir, '.changeset'), { recursive: true });
|
||||
// No fragment files, only README.
|
||||
@@ -723,7 +723,7 @@ describe('changeset cli render --allow-empty', () => {
|
||||
// Test 3: render WITH fragments + --allow-empty behaves exactly like normal
|
||||
// render (consumes/deletes fragments, NO placeholder injected).
|
||||
test('render --allow-empty with fragments behaves like normal render (no placeholder)', () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-ae-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-ae-'));
|
||||
try {
|
||||
fs.mkdirSync(path.join(dir, '.changeset'), { recursive: true });
|
||||
fs.writeFileSync(
|
||||
@@ -771,7 +771,7 @@ describe('changeset cli render --allow-empty', () => {
|
||||
// --allow-empty for the SAME version is now a NO-OP (FIX 1 guard). It must
|
||||
// NOT add a second heading, must exit 0, and must report alreadyPromoted:true.
|
||||
test('idempotency: second --allow-empty render for same version is a no-op (no duplicate heading)', () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-ae-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-ae-'));
|
||||
try {
|
||||
fs.mkdirSync(path.join(dir, '.changeset'), { recursive: true });
|
||||
fs.writeFileSync(
|
||||
@@ -821,7 +821,7 @@ describe('changeset cli render --allow-empty', () => {
|
||||
// This guards the inconsistent-state scenario identified in the adversarial review:
|
||||
// a manual/partial promotion wrote the heading but left fragments unconsumed.
|
||||
test('alreadyPromoted + fragments present: exits non-zero, CHANGELOG unchanged, fragment survives', () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-ae-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-ae-'));
|
||||
try {
|
||||
fs.mkdirSync(path.join(dir, '.changeset'), { recursive: true });
|
||||
|
||||
@@ -874,7 +874,7 @@ describe('changeset cli render --allow-empty', () => {
|
||||
// Test 5 (cold start): --allow-empty when CHANGELOG.md does NOT exist creates
|
||||
// the file with # Changelog, ## [Unreleased], and a dated release with placeholder.
|
||||
test('--allow-empty cold start (no CHANGELOG.md) creates file with expected structure', () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-ae-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-ae-'));
|
||||
try {
|
||||
fs.mkdirSync(path.join(dir, '.changeset'), { recursive: true });
|
||||
// No CHANGELOG.md, no fragments.
|
||||
@@ -914,7 +914,7 @@ describe('changeset cli render --allow-empty', () => {
|
||||
// Test 6: --allow-empty (zero fragments) on a CHANGELOG that already has a
|
||||
// prior dated release PRESERVES that prior release in the output.
|
||||
test('--allow-empty preserves prior dated release below new section', () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-ae-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-ae-'));
|
||||
try {
|
||||
fs.mkdirSync(path.join(dir, '.changeset'), { recursive: true });
|
||||
// Pre-existing CHANGELOG with a prior dated release.
|
||||
|
||||
Reference in New Issue
Block a user