@teambit/workspace 1.0.177 → 1.0.179

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.
Files changed (30) hide show
  1. package/artifacts/__bit_junit.xml +1 -1
  2. package/artifacts/preview/teambit_workspace_workspace-preview.js +1 -1
  3. package/artifacts/schema.json +1670 -1732
  4. package/dist/aspects-merger.js +1 -1
  5. package/dist/aspects-merger.js.map +1 -1
  6. package/dist/build-graph-from-fs.js +1 -1
  7. package/dist/build-graph-from-fs.js.map +1 -1
  8. package/dist/build-graph-ids-from-fs.js +2 -2
  9. package/dist/build-graph-ids-from-fs.js.map +1 -1
  10. package/dist/envs-subcommands/envs-replace.cmd.js +8 -1
  11. package/dist/envs-subcommands/envs-replace.cmd.js.map +1 -1
  12. package/dist/envs-subcommands/envs-set.cmd.d.ts +1 -0
  13. package/dist/envs-subcommands/envs-set.cmd.js +3 -2
  14. package/dist/envs-subcommands/envs-set.cmd.js.map +1 -1
  15. package/dist/envs-subcommands/envs-unset.cmd.js +8 -1
  16. package/dist/envs-subcommands/envs-unset.cmd.js.map +1 -1
  17. package/dist/envs-subcommands/envs-update.cmd.js +9 -1
  18. package/dist/envs-subcommands/envs-update.cmd.js.map +1 -1
  19. package/dist/{preview-1709176695075.js → preview-1709349444701.js} +2 -2
  20. package/dist/workspace-component/workspace-component-loader.js +1 -1
  21. package/dist/workspace-component/workspace-component-loader.js.map +1 -1
  22. package/dist/workspace.d.ts +2 -3
  23. package/dist/workspace.js +2 -3
  24. package/dist/workspace.js.map +1 -1
  25. package/envs-subcommands/envs-replace.cmd.ts +2 -1
  26. package/envs-subcommands/envs-set.cmd.ts +3 -1
  27. package/envs-subcommands/envs-unset.cmd.ts +2 -1
  28. package/envs-subcommands/envs-update.cmd.ts +3 -1
  29. package/package.json +23 -23
  30. package/workspace-component/workspace-component-loader.ts +1 -1
@@ -1,6 +1,7 @@
1
1
  import { Command } from '@teambit/cli';
2
2
  import chalk from 'chalk';
3
3
  import { Workspace } from '../workspace';
4
+ import { installAfterEnvChangesMsg } from './envs-set.cmd';
4
5
 
5
6
  export class EnvsReplaceCmd implements Command {
6
7
  name = 'replace <current-env> <new-env>';
@@ -27,6 +28,6 @@ export class EnvsReplaceCmd implements Command {
27
28
  await this.workspace.setEnvToComponents(envId, componentIds);
28
29
  return `added ${chalk.bold(envId.toString())} env to the following component(s):
29
30
  ${componentIds.map((compId) => compId.toString()).join('\n')}\n
30
- please run 'bit install' for env replace changes to take effect`;
31
+ ${installAfterEnvChangesMsg}`;
31
32
  }
32
33
  }
@@ -3,6 +3,8 @@ import chalk from 'chalk';
3
3
  import { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';
4
4
  import { Workspace } from '../workspace';
5
5
 
6
+ export const installAfterEnvChangesMsg = chalk.yellow("please run 'bit install' for the changes to take effect");
7
+
6
8
  export class EnvsSetCmd implements Command {
7
9
  name = 'set <component-pattern> <env>';
8
10
  description = 'Assigns one or more components a development environment (env)';
@@ -43,6 +45,6 @@ export class EnvsSetCmd implements Command {
43
45
  await this.workspace.setEnvToComponents(envId, componentIds);
44
46
  return `assigned ${chalk.bold(envId.toString())} env to the following component(s):
45
47
  ${componentIds.map((compId) => compId.toString()).join('\n')}\n
46
- please run 'bit install' for env replace changes to take effect`;
48
+ ${installAfterEnvChangesMsg}`;
47
49
  }
48
50
  }
@@ -2,6 +2,7 @@ import { Command } from '@teambit/cli';
2
2
  import { PATTERN_HELP, COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';
3
3
  import chalk from 'chalk';
4
4
  import { Workspace } from '../workspace';
5
+ import { installAfterEnvChangesMsg } from './envs-set.cmd';
5
6
 
6
7
  export class EnvsUnsetCmd implements Command {
7
8
  name = 'unset <component-pattern>';
@@ -28,6 +29,6 @@ ${PATTERN_HELP('env unset')}`;
28
29
  return chalk.yellow(`unable to find components matching the pattern with env configured in the .bitmap file`);
29
30
  }
30
31
  return `successfully removed .bitmap env configuration from the following component(s):
31
- ${changed.map((id) => id.toString()).join('\n')}`;
32
+ ${changed.map((id) => id.toString()).join('\n')}\n${installAfterEnvChangesMsg}`;
32
33
  }
33
34
  }
@@ -2,6 +2,7 @@ import { Command } from '@teambit/cli';
2
2
  import chalk from 'chalk';
3
3
  import { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';
4
4
  import { Workspace } from '../workspace';
5
+ import { installAfterEnvChangesMsg } from './envs-set.cmd';
5
6
 
6
7
  export class EnvsUpdateCmd implements Command {
7
8
  name = 'update [env-id] [pattern]';
@@ -45,7 +46,8 @@ export class EnvsUpdateCmd implements Command {
45
46
  })
46
47
  .join('\n\n');
47
48
  const title = chalk.green(`the following component(s) env has been successfully updated:\n`);
48
- return title + body;
49
+ const suffix = `\n${installAfterEnvChangesMsg}`;
50
+ return title + body + suffix;
49
51
  }
50
52
  if (alreadyUpToDate.length) {
51
53
  return chalk.green(
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/workspace",
3
- "version": "1.0.177",
3
+ "version": "1.0.179",
4
4
  "homepage": "https://bit.cloud/teambit/workspace/workspace",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.workspace",
8
8
  "name": "workspace",
9
- "version": "1.0.177"
9
+ "version": "1.0.179"
10
10
  },
11
11
  "dependencies": {
12
12
  "lodash": "4.17.21",
@@ -55,42 +55,42 @@
55
55
  "@teambit/explorer.ui.gallery.component-grid": "0.0.496",
56
56
  "@teambit/scopes.scope-id": "0.0.7",
57
57
  "@teambit/workspace.ui.empty-workspace": "0.0.508",
58
- "@teambit/component": "1.0.177",
59
- "@teambit/dependency-resolver": "1.0.177",
60
- "@teambit/envs": "1.0.177",
61
- "@teambit/logger": "0.0.944",
62
- "@teambit/scope": "1.0.177",
63
- "@teambit/graph": "1.0.177",
64
- "@teambit/cli": "0.0.851",
65
- "@teambit/isolator": "1.0.177",
66
- "@teambit/component-tree": "1.0.177",
58
+ "@teambit/component": "1.0.179",
59
+ "@teambit/dependency-resolver": "1.0.179",
60
+ "@teambit/envs": "1.0.179",
61
+ "@teambit/logger": "0.0.945",
62
+ "@teambit/scope": "1.0.179",
63
+ "@teambit/graph": "1.0.179",
64
+ "@teambit/cli": "0.0.852",
65
+ "@teambit/isolator": "1.0.179",
66
+ "@teambit/component-tree": "1.0.179",
67
67
  "@teambit/harmony.modules.resolved-component": "0.0.497",
68
- "@teambit/watcher": "1.0.177",
69
- "@teambit/aspect-loader": "1.0.177",
70
- "@teambit/config": "0.0.928",
71
- "@teambit/global-config": "0.0.854",
68
+ "@teambit/watcher": "1.0.179",
69
+ "@teambit/aspect-loader": "1.0.179",
70
+ "@teambit/config": "0.0.930",
71
+ "@teambit/global-config": "0.0.855",
72
72
  "@teambit/harmony.modules.requireable-component": "0.0.497",
73
73
  "@teambit/toolbox.modules.module-resolver": "0.0.7",
74
74
  "@teambit/workspace.modules.node-modules-linker": "0.0.165",
75
- "@teambit/graphql": "1.0.177",
76
- "@teambit/bundler": "1.0.177",
77
- "@teambit/pubsub": "1.0.177",
78
- "@teambit/ui": "1.0.177",
79
- "@teambit/variants": "0.0.1021",
75
+ "@teambit/graphql": "1.0.179",
76
+ "@teambit/bundler": "1.0.179",
77
+ "@teambit/pubsub": "1.0.179",
78
+ "@teambit/ui": "1.0.179",
79
+ "@teambit/variants": "0.0.1023",
80
80
  "@teambit/component-issues": "0.0.141",
81
81
  "@teambit/workspace.modules.match-pattern": "0.0.505",
82
82
  "@teambit/component.ui.component-drawer": "0.0.393",
83
83
  "@teambit/lanes.hooks.use-lane-components": "0.0.258",
84
84
  "@teambit/lanes.hooks.use-lanes": "0.0.260",
85
85
  "@teambit/lanes.ui.models.lanes-model": "0.0.212",
86
- "@teambit/command-bar": "1.0.177",
86
+ "@teambit/command-bar": "1.0.179",
87
87
  "@teambit/component.ui.component-filters.component-filter-context": "0.0.218",
88
88
  "@teambit/component.ui.component-filters.deprecate-filter": "0.0.216",
89
89
  "@teambit/component.ui.component-filters.env-filter": "0.0.223",
90
90
  "@teambit/component.ui.component-filters.show-main-filter": "0.0.209",
91
- "@teambit/sidebar": "1.0.177",
91
+ "@teambit/sidebar": "1.0.179",
92
92
  "@teambit/component-descriptor": "0.0.415",
93
- "@teambit/deprecation": "1.0.177",
93
+ "@teambit/deprecation": "1.0.179",
94
94
  "@teambit/ui-foundation.ui.buttons.collapser": "0.0.217",
95
95
  "@teambit/cloud.hooks.use-cloud-scopes": "0.0.3",
96
96
  "@teambit/preview.ui.preview-placeholder": "0.0.514",
@@ -418,7 +418,7 @@ export class WorkspaceComponentLoader {
418
418
  }
419
419
 
420
420
  private async isInWsIncludeDeleted(componentId: ComponentID): Promise<boolean> {
421
- const nonDeletedWsIds = await this.workspace.listIds();
421
+ const nonDeletedWsIds = this.workspace.listIds();
422
422
  const deletedWsIds = await this.workspace.locallyDeletedIds();
423
423
  const allWsIds = nonDeletedWsIds.concat(deletedWsIds);
424
424
  const inWs = allWsIds.find((id) => id.isEqual(componentId, { ignoreVersion: !componentId.hasVersion() }));