@r_masseater/msch 0.58.1 → 0.59.1

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.
@@ -1,7 +1,7 @@
1
1
  import { i as reachable, n as collectPlacedIgnoredDirectories } from "./ignored-directories-BgUqwuc4.mjs";
2
2
  import { i as nodeServicesLayer, n as RepositoryFiles, r as nodeRepositoryFiles } from "./repository-files-B5sRbxlz.mjs";
3
3
  import { t as startedOnce } from "./started-once-muJbvD_I.mjs";
4
- import { a as relativeTo, i as isWithin, o as toPosix } from "./app-B22Gq0no.mjs";
4
+ import { c as toPosix, i as isWithin, s as relativeTo } from "./app-DcgzLzb0.mjs";
5
5
  import { Array, Console, Effect, Layer, Option, Record, Schema, Stream, String as String$1, pipe } from "effect";
6
6
  import { ChildProcess } from "effect/process";
7
7
  import { getStaticTOMLValue, parseTOML } from "toml-eslint-parser";
package/dist/cli.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import { B as stringsIn, C as VERIFY_TASK, F as childrenOf$1, I as keyName, L as literalOf, N as workspaceConfigOf, P as KeySchema, R as nestedValues, S as RUN_TASKS, T as hasVerifyTask, _ as deployEntries, a as EntryManifestJson, c as publicEntriesOf, d as workspaceLinks, g as bundledEntries, i as publishedWorkspaces, l as targetsIn, m as lockedPackages, o as entryNameOf, p as lockedGraph, r as packedWorkspaces, s as isBinEntry, w as definesTask, y as shadcnUiOf, z as propertyValue } from "./published-BNJdq0h1.mjs";
2
+ import { B as stringsIn, C as VERIFY_TASK, F as childrenOf$1, I as keyName, L as literalOf, N as workspaceConfigOf, P as KeySchema, R as nestedValues, S as RUN_TASKS, T as hasVerifyTask, _ as deployEntries, a as EntryManifestJson, c as publicEntriesOf, d as workspaceLinks, g as bundledEntries, i as publishedWorkspaces, l as targetsIn, m as lockedPackages, o as entryNameOf, p as lockedGraph, r as packedWorkspaces, s as isBinEntry, w as definesTask, y as shadcnUiOf, z as propertyValue } from "./published-D87PrlyG.mjs";
3
3
  import { a as publishedProjects, c as workspaceManifest, o as workspaceDirectories, r as readManifest, s as workspaceProjects, t as MANIFEST_FILE$3 } from "./dependencies-B6p7x90y.mjs";
4
4
  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-BCT1Ls9c.mjs";
5
5
  import { a as groupOf$2, n as RepositoryFiles, t as NODE_MODULES } from "./repository-files-B5sRbxlz.mjs";
6
6
  import { a as workspaceDeviations, c as tomlSourceComments, 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-DitN-yYH.mjs";
7
- import { n as baseName, r as isInside, t as matcher } from "./app-B22Gq0no.mjs";
7
+ import { a as join, n as baseName, o as parent, r as isInside, t as matcher } from "./app-DcgzLzb0.mjs";
8
8
  import { a as problemAtPosition, i as problemAt$8, o as problemInFile, r as formatProblem, s as sortProblems, t as ProblemList } from "./problem-BoHYLMQT.mjs";
9
9
  import { n as JAPANESE, t as COMMENT_DIRECTIVES } from "./comment-directives-CXgB6xpE.mjs";
10
10
  import { t as startedOnce } from "./started-once-muJbvD_I.mjs";
@@ -14655,11 +14655,16 @@ const checkReplacedTools = Effect.fn("checkReplacedTools")(function* checkReplac
14655
14655
  const present = yield* presentFiles(pipe(listed, Array.filter((entry) => Option.isSome(problemFor$1(entry)))));
14656
14656
  return pipe(present, Array.flatMap((entry) => Option.toArray(problemFor$1(entry))));
14657
14657
  });
14658
+ // src/features/find-unneeded-files/model/lockfiles.ts
14659
+ const FOREIGN_LOCKFILE = /(?:^|\/)(?:package-lock\.json|npm-shrinkwrap\.json|yarn\.lock|bun\.lockb?)$/u;
14660
+ const PLUGIN_LOCKFILE = /(?:^|\/)bun\.lock$/u;
14661
+ const PLUGIN_MANIFEST = ".claude-plugin/plugin.json";
14662
+ const installedByClaudeCode = (present) => ({ name }) => PLUGIN_LOCKFILE.test(name) && pipe(present, Array.some((entry) => entry.name === join(parent(name))(PLUGIN_MANIFEST)));
14663
+ const unneededLockfile = (present) => (entry) => FOREIGN_LOCKFILE.test(entry.name) && !installedByClaudeCode(present)(entry);
14658
14664
  // src/features/find-unneeded-files/model/unneeded-files.ts
14659
14665
  const WORKSPACE_FILE$1 = "pnpm-workspace.yaml";
14660
14666
  const PNPM_DIRECTORY = ".pnpm/";
14661
14667
  const SEPARATOR = "/";
14662
- const FOREIGN_LOCKFILE = /(?:^|\/)(?:package-lock\.json|npm-shrinkwrap\.json|yarn\.lock|bun\.lockb?)$/u;
14663
14668
  const CARGO_MANIFEST_FILE = /(?:^|\/)Cargo\.toml$/u;
14664
14669
  const CARGO_LOCK_FILE = /(?:^|\/)Cargo\.lock$/u;
14665
14670
  const PNPM_OUTPUT = /(?:^|\/)\.pnpm\//u;
@@ -14725,7 +14730,6 @@ const setupProblems = (entry, source) => {
14725
14730
  };
14726
14731
  const matches = (pattern) => ({ name }) => pattern.test(name);
14727
14732
  const isCargoManifest = matches(CARGO_MANIFEST_FILE);
14728
- const isForeignLockfile = matches(FOREIGN_LOCKFILE);
14729
14733
  const isLegacyCargoConfig = matches(LEGACY_CARGO_CONFIG);
14730
14734
  const isPnpmOutput = matches(PNPM_OUTPUT);
14731
14735
  const directoryOf = (name) => pipe(String$1.split(name, SEPARATOR), Array.dropRight(LAST_SEGMENT), Array.join(SEPARATOR));
@@ -14769,7 +14773,7 @@ const cargoProblems = (present, enabled) => {
14769
14773
  const unneededIn = Effect.fn("unneededIn")(function* unneededIn(root, enabled) {
14770
14774
  const listed = yield* listedFiles(root);
14771
14775
  const present = yield* presentFiles(listed);
14772
- const lockfiles = pipe(present, Array.filter(isForeignLockfile), Array.map(foreignLockfile));
14776
+ const lockfiles = pipe(present, Array.filter(unneededLockfile(present)), Array.map(foreignLockfile));
14773
14777
  if (!pipe(present, Array.some(isCargoManifest))) return lockfiles;
14774
14778
  const cargo = yield* cargoProblems(present, enabled);
14775
14779
  return [...lockfiles, ...cargo];