@teambit/component-id
Advanced tools
Comparing version 0.0.398 to 0.0.400
@@ -122,3 +122,3 @@ import { BitId } from '@teambit/legacy-bit-id'; | ||
*/ | ||
toString(opts: { ignoreVersion?: boolean } = {}) { | ||
toString(opts: { ignoreVersion?: boolean; fsCompatible?: boolean } = {}) { | ||
let id = this._legacy; | ||
@@ -128,3 +128,6 @@ if (this._scope && !this._legacy.scope) { | ||
} | ||
return id.toString(false, opts.ignoreVersion); | ||
const idStr = id.toString(false, opts.ignoreVersion); | ||
if (opts.fsCompatible) return idStr.replace(/\//g, '_').replace(/\./g, '_').replace(/-/g, '_'); | ||
return idStr; | ||
} | ||
@@ -131,0 +134,0 @@ |
@@ -75,2 +75,3 @@ import { BitId } from '@teambit/legacy-bit-id'; | ||
ignoreVersion?: boolean; | ||
fsCompatible?: boolean; | ||
}): string; | ||
@@ -77,0 +78,0 @@ toObject(): ComponentIdObj; |
@@ -106,3 +106,6 @@ "use strict"; | ||
} | ||
return id.toString(false, opts.ignoreVersion); | ||
const idStr = id.toString(false, opts.ignoreVersion); | ||
if (opts.fsCompatible) | ||
return idStr.replace(/\//g, '_').replace(/\./g, '_').replace(/-/g, '_'); | ||
return idStr; | ||
} | ||
@@ -109,0 +112,0 @@ toObject() { |
{ | ||
"name": "@teambit/component-id", | ||
"version": "0.0.398", | ||
"version": "0.0.400", | ||
"homepage": "https://bit.dev/teambit/component/component-id", | ||
@@ -9,3 +9,3 @@ "main": "dist/index.js", | ||
"name": "component-id", | ||
"version": "0.0.398" | ||
"version": "0.0.400" | ||
}, | ||
@@ -12,0 +12,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
49655
28
805