@nrwl/tao
Advanced tools
Comparing version 8.11.2-beta.1 to 8.11.2
{ | ||
"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"`); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
96518
2003
0
+ Added@angular-devkit/architect@0.803.23(transitive)
+ Added@angular-devkit/core@8.3.23(transitive)
+ Added@angular-devkit/schematics@8.3.23(transitive)
- Removed@angular-devkit/architect@0.803.22(transitive)
- Removed@angular-devkit/core@8.3.22(transitive)
- Removed@angular-devkit/schematics@8.3.22(transitive)
Updated@angular-devkit/core@8.3.23