Socket
Socket
Sign inDemoInstall

@angular-devkit/schematics

Package Overview
Dependencies
Maintainers
0
Versions
772
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 18.1.0-next.3 to 18.1.0-rc.0

6

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

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

"dependencies": {
"@angular-devkit/core": "18.1.0-next.3",
"jsonc-parser": "3.2.1",
"@angular-devkit/core": "18.1.0-rc.0",
"jsonc-parser": "3.3.1",
"magic-string": "0.30.10",

@@ -25,0 +25,0 @@ "ora": "5.4.1",

@@ -27,3 +27,3 @@ /**

export * from './tree/host-tree';
export { UpdateRecorder } from './tree/interface';
export type { UpdateRecorder } from './tree/interface';
export * from './engine/schematic';

@@ -30,0 +30,0 @@ export * from './sink/dryrun';

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

// Default handling code is for old tasks that incorrectly export `default` with non-ESM module
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))));
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))));
}

@@ -113,0 +113,0 @@ catch { }

@@ -15,7 +15,14 @@ "use strict";

function readJsonFile(path) {
if (!(0, fs_1.existsSync)(path)) {
throw new schematics_1.FileDoesNotExistException(path);
let data;
try {
data = (0, fs_1.readFileSync)(path, 'utf-8');
}
catch (e) {
if (e && typeof e === 'object' && 'code' in e && e.code === 'ENOENT') {
throw new schematics_1.FileDoesNotExistException(path);
}
throw e;
}
const errors = [];
const content = (0, jsonc_parser_1.parse)((0, fs_1.readFileSync)(path, 'utf-8'), errors, { allowTrailingComma: true });
const content = (0, jsonc_parser_1.parse)(data, errors, { allowTrailingComma: true });
if (errors.length) {

@@ -22,0 +29,0 @@ const { error, offset } = errors[0];

@@ -16,4 +16,3 @@ /**

export declare class NodeModulesTestEngineHost extends NodeModulesEngineHost {
private _collections;
private _tasks;
#private;
get tasks(): TaskConfiguration<{}>[];

@@ -20,0 +19,0 @@ clearTasks(): void;

@@ -17,18 +17,18 @@ "use strict";

class NodeModulesTestEngineHost extends node_module_engine_host_1.NodeModulesEngineHost {
_collections = new Map();
_tasks = [];
#collections = new Map();
#tasks = [];
get tasks() {
return this._tasks;
return this.#tasks;
}
clearTasks() {
this._tasks = [];
this.#tasks = [];
}
registerCollection(name, path) {
this._collections.set(name, path);
this.#collections.set(name, path);
}
transformContext(context) {
const oldAddTask = context.addTask;
const oldAddTask = context.addTask.bind(context);
context.addTask = (task, dependencies) => {
this._tasks.push(task.toConfiguration());
return oldAddTask.call(context, task, dependencies);
this.#tasks.push(task.toConfiguration());
return oldAddTask(task, dependencies);
};

@@ -38,9 +38,5 @@ return context;

_resolveCollectionPath(name, requester) {
const maybePath = this._collections.get(name);
if (maybePath) {
return maybePath;
}
return super._resolveCollectionPath(name, requester);
return this.#collections.get(name) ?? super._resolveCollectionPath(name, requester);
}
}
exports.NodeModulesTestEngineHost = NodeModulesTestEngineHost;
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