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

@dprint/core

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dprint/core - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

10

dist/dprint-core.js

@@ -173,2 +173,4 @@ 'use strict';

function makeIterableRepeatable(iterable) {
if (iterable instanceof RepeatableIterable)
return iterable;
return new RepeatableIterable(iterable);

@@ -255,3 +257,4 @@ }

(function (conditions) {
function newlineIfHangingSpaceOtherwise(context, startInfo, endInfo, spaceChar = " ") {
function newlineIfHangingSpaceOtherwise(options) {
const { context, startInfo, endInfo, spaceChar = " " } = options;
return {

@@ -268,3 +271,4 @@ kind: exports.PrintItemKind.Condition,

conditions.newlineIfHangingSpaceOtherwise = newlineIfHangingSpaceOtherwise;
function newlineIfMultipleLinesSpaceOrNewlineOtherwise(context, startInfo, endInfo) {
function newlineIfMultipleLinesSpaceOrNewlineOtherwise(options) {
const { context, startInfo, endInfo } = options;
return {

@@ -816,3 +820,3 @@ name: "newlineIfMultipleLinesSpaceOrNewlineOtherwise",

const version = "0.2.0";
const version = "0.3.0";

@@ -819,0 +823,0 @@ exports.CliLoggingEnvironment = CliLoggingEnvironment;

@@ -1,2 +0,2 @@

export declare const version = "0.2.0";
export declare const version = "0.3.0";

@@ -59,6 +59,6 @@ export declare function makeIterableRepeatable<T>(iterable: Iterable<T>): Iterable<T>;

export interface BaseResolvedConfiguration {
lineWidth: number;
indentWidth: number;
useTabs: boolean;
newlineKind: "auto" | "\r\n" | "\n";
readonly lineWidth: number;
readonly indentWidth: number;
readonly useTabs: boolean;
readonly newlineKind: "auto" | "\r\n" | "\n";
}

@@ -241,4 +241,15 @@

export declare namespace conditions {
function newlineIfHangingSpaceOtherwise(context: BaseContext, startInfo: Info, endInfo?: Info, spaceChar?: " " | Signal.SpaceOrNewLine): Condition;
function newlineIfMultipleLinesSpaceOrNewlineOtherwise(context: BaseContext, startInfo: Info, endInfo?: Info): Condition;
interface NewlineIfHangingSpaceOtherwiseOptions {
context: BaseContext;
startInfo: Info;
endInfo?: Info;
spaceChar?: " " | Signal.SpaceOrNewLine;
}
function newlineIfHangingSpaceOtherwise(options: NewlineIfHangingSpaceOtherwiseOptions): Condition;
interface NewlineIfMultipleLinesSpaceOrNewlineOtherwiseOptions {
context: BaseContext;
startInfo: Info;
endInfo?: Info;
}
function newlineIfMultipleLinesSpaceOrNewlineOtherwise(options: NewlineIfMultipleLinesSpaceOrNewlineOtherwiseOptions): Condition;
function singleIndentIfStartOfLine(): Condition;

@@ -284,2 +295,10 @@ function indentIfStartOfLine(item: PrintItemIterable): PrintItemIterable;

/** Options for initializing a plugin. */
export interface PluginInitializeOptions {
/** Environment to use for logging. */
environment: LoggingEnvironment;
/** The resolved global configuration. */
globalConfig: ResolvedConfiguration;
}
/** Base interface a plugin must implement. */

@@ -296,2 +315,7 @@ export interface Plugin<ResolvedPluginConfiguration extends BaseResolvedConfiguration = BaseResolvedConfiguration> {

/**
* Initializes the plugin for use.
* @remarks Plugins should be resilient to this never being called.
*/
initialize(options: PluginInitializeOptions): void;
/**
* Gets whether the plugin should parse the file.

@@ -301,6 +325,2 @@ */

/**
* Sets the global configuration.
*/
setGlobalConfiguration(globalConfig: ResolvedConfiguration): void;
/**
* Gets the resolved configuration for the plugin.

@@ -307,0 +327,0 @@ */

{
"name": "@dprint/core",
"version": "0.2.0",
"version": "0.3.0",
"description": "Core functionality for dprint.",

@@ -5,0 +5,0 @@ "main": "dist/dprint-core.js",

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