You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@angular-devkit/schematics

Package Overview
Dependencies
Maintainers
2
Versions
967
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular-devkit/schematics - npm Package Compare versions

Comparing version
9.0.0-next.14
to
9.0.0-next.15
+2
-2
package.json
{
"name": "@angular-devkit/schematics",
"version": "9.0.0-next.14",
"version": "9.0.0-next.15",
"description": "Angular Schematics - Library",

@@ -21,3 +21,3 @@ "main": "src/index.js",

"dependencies": {
"@angular-devkit/core": "9.0.0-next.14",
"@angular-devkit/core": "9.0.0-next.15",
"rxjs": "6.5.3"

@@ -24,0 +24,0 @@ },

@@ -20,4 +20,2 @@ /**

constructor();
protected _resolvePackageJson(name: string, basedir?: string): string;
protected _resolvePath(name: string, basedir?: string): string;
protected _resolveCollectionPath(name: string): string;

@@ -24,0 +22,0 @@ protected _resolveReferenceString(refString: string, parentPath: string): {

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

const core_1 = require("@angular-devkit/core");
const core = require("@angular-devkit/core/node");
const path_1 = require("path");

@@ -28,60 +27,22 @@ const export_ref_1 = require("./export-ref");

constructor() { super(); }
_resolvePackageJson(name, basedir = process.cwd()) {
return core.resolve(name, {
basedir,
checkLocal: true,
checkGlobal: true,
resolvePackageJson: true,
});
}
_resolvePath(name, basedir = process.cwd()) {
// Allow relative / absolute paths.
_resolveCollectionPath(name) {
let collectionPath = undefined;
if (name.startsWith('.') || name.startsWith('/')) {
return path_1.resolve(basedir, name);
name = path_1.resolve(name);
}
if (path_1.extname(name)) {
// When having an extension let's just resolve the provided path.
collectionPath = require.resolve(name);
}
else {
// If it's a file inside a package, resolve the package then return the file...
if (name.split('/').length > (name[0] == '@' ? 2 : 1)) {
const rest = name.split('/');
const packageName = rest.shift() + (name[0] == '@' ? '/' + rest.shift() : '');
return path_1.resolve(core.resolve(packageName, {
basedir,
checkLocal: true,
checkGlobal: true,
resolvePackageJson: true,
}), '..', ...rest);
}
return core.resolve(name, {
basedir,
checkLocal: true,
checkGlobal: true,
});
}
}
_resolveCollectionPath(name) {
let collectionPath = undefined;
if (name.replace(/\\/g, '/').split('/').length > (name[0] == '@' ? 2 : 1)) {
try {
collectionPath = this._resolvePath(name, process.cwd());
}
catch (_a) {
}
}
if (!collectionPath) {
let packageJsonPath = this._resolvePackageJson(name, process.cwd());
// If it's a file, use it as is. Otherwise append package.json to it.
if (!core.fs.isFile(packageJsonPath)) {
packageJsonPath = path_1.join(packageJsonPath, 'package.json');
}
const pkgJsonSchematics = require(packageJsonPath)['schematics'];
if (!pkgJsonSchematics || typeof pkgJsonSchematics != 'string') {
const packageJsonPath = require.resolve(path_1.join(name, 'package.json'));
const { schematics } = require(packageJsonPath);
if (!schematics || typeof schematics !== 'string') {
throw new NodePackageDoesNotSupportSchematics(name);
}
collectionPath = this._resolvePath(pkgJsonSchematics, path_1.dirname(packageJsonPath));
collectionPath = path_1.resolve(path_1.dirname(packageJsonPath), schematics);
}
try {
if (collectionPath) {
file_system_utility_1.readJsonFile(collectionPath);
return collectionPath;
}
file_system_utility_1.readJsonFile(collectionPath);
return collectionPath;
}

@@ -88,0 +49,0 @@ catch (e) {