@r_masseater/msch 0.120.0 → 0.120.7

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.
@@ -3,26 +3,15 @@ import { t as LOCKED } from "./locked-inputs-DMSoGCa-.mjs";
3
3
  import { Effect } from "effect";
4
4
  // src/app/addon-tasks.ts
5
5
  const NATIVE_OUTPUT = "native/*.node";
6
+ const RELEASE_OUTPUT = "native/release/*.node";
6
7
  const MANIFEST = "package.json";
7
8
  const ADDON_LOCKED = [...LOCKED.input, ...DERIVATION_READS];
8
9
  const cargoTestCommand = (crate, release) => {
9
10
  if (release) return `cargo test -p ${crate}-core --release --locked`;
10
11
  return `cargo test -p ${crate}-core --locked`;
11
12
  };
12
- const cargoCheckCommand = (crate) => {
13
- const crates = `-p ${crate}-core -p ${crate}-node`;
14
- return `cargo fmt ${crates} --check && cargo clippy ${crates} --all-targets --locked -- -D warnings`;
15
- };
16
13
  /** @internal */
17
14
  const addonTasksOf = ({ crate, inputs, release = false, command, untrackedEnv = [] }) => ({
18
- cargo: {
19
- command: cargoCheckCommand(crate),
20
- cache: {
21
- input: [...inputs],
22
- output: [],
23
- untrackedEnv: [...untrackedEnv]
24
- }
25
- },
26
15
  "cargo-test": {
27
16
  command: cargoTestCommand(crate, release),
28
17
  cache: {
@@ -32,13 +21,21 @@ const addonTasksOf = ({ crate, inputs, release = false, command, untrackedEnv =
32
21
  }
33
22
  },
34
23
  native: {
35
- command,
24
+ command: `${command} --profile dev`,
36
25
  cache: {
37
26
  input: [...inputs, MANIFEST],
38
27
  output: [NATIVE_OUTPUT],
39
28
  untrackedEnv: [...untrackedEnv]
40
29
  }
41
30
  },
31
+ "native:release": {
32
+ command: `${command} --profile release`,
33
+ cache: {
34
+ input: [...inputs, MANIFEST],
35
+ output: [RELEASE_OUTPUT],
36
+ untrackedEnv: [...untrackedEnv]
37
+ }
38
+ },
42
39
  build: {
43
40
  command: "vp pack",
44
41
  dependsOn: ["native", {
@@ -1 +1 @@
1
- {"version":3,"file":"addon-tasks.mjs","names":[],"sources":["../src/app/addon-tasks.ts"],"sourcesContent":["import { Effect } from \"effect\";\nimport type { UserConfig } from \"vite-plus\";\n\nimport { DERIVATION_READS, cargoInputs } from \"#/features/derive-cargo-inputs/index.ts\";\nimport type { CargoInput } from \"#/features/derive-cargo-inputs/index.ts\";\nimport { LOCKED } from \"#/shared/lib/locked-inputs.ts\";\n\nexport type AddonTasks = NonNullable<NonNullable<UserConfig[\"run\"]>[\"tasks\"]>;\n\nexport interface AddonTaskOptions {\n readonly directory: string;\n readonly crate: string;\n readonly release?: boolean;\n readonly command: string;\n readonly untrackedEnv?: readonly string[];\n}\n\n/** @internal */\nexport interface AddonTaskSource extends Omit<AddonTaskOptions, \"directory\"> {\n readonly inputs: readonly CargoInput[];\n}\n\nconst NATIVE_OUTPUT = \"native/*.node\";\nconst MANIFEST = \"package.json\";\nconst ADDON_LOCKED = [...LOCKED.input, ...DERIVATION_READS];\n\nconst cargoTestCommand = (crate: string, release: boolean): string => {\n if (release) {\n return `cargo test -p ${crate}-core --release --locked`;\n }\n return `cargo test -p ${crate}-core --locked`;\n};\n\nconst cargoCheckCommand = (crate: string): string => {\n const crates = `-p ${crate}-core -p ${crate}-node`;\n return `cargo fmt ${crates} --check && cargo clippy ${crates} --all-targets --locked -- -D warnings`;\n};\n\n/** @internal */\nexport const addonTasksOf = ({\n crate,\n inputs,\n release = false,\n command,\n untrackedEnv = [],\n}: AddonTaskSource): AddonTasks => ({\n cargo: {\n command: cargoCheckCommand(crate),\n cache: { input: [...inputs], output: [], untrackedEnv: [...untrackedEnv] },\n },\n \"cargo-test\": {\n command: cargoTestCommand(crate, release),\n cache: { input: [...inputs], output: [], untrackedEnv: [...untrackedEnv] },\n },\n native: {\n command,\n cache: {\n input: [...inputs, MANIFEST],\n output: [NATIVE_OUTPUT],\n untrackedEnv: [...untrackedEnv],\n },\n },\n build: {\n command: \"vp pack\",\n dependsOn: [\"native\", { task: \"build\", from: \"dependencies\" }],\n cache: { input: [...ADDON_LOCKED] },\n },\n});\n\nexport const ADDON_TEST = {\n command: \"vp test run\",\n dependsOn: [\"native\", \"cargo-test\"],\n cache: { input: [...ADDON_LOCKED] },\n} as const satisfies AddonTasks[string];\n\nexport const addonTasks = ({ directory, ...source }: AddonTaskOptions): Promise<AddonTasks> =>\n Effect.runPromise(\n Effect.promise(() => cargoInputs({ directory })).pipe(\n Effect.map((inputs) => addonTasksOf({ ...source, inputs })),\n ),\n );\n"],"mappings":";;;;AAsBA,MAAM,gBAAgB;AACtB,MAAM,WAAW;AACjB,MAAM,eAAe,CAAC,GAAG,OAAO,OAAO,GAAG,gBAAgB;AAE1D,MAAM,oBAAoB,OAAe,YAA6B;CACpE,IAAI,SACF,OAAO,iBAAiB,MAAM;CAEhC,OAAO,iBAAiB,MAAM;AAChC;AAEA,MAAM,qBAAqB,UAA0B;CACnD,MAAM,SAAS,MAAM,MAAM,WAAW,MAAM;CAC5C,OAAO,aAAa,OAAO,2BAA2B,OAAO;AAC/D;;AAGA,MAAa,gBAAgB,EAC3B,OACA,QACA,UAAU,OACV,SACA,eAAe,CAAC,SACkB;CAClC,OAAO;EACL,SAAS,kBAAkB,KAAK;EAChC,OAAO;GAAE,OAAO,CAAC,GAAG,MAAM;GAAG,QAAQ,CAAC;GAAG,cAAc,CAAC,GAAG,YAAY;EAAE;CAC3E;CACA,cAAc;EACZ,SAAS,iBAAiB,OAAO,OAAO;EACxC,OAAO;GAAE,OAAO,CAAC,GAAG,MAAM;GAAG,QAAQ,CAAC;GAAG,cAAc,CAAC,GAAG,YAAY;EAAE;CAC3E;CACA,QAAQ;EACN;EACA,OAAO;GACL,OAAO,CAAC,GAAG,QAAQ,QAAQ;GAC3B,QAAQ,CAAC,aAAa;GACtB,cAAc,CAAC,GAAG,YAAY;EAChC;CACF;CACA,OAAO;EACL,SAAS;EACT,WAAW,CAAC,UAAU;GAAE,MAAM;GAAS,MAAM;EAAe,CAAC;EAC7D,OAAO,EAAE,OAAO,CAAC,GAAG,YAAY,EAAE;CACpC;AACF;AAEA,MAAa,aAAa;CACxB,SAAS;CACT,WAAW,CAAC,UAAU,YAAY;CAClC,OAAO,EAAE,OAAO,CAAC,GAAG,YAAY,EAAE;AACpC;AAEA,MAAa,cAAc,EAAE,WAAW,GAAG,aACzC,OAAO,WACL,OAAO,cAAc,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,KAC/C,OAAO,KAAK,WAAW,aAAa;CAAE,GAAG;CAAQ;AAAO,CAAC,CAAC,CAC5D,CACF"}
1
+ {"version":3,"file":"addon-tasks.mjs","names":[],"sources":["../src/app/addon-tasks.ts"],"sourcesContent":["import { Effect } from \"effect\";\nimport type { UserConfig } from \"vite-plus\";\n\nimport { DERIVATION_READS, cargoInputs } from \"#/features/derive-cargo-inputs/index.ts\";\nimport type { CargoInput } from \"#/features/derive-cargo-inputs/index.ts\";\nimport { LOCKED } from \"#/shared/lib/locked-inputs.ts\";\n\nexport type AddonTasks = NonNullable<NonNullable<UserConfig[\"run\"]>[\"tasks\"]>;\n\nexport interface AddonTaskOptions {\n readonly directory: string;\n readonly crate: string;\n readonly release?: boolean;\n readonly command: string;\n readonly untrackedEnv?: readonly string[];\n}\n\n/** @internal */\nexport interface AddonTaskSource extends Omit<AddonTaskOptions, \"directory\"> {\n readonly inputs: readonly CargoInput[];\n}\n\nconst NATIVE_OUTPUT = \"native/*.node\";\nconst RELEASE_OUTPUT = \"native/release/*.node\";\nconst MANIFEST = \"package.json\";\nconst ADDON_LOCKED = [...LOCKED.input, ...DERIVATION_READS];\n\nconst cargoTestCommand = (crate: string, release: boolean): string => {\n if (release) {\n return `cargo test -p ${crate}-core --release --locked`;\n }\n return `cargo test -p ${crate}-core --locked`;\n};\n\n/** @internal */\nexport const addonTasksOf = ({\n crate,\n inputs,\n release = false,\n command,\n untrackedEnv = [],\n}: AddonTaskSource): AddonTasks => ({\n \"cargo-test\": {\n command: cargoTestCommand(crate, release),\n cache: { input: [...inputs], output: [], untrackedEnv: [...untrackedEnv] },\n },\n native: {\n command: `${command} --profile dev`,\n cache: {\n input: [...inputs, MANIFEST],\n output: [NATIVE_OUTPUT],\n untrackedEnv: [...untrackedEnv],\n },\n },\n \"native:release\": {\n command: `${command} --profile release`,\n cache: {\n input: [...inputs, MANIFEST],\n output: [RELEASE_OUTPUT],\n untrackedEnv: [...untrackedEnv],\n },\n },\n build: {\n command: \"vp pack\",\n dependsOn: [\"native\", { task: \"build\", from: \"dependencies\" }],\n cache: { input: [...ADDON_LOCKED] },\n },\n});\n\nexport const ADDON_TEST = {\n command: \"vp test run\",\n dependsOn: [\"native\", \"cargo-test\"],\n cache: { input: [...ADDON_LOCKED] },\n} as const satisfies AddonTasks[string];\n\nexport const addonTasks = ({ directory, ...source }: AddonTaskOptions): Promise<AddonTasks> =>\n Effect.runPromise(\n Effect.promise(() => cargoInputs({ directory })).pipe(\n Effect.map((inputs) => addonTasksOf({ ...source, inputs })),\n ),\n );\n"],"mappings":";;;;AAsBA,MAAM,gBAAgB;AACtB,MAAM,iBAAiB;AACvB,MAAM,WAAW;AACjB,MAAM,eAAe,CAAC,GAAG,OAAO,OAAO,GAAG,gBAAgB;AAE1D,MAAM,oBAAoB,OAAe,YAA6B;CACpE,IAAI,SACF,OAAO,iBAAiB,MAAM;CAEhC,OAAO,iBAAiB,MAAM;AAChC;;AAGA,MAAa,gBAAgB,EAC3B,OACA,QACA,UAAU,OACV,SACA,eAAe,CAAC,SACkB;CAClC,cAAc;EACZ,SAAS,iBAAiB,OAAO,OAAO;EACxC,OAAO;GAAE,OAAO,CAAC,GAAG,MAAM;GAAG,QAAQ,CAAC;GAAG,cAAc,CAAC,GAAG,YAAY;EAAE;CAC3E;CACA,QAAQ;EACN,SAAS,GAAG,QAAQ;EACpB,OAAO;GACL,OAAO,CAAC,GAAG,QAAQ,QAAQ;GAC3B,QAAQ,CAAC,aAAa;GACtB,cAAc,CAAC,GAAG,YAAY;EAChC;CACF;CACA,kBAAkB;EAChB,SAAS,GAAG,QAAQ;EACpB,OAAO;GACL,OAAO,CAAC,GAAG,QAAQ,QAAQ;GAC3B,QAAQ,CAAC,cAAc;GACvB,cAAc,CAAC,GAAG,YAAY;EAChC;CACF;CACA,OAAO;EACL,SAAS;EACT,WAAW,CAAC,UAAU;GAAE,MAAM;GAAS,MAAM;EAAe,CAAC;EAC7D,OAAO,EAAE,OAAO,CAAC,GAAG,YAAY,EAAE;CACpC;AACF;AAEA,MAAa,aAAa;CACxB,SAAS;CACT,WAAW,CAAC,UAAU,YAAY;CAClC,OAAO,EAAE,OAAO,CAAC,GAAG,YAAY,EAAE;AACpC;AAEA,MAAa,cAAc,EAAE,WAAW,GAAG,aACzC,OAAO,WACL,OAAO,cAAc,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,KAC/C,OAAO,KAAK,WAAW,aAAa;CAAE,GAAG;CAAQ;AAAO,CAAC,CAAC,CAC5D,CACF"}
package/dist/cli.mjs CHANGED
@@ -2,15 +2,15 @@
2
2
  import { i as nodeRepositoryFiles, n as NODE_MODULES$2, o as TOOL_NAME$1, r as RepositoryFiles, s as groupOf, t as MSCH_CACHE } from "./repository-files-C8B7lrka.mjs";
3
3
  import { $ as isIdentifier, A as uniqueByReference, B as getTextOfJSDocComment, C as moduleSpecifierOf, D as resolvedSymbol, E as referencedSymbols, F as SymbolFlags, G as isCallExpression, H as isArrowFunction, I as SyntaxKind, J as isEnumDeclaration, K as isClassDeclaration, L as getJSDocTags, M as IndexKind, N as InternalSymbolName, O as symbolAt, P as SignatureKind, Q as isFunctionExpression, R as getLeadingCommentRanges, S as moduleSpecifierLiteralOf, St as isVariableStatement, T as propertyNamesOf, U as isBinaryExpression, V as isArrayLiteralExpression, W as isBlock, X as isExpressionStatement, Y as isExportDeclaration, Z as isFunctionDeclaration, _ as isGenericDeclaration, _t as isTypeLiteralNode, a as problemAtPosition, at as isNumericLiteral, b as isTypeDeclaration, bt as isVariableDeclaration, c as carriesTag, ct as isPropertyAccessExpression, d as contains, dt as isSatisfiesExpression, et as isImportDeclaration, f as declarationsOf, ft as isSignatureDeclaration, g as isExternalDeclaration, gt as isTypeAliasDeclaration, h as importedModulesOf, ht as isStringLiteral, i as problemAt$6, it as isNewExpression, j as API, k as symbolAtLocation, l as childrenOf$3, lt as isPropertyAssignment, m as descendantsOf, mt as isSpreadElement, nt as isModuleBlock, o as problemInFile, ot as isObjectLiteralExpression, p as declaresAType, pt as isSourceFile, q as isElementAccessExpression, r as formatProblem, rt as isModuleDeclaration, s as sortProblems, st as isParenthesizedExpression, t as ProblemList, tt as isInterfaceDeclaration, u as columnOf, ut as isReturnStatement, v as isInsideAny, vt as isTypeReferenceNode, w as packageOf$1, x as lineOf$5, xt as isVariableDeclarationList, y as isOutsideDeclaration, yt as isUnionTypeNode, z as getNameOfDeclaration } from "./problem-D0e14vkQ.mjs";
4
4
  import { i as workspaceDependencies$1, n as installedManifest, r as readManifest, t as dependencyEntries } from "./dependencies-OrBsaeID.mjs";
5
- import { C as keyName, D as stringsIn, E as propertyValue, S as childrenOf$4, T as nestedValues, a as workspaceManifest, b as workspaceConfigOf, c as TASK_NAMES, d as definesTask, f as hasVerifyTask, i as workspaceProjects, l as TEST_TASK_NAMES, n as unmatchedWorkspacePatterns, r as workspaceDirectories, s as RUN_TASKS, t as publishedProjects, u as VERIFY_TASK, w as literalOf, x as KeySchema } from "./workspace-projects-C4I3zOvh.mjs";
5
+ import { C as childrenOf$4, D as propertyValue, E as nestedValues, O as stringsIn, S as KeySchema, T as literalOf, a as workspaceManifest, c as TASK_NAMES, d as definesTask, f as hasCargoTask, i as workspaceProjects, l as TEST_TASK_NAMES, n as unmatchedWorkspacePatterns, p as hasVerifyTask, r as workspaceDirectories, s as RUN_TASKS, t as publishedProjects, u as VERIFY_TASK, w as keyName, x as workspaceConfigOf } from "./workspace-projects-wllEd2HL.mjs";
6
6
  import { a as parent, i as join, n as isInside, t as baseName$1 } from "./path-DUttmo2s.mjs";
7
- import { a as workspaceConfigs, c as publicEntriesOf, d as FRONTMATTER, f as splitFrontmatter, g as deployEntries, h as bundledEntries$1, i as publishedWorkspaces, l as modDirectories, m as workspaceLinks, o as entryNameOf, r as packedWorkspaces, s as isBinEntry, u as isIndexSkill, v as shadcnUiOf } from "./published-izw3wLkK.mjs";
7
+ import { a as workspaceConfigs, c as publicEntriesOf, d as FRONTMATTER, f as splitFrontmatter, g as deployEntries, h as bundledEntries$1, i as publishedWorkspaces, l as modDirectories, m as workspaceLinks, o as entryNameOf, r as packedWorkspaces, s as isBinEntry, u as isIndexSkill, v as shadcnUiOf } from "./published-u44g9ha6.mjs";
8
8
  import { i as USAGE_SPOOL, n as DECISION_TIMEOUT_MS, r as JAPANESE, t as DECISION_MODEL } from "./config-W6Uy7bV8.mjs";
9
- import { a as CI_TASKS, c as meteredCommand, f as isIgnored, h as patternOf$1, m as namedWorkspaces, n as builtTextRuleNames, o as MSCH_TASK_COMMANDS, r as secretsOf, s as MSCH_VERIFY_COMMANDS, t as TEXT_IGNORES, u as existsAt } from "./repository-text-cJOgGgCp.mjs";
9
+ import { a as CI_TASKS, c as meteredCommand, f as isIgnored, h as patternOf$1, m as namedWorkspaces, n as builtTextRuleNames, o as MSCH_TASK_COMMANDS, r as secretsOf, s as MSCH_VERIFY_COMMANDS, t as TEXT_IGNORES, u as existsAt } from "./repository-text-Dtv6Oz3P.mjs";
10
10
  import { t as startedOnce } from "./started-once-muJbvD_I.mjs";
11
11
  import { g as decisionTestRules, n as MARKDOWN_RULES, p as lint$3, t as MARKDOWN_IGNORES, x as exempt } from "./define-lint-preset-CYgaGe8E.mjs";
12
12
  import { builtinModules, isBuiltin } from "node:module";
13
- import { Array as Array$1, Boolean as Boolean$1, Clock, Config, Console, Context, Effect, Equal, FileSystem, Function, HashMap, HashSet, Match, Metric, Number as Number$1, Option, Order, Path, Predicate, Record, Redacted, Result, Runtime, Schedule, Schema, SchemaTransformation, Stdio, Stream, String as String$1, pipe } from "effect";
13
+ import { Array as Array$1, Boolean as Boolean$1, Clock, Config, Console, Context, Effect, Equal, FileSystem, Function, HashMap, HashSet, Match, Metric, Number as Number$1, Option, Order, Path, Predicate, Record, Redacted, Result, Runtime, Schedule, Schema, SchemaTransformation, Semaphore, Stdio, Stream, String as String$1, pipe } from "effect";
14
14
  import { Argument, Command, Flag } from "effect/cli";
15
15
  import { ChildProcess, ChildProcessSpawner } from "effect/process";
16
16
  import { hookFlags } from "@r_masseater/masseater-utils/hook-flags";
@@ -47,7 +47,7 @@ import { Buffer } from "node:buffer";
47
47
  import { createZstdDecompress } from "node:zlib";
48
48
  // package.json
49
49
  var name = "@r_masseater/msch";
50
- var version = "0.120.0";
50
+ var version = "0.120.7";
51
51
  var homepage = "https://github.com/masseater/ecosystems/tree/main/libs/msch#readme";
52
52
  var repository = {
53
53
  "type": "git",
@@ -13236,13 +13236,16 @@ const versionProblemIn = Effect.fn("versionProblemIn")(function* versionProblemI
13236
13236
  message: `crate ${crate.name} is version ${crate.version} but ${workspace.value}/${PACKAGE_JSON_FILE} is ${version.value}. msch publish releases the version in package.json, so bump both in the same PR.`
13237
13237
  });
13238
13238
  });
13239
+ const lintedPerWorkspace = (config) => Effect.map(hasCargoTask(config), (atRoot) => !atRoot);
13239
13240
  /** @internal */
13240
13241
  const checkCrates = Effect.fn("checkCrates")(function* checkCrates(root) {
13241
13242
  const files = yield* RepositoryFiles;
13242
13243
  if (!(yield* files.exists(files.join(root, CARGO_FILE$1)))) return [];
13243
13244
  const directories = yield* workspaceDirectories(root);
13244
13245
  const crates = yield* cratesIn(root);
13245
- const found = yield* Effect.forEach(crates, (crate) => Effect.all([problemIn$3(root, directories, crate), versionProblemIn(root, directories, crate)], { concurrency: "unbounded" }), { concurrency: READ_CONCURRENCY$28 });
13246
+ const notAtRoot = yield* Effect.cached(lintedPerWorkspace(files.join(root, CONFIG_FILE$8)));
13247
+ const unverified = (crate) => problemIn$3(root, directories, crate).pipe(Effect.when(notAtRoot), Effect.map(Option.flatten));
13248
+ const found = yield* Effect.forEach(crates, (crate) => Effect.all([unverified(crate), versionProblemIn(root, directories, crate)], { concurrency: "unbounded" }), { concurrency: READ_CONCURRENCY$28 });
13246
13249
  return Array$1.getSomes(Array$1.flatten(found));
13247
13250
  });
13248
13251
  // src/features/check-repository-layout/model/deploy-entry-patterns.ts
@@ -14104,7 +14107,7 @@ const NOT_A_PACKAGE = /^(?:\.|\/|[A-Za-z]:[\\/])/u;
14104
14107
  /** @internal */
14105
14108
  const unresolvedIn = (chunks) => {
14106
14109
  const emitted = pipe(chunks, Array$1.map(({ fileName }) => fileName));
14107
- return pipe(chunks, Array$1.flatMap((chunk) => [...chunk.imports, ...chunk.dynamicImports]), Array$1.filter((specifier) => !NOT_A_PACKAGE.test(specifier) && !isBuiltin(specifier) && !Array$1.contains(emitted, specifier)), Array$1.map(packageNameOf), Array$1.dedupe, Array$1.sortBy(Order.String));
14110
+ return pipe(chunks, Array$1.flatMap((chunk) => chunk.imports), Array$1.filter((specifier) => !NOT_A_PACKAGE.test(specifier) && !isBuiltin(specifier) && !Array$1.contains(emitted, specifier)), Array$1.map(packageNameOf), Array$1.dedupe, Array$1.sortBy(Order.String));
14108
14111
  };
14109
14112
  const isChunk$1 = (item) => item.type === "chunk";
14110
14113
  const optionsFor$1 = (entries) => ({
@@ -14364,7 +14367,7 @@ const stackPackagesOf = ({ devDependencies }) => pipe(Option.fromUndefinedOr(dev
14364
14367
  const RULE$50 = "optional-peer";
14365
14368
  const REQUIRED_RULE = "required-peer";
14366
14369
  const START$28 = 0;
14367
- const SINGLE$1 = 1;
14370
+ const SINGLE$3 = 1;
14368
14371
  const DEPENDENCIES_KEY = "\"dependencies\"";
14369
14372
  const PEER_META_KEY = "\"peerDependenciesMeta\"";
14370
14373
  const importsPackage = (name) => ({ packages }) => Array$1.contains(packages, name);
@@ -14389,7 +14392,7 @@ const librariesIn = (used) => pipe(used, Array$1.filter(({ entry }) => !isBinEnt
14389
14392
  const optionalPeerProblems = ({ located, manifest, used }) => {
14390
14393
  const libraries = librariesIn(used);
14391
14394
  const bins = pipe(used, Array$1.filter(({ entry }) => isBinEntry(entry)));
14392
- if (libraries.length <= SINGLE$1) return [];
14395
+ if (libraries.length <= SINGLE$3) return [];
14393
14396
  return pipe(Record.keys(manifest.dependencies ?? {}), Array$1.flatMap((name) => {
14394
14397
  const importers = pipe(libraries, Array$1.filter(importsPackage(name)));
14395
14398
  const neededByBin = pipe(bins, Array$1.some(importsPackage(name)));
@@ -18667,7 +18670,7 @@ const PLUGIN_NAME = /^[\p{Ll}\p{Nd}-]{1,64}$/u;
18667
18670
  const ALLOWED_PATH = /^[A-Za-z0-9 _.\-/(),]+$/u;
18668
18671
  const XML_TAG = /<[A-Za-z][^>]*>/u;
18669
18672
  const ARCHIVE = ".zip";
18670
- const SINGLE = 1;
18673
+ const SINGLE$2 = 1;
18671
18674
  const SkillFields$1 = Schema.Struct({
18672
18675
  name: Schema.optionalKey(Schema.String),
18673
18676
  description: Schema.optionalKey(Schema.String)
@@ -18731,7 +18734,7 @@ const skillViolations = (skills) => {
18731
18734
  Option.liftPredicate("has no name.", () => String$1.isEmpty(name)),
18732
18735
  Option.liftPredicate("has no description.", () => String$1.isEmpty(description)),
18733
18736
  Option.liftPredicate("has an XML tag in its name or description.", () => XML_TAG.test(`${name}\n${description}`)),
18734
- Option.liftPredicate(`shares the name ${name} with another SKILL.md of the plugin.`, () => pipe(Record.get(counts, name), Option.exists((group) => group.length > SINGLE)))
18737
+ Option.liftPredicate(`shares the name ${name} with another SKILL.md of the plugin.`, () => pipe(Record.get(counts, name), Option.exists((group) => group.length > SINGLE$2)))
18735
18738
  ], Array$1.getSomes, Array$1.map((message) => violation(file, message)))));
18736
18739
  };
18737
18740
  const skillFilesOf = (plugin) => pipe(plugin.files, Array$1.filter((file) => file === SKILL_FILE$1 || String$1.endsWith(`${SEPARATOR$6}${SKILL_FILE$1}`)(file)));
@@ -19395,11 +19398,7 @@ const abbreviatedLookup = (name) => ({
19395
19398
  const abbreviatedPackument = (name) => sent(abbreviatedLookup(name));
19396
19399
  // src/shared/lib/registry-releases.ts
19397
19400
  const CRATES = "https://crates.io/api/v1/crates/";
19398
- const DECLARING_SECTIONS = [
19399
- "optionalDependencies",
19400
- "peerDependencies",
19401
- "dependencies"
19402
- ];
19401
+ const DECLARING_SECTIONS = Array$1.reverse(RUNTIME_SECTIONS);
19403
19402
  const Dependencies = Schema.Record(Schema.String, Schema.String);
19404
19403
  const NpmVersion = Schema.Record(Schema.String, Schema.Unknown);
19405
19404
  const decodeDependencies = Schema.decodeUnknownOption(Dependencies);
@@ -21529,7 +21528,10 @@ const nativeFields = (native) => {
21529
21528
  const nativeReadme = ({ name, target }) => `# ${name}-${target}\n\nThe prebuilt ${target} native addon of [${name}](https://www.npmjs.com/package/${name}). Install ${name} instead; npm picks this package for your platform.\n`;
21530
21529
  // src/features/publish-workspace/model/native-package.ts
21531
21530
  const NPM_DIR = "npm";
21532
- const NATIVE_DIR = "native";
21531
+ /** @internal */
21532
+ const BUILT_DIR = "native";
21533
+ /** @internal */
21534
+ const RELEASE_DIR = "native/release";
21533
21535
  const KEPT_FIELDS = [
21534
21536
  "license",
21535
21537
  "repository",
@@ -21542,14 +21544,14 @@ const keptFields = Effect.fn("keptFields")(function* keptFields(directory) {
21542
21544
  return pipe(fields, Record.filter((_value, key) => Array$1.contains(KEPT_FIELDS, key)));
21543
21545
  });
21544
21546
  /** @internal */
21545
- const writeNative = Effect.fn("publish.writeNative")(function* writeNative(directory, native) {
21547
+ const writeNative = Effect.fn("publish.writeNative")(function* writeNative(directory, native, builtIn) {
21546
21548
  const fileSystem = yield* FileSystem.FileSystem;
21547
21549
  const path = yield* Path.Path;
21548
21550
  const kept = yield* keptFields(directory);
21549
21551
  const target = path.resolve(directory, NPM_DIR, native.target);
21550
21552
  const file = nativeFileOf(native);
21551
21553
  yield* fileSystem.makeDirectory(target, { recursive: true });
21552
- yield* fileSystem.copyFile(path.join(directory, NATIVE_DIR, file), path.join(target, file));
21554
+ yield* fileSystem.copyFile(path.join(directory, builtIn, file), path.join(target, file));
21553
21555
  yield* Effect.all([writePackageJson(target, {
21554
21556
  ...kept,
21555
21557
  ...nativeFields(native)
@@ -21621,12 +21623,17 @@ const builtOf$1 = (directory, manifest) => pipe(Option.fromUndefinedOr(manifest.
21621
21623
  target
21622
21624
  })))));
21623
21625
  const packedNative = Effect.fn("compat.packedNative")(function* packedNative({ directory, manifest, binary, target }) {
21626
+ yield* mustSucceed({
21627
+ command: "vp",
21628
+ args: ["run", "native"],
21629
+ cwd: directory
21630
+ });
21624
21631
  const written = yield* writeNative(directory, {
21625
21632
  name: manifest.name,
21626
21633
  version: manifest.version,
21627
21634
  binary,
21628
21635
  target
21629
- });
21636
+ }, BUILT_DIR);
21630
21637
  const tarball = yield* pack(written);
21631
21638
  return [[`${manifest.name}-${target}`, tarball]];
21632
21639
  });
@@ -21695,6 +21702,7 @@ const meetsPeer = (peers) => ({ name, version }) => Option.match(Record.get(peer
21695
21702
  const tarballsFor = (peers) => (local) => pipe(local, Array$1.filter(meetsPeer(peers)), Array$1.flatMap(({ tarballs }) => Record.toEntries(tarballs)), Record.fromEntries);
21696
21703
  // src/features/publish-workspace/model/compat.ts
21697
21704
  const INSTALL_FLAGS = ["--no-audit", "--no-fund"];
21705
+ const SINGLE$1 = 1;
21698
21706
  const IMPORT_ONLY = "await import(process.argv[1])";
21699
21707
  const Versions$1 = Schema.String.pipe(Schema.Array, Schema.fromJsonString);
21700
21708
  const installedNode = Effect.fn("compat.node")(function* installedNode(directory, range) {
@@ -21822,21 +21830,26 @@ const runCase = Effect.fn("compat.case")(function* runCase({ manifest, local, co
21822
21830
  });
21823
21831
  }, Effect.scoped);
21824
21832
  /** @internal */
21825
- const checkCompat = Effect.fn("publish.compat")(function* checkCompat(directory) {
21833
+ const checkCompatPacking = Effect.fn("publish.compat")(function* checkCompatPacking(directory, packing) {
21826
21834
  const manifest = yield* readVersionedPackageJson(directory);
21827
21835
  const cases = compatCasesOf(manifest);
21828
21836
  if (Array$1.isReadonlyArrayEmpty(cases)) return yield* IncompatiblePackage.make({ message: `${manifest.name} declares no engines.node, so there is no supported Node.js range to check` });
21829
- const local = yield* workspaceTarballs(directory, manifest);
21837
+ const local = yield* workspaceTarballs(directory, manifest).pipe(Semaphore.withPermits(packing, SINGLE$1));
21830
21838
  yield* Effect.forEach(cases, (compat) => runCase({
21831
21839
  manifest,
21832
21840
  local,
21833
21841
  compat
21834
21842
  }), {
21835
- concurrency: 1,
21843
+ concurrency: "unbounded",
21836
21844
  discard: true
21837
21845
  });
21838
21846
  return yield* checkPluginInstall(directory, manifest, tarballsFor({})(local));
21839
21847
  }, Effect.scoped);
21848
+ /** @internal */
21849
+ const checkCompat = Effect.fn("publish.compatOne")(function* checkCompat(directory) {
21850
+ const packing = yield* Semaphore.make(SINGLE$1);
21851
+ return yield* checkCompatPacking(directory, packing);
21852
+ });
21840
21853
  // src/features/publish-workspace/model/consumer-build.ts
21841
21854
  const PNPMFILE = ".pnpmfile.cjs";
21842
21855
  const TASK = "msch";
@@ -22538,6 +22551,7 @@ const writeCompatPlan = Effect.fn("publish.compatPlan")(function* writeCompatPla
22538
22551
  // src/features/publish-workspace/model/compat-changed.ts
22539
22552
  const LOCAL_ONLY = "the compat jobs of the verify workflow run it for every package in CI";
22540
22553
  const ARITY = 2;
22554
+ const SINGLE = 1;
22541
22555
  const selected = (workspaces, directories) => {
22542
22556
  if (Array$1.isReadonlyArrayEmpty(directories)) return workspaces;
22543
22557
  return pipe(workspaces, Array$1.filter((workspace) => Array$1.contains(directories, workspace)));
@@ -22550,8 +22564,9 @@ const checkChangedCompat = Effect.fn("publish.compatChanged")(function* checkCha
22550
22564
  const graph = yield* graphTasks;
22551
22565
  const chosen = selectedWorkspaces(workspacesOf(graph), directories);
22552
22566
  const checked = yield* Effect.filter(chosen, isChecked, { concurrency: 1 });
22553
- yield* Effect.forEach(checked, checkCompat, {
22554
- concurrency: 1,
22567
+ const packing = yield* Semaphore.make(SINGLE);
22568
+ yield* Effect.forEach(checked, (directory) => checkCompatPacking(directory, packing), {
22569
+ concurrency: "unbounded",
22555
22570
  discard: true
22556
22571
  });
22557
22572
  return yield* checkConsumers(checked);
@@ -22604,7 +22619,7 @@ const publishNatives = Effect.fn("publish.publishNatives")(function* publishNati
22604
22619
  version: manifest.version,
22605
22620
  binary,
22606
22621
  target
22607
- }), { concurrency: 1 });
22622
+ }, RELEASE_DIR), { concurrency: 1 });
22608
22623
  const names = yield* Effect.forEach(written, publishNative, { concurrency: 1 });
22609
22624
  yield* addOptionalDependencies(directory, names, manifest.version);
22610
22625
  });