@teambit/snapping 1.0.107 → 1.0.109

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.
@@ -80,7 +80,7 @@ describe('Snapping aspect', () => {
80
80
  const compiler = await (0, _harmonyTesting().loadAspect)(_compiler().CompilerAspect, workspacePath);
81
81
  await compiler.compileOnWorkspace();
82
82
  snapping = await (0, _harmonyTesting().loadAspect)(_snapping().SnappingAspect, workspacePath);
83
- });
83
+ }, 30000);
84
84
  it('tag should throw an ComponentsHaveIssues error', async () => {
85
85
  try {
86
86
  await snapping.tag({
@@ -99,7 +99,7 @@ describe('Snapping aspect', () => {
99
99
  const results = await snapping.tag({
100
100
  ids: ['comp1']
101
101
  });
102
- expect(results === null || results === void 0 ? void 0 : results.taggedComponents.length).toEqual(1);
102
+ expect(results?.taggedComponents.length).toEqual(1);
103
103
  });
104
104
  afterAll(async () => {
105
105
  await (0, _workspaceTesting().destroyWorkspace)(workspaceData);
@@ -1 +1 @@
1
- {"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_path","_harmonyTesting","_workspaceTesting","_issues","_compiler","_componentTesting","_snapping","_componentsHaveIssues","obj","__esModule","default","describe","workspaceData","snapping","beforeAll","mockWorkspace","workspacePath","console","log","mockComponents","fs","writeFile","path","join","compiler","loadAspect","CompilerAspect","compileOnWorkspace","SnappingAspect","it","tag","ids","err","expect","constructor","name","toEqual","ComponentsHaveIssues","skip","setWorkspaceConfig","IssuesAspect","id","ignoreIssues","results","taggedComponents","length","afterAll","destroyWorkspace"],"sources":["snapping.spec.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport path from 'path';\nimport { loadAspect } from '@teambit/harmony.testing.load-aspect';\nimport {\n mockWorkspace,\n destroyWorkspace,\n WorkspaceData,\n setWorkspaceConfig,\n} from '@teambit/workspace.testing.mock-workspace';\nimport IssuesAspect from '@teambit/issues';\nimport { CompilerAspect, CompilerMain } from '@teambit/compiler';\nimport { mockComponents } from '@teambit/component.testing.mock-components';\nimport { SnappingMain } from './snapping.main.runtime';\nimport { SnappingAspect } from './snapping.aspect';\nimport { ComponentsHaveIssues } from './components-have-issues';\n\ndescribe('Snapping aspect', () => {\n let workspaceData: WorkspaceData;\n let snapping: SnappingMain;\n describe('components with issues', () => {\n beforeAll(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).toEqual(ComponentsHaveIssues.name);\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).toEqual(1);\n });\n afterAll(async () => {\n await destroyWorkspace(workspaceData);\n });\n });\n});\n"],"mappings":";;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,gBAAA;EAAA,MAAAJ,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AACT,OAAO,CAAC,CAAC,CAAC;IACrD,CAAC,CAAC;IACFU,QAAQ,CAAC,YAAY;MACnB,MAAM,IAAAC,oCAAgB,EAACnC,aAAa,CAAC;IACvC,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_path","_harmonyTesting","_workspaceTesting","_issues","_compiler","_componentTesting","_snapping","_componentsHaveIssues","obj","__esModule","default","describe","workspaceData","snapping","beforeAll","mockWorkspace","workspacePath","console","log","mockComponents","fs","writeFile","path","join","compiler","loadAspect","CompilerAspect","compileOnWorkspace","SnappingAspect","it","tag","ids","err","expect","constructor","name","toEqual","ComponentsHaveIssues","skip","setWorkspaceConfig","IssuesAspect","id","ignoreIssues","results","taggedComponents","length","afterAll","destroyWorkspace"],"sources":["snapping.spec.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport path from 'path';\nimport { loadAspect } from '@teambit/harmony.testing.load-aspect';\nimport {\n mockWorkspace,\n destroyWorkspace,\n WorkspaceData,\n setWorkspaceConfig,\n} from '@teambit/workspace.testing.mock-workspace';\nimport IssuesAspect from '@teambit/issues';\nimport { CompilerAspect, CompilerMain } from '@teambit/compiler';\nimport { mockComponents } from '@teambit/component.testing.mock-components';\nimport { SnappingMain } from './snapping.main.runtime';\nimport { SnappingAspect } from './snapping.aspect';\nimport { ComponentsHaveIssues } from './components-have-issues';\n\ndescribe('Snapping aspect', () => {\n let workspaceData: WorkspaceData;\n let snapping: SnappingMain;\n describe('components with issues', () => {\n beforeAll(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 }, 30000);\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).toEqual(ComponentsHaveIssues.name);\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).toEqual(1);\n });\n afterAll(async () => {\n await destroyWorkspace(workspaceData);\n });\n });\n});\n"],"mappings":";;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,gBAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,eAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,kBAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,iBAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMA,SAAAM,QAAA;EAAA,MAAAN,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAI,OAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,UAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,SAAA,YAAAA,C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,EAAE,KAAK,CAAC;IACTa,EAAE,CAAC,gDAAgD,EAAE,YAAY;MAC/D,IAAI;QACF,MAAMhB,QAAQ,CAACiB,GAAG,CAAC;UAAEC,GAAG,EAAE,CAAC,OAAO;QAAE,CAAC,CAAC;MACxC,CAAC,CAAC,OAAOC,GAAQ,EAAE;QACjBC,MAAM,CAACD,GAAG,CAACE,WAAW,CAACC,IAAI,CAAC,CAACC,OAAO,CAACC,4CAAoB,CAACF,IAAI,CAAC;MACjE;IACF,CAAC,CAAC;IACF;IACAN,EAAE,CAACS,IAAI,CAAC,iGAAiG,EAAE,YAAY;MACrH,MAAM,IAAAC,sCAAkB,EAAC3B,aAAa,CAACI,aAAa,EAAEwB,iBAAY,CAACC,EAAE,EAAE;QACrEC,YAAY,EAAE,CAAC,iCAAiC;MAClD,CAAC,CAAC;MACF7B,QAAQ,GAAG,MAAM,IAAAY,4BAAU,EAACG,0BAAc,EAAEhB,aAAa,CAACI,aAAa,CAAC;MACxE,MAAM2B,OAAO,GAAG,MAAM9B,QAAQ,CAACiB,GAAG,CAAC;QAAEC,GAAG,EAAE,CAAC,OAAO;MAAE,CAAC,CAAC;MACtDE,MAAM,CAACU,OAAO,EAAEC,gBAAgB,CAACC,MAAM,CAAC,CAACT,OAAO,CAAC,CAAC,CAAC;IACrD,CAAC,CAAC;IACFU,QAAQ,CAAC,YAAY;MACnB,MAAM,IAAAC,oCAAgB,EAACnC,aAAa,CAAC;IACvC,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
package/dist/tag-cmd.js CHANGED
@@ -263,7 +263,7 @@ To undo local tag use the "bit reset" command.`);
263
263
  }
264
264
  exports.TagCmd = TagCmd;
265
265
  function outputIdsIfExists(label, ids) {
266
- if (!(ids !== null && ids !== void 0 && ids.length)) return '';
266
+ if (!ids?.length) return '';
267
267
  return `\n${_chalk().default.underline(label)}\n${ids.map(id => id.toStringWithoutVersion()).join('\n')}\n`;
268
268
  }
269
269
 
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_tag","_constants","_componentIssues","_bitError","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","RELEASE_TYPES","TagCmd","constructor","snapping","logger","globalConfig","name","description","COMPONENT_PATTERN_HELP","join","keys","IssuesClasses","cmd","report","patterns","message","ver","all","editor","snapped","unmerged","patch","minor","major","preRelease","increment","prereleaseId","force","ignoreUnresolvedDependencies","ignoreIssues","ignoreNewestVersion","skipTests","skipAutoTag","scope","unmodified","build","soft","persist","disableDeployPipeline","disableTagPipeline","forceDeploy","ignoreBuildErrors","rebuildDepsGraph","failFast","incrementBy","BitError","consoleWarning","length","releaseFlags","filter","x","getReleaseType","includes","DEFAULT_BIT_RELEASE_TYPE","getPreReleaseId","undefined","disableTagAndSnapPipelines","getBool","CFG_FORCE_LOCAL_BUILD","Boolean","params","ids","releaseType","preReleaseId","version","results","tag","chalk","yellow","NOTHING_TO_TAG_MSG","taggedComponents","autoTaggedResults","warnings","newComponents","removedComponents","changedComponents","component","searchWithoutVersion","id","addedComponents","autoTaggedCount","warningsOutput","tagExplanationPersist","tagExplanationSoft","tagExplanation","isSoftTag","compInBold","hasVersion","bold","toStringWithoutVersion","outputComponents","comps","map","componentOutput","autoTag","result","triggeredBy","autoTagComp","a","AUTO_TAGGED_MSG","publishOutput","publishedPackages","successTitle","green","successCompsStr","successOutput","softTagPrefix","outputIfExists","label","explanation","components","underline","newDesc","changedDesc","softTagClarification","outputIdsIfExists","exports"],"sources":["tag-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { NOTHING_TO_TAG_MSG, AUTO_TAGGED_MSG } from '@teambit/legacy/dist/api/consumer/lib/tag';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport {\n DEFAULT_BIT_RELEASE_TYPE,\n COMPONENT_PATTERN_HELP,\n CFG_FORCE_LOCAL_BUILD,\n} from '@teambit/legacy/dist/constants';\nimport { GlobalConfigMain } from '@teambit/global-config';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport { ReleaseType } from 'semver';\nimport { BitError } from '@teambit/bit-error';\nimport { Logger } from '@teambit/logger';\nimport { TagResults, SnappingMain } from './snapping.main.runtime';\nimport { BasicTagParams } from './tag-model-component';\n\nconst RELEASE_TYPES = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];\n\nexport class TagCmd implements Command {\n name = 'tag [component-patterns...]';\n group = 'development';\n description = 'create an immutable and exportable component snapshot, tagged with a release version.';\n extendedDescription = `if no patterns are provided, it will tag all new and modified components.\nif patterns are entered, you can specify a version per pattern using \"@\" sign, e.g. bit tag foo@1.0.0 bar@minor baz@major`;\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 = [\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 ['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 ['', '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 ['', 'force-deploy', 'DEPRECATED. use --ignore-build-error instead'],\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 [\n 'I',\n 'ignore-newest-version',\n 'allow tagging even when the component has newer versions e.g. for hotfixes (default = false)',\n ],\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 [\n 'a',\n 'all [version]',\n 'DEPRECATED (not needed anymore, it is the default now). tag all new and modified components',\n ],\n ['s', 'scope [version]', 'DEPRECATED (use \"--unmodified\" instead). tag all components of the local scope'],\n [\n 'f',\n 'force',\n 'DEPRECATED (use \"--skip-tests\", \"--ignore-build-errors\" or \"--unmodified\" instead). force-tag even if tests are failing and even when component has not changed',\n ],\n ['', 'disable-deploy-pipeline', 'DEPRECATED. use --disable-tag-pipeline instead'],\n ] as CommandOptions;\n migration = true;\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(private snapping: SnappingMain, private logger: Logger, private globalConfig: GlobalConfigMain) {}\n\n // eslint-disable-next-line complexity\n async report(\n [patterns = []]: [string[]],\n {\n message = '',\n ver,\n all = false,\n editor = '',\n snapped = false,\n unmerged = false,\n patch,\n minor,\n major,\n preRelease,\n increment,\n prereleaseId,\n force = false,\n ignoreUnresolvedDependencies,\n ignoreIssues,\n ignoreNewestVersion = false,\n skipTests = false,\n skipAutoTag = false,\n scope,\n unmodified = false,\n build,\n soft = false,\n persist = false,\n disableDeployPipeline = false,\n disableTagPipeline = false,\n forceDeploy = false,\n ignoreBuildErrors = false,\n rebuildDepsGraph,\n failFast = false,\n incrementBy = 1,\n }: {\n all?: boolean | string;\n snapped?: boolean;\n unmerged?: boolean;\n ver?: string;\n force?: boolean;\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 scope?: string | boolean;\n incrementBy?: number;\n disableDeployPipeline?: boolean;\n failFast?: boolean;\n disableTagPipeline?: boolean;\n forceDeploy?: boolean;\n } & Partial<BasicTagParams>\n ): Promise<string> {\n if (typeof ignoreUnresolvedDependencies === 'boolean') {\n throw new BitError(`--ignore-unresolved-dependencies has been removed, please use --ignore-issues instead`);\n }\n if (ignoreIssues && typeof ignoreIssues === 'boolean') {\n throw new BitError(`--ignore-issues expects issues to be ignored, please run \"bit tag -h\" for the issues list`);\n }\n if (disableDeployPipeline) {\n this.logger.consoleWarning(`--disable-deploy-pipeline is deprecated, please use --disable-tag-pipeline instead`);\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 if (all) {\n this.logger.consoleWarning(\n `--all is deprecated, please omit it. \"bit tag\" will by default tag all new and modified components`\n );\n if (typeof all === 'string') {\n ver = all;\n }\n }\n if (scope) {\n this.logger.consoleWarning(`--scope is deprecated, use --unmodified instead`);\n unmodified = true;\n if (typeof scope === 'string') {\n ver = scope;\n }\n }\n if (force) {\n this.logger.consoleWarning(\n `--force is deprecated, use either --skip-tests, --ignore-build-errors or --unmodified depending on the use case`\n );\n if (patterns.length) unmodified = true;\n }\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 if (forceDeploy) {\n this.logger.consoleWarning(`--force-deploy is deprecated, use --ignore-build-errors instead`);\n ignoreBuildErrors = true;\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}\".\n semver 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 const disableTagAndSnapPipelines = disableTagPipeline || disableDeployPipeline;\n build = (await this.globalConfig.getBool(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 message,\n releaseType: getReleaseType(),\n preReleaseId: getPreReleaseId(),\n ignoreIssues,\n ignoreNewestVersion,\n skipTests,\n skipAutoTag,\n build,\n soft,\n persist,\n unmodified,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n rebuildDepsGraph,\n incrementBy,\n version: ver,\n failFast,\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 const { taggedComponents, autoTaggedResults, warnings, newComponents, removedComponents }: 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\n const warningsOutput = warnings && warnings.length ? `${chalk.yellow(warnings.join('\\n'))}\\n\\n` : '';\n const tagExplanationPersist = `\\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 softTagPrefix = results.isSoftTag ? 'soft-tagged ' : '';\n const outputIfExists = (label, explanation, 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 warningsOutput +\n chalk.green(\n `\\n${taggedComponents.length + autoTaggedCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged`\n ) +\n tagExplanation +\n softTagClarification\n );\n }\n}\n\nexport function outputIdsIfExists(label: string, ids?: ComponentIdList) {\n if (!ids?.length) return '';\n return `\\n${chalk.underline(label)}\\n${ids.map((id) => id.toStringWithoutVersion()).join('\\n')}\\n`;\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;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AC,CAAC,CAAChF,IAAI,CAAC,IAAI,CAAE,IAAG;AACpG"}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_tag","_constants","_componentIssues","_bitError","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","RELEASE_TYPES","TagCmd","constructor","snapping","logger","globalConfig","name","description","COMPONENT_PATTERN_HELP","join","keys","IssuesClasses","cmd","report","patterns","message","ver","all","editor","snapped","unmerged","patch","minor","major","preRelease","increment","prereleaseId","force","ignoreUnresolvedDependencies","ignoreIssues","ignoreNewestVersion","skipTests","skipAutoTag","scope","unmodified","build","soft","persist","disableDeployPipeline","disableTagPipeline","forceDeploy","ignoreBuildErrors","rebuildDepsGraph","failFast","incrementBy","BitError","consoleWarning","length","releaseFlags","filter","x","getReleaseType","includes","DEFAULT_BIT_RELEASE_TYPE","getPreReleaseId","undefined","disableTagAndSnapPipelines","getBool","CFG_FORCE_LOCAL_BUILD","Boolean","params","ids","releaseType","preReleaseId","version","results","tag","chalk","yellow","NOTHING_TO_TAG_MSG","taggedComponents","autoTaggedResults","warnings","newComponents","removedComponents","changedComponents","component","searchWithoutVersion","id","addedComponents","autoTaggedCount","warningsOutput","tagExplanationPersist","tagExplanationSoft","tagExplanation","isSoftTag","compInBold","hasVersion","bold","toStringWithoutVersion","outputComponents","comps","map","componentOutput","autoTag","result","triggeredBy","autoTagComp","a","AUTO_TAGGED_MSG","publishOutput","publishedPackages","successTitle","green","successCompsStr","successOutput","softTagPrefix","outputIfExists","label","explanation","components","underline","newDesc","changedDesc","softTagClarification","outputIdsIfExists","exports"],"sources":["tag-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { NOTHING_TO_TAG_MSG, AUTO_TAGGED_MSG } from '@teambit/legacy/dist/api/consumer/lib/tag';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport {\n DEFAULT_BIT_RELEASE_TYPE,\n COMPONENT_PATTERN_HELP,\n CFG_FORCE_LOCAL_BUILD,\n} from '@teambit/legacy/dist/constants';\nimport { GlobalConfigMain } from '@teambit/global-config';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport { ReleaseType } from 'semver';\nimport { BitError } from '@teambit/bit-error';\nimport { Logger } from '@teambit/logger';\nimport { TagResults, SnappingMain } from './snapping.main.runtime';\nimport { BasicTagParams } from './tag-model-component';\n\nconst RELEASE_TYPES = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];\n\nexport class TagCmd implements Command {\n name = 'tag [component-patterns...]';\n group = 'development';\n description = 'create an immutable and exportable component snapshot, tagged with a release version.';\n extendedDescription = `if no patterns are provided, it will tag all new and modified components.\nif patterns are entered, you can specify a version per pattern using \"@\" sign, e.g. bit tag foo@1.0.0 bar@minor baz@major`;\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 = [\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 ['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 ['', '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 ['', 'force-deploy', 'DEPRECATED. use --ignore-build-error instead'],\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 [\n 'I',\n 'ignore-newest-version',\n 'allow tagging even when the component has newer versions e.g. for hotfixes (default = false)',\n ],\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 [\n 'a',\n 'all [version]',\n 'DEPRECATED (not needed anymore, it is the default now). tag all new and modified components',\n ],\n ['s', 'scope [version]', 'DEPRECATED (use \"--unmodified\" instead). tag all components of the local scope'],\n [\n 'f',\n 'force',\n 'DEPRECATED (use \"--skip-tests\", \"--ignore-build-errors\" or \"--unmodified\" instead). force-tag even if tests are failing and even when component has not changed',\n ],\n ['', 'disable-deploy-pipeline', 'DEPRECATED. use --disable-tag-pipeline instead'],\n ] as CommandOptions;\n migration = true;\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(private snapping: SnappingMain, private logger: Logger, private globalConfig: GlobalConfigMain) {}\n\n // eslint-disable-next-line complexity\n async report(\n [patterns = []]: [string[]],\n {\n message = '',\n ver,\n all = false,\n editor = '',\n snapped = false,\n unmerged = false,\n patch,\n minor,\n major,\n preRelease,\n increment,\n prereleaseId,\n force = false,\n ignoreUnresolvedDependencies,\n ignoreIssues,\n ignoreNewestVersion = false,\n skipTests = false,\n skipAutoTag = false,\n scope,\n unmodified = false,\n build,\n soft = false,\n persist = false,\n disableDeployPipeline = false,\n disableTagPipeline = false,\n forceDeploy = false,\n ignoreBuildErrors = false,\n rebuildDepsGraph,\n failFast = false,\n incrementBy = 1,\n }: {\n all?: boolean | string;\n snapped?: boolean;\n unmerged?: boolean;\n ver?: string;\n force?: boolean;\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 scope?: string | boolean;\n incrementBy?: number;\n disableDeployPipeline?: boolean;\n failFast?: boolean;\n disableTagPipeline?: boolean;\n forceDeploy?: boolean;\n } & Partial<BasicTagParams>\n ): Promise<string> {\n if (typeof ignoreUnresolvedDependencies === 'boolean') {\n throw new BitError(`--ignore-unresolved-dependencies has been removed, please use --ignore-issues instead`);\n }\n if (ignoreIssues && typeof ignoreIssues === 'boolean') {\n throw new BitError(`--ignore-issues expects issues to be ignored, please run \"bit tag -h\" for the issues list`);\n }\n if (disableDeployPipeline) {\n this.logger.consoleWarning(`--disable-deploy-pipeline is deprecated, please use --disable-tag-pipeline instead`);\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 if (all) {\n this.logger.consoleWarning(\n `--all is deprecated, please omit it. \"bit tag\" will by default tag all new and modified components`\n );\n if (typeof all === 'string') {\n ver = all;\n }\n }\n if (scope) {\n this.logger.consoleWarning(`--scope is deprecated, use --unmodified instead`);\n unmodified = true;\n if (typeof scope === 'string') {\n ver = scope;\n }\n }\n if (force) {\n this.logger.consoleWarning(\n `--force is deprecated, use either --skip-tests, --ignore-build-errors or --unmodified depending on the use case`\n );\n if (patterns.length) unmodified = true;\n }\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 if (forceDeploy) {\n this.logger.consoleWarning(`--force-deploy is deprecated, use --ignore-build-errors instead`);\n ignoreBuildErrors = true;\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}\".\n semver 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 const disableTagAndSnapPipelines = disableTagPipeline || disableDeployPipeline;\n build = (await this.globalConfig.getBool(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 message,\n releaseType: getReleaseType(),\n preReleaseId: getPreReleaseId(),\n ignoreIssues,\n ignoreNewestVersion,\n skipTests,\n skipAutoTag,\n build,\n soft,\n persist,\n unmodified,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n rebuildDepsGraph,\n incrementBy,\n version: ver,\n failFast,\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 const { taggedComponents, autoTaggedResults, warnings, newComponents, removedComponents }: 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\n const warningsOutput = warnings && warnings.length ? `${chalk.yellow(warnings.join('\\n'))}\\n\\n` : '';\n const tagExplanationPersist = `\\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 softTagPrefix = results.isSoftTag ? 'soft-tagged ' : '';\n const outputIfExists = (label, explanation, 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 warningsOutput +\n chalk.green(\n `\\n${taggedComponents.length + autoTaggedCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged`\n ) +\n tagExplanation +\n softTagClarification\n );\n }\n}\n\nexport function outputIdsIfExists(label: string, ids?: ComponentIdList) {\n if (!ids?.length) return '';\n return `\\n${chalk.underline(label)}\\n${ids.map((id) => id.toStringWithoutVersion()).join('\\n')}\\n`;\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,GAAA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AAE,CAACW,sBAAsB,CAAC,CAAC,CAAC,CAAChF,IAAI,CAAC,IAAI,CAAE,IAAG;AACpG"}
@@ -3,7 +3,7 @@ import { ReleaseType } from 'semver';
3
3
  import { Logger } from '@teambit/logger';
4
4
  import { SnappingMain } from './snapping.main.runtime';
5
5
  import { BasicTagParams } from './tag-model-component';
6
- export declare type TagDataPerCompRaw = {
6
+ export type TagDataPerCompRaw = {
7
7
  componentId: string;
8
8
  dependencies?: string[];
9
9
  versionToTag?: string;
@@ -9,15 +9,15 @@ import { DependencyResolverMain } from '@teambit/dependency-resolver';
9
9
  import { ScopeMain, StagedConfig } from '@teambit/scope';
10
10
  import { Workspace } from '@teambit/workspace';
11
11
  import { SnappingMain, TagDataPerComp } from './snapping.main.runtime';
12
- export declare type onTagIdTransformer = (id: ComponentID) => ComponentID | null;
13
- export declare type BasicTagSnapParams = {
12
+ export type onTagIdTransformer = (id: ComponentID) => ComponentID | null;
13
+ export type BasicTagSnapParams = {
14
14
  message: string;
15
15
  skipTests?: boolean;
16
16
  build?: boolean;
17
17
  ignoreBuildErrors?: boolean;
18
18
  rebuildDepsGraph?: boolean;
19
19
  };
20
- export declare type BasicTagParams = BasicTagSnapParams & {
20
+ export type BasicTagParams = BasicTagSnapParams & {
21
21
  ignoreNewestVersion?: boolean;
22
22
  skipAutoTag?: boolean;
23
23
  soft?: boolean;
@@ -53,7 +53,7 @@ export declare function tagModelComponent({ workspace, scope, snapping, builder,
53
53
  }>;
54
54
  export declare function getBasicLog(): Promise<Log>;
55
55
  export declare function getBitCloudUsername(): Promise<string | undefined>;
56
- export declare type BitCloudUser = {
56
+ export type BitCloudUser = {
57
57
  username?: string;
58
58
  name?: string;
59
59
  displayName?: string;
@@ -180,10 +180,9 @@ function setHashes(componentsToTag) {
180
180
  async function setFutureVersions(componentsToTag, scope, releaseType, exactVersion, persist, autoTagIds, ids, incrementBy, preReleaseId, soft, tagDataPerComp) {
181
181
  const isPreReleaseLike = releaseType ? ['prerelease', 'premajor', 'preminor', 'prepatch'].includes(releaseType) : false;
182
182
  await Promise.all(componentsToTag.map(async componentToTag => {
183
- var _componentToTag$compo;
184
183
  const isAutoTag = autoTagIds.hasWithoutVersion(componentToTag.id);
185
184
  const modelComponent = await scope.sources.findOrAddComponent(componentToTag);
186
- const nextVersion = (_componentToTag$compo = componentToTag.componentMap) === null || _componentToTag$compo === void 0 || (_componentToTag$compo = _componentToTag$compo.nextVersion) === null || _componentToTag$compo === void 0 ? void 0 : _componentToTag$compo.version;
185
+ const nextVersion = componentToTag.componentMap?.nextVersion?.version;
187
186
  const getNewVersion = () => {
188
187
  if (tagDataPerComp) {
189
188
  const tagData = tagDataPerComp.find(t => t.componentId.isEqualWithoutVersion(componentToTag.id));
@@ -193,9 +192,8 @@ async function setFutureVersions(componentsToTag, scope, releaseType, exactVersi
193
192
  return modelComponent.getVersionToAdd(exactVersionOrReleaseType.releaseType, exactVersionOrReleaseType.exactVersion, incrementBy, tagData.prereleaseId);
194
193
  }
195
194
  if (nextVersion && persist) {
196
- var _componentToTag$compo2;
197
195
  const exactVersionOrReleaseType = (0, _semverHelper().getValidVersionOrReleaseType)(nextVersion);
198
- return modelComponent.getVersionToAdd(exactVersionOrReleaseType.releaseType, exactVersionOrReleaseType.exactVersion, undefined, (_componentToTag$compo2 = componentToTag.componentMap) === null || _componentToTag$compo2 === void 0 || (_componentToTag$compo2 = _componentToTag$compo2.nextVersion) === null || _componentToTag$compo2 === void 0 ? void 0 : _componentToTag$compo2.preRelease);
196
+ return modelComponent.getVersionToAdd(exactVersionOrReleaseType.releaseType, exactVersionOrReleaseType.exactVersion, undefined, componentToTag.componentMap?.nextVersion?.preRelease);
199
197
  }
200
198
  if (isAutoTag) {
201
199
  // auto-tag always bumped as patch unless it's pre-release
@@ -249,7 +247,7 @@ async function tagModelComponent({
249
247
  copyLogFromPreviousSnap = false,
250
248
  exitOnFirstFailedTask = false
251
249
  }) {
252
- const consumer = workspace === null || workspace === void 0 ? void 0 : workspace.consumer;
250
+ const consumer = workspace?.consumer;
253
251
  const legacyScope = scope.legacyScope;
254
252
  const consumerComponentsIdsMap = {};
255
253
  // Concat and unique all the dependencies from all the components so we will not import
@@ -431,8 +429,8 @@ async function addComponentsToScope(scope, snapping, components, shouldValidateV
431
429
 
432
430
  // in case "tagData.isNew", the version object has "parents" that should not be there.
433
431
  // they got created as a workaround to generate a new component from the scope without having a workspace.
434
- const tagData = tagDataPerComp === null || tagDataPerComp === void 0 ? void 0 : tagDataPerComp.find(t => t.componentId.isEqualWithoutVersion(component.id));
435
- if (tagData !== null && tagData !== void 0 && tagData.isNew) results.version.removeAllParents();
432
+ const tagData = tagDataPerComp?.find(t => t.componentId.isEqualWithoutVersion(component.id));
433
+ if (tagData?.isNew) results.version.removeAllParents();
436
434
  });
437
435
  }
438
436
  }
@@ -455,9 +453,8 @@ async function addLogToComponents(components, autoTagComps, persist, message, me
455
453
  }
456
454
  const basicLog = await getBasicLog();
457
455
  const getLog = component => {
458
- var _component$componentM, _messagePerComponent$;
459
- const nextVersion = persist ? (_component$componentM = component.componentMap) === null || _component$componentM === void 0 ? void 0 : _component$componentM.nextVersion : null;
460
- const msgFromEditor = (_messagePerComponent$ = messagePerComponent.find(item => item.id.isEqualWithoutVersion(component.id))) === null || _messagePerComponent$ === void 0 ? void 0 : _messagePerComponent$.msg;
456
+ const nextVersion = persist ? component.componentMap?.nextVersion : null;
457
+ const msgFromEditor = messagePerComponent.find(item => item.id.isEqualWithoutVersion(component.id))?.msg;
461
458
  if (copyLogFromPreviousSnap) {
462
459
  const currentLog = component.log;
463
460
  if (!currentLog) {
@@ -468,9 +465,9 @@ async function addLogToComponents(components, autoTagComps, persist, message, me
468
465
  return currentLog;
469
466
  }
470
467
  return {
471
- username: (nextVersion === null || nextVersion === void 0 ? void 0 : nextVersion.username) || basicLog.username,
472
- email: (nextVersion === null || nextVersion === void 0 ? void 0 : nextVersion.email) || basicLog.email,
473
- message: (nextVersion === null || nextVersion === void 0 ? void 0 : nextVersion.message) || msgFromEditor || message,
468
+ username: nextVersion?.username || basicLog.username,
469
+ email: nextVersion?.email || basicLog.email,
470
+ message: nextVersion?.message || msgFromEditor || message,
474
471
  date: basicLog.date
475
472
  };
476
473
  };
@@ -573,7 +570,7 @@ async function updateComponentsVersions(workspace, components, isTag = true) {
573
570
  consumer.bitMap.removeConfig(id);
574
571
  const hash = modelComponent.getRef(id.version);
575
572
  if (!hash) throw new Error(`updateComponentsVersions: unable to find a hash for ${id.toString()}`);
576
- workspace.scope.legacyScope.stagedSnaps.addSnap(hash === null || hash === void 0 ? void 0 : hash.toString());
573
+ workspace.scope.legacyScope.stagedSnaps.addSnap(hash?.toString());
577
574
  } else if (!componentMap.config) {
578
575
  componentMap.config = stagedConfig.getConfigPerId(compId);
579
576
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_pMapSeries","data","_interopRequireDefault","require","_nodeFetch","_ramda","_lodash","_uuid","_bitError","globalConfig","_interopRequireWildcard","_componentId","_constants","_componentSchema","_workspaceModules","_exceptions","_deleteComponentFiles","_logger","_utils","_autoTag","_semverHelper","_messagePerComponent","_models","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","key","value","_toPropertyKey","configurable","writable","_toPrimitive","String","Symbol","toPrimitive","TypeError","Number","updateDependenciesVersions","componentsToTag","dependencyResolver","getNewDependencyVersion","id","foundDependency","find","component","isEqualWithoutVersion","changeVersion","version","changeExtensionsVersion","extensions","ext","extensionId","newDepId","oneComponentToTag","getAllDependencies","dependency","updateDepsOnLegacyTag","bind","setHashes","componentToTag","setNewVersion","sha1","v4","setFutureVersions","scope","releaseType","exactVersion","persist","autoTagIds","ids","incrementBy","preReleaseId","soft","tagDataPerComp","isPreReleaseLike","includes","Promise","all","map","_componentToTag$compo","isAutoTag","hasWithoutVersion","modelComponent","sources","findOrAddComponent","nextVersion","componentMap","getNewVersion","tagData","componentId","Error","toStringWithoutVersion","versionToTag","exactVersionOrReleaseType","getValidVersionOrReleaseType","getVersionToAdd","prereleaseId","_componentToTag$compo2","undefined","preRelease","versionByEnteredId","getVersionByEnteredId","newVersion","enteredIds","enteredId","searchWithoutVersion","hasVersion","tagModelComponent","workspace","snapping","builder","consumerComponents","populateArtifactsFrom","message","editor","ignoreNewestVersion","skipTests","skipAutoTag","build","isSnap","disableTagAndSnapPipelines","ignoreBuildErrors","rebuildDepsGraph","packageManagerConfigRootDir","copyLogFromPreviousSnap","exitOnFirstFailedTask","consumer","legacyScope","consumerComponentsIdsMap","consumerComponent","componentIdString","toString","R","values","idsToTag","ComponentIdList","fromArray","c","idsToTriggerAutoTag","autoTagData","getAutoTagInfo","autoTagComponents","autoTagItem","autoTagComponentsFiltered","autoTag","allComponentsToTag","messagesFromEditorFetcher","MessagePerComponentFetcher","getMessagePerId","getMessagesFromEditor","tmp","msg","messagePerId","newestVersionsP","componentFromModel","getModelComponentIfExist","BitError","listVersions","latest","getHeadRegardlessOfLaneAsTagOrHash","currentVersion","latestVersion","newestVersions","newestVersionsWithoutEmpty","newest","isEmpty","NewerVersionFound","logger","debugAndAddBreadCrumb","setCurrentSchema","addLogToComponents","unmergedComps","listComponentsDuringMerge","stagedConfig","updateNextVersionOnBitmap","_addFlattenedDependenciesToComponents","throwForDepsFromAnotherLane","emptyBuilderData","addBuildStatus","BuildStatus","Pending","addComponentsToScope","Boolean","modelComponents","getModelComponent","updateComponentsVersions","publishedPackages","harmonyComps","onTagOpts","throwOnError","forceDeploy","seedersOnly","isolateOptions","builderOptions","componentsToBuild","isRemoved","reloadAspectsWithNewVersion","getManyByLegacy","builderDataMap","tagListener","buildResult","builderDataMapToLegacyOnTagResults","_updateComponentsByTagResult","_getPublishedPackages","Succeed","mapSeries","_enrichComp","removedComponents","removeDeletedComponentsFromBitmap","objects","removeMergeConfigFromComponents","linkToNodeModulesByComponents","taggedComponents","autoTaggedResults","comps","removedComps","comp","compBitIdsToRemove","deleteComponentsFiles","cleanFromBitMap","components","configMergeFile","getConflictMergeFile","compId","isNowSnapped","removeConflict","currentlyUnmerged","hasConflict","write","delete","shouldValidateVersion","lane","getCurrentLaneObject","_addCompToObjects","source","results","_addCompFromScopeToObjects","isNew","removeAllParents","clone","existingBuilder","findCoreExtension","Extensions","autoTagComps","messagePerComponent","basicLog","getBasicLog","getLog","_component$componentM","_messagePerComponent$","msgFromEditor","item","currentLog","log","date","username","email","autoTagComp","defaultMsg","getBitCloudUsername","CFG_USER_NAME_KEY","CFG_USER_EMAIL_KEY","Date","now","token","CFG_USER_TOKEN_KEY","res","fetch","getCloudDomain","headers","Authorization","object","json","user","payload","error","getBitCloudUser","schema","CURRENT_SCHEMA","buildStatus","isTag","currentLane","getCurrentLaneId","getStagedConfig","isAvailableOnMain","isDefault","ModelComponent","hasHead","updateVersions","toBitIdWithLatestVersionAllowNull","bitMap","updateComponentId","availableOnMain","setOnLanesOnly","getComponent","resolveComponentId","config","addComponentConfig","removeConfig","hash","getRef","stagedSnaps","addSnap","getConfigPerId","clearNextVersion"],"sources":["tag-model-component.ts"],"sourcesContent":["import mapSeries from 'p-map-series';\nimport fetch from 'node-fetch';\nimport R from 'ramda';\nimport { isEmpty } from 'lodash';\nimport { ReleaseType } from 'semver';\nimport { v4 } from 'uuid';\nimport { BitError } from '@teambit/bit-error';\nimport * as globalConfig from '@teambit/legacy/dist/api/consumer/lib/global-config';\nimport { Scope } from '@teambit/legacy/dist/scope';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport {\n BuildStatus,\n CFG_USER_EMAIL_KEY,\n CFG_USER_NAME_KEY,\n CFG_USER_TOKEN_KEY,\n getCloudDomain,\n Extensions,\n} from '@teambit/legacy/dist/constants';\nimport { CURRENT_SCHEMA } from '@teambit/legacy/dist/consumer/component/component-schema';\nimport { linkToNodeModulesByComponents } from '@teambit/workspace.modules.node-modules-linker';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport Consumer from '@teambit/legacy/dist/consumer/consumer';\nimport { NewerVersionFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport { Component } from '@teambit/component';\nimport deleteComponentsFiles from '@teambit/legacy/dist/consumer/component-ops/delete-component-files';\nimport logger from '@teambit/legacy/dist/logger/logger';\nimport { sha1 } from '@teambit/legacy/dist/utils';\nimport { AutoTagResult, getAutoTagInfo } from '@teambit/legacy/dist/scope/component-ops/auto-tag';\nimport { getValidVersionOrReleaseType } from '@teambit/legacy/dist/utils/semver-helper';\nimport { BuilderMain, OnTagOpts } from '@teambit/builder';\nimport { Log } from '@teambit/legacy/dist/scope/models/version';\nimport {\n MessagePerComponent,\n MessagePerComponentFetcher,\n} from '@teambit/legacy/dist/scope/component-ops/message-per-component';\nimport { ModelComponent } from '@teambit/legacy/dist/scope/models';\nimport { DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { ScopeMain, StagedConfig } from '@teambit/scope';\nimport { Workspace } from '@teambit/workspace';\nimport { SnappingMain, TagDataPerComp } from './snapping.main.runtime';\n\nexport type onTagIdTransformer = (id: ComponentID) => ComponentID | null;\n\nexport type BasicTagSnapParams = {\n message: string;\n skipTests?: boolean;\n build?: boolean;\n ignoreBuildErrors?: boolean;\n rebuildDepsGraph?: boolean;\n};\n\nexport type BasicTagParams = BasicTagSnapParams & {\n ignoreNewestVersion?: boolean;\n skipAutoTag?: boolean;\n soft?: boolean;\n persist: boolean;\n disableTagAndSnapPipelines?: boolean;\n preReleaseId?: string;\n editor?: string;\n unmodified?: boolean;\n};\n\nfunction updateDependenciesVersions(\n componentsToTag: ConsumerComponent[],\n dependencyResolver: DependencyResolverMain\n): void {\n const getNewDependencyVersion = (id: ComponentID): ComponentID | null => {\n const foundDependency = componentsToTag.find((component) => component.id.isEqualWithoutVersion(id));\n return foundDependency ? id.changeVersion(foundDependency.version) : null;\n };\n const changeExtensionsVersion = (component: ConsumerComponent): void => {\n component.extensions.forEach((ext) => {\n if (ext.extensionId) {\n const newDepId = getNewDependencyVersion(ext.extensionId);\n if (newDepId) ext.extensionId = newDepId;\n }\n });\n };\n\n componentsToTag.forEach((oneComponentToTag) => {\n oneComponentToTag.getAllDependencies().forEach((dependency) => {\n const newDepId = getNewDependencyVersion(dependency.id);\n if (newDepId) dependency.id = newDepId;\n });\n changeExtensionsVersion(oneComponentToTag);\n // @ts-ignore\n oneComponentToTag = dependencyResolver.updateDepsOnLegacyTag(oneComponentToTag, getNewDependencyVersion.bind(this));\n });\n}\n\nfunction setHashes(componentsToTag: ConsumerComponent[]): void {\n componentsToTag.forEach((componentToTag) => {\n componentToTag.setNewVersion(sha1(v4()));\n });\n}\n\nasync function setFutureVersions(\n componentsToTag: ConsumerComponent[],\n scope: Scope,\n releaseType: ReleaseType | undefined,\n exactVersion: string | null | undefined,\n persist: boolean,\n autoTagIds: ComponentIdList,\n ids: ComponentIdList,\n incrementBy?: number,\n preReleaseId?: string,\n soft?: boolean,\n tagDataPerComp?: TagDataPerComp[]\n): Promise<void> {\n const isPreReleaseLike = releaseType\n ? ['prerelease', 'premajor', 'preminor', 'prepatch'].includes(releaseType)\n : false;\n await Promise.all(\n componentsToTag.map(async (componentToTag) => {\n const isAutoTag = autoTagIds.hasWithoutVersion(componentToTag.id);\n const modelComponent = await scope.sources.findOrAddComponent(componentToTag);\n const nextVersion = componentToTag.componentMap?.nextVersion?.version;\n const getNewVersion = (): string => {\n if (tagDataPerComp) {\n const tagData = tagDataPerComp.find((t) => t.componentId.isEqualWithoutVersion(componentToTag.id));\n if (!tagData) throw new Error(`tag-data is missing for ${componentToTag.id.toStringWithoutVersion()}`);\n if (!tagData.versionToTag)\n throw new Error(`tag-data.TagResults is missing for ${componentToTag.id.toStringWithoutVersion()}`);\n const exactVersionOrReleaseType = getValidVersionOrReleaseType(tagData.versionToTag);\n return modelComponent.getVersionToAdd(\n exactVersionOrReleaseType.releaseType,\n exactVersionOrReleaseType.exactVersion,\n incrementBy,\n tagData.prereleaseId\n );\n }\n if (nextVersion && persist) {\n const exactVersionOrReleaseType = getValidVersionOrReleaseType(nextVersion);\n return modelComponent.getVersionToAdd(\n exactVersionOrReleaseType.releaseType,\n exactVersionOrReleaseType.exactVersion,\n undefined,\n componentToTag.componentMap?.nextVersion?.preRelease\n );\n }\n if (isAutoTag) {\n // auto-tag always bumped as patch unless it's pre-release\n if (isPreReleaseLike) {\n return soft\n ? (releaseType as string)\n : modelComponent.getVersionToAdd(releaseType, exactVersion, incrementBy, preReleaseId);\n }\n return soft ? 'patch' : modelComponent.getVersionToAdd('patch', undefined, incrementBy, preReleaseId);\n }\n const versionByEnteredId = getVersionByEnteredId(ids, componentToTag, modelComponent);\n return soft\n ? versionByEnteredId || exactVersion || (releaseType as string)\n : versionByEnteredId || modelComponent.getVersionToAdd(releaseType, exactVersion, incrementBy, preReleaseId);\n };\n const newVersion = getNewVersion();\n componentToTag.setNewVersion(newVersion);\n })\n );\n}\n\nfunction getVersionByEnteredId(\n enteredIds: ComponentIdList,\n component: ConsumerComponent,\n modelComponent: ModelComponent\n): string | undefined {\n const enteredId = enteredIds.searchWithoutVersion(component.id);\n if (enteredId && enteredId.hasVersion()) {\n const exactVersionOrReleaseType = getValidVersionOrReleaseType(enteredId.version as string);\n return modelComponent.getVersionToAdd(\n exactVersionOrReleaseType.releaseType,\n exactVersionOrReleaseType.exactVersion\n );\n }\n return undefined;\n}\n\nexport async function tagModelComponent({\n workspace,\n scope,\n snapping,\n builder,\n consumerComponents,\n ids,\n tagDataPerComp,\n populateArtifactsFrom,\n message,\n editor,\n exactVersion,\n releaseType,\n preReleaseId,\n ignoreNewestVersion = false,\n skipTests = false,\n skipAutoTag,\n soft,\n build,\n persist,\n isSnap = false,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n rebuildDepsGraph,\n incrementBy,\n packageManagerConfigRootDir,\n dependencyResolver,\n copyLogFromPreviousSnap = false,\n exitOnFirstFailedTask = false,\n}: {\n workspace?: Workspace;\n scope: ScopeMain;\n snapping: SnappingMain;\n builder: BuilderMain;\n consumerComponents: ConsumerComponent[];\n ids: ComponentIdList;\n tagDataPerComp?: TagDataPerComp[];\n populateArtifactsFrom?: ComponentID[];\n copyLogFromPreviousSnap?: boolean;\n exactVersion?: string | null | undefined;\n releaseType?: ReleaseType;\n incrementBy?: number;\n isSnap?: boolean;\n packageManagerConfigRootDir?: string;\n dependencyResolver: DependencyResolverMain;\n exitOnFirstFailedTask?: boolean;\n} & BasicTagParams): Promise<{\n taggedComponents: ConsumerComponent[];\n autoTaggedResults: AutoTagResult[];\n publishedPackages: string[];\n stagedConfig?: StagedConfig;\n removedComponents?: ComponentIdList;\n}> {\n const consumer = workspace?.consumer;\n const legacyScope = scope.legacyScope;\n const consumerComponentsIdsMap = {};\n // Concat and unique all the dependencies from all the components so we will not import\n // the same dependency more then once, it's mainly for performance purpose\n consumerComponents.forEach((consumerComponent) => {\n const componentIdString = consumerComponent.id.toString();\n // Store it in a map so we can take it easily from the sorted array which contain only the id\n consumerComponentsIdsMap[componentIdString] = consumerComponent;\n });\n const componentsToTag: ConsumerComponent[] = R.values(consumerComponentsIdsMap); // consumerComponents unique\n const idsToTag = ComponentIdList.fromArray(componentsToTag.map((c) => c.id));\n // ids without versions are new. it's impossible that tagged (and not-modified) components has\n // them as dependencies.\n const idsToTriggerAutoTag = idsToTag.filter((id) => id.hasVersion());\n const autoTagData =\n skipAutoTag || !consumer ? [] : await getAutoTagInfo(consumer, ComponentIdList.fromArray(idsToTriggerAutoTag));\n const autoTagComponents = autoTagData.map((autoTagItem) => autoTagItem.component);\n const autoTagComponentsFiltered = autoTagComponents.filter((c) => !idsToTag.has(c.id));\n const autoTagIds = ComponentIdList.fromArray(autoTagComponentsFiltered.map((autoTag) => autoTag.id));\n const allComponentsToTag = [...componentsToTag, ...autoTagComponentsFiltered];\n\n const messagesFromEditorFetcher = new MessagePerComponentFetcher(idsToTag, autoTagIds);\n const getMessagePerId = async () => {\n if (editor) return messagesFromEditorFetcher.getMessagesFromEditor(legacyScope.tmp, editor);\n if (tagDataPerComp) return tagDataPerComp.map((t) => ({ id: t.componentId, msg: t.message || message }));\n return [];\n };\n const messagePerId = await getMessagePerId();\n\n // check for each one of the components whether it is using an old version\n if (!ignoreNewestVersion && !isSnap) {\n const newestVersionsP = allComponentsToTag.map(async (component) => {\n if (component.componentFromModel) {\n // otherwise it's a new component, so this check is irrelevant\n const modelComponent = await legacyScope.getModelComponentIfExist(component.id);\n if (!modelComponent) throw new BitError(`component ${component.id} was not found in the model`);\n if (!modelComponent.listVersions().length) return null; // no versions yet, no issues.\n const latest = modelComponent.getHeadRegardlessOfLaneAsTagOrHash();\n if (latest !== component.version) {\n return {\n componentId: component.id.toStringWithoutVersion(),\n currentVersion: component.version,\n latestVersion: latest,\n };\n }\n }\n return null;\n });\n const newestVersions = await Promise.all(newestVersionsP);\n const newestVersionsWithoutEmpty = newestVersions.filter((newest) => newest);\n if (!isEmpty(newestVersionsWithoutEmpty)) {\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n throw new NewerVersionFound(newestVersionsWithoutEmpty);\n }\n }\n\n logger.debugAndAddBreadCrumb('tag-model-components', 'sequentially persist all components');\n setCurrentSchema(allComponentsToTag);\n // go through all components and find the future versions for them\n isSnap\n ? setHashes(allComponentsToTag)\n : await setFutureVersions(\n allComponentsToTag,\n legacyScope,\n releaseType,\n exactVersion,\n persist,\n autoTagIds,\n ids,\n incrementBy,\n preReleaseId,\n soft,\n tagDataPerComp\n );\n // go through all dependencies and update their versions\n updateDependenciesVersions(allComponentsToTag, dependencyResolver);\n\n await addLogToComponents(componentsToTag, autoTagComponents, persist, message, messagePerId, copyLogFromPreviousSnap);\n // don't move it down. otherwise, it'll be empty and we don't know which components were during merge.\n // (it's being deleted in snapping.main.runtime - `_addCompToObjects` method)\n const unmergedComps = workspace ? await workspace.listComponentsDuringMerge() : [];\n let stagedConfig;\n if (soft) {\n if (!consumer) throw new Error(`unable to soft-tag without consumer`);\n consumer.updateNextVersionOnBitmap(allComponentsToTag, preReleaseId);\n } else {\n await snapping._addFlattenedDependenciesToComponents(allComponentsToTag, rebuildDepsGraph);\n await snapping.throwForDepsFromAnotherLane(allComponentsToTag);\n if (!build) emptyBuilderData(allComponentsToTag);\n addBuildStatus(allComponentsToTag, BuildStatus.Pending);\n await addComponentsToScope(legacyScope, snapping, allComponentsToTag, Boolean(build), consumer, tagDataPerComp);\n\n if (workspace) {\n const modelComponents = await Promise.all(\n allComponentsToTag.map((c) => {\n return c.modelComponent || legacyScope.getModelComponent(c.id);\n })\n );\n stagedConfig = await updateComponentsVersions(workspace, modelComponents);\n }\n }\n\n const publishedPackages: string[] = [];\n let harmonyComps: Component[] = [];\n if (build) {\n const onTagOpts: OnTagOpts = {\n disableTagAndSnapPipelines,\n throwOnError: true,\n forceDeploy: ignoreBuildErrors,\n isSnap,\n populateArtifactsFrom,\n };\n const seedersOnly = !workspace; // if tag from scope, build only the given components\n const isolateOptions = { packageManagerConfigRootDir, seedersOnly };\n const builderOptions = { exitOnFirstFailedTask, skipTests };\n\n const componentsToBuild = allComponentsToTag.filter((c) => !c.isRemoved());\n if (componentsToBuild.length) {\n await scope.reloadAspectsWithNewVersion(componentsToBuild);\n harmonyComps = await (workspace || scope).getManyByLegacy(componentsToBuild);\n const { builderDataMap } = await builder.tagListener(harmonyComps, onTagOpts, isolateOptions, builderOptions);\n const buildResult = scope.builderDataMapToLegacyOnTagResults(builderDataMap);\n\n snapping._updateComponentsByTagResult(componentsToBuild, buildResult);\n publishedPackages.push(...snapping._getPublishedPackages(componentsToBuild));\n addBuildStatus(componentsToBuild, BuildStatus.Succeed);\n await mapSeries(componentsToBuild, (consumerComponent) => snapping._enrichComp(consumerComponent));\n }\n }\n\n let removedComponents: ComponentIdList | undefined;\n if (!soft) {\n removedComponents = await removeDeletedComponentsFromBitmap(allComponentsToTag, workspace);\n await legacyScope.objects.persist();\n await removeMergeConfigFromComponents(unmergedComps, allComponentsToTag, workspace);\n if (workspace) {\n await linkToNodeModulesByComponents(\n harmonyComps.length ? harmonyComps : await workspace.scope.getManyByLegacy(allComponentsToTag),\n workspace\n );\n }\n }\n\n return {\n taggedComponents: componentsToTag,\n autoTaggedResults: autoTagData,\n publishedPackages,\n stagedConfig,\n removedComponents,\n };\n}\n\nasync function removeDeletedComponentsFromBitmap(\n comps: ConsumerComponent[],\n workspace?: Workspace\n): Promise<ComponentIdList | undefined> {\n if (!workspace) {\n return undefined;\n }\n const removedComps = comps.filter((comp) => comp.isRemoved());\n if (!removedComps.length) return undefined;\n const compBitIdsToRemove = ComponentIdList.fromArray(removedComps.map((c) => c.id));\n await deleteComponentsFiles(workspace.consumer, compBitIdsToRemove);\n await workspace.consumer.cleanFromBitMap(compBitIdsToRemove);\n\n return compBitIdsToRemove;\n}\n\nasync function removeMergeConfigFromComponents(\n unmergedComps: ComponentID[],\n components: ConsumerComponent[],\n workspace?: Workspace\n) {\n if (!workspace || !unmergedComps.length) {\n return;\n }\n const configMergeFile = workspace.getConflictMergeFile();\n\n unmergedComps.forEach((compId) => {\n const isNowSnapped = components.find((c) => c.id.isEqualWithoutVersion(compId));\n if (isNowSnapped) {\n configMergeFile.removeConflict(compId.toStringWithoutVersion());\n }\n });\n const currentlyUnmerged = workspace ? await workspace.listComponentsDuringMerge() : [];\n if (configMergeFile.hasConflict() && currentlyUnmerged.length) {\n // it's possible that \"workspace\" section is still there. but if all \"unmerged\" are now merged,\n // then, it's safe to delete the file.\n await configMergeFile.write();\n } else {\n await configMergeFile.delete();\n }\n}\n\nasync function addComponentsToScope(\n scope: Scope,\n snapping: SnappingMain,\n components: ConsumerComponent[],\n shouldValidateVersion: boolean,\n consumer?: Consumer,\n tagDataPerComp?: TagDataPerComp[]\n) {\n const lane = await scope.getCurrentLaneObject();\n if (consumer) {\n await mapSeries(components, async (component) => {\n await snapping._addCompToObjects({\n source: component,\n consumer,\n lane,\n shouldValidateVersion,\n });\n });\n } else {\n await mapSeries(components, async (component) => {\n const results = await snapping._addCompFromScopeToObjects(component, lane);\n\n // in case \"tagData.isNew\", the version object has \"parents\" that should not be there.\n // they got created as a workaround to generate a new component from the scope without having a workspace.\n const tagData = tagDataPerComp?.find((t) => t.componentId.isEqualWithoutVersion(component.id));\n if (tagData?.isNew) results.version.removeAllParents();\n });\n }\n}\n\n/**\n * otherwise, tagging without build will have the old build data of the previous snap/tag.\n * in case we currently build, it's ok to leave the data as is, because it'll be overridden anyway.\n */\nfunction emptyBuilderData(components: ConsumerComponent[]) {\n components.forEach((component) => {\n component.extensions = component.extensions.clone();\n const existingBuilder = component.extensions.findCoreExtension(Extensions.builder);\n if (existingBuilder) existingBuilder.data = {};\n });\n}\n\nasync function addLogToComponents(\n components: ConsumerComponent[],\n autoTagComps: ConsumerComponent[],\n persist: boolean,\n message: string,\n messagePerComponent: MessagePerComponent[],\n copyLogFromPreviousSnap = false\n) {\n // @ts-ignore this happens when running `bit tag -m \"\"`.\n if (message === true) {\n message = '';\n }\n const basicLog = await getBasicLog();\n const getLog = (component: ConsumerComponent): Log => {\n const nextVersion = persist ? component.componentMap?.nextVersion : null;\n const msgFromEditor = messagePerComponent.find((item) => item.id.isEqualWithoutVersion(component.id))?.msg;\n if (copyLogFromPreviousSnap) {\n const currentLog = component.log;\n if (!currentLog) {\n throw new Error(\n `addLogToComponents is set copyLogFromPreviousSnap: true, but it is unable to find log in the previous snap`\n );\n }\n currentLog.message = msgFromEditor || message || currentLog.message;\n currentLog.date = basicLog.date;\n return currentLog;\n }\n\n return {\n username: nextVersion?.username || basicLog.username,\n email: nextVersion?.email || basicLog.email,\n message: nextVersion?.message || msgFromEditor || message,\n date: basicLog.date,\n };\n };\n\n components.forEach((component) => {\n component.log = getLog(component);\n });\n autoTagComps.forEach((autoTagComp) => {\n autoTagComp.log = getLog(autoTagComp);\n const defaultMsg = 'bump dependencies versions';\n if (message) {\n autoTagComp.log.message += ` (${defaultMsg})`;\n } else if (!autoTagComp.log.message) {\n autoTagComp.log.message = defaultMsg;\n }\n });\n}\n\nexport async function getBasicLog(): Promise<Log> {\n const username = (await getBitCloudUsername()) || (await globalConfig.get(CFG_USER_NAME_KEY));\n const email = await globalConfig.get(CFG_USER_EMAIL_KEY);\n return {\n username,\n email,\n message: '',\n date: Date.now().toString(),\n };\n}\n\nexport async function getBitCloudUsername(): Promise<string | undefined> {\n const token = await globalConfig.get(CFG_USER_TOKEN_KEY);\n if (!token) return '';\n try {\n const res = await fetch(`https://api.${getCloudDomain()}/user`, {\n headers: {\n Authorization: `Bearer ${token}`,\n 'Content-Type': 'application/json',\n },\n });\n const object = await res.json();\n const user = object.payload;\n const username = user.username;\n return username;\n } catch (error) {\n return undefined;\n }\n}\n\nexport type BitCloudUser = {\n username?: string;\n name?: string;\n displayName?: string;\n profileImage?: string;\n};\n\nexport async function getBitCloudUser(): Promise<BitCloudUser | undefined> {\n const token = await globalConfig.get(CFG_USER_TOKEN_KEY);\n if (!token) return undefined;\n\n try {\n const res = await fetch(`https://api.${getCloudDomain()}/user`, {\n headers: {\n Authorization: `Bearer ${token}`,\n 'Content-Type': 'application/json',\n },\n });\n const object = await res.json();\n const user = object.payload;\n\n return {\n ...user,\n };\n } catch (error) {\n return undefined;\n }\n}\n\nfunction setCurrentSchema(components: ConsumerComponent[]) {\n components.forEach((component) => {\n component.schema = CURRENT_SCHEMA;\n });\n}\n\nfunction addBuildStatus(components: ConsumerComponent[], buildStatus: BuildStatus) {\n components.forEach((component) => {\n component.buildStatus = buildStatus;\n });\n}\n\nexport async function updateComponentsVersions(\n workspace: Workspace,\n components: Array<ModelComponent>,\n isTag = true\n): Promise<StagedConfig> {\n const consumer = workspace.consumer;\n const currentLane = consumer.getCurrentLaneId();\n const stagedConfig = await workspace.scope.getStagedConfig();\n const isAvailableOnMain = async (\n component: ModelComponent | ConsumerComponent,\n id: ComponentID\n ): Promise<boolean> => {\n if (currentLane.isDefault()) {\n return true;\n }\n if (!id.hasVersion()) {\n // component was unsnapped on the current lane and is back to a new component\n return true;\n }\n const modelComponent =\n component instanceof ModelComponent ? component : await consumer.scope.getModelComponent(component.id);\n return modelComponent.hasHead();\n };\n\n const updateVersions = async (modelComponent: ModelComponent) => {\n const id: ComponentID = modelComponent.toBitIdWithLatestVersionAllowNull();\n consumer.bitMap.updateComponentId(id, undefined, undefined, true);\n const availableOnMain = await isAvailableOnMain(modelComponent, id);\n if (!availableOnMain) {\n consumer.bitMap.setOnLanesOnly(id, true);\n }\n const componentMap = consumer.bitMap.getComponent(id);\n const compId = await workspace.resolveComponentId(id);\n // it can be either a tag/snap or reset.\n if (isTag) {\n const config = componentMap.config;\n stagedConfig.addComponentConfig(compId, config);\n consumer.bitMap.removeConfig(id);\n const hash = modelComponent.getRef(id.version as string);\n if (!hash) throw new Error(`updateComponentsVersions: unable to find a hash for ${id.toString()}`);\n workspace.scope.legacyScope.stagedSnaps.addSnap(hash?.toString());\n } else if (!componentMap.config) {\n componentMap.config = stagedConfig.getConfigPerId(compId);\n }\n componentMap.clearNextVersion();\n };\n // important! DO NOT use Promise.all here! otherwise, you're gonna enter into a whole world of pain.\n // imagine tagging comp1 with auto-tagged comp2, comp1 package.json is written while comp2 is\n // trying to get the dependencies of comp1 using its package.json.\n await mapSeries(components, updateVersions);\n await workspace.scope.legacyScope.stagedSnaps.write();\n\n return stagedConfig;\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,OAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,MAAA,YAAAA,CAAA;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lN,YAAY,CAACkN,MAAM,GAAG3H,YAAY,CAACkI,cAAc,CAAChF,MAAM,CAAC;IAC3D;IACAzI,YAAY,CAAC0N,gBAAgB,CAAC,CAAC;EACjC,CAAC;EACD;EACA;EACA;EACA,MAAM,IAAAnG,qBAAS,EAACe,UAAU,EAAEoE,cAAc,CAAC;EAC3C,MAAMpL,SAAS,CAAC5C,KAAK,CAAC+D,WAAW,CAAC8K,WAAW,CAACzE,KAAK,CAAC,CAAC;EAErD,OAAOvD,YAAY;AACrB"}
1
+ {"version":3,"names":["_pMapSeries","data","_interopRequireDefault","require","_nodeFetch","_ramda","_lodash","_uuid","_bitError","globalConfig","_interopRequireWildcard","_componentId","_constants","_componentSchema","_workspaceModules","_exceptions","_deleteComponentFiles","_logger","_utils","_autoTag","_semverHelper","_messagePerComponent","_models","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","key","value","_toPropertyKey","configurable","writable","_toPrimitive","String","Symbol","toPrimitive","TypeError","Number","updateDependenciesVersions","componentsToTag","dependencyResolver","getNewDependencyVersion","id","foundDependency","find","component","isEqualWithoutVersion","changeVersion","version","changeExtensionsVersion","extensions","ext","extensionId","newDepId","oneComponentToTag","getAllDependencies","dependency","updateDepsOnLegacyTag","bind","setHashes","componentToTag","setNewVersion","sha1","v4","setFutureVersions","scope","releaseType","exactVersion","persist","autoTagIds","ids","incrementBy","preReleaseId","soft","tagDataPerComp","isPreReleaseLike","includes","Promise","all","map","isAutoTag","hasWithoutVersion","modelComponent","sources","findOrAddComponent","nextVersion","componentMap","getNewVersion","tagData","componentId","Error","toStringWithoutVersion","versionToTag","exactVersionOrReleaseType","getValidVersionOrReleaseType","getVersionToAdd","prereleaseId","undefined","preRelease","versionByEnteredId","getVersionByEnteredId","newVersion","enteredIds","enteredId","searchWithoutVersion","hasVersion","tagModelComponent","workspace","snapping","builder","consumerComponents","populateArtifactsFrom","message","editor","ignoreNewestVersion","skipTests","skipAutoTag","build","isSnap","disableTagAndSnapPipelines","ignoreBuildErrors","rebuildDepsGraph","packageManagerConfigRootDir","copyLogFromPreviousSnap","exitOnFirstFailedTask","consumer","legacyScope","consumerComponentsIdsMap","consumerComponent","componentIdString","toString","R","values","idsToTag","ComponentIdList","fromArray","c","idsToTriggerAutoTag","autoTagData","getAutoTagInfo","autoTagComponents","autoTagItem","autoTagComponentsFiltered","autoTag","allComponentsToTag","messagesFromEditorFetcher","MessagePerComponentFetcher","getMessagePerId","getMessagesFromEditor","tmp","msg","messagePerId","newestVersionsP","componentFromModel","getModelComponentIfExist","BitError","listVersions","latest","getHeadRegardlessOfLaneAsTagOrHash","currentVersion","latestVersion","newestVersions","newestVersionsWithoutEmpty","newest","isEmpty","NewerVersionFound","logger","debugAndAddBreadCrumb","setCurrentSchema","addLogToComponents","unmergedComps","listComponentsDuringMerge","stagedConfig","updateNextVersionOnBitmap","_addFlattenedDependenciesToComponents","throwForDepsFromAnotherLane","emptyBuilderData","addBuildStatus","BuildStatus","Pending","addComponentsToScope","Boolean","modelComponents","getModelComponent","updateComponentsVersions","publishedPackages","harmonyComps","onTagOpts","throwOnError","forceDeploy","seedersOnly","isolateOptions","builderOptions","componentsToBuild","isRemoved","reloadAspectsWithNewVersion","getManyByLegacy","builderDataMap","tagListener","buildResult","builderDataMapToLegacyOnTagResults","_updateComponentsByTagResult","_getPublishedPackages","Succeed","mapSeries","_enrichComp","removedComponents","removeDeletedComponentsFromBitmap","objects","removeMergeConfigFromComponents","linkToNodeModulesByComponents","taggedComponents","autoTaggedResults","comps","removedComps","comp","compBitIdsToRemove","deleteComponentsFiles","cleanFromBitMap","components","configMergeFile","getConflictMergeFile","compId","isNowSnapped","removeConflict","currentlyUnmerged","hasConflict","write","delete","shouldValidateVersion","lane","getCurrentLaneObject","_addCompToObjects","source","results","_addCompFromScopeToObjects","isNew","removeAllParents","clone","existingBuilder","findCoreExtension","Extensions","autoTagComps","messagePerComponent","basicLog","getBasicLog","getLog","msgFromEditor","item","currentLog","log","date","username","email","autoTagComp","defaultMsg","getBitCloudUsername","CFG_USER_NAME_KEY","CFG_USER_EMAIL_KEY","Date","now","token","CFG_USER_TOKEN_KEY","res","fetch","getCloudDomain","headers","Authorization","object","json","user","payload","error","getBitCloudUser","schema","CURRENT_SCHEMA","buildStatus","isTag","currentLane","getCurrentLaneId","getStagedConfig","isAvailableOnMain","isDefault","ModelComponent","hasHead","updateVersions","toBitIdWithLatestVersionAllowNull","bitMap","updateComponentId","availableOnMain","setOnLanesOnly","getComponent","resolveComponentId","config","addComponentConfig","removeConfig","hash","getRef","stagedSnaps","addSnap","getConfigPerId","clearNextVersion"],"sources":["tag-model-component.ts"],"sourcesContent":["import mapSeries from 'p-map-series';\nimport fetch from 'node-fetch';\nimport R from 'ramda';\nimport { isEmpty } from 'lodash';\nimport { ReleaseType } from 'semver';\nimport { v4 } from 'uuid';\nimport { BitError } from '@teambit/bit-error';\nimport * as globalConfig from '@teambit/legacy/dist/api/consumer/lib/global-config';\nimport { Scope } from '@teambit/legacy/dist/scope';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport {\n BuildStatus,\n CFG_USER_EMAIL_KEY,\n CFG_USER_NAME_KEY,\n CFG_USER_TOKEN_KEY,\n getCloudDomain,\n Extensions,\n} from '@teambit/legacy/dist/constants';\nimport { CURRENT_SCHEMA } from '@teambit/legacy/dist/consumer/component/component-schema';\nimport { linkToNodeModulesByComponents } from '@teambit/workspace.modules.node-modules-linker';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport Consumer from '@teambit/legacy/dist/consumer/consumer';\nimport { NewerVersionFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport { Component } from '@teambit/component';\nimport deleteComponentsFiles from '@teambit/legacy/dist/consumer/component-ops/delete-component-files';\nimport logger from '@teambit/legacy/dist/logger/logger';\nimport { sha1 } from '@teambit/legacy/dist/utils';\nimport { AutoTagResult, getAutoTagInfo } from '@teambit/legacy/dist/scope/component-ops/auto-tag';\nimport { getValidVersionOrReleaseType } from '@teambit/legacy/dist/utils/semver-helper';\nimport { BuilderMain, OnTagOpts } from '@teambit/builder';\nimport { Log } from '@teambit/legacy/dist/scope/models/version';\nimport {\n MessagePerComponent,\n MessagePerComponentFetcher,\n} from '@teambit/legacy/dist/scope/component-ops/message-per-component';\nimport { ModelComponent } from '@teambit/legacy/dist/scope/models';\nimport { DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { ScopeMain, StagedConfig } from '@teambit/scope';\nimport { Workspace } from '@teambit/workspace';\nimport { SnappingMain, TagDataPerComp } from './snapping.main.runtime';\n\nexport type onTagIdTransformer = (id: ComponentID) => ComponentID | null;\n\nexport type BasicTagSnapParams = {\n message: string;\n skipTests?: boolean;\n build?: boolean;\n ignoreBuildErrors?: boolean;\n rebuildDepsGraph?: boolean;\n};\n\nexport type BasicTagParams = BasicTagSnapParams & {\n ignoreNewestVersion?: boolean;\n skipAutoTag?: boolean;\n soft?: boolean;\n persist: boolean;\n disableTagAndSnapPipelines?: boolean;\n preReleaseId?: string;\n editor?: string;\n unmodified?: boolean;\n};\n\nfunction updateDependenciesVersions(\n componentsToTag: ConsumerComponent[],\n dependencyResolver: DependencyResolverMain\n): void {\n const getNewDependencyVersion = (id: ComponentID): ComponentID | null => {\n const foundDependency = componentsToTag.find((component) => component.id.isEqualWithoutVersion(id));\n return foundDependency ? id.changeVersion(foundDependency.version) : null;\n };\n const changeExtensionsVersion = (component: ConsumerComponent): void => {\n component.extensions.forEach((ext) => {\n if (ext.extensionId) {\n const newDepId = getNewDependencyVersion(ext.extensionId);\n if (newDepId) ext.extensionId = newDepId;\n }\n });\n };\n\n componentsToTag.forEach((oneComponentToTag) => {\n oneComponentToTag.getAllDependencies().forEach((dependency) => {\n const newDepId = getNewDependencyVersion(dependency.id);\n if (newDepId) dependency.id = newDepId;\n });\n changeExtensionsVersion(oneComponentToTag);\n // @ts-ignore\n oneComponentToTag = dependencyResolver.updateDepsOnLegacyTag(oneComponentToTag, getNewDependencyVersion.bind(this));\n });\n}\n\nfunction setHashes(componentsToTag: ConsumerComponent[]): void {\n componentsToTag.forEach((componentToTag) => {\n componentToTag.setNewVersion(sha1(v4()));\n });\n}\n\nasync function setFutureVersions(\n componentsToTag: ConsumerComponent[],\n scope: Scope,\n releaseType: ReleaseType | undefined,\n exactVersion: string | null | undefined,\n persist: boolean,\n autoTagIds: ComponentIdList,\n ids: ComponentIdList,\n incrementBy?: number,\n preReleaseId?: string,\n soft?: boolean,\n tagDataPerComp?: TagDataPerComp[]\n): Promise<void> {\n const isPreReleaseLike = releaseType\n ? ['prerelease', 'premajor', 'preminor', 'prepatch'].includes(releaseType)\n : false;\n await Promise.all(\n componentsToTag.map(async (componentToTag) => {\n const isAutoTag = autoTagIds.hasWithoutVersion(componentToTag.id);\n const modelComponent = await scope.sources.findOrAddComponent(componentToTag);\n const nextVersion = componentToTag.componentMap?.nextVersion?.version;\n const getNewVersion = (): string => {\n if (tagDataPerComp) {\n const tagData = tagDataPerComp.find((t) => t.componentId.isEqualWithoutVersion(componentToTag.id));\n if (!tagData) throw new Error(`tag-data is missing for ${componentToTag.id.toStringWithoutVersion()}`);\n if (!tagData.versionToTag)\n throw new Error(`tag-data.TagResults is missing for ${componentToTag.id.toStringWithoutVersion()}`);\n const exactVersionOrReleaseType = getValidVersionOrReleaseType(tagData.versionToTag);\n return modelComponent.getVersionToAdd(\n exactVersionOrReleaseType.releaseType,\n exactVersionOrReleaseType.exactVersion,\n incrementBy,\n tagData.prereleaseId\n );\n }\n if (nextVersion && persist) {\n const exactVersionOrReleaseType = getValidVersionOrReleaseType(nextVersion);\n return modelComponent.getVersionToAdd(\n exactVersionOrReleaseType.releaseType,\n exactVersionOrReleaseType.exactVersion,\n undefined,\n componentToTag.componentMap?.nextVersion?.preRelease\n );\n }\n if (isAutoTag) {\n // auto-tag always bumped as patch unless it's pre-release\n if (isPreReleaseLike) {\n return soft\n ? (releaseType as string)\n : modelComponent.getVersionToAdd(releaseType, exactVersion, incrementBy, preReleaseId);\n }\n return soft ? 'patch' : modelComponent.getVersionToAdd('patch', undefined, incrementBy, preReleaseId);\n }\n const versionByEnteredId = getVersionByEnteredId(ids, componentToTag, modelComponent);\n return soft\n ? versionByEnteredId || exactVersion || (releaseType as string)\n : versionByEnteredId || modelComponent.getVersionToAdd(releaseType, exactVersion, incrementBy, preReleaseId);\n };\n const newVersion = getNewVersion();\n componentToTag.setNewVersion(newVersion);\n })\n );\n}\n\nfunction getVersionByEnteredId(\n enteredIds: ComponentIdList,\n component: ConsumerComponent,\n modelComponent: ModelComponent\n): string | undefined {\n const enteredId = enteredIds.searchWithoutVersion(component.id);\n if (enteredId && enteredId.hasVersion()) {\n const exactVersionOrReleaseType = getValidVersionOrReleaseType(enteredId.version as string);\n return modelComponent.getVersionToAdd(\n exactVersionOrReleaseType.releaseType,\n exactVersionOrReleaseType.exactVersion\n );\n }\n return undefined;\n}\n\nexport async function tagModelComponent({\n workspace,\n scope,\n snapping,\n builder,\n consumerComponents,\n ids,\n tagDataPerComp,\n populateArtifactsFrom,\n message,\n editor,\n exactVersion,\n releaseType,\n preReleaseId,\n ignoreNewestVersion = false,\n skipTests = false,\n skipAutoTag,\n soft,\n build,\n persist,\n isSnap = false,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n rebuildDepsGraph,\n incrementBy,\n packageManagerConfigRootDir,\n dependencyResolver,\n copyLogFromPreviousSnap = false,\n exitOnFirstFailedTask = false,\n}: {\n workspace?: Workspace;\n scope: ScopeMain;\n snapping: SnappingMain;\n builder: BuilderMain;\n consumerComponents: ConsumerComponent[];\n ids: ComponentIdList;\n tagDataPerComp?: TagDataPerComp[];\n populateArtifactsFrom?: ComponentID[];\n copyLogFromPreviousSnap?: boolean;\n exactVersion?: string | null | undefined;\n releaseType?: ReleaseType;\n incrementBy?: number;\n isSnap?: boolean;\n packageManagerConfigRootDir?: string;\n dependencyResolver: DependencyResolverMain;\n exitOnFirstFailedTask?: boolean;\n} & BasicTagParams): Promise<{\n taggedComponents: ConsumerComponent[];\n autoTaggedResults: AutoTagResult[];\n publishedPackages: string[];\n stagedConfig?: StagedConfig;\n removedComponents?: ComponentIdList;\n}> {\n const consumer = workspace?.consumer;\n const legacyScope = scope.legacyScope;\n const consumerComponentsIdsMap = {};\n // Concat and unique all the dependencies from all the components so we will not import\n // the same dependency more then once, it's mainly for performance purpose\n consumerComponents.forEach((consumerComponent) => {\n const componentIdString = consumerComponent.id.toString();\n // Store it in a map so we can take it easily from the sorted array which contain only the id\n consumerComponentsIdsMap[componentIdString] = consumerComponent;\n });\n const componentsToTag: ConsumerComponent[] = R.values(consumerComponentsIdsMap); // consumerComponents unique\n const idsToTag = ComponentIdList.fromArray(componentsToTag.map((c) => c.id));\n // ids without versions are new. it's impossible that tagged (and not-modified) components has\n // them as dependencies.\n const idsToTriggerAutoTag = idsToTag.filter((id) => id.hasVersion());\n const autoTagData =\n skipAutoTag || !consumer ? [] : await getAutoTagInfo(consumer, ComponentIdList.fromArray(idsToTriggerAutoTag));\n const autoTagComponents = autoTagData.map((autoTagItem) => autoTagItem.component);\n const autoTagComponentsFiltered = autoTagComponents.filter((c) => !idsToTag.has(c.id));\n const autoTagIds = ComponentIdList.fromArray(autoTagComponentsFiltered.map((autoTag) => autoTag.id));\n const allComponentsToTag = [...componentsToTag, ...autoTagComponentsFiltered];\n\n const messagesFromEditorFetcher = new MessagePerComponentFetcher(idsToTag, autoTagIds);\n const getMessagePerId = async () => {\n if (editor) return messagesFromEditorFetcher.getMessagesFromEditor(legacyScope.tmp, editor);\n if (tagDataPerComp) return tagDataPerComp.map((t) => ({ id: t.componentId, msg: t.message || message }));\n return [];\n };\n const messagePerId = await getMessagePerId();\n\n // check for each one of the components whether it is using an old version\n if (!ignoreNewestVersion && !isSnap) {\n const newestVersionsP = allComponentsToTag.map(async (component) => {\n if (component.componentFromModel) {\n // otherwise it's a new component, so this check is irrelevant\n const modelComponent = await legacyScope.getModelComponentIfExist(component.id);\n if (!modelComponent) throw new BitError(`component ${component.id} was not found in the model`);\n if (!modelComponent.listVersions().length) return null; // no versions yet, no issues.\n const latest = modelComponent.getHeadRegardlessOfLaneAsTagOrHash();\n if (latest !== component.version) {\n return {\n componentId: component.id.toStringWithoutVersion(),\n currentVersion: component.version,\n latestVersion: latest,\n };\n }\n }\n return null;\n });\n const newestVersions = await Promise.all(newestVersionsP);\n const newestVersionsWithoutEmpty = newestVersions.filter((newest) => newest);\n if (!isEmpty(newestVersionsWithoutEmpty)) {\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n throw new NewerVersionFound(newestVersionsWithoutEmpty);\n }\n }\n\n logger.debugAndAddBreadCrumb('tag-model-components', 'sequentially persist all components');\n setCurrentSchema(allComponentsToTag);\n // go through all components and find the future versions for them\n isSnap\n ? setHashes(allComponentsToTag)\n : await setFutureVersions(\n allComponentsToTag,\n legacyScope,\n releaseType,\n exactVersion,\n persist,\n autoTagIds,\n ids,\n incrementBy,\n preReleaseId,\n soft,\n tagDataPerComp\n );\n // go through all dependencies and update their versions\n updateDependenciesVersions(allComponentsToTag, dependencyResolver);\n\n await addLogToComponents(componentsToTag, autoTagComponents, persist, message, messagePerId, copyLogFromPreviousSnap);\n // don't move it down. otherwise, it'll be empty and we don't know which components were during merge.\n // (it's being deleted in snapping.main.runtime - `_addCompToObjects` method)\n const unmergedComps = workspace ? await workspace.listComponentsDuringMerge() : [];\n let stagedConfig;\n if (soft) {\n if (!consumer) throw new Error(`unable to soft-tag without consumer`);\n consumer.updateNextVersionOnBitmap(allComponentsToTag, preReleaseId);\n } else {\n await snapping._addFlattenedDependenciesToComponents(allComponentsToTag, rebuildDepsGraph);\n await snapping.throwForDepsFromAnotherLane(allComponentsToTag);\n if (!build) emptyBuilderData(allComponentsToTag);\n addBuildStatus(allComponentsToTag, BuildStatus.Pending);\n await addComponentsToScope(legacyScope, snapping, allComponentsToTag, Boolean(build), consumer, tagDataPerComp);\n\n if (workspace) {\n const modelComponents = await Promise.all(\n allComponentsToTag.map((c) => {\n return c.modelComponent || legacyScope.getModelComponent(c.id);\n })\n );\n stagedConfig = await updateComponentsVersions(workspace, modelComponents);\n }\n }\n\n const publishedPackages: string[] = [];\n let harmonyComps: Component[] = [];\n if (build) {\n const onTagOpts: OnTagOpts = {\n disableTagAndSnapPipelines,\n throwOnError: true,\n forceDeploy: ignoreBuildErrors,\n isSnap,\n populateArtifactsFrom,\n };\n const seedersOnly = !workspace; // if tag from scope, build only the given components\n const isolateOptions = { packageManagerConfigRootDir, seedersOnly };\n const builderOptions = { exitOnFirstFailedTask, skipTests };\n\n const componentsToBuild = allComponentsToTag.filter((c) => !c.isRemoved());\n if (componentsToBuild.length) {\n await scope.reloadAspectsWithNewVersion(componentsToBuild);\n harmonyComps = await (workspace || scope).getManyByLegacy(componentsToBuild);\n const { builderDataMap } = await builder.tagListener(harmonyComps, onTagOpts, isolateOptions, builderOptions);\n const buildResult = scope.builderDataMapToLegacyOnTagResults(builderDataMap);\n\n snapping._updateComponentsByTagResult(componentsToBuild, buildResult);\n publishedPackages.push(...snapping._getPublishedPackages(componentsToBuild));\n addBuildStatus(componentsToBuild, BuildStatus.Succeed);\n await mapSeries(componentsToBuild, (consumerComponent) => snapping._enrichComp(consumerComponent));\n }\n }\n\n let removedComponents: ComponentIdList | undefined;\n if (!soft) {\n removedComponents = await removeDeletedComponentsFromBitmap(allComponentsToTag, workspace);\n await legacyScope.objects.persist();\n await removeMergeConfigFromComponents(unmergedComps, allComponentsToTag, workspace);\n if (workspace) {\n await linkToNodeModulesByComponents(\n harmonyComps.length ? harmonyComps : await workspace.scope.getManyByLegacy(allComponentsToTag),\n workspace\n );\n }\n }\n\n return {\n taggedComponents: componentsToTag,\n autoTaggedResults: autoTagData,\n publishedPackages,\n stagedConfig,\n removedComponents,\n };\n}\n\nasync function removeDeletedComponentsFromBitmap(\n comps: ConsumerComponent[],\n workspace?: Workspace\n): Promise<ComponentIdList | undefined> {\n if (!workspace) {\n return undefined;\n }\n const removedComps = comps.filter((comp) => comp.isRemoved());\n if (!removedComps.length) return undefined;\n const compBitIdsToRemove = ComponentIdList.fromArray(removedComps.map((c) => c.id));\n await deleteComponentsFiles(workspace.consumer, compBitIdsToRemove);\n await workspace.consumer.cleanFromBitMap(compBitIdsToRemove);\n\n return compBitIdsToRemove;\n}\n\nasync function removeMergeConfigFromComponents(\n unmergedComps: ComponentID[],\n components: ConsumerComponent[],\n workspace?: Workspace\n) {\n if (!workspace || !unmergedComps.length) {\n return;\n }\n const configMergeFile = workspace.getConflictMergeFile();\n\n unmergedComps.forEach((compId) => {\n const isNowSnapped = components.find((c) => c.id.isEqualWithoutVersion(compId));\n if (isNowSnapped) {\n configMergeFile.removeConflict(compId.toStringWithoutVersion());\n }\n });\n const currentlyUnmerged = workspace ? await workspace.listComponentsDuringMerge() : [];\n if (configMergeFile.hasConflict() && currentlyUnmerged.length) {\n // it's possible that \"workspace\" section is still there. but if all \"unmerged\" are now merged,\n // then, it's safe to delete the file.\n await configMergeFile.write();\n } else {\n await configMergeFile.delete();\n }\n}\n\nasync function addComponentsToScope(\n scope: Scope,\n snapping: SnappingMain,\n components: ConsumerComponent[],\n shouldValidateVersion: boolean,\n consumer?: Consumer,\n tagDataPerComp?: TagDataPerComp[]\n) {\n const lane = await scope.getCurrentLaneObject();\n if (consumer) {\n await mapSeries(components, async (component) => {\n await snapping._addCompToObjects({\n source: component,\n consumer,\n lane,\n shouldValidateVersion,\n });\n });\n } else {\n await mapSeries(components, async (component) => {\n const results = await snapping._addCompFromScopeToObjects(component, lane);\n\n // in case \"tagData.isNew\", the version object has \"parents\" that should not be there.\n // they got created as a workaround to generate a new component from the scope without having a workspace.\n const tagData = tagDataPerComp?.find((t) => t.componentId.isEqualWithoutVersion(component.id));\n if (tagData?.isNew) results.version.removeAllParents();\n });\n }\n}\n\n/**\n * otherwise, tagging without build will have the old build data of the previous snap/tag.\n * in case we currently build, it's ok to leave the data as is, because it'll be overridden anyway.\n */\nfunction emptyBuilderData(components: ConsumerComponent[]) {\n components.forEach((component) => {\n component.extensions = component.extensions.clone();\n const existingBuilder = component.extensions.findCoreExtension(Extensions.builder);\n if (existingBuilder) existingBuilder.data = {};\n });\n}\n\nasync function addLogToComponents(\n components: ConsumerComponent[],\n autoTagComps: ConsumerComponent[],\n persist: boolean,\n message: string,\n messagePerComponent: MessagePerComponent[],\n copyLogFromPreviousSnap = false\n) {\n // @ts-ignore this happens when running `bit tag -m \"\"`.\n if (message === true) {\n message = '';\n }\n const basicLog = await getBasicLog();\n const getLog = (component: ConsumerComponent): Log => {\n const nextVersion = persist ? component.componentMap?.nextVersion : null;\n const msgFromEditor = messagePerComponent.find((item) => item.id.isEqualWithoutVersion(component.id))?.msg;\n if (copyLogFromPreviousSnap) {\n const currentLog = component.log;\n if (!currentLog) {\n throw new Error(\n `addLogToComponents is set copyLogFromPreviousSnap: true, but it is unable to find log in the previous snap`\n );\n }\n currentLog.message = msgFromEditor || message || currentLog.message;\n currentLog.date = basicLog.date;\n return currentLog;\n }\n\n return {\n username: nextVersion?.username || basicLog.username,\n email: nextVersion?.email || basicLog.email,\n message: nextVersion?.message || msgFromEditor || message,\n date: basicLog.date,\n };\n };\n\n components.forEach((component) => {\n component.log = getLog(component);\n });\n autoTagComps.forEach((autoTagComp) => {\n autoTagComp.log = getLog(autoTagComp);\n const defaultMsg = 'bump dependencies versions';\n if (message) {\n autoTagComp.log.message += ` (${defaultMsg})`;\n } else if (!autoTagComp.log.message) {\n autoTagComp.log.message = defaultMsg;\n }\n });\n}\n\nexport async function getBasicLog(): Promise<Log> {\n const username = (await getBitCloudUsername()) || (await globalConfig.get(CFG_USER_NAME_KEY));\n const email = await globalConfig.get(CFG_USER_EMAIL_KEY);\n return {\n username,\n email,\n message: '',\n date: Date.now().toString(),\n };\n}\n\nexport async function getBitCloudUsername(): Promise<string | undefined> {\n const token = await globalConfig.get(CFG_USER_TOKEN_KEY);\n if (!token) return '';\n try {\n const res = await fetch(`https://api.${getCloudDomain()}/user`, {\n headers: {\n Authorization: `Bearer ${token}`,\n 'Content-Type': 'application/json',\n },\n });\n const object = await res.json();\n const user = object.payload;\n const username = user.username;\n return username;\n } catch (error) {\n return undefined;\n }\n}\n\nexport type BitCloudUser = {\n username?: string;\n name?: string;\n displayName?: string;\n profileImage?: string;\n};\n\nexport async function getBitCloudUser(): Promise<BitCloudUser | undefined> {\n const token = await globalConfig.get(CFG_USER_TOKEN_KEY);\n if (!token) return undefined;\n\n try {\n const res = await fetch(`https://api.${getCloudDomain()}/user`, {\n headers: {\n Authorization: `Bearer ${token}`,\n 'Content-Type': 'application/json',\n },\n });\n const object = await res.json();\n const user = object.payload;\n\n return {\n ...user,\n };\n } catch (error) {\n return undefined;\n }\n}\n\nfunction setCurrentSchema(components: ConsumerComponent[]) {\n components.forEach((component) => {\n component.schema = CURRENT_SCHEMA;\n });\n}\n\nfunction addBuildStatus(components: ConsumerComponent[], buildStatus: BuildStatus) {\n components.forEach((component) => {\n component.buildStatus = buildStatus;\n });\n}\n\nexport async function updateComponentsVersions(\n workspace: Workspace,\n components: Array<ModelComponent>,\n isTag = true\n): Promise<StagedConfig> {\n const consumer = workspace.consumer;\n const currentLane = consumer.getCurrentLaneId();\n const stagedConfig = await workspace.scope.getStagedConfig();\n const isAvailableOnMain = async (\n component: ModelComponent | ConsumerComponent,\n id: ComponentID\n ): Promise<boolean> => {\n if (currentLane.isDefault()) {\n return true;\n }\n if (!id.hasVersion()) {\n // component was unsnapped on the current lane and is back to a new component\n return true;\n }\n const modelComponent =\n component instanceof ModelComponent ? component : await consumer.scope.getModelComponent(component.id);\n return modelComponent.hasHead();\n };\n\n const updateVersions = async (modelComponent: ModelComponent) => {\n const id: ComponentID = modelComponent.toBitIdWithLatestVersionAllowNull();\n consumer.bitMap.updateComponentId(id, undefined, undefined, true);\n const availableOnMain = await isAvailableOnMain(modelComponent, id);\n if (!availableOnMain) {\n consumer.bitMap.setOnLanesOnly(id, true);\n }\n const componentMap = consumer.bitMap.getComponent(id);\n const compId = await workspace.resolveComponentId(id);\n // it can be either a tag/snap or reset.\n if (isTag) {\n const config = componentMap.config;\n stagedConfig.addComponentConfig(compId, config);\n consumer.bitMap.removeConfig(id);\n const hash = modelComponent.getRef(id.version as string);\n if (!hash) throw new Error(`updateComponentsVersions: unable to find a hash for ${id.toString()}`);\n workspace.scope.legacyScope.stagedSnaps.addSnap(hash?.toString());\n } else if (!componentMap.config) {\n componentMap.config = stagedConfig.getConfigPerId(compId);\n }\n componentMap.clearNextVersion();\n };\n // important! DO NOT use Promise.all here! otherwise, you're gonna enter into a whole world of pain.\n // imagine tagging comp1 with auto-tagged comp2, comp1 package.json is written while comp2 is\n // trying to get the dependencies of comp1 using its package.json.\n await mapSeries(components, updateVersions);\n await workspace.scope.legacyScope.stagedSnaps.write();\n\n return stagedConfig;\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,OAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,MAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,MAAA;EAAA,MAAAN,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