Socket
Socket
Sign inDemoInstall

@nrwl/tao

Package Overview
Dependencies
Maintainers
1
Versions
1590
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.11.2-beta.1 to 8.11.2

8

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

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

"dependencies": {
"@angular-devkit/schematics": "8.3.22",
"@angular-devkit/core": "8.3.22",
"@angular-devkit/architect": "0.803.22",
"@angular-devkit/schematics": "8.3.23",
"@angular-devkit/core": "8.3.23",
"@angular-devkit/architect": "0.803.23",
"inquirer": "^6.3.1",

@@ -37,0 +37,0 @@ "minimist": "^1.2.0",

@@ -50,3 +50,2 @@ export declare type MigrationsJson = {

}
export declare function normalizeVersionWithTagCheck(version: string): string;
export declare function normalizeVersion(version: string): string;

@@ -53,0 +52,0 @@ declare type GenerateMigrations = {

@@ -160,10 +160,6 @@ "use strict";

function normalizeVersionWithTagCheck(version) {
if (version[0].match(/[0-9]/)) {
return normalizeVersion(version);
}
else {
throw new Error(`Incorrect version "${version}". You must use a semver version (cannot use "latest" or "next").`);
}
if (version === 'latest' || version === 'next')
return version;
return normalizeVersion(version);
}
exports.normalizeVersionWithTagCheck = normalizeVersionWithTagCheck;
function normalizeVersion(version) {

@@ -235,15 +231,30 @@ const [v, t] = version.split('-');

const i = args.lastIndexOf('@');
const targetPackage = args.substring(0, i);
const maybeVersion = args.substring(i + 1);
if (!targetPackage || !maybeVersion) {
throw new Error(`Provide the correct package name and version. E.g., @nrwl/workspace@9.0.0.`);
if (i === 0) {
const targetPackage = args.trim();
const targetVersion = 'latest';
return { targetPackage, targetVersion };
}
const targetVersion = normalizeVersionWithTagCheck(maybeVersion);
return { targetPackage, targetVersion };
else {
const targetPackage = args.substring(0, i);
const maybeVersion = args.substring(i + 1);
if (!targetPackage || !maybeVersion) {
throw new Error(`Provide the correct package name and version. E.g., @nrwl/workspace@9.0.0.`);
}
const targetVersion = normalizeVersionWithTagCheck(maybeVersion);
return { targetPackage, targetVersion };
}
}
else {
return {
targetPackage: '@nrwl/workspace',
targetVersion: normalizeVersionWithTagCheck(args)
};
if (args.match(/[0-9]/) || args === 'latest' || args === 'next') {
return {
targetPackage: '@nrwl/workspace',
targetVersion: normalizeVersionWithTagCheck(args)
};
}
else {
return {
targetPackage: args,
targetVersion: 'latest'
};
}
}

@@ -250,0 +261,0 @@ }

@@ -487,2 +487,6 @@ "use strict";

});
expect(migrate_1.parseMigrationsOptions(['next'])).toMatchObject({
targetPackage: '@nrwl/workspace',
targetVersion: 'next'
});
expect(migrate_1.parseMigrationsOptions(['@nrwl/workspace@8.12'])).toMatchObject({

@@ -496,4 +500,10 @@ targetPackage: '@nrwl/workspace',

});
expect(() => migrate_1.parseMigrationsOptions(['mypackage@latest'])).toThrowError(`Incorrect version "latest". You must use a semver version (cannot use "latest" or "next").`);
expect(() => migrate_1.parseMigrationsOptions(['@nrwl/workspace'])).toThrowError(`Provide the correct package name and version. E.g., @nrwl/workspace@9.0.0.`);
expect(migrate_1.parseMigrationsOptions(['mypackage'])).toMatchObject({
targetPackage: 'mypackage',
targetVersion: 'latest'
});
expect(migrate_1.parseMigrationsOptions(['@nrwl/workspace@latest'])).toMatchObject({
targetPackage: '@nrwl/workspace',
targetVersion: 'latest'
});
});

@@ -505,3 +515,3 @@ it('should handle incorrect from', () => {

});
it('should handle incorrect from', () => {
it('should handle incorrect to', () => {
expect(() => migrate_1.parseMigrationsOptions(['8.12.0', '--to', '@myscope/a@'])).toThrowError(`Incorrect 'to' section. Use --to="package@version"`);

@@ -508,0 +518,0 @@ expect(() => migrate_1.parseMigrationsOptions(['8.12.0', '--to', '@myscope/a'])).toThrowError(`Incorrect 'to' section. Use --to="package@version"`);

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