@arktype/attest
Advanced tools
Comparing version 0.6.2 to 0.6.3
import type { LinePosition } from "@arktype/fs" | ||
import { map } from "@arktype/util" | ||
import { morph } from "@arktype/util" | ||
import ts from "typescript" | ||
@@ -172,3 +172,3 @@ import { getConfig } from "../config.js" | ||
return map(completions, (prefix, entries) => | ||
return morph(completions, (prefix, entries) => | ||
entries.length >= 1 ? [prefix, entries] : [] | ||
@@ -175,0 +175,0 @@ ) |
import { execSync } from "child_process" | ||
import { readdirSync, rmSync } from "fs" | ||
import { rmSync } from "fs" | ||
import { join } from "path" | ||
export const stats = (args: string[]) => { | ||
const packageDirs = args.length | ||
? args | ||
: readdirSync("packages").map((name) => join("packages", name)) | ||
const packageDirs = args.length ? args : [process.cwd()] | ||
const listedStats = packageDirs.map((packageDir): TypePerfStats => { | ||
@@ -14,6 +12,9 @@ console.log(`⏳ Gathering type perf data for ${packageDir}...`) | ||
rmSync(join(packageDir, "tsconfig.tsbuildinfo"), { force: true }) | ||
output = execSync("pnpm tsc --noEmit --extendedDiagnostics", { | ||
cwd: packageDir, | ||
stdio: "pipe" | ||
}).toString() | ||
output = execSync( | ||
"pnpm tsc --noEmit --extendedDiagnostics --incremental false", | ||
{ | ||
cwd: packageDir, | ||
stdio: "pipe" | ||
} | ||
).toString() | ||
} catch (e: any) { | ||
@@ -20,0 +21,0 @@ output = e.stdout?.toString() ?? "" |
@@ -6,3 +6,3 @@ import { execSync } from "child_process" | ||
export const trace = async (args: string[]) => { | ||
const packageDir = args[0] | ||
const packageDir = args[0] ?? process.cwd() | ||
@@ -23,3 +23,3 @@ if (!existsSync(packageDir)) { | ||
execSync( | ||
"pnpm tsc --noEmit --extendedDiagnostics --generateTrace .tstrace", | ||
"pnpm tsc --noEmit --extendedDiagnostics --incremental false --generateTrace .tstrace", | ||
{ | ||
@@ -26,0 +26,0 @@ cwd: packageDir, |
@@ -1,2 +0,2 @@ | ||
import { map } from "@arktype/util"; | ||
import { morph } from "@arktype/util"; | ||
import ts from "typescript"; | ||
@@ -118,3 +118,3 @@ import { getConfig } from "../config.js"; | ||
} | ||
return map(completions, (prefix, entries) => entries.length >= 1 ? [prefix, entries] : []); | ||
return morph(completions, (prefix, entries) => entries.length >= 1 ? [prefix, entries] : []); | ||
}; | ||
@@ -121,0 +121,0 @@ export const getDiagnosticsByFile = () => { |
import { execSync } from "child_process"; | ||
import { readdirSync, rmSync } from "fs"; | ||
import { rmSync } from "fs"; | ||
import { join } from "path"; | ||
export const stats = (args) => { | ||
const packageDirs = args.length | ||
? args | ||
: readdirSync("packages").map((name) => join("packages", name)); | ||
const packageDirs = args.length ? args : [process.cwd()]; | ||
const listedStats = packageDirs.map((packageDir) => { | ||
@@ -13,3 +11,3 @@ console.log(`⏳ Gathering type perf data for ${packageDir}...`); | ||
rmSync(join(packageDir, "tsconfig.tsbuildinfo"), { force: true }); | ||
output = execSync("pnpm tsc --noEmit --extendedDiagnostics", { | ||
output = execSync("pnpm tsc --noEmit --extendedDiagnostics --incremental false", { | ||
cwd: packageDir, | ||
@@ -16,0 +14,0 @@ stdio: "pipe" |
@@ -5,3 +5,3 @@ import { execSync } from "child_process"; | ||
export const trace = async (args) => { | ||
const packageDir = args[0]; | ||
const packageDir = args[0] ?? process.cwd(); | ||
if (!existsSync(packageDir)) { | ||
@@ -17,3 +17,3 @@ throw new Error(`trace requires an argument for an existing directory to trace, e.g. 'pnpm attest trace packages/api'`); | ||
// the types.json file can be used to associate IDs from the trace file with type aliases | ||
execSync("pnpm tsc --noEmit --extendedDiagnostics --generateTrace .tstrace", { | ||
execSync("pnpm tsc --noEmit --extendedDiagnostics --incremental false --generateTrace .tstrace", { | ||
cwd: packageDir, | ||
@@ -20,0 +20,0 @@ stdio: "inherit" |
{ | ||
"name": "@arktype/attest", | ||
"version": "0.6.2", | ||
"version": "0.6.3", | ||
"author": { | ||
@@ -37,3 +37,3 @@ "name": "David Blass", | ||
"@arktype/fs": "0.0.11", | ||
"@arktype/util": "0.0.20", | ||
"@arktype/util": "0.0.23", | ||
"@typescript/vfs": "1.5.0", | ||
@@ -40,0 +40,0 @@ "@typescript/analyze-trace": "0.10.1" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
422252
9472
+ Added@arktype/util@0.0.23(transitive)
- Removed@arktype/util@0.0.20(transitive)
Updated@arktype/util@0.0.23