@teambit/remove 1.0.590 → 1.0.594
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.
|
@@ -251,6 +251,7 @@ If you understand the risks and wish to proceed with the removal, please use the
|
|
|
251
251
|
await removeComponentsFromNodeModules(consumer, removedComponents);
|
|
252
252
|
await consumer.cleanFromBitMap(idsToCleanFromWorkspace);
|
|
253
253
|
await workspace.cleanFromConfig(idsToCleanFromWorkspace);
|
|
254
|
+
await workspace.removeFromStagedConfig(idsToCleanFromWorkspace);
|
|
254
255
|
}
|
|
255
256
|
}
|
|
256
257
|
return new (_removedLocalObjects().RemovedLocalObjects)(_componentId().ComponentIdList.uniqFromArray([...idsToCleanFromWorkspace, ...removedComponentIds]), missingComponents, modifiedComponents, dependentBits, removedFromLane);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_groupArray","_lodash","_componentId","_lodash2","_legacy","_bitError","_legacy2","_scope","_scope2","_deleteComponentFiles","_legacy3","_pMapSeries","_legacy4","_pkgModules","_removedLocalObjects","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","removeComponents","workspace","ids","force","remote","track","deleteFiles","logger","debugAndAddBreadCrumb","toString","bitIdsLatest","ComponentIdList","fromArray","map","id","changeVersion","LATEST_BIT_VERSION","localIds","remoteIds","partition","isLocal","BitError","join","remoteResult","isEmpty","removeRemote","localResult","removeLocal","RemovedLocalObjects","bitIds","groupedBitsByScope","groupArray","remotes","scope","getRemoteScopes","Remotes","getGlobalRemotes","shouldGoToCentralHub","http","Http","connect","CENTRAL_BIT_HUB_URL","CENTRAL_BIT_HUB_NAME","deleteViaCentralHub","idsAreLanes","context","removeP","key","resolvedRemote","resolve","idsStr","toStringWithoutVersion","deleteMany","Promise","all","consumer","modifiedComponents","nonModifiedComponents","newIds","pMapSeries","componentStatus","getComponentStatusById","newlyCreated","modified","err","ConsumerComponent","isComponentInvalidByErrorType","list","listWithInvalid","components","c","hasWithoutVersion","aspectIds","state","aspects","used","find","newId","includes","idsToRemove","componentsList","ComponentsList","newComponents","listNewComponents","idsToRemoveFromScope","idsToCleanFromWorkspace","componentsToRemove","loadComponents","removedComponentIds","missingComponents","dependentBits","removedFromLane","removeMany","deleteComponentsFiles","removedComponents","packageJson","removeComponentsFromDependencies","removeComponentsFromNodeModules","cleanFromBitMap","cleanFromConfig","uniqFromArray","debug","pathsToRemoveWithNulls","getNodeModulesPathOfComponent","pathsToRemove","compact","componentPath","fs","remove","toAbsolutePath"],"sources":["remove-components.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport groupArray from 'group-array';\nimport partition from 'lodash.partition';\nimport { Workspace } from '@teambit/workspace';\nimport { ComponentIdList } from '@teambit/component-id';\nimport { compact, isEmpty } from 'lodash';\nimport { CENTRAL_BIT_HUB_NAME, CENTRAL_BIT_HUB_URL, LATEST_BIT_VERSION } from '@teambit/legacy.constants';\nimport { BitError } from '@teambit/bit-error';\nimport { logger } from '@teambit/legacy.logger';\nimport { Http } from '@teambit/scope.network';\nimport { Remotes } from '@teambit/scope.remotes';\nimport { deleteComponentsFiles } from './delete-component-files';\nimport { ComponentsList } from '@teambit/legacy.component-list';\nimport { RemovedObjects } from '@teambit/legacy.scope';\nimport pMapSeries from 'p-map-series';\nimport { Consumer } from '@teambit/legacy.consumer';\nimport { ConsumerComponent } from '@teambit/legacy.consumer-component';\nimport { getNodeModulesPathOfComponent } from '@teambit/pkg.modules.component-package-name';\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 workspace.scope.getRemoteScopes() : 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 const removeP = Object.keys(groupedBitsByScope).map(async (key) => {\n const resolvedRemote = await remotes.resolve(key);\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 (ConsumerComponent.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(workspace);\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 } = 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 removedComponents = componentsToRemove.filter((c) => idsToCleanFromWorkspace.hasWithoutVersion(c.id));\n await consumer.packageJson.removeComponentsFromDependencies(removedComponents);\n await removeComponentsFromNodeModules(consumer, removedComponents);\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\nexport async function removeComponentsFromNodeModules(consumer: Consumer, components: ConsumerComponent[]) {\n logger.debug(`removeComponentsFromNodeModules: ${components.map((c) => c.id.toString()).join(', ')}`);\n const pathsToRemoveWithNulls = components.map((c) => {\n return getNodeModulesPathOfComponent({ ...c, id: c.id });\n });\n const pathsToRemove = compact(pathsToRemoveWithNulls);\n logger.debug(`deleting the following paths: ${pathsToRemove.join('\\n')}`);\n return Promise.all(pathsToRemove.map((componentPath) => fs.remove(consumer.toAbsolutePath(componentPath))));\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,SAAA;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AAC,IAAI,CAAC,EAAE,CAAC;EACrG,MAAMgF,sBAAsB,GAAGjC,UAAU,CAACxD,GAAG,CAAEyD,CAAC,IAAK;IACnD,OAAO,IAAAiC,2CAA6B,EAAA3H,aAAA,CAAAA,aAAA,KAAM0F,CAAC;MAAExD,EAAE,EAAEwD,CAAC,CAACxD;IAAE,EAAE,CAAC;EAC1D,CAAC,CAAC;EACF,MAAM0F,aAAa,GAAG,IAAAC,kBAAO,EAACH,sBAAsB,CAAC;EACrD/F,iBAAM,CAAC8F,KAAK,CAAC,iCAAiCG,aAAa,CAAClF,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;EACzE,OAAO+B,OAAO,CAACC,GAAG,CAACkD,aAAa,CAAC3F,GAAG,CAAE6F,aAAa,IAAKC,kBAAE,CAACC,MAAM,CAACrD,QAAQ,CAACsD,cAAc,CAACH,aAAa,CAAC,CAAC,CAAC,CAAC;AAC7G","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_groupArray","_lodash","_componentId","_lodash2","_legacy","_bitError","_legacy2","_scope","_scope2","_deleteComponentFiles","_legacy3","_pMapSeries","_legacy4","_pkgModules","_removedLocalObjects","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","removeComponents","workspace","ids","force","remote","track","deleteFiles","logger","debugAndAddBreadCrumb","toString","bitIdsLatest","ComponentIdList","fromArray","map","id","changeVersion","LATEST_BIT_VERSION","localIds","remoteIds","partition","isLocal","BitError","join","remoteResult","isEmpty","removeRemote","localResult","removeLocal","RemovedLocalObjects","bitIds","groupedBitsByScope","groupArray","remotes","scope","getRemoteScopes","Remotes","getGlobalRemotes","shouldGoToCentralHub","http","Http","connect","CENTRAL_BIT_HUB_URL","CENTRAL_BIT_HUB_NAME","deleteViaCentralHub","idsAreLanes","context","removeP","key","resolvedRemote","resolve","idsStr","toStringWithoutVersion","deleteMany","Promise","all","consumer","modifiedComponents","nonModifiedComponents","newIds","pMapSeries","componentStatus","getComponentStatusById","newlyCreated","modified","err","ConsumerComponent","isComponentInvalidByErrorType","list","listWithInvalid","components","c","hasWithoutVersion","aspectIds","state","aspects","used","find","newId","includes","idsToRemove","componentsList","ComponentsList","newComponents","listNewComponents","idsToRemoveFromScope","idsToCleanFromWorkspace","componentsToRemove","loadComponents","removedComponentIds","missingComponents","dependentBits","removedFromLane","removeMany","deleteComponentsFiles","removedComponents","packageJson","removeComponentsFromDependencies","removeComponentsFromNodeModules","cleanFromBitMap","cleanFromConfig","removeFromStagedConfig","uniqFromArray","debug","pathsToRemoveWithNulls","getNodeModulesPathOfComponent","pathsToRemove","compact","componentPath","fs","remove","toAbsolutePath"],"sources":["remove-components.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport groupArray from 'group-array';\nimport partition from 'lodash.partition';\nimport { Workspace } from '@teambit/workspace';\nimport { ComponentIdList } from '@teambit/component-id';\nimport { compact, isEmpty } from 'lodash';\nimport { CENTRAL_BIT_HUB_NAME, CENTRAL_BIT_HUB_URL, LATEST_BIT_VERSION } from '@teambit/legacy.constants';\nimport { BitError } from '@teambit/bit-error';\nimport { logger } from '@teambit/legacy.logger';\nimport { Http } from '@teambit/scope.network';\nimport { Remotes } from '@teambit/scope.remotes';\nimport { deleteComponentsFiles } from './delete-component-files';\nimport { ComponentsList } from '@teambit/legacy.component-list';\nimport { RemovedObjects } from '@teambit/legacy.scope';\nimport pMapSeries from 'p-map-series';\nimport { Consumer } from '@teambit/legacy.consumer';\nimport { ConsumerComponent } from '@teambit/legacy.consumer-component';\nimport { getNodeModulesPathOfComponent } from '@teambit/pkg.modules.component-package-name';\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 workspace.scope.getRemoteScopes() : 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 const removeP = Object.keys(groupedBitsByScope).map(async (key) => {\n const resolvedRemote = await remotes.resolve(key);\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 (ConsumerComponent.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(workspace);\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 } = 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 removedComponents = componentsToRemove.filter((c) => idsToCleanFromWorkspace.hasWithoutVersion(c.id));\n await consumer.packageJson.removeComponentsFromDependencies(removedComponents);\n await removeComponentsFromNodeModules(consumer, removedComponents);\n await consumer.cleanFromBitMap(idsToCleanFromWorkspace);\n await workspace.cleanFromConfig(idsToCleanFromWorkspace);\n await workspace.removeFromStagedConfig(idsToCleanFromWorkspace);\n }\n }\n return new RemovedLocalObjects(\n ComponentIdList.uniqFromArray([...idsToCleanFromWorkspace, ...removedComponentIds]),\n missingComponents,\n modifiedComponents,\n dependentBits,\n removedFromLane\n );\n}\n\nexport async function removeComponentsFromNodeModules(consumer: Consumer, components: ConsumerComponent[]) {\n logger.debug(`removeComponentsFromNodeModules: ${components.map((c) => c.id.toString()).join(', ')}`);\n const pathsToRemoveWithNulls = components.map((c) => {\n return getNodeModulesPathOfComponent({ ...c, id: c.id });\n });\n const pathsToRemove = compact(pathsToRemoveWithNulls);\n logger.debug(`deleting the following paths: ${pathsToRemove.join('\\n')}`);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+B,EAAE;EACzG9D,iBAAM,CAAC+F,KAAK,CAAC,oCAAoCjC,UAAU,CAACxD,GAAG,CAAEyD,CAAC,IAAKA,CAAC,CAACxD,EAAE,CAACL,QAAQ,CAAC,CAAC,CAAC,CAACa,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;EACrG,MAAMiF,sBAAsB,GAAGlC,UAAU,CAACxD,GAAG,CAAEyD,CAAC,IAAK;IACnD,OAAO,IAAAkC,2CAA6B,EAAA5H,aAAA,CAAAA,aAAA,KAAM0F,CAAC;MAAExD,EAAE,EAAEwD,CAAC,CAACxD;IAAE,EAAE,CAAC;EAC1D,CAAC,CAAC;EACF,MAAM2F,aAAa,GAAG,IAAAC,kBAAO,EAACH,sBAAsB,CAAC;EACrDhG,iBAAM,CAAC+F,KAAK,CAAC,iCAAiCG,aAAa,CAACnF,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;EACzE,OAAO+B,OAAO,CAACC,GAAG,CAACmD,aAAa,CAAC5F,GAAG,CAAE8F,aAAa,IAAKC,kBAAE,CAACC,MAAM,CAACtD,QAAQ,CAACuD,cAAc,CAACH,aAAa,CAAC,CAAC,CAAC,CAAC;AAC7G","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/remove",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.594",
|
|
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.594"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "4.1.2",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"@teambit/bit-error": "0.0.404",
|
|
21
21
|
"@teambit/component-id": "1.2.3",
|
|
22
22
|
"@teambit/harmony": "0.4.7",
|
|
23
|
-
"@teambit/cli": "0.0.
|
|
23
|
+
"@teambit/cli": "0.0.1171",
|
|
24
24
|
"@teambit/legacy.constants": "0.0.11",
|
|
25
25
|
"@teambit/legacy.scope": "0.0.47",
|
|
26
|
-
"@teambit/workspace": "1.0.
|
|
26
|
+
"@teambit/workspace": "1.0.594",
|
|
27
27
|
"@teambit/component.sources": "0.0.99",
|
|
28
28
|
"@teambit/legacy.consumer": "0.0.47",
|
|
29
29
|
"@teambit/legacy.logger": "0.0.17",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
"@teambit/pkg.modules.component-package-name": "0.0.54",
|
|
33
33
|
"@teambit/scope.network": "0.0.47",
|
|
34
34
|
"@teambit/scope.remotes": "0.0.47",
|
|
35
|
-
"@teambit/component": "1.0.
|
|
35
|
+
"@teambit/component": "1.0.594",
|
|
36
36
|
"@teambit/component-issues": "0.0.157",
|
|
37
|
-
"@teambit/dependency-resolver": "1.0.
|
|
38
|
-
"@teambit/importer": "1.0.
|
|
39
|
-
"@teambit/issues": "1.0.
|
|
37
|
+
"@teambit/dependency-resolver": "1.0.594",
|
|
38
|
+
"@teambit/importer": "1.0.594",
|
|
39
|
+
"@teambit/issues": "1.0.594",
|
|
40
40
|
"@teambit/legacy.utils": "0.0.19",
|
|
41
|
-
"@teambit/lister": "1.0.
|
|
42
|
-
"@teambit/logger": "0.0.
|
|
43
|
-
"@teambit/scope": "1.0.
|
|
41
|
+
"@teambit/lister": "1.0.594",
|
|
42
|
+
"@teambit/logger": "0.0.1264",
|
|
43
|
+
"@teambit/scope": "1.0.594"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/fs-extra": "9.0.7",
|
|
File without changes
|