New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ng-morph

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-morph - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

6

ng/helpers/add-import-to-module.d.ts
import { ClassDeclaration } from 'ts-morph';
export declare function addImportToModule(classDeclaration: ClassDeclaration, { moduleName, moduleSpecifier, element, }: {
moduleName: string;
moduleSpecifier: string;
element?: string;
}): void;
export declare function addImportToModule(classDeclaration: ClassDeclaration, moduleName: string): void;

@@ -6,6 +6,4 @@ "use strict";

const decorators_1 = require("ng-morph/decorators");
const imports_1 = require("ng-morph/imports");
function addImportToModule(classDeclaration, { moduleName, moduleSpecifier, element = moduleName, }) {
function addImportToModule(classDeclaration, moduleName) {
var _a;
const file = classDeclaration.getSourceFile();
const [moduleDecorator] = decorators_1.getDecorators(classDeclaration, {

@@ -26,16 +24,5 @@ name: 'NgModule',

}
importsInitializer.addElement(element);
const [moduleImport = file.addImportDeclaration({
moduleSpecifier,
namedImports: [moduleName],
}),] = imports_1.getImports(file.getFilePath(), {
moduleSpecifier,
});
if (!moduleImport
.getNamedImports()
.find((namedImport) => namedImport.getName() === moduleName)) {
moduleImport.addNamedImport(moduleName);
}
importsInitializer.addElement(moduleName);
}
exports.addImportToModule = addImportToModule;
//# sourceMappingURL=add-import-to-module.js.map

2

package.json
{
"name": "ng-morph",
"version": "1.1.0",
"version": "1.2.0",
"peerDependencies": {

@@ -5,0 +5,0 @@ "@angular-devkit/core": ">=11.0.0",

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