From 931477d58a3c4af2c8a4925b37e751a230c2fb9c Mon Sep 17 00:00:00 2001 From: Gilad Shoham Date: Mon, 12 Jun 2023 17:39:48 +0300 Subject: [PATCH 1/2] fix(install) - correctly calculate the env version to install in the root, in case the env version is a snap --- scopes/workspace/install/install.main.runtime.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scopes/workspace/install/install.main.runtime.ts b/scopes/workspace/install/install.main.runtime.ts index 9eaba5bb77eb..584e3deef7c5 100644 --- a/scopes/workspace/install/install.main.runtime.ts +++ b/scopes/workspace/install/install.main.runtime.ts @@ -39,6 +39,7 @@ import { CodemodResult } from '@teambit/legacy/dist/consumer/component-ops/codem import hash from 'object-hash'; import { DependencyTypeNotSupportedInPolicy } from './exceptions'; import { InstallAspect } from './install.aspect'; +import { snapToSemver } from '@teambit/component-package-version'; import { pickOutdatedPkgs } from './pick-outdated-pkgs'; import { LinkCommand } from './link'; import InstallCmd from './install.cmd'; @@ -498,7 +499,8 @@ export class InstallMain { if (!envComponent) return undefined; const packageName = this.dependencyResolver.getPackageName(envComponent); const version = envId.version; - return { [packageName]: version }; + const finalVersion = snapToSemver(version); + return { [packageName]: finalVersion }; } private async _getAppManifests( From 218e4a7c7867a2138558466173354cccd0bdc75a Mon Sep 17 00:00:00 2001 From: Gilad Shoham Date: Mon, 12 Jun 2023 18:03:23 +0300 Subject: [PATCH 2/2] linting --- scopes/workspace/install/install.main.runtime.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scopes/workspace/install/install.main.runtime.ts b/scopes/workspace/install/install.main.runtime.ts index 584e3deef7c5..0894a29ba86d 100644 --- a/scopes/workspace/install/install.main.runtime.ts +++ b/scopes/workspace/install/install.main.runtime.ts @@ -36,10 +36,10 @@ import { import { Logger, LoggerAspect, LoggerMain } from '@teambit/logger'; import { IssuesAspect, IssuesMain } from '@teambit/issues'; import { CodemodResult } from '@teambit/legacy/dist/consumer/component-ops/codemod-components'; +import { snapToSemver } from '@teambit/component-package-version'; import hash from 'object-hash'; import { DependencyTypeNotSupportedInPolicy } from './exceptions'; import { InstallAspect } from './install.aspect'; -import { snapToSemver } from '@teambit/component-package-version'; import { pickOutdatedPkgs } from './pick-outdated-pkgs'; import { LinkCommand } from './link'; import InstallCmd from './install.cmd';