Socket
Socket
Sign inDemoInstall

@nrwl/tao

Package Overview
Dependencies
Maintainers
1
Versions
1591
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nrwl/tao - npm Package Compare versions

Comparing version 8.4.11-beta.3 to 8.4.12-beta.1

2

package.json
{
"name": "@nrwl/tao",
"version": "8.4.11-beta.3",
"version": "8.4.12-beta.1",
"description": "CLI for generating code and running commands",

@@ -5,0 +5,0 @@ "repository": {

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

workflow.reporter.subscribe(createRecorder(record, logger));
schematicOptions = params_1.coerceTypes(opts.schematicOptions, flattenedSchema);
schematicOptions = params_1.convertAliases(params_1.coerceTypes(opts.schematicOptions, flattenedSchema), flattenedSchema);
return [4 /*yield*/, workflow

@@ -268,0 +268,0 @@ .execute({

@@ -20,1 +20,4 @@ import { logging } from '@angular-devkit/core';

};
export declare function convertAliases(opts: {
[k: string]: any;
}, schema: Schema): {};

@@ -103,1 +103,19 @@ "use strict";

exports.coerceTypes = coerceTypes;
function convertAliases(opts, schema) {
return Object.keys(opts).reduce(function (acc, k) {
if (schema.properties[k]) {
acc[k] = opts[k];
}
else {
var found = Object.entries(schema.properties).find(function (_a) {
var _ = _a[0], d = _a[1];
return d.alias === k;
});
if (found) {
acc[found[0]] = opts[k];
}
}
return acc;
}, {});
}
exports.convertAliases = convertAliases;

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

});
describe('convertAliases', function () {
it('should replace aliases with actual keys', function () {
expect(params_1.convertAliases({ d: 'test' }, {
properties: { directory: { type: 'string', alias: 'd' } },
required: [],
description: ''
})).toEqual({ directory: 'test' });
});
it('should filter out unknown keys without alias', function () {
expect(params_1.convertAliases({ d: 'test' }, {
properties: { directory: { type: 'string' } },
required: [],
description: ''
})).toEqual({});
});
});
});
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