@contractspec/bundle.workspace 4.1.2 → 4.1.4
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/index.js +6 -6
- package/dist/node/index.js +6 -6
- package/package.json +16 -16
package/dist/index.js
CHANGED
|
@@ -473,7 +473,7 @@ function createNodeFsAdapter(cwd) {
|
|
|
473
473
|
}
|
|
474
474
|
|
|
475
475
|
// src/adapters/git.ts
|
|
476
|
-
import {
|
|
476
|
+
import { execFileSync } from "child_process";
|
|
477
477
|
import { access as access2 } from "fs/promises";
|
|
478
478
|
import { resolve as resolve2 } from "path";
|
|
479
479
|
function createNodeGitAdapter(cwd) {
|
|
@@ -481,7 +481,7 @@ function createNodeGitAdapter(cwd) {
|
|
|
481
481
|
return {
|
|
482
482
|
async showFile(ref, filePath) {
|
|
483
483
|
try {
|
|
484
|
-
return
|
|
484
|
+
return execFileSync("git", ["show", `${ref}:${filePath}`], {
|
|
485
485
|
cwd: baseCwd,
|
|
486
486
|
encoding: "utf-8",
|
|
487
487
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -500,7 +500,7 @@ function createNodeGitAdapter(cwd) {
|
|
|
500
500
|
flags.push("-x");
|
|
501
501
|
if (options?.dryRun)
|
|
502
502
|
flags.push("--dry-run");
|
|
503
|
-
|
|
503
|
+
execFileSync("git", ["clean", ...flags], {
|
|
504
504
|
cwd: baseCwd,
|
|
505
505
|
stdio: "inherit"
|
|
506
506
|
});
|
|
@@ -518,7 +518,7 @@ function createNodeGitAdapter(cwd) {
|
|
|
518
518
|
const ref = baseline ?? "HEAD~10";
|
|
519
519
|
const format = "--format=%H|||%s|||%an|||%aI";
|
|
520
520
|
try {
|
|
521
|
-
const output =
|
|
521
|
+
const output = execFileSync("git", ["log", `${ref}..HEAD`, format], {
|
|
522
522
|
cwd: baseCwd,
|
|
523
523
|
encoding: "utf-8",
|
|
524
524
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -540,8 +540,8 @@ function createNodeGitAdapter(cwd) {
|
|
|
540
540
|
},
|
|
541
541
|
async diffFiles(baseline, patterns) {
|
|
542
542
|
try {
|
|
543
|
-
const pathSpecs = patterns && patterns.length > 0 ?
|
|
544
|
-
const output =
|
|
543
|
+
const pathSpecs = patterns && patterns.length > 0 ? ["--", ...patterns] : [];
|
|
544
|
+
const output = execFileSync("git", ["diff", "--name-only", `${baseline}...HEAD`, ...pathSpecs], {
|
|
545
545
|
cwd: baseCwd,
|
|
546
546
|
encoding: "utf-8",
|
|
547
547
|
stdio: ["ignore", "pipe", "pipe"]
|
package/dist/node/index.js
CHANGED
|
@@ -473,7 +473,7 @@ function createNodeFsAdapter(cwd) {
|
|
|
473
473
|
}
|
|
474
474
|
|
|
475
475
|
// src/adapters/git.ts
|
|
476
|
-
import {
|
|
476
|
+
import { execFileSync } from "node:child_process";
|
|
477
477
|
import { access as access2 } from "node:fs/promises";
|
|
478
478
|
import { resolve as resolve2 } from "node:path";
|
|
479
479
|
function createNodeGitAdapter(cwd) {
|
|
@@ -481,7 +481,7 @@ function createNodeGitAdapter(cwd) {
|
|
|
481
481
|
return {
|
|
482
482
|
async showFile(ref, filePath) {
|
|
483
483
|
try {
|
|
484
|
-
return
|
|
484
|
+
return execFileSync("git", ["show", `${ref}:${filePath}`], {
|
|
485
485
|
cwd: baseCwd,
|
|
486
486
|
encoding: "utf-8",
|
|
487
487
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -500,7 +500,7 @@ function createNodeGitAdapter(cwd) {
|
|
|
500
500
|
flags.push("-x");
|
|
501
501
|
if (options?.dryRun)
|
|
502
502
|
flags.push("--dry-run");
|
|
503
|
-
|
|
503
|
+
execFileSync("git", ["clean", ...flags], {
|
|
504
504
|
cwd: baseCwd,
|
|
505
505
|
stdio: "inherit"
|
|
506
506
|
});
|
|
@@ -518,7 +518,7 @@ function createNodeGitAdapter(cwd) {
|
|
|
518
518
|
const ref = baseline ?? "HEAD~10";
|
|
519
519
|
const format = "--format=%H|||%s|||%an|||%aI";
|
|
520
520
|
try {
|
|
521
|
-
const output =
|
|
521
|
+
const output = execFileSync("git", ["log", `${ref}..HEAD`, format], {
|
|
522
522
|
cwd: baseCwd,
|
|
523
523
|
encoding: "utf-8",
|
|
524
524
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -540,8 +540,8 @@ function createNodeGitAdapter(cwd) {
|
|
|
540
540
|
},
|
|
541
541
|
async diffFiles(baseline, patterns) {
|
|
542
542
|
try {
|
|
543
|
-
const pathSpecs = patterns && patterns.length > 0 ?
|
|
544
|
-
const output =
|
|
543
|
+
const pathSpecs = patterns && patterns.length > 0 ? ["--", ...patterns] : [];
|
|
544
|
+
const output = execFileSync("git", ["diff", "--name-only", `${baseline}...HEAD`, ...pathSpecs], {
|
|
545
545
|
cwd: baseCwd,
|
|
546
546
|
encoding: "utf-8",
|
|
547
547
|
stdio: ["ignore", "pipe", "pipe"]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/bundle.workspace",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.4",
|
|
4
4
|
"description": "Workspace utilities for monorepo development",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"contractspec",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"scripts": {
|
|
19
19
|
"publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
|
|
20
20
|
"publish:pkg:canary": "bun publish:pkg --tag canary",
|
|
21
|
-
"build": "bun run
|
|
21
|
+
"build": "bun run build:bundle && bun run build:types",
|
|
22
22
|
"build:bundle": "contractspec-bun-build transpile",
|
|
23
23
|
"build:types": "contractspec-bun-build types",
|
|
24
24
|
"dev": "contractspec-bun-build dev",
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
"typecheck": "tsc --noEmit"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ai-sdk/anthropic": "3.0.
|
|
35
|
-
"@ai-sdk/openai": "3.0.
|
|
36
|
-
"@contractspec/biome-config": "3.8.
|
|
37
|
-
"@contractspec/lib.ai-agent": "8.0.
|
|
38
|
-
"@contractspec/lib.ai-providers": "3.7.
|
|
39
|
-
"@contractspec/lib.contracts-spec": "5.0.
|
|
40
|
-
"@contractspec/lib.contracts-integrations": "3.8.
|
|
41
|
-
"@contractspec/lib.contracts-transformers": "3.7.
|
|
42
|
-
"@contractspec/lib.source-extractors": "2.7.
|
|
43
|
-
"@contractspec/module.workspace": "4.1.
|
|
44
|
-
"@contractspec/lib.utils-typescript": "3.7.
|
|
45
|
-
"ai": "6.0.
|
|
34
|
+
"@ai-sdk/anthropic": "3.0.64",
|
|
35
|
+
"@ai-sdk/openai": "3.0.48",
|
|
36
|
+
"@contractspec/biome-config": "3.8.6",
|
|
37
|
+
"@contractspec/lib.ai-agent": "8.0.4",
|
|
38
|
+
"@contractspec/lib.ai-providers": "3.7.12",
|
|
39
|
+
"@contractspec/lib.contracts-spec": "5.0.4",
|
|
40
|
+
"@contractspec/lib.contracts-integrations": "3.8.8",
|
|
41
|
+
"@contractspec/lib.contracts-transformers": "3.7.16",
|
|
42
|
+
"@contractspec/lib.source-extractors": "2.7.16",
|
|
43
|
+
"@contractspec/module.workspace": "4.1.3",
|
|
44
|
+
"@contractspec/lib.utils-typescript": "3.7.12",
|
|
45
|
+
"ai": "6.0.138",
|
|
46
46
|
"chalk": "^5.6.2",
|
|
47
47
|
"chokidar": "^5.0.0",
|
|
48
48
|
"glob": "^13.0.6",
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"zod": "^4.3.5"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@contractspec/tool.typescript": "3.7.
|
|
57
|
+
"@contractspec/tool.typescript": "3.7.12",
|
|
58
58
|
"@types/bun": "^1.3.11",
|
|
59
59
|
"@types/micromatch": "^4.0.10",
|
|
60
60
|
"@types/node": "^25.3.5",
|
|
61
61
|
"typescript": "^5.9.3",
|
|
62
|
-
"@contractspec/tool.bun": "3.7.
|
|
62
|
+
"@contractspec/tool.bun": "3.7.12"
|
|
63
63
|
},
|
|
64
64
|
"exports": {
|
|
65
65
|
".": {
|