@teambit/workspace 1.0.1174 → 1.0.1175

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.
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_workspace@1.0.1174/dist/workspace.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_workspace@1.0.1174/dist/workspace.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_workspace@1.0.1175/dist/workspace.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_workspace@1.0.1175/dist/workspace.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/dist/types.d.ts CHANGED
@@ -81,6 +81,13 @@ export interface WorkspaceExtConfig {
81
81
  * Example: ["oxlint.config.json", "biome.json", "*.bak"]
82
82
  */
83
83
  ignoredFiles?: string[];
84
+ /**
85
+ * If set to `true`, bit tracks every file in a component directory that git would track, including
86
+ * the files it normally treats as bit-generated: `package.json`, a `tsconfig.json` and lint configs
87
+ * at the component root, and npm/yarn lockfiles. For workspaces adopted from an existing monorepo,
88
+ * where those files are the source of truth and bit does not generate them.
89
+ */
90
+ trackAllFiles?: boolean;
84
91
  /**
85
92
  * Scope-name patterns that the workspace trusts when loading aspects (envs,
86
93
  * generators, etc.) imported from those scopes. The effective trust set is:
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["interface VendorConfig {\n directory: string;\n}\n\nexport interface WorkspaceExtConfig {\n /**\n * name of the workspace.\n */\n name: string;\n\n /**\n * path to icon.\n */\n icon: string;\n\n /**\n * set the default scope when there is no matching for the component in the components array.\n */\n defaultScope: string;\n\n /**\n * set the default directory when there is no matching for the component in the components array.\n */\n defaultDirectory: string;\n\n /**\n * sets the location of the root components directory.\n * The location is a relative path to the workspace root and should use linux path separators (/).\n */\n rootComponentsDirectory?: string;\n\n /**\n * set the default structure of components in your project\n */\n vendor: VendorConfig;\n\n /**\n * All component extensions applied by default on all components in the workspace (except vendor components)\n */\n extensions: { [extensionsId: string]: string };\n\n /**\n * If set to\n * `true`, it allows the workspace to resolve scope's aspects from node modules\n * installed in the workspace's `node_modules` directory. If not set or set to `false`, aspects will only be resolved\n * from the scope aspects capsule.\n */\n resolveAspectsFromNodeModules?: boolean;\n\n /**\n * If set to `true`, it allows the workspace to resolve envs from node modules\n * installed in the workspace's `node_modules` directory.\n * the envs will be resolved from the node_modules of the env's root (workspace/node_modules/.bit_roots/{envId})\n * and if not found (usually when the env was hoisted to the root node_modules) then from the node_modules of the\n * workspace.\n * If not set or set to `false`, envs will only be resolved from the scope envs capsule.\n */\n resolveEnvsFromRoots?: boolean;\n\n /**\n * If set to `true`, bit will try to load aspects dependencies automatically.\n * even if the aspects dependencies are not configured in the workspace.jsonc root config.\n * for example having the aspect\n * main aspect\n * export class MainAspectMain {\n * ...\n * static dependencies = [MyDepAspect];\n * }\n * and the in the workspace.jsonc file:\n * {\n * ...\n * main-aspect: {}\n * }\n * when set to true, bit will try to load MyDepAspect automatically.\n */\n autoLoadAspectsDeps?: boolean;\n\n /**\n * If set to `true`, enables external package manager mode. When enabled:\n * - `bit install` will not install dependencies and will prompt the user to use their package manager.\n * - Other commands that trigger installation (e.g., `bit import`, `bit checkout`) will skip the installation and print a warning.\n * When this prop is set by bit to `true`, the following properties are automatically set to `false`:\n * - `rootComponent`.\n * - `enableWorkspaceConfigWrite`.\n */\n externalPackageManager?: boolean;\n\n /**\n * List of file patterns to ignore from all components in the workspace.\n * Uses gitignore syntax.\n * Example: [\"oxlint.config.json\", \"biome.json\", \"*.bak\"]\n */\n ignoredFiles?: string[];\n\n /**\n * Scope-name patterns that the workspace trusts when loading aspects (envs,\n * generators, etc.) imported from those scopes. The effective trust set is:\n * a builtin set (e.g. `teambit.*`, `bitdev.*`) + the owner of `defaultScope`\n * (e.g. `acme.frontend` → `acme.*`) + entries listed here.\n *\n * Patterns: exact (`acme.frontend`) or owner wildcard (`acme.*`).\n * Manage via `bit scope trust [enable|disable|add|remove] [pattern]`.\n */\n trustedScopes?: string[];\n\n /**\n * If set to `true`, Bit auto-syncs the local `.bitmap` to the latest scope HEAD versions\n * whenever the git HEAD has moved since the last sync (sentinel-driven, runs once per\n * `git pull`). Designed for repos with strict branch-protection rules: combined with\n * `bit ci merge --no-bitmap-commit`, the CI never commits `.bitmap` to the default\n * branch — every developer's first Bit command after `git pull` reconciles their\n * local `.bitmap` with the latest exported scope versions automatically.\n *\n * The mechanism is a no-op when:\n * - the workspace is not inside a git repo,\n * - the workspace is on a lane (lanes have their own sync flow),\n * - git HEAD is unchanged since the last successful reconciliation.\n *\n * On a failed remote-scope fetch, the command continues with the cached `.bitmap`\n * state and the sentinel is NOT advanced, so the next command retries.\n */\n bitmapAutoSync?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["interface VendorConfig {\n directory: string;\n}\n\nexport interface WorkspaceExtConfig {\n /**\n * name of the workspace.\n */\n name: string;\n\n /**\n * path to icon.\n */\n icon: string;\n\n /**\n * set the default scope when there is no matching for the component in the components array.\n */\n defaultScope: string;\n\n /**\n * set the default directory when there is no matching for the component in the components array.\n */\n defaultDirectory: string;\n\n /**\n * sets the location of the root components directory.\n * The location is a relative path to the workspace root and should use linux path separators (/).\n */\n rootComponentsDirectory?: string;\n\n /**\n * set the default structure of components in your project\n */\n vendor: VendorConfig;\n\n /**\n * All component extensions applied by default on all components in the workspace (except vendor components)\n */\n extensions: { [extensionsId: string]: string };\n\n /**\n * If set to\n * `true`, it allows the workspace to resolve scope's aspects from node modules\n * installed in the workspace's `node_modules` directory. If not set or set to `false`, aspects will only be resolved\n * from the scope aspects capsule.\n */\n resolveAspectsFromNodeModules?: boolean;\n\n /**\n * If set to `true`, it allows the workspace to resolve envs from node modules\n * installed in the workspace's `node_modules` directory.\n * the envs will be resolved from the node_modules of the env's root (workspace/node_modules/.bit_roots/{envId})\n * and if not found (usually when the env was hoisted to the root node_modules) then from the node_modules of the\n * workspace.\n * If not set or set to `false`, envs will only be resolved from the scope envs capsule.\n */\n resolveEnvsFromRoots?: boolean;\n\n /**\n * If set to `true`, bit will try to load aspects dependencies automatically.\n * even if the aspects dependencies are not configured in the workspace.jsonc root config.\n * for example having the aspect\n * main aspect\n * export class MainAspectMain {\n * ...\n * static dependencies = [MyDepAspect];\n * }\n * and the in the workspace.jsonc file:\n * {\n * ...\n * main-aspect: {}\n * }\n * when set to true, bit will try to load MyDepAspect automatically.\n */\n autoLoadAspectsDeps?: boolean;\n\n /**\n * If set to `true`, enables external package manager mode. When enabled:\n * - `bit install` will not install dependencies and will prompt the user to use their package manager.\n * - Other commands that trigger installation (e.g., `bit import`, `bit checkout`) will skip the installation and print a warning.\n * When this prop is set by bit to `true`, the following properties are automatically set to `false`:\n * - `rootComponent`.\n * - `enableWorkspaceConfigWrite`.\n */\n externalPackageManager?: boolean;\n\n /**\n * List of file patterns to ignore from all components in the workspace.\n * Uses gitignore syntax.\n * Example: [\"oxlint.config.json\", \"biome.json\", \"*.bak\"]\n */\n ignoredFiles?: string[];\n\n /**\n * If set to `true`, bit tracks every file in a component directory that git would track, including\n * the files it normally treats as bit-generated: `package.json`, a `tsconfig.json` and lint configs\n * at the component root, and npm/yarn lockfiles. For workspaces adopted from an existing monorepo,\n * where those files are the source of truth and bit does not generate them.\n */\n trackAllFiles?: boolean;\n\n /**\n * Scope-name patterns that the workspace trusts when loading aspects (envs,\n * generators, etc.) imported from those scopes. The effective trust set is:\n * a builtin set (e.g. `teambit.*`, `bitdev.*`) + the owner of `defaultScope`\n * (e.g. `acme.frontend` → `acme.*`) + entries listed here.\n *\n * Patterns: exact (`acme.frontend`) or owner wildcard (`acme.*`).\n * Manage via `bit scope trust [enable|disable|add|remove] [pattern]`.\n */\n trustedScopes?: string[];\n\n /**\n * If set to `true`, Bit auto-syncs the local `.bitmap` to the latest scope HEAD versions\n * whenever the git HEAD has moved since the last sync (sentinel-driven, runs once per\n * `git pull`). Designed for repos with strict branch-protection rules: combined with\n * `bit ci merge --no-bitmap-commit`, the CI never commits `.bitmap` to the default\n * branch — every developer's first Bit command after `git pull` reconciles their\n * local `.bitmap` with the latest exported scope versions automatically.\n *\n * The mechanism is a no-op when:\n * - the workspace is not inside a git repo,\n * - the workspace is on a lane (lanes have their own sync flow),\n * - git HEAD is unchanged since the last successful reconciliation.\n *\n * On a failed remote-scope fetch, the command continues with the cached `.bitmap`\n * state and the sentinel is NOT advanced, so the next command retries.\n */\n bitmapAutoSync?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
package/dist/workspace.js CHANGED
@@ -898,7 +898,9 @@ it's possible that the version ${component.id.version} belong to ${idStr.split('
898
898
  const compDirAbs = _path().default.join(this.path, compDir);
899
899
  const sourceFilesVinyls = bitMapEntry.files.map(file => {
900
900
  const filePath = _path().default.join(compDirAbs, file.relativePath);
901
- return _component2().SourceFile.load(filePath, compDirAbs, this.path, {});
901
+ const sourceFile = _component2().SourceFile.load(filePath, compDirAbs, this.path, {});
902
+ sourceFile.contents = (0, _legacy2().fileContentsForVersioning)(bitMapEntry, file.relativePath, sourceFile.contents);
903
+ return sourceFile;
902
904
  });
903
905
  const repo = this.scope.legacyScope.objects;
904
906
  const getModelFiles = async () => {