@teambit/dependencies 1.0.1258 → 1.0.1260

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.
@@ -114,8 +114,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
114
114
  * this file had been forked from https://github.com/dependents/node-precinct
115
115
  */
116
116
 
117
- // @ts-ignore we currently have @types/node as v12, and this is available > 16. once updated, remove the ts-ignore
118
-
119
117
  /**
120
118
  * The file info object.
121
119
  * - `ext` is the file extension.
@@ -1 +1 @@
1
- {"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_path","_module","_moduleDefinition","_nodeSourceWalk","_detectiveAmd","_detectiveStylus","_mdxDepsDetectors","_nodeDepsDetectors","_stylingDepsDetectors","_stylingDepsDetectors2","_stylingDepsDetectors3","_stylingDepsDetectors4","_typescriptDepsDetectors","_dependencyResolver","e","__esModule","default","jsExt","extToType","typeToDetective","css","detectiveCss","sass","detectiveSass","less","detectiveLess","scss","detectiveScss","stylus","detectiveStylus","ts","detectiveTypeScript","commonjs","detectiveEs6","es6","amd","detectiveAmd","md","detectiveMdx","debug","detectorHook","DetectorHook","assign","o1","o2","key","hasOwnProperty","getFileInfo","filename","content","ext","path","extname","type","ast","getDetector","fileInfo","options","normalizedOptions","envDetectors","detector","isSupported","detect","detective","jsx","undefined","getJsDetector","includes","walker","Walker","parse","message","useContent","getModuleType","fromSource","normalizeDeps","deps","includeCore","normalizedDeps","Array","isArray","Object","keys","filter","d","isBuiltin","getDepsFromContent","startsWith","getDepsFromFile","fs","readFileSync","precinct","paperwork","paperworkFromContent","_default","exports"],"sources":["index.ts"],"sourcesContent":["/**\n * this file had been forked from https://github.com/dependents/node-precinct\n */\nimport fs from 'fs-extra';\nimport path from 'path';\n// @ts-ignore we currently have @types/node as v12, and this is available > 16. once updated, remove the ts-ignore\nimport { isBuiltin } from 'module';\n\nimport getModuleType from 'module-definition';\nimport Walker from 'node-source-walk';\n\nimport detectiveAmd from 'detective-amd';\nimport detectiveStylus from 'detective-stylus';\n\nimport detectiveMdx from '@teambit/mdx.deps-detectors.detective-mdx';\nimport detectiveEs6 from '@teambit/node.deps-detectors.detective-es6';\nimport detectiveCss from '@teambit/styling.deps-detectors.detective-css';\nimport detectiveLess from '@teambit/styling.deps-detectors.detective-less';\nimport detectiveSass from '@teambit/styling.deps-detectors.detective-sass';\nimport detectiveScss from '@teambit/styling.deps-detectors.detective-scss';\nimport detectiveTypeScript from '@teambit/typescript.deps-detectors.detective-typescript';\n\nimport type { DependencyDetector } from '@teambit/dependency-resolver';\nimport { DetectorHook } from '@teambit/dependency-resolver';\n\n/**\n * The file info object.\n * - `ext` is the file extension.\n * - `content` is the input file content.\n * - `type` is the parsed file type from ext or content.\n * - `ast` is the eventually consumed content by the corresponding detective.\n */\ntype FileInfo = {\n ext: string;\n content: string | object;\n type: string;\n ast: any;\n filename: string;\n};\n\ntype Options = {\n envDetectors?: DependencyDetector[];\n useContent?: boolean;\n includeCore?: boolean;\n type?: string;\n [lang: string]: any;\n};\n\ntype BuiltinDeps = string[] | Record<string, any>;\ntype Detective = (fileContent: string, options?: any) => BuiltinDeps;\n\nconst jsExt = ['.js', '.jsx', '.cjs', '.mjs'];\n\nconst extToType = {\n '.css': 'css',\n '.sass': 'sass',\n '.less': 'less',\n '.scss': 'scss',\n '.styl': 'stylus',\n '.mts': 'ts',\n '.cts': 'ts',\n '.ts': 'ts',\n '.tsx': 'ts',\n '.md': 'md',\n '.mdx': 'md',\n};\n\nconst typeToDetective: Record<string, Detective> = {\n css: detectiveCss,\n sass: detectiveSass,\n less: detectiveLess,\n scss: detectiveScss,\n stylus: detectiveStylus,\n ts: detectiveTypeScript,\n commonjs: detectiveEs6,\n es6: detectiveEs6,\n amd: detectiveAmd,\n md: detectiveMdx,\n};\n\nconst debug = require('debug')('precinct');\n\nconst detectorHook = new DetectorHook();\n\nconst assign = (o1, o2) => {\n // eslint-disable-next-line\n for (const key in o2) {\n // eslint-disable-next-line\n if (o2.hasOwnProperty(key)) {\n o1[key] = o2[key];\n }\n }\n\n return o1;\n};\n\n/**\n * Get file info from the given file path and its content.\n */\nconst getFileInfo = (filename: string, content: string): FileInfo => {\n const ext = path.extname(filename);\n return {\n ext,\n content,\n // determined later\n type: '',\n // initialized with the content\n ast: content,\n filename,\n };\n};\n\n/**\n * Get the non-JS detective for the given file info.\n * The type of the file would be determined as well.\n * Return undefined if no proper detective found, perhaps it's plain\n * JavaScript or unknown content. We can deal with it later.\n */\nconst getDetector = (fileInfo: FileInfo, options?: Options): Detective | undefined => {\n const { ext, filename } = fileInfo;\n const normalizedOptions: Options = options || {};\n\n // from env detectors\n if (options?.envDetectors) {\n for (const detector of options.envDetectors) {\n if (detector.isSupported({ ext, filename })) {\n fileInfo.type = detector.type || '';\n return detector.detect as Detective;\n }\n }\n }\n\n // from the global detector hook. checked before the builtin detectors so that an\n // aspect-registered detector (e.g. the mdx aspect's compile-based one) takes precedence over a\n // builtin detective for the same extension, same as env detectors do.\n if (detectorHook.isSupported(ext, filename)) {\n const detector = detectorHook.getDetector(ext, filename);\n if (detector) {\n fileInfo.type = ext;\n return detector.detect as Detective;\n }\n }\n\n // from builtin detectors\n // - check `fileInfo.type` first to support `precinct(content, { type })`\n const type = fileInfo.type || extToType[ext];\n if (typeToDetective[type]) {\n const detective = typeToDetective[type];\n fileInfo.type = type;\n // special logic for tsx files\n if (ext === '.tsx') {\n if (!normalizedOptions.ts) normalizedOptions.ts = {};\n normalizedOptions.ts.jsx = true;\n }\n return detective;\n }\n\n return undefined;\n};\n\n/**\n * Get the JS detective (amd/es6/cjs) for the given file info.\n * The type and ast of the file would be determined as well.\n */\nconst getJsDetector = (fileInfo: FileInfo, options?: Options): Detective | undefined => {\n if (!jsExt.includes(fileInfo.ext)) {\n return undefined;\n }\n\n if (typeof fileInfo.content !== 'object') {\n const walker = new Walker();\n try {\n fileInfo.ast = walker.parse(fileInfo.content);\n } catch (e: any) {\n debug('could not parse content: %s', e.message);\n throw e;\n }\n }\n\n const useContent = options?.useContent;\n const type = useContent ? getModuleType.fromSource(fileInfo.content) : getModuleType.fromSource(fileInfo.ast);\n const detector = typeToDetective[type];\n fileInfo.type = type;\n\n return detector;\n};\n\n/**\n * Normalize the deps into an array.\n */\nconst normalizeDeps = (deps: BuiltinDeps, includeCore?: boolean): string[] => {\n const normalizedDeps = Array.isArray(deps) ? deps : Object.keys(deps);\n return includeCore ? normalizedDeps : normalizedDeps.filter((d) => !isBuiltin(d));\n};\n\n/**\n * returns undefined when the file type is not supported (no detector for it).\n */\nconst getDepsFromContent = async (\n filename: string,\n content: string,\n options?: Options\n): Promise<string[] | undefined> => {\n const normalizedOptions: Options = assign({ includeCore: true }, options || {});\n const fileInfo = getFileInfo(filename, content);\n if (content.startsWith('// @bit-no-check') || content.startsWith('/* @bit-no-check')) {\n debug(`skipping file ${filename}, it has a @bit-no-check comment`);\n return [];\n }\n\n const detective = getDetector(fileInfo, normalizedOptions) || getJsDetector(fileInfo, normalizedOptions);\n if (!detective) {\n debug(`skipping unsupported file ${filename}`);\n return undefined;\n }\n debug('module type: ', fileInfo.type);\n\n const deps = await detective(fileInfo.ast, normalizedOptions[fileInfo.type]);\n\n return normalizeDeps(deps, normalizedOptions?.includeCore);\n};\n\nconst getDepsFromFile = async (filename: string, options?: Options): Promise<string[]> => {\n const content = fs.readFileSync(filename, 'utf8');\n return (await getDepsFromContent(filename, content, options)) || [];\n};\n\nconst precinct = {\n paperwork: getDepsFromFile,\n /**\n * same as paperwork, for a file that is not on the filesystem (e.g. in a bare scope)\n */\n paperworkFromContent: getDepsFromContent,\n};\n\nexport default precinct;\n"],"mappings":";;;;;;AAGA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC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/C,IAAIA,OAAO,CAACsC,UAAU,CAAC,kBAAkB,CAAC,IAAItC,OAAO,CAACsC,UAAU,CAAC,kBAAkB,CAAC,EAAE;IACpFhD,KAAK,CAAC,iBAAiBS,QAAQ,kCAAkC,CAAC;IAClE,OAAO,EAAE;EACX;EAEA,MAAMe,SAAS,GAAGR,WAAW,CAACC,QAAQ,EAAEE,iBAAiB,CAAC,IAAIQ,aAAa,CAACV,QAAQ,EAAEE,iBAAiB,CAAC;EACxG,IAAI,CAACK,SAAS,EAAE;IACdxB,KAAK,CAAC,6BAA6BS,QAAQ,EAAE,CAAC;IAC9C,OAAOiB,SAAS;EAClB;EACA1B,KAAK,CAAC,eAAe,EAAEiB,QAAQ,CAACH,IAAI,CAAC;EAErC,MAAMuB,IAAI,GAAG,MAAMb,SAAS,CAACP,QAAQ,CAACF,GAAG,EAAEI,iBAAiB,CAACF,QAAQ,CAACH,IAAI,CAAC,CAAC;EAE5E,OAAOsB,aAAa,CAACC,IAAI,EAAElB,iBAAiB,EAAEmB,WAAW,CAAC;AAC5D,CAAC;AAED,MAAMW,eAAe,GAAG,MAAAA,CAAOxC,QAAgB,EAAES,OAAiB,KAAwB;EACxF,MAAMR,OAAO,GAAGwC,kBAAE,CAACC,YAAY,CAAC1C,QAAQ,EAAE,MAAM,CAAC;EACjD,OAAO,CAAC,MAAMsC,kBAAkB,CAACtC,QAAQ,EAAEC,OAAO,EAAEQ,OAAO,CAAC,KAAK,EAAE;AACrE,CAAC;AAED,MAAMkC,QAAQ,GAAG;EACfC,SAAS,EAAEJ,eAAe;EAC1B;AACF;AACA;EACEK,oBAAoB,EAAEP;AACxB,CAAC;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAA/E,OAAA,GAEa2E,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_path","_module","_moduleDefinition","_nodeSourceWalk","_detectiveAmd","_detectiveStylus","_mdxDepsDetectors","_nodeDepsDetectors","_stylingDepsDetectors","_stylingDepsDetectors2","_stylingDepsDetectors3","_stylingDepsDetectors4","_typescriptDepsDetectors","_dependencyResolver","e","__esModule","default","jsExt","extToType","typeToDetective","css","detectiveCss","sass","detectiveSass","less","detectiveLess","scss","detectiveScss","stylus","detectiveStylus","ts","detectiveTypeScript","commonjs","detectiveEs6","es6","amd","detectiveAmd","md","detectiveMdx","debug","detectorHook","DetectorHook","assign","o1","o2","key","hasOwnProperty","getFileInfo","filename","content","ext","path","extname","type","ast","getDetector","fileInfo","options","normalizedOptions","envDetectors","detector","isSupported","detect","detective","jsx","undefined","getJsDetector","includes","walker","Walker","parse","message","useContent","getModuleType","fromSource","normalizeDeps","deps","includeCore","normalizedDeps","Array","isArray","Object","keys","filter","d","isBuiltin","getDepsFromContent","startsWith","getDepsFromFile","fs","readFileSync","precinct","paperwork","paperworkFromContent","_default","exports"],"sources":["index.ts"],"sourcesContent":["/**\n * this file had been forked from https://github.com/dependents/node-precinct\n */\nimport fs from 'fs-extra';\nimport path from 'path';\nimport { isBuiltin } from 'module';\n\nimport getModuleType from 'module-definition';\nimport Walker from 'node-source-walk';\n\nimport detectiveAmd from 'detective-amd';\nimport detectiveStylus from 'detective-stylus';\n\nimport detectiveMdx from '@teambit/mdx.deps-detectors.detective-mdx';\nimport detectiveEs6 from '@teambit/node.deps-detectors.detective-es6';\nimport detectiveCss from '@teambit/styling.deps-detectors.detective-css';\nimport detectiveLess from '@teambit/styling.deps-detectors.detective-less';\nimport detectiveSass from '@teambit/styling.deps-detectors.detective-sass';\nimport detectiveScss from '@teambit/styling.deps-detectors.detective-scss';\nimport detectiveTypeScript from '@teambit/typescript.deps-detectors.detective-typescript';\n\nimport type { DependencyDetector } from '@teambit/dependency-resolver';\nimport { DetectorHook } from '@teambit/dependency-resolver';\n\n/**\n * The file info object.\n * - `ext` is the file extension.\n * - `content` is the input file content.\n * - `type` is the parsed file type from ext or content.\n * - `ast` is the eventually consumed content by the corresponding detective.\n */\ntype FileInfo = {\n ext: string;\n content: string | object;\n type: string;\n ast: any;\n filename: string;\n};\n\ntype Options = {\n envDetectors?: DependencyDetector[];\n useContent?: boolean;\n includeCore?: boolean;\n type?: string;\n [lang: string]: any;\n};\n\ntype BuiltinDeps = string[] | Record<string, any>;\ntype Detective = (fileContent: string, options?: any) => BuiltinDeps;\n\nconst jsExt = ['.js', '.jsx', '.cjs', '.mjs'];\n\nconst extToType = {\n '.css': 'css',\n '.sass': 'sass',\n '.less': 'less',\n '.scss': 'scss',\n '.styl': 'stylus',\n '.mts': 'ts',\n '.cts': 'ts',\n '.ts': 'ts',\n '.tsx': 'ts',\n '.md': 'md',\n '.mdx': 'md',\n};\n\nconst typeToDetective: Record<string, Detective> = {\n css: detectiveCss,\n sass: detectiveSass,\n less: detectiveLess,\n scss: detectiveScss,\n stylus: detectiveStylus,\n ts: detectiveTypeScript,\n commonjs: detectiveEs6,\n es6: detectiveEs6,\n amd: detectiveAmd,\n md: detectiveMdx,\n};\n\nconst debug = require('debug')('precinct');\n\nconst detectorHook = new DetectorHook();\n\nconst assign = (o1, o2) => {\n // eslint-disable-next-line\n for (const key in o2) {\n // eslint-disable-next-line\n if (o2.hasOwnProperty(key)) {\n o1[key] = o2[key];\n }\n }\n\n return o1;\n};\n\n/**\n * Get file info from the given file path and its content.\n */\nconst getFileInfo = (filename: string, content: string): FileInfo => {\n const ext = path.extname(filename);\n return {\n ext,\n content,\n // determined later\n type: '',\n // initialized with the content\n ast: content,\n filename,\n };\n};\n\n/**\n * Get the non-JS detective for the given file info.\n * The type of the file would be determined as well.\n * Return undefined if no proper detective found, perhaps it's plain\n * JavaScript or unknown content. We can deal with it later.\n */\nconst getDetector = (fileInfo: FileInfo, options?: Options): Detective | undefined => {\n const { ext, filename } = fileInfo;\n const normalizedOptions: Options = options || {};\n\n // from env detectors\n if (options?.envDetectors) {\n for (const detector of options.envDetectors) {\n if (detector.isSupported({ ext, filename })) {\n fileInfo.type = detector.type || '';\n return detector.detect as Detective;\n }\n }\n }\n\n // from the global detector hook. checked before the builtin detectors so that an\n // aspect-registered detector (e.g. the mdx aspect's compile-based one) takes precedence over a\n // builtin detective for the same extension, same as env detectors do.\n if (detectorHook.isSupported(ext, filename)) {\n const detector = detectorHook.getDetector(ext, filename);\n if (detector) {\n fileInfo.type = ext;\n return detector.detect as Detective;\n }\n }\n\n // from builtin detectors\n // - check `fileInfo.type` first to support `precinct(content, { type })`\n const type = fileInfo.type || extToType[ext];\n if (typeToDetective[type]) {\n const detective = typeToDetective[type];\n fileInfo.type = type;\n // special logic for tsx files\n if (ext === '.tsx') {\n if (!normalizedOptions.ts) normalizedOptions.ts = {};\n normalizedOptions.ts.jsx = true;\n }\n return detective;\n }\n\n return undefined;\n};\n\n/**\n * Get the JS detective (amd/es6/cjs) for the given file info.\n * The type and ast of the file would be determined as well.\n */\nconst getJsDetector = (fileInfo: FileInfo, options?: Options): Detective | undefined => {\n if (!jsExt.includes(fileInfo.ext)) {\n return undefined;\n }\n\n if (typeof fileInfo.content !== 'object') {\n const walker = new Walker();\n try {\n fileInfo.ast = walker.parse(fileInfo.content);\n } catch (e: any) {\n debug('could not parse content: %s', e.message);\n throw e;\n }\n }\n\n const useContent = options?.useContent;\n const type = useContent ? getModuleType.fromSource(fileInfo.content) : getModuleType.fromSource(fileInfo.ast);\n const detector = typeToDetective[type];\n fileInfo.type = type;\n\n return detector;\n};\n\n/**\n * Normalize the deps into an array.\n */\nconst normalizeDeps = (deps: BuiltinDeps, includeCore?: boolean): string[] => {\n const normalizedDeps = Array.isArray(deps) ? deps : Object.keys(deps);\n return includeCore ? normalizedDeps : normalizedDeps.filter((d) => !isBuiltin(d));\n};\n\n/**\n * returns undefined when the file type is not supported (no detector for it).\n */\nconst getDepsFromContent = async (\n filename: string,\n content: string,\n options?: Options\n): Promise<string[] | undefined> => {\n const normalizedOptions: Options = assign({ includeCore: true }, options || {});\n const fileInfo = getFileInfo(filename, content);\n if (content.startsWith('// @bit-no-check') || content.startsWith('/* @bit-no-check')) {\n debug(`skipping file ${filename}, it has a @bit-no-check comment`);\n return [];\n }\n\n const detective = getDetector(fileInfo, normalizedOptions) || getJsDetector(fileInfo, normalizedOptions);\n if (!detective) {\n debug(`skipping unsupported file ${filename}`);\n return undefined;\n }\n debug('module type: ', fileInfo.type);\n\n const deps = await detective(fileInfo.ast, normalizedOptions[fileInfo.type]);\n\n return normalizeDeps(deps, normalizedOptions?.includeCore);\n};\n\nconst getDepsFromFile = async (filename: string, options?: Options): Promise<string[]> => {\n const content = fs.readFileSync(filename, 'utf8');\n return (await getDepsFromContent(filename, content, options)) || [];\n};\n\nconst precinct = {\n paperwork: getDepsFromFile,\n /**\n * same as paperwork, for a file that is not on the filesystem (e.g. in a bare scope)\n */\n paperworkFromContent: getDepsFromContent,\n};\n\nexport default precinct;\n"],"mappings":";;;;;;AAGA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,kBAAA;EAAA,MAAAL,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAG,iBAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,gBAAA;EAAA,MAAAN,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAI,eAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,cAAA;EAAA,MAAAP,IAAA,G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B,CAACF,QAAQ,CAACH,IAAI,CAAC,CAAC;EAE5E,OAAOsB,aAAa,CAACC,IAAI,EAAElB,iBAAiB,EAAEmB,WAAW,CAAC;AAC5D,CAAC;AAED,MAAMW,eAAe,GAAG,MAAAA,CAAOxC,QAAgB,EAAES,OAAiB,KAAwB;EACxF,MAAMR,OAAO,GAAGwC,kBAAE,CAACC,YAAY,CAAC1C,QAAQ,EAAE,MAAM,CAAC;EACjD,OAAO,CAAC,MAAMsC,kBAAkB,CAACtC,QAAQ,EAAEC,OAAO,EAAEQ,OAAO,CAAC,KAAK,EAAE;AACrE,CAAC;AAED,MAAMkC,QAAQ,GAAG;EACfC,SAAS,EAAEJ,eAAe;EAC1B;AACF;AACA;EACEK,oBAAoB,EAAEP;AACxB,CAAC;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAA/E,OAAA,GAEa2E,QAAQ","ignoreList":[]}
@@ -3,7 +3,6 @@
3
3
  */
4
4
  import fs from 'fs-extra';
5
5
  import path from 'path';
6
- // @ts-ignore we currently have @types/node as v12, and this is available > 16. once updated, remove the ts-ignore
7
6
  import { isBuiltin } from 'module';
8
7
 
9
8
  import getModuleType from 'module-definition';
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/dependencies",
3
- "version": "1.0.1258",
3
+ "version": "1.0.1260",
4
4
  "homepage": "https://bit.cloud/teambit/dependencies/dependencies",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.dependencies",
8
8
  "name": "dependencies",
9
- "version": "1.0.1258"
9
+ "version": "1.0.1260"
10
10
  },
11
11
  "dependencies": {
12
12
  "archy": "1.0.0",
@@ -28,7 +28,6 @@
28
28
  "detective-stylus": "1.0.0",
29
29
  "module-definition": "3.3.1",
30
30
  "node-source-walk": "4.2.0",
31
- "@teambit/cli": "0.0.1427",
32
31
  "@teambit/component-issues": "0.0.192",
33
32
  "@teambit/legacy.constants": "0.0.50",
34
33
  "@teambit/harmony": "0.4.12",
@@ -36,21 +35,12 @@
36
35
  "@teambit/component-package-version": "0.0.466",
37
36
  "@teambit/dependencies.pnpm.dep-path": "1.0.1",
38
37
  "@teambit/harmony.modules.runtimes": "0.0.4",
39
- "@teambit/legacy.consumer-component": "0.0.194",
40
- "@teambit/legacy.consumer-config": "0.0.193",
41
- "@teambit/legacy.consumer": "0.0.196",
42
38
  "@teambit/logger": "0.0.1502",
43
39
  "@teambit/bit-error": "0.0.404",
44
- "@teambit/legacy.component-list": "0.0.250",
45
- "@teambit/legacy.dependency-graph": "0.0.198",
46
- "@teambit/component.sources": "0.0.245",
47
- "@teambit/legacy.utils": "0.0.56",
48
40
  "@teambit/toolbox.path.path": "0.0.26",
49
- "@teambit/legacy.bit-map": "0.0.250",
50
41
  "@teambit/component-version": "1.0.4",
51
42
  "@teambit/legacy.logger": "0.0.71",
52
43
  "@teambit/toolbox.fs.extension-getter": "0.0.22",
53
- "@teambit/legacy.extension-data": "0.0.195",
54
44
  "@teambit/toolbox.fs.last-modified": "0.0.24",
55
45
  "@teambit/toolbox.crypto.sha1": "0.0.24",
56
46
  "@teambit/styling.deps-lookups.lookup-styling": "0.0.4",
@@ -62,15 +52,25 @@
62
52
  "@teambit/styling.deps-detectors.detective-sass": "0.0.9",
63
53
  "@teambit/styling.deps-detectors.detective-scss": "0.0.9",
64
54
  "@teambit/typescript.deps-detectors.detective-typescript": "0.0.10",
65
- "@teambit/graph": "1.0.1253",
66
- "@teambit/workspace": "1.0.1256",
67
- "@teambit/aspect-loader": "1.0.1239",
68
- "@teambit/component": "1.0.1239",
69
- "@teambit/dependency-resolver": "1.0.1240",
70
- "@teambit/dev-files": "1.0.1256",
71
- "@teambit/issues": "1.0.1239",
72
- "@teambit/scope": "1.0.1255",
73
- "@teambit/objects": "0.0.732"
55
+ "@teambit/cli": "0.0.1429",
56
+ "@teambit/graph": "1.0.1255",
57
+ "@teambit/workspace": "1.0.1258",
58
+ "@teambit/aspect-loader": "1.0.1241",
59
+ "@teambit/component": "1.0.1241",
60
+ "@teambit/dependency-resolver": "1.0.1242",
61
+ "@teambit/dev-files": "1.0.1258",
62
+ "@teambit/issues": "1.0.1241",
63
+ "@teambit/legacy.consumer-component": "0.0.195",
64
+ "@teambit/legacy.consumer-config": "0.0.194",
65
+ "@teambit/legacy.consumer": "0.0.198",
66
+ "@teambit/scope": "1.0.1257",
67
+ "@teambit/legacy.component-list": "0.0.252",
68
+ "@teambit/legacy.dependency-graph": "0.0.200",
69
+ "@teambit/objects": "0.0.734",
70
+ "@teambit/component.sources": "0.0.246",
71
+ "@teambit/legacy.utils": "0.0.57",
72
+ "@teambit/legacy.bit-map": "0.0.251",
73
+ "@teambit/legacy.extension-data": "0.0.196"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@types/cli-table": "^0.3.0",
@@ -81,11 +81,11 @@
81
81
  "rewire": "7.0.0",
82
82
  "sinon": "17.0.1",
83
83
  "@types/mocha": "9.1.0",
84
- "@teambit/component.testing.mock-components": "0.0.472",
85
- "@teambit/harmony.testing.load-aspect": "0.0.466",
86
- "@teambit/workspace.testing.mock-workspace": "0.0.280",
87
84
  "@teambit/defender.fs.global-bit-temp-dir": "0.0.1",
88
- "@teambit/harmony.envs.core-aspect-env": "2.1.2"
85
+ "@teambit/harmony.envs.core-aspect-env": "2.1.2",
86
+ "@teambit/component.testing.mock-components": "0.0.474",
87
+ "@teambit/harmony.testing.load-aspect": "0.0.468",
88
+ "@teambit/workspace.testing.mock-workspace": "0.0.282"
89
89
  },
90
90
  "peerDependencies": {
91
91
  "chai": "5.2.1"