@r_masseater/msch 0.87.5 → 0.87.6

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/dist/cli.mjs CHANGED
@@ -16730,13 +16730,13 @@ const checkRenovateSettings = Effect.fn("checkRenovateSettings")(function* check
16730
16730
  // src/features/find-unneeded-files/model/applied-packages.ts
16731
16731
  const MSCH = "@r_masseater/msch";
16732
16732
  const SCOPE$1 = "@r_masseater/";
16733
- const LIBRARIES = ["@r_masseater/masseater-utils"];
16733
+ const PLUGIN_KEYWORDS = ["oxlint-plugin", "textlint-rule"];
16734
16734
  const RULE$14 = "applied-package";
16735
16735
  const WORKSPACE_FILE$2 = "pnpm-workspace.yaml";
16736
16736
  const NOT_FOUND = -1;
16737
16737
  const SEPARATOR$1 = "/";
16738
16738
  /** @internal */
16739
- const isApplied = (name) => String$1.startsWith(SCOPE$1)(name) && !Array$1.contains(LIBRARIES, name);
16739
+ const isApplied = ({ bins, keywords }) => Array$1.isReadonlyArrayNonEmpty(bins) || pipe(keywords, Array$1.some((keyword) => Array$1.contains(PLUGIN_KEYWORDS, keyword)));
16740
16740
  const BY_LENGTH = Order.mapInput(Order.Number, (text) => text.length);
16741
16741
  const escaped = (text) => String$1.replaceAll(/[.*+?^${}()|[\]\\]/gu, String.raw`\$&`)(text);
16742
16742
  const declaredNames = (manifest) => namesIn(manifest, [
@@ -16753,18 +16753,23 @@ const installedManifest = Effect.fn("installedManifest")(function* installedMani
16753
16753
  });
16754
16754
  const installedPackage = Effect.fn("installedPackage")(function* installedPackage(name) {
16755
16755
  const manifest = yield* installedManifest(name);
16756
- return {
16756
+ return pipe(manifest, Option.map((found) => ({
16757
16757
  name,
16758
- bins: pipe(manifest, Option.map((found) => pipe(binEntriesOf({
16758
+ bins: pipe(binEntriesOf({
16759
16759
  ...found,
16760
16760
  name
16761
- }), Array$1.map(([command]) => command))), Option.getOrElse(() => []))
16762
- };
16761
+ }), Array$1.map(([command]) => command)),
16762
+ keywords: found.keywords ?? []
16763
+ })), Option.filter(isApplied), Option.map(({ name: applied, bins }) => ({
16764
+ name: applied,
16765
+ bins
16766
+ })));
16763
16767
  });
16764
16768
  const appliedByMsch = Effect.fn("appliedByMsch")(function* appliedByMsch() {
16765
16769
  const manifest = yield* installedManifest(MSCH);
16766
- const names = pipe(manifest, Option.map(({ dependencies, peerDependencies }) => [...Record.keys(dependencies ?? {}), ...Record.keys(peerDependencies ?? {})]), Option.getOrElse(() => []), Array$1.filter(isApplied));
16767
- return yield* Effect.forEach(names, installedPackage, { concurrency: 1 });
16770
+ const names = pipe(manifest, Option.map(({ dependencies, peerDependencies }) => [...Record.keys(dependencies ?? {}), ...Record.keys(peerDependencies ?? {})]), Option.getOrElse(() => []), Array$1.filter(String$1.startsWith(SCOPE$1)));
16771
+ const found = yield* Effect.forEach(names, installedPackage, { concurrency: 1 });
16772
+ return Array$1.getSomes(found);
16768
16773
  });
16769
16774
  const problemAt$1 = (file, source) => (index, name) => ({
16770
16775
  file,