@yeoman/namespace
Advanced tools
Comparing version 1.0.0 to 1.0.1
// ===================== | == @ ======== scope ======== | ===== unscoped ===== | = : ========== generator ======== | = @ ===== semver ===== @ | = # ========= instanceId ======== | == + ======== method ======= |= flags = | | ||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
const NAMESPACE_REGEX = /^(?:(@[a-z\d-~][a-z\d-._~]*)\/)?([a-z\d-~][a-z\d-._~]*)(?::((?:[a-z\d-~][a-z\d-._~]*:?)*))?(?:@([a-z\d-.~><+=^* ]*)@?)?(?:#((?:[a-z\d-~][a-z\d-._~]*|\*)))?(?:\+((?:[a-zA-Z\d]\w*\+?)*))?(\?)?$/; | ||
@@ -23,3 +22,2 @@ const groups = { | ||
} | ||
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions | ||
const parsed = { complete }; | ||
@@ -52,3 +50,2 @@ // Populate fields | ||
this.methods = parsed.method?.split('+'); | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
this.flags = parsed.flags; | ||
@@ -62,3 +59,2 @@ // Populate flags | ||
else { | ||
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete | ||
delete this[name]; | ||
@@ -81,5 +77,4 @@ } | ||
if (this.methods && this.methods.length > 0) { | ||
methods = '+' + this.methods.join('+'); | ||
methods = `+${this.methods.join('+')}`; | ||
} | ||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions | ||
const postSemver = `${this.instanceName}${methods}${this.flags ?? ''}`; | ||
@@ -136,5 +131,3 @@ return `${this.namespace}${this._semverAddition(postSemver)}`; | ||
this.instanceId = parsed.instanceId ?? this.instanceId; | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
this.command = parsed.command ?? this.command; | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
this.flags = parsed.flags ?? this.flags; | ||
@@ -141,0 +134,0 @@ } |
{ | ||
"name": "@yeoman/namespace", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"private": false, | ||
@@ -33,4 +33,3 @@ "description": "Namespace parsing for yeoman's generator/environment stack", | ||
"prepare": "npm run build", | ||
"pretest": "xo", | ||
"test": "c8 esmocha --forbid-only" | ||
"test": "vitest run --coverage" | ||
}, | ||
@@ -44,3 +43,3 @@ "engines": { | ||
}, | ||
"gitHead": "a96e9de7cfedab5aeb80de8cc7b5b0bac02b6dee" | ||
"gitHead": "e0b4188a17e10dd8ec563ee9baa31574cb77d7fe" | ||
} |
Sorry, the diff of this file is not supported yet
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
15122
9
227