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.4.2 to 0.4.3

44

dist/dprint-core.js

@@ -356,3 +356,3 @@ 'use strict';

items: [],
indentStates: [],
indentLevelStates: [],
ignoreIndent: false

@@ -381,3 +381,3 @@ };

items: [...state.items],
indentStates: [...state.indentStates],
indentLevelStates: [...state.indentLevelStates],
ignoreIndent: state.ignoreIndent

@@ -432,3 +432,3 @@ };

get indentLevelStates() {
return this.state.indentStates;
return this.state.indentLevelStates;
}

@@ -524,3 +524,3 @@ get items() {

const resolvedInfos = new Map();
let lookAheadSavePoints = new Map();
const lookAheadSavePoints = new Map();
let possibleNewLineSavePoint;

@@ -665,3 +665,3 @@ let depth = 0;

return;
possibleNewLineSavePoint = createSavePoint(signal);
possibleNewLineSavePoint = createSavePoint(signal, "newline");
}

@@ -687,7 +687,7 @@ function revertToSavePointPossiblyThrowing(savePoint) {

savePoint.minDepthFound = depth;
savePoint.uncomittedItems.push(printItem);
savePoint.uncomittedItems.push({ printItem, depth, childIndex });
}
else if (childIndex > savePoint.minDepthChildIndex) {
savePoint.minDepthChildIndex = childIndex;
savePoint.uncomittedItems.push(printItem);
savePoint.uncomittedItems.push({ printItem, depth, childIndex });
}

@@ -700,5 +700,5 @@ }

possibleNewLineSavePoint = isForNewLine ? undefined : savePoint.possibleNewLineSavePoint;
lookAheadSavePoints = savePoint.lookAheadSavePoints;
childIndex = savePoint.childIndex;
newlineGroupDepth = savePoint.newlineGroupDepth;
depth = savePoint.minDepthFound;
if (isForNewLine)

@@ -709,5 +709,7 @@ writer.write(options.newlineKind);

for (let i = startIndex; i < savePoint.uncomittedItems.length; i++) {
const previousChildIndex = childIndex;
printPrintItem(savePoint.uncomittedItems[i]);
childIndex = previousChildIndex + 1;
const item = savePoint.uncomittedItems[i];
childIndex = item.childIndex;
depth = item.depth;
printPrintItem(item.printItem);
childIndex = item.childIndex + 1;
}

@@ -720,4 +722,3 @@ }

if (!lookAheadSavePoints.has(condition)) {
const savePoint = createSavePoint(printingCondition);
savePoint.name = condition.name;
const savePoint = createSavePoint(printingCondition, condition.name);
lookAheadSavePoints.set(condition, savePoint);

@@ -757,4 +758,3 @@ }

if (resolvedInfo == null && !lookAheadSavePoints.has(info)) {
const savePoint = createSavePoint(printingCondition);
savePoint.name = info.name;
const savePoint = createSavePoint(printingCondition, info.name);
lookAheadSavePoints.set(info, savePoint);

@@ -798,4 +798,5 @@ }

}
function createSavePoint(initialItem) {
function createSavePoint(initialItem, name) {
return {
name,
childIndex,

@@ -805,6 +806,9 @@ newlineGroupDepth,

possibleNewLineSavePoint,
uncomittedItems: [initialItem],
uncomittedItems: [{
printItem: initialItem,
depth,
childIndex
}],
minDepthFound: depth,
minDepthChildIndex: childIndex,
lookAheadSavePoints: new Map(lookAheadSavePoints)
minDepthChildIndex: childIndex
};

@@ -838,3 +842,3 @@ }

const version = "0.4.2";
const version = "0.4.3";

@@ -841,0 +845,0 @@ exports.CliLoggingEnvironment = CliLoggingEnvironment;

// dprint-ignore-file
export declare const version = "0.4.2";
export declare const version = "0.4.3";

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

{
"name": "@dprint/core",
"version": "0.4.2",
"version": "0.4.3",
"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