@teambit/remove 1.0.253 → 1.0.254
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<testsuites tests="0" failures="0" errors="0" skipped="0">
|
|
3
|
-
<testsuite name="teambit.component/remove@1.0.
|
|
3
|
+
<testsuite name="teambit.component/remove@1.0.254" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
package/artifacts/schema.json
CHANGED
|
@@ -1535,7 +1535,7 @@
|
|
|
1535
1535
|
"_legacy": {
|
|
1536
1536
|
"scope": "teambit.component",
|
|
1537
1537
|
"name": "remove",
|
|
1538
|
-
"version": "1.0.
|
|
1538
|
+
"version": "1.0.254"
|
|
1539
1539
|
},
|
|
1540
1540
|
"_scope": "teambit.component"
|
|
1541
1541
|
}
|
|
@@ -3351,7 +3351,7 @@
|
|
|
3351
3351
|
"_legacy": {
|
|
3352
3352
|
"scope": "teambit.component",
|
|
3353
3353
|
"name": "remove",
|
|
3354
|
-
"version": "1.0.
|
|
3354
|
+
"version": "1.0.254"
|
|
3355
3355
|
},
|
|
3356
3356
|
"_scope": "teambit.component"
|
|
3357
3357
|
}
|
|
@@ -3404,7 +3404,7 @@
|
|
|
3404
3404
|
"componentId": {
|
|
3405
3405
|
"scope": "teambit.component",
|
|
3406
3406
|
"name": "remove",
|
|
3407
|
-
"version": "1.0.
|
|
3407
|
+
"version": "1.0.254"
|
|
3408
3408
|
},
|
|
3409
3409
|
"taggedModuleExports": []
|
|
3410
3410
|
}
|
|
@@ -202,9 +202,11 @@ async function removeLocal(workspace, bitIds, force, track, deleteFiles) {
|
|
|
202
202
|
const nonModifiedComponents = new (_componentId().ComponentIdList)();
|
|
203
203
|
if (!bitIds.length) return new (_removedLocalObjects().RemovedLocalObjects)();
|
|
204
204
|
if (!force) {
|
|
205
|
+
const newIds = [];
|
|
205
206
|
await (0, _pMapSeries().default)(bitIds, async id => {
|
|
206
207
|
try {
|
|
207
208
|
const componentStatus = await workspace.getComponentStatusById(id);
|
|
209
|
+
if (componentStatus.newlyCreated) newIds.push(id.toStringWithoutVersion());
|
|
208
210
|
if (componentStatus.modified) modifiedComponents.push(id);else nonModifiedComponents.push(id);
|
|
209
211
|
} catch (err) {
|
|
210
212
|
// if a component has an error, such as, missing main file, we do want to allow removing that component
|
|
@@ -215,6 +217,19 @@ async function removeLocal(workspace, bitIds, force, track, deleteFiles) {
|
|
|
215
217
|
}
|
|
216
218
|
}
|
|
217
219
|
});
|
|
220
|
+
if (newIds.length) {
|
|
221
|
+
const list = await workspace.listWithInvalid();
|
|
222
|
+
list.components.forEach(c => {
|
|
223
|
+
if (bitIds.hasWithoutVersion(c.id)) return; // it gets deleted anyway
|
|
224
|
+
const aspectIds = c.state.aspects.ids;
|
|
225
|
+
const used = newIds.find(newId => aspectIds.includes(newId));
|
|
226
|
+
if (used) throw new (_bitError().BitError)(`Unable to remove ${c.id.toStringWithoutVersion()}.
|
|
227
|
+
This component is 1) an aspect 2) is used by other components, such as "${c.id.toStringWithoutVersion()}" 3) it's a new component so it can't be installed as a package.
|
|
228
|
+
Removing this component from the workspace will disrupt the functionality of other components that depend on it, and resolving these issues may not be straightforward.
|
|
229
|
+
If you understand the risks and wish to proceed with the removal, please use the --force flag.
|
|
230
|
+
`);
|
|
231
|
+
});
|
|
232
|
+
}
|
|
218
233
|
}
|
|
219
234
|
const idsToRemove = force ? bitIds : nonModifiedComponents;
|
|
220
235
|
const componentsList = new (_componentsList().default)(consumer);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_groupArray","data","_interopRequireDefault","require","_lodash","_componentId","_lodash2","_constants","_bitError","_enrichContextFromGlobal","_logger","_http","_remotes","_scopeRemotes","_deleteComponentFiles","_componentsList","_consumerComponent","packageJsonUtils","_interopRequireWildcard","_pMapSeries","_removedLocalObjects","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","obj","removeComponents","workspace","ids","force","remote","track","deleteFiles","logger","debugAndAddBreadCrumb","toString","bitIdsLatest","ComponentIdList","fromArray","map","id","changeVersion","LATEST_BIT_VERSION","localIds","remoteIds","partition","isLocal","length","BitError","join","remoteResult","isEmpty","removeRemote","localResult","removeLocal","RemovedLocalObjects","bitIds","groupedBitsByScope","groupArray","remotes","getScopeRemotes","scope","legacyScope","Remotes","getGlobalRemotes","shouldGoToCentralHub","keys","http","Http","connect","CENTRAL_BIT_HUB_URL","CENTRAL_BIT_HUB_NAME","deleteViaCentralHub","idsAreLanes","context","enrichContextFromGlobal","removeP","key","resolvedRemote","resolve","idsStr","toStringWithoutVersion","deleteMany","Promise","all","consumer","modifiedComponents","nonModifiedComponents","pMapSeries","componentStatus","getComponentStatusById","modified","push","err","Component","isComponentInvalidByErrorType","idsToRemove","componentsList","ComponentsList","newComponents","listNewComponents","idsToRemoveFromScope","filter","hasWithoutVersion","idsToCleanFromWorkspace","components","componentsToRemove","invalidComponents","loadComponents","removedComponentIds","missingComponents","dependentBits","removedFromLane","removeMany","deleteComponentsFiles","invalidComponentsIds","removedComponents","c","removeComponentsFromWorkspacesAndDependencies","cleanFromBitMap","cleanFromConfig","uniqFromArray"],"sources":["remove-components.ts"],"sourcesContent":["import groupArray from 'group-array';\nimport partition from 'lodash.partition';\nimport { Workspace } from '@teambit/workspace';\nimport { ComponentIdList } from '@teambit/component-id';\nimport { isEmpty } from 'lodash';\nimport { CENTRAL_BIT_HUB_NAME, CENTRAL_BIT_HUB_URL, LATEST_BIT_VERSION } from '@teambit/legacy/dist/constants';\nimport { BitError } from '@teambit/bit-error';\nimport enrichContextFromGlobal from '@teambit/legacy/dist/hooks/utils/enrich-context-from-global';\nimport logger from '@teambit/legacy/dist/logger/logger';\nimport { Http } from '@teambit/legacy/dist/scope/network/http';\nimport { Remotes } from '@teambit/legacy/dist/remotes';\nimport { getScopeRemotes } from '@teambit/legacy/dist/scope/scope-remotes';\nimport deleteComponentsFiles from '@teambit/legacy/dist/consumer/component-ops/delete-component-files';\nimport ComponentsList from '@teambit/legacy/dist/consumer/component/components-list';\nimport Component from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport RemovedObjects from '@teambit/legacy/dist/scope/removed-components';\nimport * as packageJsonUtils from '@teambit/legacy/dist/consumer/component/package-json-utils';\nimport pMapSeries from 'p-map-series';\nimport { RemovedLocalObjects } from './removed-local-objects';\n\nexport type RemoveComponentsResult = { localResult: RemovedLocalObjects; remoteResult: RemovedObjects[] };\n\n/**\n * Remove components local and remote\n * splits array of ids into local and remote and removes according to flags\n * @param {string[]} ids - list of remote component ids to delete\n * @param {boolean} force - delete component that are used by other components.\n * @param {boolean} remote - delete component from a remote scope\n * @param {boolean} track - keep tracking local staged components in bitmap.\n * @param {boolean} deleteFiles - delete local added files from fs.\n */\nexport async function removeComponents({\n workspace,\n ids,\n force,\n remote,\n track,\n deleteFiles,\n}: {\n workspace?: Workspace; // when remote is false, it's always set\n ids: ComponentIdList;\n force: boolean;\n remote: boolean;\n track: boolean;\n deleteFiles: boolean;\n}): Promise<RemoveComponentsResult> {\n logger.debugAndAddBreadCrumb('removeComponents', `{ids}. force: ${force.toString()}`, { ids: ids.toString() });\n // added this to remove support for remove only one version from a component\n const bitIdsLatest = ComponentIdList.fromArray(\n ids.map((id) => {\n return id.changeVersion(LATEST_BIT_VERSION);\n })\n );\n const [localIds, remoteIds] = partition(bitIdsLatest, (id) => id.isLocal());\n if (remote && localIds.length) {\n throw new BitError(\n `unable to remove the remote components: ${localIds.join(',')} as they don't contain a scope-name`\n );\n }\n const remoteResult = remote && !isEmpty(remoteIds) ? await removeRemote(workspace, remoteIds, force) : [];\n const localResult = !remote\n ? await removeLocal(workspace as Workspace, bitIdsLatest, force, track, deleteFiles)\n : new RemovedLocalObjects();\n\n return { localResult, remoteResult };\n}\n\n/**\n * Remove remote component from the remote\n * this method groups remote components by remote name and deletes remote components together\n * @param {ComponentIdList} bitIds - list of remote component ids to delete\n * @param {boolean} force - delete component that are used by other components.\n */\nasync function removeRemote(\n workspace: Workspace | undefined,\n bitIds: ComponentIdList,\n force: boolean\n): Promise<RemovedObjects[]> {\n const groupedBitsByScope = groupArray(bitIds, 'scope');\n const remotes = workspace ? await getScopeRemotes(workspace.scope.legacyScope) : await Remotes.getGlobalRemotes();\n const shouldGoToCentralHub = remotes.shouldGoToCentralHub(Object.keys(groupedBitsByScope));\n if (shouldGoToCentralHub) {\n const http = await Http.connect(CENTRAL_BIT_HUB_URL, CENTRAL_BIT_HUB_NAME);\n return http.deleteViaCentralHub(\n bitIds.map((id) => id.toString()),\n { force, idsAreLanes: false }\n );\n }\n const context = {};\n enrichContextFromGlobal(context);\n const removeP = Object.keys(groupedBitsByScope).map(async (key) => {\n const resolvedRemote = await remotes.resolve(key, workspace?.scope.legacyScope);\n const idsStr = groupedBitsByScope[key].map((id) => id.toStringWithoutVersion());\n return resolvedRemote.deleteMany(idsStr, force, context);\n });\n\n return Promise.all(removeP);\n}\n\n/**\n * removeLocal - remove local (imported, new staged components) from modules and bitmap according to flags\n * @param {ComponentIdList} bitIds - list of component ids to delete\n * @param {boolean} force - delete component that are used by other components.\n * @param {boolean} deleteFiles - delete component that are used by other components.\n */\nasync function removeLocal(\n workspace: Workspace,\n bitIds: ComponentIdList,\n force: boolean,\n track: boolean,\n deleteFiles: boolean\n): Promise<RemovedLocalObjects> {\n const consumer = workspace.consumer;\n // local remove in case user wants to delete tagged components\n const modifiedComponents = new ComponentIdList();\n const nonModifiedComponents = new ComponentIdList();\n if (!bitIds.length) return new RemovedLocalObjects();\n if (!force) {\n await pMapSeries(bitIds, async (id) => {\n try {\n const componentStatus = await workspace.getComponentStatusById(id);\n if (componentStatus.modified) modifiedComponents.push(id);\n else nonModifiedComponents.push(id);\n } catch (err: any) {\n // if a component has an error, such as, missing main file, we do want to allow removing that component\n if (Component.isComponentInvalidByErrorType(err)) {\n nonModifiedComponents.push(id);\n } else {\n throw err;\n }\n }\n });\n }\n const idsToRemove = force ? bitIds : nonModifiedComponents;\n const componentsList = new ComponentsList(consumer);\n const newComponents = (await componentsList.listNewComponents(false)) as ComponentIdList;\n const idsToRemoveFromScope = ComponentIdList.fromArray(\n idsToRemove.filter((id) => !newComponents.hasWithoutVersion(id))\n );\n const idsToCleanFromWorkspace = ComponentIdList.fromArray(\n idsToRemove.filter((id) => newComponents.hasWithoutVersion(id))\n );\n const { components: componentsToRemove, invalidComponents } = await consumer.loadComponents(idsToRemove, false);\n const { removedComponentIds, missingComponents, dependentBits, removedFromLane } = await consumer.scope.removeMany(\n idsToRemoveFromScope,\n force,\n consumer\n );\n // otherwise, components should still be in .bitmap file\n idsToCleanFromWorkspace.push(...removedComponentIds);\n if (idsToCleanFromWorkspace.length) {\n if (deleteFiles) await deleteComponentsFiles(consumer, idsToCleanFromWorkspace);\n if (!track) {\n const invalidComponentsIds = invalidComponents.map((i) => i.id);\n const removedComponents = componentsToRemove.filter((c) => idsToCleanFromWorkspace.hasWithoutVersion(c.id));\n await packageJsonUtils.removeComponentsFromWorkspacesAndDependencies(\n consumer,\n removedComponents,\n invalidComponentsIds\n );\n await consumer.cleanFromBitMap(idsToCleanFromWorkspace);\n await workspace.cleanFromConfig(idsToCleanFromWorkspace);\n }\n }\n return new RemovedLocalObjects(\n ComponentIdList.uniqFromArray([...idsToCleanFromWorkspace, ...removedComponentIds]),\n missingComponents,\n modifiedComponents,\n dependentBits,\n removedFromLane\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAA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B,KAAK,CAACoD,UAAU,CAChHZ,oBAAoB,EACpBxE,KAAK,EACLwD,QACF,CAAC;EACD;EACAmB,uBAAuB,CAACZ,IAAI,CAAC,GAAGiB,mBAAmB,CAAC;EACpD,IAAIL,uBAAuB,CAACzD,MAAM,EAAE;IAClC,IAAIf,WAAW,EAAE,MAAM,IAAAkF,+BAAqB,EAAC7B,QAAQ,EAAEmB,uBAAuB,CAAC;IAC/E,IAAI,CAACzE,KAAK,EAAE;MACV,MAAMoF,oBAAoB,GAAGR,iBAAiB,CAACpE,GAAG,CAAEhB,CAAC,IAAKA,CAAC,CAACiB,EAAE,CAAC;MAC/D,MAAM4E,iBAAiB,GAAGV,kBAAkB,CAACJ,MAAM,CAAEe,CAAC,IAAKb,uBAAuB,CAACD,iBAAiB,CAACc,CAAC,CAAC7E,EAAE,CAAC,CAAC;MAC3G,MAAMvC,gBAAgB,CAAD,CAAC,CAACqH,6CAA6C,CAClEjC,QAAQ,EACR+B,iBAAiB,EACjBD,oBACF,CAAC;MACD,MAAM9B,QAAQ,CAACkC,eAAe,CAACf,uBAAuB,CAAC;MACvD,MAAM7E,SAAS,CAAC6F,eAAe,CAAChB,uBAAuB,CAAC;IAC1D;EACF;EACA,OAAO,KAAIjD,0CAAmB,EAC5BlB,8BAAe,CAACoF,aAAa,CAAC,CAAC,GAAGjB,uBAAuB,EAAE,GAAGK,mBAAmB,CAAC,CAAC,EACnFC,iBAAiB,EACjBxB,kBAAkB,EAClByB,aAAa,EACbC,eACF,CAAC;AACH","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_groupArray","data","_interopRequireDefault","require","_lodash","_componentId","_lodash2","_constants","_bitError","_enrichContextFromGlobal","_logger","_http","_remotes","_scopeRemotes","_deleteComponentFiles","_componentsList","_consumerComponent","packageJsonUtils","_interopRequireWildcard","_pMapSeries","_removedLocalObjects","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","obj","removeComponents","workspace","ids","force","remote","track","deleteFiles","logger","debugAndAddBreadCrumb","toString","bitIdsLatest","ComponentIdList","fromArray","map","id","changeVersion","LATEST_BIT_VERSION","localIds","remoteIds","partition","isLocal","length","BitError","join","remoteResult","isEmpty","removeRemote","localResult","removeLocal","RemovedLocalObjects","bitIds","groupedBitsByScope","groupArray","remotes","getScopeRemotes","scope","legacyScope","Remotes","getGlobalRemotes","shouldGoToCentralHub","keys","http","Http","connect","CENTRAL_BIT_HUB_URL","CENTRAL_BIT_HUB_NAME","deleteViaCentralHub","idsAreLanes","context","enrichContextFromGlobal","removeP","key","resolvedRemote","resolve","idsStr","toStringWithoutVersion","deleteMany","Promise","all","consumer","modifiedComponents","nonModifiedComponents","newIds","pMapSeries","componentStatus","getComponentStatusById","newlyCreated","push","modified","err","Component","isComponentInvalidByErrorType","list","listWithInvalid","components","forEach","c","hasWithoutVersion","aspectIds","state","aspects","used","find","newId","includes","idsToRemove","componentsList","ComponentsList","newComponents","listNewComponents","idsToRemoveFromScope","filter","idsToCleanFromWorkspace","componentsToRemove","invalidComponents","loadComponents","removedComponentIds","missingComponents","dependentBits","removedFromLane","removeMany","deleteComponentsFiles","invalidComponentsIds","removedComponents","removeComponentsFromWorkspacesAndDependencies","cleanFromBitMap","cleanFromConfig","uniqFromArray"],"sources":["remove-components.ts"],"sourcesContent":["import groupArray from 'group-array';\nimport partition from 'lodash.partition';\nimport { Workspace } from '@teambit/workspace';\nimport { ComponentIdList } from '@teambit/component-id';\nimport { isEmpty } from 'lodash';\nimport { CENTRAL_BIT_HUB_NAME, CENTRAL_BIT_HUB_URL, LATEST_BIT_VERSION } from '@teambit/legacy/dist/constants';\nimport { BitError } from '@teambit/bit-error';\nimport enrichContextFromGlobal from '@teambit/legacy/dist/hooks/utils/enrich-context-from-global';\nimport logger from '@teambit/legacy/dist/logger/logger';\nimport { Http } from '@teambit/legacy/dist/scope/network/http';\nimport { Remotes } from '@teambit/legacy/dist/remotes';\nimport { getScopeRemotes } from '@teambit/legacy/dist/scope/scope-remotes';\nimport deleteComponentsFiles from '@teambit/legacy/dist/consumer/component-ops/delete-component-files';\nimport ComponentsList from '@teambit/legacy/dist/consumer/component/components-list';\nimport Component from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport RemovedObjects from '@teambit/legacy/dist/scope/removed-components';\nimport * as packageJsonUtils from '@teambit/legacy/dist/consumer/component/package-json-utils';\nimport pMapSeries from 'p-map-series';\nimport { RemovedLocalObjects } from './removed-local-objects';\n\nexport type RemoveComponentsResult = { localResult: RemovedLocalObjects; remoteResult: RemovedObjects[] };\n\n/**\n * Remove components local and remote\n * splits array of ids into local and remote and removes according to flags\n * @param {string[]} ids - list of remote component ids to delete\n * @param {boolean} force - delete component that are used by other components.\n * @param {boolean} remote - delete component from a remote scope\n * @param {boolean} track - keep tracking local staged components in bitmap.\n * @param {boolean} deleteFiles - delete local added files from fs.\n */\nexport async function removeComponents({\n workspace,\n ids,\n force,\n remote,\n track,\n deleteFiles,\n}: {\n workspace?: Workspace; // when remote is false, it's always set\n ids: ComponentIdList;\n force: boolean;\n remote: boolean;\n track: boolean;\n deleteFiles: boolean;\n}): Promise<RemoveComponentsResult> {\n logger.debugAndAddBreadCrumb('removeComponents', `{ids}. force: ${force.toString()}`, { ids: ids.toString() });\n // added this to remove support for remove only one version from a component\n const bitIdsLatest = ComponentIdList.fromArray(\n ids.map((id) => {\n return id.changeVersion(LATEST_BIT_VERSION);\n })\n );\n const [localIds, remoteIds] = partition(bitIdsLatest, (id) => id.isLocal());\n if (remote && localIds.length) {\n throw new BitError(\n `unable to remove the remote components: ${localIds.join(',')} as they don't contain a scope-name`\n );\n }\n const remoteResult = remote && !isEmpty(remoteIds) ? await removeRemote(workspace, remoteIds, force) : [];\n const localResult = !remote\n ? await removeLocal(workspace as Workspace, bitIdsLatest, force, track, deleteFiles)\n : new RemovedLocalObjects();\n\n return { localResult, remoteResult };\n}\n\n/**\n * Remove remote component from the remote\n * this method groups remote components by remote name and deletes remote components together\n * @param {ComponentIdList} bitIds - list of remote component ids to delete\n * @param {boolean} force - delete component that are used by other components.\n */\nasync function removeRemote(\n workspace: Workspace | undefined,\n bitIds: ComponentIdList,\n force: boolean\n): Promise<RemovedObjects[]> {\n const groupedBitsByScope = groupArray(bitIds, 'scope');\n const remotes = workspace ? await getScopeRemotes(workspace.scope.legacyScope) : await Remotes.getGlobalRemotes();\n const shouldGoToCentralHub = remotes.shouldGoToCentralHub(Object.keys(groupedBitsByScope));\n if (shouldGoToCentralHub) {\n const http = await Http.connect(CENTRAL_BIT_HUB_URL, CENTRAL_BIT_HUB_NAME);\n return http.deleteViaCentralHub(\n bitIds.map((id) => id.toString()),\n { force, idsAreLanes: false }\n );\n }\n const context = {};\n enrichContextFromGlobal(context);\n const removeP = Object.keys(groupedBitsByScope).map(async (key) => {\n const resolvedRemote = await remotes.resolve(key, workspace?.scope.legacyScope);\n const idsStr = groupedBitsByScope[key].map((id) => id.toStringWithoutVersion());\n return resolvedRemote.deleteMany(idsStr, force, context);\n });\n\n return Promise.all(removeP);\n}\n\n/**\n * removeLocal - remove local (imported, new staged components) from modules and bitmap according to flags\n * @param {ComponentIdList} bitIds - list of component ids to delete\n * @param {boolean} force - delete component that are used by other components.\n * @param {boolean} deleteFiles - delete component that are used by other components.\n */\nasync function removeLocal(\n workspace: Workspace,\n bitIds: ComponentIdList,\n force: boolean,\n track: boolean,\n deleteFiles: boolean\n): Promise<RemovedLocalObjects> {\n const consumer = workspace.consumer;\n // local remove in case user wants to delete tagged components\n const modifiedComponents = new ComponentIdList();\n const nonModifiedComponents = new ComponentIdList();\n if (!bitIds.length) return new RemovedLocalObjects();\n if (!force) {\n const newIds: string[] = [];\n await pMapSeries(bitIds, async (id) => {\n try {\n const componentStatus = await workspace.getComponentStatusById(id);\n if (componentStatus.newlyCreated) newIds.push(id.toStringWithoutVersion());\n if (componentStatus.modified) modifiedComponents.push(id);\n else nonModifiedComponents.push(id);\n } catch (err: any) {\n // if a component has an error, such as, missing main file, we do want to allow removing that component\n if (Component.isComponentInvalidByErrorType(err)) {\n nonModifiedComponents.push(id);\n } else {\n throw err;\n }\n }\n });\n if (newIds.length) {\n const list = await workspace.listWithInvalid();\n list.components.forEach((c) => {\n if (bitIds.hasWithoutVersion(c.id)) return; // it gets deleted anyway\n const aspectIds = c.state.aspects.ids;\n const used = newIds.find((newId) => aspectIds.includes(newId));\n if (used)\n throw new BitError(`Unable to remove ${c.id.toStringWithoutVersion()}.\nThis component is 1) an aspect 2) is used by other components, such as \"${c.id.toStringWithoutVersion()}\" 3) it's a new component so it can't be installed as a package.\nRemoving this component from the workspace will disrupt the functionality of other components that depend on it, and resolving these issues may not be straightforward.\nIf you understand the risks and wish to proceed with the removal, please use the --force flag.\n`);\n });\n }\n }\n const idsToRemove = force ? bitIds : nonModifiedComponents;\n const componentsList = new ComponentsList(consumer);\n const newComponents = (await componentsList.listNewComponents(false)) as ComponentIdList;\n const idsToRemoveFromScope = ComponentIdList.fromArray(\n idsToRemove.filter((id) => !newComponents.hasWithoutVersion(id))\n );\n const idsToCleanFromWorkspace = ComponentIdList.fromArray(\n idsToRemove.filter((id) => newComponents.hasWithoutVersion(id))\n );\n const { components: componentsToRemove, invalidComponents } = await consumer.loadComponents(idsToRemove, false);\n const { removedComponentIds, missingComponents, dependentBits, removedFromLane } = await consumer.scope.removeMany(\n idsToRemoveFromScope,\n force,\n consumer\n );\n // otherwise, components should still be in .bitmap file\n idsToCleanFromWorkspace.push(...removedComponentIds);\n if (idsToCleanFromWorkspace.length) {\n if (deleteFiles) await deleteComponentsFiles(consumer, idsToCleanFromWorkspace);\n if (!track) {\n const invalidComponentsIds = invalidComponents.map((i) => i.id);\n const removedComponents = componentsToRemove.filter((c) => idsToCleanFromWorkspace.hasWithoutVersion(c.id));\n await packageJsonUtils.removeComponentsFromWorkspacesAndDependencies(\n consumer,\n removedComponents,\n invalidComponentsIds\n );\n await consumer.cleanFromBitMap(idsToCleanFromWorkspace);\n await workspace.cleanFromConfig(idsToCleanFromWorkspace);\n }\n }\n return new RemovedLocalObjects(\n ComponentIdList.uniqFromArray([...idsToCleanFromWorkspace, ...removedComponentIds]),\n missingComponents,\n modifiedComponents,\n dependentBits,\n removedFromLane\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,aAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,YAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,SAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,QAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,WAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,UAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,UAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,SAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,yBAAA;EAAA,MAAAR,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAM,wBAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,QAAA;EAAA,MAAAT,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAO,OAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA;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AACxB,KAAK,CAACiE,UAAU,CAChHV,oBAAoB,EACpBvF,KAAK,EACLwD,QACF,CAAC;EACD;EACAiC,uBAAuB,CAACzB,IAAI,CAAC,GAAG6B,mBAAmB,CAAC;EACpD,IAAIJ,uBAAuB,CAACvE,MAAM,EAAE;IAClC,IAAIf,WAAW,EAAE,MAAM,IAAA+F,+BAAqB,EAAC1C,QAAQ,EAAEiC,uBAAuB,CAAC;IAC/E,IAAI,CAACvF,KAAK,EAAE;MACV,MAAMiG,oBAAoB,GAAGR,iBAAiB,CAACjF,GAAG,CAAEhB,CAAC,IAAKA,CAAC,CAACiB,EAAE,CAAC;MAC/D,MAAMyF,iBAAiB,GAAGV,kBAAkB,CAACF,MAAM,CAAEf,CAAC,IAAKgB,uBAAuB,CAACf,iBAAiB,CAACD,CAAC,CAAC9D,EAAE,CAAC,CAAC;MAC3G,MAAMvC,gBAAgB,CAAD,CAAC,CAACiI,6CAA6C,CAClE7C,QAAQ,EACR4C,iBAAiB,EACjBD,oBACF,CAAC;MACD,MAAM3C,QAAQ,CAAC8C,eAAe,CAACb,uBAAuB,CAAC;MACvD,MAAM3F,SAAS,CAACyG,eAAe,CAACd,uBAAuB,CAAC;IAC1D;EACF;EACA,OAAO,KAAI/D,0CAAmB,EAC5BlB,8BAAe,CAACgG,aAAa,CAAC,CAAC,GAAGf,uBAAuB,EAAE,GAAGI,mBAAmB,CAAC,CAAC,EACnFC,iBAAiB,EACjBrC,kBAAkB,EAClBsC,aAAa,EACbC,eACF,CAAC;AACH","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/remove",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.254",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/component/remove",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "remove",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.254"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"@teambit/component-id": "1.2.0",
|
|
20
20
|
"@teambit/harmony": "0.4.6",
|
|
21
21
|
"@teambit/cli": "0.0.862",
|
|
22
|
-
"@teambit/workspace": "1.0.
|
|
23
|
-
"@teambit/component": "1.0.
|
|
22
|
+
"@teambit/workspace": "1.0.254",
|
|
23
|
+
"@teambit/component": "1.0.254",
|
|
24
24
|
"@teambit/component-issues": "0.0.147",
|
|
25
|
-
"@teambit/dependency-resolver": "1.0.
|
|
26
|
-
"@teambit/importer": "1.0.
|
|
27
|
-
"@teambit/issues": "1.0.
|
|
25
|
+
"@teambit/dependency-resolver": "1.0.254",
|
|
26
|
+
"@teambit/importer": "1.0.254",
|
|
27
|
+
"@teambit/issues": "1.0.254",
|
|
28
28
|
"@teambit/logger": "0.0.955"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
File without changes
|