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:
@@ -3,8 +3,8 @@
|
||||
/**
|
||||
* Lint guard: the package name must be single-sourced from package-identity.cjs.
|
||||
*
|
||||
* Scans runtime files (bin/install.js, gsd-core/bin/**, scripts/*.cjs)
|
||||
* and FAILS if the literal `@opengsd/gsd-core` appears in a
|
||||
* Scans runtime files (bin/install.js, msd-core/bin/**, scripts/*.cjs)
|
||||
* and FAILS if the literal `@golem15/msd-core` appears in a
|
||||
* non-comment, non-identity-module line. This enforces that a future rename
|
||||
* is a one-file change in package.json (#516).
|
||||
*
|
||||
@@ -23,10 +23,10 @@ const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
|
||||
const ROOT = path.join(__dirname, '..');
|
||||
const LITERAL = '@opengsd/gsd-core';
|
||||
const IDENTITY_MODULE = path.join(ROOT, 'gsd-core', 'bin', 'lib', 'package-identity.cjs');
|
||||
const LITERAL = '@golem15/msd-core';
|
||||
const IDENTITY_MODULE = path.join(ROOT, 'msd-core', 'bin', 'lib', 'package-identity.cjs');
|
||||
|
||||
// Files to scan: bin/install.js + everything under gsd-core/bin/ + touched scripts
|
||||
// Files to scan: bin/install.js + everything under msd-core/bin/ + touched scripts
|
||||
function getRuntimeFiles() {
|
||||
const files = [];
|
||||
|
||||
@@ -34,7 +34,7 @@ function getRuntimeFiles() {
|
||||
const installJs = path.join(ROOT, 'bin', 'install.js');
|
||||
if (fs.existsSync(installJs)) files.push(installJs);
|
||||
|
||||
// gsd-core/bin/**/*.cjs and *.js (recursive)
|
||||
// msd-core/bin/**/*.cjs and *.js (recursive)
|
||||
function collectDir(dir) {
|
||||
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
||||
const fullPath = path.join(dir, entry.name);
|
||||
@@ -45,7 +45,7 @@ function getRuntimeFiles() {
|
||||
}
|
||||
}
|
||||
}
|
||||
collectDir(path.join(ROOT, 'gsd-core', 'bin'));
|
||||
collectDir(path.join(ROOT, 'msd-core', 'bin'));
|
||||
|
||||
// scripts/*.cjs
|
||||
for (const entry of fs.readdirSync(path.join(ROOT, 'scripts'), { withFileTypes: true })) {
|
||||
@@ -74,7 +74,7 @@ function isCommentLine(trimmed) {
|
||||
);
|
||||
}
|
||||
|
||||
test('no hardcoded @opengsd/gsd-core literals in runtime non-comment code lines (#516)', () => {
|
||||
test('no hardcoded @golem15/msd-core literals in runtime non-comment code lines (#516)', () => {
|
||||
const files = getRuntimeFiles();
|
||||
const violations = [];
|
||||
|
||||
@@ -97,14 +97,14 @@ test('no hardcoded @opengsd/gsd-core literals in runtime non-comment code lines
|
||||
assert.deepEqual(
|
||||
violations,
|
||||
[],
|
||||
`Found ${violations.length} hardcoded @opengsd/gsd-core literal(s) in non-comment code lines:\n` +
|
||||
`Found ${violations.length} hardcoded @golem15/msd-core literal(s) in non-comment code lines:\n` +
|
||||
violations.map(v => ` ${v}`).join('\n') +
|
||||
'\n\nReplace each with the PACKAGE_NAME imported from gsd-core/bin/lib/package-identity.cjs'
|
||||
'\n\nReplace each with the PACKAGE_NAME imported from msd-core/bin/lib/package-identity.cjs'
|
||||
);
|
||||
});
|
||||
|
||||
test('PACKAGE_NAME from identity module matches package.json name (#516)', () => {
|
||||
const { PACKAGE_NAME } = require('../gsd-core/bin/lib/package-identity.cjs');
|
||||
const { PACKAGE_NAME } = require('../msd-core/bin/lib/package-identity.cjs');
|
||||
const pkgJson = require('../package.json');
|
||||
assert.equal(
|
||||
PACKAGE_NAME,
|
||||
|
||||
Reference in New Issue
Block a user