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

@arroyodev-llc/utils.projen

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arroyodev-llc/utils.projen - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

47

dist/index.d.ts

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

import { ObjectLiteralExpression, PropertyAssignment } from 'ts-morph';
import { ObjectLiteralExpression, PropertyAssignment, WriterFunction, Expression, ArrayLiteralExpression } from 'ts-morph';
import { Primitive, Schema } from 'type-fest';
import * as projen from 'projen';

@@ -20,2 +21,44 @@ import { Component, Project, TaskStep } from 'projen';

declare const addPropertyAssignmentsFromObject: <T extends object>(expression: ObjectLiteralExpression, obj: T) => PropertyAssignment[];
type Enumerable<T> = T | Array<T>;
/**
* Merge object acceptable key values.
*/
type ObjectLiteralMergeObjectValue = WriterFunction | Enumerable<Primitive | Record<string, WriterFunction | Enumerable<Primitive>>>;
/**
* Create ObjectLiteral merge schema from type.
*/
type ObjectLiteralMergeSchema<T> = Schema<T, ObjectLiteralMergeObjectValue> | T;
/**
* Ensure given value is a valid initializer.
* @param value Input writer function or primitive value.
*/
declare const convertInitializer: <T extends ObjectLiteralMergeObjectValue>(value: T) => WriterFunction | string;
/**
* Test equality between two expressions.
*
* @remarks
* Converts both expressions to strings strips all whitespace,
* quotations, and escapes. The resulting strings are then compared.
*
* @param a Left expression.
* @param b Right expression.
*/
declare const isExpressionEqual: (a: Expression | string, b: Expression | string) => boolean;
/**
* Merge array into {@link ArrayLiteralExpression}.
*
* @remarks
* Produces a concat-ed array of unique elements.
* Any writer functions will be added as-is.
*
* @param arrayLiteral {@link ArrayLiteralExpression} to merge into.
* @param value Values to merge in array literal.
*/
declare function mergeArrayLiteral(arrayLiteral: ArrayLiteralExpression, value: Array<Primitive | WriterFunction | ObjectLiteralMergeObjectValue>): (string | WriterFunction)[];
/**
* Deeply merge `obj` into an existing {@link ObjectLiteralExpression}
* @param expression {@link ObjectLiteralExpression} to merge into.
* @param obj Input merge object.
*/
declare function mergeObjectLiteral<T extends Record<string, any>>(expression: ObjectLiteralExpression, obj: Schema<T, ObjectLiteralMergeObjectValue>): void;

@@ -63,2 +106,2 @@ /**

export { ProjectName, addPropertyAssignmentsFromObject, applyOverrides, cwdRelativePath, findComponent, findRootProject, isComponent, replaceTask };
export { Enumerable, ObjectLiteralMergeObjectValue, ObjectLiteralMergeSchema, ProjectName, addPropertyAssignmentsFromObject, applyOverrides, convertInitializer, cwdRelativePath, findComponent, findRootProject, isComponent, isExpressionEqual, mergeArrayLiteral, mergeObjectLiteral, replaceTask };

5

package.json

@@ -23,3 +23,4 @@ {

"typescript": "^5",
"unbuild": "^1.2.1"
"unbuild": "^1.2.1",
"vitest": "^0.31.1"
},

@@ -37,3 +38,3 @@ "dependencies": {

},
"version": "0.1.7",
"version": "0.1.8",
"types": "./dist/index.d.ts",

@@ -40,0 +41,0 @@ "type": "module",

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

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