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,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Tests for gsd-core/bin/ensure-runtime-build.cjs — the self-healing runtime
|
||||
* Tests for msd-core/bin/ensure-runtime-build.cjs — the self-healing runtime
|
||||
* build that compiles the gitignored ./lib/*.cjs artifacts on demand when the
|
||||
* CLI is run from a channel (Claude Code plugin marketplace) that never ran
|
||||
* `npm run build:lib`. See #2002.
|
||||
@@ -26,7 +26,7 @@ const {
|
||||
isBuilt,
|
||||
RuntimeBuildError,
|
||||
SENTINEL,
|
||||
} = require('../gsd-core/bin/ensure-runtime-build.cjs');
|
||||
} = require('../msd-core/bin/ensure-runtime-build.cjs');
|
||||
|
||||
const REPO_ROOT = path.resolve(__dirname, '..');
|
||||
// 180000: a build — this driver invokes ensureRuntimeBuild against a REAL
|
||||
@@ -36,9 +36,9 @@ const BUILD_TIMEOUT_MS = 180000;
|
||||
|
||||
/** Fresh isolated package dir (auto-cleaned) with a libDir and optional tsconfig. */
|
||||
function makeEnv(t, { withTsconfig = true, prebuilt = false } = {}) {
|
||||
const dir = createTempDir('gsd-erb-');
|
||||
const dir = createTempDir('msd-erb-');
|
||||
t.after(() => cleanup(dir));
|
||||
const libDir = path.join(dir, 'gsd-core', 'bin', 'lib');
|
||||
const libDir = path.join(dir, 'msd-core', 'bin', 'lib');
|
||||
fs.mkdirSync(libDir, { recursive: true });
|
||||
if (withTsconfig) fs.writeFileSync(path.join(dir, 'tsconfig.build.json'), '{}');
|
||||
if (prebuilt) fs.writeFileSync(path.join(libDir, SENTINEL), '// built\n');
|
||||
@@ -292,18 +292,18 @@ test('resolveTscScript finds the real TypeScript under the repo root', () => {
|
||||
|
||||
test('integration: real tsc heals a missing lib end-to-end (subprocess)', (t) => {
|
||||
// Build a tiny package that mirrors the real layout: a src/*.cts that tsc
|
||||
// compiles to gsd-core/bin/lib/cli-exit.cjs. Then invoke the REAL module from
|
||||
// compiles to msd-core/bin/lib/cli-exit.cjs. Then invoke the REAL module from
|
||||
// a subprocess with lib absent and assert it self-heals and the require works.
|
||||
const dir = createTempDir('gsd-erb-int-');
|
||||
const dir = createTempDir('msd-erb-int-');
|
||||
t.after(() => cleanup(dir));
|
||||
fs.mkdirSync(path.join(dir, 'src'), { recursive: true });
|
||||
fs.mkdirSync(path.join(dir, 'gsd-core', 'bin', 'lib'), { recursive: true });
|
||||
fs.mkdirSync(path.join(dir, 'msd-core', 'bin', 'lib'), { recursive: true });
|
||||
fs.writeFileSync(
|
||||
path.join(dir, 'tsconfig.build.json'),
|
||||
JSON.stringify({
|
||||
compilerOptions: {
|
||||
rootDir: 'src',
|
||||
outDir: 'gsd-core/bin/lib',
|
||||
outDir: 'msd-core/bin/lib',
|
||||
module: 'nodenext',
|
||||
moduleResolution: 'nodenext',
|
||||
target: 'ES2022',
|
||||
@@ -327,9 +327,9 @@ test('integration: real tsc heals a missing lib end-to-end (subprocess)', (t) =>
|
||||
fs.writeFileSync(
|
||||
driver,
|
||||
`const { ensureRuntimeBuild } = require(${JSON.stringify(
|
||||
path.join(REPO_ROOT, 'gsd-core', 'bin', 'ensure-runtime-build.cjs'),
|
||||
path.join(REPO_ROOT, 'msd-core', 'bin', 'ensure-runtime-build.cjs'),
|
||||
)});\n` +
|
||||
`const libDir = ${JSON.stringify(path.join(dir, 'gsd-core', 'bin', 'lib'))};\n` +
|
||||
`const libDir = ${JSON.stringify(path.join(dir, 'msd-core', 'bin', 'lib'))};\n` +
|
||||
`const packageRoot = ${JSON.stringify(dir)};\n` +
|
||||
`const tscScript = ${JSON.stringify(realTsc)};\n` +
|
||||
'const r = ensureRuntimeBuild({ libDir, packageRoot, tscScript, log: () => {} });\n' +
|
||||
@@ -337,7 +337,7 @@ test('integration: real tsc heals a missing lib end-to-end (subprocess)', (t) =>
|
||||
'process.stdout.write(JSON.stringify({ healed: r.healed, run: runMain() }));\n',
|
||||
);
|
||||
|
||||
assert.ok(!isBuilt(path.join(dir, 'gsd-core', 'bin', 'lib')), 'lib starts empty');
|
||||
assert.ok(!isBuilt(path.join(dir, 'msd-core', 'bin', 'lib')), 'lib starts empty');
|
||||
const driverResult = runNode([driver], { cwd: dir, timeoutMs: BUILD_TIMEOUT_MS });
|
||||
throwIfFailed(driverResult, `node ${driver}`);
|
||||
const parsed = JSON.parse(driverResult.stdout);
|
||||
|
||||
Reference in New Issue
Block a user