@teambit/merge-lanes 0.0.313 → 0.0.314
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/merge-lane.cmd.js
CHANGED
@@ -49,9 +49,9 @@ function _bitError() {
|
|
49
49
|
};
|
50
50
|
return data;
|
51
51
|
}
|
52
|
-
function
|
53
|
-
const data =
|
54
|
-
|
52
|
+
function _remove() {
|
53
|
+
const data = require("@teambit/remove");
|
54
|
+
_remove = function () {
|
55
55
|
return data;
|
56
56
|
};
|
57
57
|
return data;
|
@@ -156,7 +156,7 @@ Component pattern format: ${_constants().COMPONENT_PATTERN_HELP}`
|
|
156
156
|
configMergeResults,
|
157
157
|
verbose
|
158
158
|
}));
|
159
|
-
const deleteResult = `${deleteResults.localResult ? (0,
|
159
|
+
const deleteResult = `${deleteResults.localResult ? (0, _remove().removeTemplate)(deleteResults.localResult, false) : ''}${(deleteResults.remoteResult || []).map(item => (0, _remove().removeTemplate)(item, true))}${deleteResults.readmeResult && _chalk().default.yellow(deleteResults.readmeResult) || ''}\n`;
|
160
160
|
return mergeResult + deleteResult;
|
161
161
|
}
|
162
162
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_merging","_featureToggle","_constants","_bitError","_removeTemplate","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","MergeLaneCmd","constructor","mergeLanes","name","description","COMPONENT_PATTERN_HELP","report","pattern","ours","theirs","manual","autoMergeResolve","build","workspace","existingOnWorkspaceOnly","squash","noSnap","tag","message","snapMessage","keepReadme","noSquash","skipDependencyInstallation","skipFetch","includeDeps","resolveUnrelated","ignoreConfigChanges","verbose","includeNonLaneComps","isFeatureEnabled","BUILD_ON_CI","Boolean","BitError","mergeStrategy","getResolveUnrelated","undefined","Error","mergeResults","deleteResults","configMergeResults","mergeLane","mergeResult","mergeReport","deleteResult","localResult","paintRemoved","remoteResult","map","item","readmeResult","chalk","yellow","exports"],"sources":["merge-lane.cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { MergeStrategy } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { mergeReport } from '@teambit/merging';\nimport { BUILD_ON_CI, isFeatureEnabled } from '@teambit/legacy/dist/api/consumer/lib/feature-toggle';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { BitError } from '@teambit/bit-error';\nimport paintRemoved from '@teambit/legacy/dist/cli/templates/remove-template';\nimport { MergeLanesMain } from './merge-lanes.main.runtime';\n\nexport class MergeLaneCmd implements Command {\n name = 'merge <lane> [pattern]';\n description = `merge a local or a remote lane to the current lane`;\n extendedDescription = `by default, the provided lane will be fetched from the remote before merging.\nto merge the lane from the local scope without updating it first, use \"--skip-fetch\" flag.\n\nwhen the current and merge candidate lanes are diverged in history and the files could be merged with no conflicts,\nthese components will be snap-merged to complete the merge. use \"no-snap\" to opt-out, or \"tag\" to tag instead`;\n arguments = [\n {\n name: 'lane',\n description: 'lane-name or full lane-id (if remote) to merge to the current lane',\n },\n {\n name: 'pattern',\n description: `partially merge the lane - only components that match the specified component-pattern\nComponent pattern format: ${COMPONENT_PATTERN_HELP}`,\n },\n ];\n alias = '';\n options = [\n ['', 'ours', 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, keep local modifications'],\n ['', 'theirs', 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, override local with incoming changes'],\n ['', 'manual', 'DEPRECATED. use --auto-merge-resolve'],\n [\n '',\n 'auto-merge-resolve <merge-strategy>',\n 'in case of a merge conflict, resolve according to the provided strategy: [ours, theirs, manual]',\n ],\n ['', 'workspace', 'merge only lane components that are in the current workspace'],\n ['', 'no-snap', 'do not auto snap after merge completed without conflicts'],\n ['', 'tag', 'auto-tag all lane components after merging into main (or tag-merge in case of snap-merge)'],\n ['', 'build', 'in case of snap during the merge, run the build-pipeline (similar to bit snap --build)'],\n ['m', 'message <message>', 'override the default message for the auto snap'],\n ['', 'keep-readme', 'skip deleting the lane readme component after merging'],\n ['', 'no-squash', 'relevant for merging lanes into main, which by default squashes all lane snaps'],\n [\n '',\n 'squash',\n 'EXPERIMENTAL. relevant for merging a lane into another non-main lane, which by default does not squash',\n ],\n [\n '',\n 'ignore-config-changes',\n 'allow merging when components are modified due to config changes (such as dependencies) only and not files',\n ],\n ['', 'verbose', 'show details of components that were not merged successfully'],\n ['x', 'skip-dependency-installation', 'do not install dependencies of the imported components'],\n ['', 'skip-fetch', 'use the local state of target-lane if exits locally, without updating it from the remote'],\n [\n '',\n 'include-deps',\n 'relevant for \"--pattern\" and \"--workspace\". merge also dependencies of the specified components',\n ],\n [\n '',\n 'resolve-unrelated [merge-strategy]',\n 'relevant when a component on a lane and the component on main have nothing in common. merge-strategy can be \"ours\" (default) or \"theirs\"',\n ],\n [\n '',\n 'include-non-lane-comps',\n 'when merging main, include workspace components that are not on the lane (by default only lane components are merged)',\n ],\n ] as CommandOptions;\n loader = true;\n private = true;\n migration = true;\n remoteOp = true;\n\n constructor(private mergeLanes: MergeLanesMain) {}\n\n async report(\n [name, pattern]: [string, string],\n {\n ours,\n theirs,\n manual,\n autoMergeResolve,\n build,\n workspace: existingOnWorkspaceOnly = false,\n squash = false,\n noSnap = false,\n tag = false,\n message: snapMessage = '',\n keepReadme = false,\n noSquash = false,\n skipDependencyInstallation = false,\n skipFetch = false,\n includeDeps = false,\n resolveUnrelated,\n ignoreConfigChanges,\n verbose = false,\n includeNonLaneComps = false,\n }: {\n ours?: boolean;\n theirs?: boolean;\n manual?: boolean;\n autoMergeResolve?: string;\n workspace?: boolean;\n build?: boolean;\n noSnap: boolean;\n tag: boolean;\n message: string;\n keepReadme?: boolean;\n squash?: boolean;\n noSquash: boolean;\n skipDependencyInstallation?: boolean;\n skipFetch: boolean;\n includeDeps?: boolean;\n resolveUnrelated?: string | boolean;\n ignoreConfigChanges?: boolean;\n verbose?: boolean;\n includeNonLaneComps?: boolean;\n }\n ): Promise<string> {\n build = isFeatureEnabled(BUILD_ON_CI) ? Boolean(build) : true;\n if (ours || theirs || manual) {\n throw new BitError(\n 'the \"--ours\", \"--theirs\" and \"--manual\" flags are deprecated. use \"--auto-merge-resolve\" instead. see \"bit lane merge --help\" for more information'\n );\n }\n if (\n autoMergeResolve &&\n autoMergeResolve !== 'ours' &&\n autoMergeResolve !== 'theirs' &&\n autoMergeResolve !== 'manual'\n ) {\n throw new BitError('--auto-merge-resolve must be one of the following: [ours, theirs, manual]');\n }\n const mergeStrategy = autoMergeResolve;\n if (noSnap && snapMessage) throw new BitError('unable to use \"no-snap\" and \"message\" flags together');\n if (includeDeps && !pattern && !existingOnWorkspaceOnly) {\n throw new BitError(`\"--include-deps\" flag is relevant only for --workspace and --pattern flags`);\n }\n const getResolveUnrelated = (): MergeStrategy | undefined => {\n if (!resolveUnrelated) return undefined;\n if (typeof resolveUnrelated === 'boolean') return 'ours';\n if (resolveUnrelated !== 'ours' && resolveUnrelated !== 'theirs' && resolveUnrelated !== 'manual') {\n throw new Error('--resolve-unrelated must be one of the following: [ours, theirs, manual]');\n }\n return resolveUnrelated;\n };\n if (resolveUnrelated && typeof resolveUnrelated === 'boolean') {\n resolveUnrelated = 'ours';\n }\n const { mergeResults, deleteResults, configMergeResults } = await this.mergeLanes.mergeLane(name, {\n build,\n // @ts-ignore\n mergeStrategy,\n ours,\n theirs,\n existingOnWorkspaceOnly,\n noSnap,\n snapMessage,\n keepReadme,\n squash,\n noSquash,\n tag,\n pattern,\n skipDependencyInstallation,\n skipFetch,\n resolveUnrelated: getResolveUnrelated(),\n ignoreConfigChanges,\n includeDeps,\n includeNonLaneComps,\n });\n\n const mergeResult = mergeReport({ ...mergeResults, configMergeResults, verbose });\n const deleteResult = `${deleteResults.localResult ? paintRemoved(deleteResults.localResult, false) : ''}${(\n deleteResults.remoteResult || []\n ).map((item) => paintRemoved(item, true))}${\n (deleteResults.readmeResult && chalk.yellow(deleteResults.readmeResult)) || ''\n }\\n`;\n return mergeResult + deleteResult;\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,SAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,eAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,cAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,UAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,SAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,gBAAA;EAAA,MAAAP,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAK,eAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8E,SAAAQ,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,WAAAC,GAAA,WAAAJ,MAAA,CA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F;AAACS,OAAA,CAAApD,YAAA,GAAAA,YAAA"}
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_merging","_featureToggle","_constants","_bitError","_remove","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","MergeLaneCmd","constructor","mergeLanes","name","description","COMPONENT_PATTERN_HELP","report","pattern","ours","theirs","manual","autoMergeResolve","build","workspace","existingOnWorkspaceOnly","squash","noSnap","tag","message","snapMessage","keepReadme","noSquash","skipDependencyInstallation","skipFetch","includeDeps","resolveUnrelated","ignoreConfigChanges","verbose","includeNonLaneComps","isFeatureEnabled","BUILD_ON_CI","Boolean","BitError","mergeStrategy","getResolveUnrelated","undefined","Error","mergeResults","deleteResults","configMergeResults","mergeLane","mergeResult","mergeReport","deleteResult","localResult","removeTemplate","remoteResult","map","item","readmeResult","chalk","yellow","exports"],"sources":["merge-lane.cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { MergeStrategy } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { mergeReport } from '@teambit/merging';\nimport { BUILD_ON_CI, isFeatureEnabled } from '@teambit/legacy/dist/api/consumer/lib/feature-toggle';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { BitError } from '@teambit/bit-error';\nimport { removeTemplate } from '@teambit/remove';\nimport { MergeLanesMain } from './merge-lanes.main.runtime';\n\nexport class MergeLaneCmd implements Command {\n name = 'merge <lane> [pattern]';\n description = `merge a local or a remote lane to the current lane`;\n extendedDescription = `by default, the provided lane will be fetched from the remote before merging.\nto merge the lane from the local scope without updating it first, use \"--skip-fetch\" flag.\n\nwhen the current and merge candidate lanes are diverged in history and the files could be merged with no conflicts,\nthese components will be snap-merged to complete the merge. use \"no-snap\" to opt-out, or \"tag\" to tag instead`;\n arguments = [\n {\n name: 'lane',\n description: 'lane-name or full lane-id (if remote) to merge to the current lane',\n },\n {\n name: 'pattern',\n description: `partially merge the lane - only components that match the specified component-pattern\nComponent pattern format: ${COMPONENT_PATTERN_HELP}`,\n },\n ];\n alias = '';\n options = [\n ['', 'ours', 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, keep local modifications'],\n ['', 'theirs', 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, override local with incoming changes'],\n ['', 'manual', 'DEPRECATED. use --auto-merge-resolve'],\n [\n '',\n 'auto-merge-resolve <merge-strategy>',\n 'in case of a merge conflict, resolve according to the provided strategy: [ours, theirs, manual]',\n ],\n ['', 'workspace', 'merge only lane components that are in the current workspace'],\n ['', 'no-snap', 'do not auto snap after merge completed without conflicts'],\n ['', 'tag', 'auto-tag all lane components after merging into main (or tag-merge in case of snap-merge)'],\n ['', 'build', 'in case of snap during the merge, run the build-pipeline (similar to bit snap --build)'],\n ['m', 'message <message>', 'override the default message for the auto snap'],\n ['', 'keep-readme', 'skip deleting the lane readme component after merging'],\n ['', 'no-squash', 'relevant for merging lanes into main, which by default squashes all lane snaps'],\n [\n '',\n 'squash',\n 'EXPERIMENTAL. relevant for merging a lane into another non-main lane, which by default does not squash',\n ],\n [\n '',\n 'ignore-config-changes',\n 'allow merging when components are modified due to config changes (such as dependencies) only and not files',\n ],\n ['', 'verbose', 'show details of components that were not merged successfully'],\n ['x', 'skip-dependency-installation', 'do not install dependencies of the imported components'],\n ['', 'skip-fetch', 'use the local state of target-lane if exits locally, without updating it from the remote'],\n [\n '',\n 'include-deps',\n 'relevant for \"--pattern\" and \"--workspace\". merge also dependencies of the specified components',\n ],\n [\n '',\n 'resolve-unrelated [merge-strategy]',\n 'relevant when a component on a lane and the component on main have nothing in common. merge-strategy can be \"ours\" (default) or \"theirs\"',\n ],\n [\n '',\n 'include-non-lane-comps',\n 'when merging main, include workspace components that are not on the lane (by default only lane components are merged)',\n ],\n ] as CommandOptions;\n loader = true;\n private = true;\n migration = true;\n remoteOp = true;\n\n constructor(private mergeLanes: MergeLanesMain) {}\n\n async report(\n [name, pattern]: [string, string],\n {\n ours,\n theirs,\n manual,\n autoMergeResolve,\n build,\n workspace: existingOnWorkspaceOnly = false,\n squash = false,\n noSnap = false,\n tag = false,\n message: snapMessage = '',\n keepReadme = false,\n noSquash = false,\n skipDependencyInstallation = false,\n skipFetch = false,\n includeDeps = false,\n resolveUnrelated,\n ignoreConfigChanges,\n verbose = false,\n includeNonLaneComps = false,\n }: {\n ours?: boolean;\n theirs?: boolean;\n manual?: boolean;\n autoMergeResolve?: string;\n workspace?: boolean;\n build?: boolean;\n noSnap: boolean;\n tag: boolean;\n message: string;\n keepReadme?: boolean;\n squash?: boolean;\n noSquash: boolean;\n skipDependencyInstallation?: boolean;\n skipFetch: boolean;\n includeDeps?: boolean;\n resolveUnrelated?: string | boolean;\n ignoreConfigChanges?: boolean;\n verbose?: boolean;\n includeNonLaneComps?: boolean;\n }\n ): Promise<string> {\n build = isFeatureEnabled(BUILD_ON_CI) ? Boolean(build) : true;\n if (ours || theirs || manual) {\n throw new BitError(\n 'the \"--ours\", \"--theirs\" and \"--manual\" flags are deprecated. use \"--auto-merge-resolve\" instead. see \"bit lane merge --help\" for more information'\n );\n }\n if (\n autoMergeResolve &&\n autoMergeResolve !== 'ours' &&\n autoMergeResolve !== 'theirs' &&\n autoMergeResolve !== 'manual'\n ) {\n throw new BitError('--auto-merge-resolve must be one of the following: [ours, theirs, manual]');\n }\n const mergeStrategy = autoMergeResolve;\n if (noSnap && snapMessage) throw new BitError('unable to use \"no-snap\" and \"message\" flags together');\n if (includeDeps && !pattern && !existingOnWorkspaceOnly) {\n throw new BitError(`\"--include-deps\" flag is relevant only for --workspace and --pattern flags`);\n }\n const getResolveUnrelated = (): MergeStrategy | undefined => {\n if (!resolveUnrelated) return undefined;\n if (typeof resolveUnrelated === 'boolean') return 'ours';\n if (resolveUnrelated !== 'ours' && resolveUnrelated !== 'theirs' && resolveUnrelated !== 'manual') {\n throw new Error('--resolve-unrelated must be one of the following: [ours, theirs, manual]');\n }\n return resolveUnrelated;\n };\n if (resolveUnrelated && typeof resolveUnrelated === 'boolean') {\n resolveUnrelated = 'ours';\n }\n const { mergeResults, deleteResults, configMergeResults } = await this.mergeLanes.mergeLane(name, {\n build,\n // @ts-ignore\n mergeStrategy,\n ours,\n theirs,\n existingOnWorkspaceOnly,\n noSnap,\n snapMessage,\n keepReadme,\n squash,\n noSquash,\n tag,\n pattern,\n skipDependencyInstallation,\n skipFetch,\n resolveUnrelated: getResolveUnrelated(),\n ignoreConfigChanges,\n includeDeps,\n includeNonLaneComps,\n });\n\n const mergeResult = mergeReport({ ...mergeResults, configMergeResults, verbose });\n const deleteResult = `${deleteResults.localResult ? removeTemplate(deleteResults.localResult, false) : ''}${(\n deleteResults.remoteResult || []\n ).map((item) => removeTemplate(item, true))}${\n (deleteResults.readmeResult && chalk.yellow(deleteResults.readmeResult)) || ''\n }\\n`;\n return mergeResult + deleteResult;\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,SAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,eAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,cAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,UAAA;EA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,IAAAC,sBAAW,EAAAvD,aAAA,CAAAA,aAAA,KAAMkD,YAAY;MAAEE,kBAAkB;MAAEZ;IAAO,EAAE,CAAC;IACjF,MAAMgB,YAAY,GAAI,GAAEL,aAAa,CAACM,WAAW,GAAG,IAAAC,wBAAc,EAACP,aAAa,CAACM,WAAW,EAAE,KAAK,CAAC,GAAG,EAAG,GAAE,CAC1GN,aAAa,CAACQ,YAAY,IAAI,EAAE,EAChCC,GAAG,CAAEC,IAAI,IAAK,IAAAH,wBAAc,EAACG,IAAI,EAAE,IAAI,CAAC,CAAE,GACzCV,aAAa,CAACW,YAAY,IAAIC,gBAAK,CAACC,MAAM,CAACb,aAAa,CAACW,YAAY,CAAC,IAAK,EAC7E,IAAG;IACJ,OAAOR,WAAW,GAAGE,YAAY;EACnC;AACF;AAACS,OAAA,CAAApD,YAAA,GAAAA,YAAA"}
|
Binary file
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/merge-lanes",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.314",
|
4
4
|
"homepage": "https://bit.cloud/teambit/lanes/merge-lanes",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"componentId": {
|
7
7
|
"scope": "teambit.lanes",
|
8
8
|
"name": "merge-lanes",
|
9
|
-
"version": "0.0.
|
9
|
+
"version": "0.0.314"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "2.4.2",
|
@@ -20,19 +20,19 @@
|
|
20
20
|
"@teambit/harmony": "0.4.6",
|
21
21
|
"@teambit/component-id": "0.0.427",
|
22
22
|
"@teambit/legacy-bit-id": "1.0.0",
|
23
|
-
"@teambit/checkout": "0.0.
|
24
|
-
"@teambit/cli": "0.0.
|
23
|
+
"@teambit/checkout": "0.0.306",
|
24
|
+
"@teambit/cli": "0.0.762",
|
25
25
|
"@teambit/bit-error": "0.0.402",
|
26
|
-
"@teambit/lane-id": "0.0.
|
27
|
-
"@teambit/merging": "0.0.
|
28
|
-
"@teambit/
|
29
|
-
"@teambit/
|
30
|
-
"@teambit/
|
31
|
-
"@teambit/
|
32
|
-
"@teambit/
|
33
|
-
"@teambit/scope": "0.0.
|
34
|
-
"@teambit/snapping": "0.0.
|
35
|
-
"@teambit/workspace": "0.0.
|
26
|
+
"@teambit/lane-id": "0.0.277",
|
27
|
+
"@teambit/merging": "0.0.452",
|
28
|
+
"@teambit/remove": "0.0.314",
|
29
|
+
"@teambit/export": "0.0.1137",
|
30
|
+
"@teambit/importer": "0.0.566",
|
31
|
+
"@teambit/lanes": "0.0.709",
|
32
|
+
"@teambit/logger": "0.0.855",
|
33
|
+
"@teambit/scope": "0.0.1137",
|
34
|
+
"@teambit/snapping": "0.0.452",
|
35
|
+
"@teambit/workspace": "0.0.1137"
|
36
36
|
},
|
37
37
|
"devDependencies": {
|
38
38
|
"@types/fs-extra": "9.0.7",
|
@@ -45,7 +45,7 @@
|
|
45
45
|
"@types/testing-library__jest-dom": "5.9.5"
|
46
46
|
},
|
47
47
|
"peerDependencies": {
|
48
|
-
"@teambit/legacy": "1.0.
|
48
|
+
"@teambit/legacy": "1.0.546",
|
49
49
|
"react": "^16.8.0 || ^17.0.0",
|
50
50
|
"react-dom": "^16.8.0 || ^17.0.0"
|
51
51
|
},
|
Binary file
|
File without changes
|