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 @@
|
||||
/**
|
||||
* GSD Tools Test Helpers – cleanup() behavioral tests
|
||||
* MSD Tools Test Helpers – cleanup() behavioral tests
|
||||
*
|
||||
* Three deterministic, cross-platform tests that verify cleanup()'s
|
||||
* observable contract at the seam rather than probing its internals.
|
||||
@@ -17,7 +17,7 @@ const { cleanup, createTempDir, tmpRootCandidates } = require('./helpers.cjs');
|
||||
// ─── Test 1: Real-FS happy path ──────────────────────────────────────────────
|
||||
|
||||
test('cleanup removes a real temp dir with nested subdirs and files', () => {
|
||||
const dir = createTempDir('gsd-cleanup-test-');
|
||||
const dir = createTempDir('msd-cleanup-test-');
|
||||
const nested = path.join(dir, 'a', 'b', 'c');
|
||||
fs.mkdirSync(nested, { recursive: true });
|
||||
fs.writeFileSync(path.join(nested, 'file.txt'), 'hello');
|
||||
@@ -33,7 +33,7 @@ test('cleanup removes a real temp dir with nested subdirs and files', () => {
|
||||
test('cleanup passes recursive/force/maxRetries/retryDelay options to fs.rmSync', () => {
|
||||
// Use a real temp dir as the target so cleanup() has a valid path argument.
|
||||
// We chdir AWAY from it first so cleanup() does not try to chdir either.
|
||||
const dir = createTempDir('gsd-cleanup-opts-test-');
|
||||
const dir = createTempDir('msd-cleanup-opts-test-');
|
||||
|
||||
// Capture original cwd and shift away from the target.
|
||||
const originalCwd = process.cwd();
|
||||
@@ -77,7 +77,7 @@ test('cleanup passes recursive/force/maxRetries/retryDelay options to fs.rmSync'
|
||||
// ─── Test 3: cwd-guard ───────────────────────────────────────────────────────
|
||||
|
||||
test('cleanup does not throw when cwd is inside the target dir, and removes the dir', () => {
|
||||
const dir = createTempDir('gsd-cleanup-cwd-test-');
|
||||
const dir = createTempDir('msd-cleanup-cwd-test-');
|
||||
const nested = path.join(dir, 'deep', 'nested');
|
||||
fs.mkdirSync(nested, { recursive: true });
|
||||
|
||||
@@ -167,7 +167,7 @@ test('cleanup throws and does not chdir or delete when target is outside os.tmpd
|
||||
// ─── Test 5: control — a real os.tmpdir()-rooted path still cleans up ───────
|
||||
|
||||
test('cleanup still removes a real os.tmpdir()-rooted directory (control)', () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-cleanup-control-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-cleanup-control-'));
|
||||
|
||||
cleanup(dir);
|
||||
|
||||
@@ -177,7 +177,7 @@ test('cleanup still removes a real os.tmpdir()-rooted directory (control)', () =
|
||||
// ─── Test 6b: accepted-roots set always accepts a freshly-minted tmpdir ─────
|
||||
|
||||
test('cleanup accepts a freshly-created os.tmpdir()-rooted dir on any platform (accepted-roots invariant)', (t) => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-cleanup-roots-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-cleanup-roots-'));
|
||||
t.after(() => {
|
||||
if (fs.existsSync(dir)) cleanup(dir);
|
||||
});
|
||||
@@ -192,7 +192,7 @@ test('cleanup accepts a freshly-created os.tmpdir()-rooted dir on any platform (
|
||||
// ─── Test 6: realpath'd os.tmpdir() form is not refused (regression) ────────
|
||||
|
||||
test('cleanup accepts a realpath()d temp dir even when it differs from the raw path (macOS /var -> /private/var)', (t) => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-cleanup-realpath-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-cleanup-realpath-'));
|
||||
const realPath = fs.realpathSync(dir);
|
||||
|
||||
if (realPath !== dir) {
|
||||
@@ -237,7 +237,7 @@ test('tmpRootCandidates() returns a well-formed, deduplicated list of absolute p
|
||||
const uniqueKeys = new Set(keys);
|
||||
assert.strictEqual(uniqueKeys.size, keys.length, `roots must be deduplicated: ${JSON.stringify(roots)}`);
|
||||
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-cleanup-roots-contract-'));
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-cleanup-roots-contract-'));
|
||||
try {
|
||||
const resolvedDir = path.resolve(dir);
|
||||
const dirForCompare = isWindows ? resolvedDir.toLowerCase() : resolvedDir;
|
||||
|
||||
Reference in New Issue
Block a user