@teambit/isolator 1.0.487 → 1.0.488

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.
@@ -6,7 +6,7 @@ import { SlotRegistry } from '@teambit/harmony';
6
6
  import { DependencyResolverMain, LinkingOptions, NodeLinker } from '@teambit/dependency-resolver';
7
7
  import { Logger, LoggerMain } from '@teambit/logger';
8
8
  import { ComponentID } from '@teambit/component-id';
9
- import LegacyScope from '@teambit/legacy/dist/scope/scope';
9
+ import { Scope as LegacyScope } from '@teambit/legacy.scope';
10
10
  import { GlobalConfigMain } from '@teambit/global-config';
11
11
  import { PathOsBasedAbsolute } from '@teambit/legacy.utils';
12
12
  import { Capsule } from './capsule';
@@ -116,9 +116,9 @@ function _globalConfig() {
116
116
  };
117
117
  return data;
118
118
  }
119
- function _constants() {
120
- const data = require("@teambit/legacy/dist/constants");
121
- _constants = function () {
119
+ function _legacy() {
120
+ const data = require("@teambit/legacy.constants");
121
+ _legacy = function () {
122
122
  return data;
123
123
  };
124
124
  return data;
@@ -130,9 +130,9 @@ function _component2() {
130
130
  };
131
131
  return data;
132
132
  }
133
- function _legacy() {
133
+ function _legacy2() {
134
134
  const data = require("@teambit/legacy.utils");
135
- _legacy = function () {
135
+ _legacy2 = function () {
136
136
  return data;
137
137
  };
138
138
  return data;
@@ -641,7 +641,7 @@ class IsolatorMain {
641
641
  capsule
642
642
  } = capsuleWithPackageData;
643
643
  if (!currentPackageJson) throw new Error(`isolator.createCapsules, unable to find currentPackageJson for ${capsule.component.id.toString()}`);
644
- capsuleWithPackageData.capsule.fs.writeFileSync(_constants().PACKAGE_JSON, JSON.stringify(currentPackageJson, null, 2));
644
+ capsuleWithPackageData.capsule.fs.writeFileSync(_legacy().PACKAGE_JSON, JSON.stringify(currentPackageJson, null, 2));
645
645
  });
646
646
  await this.markCapsulesAsReady(capsuleList);
647
647
  if (longProcessLogger) {
@@ -885,7 +885,7 @@ class IsolatorMain {
885
885
  const month = date.getMonth() < 12 ? date.getMonth() + 1 : 1;
886
886
  const dateDir = `${date.getFullYear()}-${month}-${date.getDate()}`;
887
887
  const defaultDatedBaseDir = 'dated-capsules';
888
- const datedBaseDir = this.globalConfig.getSync(_constants().CFG_CAPSULES_SCOPES_ASPECTS_DATED_DIR) || defaultDatedBaseDir;
888
+ const datedBaseDir = this.globalConfig.getSync(_legacy().CFG_CAPSULES_SCOPES_ASPECTS_DATED_DIR) || defaultDatedBaseDir;
889
889
  let hashDir;
890
890
  const finalDatedDirId = getCapsuleDirOpts.datedDirId;
891
891
  if (finalDatedDirId && this._datedHashForName.has(finalDatedDirId)) {
@@ -936,7 +936,7 @@ class IsolatorMain {
936
936
  } = capsuleWithPackageData;
937
937
  if (!previousPackageJson) return true;
938
938
  // @ts-ignore at this point, currentPackageJson is set
939
- return _constants().DEPENDENCIES_FIELDS.some(field => !(0, _lodash().isEqual)(previousPackageJson[field], currentPackageJson[field]));
939
+ return _legacy().DEPENDENCIES_FIELDS.some(field => !(0, _lodash().isEqual)(previousPackageJson[field], currentPackageJson[field]));
940
940
  }
941
941
  async getCapsulesPreviousPackageJson(capsules) {
942
942
  return Promise.all(capsules.map(async capsule => {
@@ -1090,7 +1090,7 @@ class IsolatorMain {
1090
1090
  const bitDevDependencies = getBitDependencies(legacyComp.devDependencies.getAllIds());
1091
1091
  const bitExtensionDependencies = getBitDependencies(legacyComp.extensions.extensionsBitIds);
1092
1092
  const packageJson = _component2().PackageJsonFile.createFromComponent(bitDir, legacyComp);
1093
- const main = (0, _legacy().pathNormalizeToLinux)(legacyComp.mainFile);
1093
+ const main = (0, _legacy2().pathNormalizeToLinux)(legacyComp.mainFile);
1094
1094
  packageJson.addOrUpdateProperty('main', main);
1095
1095
  const addDependencies = packageJsonFile => {
1096
1096
  packageJsonFile.addDependencies(bitDependencies);