@teambit/snapping 1.0.922 → 1.0.924
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.
- package/dist/snap-cmd.js +24 -21
- package/dist/snap-cmd.js.map +1 -1
- package/dist/snapping.main.runtime.d.ts +3 -1
- package/dist/snapping.main.runtime.js +5 -1
- package/dist/snapping.main.runtime.js.map +1 -1
- package/dist/snapping.spec.js +34 -0
- package/dist/snapping.spec.js.map +1 -1
- package/dist/tag-cmd.js +38 -39
- package/dist/tag-cmd.js.map +1 -1
- package/dist/version-maker.d.ts +2 -0
- package/dist/version-maker.js +8 -3
- package/dist/version-maker.js.map +1 -1
- package/package.json +33 -33
- /package/dist/{preview-1774552192320.js → preview-1774645620266.js} +0 -0
package/dist/snapping.spec.js
CHANGED
|
@@ -225,6 +225,40 @@ describe('Snapping aspect', function () {
|
|
|
225
225
|
await (0, _workspaceTesting().destroyWorkspace)(workspaceData);
|
|
226
226
|
});
|
|
227
227
|
});
|
|
228
|
+
describe('batchId', () => {
|
|
229
|
+
let workspaceData;
|
|
230
|
+
after(async () => {
|
|
231
|
+
if (workspaceData) await (0, _workspaceTesting().destroyWorkspace)(workspaceData);
|
|
232
|
+
});
|
|
233
|
+
it('should assign the same batchId to all components snapped together', async () => {
|
|
234
|
+
workspaceData = (0, _workspaceTesting().mockWorkspace)();
|
|
235
|
+
const {
|
|
236
|
+
workspacePath
|
|
237
|
+
} = workspaceData;
|
|
238
|
+
await (0, _componentTesting().mockComponents)(workspacePath, {
|
|
239
|
+
numOfComponents: 3
|
|
240
|
+
});
|
|
241
|
+
const harmony = await (0, _harmonyTesting().loadManyAspects)([_snapping().SnappingAspect, _scope().ScopeAspect], workspacePath);
|
|
242
|
+
const snapping = harmony.get(_snapping().SnappingAspect.id);
|
|
243
|
+
const scope = harmony.get(_scope().ScopeAspect.id);
|
|
244
|
+
const results = await snapping.snap({
|
|
245
|
+
build: false,
|
|
246
|
+
message: 'snap multiple'
|
|
247
|
+
});
|
|
248
|
+
(0, _chai().expect)(results).to.not.be.null;
|
|
249
|
+
(0, _chai().expect)(results.snappedComponents).to.have.lengthOf(3);
|
|
250
|
+
const versionObjects = await Promise.all(results.snappedComponents.map(async comp => {
|
|
251
|
+
const snapHash = comp.id.version;
|
|
252
|
+
return await scope.legacyScope.objects.load(_objects().Ref.from(snapHash));
|
|
253
|
+
}));
|
|
254
|
+
const batchIds = versionObjects.map(v => v.batchId);
|
|
255
|
+
// all should be defined
|
|
256
|
+
batchIds.forEach(id => (0, _chai().expect)(id).to.be.a('string').and.not.be.empty);
|
|
257
|
+
// all should be the same UUID
|
|
258
|
+
(0, _chai().expect)(batchIds[0]).to.equal(batchIds[1]);
|
|
259
|
+
(0, _chai().expect)(batchIds[1]).to.equal(batchIds[2]);
|
|
260
|
+
});
|
|
261
|
+
});
|
|
228
262
|
describe('local-only', () => {
|
|
229
263
|
let harmony;
|
|
230
264
|
let workspace;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chai","data","require","_fsExtra","_interopRequireDefault","_path","_harmonyTesting","_workspaceTesting","_issues","_scope","_export","_compiler","_objects","_componentTesting","_snapping","_workspace","e","__esModule","default","describe","timeout","workspaceData","snapping","before","mockWorkspace","workspacePath","console","log","mockComponents","fs","writeFile","path","join","compiler","loadAspect","CompilerAspect","compileOnWorkspace","SnappingAspect","it","tag","ids","err","expect","constructor","name","to","equal","skip","setWorkspaceConfig","IssuesAspect","id","ignoreIssues","results","taggedComponents","length","after","destroyWorkspace","snappedId","harmonyBareScope","harmony","loadManyAspects","ExportAspect","get","snap","pattern","build","message","exportMain","export","bareScope","mockBareScope","remoteScopePath","ScopeAspect","scopePath","snappingScope","snapDataPerComp","componentId","remoteScopeName","newDependencies","version","isComponent","type","snapFromScope","snappedIds","snapHash","scope","versionObj","legacyScope","objects","load","Ref","from","devPackages","Object","keys","devPackageDependencies","include","numOfComponents","removeDependencies","dependencies","have","lengthOf","workspace","WorkspaceAspect","comp1Id","idsByPattern","setLocalOnly","list","listLocalOnly","toString","tagResults","taggedNames","map","c","not","unmodified","snappedComponents","autoTaggedResults","component","comp2Id","fail"],"sources":["snapping.spec.ts"],"sourcesContent":["import { expect } from 'chai';\nimport fs from 'fs-extra';\nimport path from 'path';\nimport type { Harmony } from '@teambit/harmony';\nimport { loadAspect, loadManyAspects } from '@teambit/harmony.testing.load-aspect';\nimport type { WorkspaceData } from '@teambit/workspace.testing.mock-workspace';\nimport {\n mockWorkspace,\n mockBareScope,\n destroyWorkspace,\n setWorkspaceConfig,\n} from '@teambit/workspace.testing.mock-workspace';\nimport { IssuesAspect } from '@teambit/issues';\nimport type { ScopeMain } from '@teambit/scope';\nimport { ScopeAspect } from '@teambit/scope';\nimport type { ExportMain } from '@teambit/export';\nimport { ExportAspect } from '@teambit/export';\nimport type { CompilerMain } from '@teambit/compiler';\nimport { CompilerAspect } from '@teambit/compiler';\nimport type { ComponentID } from '@teambit/component-id';\nimport type { Version } from '@teambit/objects';\nimport { Ref } from '@teambit/objects';\nimport { mockComponents } from '@teambit/component.testing.mock-components';\nimport type { SnapDataPerCompRaw, SnappingMain } from './snapping.main.runtime';\nimport { SnappingAspect } from './snapping.aspect';\nimport type { Workspace } from '@teambit/workspace';\nimport { WorkspaceAspect } from '@teambit/workspace';\n\ndescribe('Snapping aspect', function () {\n this.timeout(0);\n\n describe('components with issues', () => {\n let workspaceData: WorkspaceData;\n let snapping: SnappingMain;\n before(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n // eslint-disable-next-line no-console\n console.log('workspace created at ', workspacePath);\n await mockComponents(workspacePath);\n await fs.writeFile(path.join(workspacePath, 'comp1/index.js'), `const nonExist = require(\"non-exist\");`);\n const compiler: CompilerMain = await loadAspect(CompilerAspect, workspacePath);\n await compiler.compileOnWorkspace();\n snapping = await loadAspect(SnappingAspect, workspacePath);\n });\n it('tag should throw an ComponentsHaveIssues error', async () => {\n try {\n await snapping.tag({ ids: ['comp1'] });\n } catch (err: any) {\n expect(err.constructor.name).to.equal('ComponentsHaveIssues');\n }\n });\n // @todo: this test fails during \"bit build\" for some reason. It passes on \"bit test\";\n it.skip('should not throw an error if the config was set to ignore MissingPackagesDependenciesOnFs error', async () => {\n await setWorkspaceConfig(workspaceData.workspacePath, IssuesAspect.id, {\n ignoreIssues: ['MissingPackagesDependenciesOnFs'],\n });\n snapping = await loadAspect(SnappingAspect, workspaceData.workspacePath);\n const results = await snapping.tag({ ids: ['comp1'] });\n expect(results?.taggedComponents.length).to.equal(1);\n });\n after(async () => {\n await destroyWorkspace(workspaceData);\n });\n });\n describe('snap from scope an existing component with newDependencies prop populated', () => {\n let workspaceData: WorkspaceData;\n let snappedId: ComponentID;\n let harmonyBareScope: Harmony;\n before(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath);\n const harmony = await loadManyAspects([SnappingAspect, ExportAspect], workspacePath);\n const snapping = harmony.get<SnappingMain>(SnappingAspect.id);\n await snapping.snap({ pattern: 'comp1', build: false, message: 'first snap' });\n const exportMain = harmony.get<ExportMain>(ExportAspect.id);\n await exportMain.export();\n\n const bareScope = mockBareScope(workspaceData.remoteScopePath, 'bare-for-snap');\n harmonyBareScope = await loadManyAspects([SnappingAspect, ScopeAspect], bareScope.scopePath);\n const snappingScope = harmonyBareScope.get<SnappingMain>(SnappingAspect.id);\n const snapDataPerComp: SnapDataPerCompRaw[] = [\n {\n componentId: `${workspaceData.remoteScopeName}/comp1`,\n message: 'snap from scope',\n newDependencies: [\n {\n id: 'lodash',\n version: '4.1.2',\n isComponent: false,\n type: 'dev',\n },\n ],\n },\n ];\n const results = await snappingScope.snapFromScope(snapDataPerComp, {});\n\n snappedId = results.snappedIds[0];\n });\n it('should add the new dev dep', async () => {\n const snapHash = snappedId.version;\n const scope = harmonyBareScope.get<ScopeMain>(ScopeAspect.id);\n const versionObj = (await scope.legacyScope.objects.load(Ref.from(snapHash))) as Version;\n const devPackages = Object.keys(versionObj.devPackageDependencies);\n expect(devPackages).to.include('lodash');\n\n // also, it should not delete other dev-deps that were there before.\n expect(devPackages).to.include('@types/node');\n });\n after(async () => {\n await destroyWorkspace(workspaceData);\n });\n });\n describe('snap from scope - remove existing dependency', () => {\n let workspaceData: WorkspaceData;\n let snappedId: ComponentID;\n let harmonyBareScope: Harmony;\n before(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath, { numOfComponents: 2 });\n const harmony = await loadManyAspects([SnappingAspect, ExportAspect], workspacePath);\n const snapping = harmony.get<SnappingMain>(SnappingAspect.id);\n await snapping.snap({ build: false, message: 'first snap' });\n const exportMain = harmony.get<ExportMain>(ExportAspect.id);\n await exportMain.export();\n\n const bareScope = mockBareScope(workspaceData.remoteScopePath, 'bare-for-snap');\n harmonyBareScope = await loadManyAspects([SnappingAspect, ScopeAspect], bareScope.scopePath);\n const snappingScope = harmonyBareScope.get<SnappingMain>(SnappingAspect.id);\n const snapDataPerComp: SnapDataPerCompRaw[] = [\n {\n componentId: `${workspaceData.remoteScopeName}/comp1`,\n message: 'snap from scope',\n removeDependencies: [`${workspaceData.remoteScopeName}/comp2`],\n },\n ];\n // console.log('snapDataPerComp', JSON.stringify(snapDataPerComp));\n const results = await snappingScope.snapFromScope(snapDataPerComp, {});\n\n snappedId = results.snappedIds[0];\n });\n it('should remove the specified dependency', async () => {\n const snapHash = snappedId.version;\n const scope = harmonyBareScope.get<ScopeMain>(ScopeAspect.id);\n const versionObj = (await scope.legacyScope.objects.load(Ref.from(snapHash))) as Version;\n expect(versionObj.dependencies.get()).to.have.lengthOf(0);\n });\n after(async () => {\n await destroyWorkspace(workspaceData);\n });\n });\n describe('local-only', () => {\n let harmony: Harmony;\n let workspace: Workspace;\n let workspaceData: WorkspaceData;\n before(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath, { numOfComponents: 3 });\n harmony = await loadManyAspects([WorkspaceAspect, SnappingAspect], workspacePath);\n workspace = harmony.get<Workspace>(WorkspaceAspect.id);\n const comp1Id = await workspace.idsByPattern('comp1');\n await workspace.setLocalOnly(comp1Id);\n });\n after(async () => {\n await destroyWorkspace(workspaceData);\n });\n it('should be able to list it', async () => {\n const list = workspace.listLocalOnly();\n expect(list).to.have.lengthOf(1);\n expect(list[0].toString()).to.include('comp1');\n });\n it('should be ignored by tag command', async () => {\n const snapping = harmony.get<SnappingMain>(SnappingAspect.id);\n const tagResults = await snapping.tag({});\n expect(tagResults?.taggedComponents).to.have.lengthOf(2);\n const taggedNames = tagResults?.taggedComponents.map((c) => c.name);\n expect(taggedNames).to.not.include('comp1');\n });\n it('should be ignored by snap command', async () => {\n const snapping = harmony.get<SnappingMain>(SnappingAspect.id);\n const tagResults = await snapping.snap({ unmodified: true });\n expect(tagResults?.snappedComponents).to.have.lengthOf(2);\n const taggedNames = tagResults?.snappedComponents.map((c) => c.name);\n expect(taggedNames).to.not.include('comp1');\n });\n it('should be ignored when it is an auto-tag candidate', async () => {\n const snapping = harmony.get<SnappingMain>(SnappingAspect.id);\n await snapping.tag({ unmodified: true });\n const tagResults = await snapping.tag({ ids: ['comp3'], unmodified: true });\n expect(tagResults?.autoTaggedResults).to.have.lengthOf(1); // only comp3 should be auto-tagged\n const taggedNames = tagResults?.autoTaggedResults.map((c) => c.component.name);\n expect(taggedNames).to.not.include('comp1');\n });\n it('should block setting local-only when a component is staged', async () => {\n const snapping = harmony.get<SnappingMain>(SnappingAspect.id);\n await snapping.tag({ unmodified: true });\n const comp2Id = await workspace.idsByPattern('comp2');\n try {\n await workspace.setLocalOnly(comp2Id);\n expect.fail('should have thrown an error');\n } catch (err: any) {\n expect(err.message).to.include('unable to set the following component(s) as local-only');\n }\n });\n });\n});\n"],"mappings":";;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,S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AU,EAAE;MAAK,CAAC,CAAC;MAC3E,IAAAzE,cAAM,EAACoE,UAAU,EAAEO,iBAAiB,CAAC,CAACxE,EAAE,CAACuD,IAAI,CAACC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;MAC3D,MAAMU,WAAW,GAAGD,UAAU,EAAEO,iBAAiB,CAACL,GAAG,CAAEC,CAAC,IAAKA,CAAC,CAACK,SAAS,CAAC1E,IAAI,CAAC;MAC9E,IAAAF,cAAM,EAACqE,WAAW,CAAC,CAAClE,EAAE,CAACqE,GAAG,CAAClB,OAAO,CAAC,OAAO,CAAC;IAC7C,CAAC,CAAC;IACF1D,EAAE,CAAC,4DAA4D,EAAE,YAAY;MAC3E,MAAMhB,QAAQ,GAAGqC,OAAO,CAACG,GAAG,CAAezB,0BAAc,CAACa,EAAE,CAAC;MAC7D,MAAM5B,QAAQ,CAACiB,GAAG,CAAC;QAAE4E,UAAU,EAAE;MAAK,CAAC,CAAC;MACxC,MAAMI,OAAO,GAAG,MAAMjB,SAAS,CAACG,YAAY,CAAC,OAAO,CAAC;MACrD,IAAI;QACF,MAAMH,SAAS,CAACI,YAAY,CAACa,OAAO,CAAC;QACrC7E,cAAM,CAAC8E,IAAI,CAAC,6BAA6B,CAAC;MAC5C,CAAC,CAAC,OAAO/E,GAAQ,EAAE;QACjB,IAAAC,cAAM,EAACD,GAAG,CAACyB,OAAO,CAAC,CAACrB,EAAE,CAACmD,OAAO,CAAC,wDAAwD,CAAC;MAC1F;IACF,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_chai","data","require","_fsExtra","_interopRequireDefault","_path","_harmonyTesting","_workspaceTesting","_issues","_scope","_export","_compiler","_objects","_componentTesting","_snapping","_workspace","e","__esModule","default","describe","timeout","workspaceData","snapping","before","mockWorkspace","workspacePath","console","log","mockComponents","fs","writeFile","path","join","compiler","loadAspect","CompilerAspect","compileOnWorkspace","SnappingAspect","it","tag","ids","err","expect","constructor","name","to","equal","skip","setWorkspaceConfig","IssuesAspect","id","ignoreIssues","results","taggedComponents","length","after","destroyWorkspace","snappedId","harmonyBareScope","harmony","loadManyAspects","ExportAspect","get","snap","pattern","build","message","exportMain","export","bareScope","mockBareScope","remoteScopePath","ScopeAspect","scopePath","snappingScope","snapDataPerComp","componentId","remoteScopeName","newDependencies","version","isComponent","type","snapFromScope","snappedIds","snapHash","scope","versionObj","legacyScope","objects","load","Ref","from","devPackages","Object","keys","devPackageDependencies","include","numOfComponents","removeDependencies","dependencies","have","lengthOf","not","be","null","snappedComponents","versionObjects","Promise","all","map","comp","batchIds","v","batchId","forEach","a","and","empty","workspace","WorkspaceAspect","comp1Id","idsByPattern","setLocalOnly","list","listLocalOnly","toString","tagResults","taggedNames","c","unmodified","autoTaggedResults","component","comp2Id","fail"],"sources":["snapping.spec.ts"],"sourcesContent":["import { expect } from 'chai';\nimport fs from 'fs-extra';\nimport path from 'path';\nimport type { Harmony } from '@teambit/harmony';\nimport { loadAspect, loadManyAspects } from '@teambit/harmony.testing.load-aspect';\nimport type { WorkspaceData } from '@teambit/workspace.testing.mock-workspace';\nimport {\n mockWorkspace,\n mockBareScope,\n destroyWorkspace,\n setWorkspaceConfig,\n} from '@teambit/workspace.testing.mock-workspace';\nimport { IssuesAspect } from '@teambit/issues';\nimport type { ScopeMain } from '@teambit/scope';\nimport { ScopeAspect } from '@teambit/scope';\nimport type { ExportMain } from '@teambit/export';\nimport { ExportAspect } from '@teambit/export';\nimport type { CompilerMain } from '@teambit/compiler';\nimport { CompilerAspect } from '@teambit/compiler';\nimport type { ComponentID } from '@teambit/component-id';\nimport type { Version } from '@teambit/objects';\nimport { Ref } from '@teambit/objects';\nimport { mockComponents } from '@teambit/component.testing.mock-components';\nimport type { SnapDataPerCompRaw, SnappingMain } from './snapping.main.runtime';\nimport { SnappingAspect } from './snapping.aspect';\nimport type { Workspace } from '@teambit/workspace';\nimport { WorkspaceAspect } from '@teambit/workspace';\n\ndescribe('Snapping aspect', function () {\n this.timeout(0);\n\n describe('components with issues', () => {\n let workspaceData: WorkspaceData;\n let snapping: SnappingMain;\n before(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n // eslint-disable-next-line no-console\n console.log('workspace created at ', workspacePath);\n await mockComponents(workspacePath);\n await fs.writeFile(path.join(workspacePath, 'comp1/index.js'), `const nonExist = require(\"non-exist\");`);\n const compiler: CompilerMain = await loadAspect(CompilerAspect, workspacePath);\n await compiler.compileOnWorkspace();\n snapping = await loadAspect(SnappingAspect, workspacePath);\n });\n it('tag should throw an ComponentsHaveIssues error', async () => {\n try {\n await snapping.tag({ ids: ['comp1'] });\n } catch (err: any) {\n expect(err.constructor.name).to.equal('ComponentsHaveIssues');\n }\n });\n // @todo: this test fails during \"bit build\" for some reason. It passes on \"bit test\";\n it.skip('should not throw an error if the config was set to ignore MissingPackagesDependenciesOnFs error', async () => {\n await setWorkspaceConfig(workspaceData.workspacePath, IssuesAspect.id, {\n ignoreIssues: ['MissingPackagesDependenciesOnFs'],\n });\n snapping = await loadAspect(SnappingAspect, workspaceData.workspacePath);\n const results = await snapping.tag({ ids: ['comp1'] });\n expect(results?.taggedComponents.length).to.equal(1);\n });\n after(async () => {\n await destroyWorkspace(workspaceData);\n });\n });\n describe('snap from scope an existing component with newDependencies prop populated', () => {\n let workspaceData: WorkspaceData;\n let snappedId: ComponentID;\n let harmonyBareScope: Harmony;\n before(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath);\n const harmony = await loadManyAspects([SnappingAspect, ExportAspect], workspacePath);\n const snapping = harmony.get<SnappingMain>(SnappingAspect.id);\n await snapping.snap({ pattern: 'comp1', build: false, message: 'first snap' });\n const exportMain = harmony.get<ExportMain>(ExportAspect.id);\n await exportMain.export();\n\n const bareScope = mockBareScope(workspaceData.remoteScopePath, 'bare-for-snap');\n harmonyBareScope = await loadManyAspects([SnappingAspect, ScopeAspect], bareScope.scopePath);\n const snappingScope = harmonyBareScope.get<SnappingMain>(SnappingAspect.id);\n const snapDataPerComp: SnapDataPerCompRaw[] = [\n {\n componentId: `${workspaceData.remoteScopeName}/comp1`,\n message: 'snap from scope',\n newDependencies: [\n {\n id: 'lodash',\n version: '4.1.2',\n isComponent: false,\n type: 'dev',\n },\n ],\n },\n ];\n const results = await snappingScope.snapFromScope(snapDataPerComp, {});\n\n snappedId = results.snappedIds[0];\n });\n it('should add the new dev dep', async () => {\n const snapHash = snappedId.version;\n const scope = harmonyBareScope.get<ScopeMain>(ScopeAspect.id);\n const versionObj = (await scope.legacyScope.objects.load(Ref.from(snapHash))) as Version;\n const devPackages = Object.keys(versionObj.devPackageDependencies);\n expect(devPackages).to.include('lodash');\n\n // also, it should not delete other dev-deps that were there before.\n expect(devPackages).to.include('@types/node');\n });\n after(async () => {\n await destroyWorkspace(workspaceData);\n });\n });\n describe('snap from scope - remove existing dependency', () => {\n let workspaceData: WorkspaceData;\n let snappedId: ComponentID;\n let harmonyBareScope: Harmony;\n before(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath, { numOfComponents: 2 });\n const harmony = await loadManyAspects([SnappingAspect, ExportAspect], workspacePath);\n const snapping = harmony.get<SnappingMain>(SnappingAspect.id);\n await snapping.snap({ build: false, message: 'first snap' });\n const exportMain = harmony.get<ExportMain>(ExportAspect.id);\n await exportMain.export();\n\n const bareScope = mockBareScope(workspaceData.remoteScopePath, 'bare-for-snap');\n harmonyBareScope = await loadManyAspects([SnappingAspect, ScopeAspect], bareScope.scopePath);\n const snappingScope = harmonyBareScope.get<SnappingMain>(SnappingAspect.id);\n const snapDataPerComp: SnapDataPerCompRaw[] = [\n {\n componentId: `${workspaceData.remoteScopeName}/comp1`,\n message: 'snap from scope',\n removeDependencies: [`${workspaceData.remoteScopeName}/comp2`],\n },\n ];\n // console.log('snapDataPerComp', JSON.stringify(snapDataPerComp));\n const results = await snappingScope.snapFromScope(snapDataPerComp, {});\n\n snappedId = results.snappedIds[0];\n });\n it('should remove the specified dependency', async () => {\n const snapHash = snappedId.version;\n const scope = harmonyBareScope.get<ScopeMain>(ScopeAspect.id);\n const versionObj = (await scope.legacyScope.objects.load(Ref.from(snapHash))) as Version;\n expect(versionObj.dependencies.get()).to.have.lengthOf(0);\n });\n after(async () => {\n await destroyWorkspace(workspaceData);\n });\n });\n describe('batchId', () => {\n let workspaceData: WorkspaceData | undefined;\n after(async () => {\n if (workspaceData) await destroyWorkspace(workspaceData);\n });\n it('should assign the same batchId to all components snapped together', async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath, { numOfComponents: 3 });\n const harmony = await loadManyAspects([SnappingAspect, ScopeAspect], workspacePath);\n const snapping = harmony.get<SnappingMain>(SnappingAspect.id);\n const scope = harmony.get<ScopeMain>(ScopeAspect.id);\n const results = await snapping.snap({ build: false, message: 'snap multiple' });\n expect(results).to.not.be.null;\n expect(results!.snappedComponents).to.have.lengthOf(3);\n\n const versionObjects = await Promise.all(\n results!.snappedComponents.map(async (comp) => {\n const snapHash = comp.id.version!;\n return (await scope.legacyScope.objects.load(Ref.from(snapHash))) as Version;\n })\n );\n\n const batchIds = versionObjects.map((v) => v.batchId);\n // all should be defined\n batchIds.forEach((id) => expect(id).to.be.a('string').and.not.be.empty);\n // all should be the same UUID\n expect(batchIds[0]).to.equal(batchIds[1]);\n expect(batchIds[1]).to.equal(batchIds[2]);\n });\n });\n describe('local-only', () => {\n let harmony: Harmony;\n let workspace: Workspace;\n let workspaceData: WorkspaceData;\n before(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath, { numOfComponents: 3 });\n harmony = await loadManyAspects([WorkspaceAspect, SnappingAspect], workspacePath);\n workspace = harmony.get<Workspace>(WorkspaceAspect.id);\n const comp1Id = await workspace.idsByPattern('comp1');\n await workspace.setLocalOnly(comp1Id);\n });\n after(async () => {\n await destroyWorkspace(workspaceData);\n });\n it('should be able to list it', async () => {\n const list = workspace.listLocalOnly();\n expect(list).to.have.lengthOf(1);\n expect(list[0].toString()).to.include('comp1');\n });\n it('should be ignored by tag command', async () => {\n const snapping = harmony.get<SnappingMain>(SnappingAspect.id);\n const tagResults = await snapping.tag({});\n expect(tagResults?.taggedComponents).to.have.lengthOf(2);\n const taggedNames = tagResults?.taggedComponents.map((c) => c.name);\n expect(taggedNames).to.not.include('comp1');\n });\n it('should be ignored by snap command', async () => {\n const snapping = harmony.get<SnappingMain>(SnappingAspect.id);\n const tagResults = await snapping.snap({ unmodified: true });\n expect(tagResults?.snappedComponents).to.have.lengthOf(2);\n const taggedNames = tagResults?.snappedComponents.map((c) => c.name);\n expect(taggedNames).to.not.include('comp1');\n });\n it('should be ignored when it is an auto-tag candidate', async () => {\n const snapping = harmony.get<SnappingMain>(SnappingAspect.id);\n await snapping.tag({ unmodified: true });\n const tagResults = await snapping.tag({ ids: ['comp3'], unmodified: true });\n expect(tagResults?.autoTaggedResults).to.have.lengthOf(1); // only comp3 should be auto-tagged\n const taggedNames = tagResults?.autoTaggedResults.map((c) => c.component.name);\n expect(taggedNames).to.not.include('comp1');\n });\n it('should block setting local-only when a component is staged', async () => {\n const snapping = harmony.get<SnappingMain>(SnappingAspect.id);\n await snapping.tag({ unmodified: true });\n const comp2Id = await workspace.idsByPattern('comp2');\n try {\n await workspace.setLocalOnly(comp2Id);\n expect.fail('should have thrown an error');\n } catch (err: any) {\n expect(err.message).to.include('unable to set the following component(s) as local-only');\n }\n });\n });\n});\n"],"mappings":";;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,SAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,S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OAAO,CAAC;QACrC1F,cAAM,CAAC2F,IAAI,CAAC,6BAA6B,CAAC;MAC5C,CAAC,CAAC,OAAO5F,GAAQ,EAAE;QACjB,IAAAC,cAAM,EAACD,GAAG,CAACyB,OAAO,CAAC,CAACrB,EAAE,CAACmD,OAAO,CAAC,wDAAwD,CAAC;MAC1F;IACF,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
package/dist/tag-cmd.js
CHANGED
|
@@ -15,6 +15,13 @@ function _chalk() {
|
|
|
15
15
|
};
|
|
16
16
|
return data;
|
|
17
17
|
}
|
|
18
|
+
function _cli() {
|
|
19
|
+
const data = require("@teambit/cli");
|
|
20
|
+
_cli = function () {
|
|
21
|
+
return data;
|
|
22
|
+
};
|
|
23
|
+
return data;
|
|
24
|
+
}
|
|
18
25
|
function _legacy() {
|
|
19
26
|
const data = require("@teambit/legacy.constants");
|
|
20
27
|
_legacy = function () {
|
|
@@ -211,58 +218,50 @@ function tagResultOutput(results) {
|
|
|
211
218
|
const addedComponents = taggedComponents.filter(component => newComponents.searchWithoutVersion(component.id));
|
|
212
219
|
const autoTaggedCount = autoTaggedResults ? autoTaggedResults.length : 0;
|
|
213
220
|
const totalCount = totalComponentsCount ?? taggedComponents.length + autoTaggedCount;
|
|
214
|
-
const warningsOutput = warnings && warnings.length ? `${_chalk().default.yellow(warnings.join('\n'))}\n\n` : '';
|
|
215
|
-
const tagExplanationPersist = exportedIds ? '' : `\n(use "bit export" to push these components to a remote")
|
|
216
|
-
(use "bit reset" to unstage versions)`;
|
|
217
|
-
const tagExplanationSoft = `\n(use "bit tag --persist" to persist the soft-tagged changes as a fully tagged version")
|
|
218
|
-
(use "bit reset --soft" to remove the soft-tags)`;
|
|
219
|
-
const tagExplanation = results.isSoftTag ? tagExplanationSoft : tagExplanationPersist;
|
|
220
221
|
const compInBold = id => {
|
|
221
222
|
const version = id.hasVersion() ? `@${id.version}` : '';
|
|
222
223
|
return `${_chalk().default.bold(id.toStringWithoutVersion())}${version}`;
|
|
223
224
|
};
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
}
|
|
233
|
-
return componentOutput;
|
|
234
|
-
}).join('\n');
|
|
225
|
+
const formatComp = component => {
|
|
226
|
+
let output = (0, _cli().formatItem)(compInBold(component.id));
|
|
227
|
+
const autoTag = autoTaggedResults.filter(result => result.triggeredBy.searchWithoutVersion(component.id));
|
|
228
|
+
if (autoTag.length) {
|
|
229
|
+
const autoTagComp = autoTag.map(a => compInBold(a.component.id));
|
|
230
|
+
output += `\n ${AUTO_TAGGED_MSG}:\n ${autoTagComp.join('\n ')}`;
|
|
231
|
+
}
|
|
232
|
+
return output;
|
|
235
233
|
};
|
|
236
|
-
const
|
|
234
|
+
const softTagPrefix = results.isSoftTag ? 'soft-tagged ' : '';
|
|
235
|
+
const newDesc = results.isSoftTag ? 'set to be tagged with first version for components when persisted' : 'first version for components';
|
|
236
|
+
const changedDesc = results.isSoftTag ? 'components that are set to get a version bump when persisted' : 'components that got a version bump';
|
|
237
|
+
const newSection = (0, _cli().formatSection)(softTagPrefix + 'new components', newDesc, addedComponents.map(formatComp));
|
|
238
|
+
const changedSection = (0, _cli().formatSection)(softTagPrefix + 'changed components', changedDesc, changedComponents.map(formatComp));
|
|
239
|
+
const removedSection = outputIdsIfExists('removed components', removedComponents);
|
|
240
|
+
const publishSection = (() => {
|
|
237
241
|
const {
|
|
238
242
|
publishedPackages
|
|
239
243
|
} = results;
|
|
240
244
|
if (!publishedPackages || !publishedPackages.length) return '';
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
};
|
|
246
|
-
const exportedOutput = () => {
|
|
245
|
+
const items = publishedPackages.map(pkg => (0, _cli().formatItem)(pkg));
|
|
246
|
+
return (0, _cli().formatSection)('published components', '', items);
|
|
247
|
+
})();
|
|
248
|
+
const exportedSection = (() => {
|
|
247
249
|
if (!exportedIds) return '';
|
|
248
|
-
if (!exportedIds.length) return
|
|
249
|
-
const
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
};
|
|
253
|
-
const
|
|
254
|
-
const
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
const newDesc = results.isSoftTag ? 'set to be tagged with first version for components when persisted' : 'first version for components';
|
|
259
|
-
const changedDesc = results.isSoftTag ? 'components that are set to get a version bump when persisted' : 'components that got a version bump';
|
|
260
|
-
const softTagClarification = results.isSoftTag ? _chalk().default.bold('\nkeep in mind that this is a soft-tag (changes recorded to be tagged), to persist the changes use --persist flag') : '';
|
|
261
|
-
return outputIfExists('new components', newDesc, addedComponents) + outputIfExists('changed components', changedDesc, changedComponents) + outputIdsIfExists('removed components', removedComponents) + publishOutput() + exportedOutput() + warningsOutput + _chalk().default.green(`\n${totalCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged${exportedIds ? ' and exported' : ''}`) + tagExplanation + softTagClarification;
|
|
250
|
+
if (!exportedIds.length) return `${_cli().warnSymbol} ${_chalk().default.yellow('no component has been exported')}`;
|
|
251
|
+
const items = exportedIds.map(id => (0, _cli().formatItem)(compInBold(id)));
|
|
252
|
+
return (0, _cli().formatSection)('exported components', '', items);
|
|
253
|
+
})();
|
|
254
|
+
const warningsSection = warnings && warnings.length ? warnings.map(w => `${_cli().warnSymbol} ${_chalk().default.yellow(w)}`).join('\n') : '';
|
|
255
|
+
const summaryMsg = `${totalCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged${exportedIds ? ' and exported' : ''}`;
|
|
256
|
+
const summary = (0, _cli().formatSuccessSummary)(summaryMsg);
|
|
257
|
+
const tagExplanation = results.isSoftTag ? (0, _cli().formatHint)('(use "bit tag --persist" to persist the soft-tagged changes as a fully tagged version)\n(use "bit reset --soft" to remove the soft-tags)') : exportedIds ? '' : (0, _cli().formatHint)('(use "bit export" to push these components to a remote)\n(use "bit reset" to unstage versions)');
|
|
258
|
+
const softTagClarification = results.isSoftTag ? _chalk().default.bold('keep in mind that this is a soft-tag (changes recorded to be tagged), to persist the changes use --persist flag') : '';
|
|
259
|
+
return (0, _cli().joinSections)([newSection, changedSection, removedSection, publishSection, exportedSection, warningsSection, [summary, tagExplanation, softTagClarification].filter(Boolean).join('\n')]);
|
|
262
260
|
}
|
|
263
261
|
function outputIdsIfExists(label, ids) {
|
|
264
262
|
if (!ids?.length) return '';
|
|
265
|
-
|
|
263
|
+
const items = ids.map(id => (0, _cli().formatItem)(id.toStringWithoutVersion(), _cli().warnSymbol));
|
|
264
|
+
return (0, _cli().formatSection)(label, '', items);
|
|
266
265
|
}
|
|
267
266
|
|
|
268
267
|
//# sourceMappingURL=tag-cmd.js.map
|
package/dist/tag-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_legacy","_componentIssues","_bitError","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","NOTHING_TO_TAG_MSG","exports","AUTO_TAGGED_MSG","RELEASE_TYPES","tagCmdOptions","join","keys","IssuesClasses","TagCmd","constructor","snapping","logger","configStore","name","description","COMPONENT_PATTERN_HELP","cmd","report","patterns","options","message","ver","editor","versionsFile","snapped","unmerged","ignoreIssues","ignoreNewestVersion","skipTests","skipTasks","skipAutoTag","unmodified","soft","persist","disableTagPipeline","ignoreBuildErrors","rebuildDepsGraph","failFast","incrementBy","detachHead","loose","consoleWarning","releaseType","preReleaseId","validateOptions","disableTagAndSnapPipelines","build","getConfigBoolean","CFG_FORCE_LOCAL_BUILD","Boolean","BitError","params","ids","version","results","tag","chalk","yellow","tagResultOutput","patch","minor","major","preRelease","increment","prereleaseId","releaseFlags","filter","x","length","getReleaseType","includes","DEFAULT_BIT_RELEASE_TYPE","getPreReleaseId","undefined","taggedComponents","autoTaggedResults","warnings","newComponents","removedComponents","exportedIds","totalComponentsCount","changedComponents","component","searchWithoutVersion","id","addedComponents","autoTaggedCount","totalCount","warningsOutput","tagExplanationPersist","tagExplanationSoft","tagExplanation","isSoftTag","compInBold","hasVersion","bold","toStringWithoutVersion","outputComponents","comps","map","componentOutput","autoTag","result","triggeredBy","autoTagComp","a","publishOutput","publishedPackages","successTitle","green","successCompsStr","successOutput","exportedOutput","title","underline","softTagPrefix","outputIfExists","label","explanation","components","newDesc","changedDesc","softTagClarification","outputIdsIfExists"],"sources":["tag-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport type { Command, CommandOptions } from '@teambit/cli';\nimport type { ConsumerComponent } from '@teambit/legacy.consumer-component';\nimport { DEFAULT_BIT_RELEASE_TYPE, COMPONENT_PATTERN_HELP, CFG_FORCE_LOCAL_BUILD } from '@teambit/legacy.constants';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport type { ReleaseType } from 'semver';\nimport { BitError } from '@teambit/bit-error';\nimport type { Logger } from '@teambit/logger';\nimport type { TagResults, SnappingMain } from './snapping.main.runtime';\nimport type { BasicTagParams } from './version-maker';\nimport type { ConfigStoreMain } from '@teambit/config-store';\n\nexport const NOTHING_TO_TAG_MSG = 'nothing to tag';\nexport const AUTO_TAGGED_MSG = 'auto-tagged dependents';\n\nconst RELEASE_TYPES = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];\n\nexport const tagCmdOptions = [\n ['m', 'message <message>', 'a log message describing latest changes'],\n ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are tagged)'],\n [\n '',\n 'editor [editor]',\n 'open an editor to write a tag message for each component. optionally, specify the editor-name (defaults to vim).',\n ],\n ['', 'versions-file <path>', 'path to a file containing component versions. format: \"component-id: version\"'],\n ['v', 'ver <version>', 'tag with the given version'],\n ['l', 'increment <level>', `options are: [${RELEASE_TYPES.join(', ')}], default to patch`],\n ['', 'prerelease-id <id>', 'prerelease identifier (e.g. \"dev\" to get \"1.0.0-dev.1\")'],\n ['p', 'patch', 'syntactic sugar for \"--increment patch\"'],\n ['', 'minor', 'syntactic sugar for \"--increment minor\"'],\n ['', 'major', 'syntactic sugar for \"--increment major\"'],\n ['', 'pre-release [identifier]', 'syntactic sugar for \"--increment prerelease\" and `--prerelease-id <identifier>`'],\n ['', 'snapped', 'tag only components whose head is a snap (not a tag)'],\n ['', 'unmerged', 'complete a merge process by tagging the unmerged components'],\n ['', 'skip-tests', 'skip running component tests during tag process'],\n [\n '',\n 'skip-tasks <string>',\n `skip the given tasks. for multiple tasks, separate by a comma and wrap with quotes.\nspecify the task-name (e.g. \"TypescriptCompiler\") or the task-aspect-id (e.g. teambit.compilation/compiler)`,\n ],\n ['', 'skip-auto-tag', 'skip auto tagging dependents'],\n ['', 'soft', 'do not persist. only keep note of the changes to be made'],\n [\n '',\n 'persist [skip-build]',\n 'persist the changes generated by --soft tag. by default, run the build pipeline, unless \"skip-build\" is provided',\n ],\n ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'],\n ['', 'ignore-build-errors', 'proceed to tag pipeline even when build pipeline fails'],\n ['', 'rebuild-deps-graph', 'do not reuse the saved dependencies graph, instead build it from scratch'],\n [\n '',\n 'increment-by <number>',\n '(default to 1) increment semver flag (patch/minor/major) by. e.g. incrementing patch by 2: 0.0.1 -> 0.0.3.',\n ],\n [\n 'i',\n 'ignore-issues <issues>',\n `ignore component issues (shown in \"bit status\" as \"issues found\"), issues to ignore:\n[${Object.keys(IssuesClasses).join(', ')}]\nto ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify \"*\".`,\n ],\n ['I', 'ignore-newest-version', 'allow tagging even when the component has newer versions e.g. for hotfixes.'],\n [\n '',\n 'fail-fast',\n 'stop pipeline execution on the first failed task (by default a task is skipped only when its dependency failed)',\n ],\n ['b', 'build', 'locally run the build pipeline (i.e. not via rippleCI) and complete the tag'],\n ['', 'loose', 'allow tag --build to succeed even if tasks like tests or lint fail'],\n [\n '',\n 'detach-head',\n 'UNSUPPORTED YET. in case a component is checked out to an older version, tag it without changing the head',\n ],\n] as CommandOptions;\n\nexport type TagParams = {\n snapped?: boolean;\n unmerged?: boolean;\n ver?: string;\n patch?: boolean;\n minor?: boolean;\n major?: boolean;\n increment?: ReleaseType;\n preRelease?: string;\n prereleaseId?: string;\n ignoreUnresolvedDependencies?: boolean;\n ignoreIssues?: string;\n incrementBy?: number;\n failFast?: boolean;\n disableTagPipeline?: boolean;\n loose?: boolean;\n versionsFile?: string;\n} & Partial<BasicTagParams>;\n\nexport class TagCmd implements Command {\n name = 'tag [component-patterns...]';\n group = 'version-control';\n description = 'create immutable component snapshots with semantic version tags';\n extendedDescription = `creates tagged versions using semantic versioning (semver) for component releases. tags are immutable and exportable.\nby default tags all new and modified components. supports version specification per pattern using \"@\" (e.g. foo@1.0.0, bar@minor).\nuse for official releases. for development versions, use 'bit snap' instead.`;\n arguments = [\n {\n name: 'component-patterns...',\n description: `${COMPONENT_PATTERN_HELP}. By default, all new and modified are tagged.`,\n },\n ];\n helpUrl = 'reference/components/snaps#create-a-tag-(release-version)';\n alias = 't';\n loader = true;\n options = tagCmdOptions;\n remoteOp = true; // In case a compiler / tester is not installed\n examples = [{ cmd: 'tag --ver 1.0.0', description: 'tag all components to version 1.0.0' }];\n\n constructor(\n private snapping: SnappingMain,\n private logger: Logger,\n private configStore: ConfigStoreMain\n ) {}\n\n // eslint-disable-next-line complexity\n async report([patterns = []]: [string[]], options: TagParams): Promise<string> {\n const {\n message = '',\n ver,\n editor = '',\n versionsFile,\n snapped = false,\n unmerged = false,\n ignoreIssues,\n ignoreNewestVersion = false,\n skipTests = false,\n skipTasks,\n skipAutoTag = false,\n unmodified = false,\n soft = false,\n persist = false,\n disableTagPipeline = false,\n ignoreBuildErrors = false,\n rebuildDepsGraph,\n failFast = false,\n incrementBy = 1,\n detachHead,\n loose = false,\n } = options;\n\n if (!message && !persist && !editor) {\n this.logger.consoleWarning(\n `--message will be mandatory in the next few releases. make sure to add a message with your tag`\n );\n }\n const { releaseType, preReleaseId } = validateOptions(options);\n\n const disableTagAndSnapPipelines = disableTagPipeline;\n let build = options.build;\n build = this.configStore.getConfigBoolean(CFG_FORCE_LOCAL_BUILD) || Boolean(build);\n if (persist) {\n if (persist === true) build = true;\n else if (persist === 'skip-build') build = false;\n else throw new BitError(`unknown value for --persist, use either --persist or --persist=skip-build`);\n }\n if (!build && !soft) {\n this.logger.consoleWarning(\n `tagging components on \"main\" lane when using remote build is not recommended. To avoid SemVer versions of your component with failing builds, please refer to:\n- Snap changes in a different lane and merge to \"main\" on your remote (learn more on lanes - https://bit.dev/reference/lanes/getting-started-with-lanes)\n- Use \\`bit tag --build\\` to build your components locally.\n- Use \\`snap\\` or \\`build\\` first to validate your build passing, and then version and export safely.\n\nTo undo local tag use the \"bit reset\" command.`\n );\n }\n\n const params = {\n ids: patterns,\n snapped,\n unmerged,\n editor,\n versionsFile,\n message,\n releaseType,\n preReleaseId,\n ignoreIssues,\n ignoreNewestVersion,\n skipTests,\n skipTasks,\n skipAutoTag,\n build,\n soft,\n persist,\n unmodified,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n rebuildDepsGraph,\n incrementBy,\n version: ver,\n failFast,\n detachHead,\n loose,\n };\n\n const results = await this.snapping.tag(params);\n if (!results) return chalk.yellow(persist ? 'no soft-tag found' : NOTHING_TO_TAG_MSG);\n return tagResultOutput(results);\n }\n}\n\nexport function validateOptions(options: TagParams) {\n const { patch, minor, major, preRelease, increment, prereleaseId } = options;\n if (prereleaseId && (!increment || increment === 'major' || increment === 'minor' || increment === 'patch')) {\n throw new BitError(\n `--prerelease-id should be entered along with --increment flag, while --increment must be one of the following: [prepatch, prerelease, preminor, premajor]`\n );\n }\n\n const releaseFlags = [patch, minor, major, preRelease].filter((x) => x);\n if (releaseFlags.length > 1) {\n throw new BitError('you can use only one of the following - patch, minor, major, pre-release');\n }\n\n const getReleaseType = (): ReleaseType => {\n if (increment) {\n if (!RELEASE_TYPES.includes(increment)) {\n throw new BitError(`invalid increment-level \"${increment}\".\nsemver allows the following options only: ${RELEASE_TYPES.join(', ')}`);\n }\n return increment;\n }\n if (major) return 'major';\n if (minor) return 'minor';\n if (patch) return 'patch';\n if (preRelease) return 'prerelease';\n return DEFAULT_BIT_RELEASE_TYPE;\n };\n const getPreReleaseId = (): string | undefined => {\n if (prereleaseId) {\n return prereleaseId;\n }\n if (preRelease && typeof preRelease === 'string') {\n return preRelease;\n }\n return undefined;\n };\n\n return {\n releaseType: getReleaseType(),\n preReleaseId: getPreReleaseId(),\n };\n}\n\nexport function tagResultOutput(results: TagResults): string {\n const {\n taggedComponents,\n autoTaggedResults,\n warnings,\n newComponents,\n removedComponents,\n exportedIds,\n totalComponentsCount,\n }: TagResults = results;\n const changedComponents = taggedComponents.filter((component) => !newComponents.searchWithoutVersion(component.id));\n const addedComponents = taggedComponents.filter((component) => newComponents.searchWithoutVersion(component.id));\n const autoTaggedCount = autoTaggedResults ? autoTaggedResults.length : 0;\n const totalCount = totalComponentsCount ?? taggedComponents.length + autoTaggedCount;\n\n const warningsOutput = warnings && warnings.length ? `${chalk.yellow(warnings.join('\\n'))}\\n\\n` : '';\n const tagExplanationPersist = exportedIds\n ? ''\n : `\\n(use \"bit export\" to push these components to a remote\")\n(use \"bit reset\" to unstage versions)`;\n const tagExplanationSoft = `\\n(use \"bit tag --persist\" to persist the soft-tagged changes as a fully tagged version\")\n(use \"bit reset --soft\" to remove the soft-tags)`;\n\n const tagExplanation = results.isSoftTag ? tagExplanationSoft : tagExplanationPersist;\n\n const compInBold = (id: ComponentID) => {\n const version = id.hasVersion() ? `@${id.version}` : '';\n return `${chalk.bold(id.toStringWithoutVersion())}${version}`;\n };\n\n const outputComponents = (comps: ConsumerComponent[]) => {\n return comps\n .map((component) => {\n let componentOutput = ` > ${compInBold(component.id)}`;\n const autoTag = autoTaggedResults.filter((result) => result.triggeredBy.searchWithoutVersion(component.id));\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => compInBold(a.component.id));\n componentOutput += `\\n ${AUTO_TAGGED_MSG}:\n ${autoTagComp.join('\\n ')}`;\n }\n return componentOutput;\n })\n .join('\\n');\n };\n\n const publishOutput = () => {\n const { publishedPackages } = results;\n if (!publishedPackages || !publishedPackages.length) return '';\n const successTitle = `\\n\\n${chalk.green(\n `published the following ${publishedPackages.length} component(s) successfully\\n`\n )}`;\n const successCompsStr = publishedPackages.join('\\n');\n const successOutput = successCompsStr ? successTitle + successCompsStr : '';\n return successOutput;\n };\n\n const exportedOutput = () => {\n if (!exportedIds) return '';\n if (!exportedIds.length) return `\\n${chalk.yellow('no component has been exported')}\\n`;\n const title = `\\n${chalk.underline('exported components')}\\n`;\n const ids = exportedIds.map((id) => ` > ${compInBold(id)}`).join('\\n');\n return `${title}${ids}\\n`;\n };\n\n const softTagPrefix = results.isSoftTag ? 'soft-tagged ' : '';\n const outputIfExists = (label: string, explanation: string, components: ConsumerComponent[]) => {\n if (!components.length) return '';\n return `\\n${chalk.underline(softTagPrefix + label)}\\n(${explanation})\\n${outputComponents(components)}\\n`;\n };\n\n const newDesc = results.isSoftTag\n ? 'set to be tagged with first version for components when persisted'\n : 'first version for components';\n const changedDesc = results.isSoftTag\n ? 'components that are set to get a version bump when persisted'\n : 'components that got a version bump';\n const softTagClarification = results.isSoftTag\n ? chalk.bold(\n '\\nkeep in mind that this is a soft-tag (changes recorded to be tagged), to persist the changes use --persist flag'\n )\n : '';\n return (\n outputIfExists('new components', newDesc, addedComponents) +\n outputIfExists('changed components', changedDesc, changedComponents) +\n outputIdsIfExists('removed components', removedComponents) +\n publishOutput() +\n exportedOutput() +\n warningsOutput +\n chalk.green(\n `\\n${totalCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged${exportedIds ? ' and exported' : ''}`\n ) +\n tagExplanation +\n softTagClarification\n );\n}\n\nexport function outputIdsIfExists(label: string, ids?: ComponentIdList) {\n if (!ids?.length) return '';\n return `\\n${chalk.underline(label)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AAoB;AAExB;AAEO,SAASC,iBAAiBA,CAACN,KAAa,EAAEjE,GAAqB,EAAE;EACtE,IAAI,CAACA,GAAG,EAAEgB,MAAM,EAAE,OAAO,EAAE;EAC3B,OAAO,KAAKZ,gBAAK,CAAC0D,SAAS,CAACG,KAAK,CAAC,KAAKjE,GAAG,CAAC+C,GAAG,CAAEf,EAAE,IAAKA,EAAE,CAACY,sBAAsB,CAAC,CAAC,CAAC,CAAC3F,IAAI,CAAC,IAAI,CAAC,IAAI;AACpG","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_cli","_legacy","_componentIssues","_bitError","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","NOTHING_TO_TAG_MSG","exports","AUTO_TAGGED_MSG","RELEASE_TYPES","tagCmdOptions","join","keys","IssuesClasses","TagCmd","constructor","snapping","logger","configStore","name","description","COMPONENT_PATTERN_HELP","cmd","report","patterns","options","message","ver","editor","versionsFile","snapped","unmerged","ignoreIssues","ignoreNewestVersion","skipTests","skipTasks","skipAutoTag","unmodified","soft","persist","disableTagPipeline","ignoreBuildErrors","rebuildDepsGraph","failFast","incrementBy","detachHead","loose","consoleWarning","releaseType","preReleaseId","validateOptions","disableTagAndSnapPipelines","build","getConfigBoolean","CFG_FORCE_LOCAL_BUILD","Boolean","BitError","params","ids","version","results","tag","chalk","yellow","tagResultOutput","patch","minor","major","preRelease","increment","prereleaseId","releaseFlags","filter","x","length","getReleaseType","includes","DEFAULT_BIT_RELEASE_TYPE","getPreReleaseId","undefined","taggedComponents","autoTaggedResults","warnings","newComponents","removedComponents","exportedIds","totalComponentsCount","changedComponents","component","searchWithoutVersion","id","addedComponents","autoTaggedCount","totalCount","compInBold","hasVersion","bold","toStringWithoutVersion","formatComp","output","formatItem","autoTag","result","triggeredBy","autoTagComp","map","a","softTagPrefix","isSoftTag","newDesc","changedDesc","newSection","formatSection","changedSection","removedSection","outputIdsIfExists","publishSection","publishedPackages","items","pkg","exportedSection","warnSymbol","warningsSection","w","summaryMsg","summary","formatSuccessSummary","tagExplanation","formatHint","softTagClarification","joinSections","label"],"sources":["tag-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport type { Command, CommandOptions } from '@teambit/cli';\nimport { formatItem, formatSection, formatHint, formatSuccessSummary, warnSymbol, joinSections } from '@teambit/cli';\nimport type { ConsumerComponent } from '@teambit/legacy.consumer-component';\nimport { DEFAULT_BIT_RELEASE_TYPE, COMPONENT_PATTERN_HELP, CFG_FORCE_LOCAL_BUILD } from '@teambit/legacy.constants';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport type { ReleaseType } from 'semver';\nimport { BitError } from '@teambit/bit-error';\nimport type { Logger } from '@teambit/logger';\nimport type { TagResults, SnappingMain } from './snapping.main.runtime';\nimport type { BasicTagParams } from './version-maker';\nimport type { ConfigStoreMain } from '@teambit/config-store';\n\nexport const NOTHING_TO_TAG_MSG = 'nothing to tag';\nexport const AUTO_TAGGED_MSG = 'auto-tagged dependents';\n\nconst RELEASE_TYPES = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];\n\nexport const tagCmdOptions = [\n ['m', 'message <message>', 'a log message describing latest changes'],\n ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are tagged)'],\n [\n '',\n 'editor [editor]',\n 'open an editor to write a tag message for each component. optionally, specify the editor-name (defaults to vim).',\n ],\n ['', 'versions-file <path>', 'path to a file containing component versions. format: \"component-id: version\"'],\n ['v', 'ver <version>', 'tag with the given version'],\n ['l', 'increment <level>', `options are: [${RELEASE_TYPES.join(', ')}], default to patch`],\n ['', 'prerelease-id <id>', 'prerelease identifier (e.g. \"dev\" to get \"1.0.0-dev.1\")'],\n ['p', 'patch', 'syntactic sugar for \"--increment patch\"'],\n ['', 'minor', 'syntactic sugar for \"--increment minor\"'],\n ['', 'major', 'syntactic sugar for \"--increment major\"'],\n ['', 'pre-release [identifier]', 'syntactic sugar for \"--increment prerelease\" and `--prerelease-id <identifier>`'],\n ['', 'snapped', 'tag only components whose head is a snap (not a tag)'],\n ['', 'unmerged', 'complete a merge process by tagging the unmerged components'],\n ['', 'skip-tests', 'skip running component tests during tag process'],\n [\n '',\n 'skip-tasks <string>',\n `skip the given tasks. for multiple tasks, separate by a comma and wrap with quotes.\nspecify the task-name (e.g. \"TypescriptCompiler\") or the task-aspect-id (e.g. teambit.compilation/compiler)`,\n ],\n ['', 'skip-auto-tag', 'skip auto tagging dependents'],\n ['', 'soft', 'do not persist. only keep note of the changes to be made'],\n [\n '',\n 'persist [skip-build]',\n 'persist the changes generated by --soft tag. by default, run the build pipeline, unless \"skip-build\" is provided',\n ],\n ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'],\n ['', 'ignore-build-errors', 'proceed to tag pipeline even when build pipeline fails'],\n ['', 'rebuild-deps-graph', 'do not reuse the saved dependencies graph, instead build it from scratch'],\n [\n '',\n 'increment-by <number>',\n '(default to 1) increment semver flag (patch/minor/major) by. e.g. incrementing patch by 2: 0.0.1 -> 0.0.3.',\n ],\n [\n 'i',\n 'ignore-issues <issues>',\n `ignore component issues (shown in \"bit status\" as \"issues found\"), issues to ignore:\n[${Object.keys(IssuesClasses).join(', ')}]\nto ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify \"*\".`,\n ],\n ['I', 'ignore-newest-version', 'allow tagging even when the component has newer versions e.g. for hotfixes.'],\n [\n '',\n 'fail-fast',\n 'stop pipeline execution on the first failed task (by default a task is skipped only when its dependency failed)',\n ],\n ['b', 'build', 'locally run the build pipeline (i.e. not via rippleCI) and complete the tag'],\n ['', 'loose', 'allow tag --build to succeed even if tasks like tests or lint fail'],\n [\n '',\n 'detach-head',\n 'UNSUPPORTED YET. in case a component is checked out to an older version, tag it without changing the head',\n ],\n] as CommandOptions;\n\nexport type TagParams = {\n snapped?: boolean;\n unmerged?: boolean;\n ver?: string;\n patch?: boolean;\n minor?: boolean;\n major?: boolean;\n increment?: ReleaseType;\n preRelease?: string;\n prereleaseId?: string;\n ignoreUnresolvedDependencies?: boolean;\n ignoreIssues?: string;\n incrementBy?: number;\n failFast?: boolean;\n disableTagPipeline?: boolean;\n loose?: boolean;\n versionsFile?: string;\n} & Partial<BasicTagParams>;\n\nexport class TagCmd implements Command {\n name = 'tag [component-patterns...]';\n group = 'version-control';\n description = 'create immutable component snapshots with semantic version tags';\n extendedDescription = `creates tagged versions using semantic versioning (semver) for component releases. tags are immutable and exportable.\nby default tags all new and modified components. supports version specification per pattern using \"@\" (e.g. foo@1.0.0, bar@minor).\nuse for official releases. for development versions, use 'bit snap' instead.`;\n arguments = [\n {\n name: 'component-patterns...',\n description: `${COMPONENT_PATTERN_HELP}. By default, all new and modified are tagged.`,\n },\n ];\n helpUrl = 'reference/components/snaps#create-a-tag-(release-version)';\n alias = 't';\n loader = true;\n options = tagCmdOptions;\n remoteOp = true; // In case a compiler / tester is not installed\n examples = [{ cmd: 'tag --ver 1.0.0', description: 'tag all components to version 1.0.0' }];\n\n constructor(\n private snapping: SnappingMain,\n private logger: Logger,\n private configStore: ConfigStoreMain\n ) {}\n\n // eslint-disable-next-line complexity\n async report([patterns = []]: [string[]], options: TagParams): Promise<string> {\n const {\n message = '',\n ver,\n editor = '',\n versionsFile,\n snapped = false,\n unmerged = false,\n ignoreIssues,\n ignoreNewestVersion = false,\n skipTests = false,\n skipTasks,\n skipAutoTag = false,\n unmodified = false,\n soft = false,\n persist = false,\n disableTagPipeline = false,\n ignoreBuildErrors = false,\n rebuildDepsGraph,\n failFast = false,\n incrementBy = 1,\n detachHead,\n loose = false,\n } = options;\n\n if (!message && !persist && !editor) {\n this.logger.consoleWarning(\n `--message will be mandatory in the next few releases. make sure to add a message with your tag`\n );\n }\n const { releaseType, preReleaseId } = validateOptions(options);\n\n const disableTagAndSnapPipelines = disableTagPipeline;\n let build = options.build;\n build = this.configStore.getConfigBoolean(CFG_FORCE_LOCAL_BUILD) || Boolean(build);\n if (persist) {\n if (persist === true) build = true;\n else if (persist === 'skip-build') build = false;\n else throw new BitError(`unknown value for --persist, use either --persist or --persist=skip-build`);\n }\n if (!build && !soft) {\n this.logger.consoleWarning(\n `tagging components on \"main\" lane when using remote build is not recommended. To avoid SemVer versions of your component with failing builds, please refer to:\n- Snap changes in a different lane and merge to \"main\" on your remote (learn more on lanes - https://bit.dev/reference/lanes/getting-started-with-lanes)\n- Use \\`bit tag --build\\` to build your components locally.\n- Use \\`snap\\` or \\`build\\` first to validate your build passing, and then version and export safely.\n\nTo undo local tag use the \"bit reset\" command.`\n );\n }\n\n const params = {\n ids: patterns,\n snapped,\n unmerged,\n editor,\n versionsFile,\n message,\n releaseType,\n preReleaseId,\n ignoreIssues,\n ignoreNewestVersion,\n skipTests,\n skipTasks,\n skipAutoTag,\n build,\n soft,\n persist,\n unmodified,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n rebuildDepsGraph,\n incrementBy,\n version: ver,\n failFast,\n detachHead,\n loose,\n };\n\n const results = await this.snapping.tag(params);\n if (!results) return chalk.yellow(persist ? 'no soft-tag found' : NOTHING_TO_TAG_MSG);\n return tagResultOutput(results);\n }\n}\n\nexport function validateOptions(options: TagParams) {\n const { patch, minor, major, preRelease, increment, prereleaseId } = options;\n if (prereleaseId && (!increment || increment === 'major' || increment === 'minor' || increment === 'patch')) {\n throw new BitError(\n `--prerelease-id should be entered along with --increment flag, while --increment must be one of the following: [prepatch, prerelease, preminor, premajor]`\n );\n }\n\n const releaseFlags = [patch, minor, major, preRelease].filter((x) => x);\n if (releaseFlags.length > 1) {\n throw new BitError('you can use only one of the following - patch, minor, major, pre-release');\n }\n\n const getReleaseType = (): ReleaseType => {\n if (increment) {\n if (!RELEASE_TYPES.includes(increment)) {\n throw new BitError(`invalid increment-level \"${increment}\".\nsemver allows the following options only: ${RELEASE_TYPES.join(', ')}`);\n }\n return increment;\n }\n if (major) return 'major';\n if (minor) return 'minor';\n if (patch) return 'patch';\n if (preRelease) return 'prerelease';\n return DEFAULT_BIT_RELEASE_TYPE;\n };\n const getPreReleaseId = (): string | undefined => {\n if (prereleaseId) {\n return prereleaseId;\n }\n if (preRelease && typeof preRelease === 'string') {\n return preRelease;\n }\n return undefined;\n };\n\n return {\n releaseType: getReleaseType(),\n preReleaseId: getPreReleaseId(),\n };\n}\n\nexport function tagResultOutput(results: TagResults): string {\n const {\n taggedComponents,\n autoTaggedResults,\n warnings,\n newComponents,\n removedComponents,\n exportedIds,\n totalComponentsCount,\n }: TagResults = results;\n const changedComponents = taggedComponents.filter((component) => !newComponents.searchWithoutVersion(component.id));\n const addedComponents = taggedComponents.filter((component) => newComponents.searchWithoutVersion(component.id));\n const autoTaggedCount = autoTaggedResults ? autoTaggedResults.length : 0;\n const totalCount = totalComponentsCount ?? taggedComponents.length + autoTaggedCount;\n\n const compInBold = (id: ComponentID) => {\n const version = id.hasVersion() ? `@${id.version}` : '';\n return `${chalk.bold(id.toStringWithoutVersion())}${version}`;\n };\n\n const formatComp = (component: ConsumerComponent): string => {\n let output = formatItem(compInBold(component.id));\n const autoTag = autoTaggedResults.filter((result) => result.triggeredBy.searchWithoutVersion(component.id));\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => compInBold(a.component.id));\n output += `\\n ${AUTO_TAGGED_MSG}:\\n ${autoTagComp.join('\\n ')}`;\n }\n return output;\n };\n\n const softTagPrefix = results.isSoftTag ? 'soft-tagged ' : '';\n const newDesc = results.isSoftTag\n ? 'set to be tagged with first version for components when persisted'\n : 'first version for components';\n const changedDesc = results.isSoftTag\n ? 'components that are set to get a version bump when persisted'\n : 'components that got a version bump';\n\n const newSection = formatSection(softTagPrefix + 'new components', newDesc, addedComponents.map(formatComp));\n const changedSection = formatSection(\n softTagPrefix + 'changed components',\n changedDesc,\n changedComponents.map(formatComp)\n );\n const removedSection = outputIdsIfExists('removed components', removedComponents);\n\n const publishSection = (() => {\n const { publishedPackages } = results;\n if (!publishedPackages || !publishedPackages.length) return '';\n const items = publishedPackages.map((pkg) => formatItem(pkg));\n return formatSection('published components', '', items);\n })();\n\n const exportedSection = (() => {\n if (!exportedIds) return '';\n if (!exportedIds.length) return `${warnSymbol} ${chalk.yellow('no component has been exported')}`;\n const items = exportedIds.map((id) => formatItem(compInBold(id)));\n return formatSection('exported components', '', items);\n })();\n\n const warningsSection =\n warnings && warnings.length ? warnings.map((w) => `${warnSymbol} ${chalk.yellow(w)}`).join('\\n') : '';\n\n const summaryMsg = `${totalCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged${exportedIds ? ' and exported' : ''}`;\n const summary = formatSuccessSummary(summaryMsg);\n\n const tagExplanation = results.isSoftTag\n ? formatHint(\n '(use \"bit tag --persist\" to persist the soft-tagged changes as a fully tagged version)\\n(use \"bit reset --soft\" to remove the soft-tags)'\n )\n : exportedIds\n ? ''\n : formatHint('(use \"bit export\" to push these components to a remote)\\n(use \"bit reset\" to unstage versions)');\n\n const softTagClarification = results.isSoftTag\n ? chalk.bold(\n 'keep in mind that this is a soft-tag (changes recorded to be tagged), to persist the changes use --persist flag'\n )\n : '';\n\n return joinSections([\n newSection,\n changedSection,\n removedSection,\n publishSection,\n exportedSection,\n warningsSection,\n [summary, tagExplanation, softTagClarification].filter(Boolean).join('\\n'),\n ]);\n}\n\nexport function outputIdsIfExists(label: string, ids?: ComponentIdList) {\n if (!ids?.length) return '';\n const items = ids.map((id) => formatItem(id.toStringWithoutVersion(), warnSymbol));\n return formatSection(label, '', items);\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EA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EAAE,EAAE,EAAEb,KAAK,CAAC;AACxC","ignoreList":[]}
|
package/dist/version-maker.d.ts
CHANGED
|
@@ -61,6 +61,7 @@ export declare class VersionMaker {
|
|
|
61
61
|
private dependencyResolver;
|
|
62
62
|
private allComponentsToTag;
|
|
63
63
|
private allWorkspaceComps?;
|
|
64
|
+
private batchId;
|
|
64
65
|
constructor(snapping: SnappingMain, components: Component[], consumerComponents: ConsumerComponent[], ids: ComponentIdList, params: VersionMakerParams);
|
|
65
66
|
makeVersion(): Promise<{
|
|
66
67
|
taggedComponents: ConsumerComponent[];
|
|
@@ -69,6 +70,7 @@ export declare class VersionMaker {
|
|
|
69
70
|
stagedConfig?: StagedConfig;
|
|
70
71
|
removedComponents?: ComponentIdList;
|
|
71
72
|
totalComponentsCount?: number;
|
|
73
|
+
batchId: string;
|
|
72
74
|
}>;
|
|
73
75
|
private _addDependenciesGraphToComponents;
|
|
74
76
|
private _findWorkspaceCompByConsumerComp;
|
package/dist/version-maker.js
CHANGED
|
@@ -160,6 +160,7 @@ class VersionMaker {
|
|
|
160
160
|
_defineProperty(this, "dependencyResolver", void 0);
|
|
161
161
|
_defineProperty(this, "allComponentsToTag", []);
|
|
162
162
|
_defineProperty(this, "allWorkspaceComps", void 0);
|
|
163
|
+
_defineProperty(this, "batchId", '');
|
|
163
164
|
this.workspace = snapping.workspace;
|
|
164
165
|
this.scope = snapping.scope;
|
|
165
166
|
this.builder = snapping.builder;
|
|
@@ -168,6 +169,7 @@ class VersionMaker {
|
|
|
168
169
|
this.legacyScope = this.scope.legacyScope;
|
|
169
170
|
}
|
|
170
171
|
async makeVersion() {
|
|
172
|
+
this.batchId = (0, _uuid().v4)();
|
|
171
173
|
this.allWorkspaceComps = this.workspace ? await this.workspace.list() : undefined;
|
|
172
174
|
const componentsToTag = this.getUniqCompsToTag();
|
|
173
175
|
const idsToTag = _componentId().ComponentIdList.fromArray(componentsToTag.map(c => c.id));
|
|
@@ -205,7 +207,8 @@ class VersionMaker {
|
|
|
205
207
|
autoTaggedResults: autoTagData,
|
|
206
208
|
publishedPackages: [],
|
|
207
209
|
stagedConfig,
|
|
208
|
-
totalComponentsCount: this.allComponentsToTag.length
|
|
210
|
+
totalComponentsCount: this.allComponentsToTag.length,
|
|
211
|
+
batchId: this.batchId
|
|
209
212
|
};
|
|
210
213
|
}
|
|
211
214
|
const {
|
|
@@ -232,7 +235,8 @@ class VersionMaker {
|
|
|
232
235
|
setHeadAsParent,
|
|
233
236
|
detachHead,
|
|
234
237
|
overrideHead: overrideHead
|
|
235
|
-
}
|
|
238
|
+
},
|
|
239
|
+
batchId: this.batchId
|
|
236
240
|
});
|
|
237
241
|
if (this.workspace) {
|
|
238
242
|
const modelComponent = component.modelComponent || (await this.legacyScope.getModelComponent(component.id));
|
|
@@ -267,7 +271,8 @@ class VersionMaker {
|
|
|
267
271
|
publishedPackages,
|
|
268
272
|
stagedConfig,
|
|
269
273
|
removedComponents,
|
|
270
|
-
totalComponentsCount: this.allComponentsToTag.length
|
|
274
|
+
totalComponentsCount: this.allComponentsToTag.length,
|
|
275
|
+
batchId: this.batchId
|
|
271
276
|
};
|
|
272
277
|
}
|
|
273
278
|
async _addDependenciesGraphToComponents() {
|