@teambit/install 0.0.199 → 0.0.201

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.
@@ -115,19 +115,14 @@ function formatOutput({
115
115
  return anotherInstallRequiredOutput ? `\n${anotherInstallRequiredOutput}\n\n${summary}` : `\n${summary}`;
116
116
  }
117
117
  function getAnotherInstallRequiredOutput(recurringInstall = false, oldNonLoadedEnvs = []) {
118
- // oldNonLoadedEnvs = ['my-org.my-scope/envs/my-react-env']
119
118
  if (!oldNonLoadedEnvs.length) return '';
120
119
  const oldNonLoadedEnvsStr = oldNonLoadedEnvs.join(', ');
121
- const firstPart = `The following environments are not loaded: ${_chalk().default.cyan(oldNonLoadedEnvsStr)} and doesn't contain env.jsonc file`;
122
- const docsLink = `Read more about how to fix this issue in:`;
123
- const installAgain = `Please run "bit install" again to make sure all dependencies installed correctly`;
120
+ const firstPart = `Bit is unable to install all dependencies. Please run "${_chalk().default.cyan('bit install')}" again `;
124
121
  const flag = _chalk().default.cyan(`--${recurringInstallFlagName}`);
125
- const suggestRecurringInstall = `You can add the ${flag} flag to automatically run "bit install" again. but it is recommended to fix this issue`;
126
- let msg = `${firstPart}\n${installAgain}\n${suggestRecurringInstall}\n${docsLink}`;
127
- if (recurringInstall) {
128
- const autoInstallAgain = 'bit run install again for you to make sure all dependencies installed correctly, but it is recommended to fix this issue';
129
- msg = `${firstPart}\n${autoInstallAgain}\n${docsLink}`;
130
- }
122
+ const suggestRecurringInstall = recurringInstall ? '' : `(or use the "${flag}" option next time).`;
123
+ const envsStr = `The following environments need to add support for "dependency policy" to fix the warning: ${_chalk().default.cyan(oldNonLoadedEnvsStr)}`;
124
+ const docsLink = `Read more about how to fix this issue in: https://bit.dev/blog/using-a-static-dependency-policy-in-a-legacy-env-lihfbt9b`;
125
+ const msg = `${firstPart}${suggestRecurringInstall}\n${envsStr}\n${docsLink}`;
131
126
  return _chalk().default.yellow(msg);
132
127
  }
133
128
 
@@ -1 +1 @@
1
- {"version":3,"names":["recurringInstallFlagName","InstallCmd","constructor","install","workspace","logger","name","description","report","packages","options","startTime","Date","now","OutsideWorkspaceError","length","addMissingDeps","BitError","updateExisting","consoleWarning","console","chalk","cyan","installOpts","lifecycleType","addMissingPeers","type","dedupe","skipDedupe","import","skipImport","savePrefix","compile","skipCompile","includeOptionalDeps","noOptional","updateAll","update","recurringInstall","components","endTime","oldNonLoadedEnvs","getOldNonLoadedEnvs","formatOutput","numOfComps","toArray","toString","calculateTime","diff","executionTime","summary","green","anotherInstallRequiredOutput","getAnotherInstallRequiredOutput","oldNonLoadedEnvsStr","join","firstPart","docsLink","installAgain","flag","suggestRecurringInstall","msg","autoInstallAgain","yellow"],"sources":["install.cmd.tsx"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { WorkspaceDependencyLifecycleType } from '@teambit/dependency-resolver';\nimport { Logger } from '@teambit/logger';\nimport chalk from 'chalk';\nimport { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { InstallMain, WorkspaceInstallOptions } from './install.main.runtime';\n\ntype InstallCmdOptions = {\n type: WorkspaceDependencyLifecycleType;\n skipDedupe: boolean;\n skipImport: boolean;\n skipCompile: boolean;\n update: boolean;\n updateExisting: boolean;\n savePrefix: string;\n addMissingDeps: boolean;\n addMissingPeers: boolean;\n noOptional: boolean;\n recurringInstall: boolean;\n};\n\ntype FormatOutputArgs = {\n numOfComps: string;\n startTime: number;\n endTime: number;\n oldNonLoadedEnvs: string[];\n recurringInstall: boolean;\n};\n\nconst recurringInstallFlagName = 'recurring-install';\n\nexport default class InstallCmd implements Command {\n name = 'install [packages...]';\n description = 'installs workspace dependencies';\n extendedDescription =\n 'when no package is specified, all workspace dependencies are installed and all workspace components are imported.';\n helpUrl = 'docs/dependencies/dependency-installation';\n arguments = [{ name: 'packages...', description: 'a list of packages to install (separated by spaces)' }];\n alias = 'in';\n group = 'development';\n options = [\n ['t', 'type [lifecycleType]', '\"runtime\" (default) or \"peer\" (dev is not a valid option)'],\n ['u', 'update', 'update all dependencies'],\n [\n '',\n 'update-existing [updateExisting]',\n 'DEPRECATED (not needed anymore, it is the default now). update existing dependencies version and types',\n ],\n ['', 'save-prefix [savePrefix]', 'set the prefix to use when adding dependency to workspace.jsonc'],\n ['', 'skip-dedupe [skipDedupe]', 'do not dedupe dependencies on installation'],\n ['', 'skip-import [skipImport]', 'do not import bit objects post installation'],\n ['', 'skip-compile [skipCompile]', 'do not compile components'],\n ['', 'add-missing-deps [addMissingDeps]', 'install all missing dependencies'],\n ['', 'add-missing-peers [addMissingPeers]', 'install all missing peer dependencies'],\n [\n '',\n recurringInstallFlagName,\n 'automatically run install again if there are non loaded old envs in your workspace',\n ],\n ['', 'no-optional [noOptional]', 'do not install optional dependencies (works with pnpm only)'],\n ] as CommandOptions;\n\n constructor(\n private install: InstallMain,\n /**\n * workspace extension.\n */\n private workspace: Workspace,\n\n /**\n * logger extension.\n */\n private logger: Logger\n ) {}\n\n async report([packages = []]: [string[]], options: InstallCmdOptions) {\n const startTime = Date.now();\n if (!this.workspace) throw new OutsideWorkspaceError();\n if (packages.length && options.addMissingDeps) {\n throw new BitError('You can not use --add-missing-deps with a list of packages');\n }\n if (options.updateExisting) {\n this.logger.consoleWarning(\n `--update-existing is deprecated, please omit it. \"bit install\" will update existing dependency by default`\n );\n }\n this.logger.console(`Resolving component dependencies for workspace: '${chalk.cyan(this.workspace.name)}'`);\n const installOpts: WorkspaceInstallOptions = {\n lifecycleType: options.addMissingPeers ? 'peer' : options.type,\n dedupe: !options.skipDedupe,\n import: !options.skipImport,\n updateExisting: true,\n savePrefix: options.savePrefix,\n addMissingDeps: options.addMissingDeps,\n addMissingPeers: options.addMissingPeers,\n compile: !options.skipCompile,\n includeOptionalDeps: !options.noOptional,\n updateAll: options.update,\n recurringInstall: options.recurringInstall,\n };\n const components = await this.install.install(packages, installOpts);\n const endTime = Date.now();\n const oldNonLoadedEnvs = this.install.getOldNonLoadedEnvs();\n return formatOutput({\n startTime,\n endTime,\n numOfComps: components.toArray().length.toString(),\n recurringInstall: options[recurringInstallFlagName],\n oldNonLoadedEnvs,\n });\n }\n}\n\nfunction calculateTime(startTime: number, endTime: number) {\n const diff = endTime - startTime;\n return diff / 1000;\n}\n\nfunction formatOutput({\n numOfComps,\n endTime,\n startTime,\n recurringInstall,\n oldNonLoadedEnvs,\n}: FormatOutputArgs): string {\n const executionTime = calculateTime(startTime, endTime);\n const summary = chalk.green(\n `Successfully installed dependencies and compiled ${chalk.cyan(numOfComps)} component(s) in ${chalk.cyan(\n executionTime.toString()\n )} seconds`\n );\n const anotherInstallRequiredOutput = getAnotherInstallRequiredOutput(recurringInstall, oldNonLoadedEnvs);\n return anotherInstallRequiredOutput ? `\\n${anotherInstallRequiredOutput}\\n\\n${summary}` : `\\n${summary}`;\n}\n\nexport function getAnotherInstallRequiredOutput(recurringInstall = false, oldNonLoadedEnvs: string[] = []): string {\n // oldNonLoadedEnvs = ['my-org.my-scope/envs/my-react-env']\n if (!oldNonLoadedEnvs.length) return '';\n const oldNonLoadedEnvsStr = oldNonLoadedEnvs.join(', ');\n const firstPart = `The following environments are not loaded: ${chalk.cyan(\n oldNonLoadedEnvsStr\n )} and doesn't contain env.jsonc file`;\n const docsLink = `Read more about how to fix this issue in:`;\n const installAgain = `Please run \"bit install\" again to make sure all dependencies installed correctly`;\n const flag = chalk.cyan(`--${recurringInstallFlagName}`);\n const suggestRecurringInstall = `You can add the ${flag} flag to automatically run \"bit install\" again. but it is recommended to fix this issue`;\n let msg = `${firstPart}\\n${installAgain}\\n${suggestRecurringInstall}\\n${docsLink}`;\n\n if (recurringInstall) {\n const autoInstallAgain =\n 'bit run install again for you to make sure all dependencies installed correctly, but it is recommended to fix this issue';\n msg = `${firstPart}\\n${autoInstallAgain}\\n${docsLink}`;\n }\n return chalk.yellow(msg);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA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AC5D,MAAMC,YAAY,GAAI,kFAAiF;EACvG,MAAMC,IAAI,GAAGtC,gBAAK,CAACC,IAAI,CAAE,KAAItB,wBAAyB,EAAC,CAAC;EACxD,MAAM4D,uBAAuB,GAAI,mBAAkBD,IAAK,yFAAwF;EAChJ,IAAIE,GAAG,GAAI,GAAEL,SAAU,KAAIE,YAAa,KAAIE,uBAAwB,KAAIH,QAAS,EAAC;EAElF,IAAInB,gBAAgB,EAAE;IACpB,MAAMwB,gBAAgB,GACpB,0HAA0H;IAC5HD,GAAG,GAAI,GAAEL,SAAU,KAAIM,gBAAiB,KAAIL,QAAS,EAAC;EACxD;EACA,OAAOpC,gBAAK,CAAC0C,MAAM,CAACF,GAAG,CAAC;AAC1B"}
1
+ {"version":3,"names":["recurringInstallFlagName","InstallCmd","constructor","install","workspace","logger","name","description","report","packages","options","startTime","Date","now","OutsideWorkspaceError","length","addMissingDeps","BitError","updateExisting","consoleWarning","console","chalk","cyan","installOpts","lifecycleType","addMissingPeers","type","dedupe","skipDedupe","import","skipImport","savePrefix","compile","skipCompile","includeOptionalDeps","noOptional","updateAll","update","recurringInstall","components","endTime","oldNonLoadedEnvs","getOldNonLoadedEnvs","formatOutput","numOfComps","toArray","toString","calculateTime","diff","executionTime","summary","green","anotherInstallRequiredOutput","getAnotherInstallRequiredOutput","oldNonLoadedEnvsStr","join","firstPart","flag","suggestRecurringInstall","envsStr","docsLink","msg","yellow"],"sources":["install.cmd.tsx"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { WorkspaceDependencyLifecycleType } from '@teambit/dependency-resolver';\nimport { Logger } from '@teambit/logger';\nimport chalk from 'chalk';\nimport { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { InstallMain, WorkspaceInstallOptions } from './install.main.runtime';\n\ntype InstallCmdOptions = {\n type: WorkspaceDependencyLifecycleType;\n skipDedupe: boolean;\n skipImport: boolean;\n skipCompile: boolean;\n update: boolean;\n updateExisting: boolean;\n savePrefix: string;\n addMissingDeps: boolean;\n addMissingPeers: boolean;\n noOptional: boolean;\n recurringInstall: boolean;\n};\n\ntype FormatOutputArgs = {\n numOfComps: string;\n startTime: number;\n endTime: number;\n oldNonLoadedEnvs: string[];\n recurringInstall: boolean;\n};\n\nconst recurringInstallFlagName = 'recurring-install';\n\nexport default class InstallCmd implements Command {\n name = 'install [packages...]';\n description = 'installs workspace dependencies';\n extendedDescription =\n 'when no package is specified, all workspace dependencies are installed and all workspace components are imported.';\n helpUrl = 'docs/dependencies/dependency-installation';\n arguments = [{ name: 'packages...', description: 'a list of packages to install (separated by spaces)' }];\n alias = 'in';\n group = 'development';\n options = [\n ['t', 'type [lifecycleType]', '\"runtime\" (default) or \"peer\" (dev is not a valid option)'],\n ['u', 'update', 'update all dependencies'],\n [\n '',\n 'update-existing [updateExisting]',\n 'DEPRECATED (not needed anymore, it is the default now). update existing dependencies version and types',\n ],\n ['', 'save-prefix [savePrefix]', 'set the prefix to use when adding dependency to workspace.jsonc'],\n ['', 'skip-dedupe [skipDedupe]', 'do not dedupe dependencies on installation'],\n ['', 'skip-import [skipImport]', 'do not import bit objects post installation'],\n ['', 'skip-compile [skipCompile]', 'do not compile components'],\n ['', 'add-missing-deps [addMissingDeps]', 'install all missing dependencies'],\n ['', 'add-missing-peers [addMissingPeers]', 'install all missing peer dependencies'],\n [\n '',\n recurringInstallFlagName,\n 'automatically run install again if there are non loaded old envs in your workspace',\n ],\n ['', 'no-optional [noOptional]', 'do not install optional dependencies (works with pnpm only)'],\n ] as CommandOptions;\n\n constructor(\n private install: InstallMain,\n /**\n * workspace extension.\n */\n private workspace: Workspace,\n\n /**\n * logger extension.\n */\n private logger: Logger\n ) {}\n\n async report([packages = []]: [string[]], options: InstallCmdOptions) {\n const startTime = Date.now();\n if (!this.workspace) throw new OutsideWorkspaceError();\n if (packages.length && options.addMissingDeps) {\n throw new BitError('You can not use --add-missing-deps with a list of packages');\n }\n if (options.updateExisting) {\n this.logger.consoleWarning(\n `--update-existing is deprecated, please omit it. \"bit install\" will update existing dependency by default`\n );\n }\n this.logger.console(`Resolving component dependencies for workspace: '${chalk.cyan(this.workspace.name)}'`);\n const installOpts: WorkspaceInstallOptions = {\n lifecycleType: options.addMissingPeers ? 'peer' : options.type,\n dedupe: !options.skipDedupe,\n import: !options.skipImport,\n updateExisting: true,\n savePrefix: options.savePrefix,\n addMissingDeps: options.addMissingDeps,\n addMissingPeers: options.addMissingPeers,\n compile: !options.skipCompile,\n includeOptionalDeps: !options.noOptional,\n updateAll: options.update,\n recurringInstall: options.recurringInstall,\n };\n const components = await this.install.install(packages, installOpts);\n const endTime = Date.now();\n const oldNonLoadedEnvs = this.install.getOldNonLoadedEnvs();\n return formatOutput({\n startTime,\n endTime,\n numOfComps: components.toArray().length.toString(),\n recurringInstall: options[recurringInstallFlagName],\n oldNonLoadedEnvs,\n });\n }\n}\n\nfunction calculateTime(startTime: number, endTime: number) {\n const diff = endTime - startTime;\n return diff / 1000;\n}\n\nfunction formatOutput({\n numOfComps,\n endTime,\n startTime,\n recurringInstall,\n oldNonLoadedEnvs,\n}: FormatOutputArgs): string {\n const executionTime = calculateTime(startTime, endTime);\n const summary = chalk.green(\n `Successfully installed dependencies and compiled ${chalk.cyan(numOfComps)} component(s) in ${chalk.cyan(\n executionTime.toString()\n )} seconds`\n );\n const anotherInstallRequiredOutput = getAnotherInstallRequiredOutput(recurringInstall, oldNonLoadedEnvs);\n return anotherInstallRequiredOutput ? `\\n${anotherInstallRequiredOutput}\\n\\n${summary}` : `\\n${summary}`;\n}\n\nexport function getAnotherInstallRequiredOutput(recurringInstall = false, oldNonLoadedEnvs: string[] = []): string {\n if (!oldNonLoadedEnvs.length) return '';\n const oldNonLoadedEnvsStr = oldNonLoadedEnvs.join(', ');\n const firstPart = `Bit is unable to install all dependencies. Please run \"${chalk.cyan('bit install')}\" again `;\n const flag = chalk.cyan(`--${recurringInstallFlagName}`);\n const suggestRecurringInstall = recurringInstall ? '' : `(or use the \"${flag}\" option next time).`;\n const envsStr = `The following environments need to add support for \"dependency policy\" to fix the warning: ${chalk.cyan(\n oldNonLoadedEnvsStr\n )}`;\n const docsLink = `Read more about how to fix this issue in: https://bit.dev/blog/using-a-static-dependency-policy-in-a-legacy-env-lihfbt9b`;\n\n const msg = `${firstPart}${suggestRecurringInstall}\\n${envsStr}\\n${docsLink}`;\n return chalk.yellow(msg);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAIA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAyBA,MAAMA,wBAAwB,GAAG,mBAAmB;AAErC,MAAMC,UAAU,CAAoB;EA+BjDC,WAAW,CACDC,OAAoB;EAC5B;AACJ;AACA;EACYC,SAAoB;EAE5B;AACJ;AACA;EACYC,MAAc,EACtB;IAAA,KAVQF,OAAoB,GAApBA,OAAoB;IAAA,KAIpBC,SAAoB,GAApBA,SAAoB;IAAA,KAKpBC,MAAc,GAAdA,MAAc;IAAA,8CAxCjB,uBAAuB;IAAA,qDAChB,iCAAiC;IAAA,6DAE7C,mHAAmH;IAAA,iDAC3G,2CAA2C;IAAA,mDACzC,CAAC;MAAEC,IAAI,EAAE,aAAa;MAAEC,WAAW,EAAE;IAAsD,CAAC,CAAC;IAAA,+CACjG,IAAI;IAAA,+CACJ,aAAa;IAAA,iDACX,CACR,CAAC,GAAG,EAAE,sBAAsB,EAAE,2DAA2D,CAAC,EAC1F,CAAC,GAAG,EAAE,QAAQ,EAAE,yBAAyB,CAAC,EAC1C,CACE,EAAE,EACF,kCAAkC,EAClC,wGAAwG,CACzG,EACD,CAAC,EAAE,EAAE,0BAA0B,EAAE,iEAAiE,CAAC,EACnG,CAAC,EAAE,EAAE,0BAA0B,EAAE,4CAA4C,CAAC,EAC9E,CAAC,EAAE,EAAE,0BAA0B,EAAE,6CAA6C,CAAC,EAC/E,CAAC,EAA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G,+BAA+B,CAACf,gBAAgB,GAAG,KAAK,EAAEG,gBAA0B,GAAG,EAAE,EAAU;EACjH,IAAI,CAACA,gBAAgB,CAAC1B,MAAM,EAAE,OAAO,EAAE;EACvC,MAAMuC,mBAAmB,GAAGb,gBAAgB,CAACc,IAAI,CAAC,IAAI,CAAC;EACvD,MAAMC,SAAS,GAAI,0DAAyDnC,gBAAK,CAACC,IAAI,CAAC,aAAa,CAAE,UAAS;EAC/G,MAAMmC,IAAI,GAAGpC,gBAAK,CAACC,IAAI,CAAE,KAAItB,wBAAyB,EAAC,CAAC;EACxD,MAAM0D,uBAAuB,GAAGpB,gBAAgB,GAAG,EAAE,GAAI,gBAAemB,IAAK,sBAAqB;EAClG,MAAME,OAAO,GAAI,8FAA6FtC,gBAAK,CAACC,IAAI,CACtHgC,mBAAmB,CACnB,EAAC;EACH,MAAMM,QAAQ,GAAI,0HAAyH;EAE3I,MAAMC,GAAG,GAAI,GAAEL,SAAU,GAAEE,uBAAwB,KAAIC,OAAQ,KAAIC,QAAS,EAAC;EAC7E,OAAOvC,gBAAK,CAACyC,MAAM,CAACD,GAAG,CAAC;AAC1B"}
package/install.cmd.tsx CHANGED
@@ -135,22 +135,16 @@ function formatOutput({
135
135
  }
136
136
 
137
137
  export function getAnotherInstallRequiredOutput(recurringInstall = false, oldNonLoadedEnvs: string[] = []): string {
138
- // oldNonLoadedEnvs = ['my-org.my-scope/envs/my-react-env']
139
138
  if (!oldNonLoadedEnvs.length) return '';
140
139
  const oldNonLoadedEnvsStr = oldNonLoadedEnvs.join(', ');
141
- const firstPart = `The following environments are not loaded: ${chalk.cyan(
142
- oldNonLoadedEnvsStr
143
- )} and doesn't contain env.jsonc file`;
144
- const docsLink = `Read more about how to fix this issue in:`;
145
- const installAgain = `Please run "bit install" again to make sure all dependencies installed correctly`;
140
+ const firstPart = `Bit is unable to install all dependencies. Please run "${chalk.cyan('bit install')}" again `;
146
141
  const flag = chalk.cyan(`--${recurringInstallFlagName}`);
147
- const suggestRecurringInstall = `You can add the ${flag} flag to automatically run "bit install" again. but it is recommended to fix this issue`;
148
- let msg = `${firstPart}\n${installAgain}\n${suggestRecurringInstall}\n${docsLink}`;
142
+ const suggestRecurringInstall = recurringInstall ? '' : `(or use the "${flag}" option next time).`;
143
+ const envsStr = `The following environments need to add support for "dependency policy" to fix the warning: ${chalk.cyan(
144
+ oldNonLoadedEnvsStr
145
+ )}`;
146
+ const docsLink = `Read more about how to fix this issue in: https://bit.dev/blog/using-a-static-dependency-policy-in-a-legacy-env-lihfbt9b`;
149
147
 
150
- if (recurringInstall) {
151
- const autoInstallAgain =
152
- 'bit run install again for you to make sure all dependencies installed correctly, but it is recommended to fix this issue';
153
- msg = `${firstPart}\n${autoInstallAgain}\n${docsLink}`;
154
- }
148
+ const msg = `${firstPart}${suggestRecurringInstall}\n${envsStr}\n${docsLink}`;
155
149
  return chalk.yellow(msg);
156
150
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/install",
3
- "version": "0.0.199",
3
+ "version": "0.0.201",
4
4
  "homepage": "https://bit.cloud/teambit/workspace/install",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.workspace",
8
8
  "name": "install",
9
- "version": "0.0.199"
9
+ "version": "0.0.201"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -24,11 +24,11 @@
24
24
  "@babel/runtime": "7.20.0",
25
25
  "@teambit/harmony": "0.4.6",
26
26
  "@teambit/bit-error": "0.0.402",
27
- "@teambit/bit-roots": "0.0.77",
27
+ "@teambit/bit-roots": "0.0.78",
28
28
  "@teambit/component-issues": "0.0.92",
29
29
  "@teambit/component-package-version": "0.0.423",
30
30
  "@teambit/dependencies.fs.linked-dependencies": "0.0.1",
31
- "@teambit/workspace.modules.node-modules-linker": "0.0.84",
31
+ "@teambit/workspace.modules.node-modules-linker": "0.0.85",
32
32
  "@teambit/toolbox.time.time-format": "0.0.490"
33
33
  },
34
34
  "devDependencies": {
@@ -44,7 +44,7 @@
44
44
  "@types/testing-library__jest-dom": "5.9.5"
45
45
  },
46
46
  "peerDependencies": {
47
- "@teambit/legacy": "1.0.521",
47
+ "@teambit/legacy": "1.0.522",
48
48
  "react": "^16.8.0 || ^17.0.0",
49
49
  "react-dom": "^16.8.0 || ^17.0.0"
50
50
  },