Comparing version 6.0.1 to 6.1.0
import { Node } from "./Node"; | ||
export declare type DPrintOptions = Record<string, unknown>; | ||
import dprint from "dprint-node"; | ||
export declare type DPrintOptions = Exclude<Parameters<typeof dprint.format>[2], never>; | ||
/** Options for `toStringWithImports`, i.e. for the top-level, per-file output. */ | ||
@@ -4,0 +5,0 @@ export interface ToStringOpts { |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -9,5 +12,3 @@ exports.Def = exports.deepGenerate = exports.Code = void 0; | ||
const index_1 = require("./index"); | ||
const formatter_1 = require("@dprint/formatter"); | ||
const typescript_1 = require("@dprint/typescript"); | ||
const formatter = (0, formatter_1.createFromBuffer)((0, typescript_1.getBuffer)()); | ||
const dprint_node_1 = __importDefault(require("dprint-node")); | ||
// We only have a single top-level Code.toStringWithImports running at a time, | ||
@@ -247,2 +248,5 @@ // so use a global var to capture this contextual state. | ||
"arrowFunction.useParentheses": "force", | ||
// dprint-node uses `node: true`, which we want to undo | ||
"module.sortImportDeclarations": "caseSensitive", | ||
lineWidth: 120, | ||
// For some reason dprint seems to wrap lines "before it should" w/o this set (?) | ||
@@ -253,3 +257,3 @@ preferSingleLine: true, | ||
try { | ||
return formatter.formatText("file.ts", input.trim(), { ...baseOptions, ...options }); | ||
return dprint_node_1.default.format("file.ts", input.trim(), { ...baseOptions, ...options }); | ||
} | ||
@@ -256,0 +260,0 @@ catch (e) { |
{ | ||
"name": "ts-poet", | ||
"version": "6.0.1", | ||
"version": "6.1.0", | ||
"description": "code generation DSL for TypeScript", | ||
@@ -38,5 +38,4 @@ "main": "build/index.js", | ||
"dependencies": { | ||
"@dprint/formatter": "^0.2.0", | ||
"@dprint/typescript": "^0.71.2" | ||
"dprint-node": "^1.0.7" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34709590
1
55
2158
+ Addeddprint-node@^1.0.7
+ Addeddetect-libc@1.0.3(transitive)
+ Addeddprint-node@1.0.8(transitive)
- Removed@dprint/formatter@^0.2.0
- Removed@dprint/typescript@^0.71.2
- Removed@dprint/formatter@0.2.1(transitive)
- Removed@dprint/typescript@0.71.2(transitive)