@r_masseater/msch 0.78.2 → 0.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/cli.mjs +35 -49
- package/dist/cli.mjs.map +1 -1
- package/dist/config.mjs +2 -1
- package/dist/config.mjs.map +1 -1
- package/dist/exits.mjs +1 -1
- package/dist/registry-releases-E0PE3Wq-.mjs +54 -0
- package/dist/registry-releases-E0PE3Wq-.mjs.map +1 -0
- package/dist/{upstream-exits-CJehIR2f.mjs → upstream-exits-2ut4fmJv.mjs} +4 -48
- package/dist/upstream-exits-2ut4fmJv.mjs.map +1 -0
- package/dist/upstream-record-CSbML0KF.mjs +136 -0
- package/dist/upstream-record-CSbML0KF.mjs.map +1 -0
- package/dist/upstream.d.mts +1 -0
- package/dist/upstream.mjs +104 -0
- package/dist/upstream.mjs.map +1 -0
- package/package.json +9 -8
- package/skills/msch-checks/SKILL.md +17 -0
- package/dist/upstream-exits-CJehIR2f.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -24,6 +24,7 @@ The package has these entry points.
|
|
|
24
24
|
| `msch-changed` (bin) | Runs a command on the workspaces that changed since it passed, in batches |
|
|
25
25
|
| `msch-exits` (bin) | Reports upstream deviations whose exit condition is met |
|
|
26
26
|
| `msch-refs` (bin) | Reports `github:` and `npm:` reference links whose target is gone |
|
|
27
|
+
| `msch-upstream` (bin) | Reports an upstream of a reimplementation that released since its verdict |
|
|
27
28
|
| `msch-published` (bin) | Reports a dependency range that no version on npm satisfies |
|
|
28
29
|
| `msch-unbumped` (bin) | Reports a changed workspace whose version is not above the base |
|
|
29
30
|
| `msch-publish` (bin) | Plans and publishes a workspace to npm and GitHub Releases |
|
package/dist/cli.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { t as workspaceManifest } from "./workspace-manifest-CAVYfp66.mjs";
|
|
3
3
|
import { C as valueKey, S as schemaTypeOf, _ as formatValues, a as nearestManifestDirectory, b as literalValuesOf, c as listConfigFiles, d as withProject, f as declarationKey, g as finiteValuesOf, h as locationOf, i as installedPackages, l as mentions$1, m as isObjectType, n as keepOnly, o as projectInputs, p as describeLibraryType, r as recordsIn, t as contentKey, u as typeScriptCompiler, v as isSubsetOf, w as vocabularyOf, x as sameValues, y as literalUnionOf } from "./pass-records-6XLhXZL3.mjs";
|
|
4
4
|
import { a as groupOf, n as RepositoryFiles, t as NODE_MODULES } from "./repository-files-C2gVviac.mjs";
|
|
5
|
-
import { a as workspaceDeviations, c as tomlSourceComments, d as problemAtIndex, i as cargoDeviations, l as yamlSourceComments, o as collectNodes, r as WORKSPACE_SECTIONS, s as isRecord, t as checkUpstreamExits, u as positionOf } from "./upstream-exits-
|
|
5
|
+
import { a as workspaceDeviations, c as tomlSourceComments, d as problemAtIndex, i as cargoDeviations, l as yamlSourceComments, o as collectNodes, r as WORKSPACE_SECTIONS, s as isRecord, t as checkUpstreamExits, u as positionOf } from "./upstream-exits-2ut4fmJv.mjs";
|
|
6
6
|
import { a as parent, i as join, n as isInside, t as baseName } from "./path-DUttmo2s.mjs";
|
|
7
7
|
import { a as unmatchedWorkspacePatterns, i as publishedProjects, n as readManifest, o as workspaceDirectories, s as workspaceProjects } from "./dependencies-BAjtDvY4.mjs";
|
|
8
8
|
import { $ as isInterfaceDeclaration, B as isArrowFunction, C as propertyNamesOf, D as symbolAtLocation, E as symbolAt, F as getJSDocTags, G as isElementAccessExpression, H as isBlock, J as isExpressionStatement, K as isEnumDeclaration, L as getNameOfDeclaration, M as SignatureKind, N as SymbolFlags, O as uniqueByReference, P as SyntaxKind, Q as isImportDeclaration, R as getTextOfJSDocComment, S as packageOf$1, U as isCallExpression, V as isBinaryExpression, W as isClassDeclaration, X as isFunctionExpression, Y as isFunctionDeclaration, Z as isIdentifier, _ as isGenericDeclaration, _t as isUnionTypeNode, a as problemAtPosition, at as isParenthesizedExpression, b as isTypeDeclaration, bt as isVariableStatement, c as carriesTag, ct as isReturnStatement, d as contains, dt as isSourceFile, et as isModuleBlock, f as declarationsOf, ft as isSpreadElement, g as isExternalDeclaration, gt as isTypeReferenceNode, h as importedModulesOf, ht as isTypeLiteralNode, i as problemAt$7, it as isObjectLiteralExpression, l as childrenOf$1, lt as isSatisfiesExpression, m as descendantsOf, mt as isTypeAliasDeclaration, nt as isNewExpression, o as problemInFile, ot as isPropertyAccessExpression, p as declaresAType, pt as isStringLiteral, q as isExportDeclaration, rt as isNumericLiteral, s as sortProblems, st as isPropertyAssignment, t as ProblemList, tt as isModuleDeclaration, u as columnOf, ut as isSignatureDeclaration, v as isInsideAny, vt as isVariableDeclaration, w as referencedSymbols, x as lineOf$3, y as isOutsideDeclaration, yt as isVariableDeclarationList, z as isArrayLiteralExpression } from "./problem-OJg859cN.mjs";
|
|
@@ -10,6 +10,7 @@ import { A as keyName, D as workspaceConfigOf, M as nestedValues, N as propertyV
|
|
|
10
10
|
import { t as JAPANESE } from "./config-CvPuqi4L.mjs";
|
|
11
11
|
import { n as readTree, t as loadLanguage } from "./tree-sitter-BfzHNwTR.mjs";
|
|
12
12
|
import { n as baseName$1, r as baseRevision, t as manifestTexts } from "./manifest-texts-C6Qjv0xy.mjs";
|
|
13
|
+
import { a as presentFiles, i as listedFiles, n as isScannedText, o as scanText, r as isToolVersions, t as upstreamRecords } from "./upstream-record-CSbML0KF.mjs";
|
|
13
14
|
import { a as offsetIn$1, i as namedCatalogsOf, n as manifestPattern, o as quoted$2, r as manifestSpecifiers, s as specifiedIn, t as fieldsOf } from "./specifiers-D9L0OV3r.mjs";
|
|
14
15
|
import { t as checkPackageVersions } from "./package-versions-G9Unih6I.mjs";
|
|
15
16
|
import { i as writeStdout, n as failWhenAny, r as writeProblems } from "./output-BUCq_3DP.mjs";
|
|
@@ -495,36 +496,6 @@ const checkOverrides = Effect.fn("checkOverrides")(function* checkOverrides(root
|
|
|
495
496
|
overrides
|
|
496
497
|
}, keys));
|
|
497
498
|
});
|
|
498
|
-
// src/shared/lib/scanned-files.ts
|
|
499
|
-
const SCANNED_FILE = /(?:\.(?:[cm]?[jt]sx?|jsonc?|toml|ya?ml|sh|bash|zsh|fish|rs|cs|go|mk)|(?:^|\/)(?:(?:Dockerfile|Containerfile)[^/]*|Makefile|justfile|\.tool-versions|[^./][^./]*))$/u;
|
|
500
|
-
const LOCKFILE$1 = /(?:^|\/)(?:[^/]*\.lock|[^/]*-lock\.(?:json|ya?ml))$/u;
|
|
501
|
-
const TOOL_VERSIONS = /(?:^|\/)(?:\.?mise(?:\.[^/]+)?\.toml|\.tool-versions)$/u;
|
|
502
|
-
const READ_CONCURRENCY$35 = 64;
|
|
503
|
-
const isScannedText = ({ name }) => SCANNED_FILE.test(name) && !LOCKFILE$1.test(name);
|
|
504
|
-
const isToolVersions = ({ name }) => TOOL_VERSIONS.test(name);
|
|
505
|
-
/** @internal */
|
|
506
|
-
const listedFiles = Effect.fn("listedFiles")(function* listedFiles(root) {
|
|
507
|
-
const files = yield* RepositoryFiles;
|
|
508
|
-
const names = yield* files.ownedFiles(root);
|
|
509
|
-
return pipe(names, Array$1.map((name) => ({
|
|
510
|
-
name,
|
|
511
|
-
file: files.join(root, name)
|
|
512
|
-
})));
|
|
513
|
-
});
|
|
514
|
-
/** @internal */
|
|
515
|
-
const presentFiles = Effect.fn("presentFiles")(function* presentFiles(listed) {
|
|
516
|
-
const files = yield* RepositoryFiles;
|
|
517
|
-
return yield* pipe(listed, Effect.filter(({ file }) => files.exists(file)));
|
|
518
|
-
});
|
|
519
|
-
/** @internal */
|
|
520
|
-
const scanText = Effect.fn("scanText")(function* scanText(listed, problemsIn) {
|
|
521
|
-
const files = yield* RepositoryFiles;
|
|
522
|
-
const found = yield* Effect.forEach(listed, (entry) => files.readFile(entry.file).pipe(Effect.map(Option.match({
|
|
523
|
-
onNone: () => [],
|
|
524
|
-
onSome: (source) => problemsIn(entry, source)
|
|
525
|
-
}))), { concurrency: READ_CONCURRENCY$35 });
|
|
526
|
-
return Array$1.flatten(found);
|
|
527
|
-
});
|
|
528
499
|
// src/features/check-overrides/model/git-subpath.ts
|
|
529
500
|
const DEPENDENCY_FILE = /(?:^|\/)(?:package\.json|pnpm-workspace\.ya?ml)$/u;
|
|
530
501
|
const GIT_SUBPATH = /(?<![^\s"':])[^\s"'#]+#(?:[^\s"'&]*&)*path:[^\s"']*/gu;
|
|
@@ -17672,8 +17643,23 @@ const checkUnusedWorkspaces = Effect.fn("checkUnusedWorkspaces")(function* check
|
|
|
17672
17643
|
message: `${directory} is a private library, and no other workspace depends on it through package.json, a Cargo path dependency or a task. Delete it, or depend on it from the code that uses it.`
|
|
17673
17644
|
})));
|
|
17674
17645
|
});
|
|
17646
|
+
// src/features/check-workspace-descriptions/model/workspace-descriptions.ts
|
|
17647
|
+
const RULE$1 = "workspace-description";
|
|
17648
|
+
const FIRST = 1;
|
|
17649
|
+
/** @internal */
|
|
17650
|
+
const checkWorkspaceDescriptions = Effect.fn("checkWorkspaceDescriptions")(function* checkWorkspaceDescriptions(root) {
|
|
17651
|
+
const files = yield* RepositoryFiles;
|
|
17652
|
+
const projects = yield* workspaceProjects(root);
|
|
17653
|
+
return pipe(projects, Array$1.filter(({ description }) => Option.isNone(description)), Array$1.map(({ directory }) => ({
|
|
17654
|
+
file: files.join(root, directory, PACKAGE_JSON_FILE),
|
|
17655
|
+
line: FIRST,
|
|
17656
|
+
column: FIRST,
|
|
17657
|
+
rule: RULE$1,
|
|
17658
|
+
message: "Add a one-line \"description\" that says what this workspace is for. Agents find existing tools by these descriptions, so a workspace without one is invisible to them."
|
|
17659
|
+
})));
|
|
17660
|
+
});
|
|
17675
17661
|
// src/features/check-upstream-exits/model/scattered-deviations.ts
|
|
17676
|
-
const RULE
|
|
17662
|
+
const RULE = "upstream-deviation-place";
|
|
17677
17663
|
const NESTED_WORKSPACE = "/pnpm-workspace.yaml";
|
|
17678
17664
|
const NESTED_CARGO = "/Cargo.toml";
|
|
17679
17665
|
const CARGO_CONFIG = /(?:^|\/)\.cargo\/config(?:\.toml)?$/u;
|
|
@@ -17697,8 +17683,8 @@ const fieldsIn = (source) => pipe(decodePackageJson(source), Option.match({
|
|
|
17697
17683
|
return [...pnpmFields, ...managerFields];
|
|
17698
17684
|
}
|
|
17699
17685
|
}));
|
|
17700
|
-
const manifestProblems = (entry, source) => pipe(fieldsIn(source), Array$1.map(({ name, key }) => problemAtIndex(RULE
|
|
17701
|
-
const firstEntryProblem = (entry, source, deviations) => pipe(Array$1.head(deviations.entries), Option.map(({ index }) => problemAtIndex(RULE
|
|
17686
|
+
const manifestProblems = (entry, source) => pipe(fieldsIn(source), Array$1.map(({ name, key }) => problemAtIndex(RULE)(entry.file, source)(keyIndex(source, key), `${name} in package.json is not allowed. ${PLACE} Move it there.`)));
|
|
17687
|
+
const firstEntryProblem = (entry, source, deviations) => pipe(Array$1.head(deviations.entries), Option.map(({ index }) => problemAtIndex(RULE)(entry.file, source)(index, `This file is not read for upstream deviations. ${PLACE}`)), Option.toArray);
|
|
17702
17688
|
const problemsIn = (entry, source) => {
|
|
17703
17689
|
if (isManifest(entry.name)) return manifestProblems(entry, source);
|
|
17704
17690
|
if (String$1.endsWith(NESTED_WORKSPACE)(entry.name)) return firstEntryProblem(entry, source, workspaceDeviations(source));
|
|
@@ -17710,20 +17696,21 @@ const checkScatteredDeviations = Effect.fn("checkScatteredDeviations")(function*
|
|
|
17710
17696
|
const listed = yield* listedFiles(root);
|
|
17711
17697
|
return yield* scanText(pipe(listed, Array$1.filter(isScanned)), problemsIn);
|
|
17712
17698
|
});
|
|
17713
|
-
// src/features/check-
|
|
17714
|
-
const RULE = "workspace-description";
|
|
17715
|
-
const FIRST = 1;
|
|
17699
|
+
// src/features/check-upstream-updates/model/upstream-problems.ts
|
|
17716
17700
|
/** @internal */
|
|
17717
|
-
const
|
|
17718
|
-
const
|
|
17719
|
-
|
|
17720
|
-
|
|
17721
|
-
|
|
17722
|
-
|
|
17723
|
-
|
|
17724
|
-
|
|
17725
|
-
|
|
17726
|
-
|
|
17701
|
+
const checkUpstreamRecords = Effect.fn("checkUpstreamRecords")(function* checkUpstreamRecords(root) {
|
|
17702
|
+
const { problems } = yield* upstreamRecords(root);
|
|
17703
|
+
return problems;
|
|
17704
|
+
});
|
|
17705
|
+
// src/app/upstream-checks.ts
|
|
17706
|
+
/** @internal */
|
|
17707
|
+
const checkUpstream = Effect.fn("checkUpstream")(function* checkUpstream(root) {
|
|
17708
|
+
const found = yield* Effect.all([
|
|
17709
|
+
checkUpstreamExits(root),
|
|
17710
|
+
checkScatteredDeviations(root),
|
|
17711
|
+
checkUpstreamRecords(root)
|
|
17712
|
+
], { concurrency: "unbounded" });
|
|
17713
|
+
return Array$1.flatten(found);
|
|
17727
17714
|
});
|
|
17728
17715
|
// src/app/manifest-checks.ts
|
|
17729
17716
|
/** @internal */
|
|
@@ -17734,8 +17721,7 @@ const checkManifests = Effect.fn("checkManifests")(function* checkManifests(root
|
|
|
17734
17721
|
checkPackSettings(root),
|
|
17735
17722
|
checkUnusedWorkspaces(root),
|
|
17736
17723
|
checkExactVersions(root),
|
|
17737
|
-
|
|
17738
|
-
checkScatteredDeviations(root),
|
|
17724
|
+
checkUpstream(root),
|
|
17739
17725
|
checkEffectDiagnostics(root),
|
|
17740
17726
|
checkWorkspaceDescriptions(root),
|
|
17741
17727
|
checkPluginMarketplace(root)
|