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

@angular-devkit/schematics

Package Overview
Dependencies
Maintainers
0
Versions
816
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 19.2.0-next.2 to 19.2.0-rc.0

4

package.json
{
"name": "@angular-devkit/schematics",
"version": "19.2.0-next.2",
"version": "19.2.0-rc.0",
"description": "Angular Schematics - Library",

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

"dependencies": {
"@angular-devkit/core": "19.2.0-next.2",
"@angular-devkit/core": "19.2.0-rc.0",
"jsonc-parser": "3.3.1",

@@ -24,0 +24,0 @@ "magic-string": "0.30.17",

@@ -9,4 +9,4 @@ /**

import { BaseException } from '@angular-devkit/core';
import { Url } from 'node:url';
import { Observable } from 'rxjs';
import { Url } from 'url';
import { MergeStrategy } from '../tree/interface';

@@ -13,0 +13,0 @@ import { Workflow } from '../workflow/interface';

@@ -9,4 +9,4 @@ /**

import { logging } from '@angular-devkit/core';
import { Url } from 'node:url';
import { Observable } from 'rxjs';
import { Url } from 'url';
import { FileEntry, MergeStrategy, Tree } from '../tree/interface';

@@ -13,0 +13,0 @@ import { Workflow } from '../workflow/interface';

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

exports.url = url;
const url_1 = require("url");
const node_url_1 = require("node:url");
function url(urlString) {
const url = (0, url_1.parse)(urlString);
const url = (0, node_url_1.parse)(urlString);
return (context) => context.engine.createSourceFromUrl(url, context)(context);
}

@@ -10,5 +10,5 @@ /**

import { Action } from './action';
import { DirEntry, FileEntry, FileVisitor, MergeStrategy, Tree, UpdateRecorder } from './interface';
import { DirEntry, FileEntry, FileVisitor, MergeStrategy, Tree, TreeSymbol, UpdateRecorder } from './interface';
export declare class DelegateTree implements Tree {
[x: symbol]: () => this;
[TreeSymbol]: () => this;
protected _other: Tree;

@@ -15,0 +15,0 @@ constructor(_other: Tree);

@@ -10,3 +10,3 @@ /**

import { Action } from './action';
import { DirEntry, FileEntry, FilePredicate, FileVisitor, MergeStrategy, Tree, UpdateRecorder } from './interface';
import { DirEntry, FileEntry, FilePredicate, FileVisitor, MergeStrategy, Tree, TreeSymbol, UpdateRecorder } from './interface';
export declare class HostDirEntry implements DirEntry {

@@ -26,3 +26,3 @@ readonly parent: DirEntry | null;

export declare class HostTree implements Tree {
[x: symbol]: () => this;
[TreeSymbol]: () => this;
protected _backend: virtualFs.ReadonlyHost<{}>;

@@ -29,0 +29,0 @@ private readonly _id;

@@ -10,3 +10,3 @@ /**

import { Action } from './action';
import { DirEntry, MergeStrategy, Tree, UpdateRecorder } from './interface';
import { DirEntry, MergeStrategy, Tree, TreeSymbol, UpdateRecorder } from './interface';
export declare class CannotCreateFileException extends BaseException {

@@ -26,3 +26,3 @@ constructor(path: string);

export declare class NullTree implements Tree {
[x: symbol]: () => this;
[TreeSymbol]: () => this;
branch(): Tree;

@@ -29,0 +29,0 @@ merge(_other: Tree, _strategy?: MergeStrategy): void;

@@ -10,3 +10,3 @@ /**

import { Action } from './action';
import { DirEntry, FileEntry, FileVisitor, MergeStrategy, Tree, UpdateRecorder } from './interface';
import { DirEntry, FileEntry, FileVisitor, MergeStrategy, Tree, TreeSymbol, UpdateRecorder } from './interface';
declare class ScopedDirEntry implements DirEntry {

@@ -25,3 +25,3 @@ private _base;

export declare class ScopedTree implements Tree {
[x: symbol]: () => this;
[TreeSymbol]: () => this;
private _base;

@@ -28,0 +28,0 @@ readonly _root: ScopedDirEntry;

@@ -49,5 +49,5 @@ "use strict";

const core_1 = require("@angular-devkit/core");
const child_process_1 = require("child_process");
const node_child_process_1 = require("node:child_process");
const path = __importStar(require("node:path"));
const ora_1 = __importDefault(require("ora"));
const path = __importStar(require("path"));
const rxjs_1 = require("rxjs");

@@ -158,3 +158,3 @@ const src_1 = require("../../src");

}).start();
const childProcess = (0, child_process_1.spawn)(taskPackageManagerName, args, spawnOptions).on('close', (code) => {
const childProcess = (0, node_child_process_1.spawn)(taskPackageManagerName, args, spawnOptions).on('close', (code) => {
if (code === 0) {

@@ -161,0 +161,0 @@ spinner.succeed('Packages installed successfully.');

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

const core_1 = require("@angular-devkit/core");
const child_process_1 = require("child_process");
const path = __importStar(require("path"));
const node_child_process_1 = require("node:child_process");
const path = __importStar(require("node:path"));
function default_1(factoryOptions = {}) {

@@ -69,3 +69,3 @@ const rootDirectory = factoryOptions.rootDirectory || process.cwd();

return new Promise((resolve, reject) => {
(0, child_process_1.spawn)('git', args, spawnOptions).on('close', (code) => {
(0, node_child_process_1.spawn)('git', args, spawnOptions).on('close', (code) => {
if (code === 0) {

@@ -72,0 +72,0 @@ resolve();

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

exports.ExportStringRef = void 0;
const path_1 = require("path");
const node_path_1 = require("node:path");
class ExportStringRef {

@@ -19,5 +19,5 @@ _ref;

const [path, name] = ref.split('#', 2);
this._module = path[0] == '.' ? (0, path_1.resolve)(parentPath, path) : path;
this._module = path[0] == '.' ? (0, node_path_1.resolve)(parentPath, path) : path;
this._module = require.resolve(this._module);
this._path = (0, path_1.dirname)(this._module);
this._path = (0, node_path_1.dirname)(this._module);
if (inner) {

@@ -24,0 +24,0 @@ this._ref = require(this._module)[name || 'default'];

@@ -8,4 +8,4 @@ /**

*/
import { Url } from 'node:url';
import { Observable } from 'rxjs';
import { Url } from 'url';
import { CollectionDescription, EngineHost, RuleFactory, SchematicDescription, Source, TaskExecutor, TypedSchematicContext } from '../src';

@@ -12,0 +12,0 @@ export type FallbackCollectionDescription = {

@@ -9,4 +9,4 @@ /**

import { BaseException } from '@angular-devkit/core';
import { Url } from 'node:url';
import { Observable } from 'rxjs';
import { Url } from 'url';
import { RuleFactory, Source, TaskExecutor, TaskExecutorFactory } from '../src';

@@ -13,0 +13,0 @@ import { FileSystemCollectionDesc, FileSystemEngineHost, FileSystemSchematicContext, FileSystemSchematicDesc, FileSystemSchematicDescription } from './description';

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

const node_1 = require("@angular-devkit/core/node");
const fs_1 = require("fs");
const path_1 = require("path");
const node_fs_1 = require("node:fs");
const node_path_1 = require("node:path");
const rxjs_1 = require("rxjs");

@@ -158,3 +158,3 @@ const src_1 = require("../src");

}
const collectionPath = (0, path_1.dirname)(collection.path);
const collectionPath = (0, node_path_1.dirname)(collection.path);
const partialDesc = collection.schematics[name];

@@ -188,4 +188,4 @@ if (!partialDesc) {

if (schema) {
if (!(0, path_1.isAbsolute)(schema)) {
schema = (0, path_1.join)(collectionPath, schema);
if (!(0, node_path_1.isAbsolute)(schema)) {
schema = (0, node_path_1.join)(collectionPath, schema);
}

@@ -199,4 +199,4 @@ schemaJson = (0, file_system_utility_1.readJsonFile)(schema);

// url files) are not in the same place as the compiled JS.
const maybePath = (0, path_1.join)(collectionPath, partialDesc.factory);
const path = (0, fs_1.existsSync)(maybePath) && (0, fs_1.statSync)(maybePath).isDirectory() ? maybePath : (0, path_1.dirname)(maybePath);
const maybePath = (0, node_path_1.join)(collectionPath, partialDesc.factory);
const path = (0, node_fs_1.existsSync)(maybePath) && (0, node_fs_1.statSync)(maybePath).isDirectory() ? maybePath : (0, node_path_1.dirname)(maybePath);
return this._transformSchematicDescription(name, collection, {

@@ -224,3 +224,3 @@ ...partialDesc,

// path.
const root = (0, core_1.normalize)((0, path_1.resolve)(fileDescription.path, url.path || ''));
const root = (0, core_1.normalize)((0, node_path_1.resolve)(fileDescription.path, url.path || ''));
return new src_1.HostCreateTree(new core_1.virtualFs.ScopedHost(new node_1.NodeJsSyncHost(), root));

@@ -227,0 +227,0 @@ };

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

exports.FileSystemEngineHost = void 0;
const fs_1 = require("fs");
const path_1 = require("path");
const node_fs_1 = require("node:fs");
const node_path_1 = require("node:path");
const rxjs_1 = require("rxjs");

@@ -64,4 +64,4 @@ const src_1 = require("../src");

// Allow `${_root}/${name}.json` as a collection.
const maybePath = require.resolve((0, path_1.join)(this._root, name + '.json'));
if ((0, fs_1.existsSync)(maybePath)) {
const maybePath = require.resolve((0, node_path_1.join)(this._root, name + '.json'));
if ((0, node_fs_1.existsSync)(maybePath)) {
return maybePath;

@@ -73,4 +73,4 @@ }

// Allow `${_root}/${name}/collection.json.
const maybePath = require.resolve((0, path_1.join)(this._root, name, 'collection.json'));
if ((0, fs_1.existsSync)(maybePath)) {
const maybePath = require.resolve((0, node_path_1.join)(this._root, name, 'collection.json'));
if ((0, node_fs_1.existsSync)(maybePath)) {
return maybePath;

@@ -110,4 +110,4 @@ }

try {
const maybePath = require.resolve((0, path_1.join)(this._root, name));
if ((0, fs_1.existsSync)(maybePath)) {
const maybePath = require.resolve((0, node_path_1.join)(this._root, name));
if ((0, node_fs_1.existsSync)(maybePath)) {
return true;

@@ -122,3 +122,3 @@ }

try {
const path = require.resolve((0, path_1.join)(this._root, name));
const path = require.resolve((0, node_path_1.join)(this._root, name));
// Default handling code is for old tasks that incorrectly export `default` with non-ESM module

@@ -125,0 +125,0 @@ return (0, rxjs_1.from)(Promise.resolve(`${path}`).then(s => __importStar(require(s))).then((mod) => (mod.default?.default || mod.default)())).pipe((0, rxjs_1.catchError)(() => (0, rxjs_1.throwError)(() => new src_1.UnregisteredTaskException(name))));

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

exports.readJsonFile = readJsonFile;
const fs_1 = require("fs");
const jsonc_parser_1 = require("jsonc-parser");
const node_fs_1 = require("node:fs");
const exception_1 = require("../src/exception/exception");

@@ -18,3 +18,3 @@ function readJsonFile(path) {

try {
data = (0, fs_1.readFileSync)(path, 'utf-8');
data = (0, node_fs_1.readFileSync)(path, 'utf-8');
}

@@ -21,0 +21,0 @@ catch (e) {

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

const core_1 = require("@angular-devkit/core");
const path_1 = require("path");
const node_path_1 = require("node:path");
const export_ref_1 = require("./export-ref");

@@ -43,13 +43,13 @@ const file_system_engine_host_base_1 = require("./file-system-engine-host-base");

}
const relativeBase = requester ? (0, path_1.dirname)(requester) : process.cwd();
const relativeBase = requester ? (0, node_path_1.dirname)(requester) : process.cwd();
let collectionPath = undefined;
if (name.startsWith('.')) {
name = (0, path_1.resolve)(relativeBase, name);
name = (0, node_path_1.resolve)(relativeBase, name);
}
const resolveOptions = {
paths: requester ? [(0, path_1.dirname)(requester), ...(this.paths || [])] : this.paths,
paths: requester ? [(0, node_path_1.dirname)(requester), ...(this.paths || [])] : this.paths,
};
// Try to resolve as a package
try {
const packageJsonPath = require.resolve((0, path_1.join)(name, 'package.json'), resolveOptions);
const packageJsonPath = require.resolve((0, node_path_1.join)(name, 'package.json'), resolveOptions);
const { schematics } = require(packageJsonPath);

@@ -62,4 +62,4 @@ if (!schematics || typeof schematics !== 'string') {

if (schematics.startsWith('.')) {
const packageDirectory = (0, path_1.dirname)(packageJsonPath);
collectionPath = (0, path_1.resolve)(packageDirectory, schematics);
const packageDirectory = (0, node_path_1.dirname)(packageJsonPath);
collectionPath = (0, node_path_1.resolve)(packageDirectory, schematics);
}

@@ -66,0 +66,0 @@ // Otherwise treat this as a package, and recurse to find the collection path

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