Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ts-poet

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-poet - npm Package Compare versions

Comparing version 6.0.1 to 6.1.0

.clinic/22286.clinic-flame.html

3

build/Code.d.ts
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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc