Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

@voltiso/transform

Package Overview
Dependencies
8
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.7 to 3.1.0

9

dist/cjs/_/copied-from-util/_deepMerge.js

@@ -13,10 +13,6 @@ "use strict";

for (const k of Object.keys(objectB)) {
if (
// eslint-disable-next-line security/detect-object-injection
Object === result[k]?.constructor &&
// eslint-disable-next-line security/detect-object-injection
if (Object === result[k]?.constructor &&
Object === objectB[k]?.constructor) {
// eslint-disable-next-line security/detect-object-injection, etc/no-internal
// eslint-disable-next-line etc/no-internal
result[k] = _deepMerge2(result[k], objectB[k]);
// eslint-disable-next-line security/detect-object-injection
}

@@ -29,2 +25,1 @@ else

exports._deepMerge2 = _deepMerge2;
//# sourceMappingURL=_deepMerge.js.map

@@ -5,2 +5,1 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=DeepPartial.js.map

@@ -21,2 +21,1 @@ "use strict";

__exportStar(require("./DeepPartial"), exports);
//# sourceMappingURL=index.js.map

@@ -20,2 +20,1 @@ "use strict";

__exportStar(require("./copied-from-util"), exports);
//# sourceMappingURL=index.js.map

@@ -11,2 +11,1 @@ "use strict";

exports.isCallInfo = isCallInfo;
//# sourceMappingURL=CallInfo.js.map

@@ -25,2 +25,1 @@ "use strict";

exports.getAstPath = getAstPath;
//# sourceMappingURL=getAstPath.js.map

@@ -22,2 +22,1 @@ "use strict";

__exportStar(require("./logCallInfoNode"), exports);
//# sourceMappingURL=index.js.map
import type { TransformContext } from '@voltiso/transform.lib';
import type * as ts from 'typescript';
import ts from 'typescript';
export declare function logCallInfoNode(ctx: TransformContext, node: ts.Node): void;
//# sourceMappingURL=logCallInfoNode.d.ts.map

@@ -28,2 +28,1 @@ "use strict";

exports.logCallInfoNode = logCallInfoNode;
//# sourceMappingURL=logCallInfoNode.js.map

@@ -136,2 +136,1 @@ "use strict";

exports.callInfoTransform = callInfoTransform;
//# sourceMappingURL=callInfoTransform.js.map

@@ -9,2 +9,1 @@ "use strict";

Object.defineProperty(exports, "default", { enumerable: true, get: function () { return callInfoTransform_1.callInfoTransform; } });
//# sourceMappingURL=default.js.map

@@ -21,2 +21,1 @@ "use strict";

__exportStar(require("./callInfoTransform"), exports);
//# sourceMappingURL=index.js.map

@@ -12,2 +12,1 @@ "use strict";

};
//# sourceMappingURL=CompatTransformOptions.js.map

@@ -21,2 +21,1 @@ "use strict";

__exportStar(require("./logCompatTransformNode"), exports);
//# sourceMappingURL=index.js.map

@@ -29,2 +29,1 @@ "use strict";

exports.logCompatTransformNode = logCompatTransformNode;
//# sourceMappingURL=logCompatTransformNode.js.map

@@ -80,2 +80,1 @@ "use strict";

exports.compatTransform = compatTransform;
//# sourceMappingURL=compatTransform.js.map

@@ -9,2 +9,1 @@ "use strict";

Object.defineProperty(exports, "default", { enumerable: true, get: function () { return compatTransform_1.compatTransform; } });
//# sourceMappingURL=default.js.map

@@ -23,2 +23,1 @@ "use strict";

__exportStar(require("./strip"), exports);
//# sourceMappingURL=index.js.map

@@ -40,2 +40,1 @@ "use strict";

exports.buildNestedQualifiedName = buildNestedQualifiedName;
//# sourceMappingURL=buildNestedQualifiedName.js.map

@@ -122,2 +122,1 @@ "use strict";

exports.canBeInlined = canBeInlined;
//# sourceMappingURL=canBeInlined.js.map

@@ -17,2 +17,1 @@ "use strict";

exports.collectNodesOfKind = collectNodesOfKind;
//# sourceMappingURL=collectNodesOfKind.js.map

@@ -62,2 +62,1 @@ "use strict";

exports.collectSymbolNames = collectSymbolNames;
//# sourceMappingURL=collectSymbolNames.js.map

@@ -98,2 +98,1 @@ "use strict";

exports.fixNamespaces = fixNamespaces;
//# sourceMappingURL=fixNamespaces.js.map

@@ -18,2 +18,1 @@ "use strict";

exports.getFirstChildOrSelf = getFirstChildOrSelf;
//# sourceMappingURL=getFirstChildOrSelf.js.map

@@ -42,2 +42,1 @@ "use strict";

exports.getSymbolPath = getSymbolPath;
//# sourceMappingURL=getSymbolPath.js.map

@@ -50,2 +50,1 @@ "use strict";

exports.hasNodeInlineComment = hasNodeInlineComment;
//# sourceMappingURL=hasNodeInlineComment.js.map

@@ -18,2 +18,1 @@ "use strict";

exports.hasNodeOfType = hasNodeOfType;
//# sourceMappingURL=hasNodeOfType.js.map

@@ -32,2 +32,1 @@ "use strict";

__exportStar(require("./SymbolObject"), exports);
//# sourceMappingURL=index.js.map

@@ -28,2 +28,1 @@ "use strict";

exports.logInlinedNode = logInlinedNode;
//# sourceMappingURL=logInlinedNode.js.map

@@ -45,2 +45,1 @@ "use strict";

exports.simplifyAndAddComment = simplifyAndAddComment;
//# sourceMappingURL=simplifyAndAddComment.js.map

@@ -62,2 +62,1 @@ "use strict";

exports.simplifyNode = simplifyNode;
//# sourceMappingURL=simplifyNode.js.map

@@ -5,2 +5,1 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=SymbolObject.js.map

@@ -9,2 +9,1 @@ "use strict";

Object.defineProperty(exports, "default", { enumerable: true, get: function () { return inlineTransform_1.inlineTransform; } });
//# sourceMappingURL=default.js.map

@@ -21,2 +21,1 @@ "use strict";

__exportStar(require("./inlineTransform"), exports);
//# sourceMappingURL=index.js.map

@@ -90,2 +90,1 @@ "use strict";

exports.inlineTransform = inlineTransform;
//# sourceMappingURL=inlineTransform.js.map

@@ -23,2 +23,1 @@ "use strict";

__exportStar(require("./shouldStripSymbol"), exports);
//# sourceMappingURL=index.js.map

@@ -26,2 +26,1 @@ "use strict";

exports.logStrippedNode = logStrippedNode;
//# sourceMappingURL=logStrippedNode.js.map

@@ -25,2 +25,1 @@ "use strict";

exports.printInitInfo = printInitInfo;
//# sourceMappingURL=printInitInfo.js.map

@@ -13,2 +13,1 @@ "use strict";

exports.shouldStripModule = shouldStripModule;
//# sourceMappingURL=shouldStripModule.js.map

@@ -31,5 +31,7 @@ "use strict";

function shouldStripSymbol(ctx, symbol) {
// console.log('shouldStripSymbol', symbol.name, ctx.options.symbols)
for (const symbolToStrip of ctx.options.symbols || [])
if (symbolToStrip === symbol.name)
return true;
// console.log('tags0', symbol.getJsDocTags())
// eslint-disable-next-line no-bitwise

@@ -41,2 +43,3 @@ if (symbol.flags & ts.SymbolFlags.Alias) {

const tags = symbol.getJsDocTags();
// console.log('tags', tags)
for (const tag of tags)

@@ -48,2 +51,1 @@ if (tag.name === 'strip')

exports.shouldStripSymbol = shouldStripSymbol;
//# sourceMappingURL=shouldStripSymbol.js.map

@@ -9,2 +9,1 @@ "use strict";

Object.defineProperty(exports, "default", { enumerable: true, get: function () { return stripTransform_1.stripTransform; } });
//# sourceMappingURL=default.js.map

@@ -21,2 +21,1 @@ "use strict";

__exportStar(require("./stripTransform"), exports);
//# sourceMappingURL=index.js.map

@@ -12,3 +12,4 @@ import type { TransformContext } from '@voltiso/transform.lib';

}
export declare function areAllStripAnnotated(ctx: StripTransformContext, node: ts.ImportClause): boolean;
export declare function stripTransform(program: ts.Program, pluginOptions: StripTransformOptions): (transformationContext: ts.TransformationContext) => (sourceFile: ts.SourceFile) => ts.SourceFile;
//# sourceMappingURL=stripTransform.d.ts.map

@@ -28,3 +28,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.stripTransform = void 0;
exports.stripTransform = exports.areAllStripAnnotated = void 0;
const ts = __importStar(require("typescript"));

@@ -34,2 +34,24 @@ const _1 = require("./_");

const shouldStripSymbol_1 = require("./_/shouldStripSymbol");
function areAllStripAnnotated(ctx, node) {
// console.log('areAllSymbolsStripAnnotated', node.getText(ctx.sourceFile))
if (node.namedBindings && ts.isNamespaceImport(node.namedBindings))
return false;
const childNodes = [
node.name,
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-return
...(node.namedBindings?.elements || []).map(node => node.name),
];
// eslint-disable-next-line es-x/no-array-prototype-every
const result = childNodes.every(childNode => {
if (!childNode)
return true;
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
const symbol = ctx.typeChecker.getSymbolAtLocation(childNode);
// console.log('arr symbol', !!symbol)
return symbol && (0, shouldStripSymbol_1.shouldStripSymbol)(ctx, symbol);
});
// console.log('areAllSymbolsStripAnnotated result', result)
return result;
}
exports.areAllStripAnnotated = areAllStripAnnotated;
function stripTransform(program, pluginOptions) {

@@ -67,4 +89,5 @@ // printInitInfo(pluginOptions)

if (ts.isImportDeclaration(node) &&
ts.isStringLiteral(node.moduleSpecifier) &&
(0, shouldStripModule_1.shouldStripModule)(ctx, node.moduleSpecifier.text)) {
((ts.isStringLiteral(node.moduleSpecifier) &&
(0, shouldStripModule_1.shouldStripModule)(ctx, node.moduleSpecifier.text)) ||
(node.importClause && areAllStripAnnotated(ctx, node.importClause)))) {
(0, _1.logStrippedNode)(node);

@@ -114,2 +137,1 @@ const notEmittedNode = ts.factory.createNotEmittedStatement(node);

exports.stripTransform = stripTransform;
//# sourceMappingURL=stripTransform.js.map

@@ -10,10 +10,6 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

for (const k of Object.keys(objectB)) {
if (
// eslint-disable-next-line security/detect-object-injection
Object === result[k]?.constructor &&
// eslint-disable-next-line security/detect-object-injection
if (Object === result[k]?.constructor &&
Object === objectB[k]?.constructor) {
// eslint-disable-next-line security/detect-object-injection, etc/no-internal
// eslint-disable-next-line etc/no-internal
result[k] = _deepMerge2(result[k], objectB[k]);
// eslint-disable-next-line security/detect-object-injection
}

@@ -25,2 +21,1 @@ else

}
//# sourceMappingURL=_deepMerge.js.map
// ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀
// ⠀ 🌩 V͛o͛͛͛lt͛͛͛i͛͛͛͛so͛͛͛.com⠀ ⠀⠀⠀
export {};
//# sourceMappingURL=DeepPartial.js.map

@@ -5,2 +5,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

export * from './DeepPartial';
//# sourceMappingURL=index.js.map
// ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀
// ⠀ 🌩 V͛o͛͛͛lt͛͛͛i͛͛͛͛so͛͛͛.com⠀ ⠀⠀⠀
export * from './copied-from-util';
//# sourceMappingURL=index.js.map

@@ -7,2 +7,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=CallInfo.js.map

@@ -21,2 +21,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=getAstPath.js.map

@@ -6,2 +6,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

export * from './logCallInfoNode';
//# sourceMappingURL=index.js.map
import type { TransformContext } from '@voltiso/transform.lib';
import type * as ts from 'typescript';
import ts from 'typescript';
export declare function logCallInfoNode(ctx: TransformContext, node: ts.Node): void;
//# sourceMappingURL=logCallInfoNode.d.ts.map

@@ -21,2 +21,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=logCallInfoNode.js.map

@@ -109,2 +109,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=callInfoTransform.js.map

@@ -5,2 +5,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

export { callInfoTransform as default } from './callInfoTransform';
//# sourceMappingURL=default.js.map

@@ -5,2 +5,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

export * from './callInfoTransform';
//# sourceMappingURL=index.js.map

@@ -9,2 +9,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

};
//# sourceMappingURL=CompatTransformOptions.js.map

@@ -5,2 +5,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

export * from './logCompatTransformNode';
//# sourceMappingURL=index.js.map

@@ -22,2 +22,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=logCompatTransformNode.js.map

@@ -53,2 +53,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=compatTransform.js.map

@@ -5,2 +5,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

export { compatTransform as default } from './compatTransform';
//# sourceMappingURL=default.js.map

@@ -7,2 +7,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

export * from './strip';
//# sourceMappingURL=index.js.map

@@ -13,2 +13,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=buildNestedQualifiedName.js.map

@@ -92,2 +92,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=canBeInlined.js.map

@@ -13,2 +13,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=collectNodesOfKind.js.map

@@ -35,2 +35,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=collectSymbolNames.js.map

@@ -71,2 +71,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=fixNamespaces.js.map

@@ -14,2 +14,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=getFirstChildOrSelf.js.map

@@ -15,2 +15,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=getSymbolPath.js.map

@@ -23,2 +23,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=hasNodeInlineComment.js.map

@@ -14,2 +14,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=hasNodeOfType.js.map

@@ -16,2 +16,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

export * from './SymbolObject';
//# sourceMappingURL=index.js.map

@@ -21,2 +21,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=logInlinedNode.js.map

@@ -18,2 +18,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=simplifyAndAddComment.js.map

@@ -35,2 +35,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=simplifyNode.js.map
// ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀
// ⠀ 🌩 V͛o͛͛͛lt͛͛͛i͛͛͛͛so͛͛͛.com⠀ ⠀⠀⠀
export {};
//# sourceMappingURL=SymbolObject.js.map

@@ -5,2 +5,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

export { inlineTransform as default } from './inlineTransform';
//# sourceMappingURL=default.js.map

@@ -5,2 +5,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

export * from './inlineTransform';
//# sourceMappingURL=index.js.map

@@ -63,2 +63,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=inlineTransform.js.map

@@ -7,2 +7,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

export * from './shouldStripSymbol';
//# sourceMappingURL=index.js.map

@@ -19,2 +19,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=logStrippedNode.js.map

@@ -21,2 +21,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=printInitInfo.js.map

@@ -9,2 +9,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

}
//# sourceMappingURL=shouldStripModule.js.map

@@ -5,5 +5,7 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

export function shouldStripSymbol(ctx, symbol) {
// console.log('shouldStripSymbol', symbol.name, ctx.options.symbols)
for (const symbolToStrip of ctx.options.symbols || [])
if (symbolToStrip === symbol.name)
return true;
// console.log('tags0', symbol.getJsDocTags())
// eslint-disable-next-line no-bitwise

@@ -15,2 +17,3 @@ if (symbol.flags & ts.SymbolFlags.Alias) {

const tags = symbol.getJsDocTags();
// console.log('tags', tags)
for (const tag of tags)

@@ -21,2 +24,1 @@ if (tag.name === 'strip')

}
//# sourceMappingURL=shouldStripSymbol.js.map

@@ -5,2 +5,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

export { stripTransform as default } from './stripTransform';
//# sourceMappingURL=default.js.map

@@ -5,2 +5,1 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

export * from './stripTransform';
//# sourceMappingURL=index.js.map

@@ -12,3 +12,4 @@ import type { TransformContext } from '@voltiso/transform.lib';

}
export declare function areAllStripAnnotated(ctx: StripTransformContext, node: ts.ImportClause): boolean;
export declare function stripTransform(program: ts.Program, pluginOptions: StripTransformOptions): (transformationContext: ts.TransformationContext) => (sourceFile: ts.SourceFile) => ts.SourceFile;
//# sourceMappingURL=stripTransform.d.ts.map

@@ -7,2 +7,23 @@ // ⠀ⓥ 2023 🌩 🌩 ⠀ ⠀

import { shouldStripSymbol } from './_/shouldStripSymbol';
export function areAllStripAnnotated(ctx, node) {
// console.log('areAllSymbolsStripAnnotated', node.getText(ctx.sourceFile))
if (node.namedBindings && ts.isNamespaceImport(node.namedBindings))
return false;
const childNodes = [
node.name,
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-return
...(node.namedBindings?.elements || []).map(node => node.name),
];
// eslint-disable-next-line es-x/no-array-prototype-every
const result = childNodes.every(childNode => {
if (!childNode)
return true;
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
const symbol = ctx.typeChecker.getSymbolAtLocation(childNode);
// console.log('arr symbol', !!symbol)
return symbol && shouldStripSymbol(ctx, symbol);
});
// console.log('areAllSymbolsStripAnnotated result', result)
return result;
}
export function stripTransform(program, pluginOptions) {

@@ -40,4 +61,5 @@ // printInitInfo(pluginOptions)

if (ts.isImportDeclaration(node) &&
ts.isStringLiteral(node.moduleSpecifier) &&
shouldStripModule(ctx, node.moduleSpecifier.text)) {
((ts.isStringLiteral(node.moduleSpecifier) &&
shouldStripModule(ctx, node.moduleSpecifier.text)) ||
(node.importClause && areAllStripAnnotated(ctx, node.importClause)))) {
logStrippedNode(node);

@@ -86,2 +108,1 @@ const notEmittedNode = ts.factory.createNotEmittedStatement(node);

}
//# sourceMappingURL=stripTransform.js.map
{
"name": "@voltiso/transform",
"version": "3.0.7",
"version": "3.1.0",
"license": "MIT",

@@ -63,3 +63,3 @@ "repository": "git://github.com/voltiso/mono.git",

"dependencies": {
"chalk": "^4.1.2",
"chalk": "^4",
"@voltiso/transform.lib": "^1.0.1"

@@ -70,2 +70,7 @@ },

},
"devDependencies": {
"typescript-transform-paths": "^3.4.6",
"typescript": "^4.8.4",
"@voltiso/config.tsdoc": "^3.0.0"
},
"__________MISC": "__________",

@@ -75,5 +80,2 @@ "engines": {

},
"devDependencies": {
"@voltiso/config.tsdoc": "^3.0.0"
},
"scripts": {

@@ -80,0 +82,0 @@ "__________DEV": "__________",

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

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

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc