@teambit/typescript 1.0.869 → 1.0.871
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.typescript_typescript@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.typescript_typescript@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.typescript_typescript@1.0.871/dist/typescript.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.typescript_typescript@1.0.871/dist/typescript.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
@@ -34,60 +34,72 @@ class TypeScriptParser {
|
|
|
34
34
|
const staticProperties = this.parseStaticProperties(sourceFile);
|
|
35
35
|
const exportModels = [];
|
|
36
36
|
sourceFile.statements.forEach(statement => {
|
|
37
|
-
|
|
38
|
-
if (_typescript().default.isExportAssignment(statement)) {
|
|
37
|
+
try {
|
|
39
38
|
// export default
|
|
40
|
-
|
|
39
|
+
if (_typescript().default.isExportAssignment(statement)) {
|
|
40
|
+
// export default
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// export declarations or re-exports
|
|
44
|
+
if (_typescript().default.isExportDeclaration(statement)) {
|
|
45
|
+
if (statement.exportClause) {
|
|
46
|
+
if (_typescript().default.isNamedExports(statement.exportClause)) {
|
|
47
|
+
const elements = statement.exportClause.elements;
|
|
48
|
+
if (!elements || elements.length === 0) return;
|
|
49
|
+
elements.forEach(element => {
|
|
50
|
+
// Handle both Identifier and StringLiteral export names (TypeScript 5.6+ arbitrary module namespace identifiers)
|
|
51
|
+
const name = _typescript().default.isIdentifier(element.name) ? element.name.escapedText.toString() : element.name.text;
|
|
52
|
+
if (name !== 'default') {
|
|
53
|
+
exportModels.push(new (_semanticsEntities().Export)(name, staticProperties.get(name)));
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
if (_typescript().default.isNamespaceExport(statement.exportClause)) {
|
|
58
|
+
const nameNode = statement.exportClause.name;
|
|
59
|
+
if (!nameNode) return;
|
|
41
60
|
|
|
42
|
-
// export declarations or re-exports
|
|
43
|
-
if (_typescript().default.isExportDeclaration(statement)) {
|
|
44
|
-
if (statement.exportClause) {
|
|
45
|
-
if (_typescript().default.isNamedExports(statement.exportClause)) {
|
|
46
|
-
statement.exportClause.elements.forEach(element => {
|
|
47
61
|
// Handle both Identifier and StringLiteral export names (TypeScript 5.6+ arbitrary module namespace identifiers)
|
|
48
|
-
const name = _typescript().default.isIdentifier(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
if (_typescript().default.isNamespaceExport(statement.exportClause)) {
|
|
55
|
-
// Handle both Identifier and StringLiteral export names (TypeScript 5.6+ arbitrary module namespace identifiers)
|
|
56
|
-
const name = _typescript().default.isIdentifier(statement.exportClause.name) ? statement.exportClause.name.escapedText.toString() : statement.exportClause.name.text;
|
|
57
|
-
exportModels.push(new (_semanticsEntities().Export)(name, staticProperties.get(name)));
|
|
62
|
+
const name = _typescript().default.isIdentifier(nameNode) ? nameNode.escapedText.toString() : nameNode.text;
|
|
63
|
+
exportModels.push(new (_semanticsEntities().Export)(name, staticProperties.get(name)));
|
|
64
|
+
}
|
|
58
65
|
}
|
|
59
66
|
}
|
|
60
|
-
}
|
|
61
67
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
68
|
+
// export modifiers
|
|
69
|
+
// - variable statement
|
|
70
|
+
// - function statement
|
|
71
|
+
// - class statement
|
|
72
|
+
const statementModifiers = _typescript().default.canHaveModifiers(statement) ? _typescript().default.getModifiers(statement) : undefined;
|
|
73
|
+
if (statementModifiers) {
|
|
74
|
+
statementModifiers.some(modifier => {
|
|
75
|
+
if (modifier.kind === _typescript().default.SyntaxKind.ExportKeyword) {
|
|
76
|
+
if (_typescript().default.isVariableStatement(statement)) {
|
|
77
|
+
const declarations = statement.declarationList?.declarations;
|
|
78
|
+
if (!declarations || declarations.length === 0) return true;
|
|
79
|
+
const child = declarations[0];
|
|
80
|
+
if (!child) return true;
|
|
81
|
+
if (_typescript().default.isIdentifier(child.name)) {
|
|
82
|
+
const name = child.name.escapedText.toString();
|
|
83
|
+
exportModels.push(new (_semanticsEntities().Export)(name, staticProperties.get(name)));
|
|
84
|
+
}
|
|
85
|
+
} else if (_typescript().default.isFunctionDeclaration(statement)) {
|
|
86
|
+
if (statement.name) {
|
|
87
|
+
const name = statement.name.escapedText.toString();
|
|
88
|
+
exportModels.push(new (_semanticsEntities().Export)(name, staticProperties.get(name)));
|
|
89
|
+
}
|
|
90
|
+
} else if (_typescript().default.isClassDeclaration(statement)) {
|
|
91
|
+
if (statement.name) {
|
|
92
|
+
const name = statement.name.escapedText.toString();
|
|
93
|
+
exportModels.push(new (_semanticsEntities().Export)(name, staticProperties.get(name)));
|
|
94
|
+
}
|
|
85
95
|
}
|
|
96
|
+
return true;
|
|
86
97
|
}
|
|
87
|
-
return
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
98
|
+
return false;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
} catch (e) {
|
|
102
|
+
this.logger?.error('failed parsing statement', e);
|
|
91
103
|
}
|
|
92
104
|
});
|
|
93
105
|
const withoutEmpty = exportModels.filter(exportModel => exportModel !== undefined);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_semanticsEntities","data","require","_fsExtra","_typescript","_interopRequireDefault","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","TypeScriptParser","getExports","sourceFile","staticProperties","parseStaticProperties","exportModels","statements","forEach","statement","ts","isExportAssignment","isExportDeclaration","exportClause","isNamedExports","elements","element","name","isIdentifier","escapedText","toString","text","push","Export","get","isNamespaceExport","statementModifiers","canHaveModifiers","getModifiers","undefined","some","modifier","kind","SyntaxKind","ExportKeyword","isVariableStatement","child","declarationList","declarations","isFunctionDeclaration","isClassDeclaration","withoutEmpty","filter","exportModel","parseModule","modulePath","content","ast","createSourceFile","readFileSync","ScriptTarget","Latest","moduleExports","exportStaticProperties","Map","isExpressionStatement","isBinaryExpression","expression","operatorToken","EqualsToken","isPropertyAccessExpression","left","targetName","propertyName","has","set","existingProperties","isStringLiteral","right","isNumericLiteral","UndefinedKeyword","NullKeyword","TrueKeyword","FalseKeyword","err","logger","error","constructor","exports"],"sources":["typescript.parser.ts"],"sourcesContent":["import type { Parser } from '@teambit/schema';\nimport type { StaticProperties } from '@teambit/semantics.entities.semantic-schema';\nimport { Export } from '@teambit/semantics.entities.semantic-schema';\nimport type { Logger } from '@teambit/logger';\nimport { readFileSync } from 'fs-extra';\nimport ts from 'typescript';\n\nexport class TypeScriptParser implements Parser {\n public extension = /^.*\\.(js|jsx|ts|tsx)$/;\n\n getExports(sourceFile: ts.SourceFile): Export[] {\n const staticProperties = this.parseStaticProperties(sourceFile);\n const exportModels: Export[] = [];\n\n sourceFile.statements.forEach((statement) => {\n // export default\n if (ts.isExportAssignment(statement)) {\n // export default\n }\n\n // export declarations or re-exports\n if (ts.isExportDeclaration(statement)) {\n if (statement.exportClause) {\n if (ts.isNamedExports(statement.exportClause)) {\n statement.exportClause.elements.forEach((element) => {\n // Handle both Identifier and StringLiteral export names (TypeScript 5.6+ arbitrary module namespace identifiers)\n const name = ts.isIdentifier(element.name)\n ? element.name.escapedText.toString()\n : (element.name as ts.StringLiteral).text;\n if (name !== 'default') {\n exportModels.push(new Export(name, staticProperties.get(name)));\n }\n });\n }\n if (ts.isNamespaceExport(statement.exportClause)) {\n // Handle both Identifier and StringLiteral export names (TypeScript 5.6+ arbitrary module namespace identifiers)\n const name = ts.isIdentifier(statement.exportClause.name)\n ? statement.exportClause.name.escapedText.toString()\n : (statement.exportClause.name as ts.StringLiteral).text;\n exportModels.push(new Export(name, staticProperties.get(name)));\n }\n }\n }\n\n // export modifiers\n // - variable statement\n // - function statement\n // - class statement\n const statementModifiers = ts.canHaveModifiers(statement) ? ts.getModifiers(statement) : undefined;\n if (statementModifiers) {\n statementModifiers.some((modifier) => {\n if (modifier.kind === ts.SyntaxKind.ExportKeyword) {\n if (ts.isVariableStatement(statement)) {\n const child = statement.declarationList.declarations[0];\n if (ts.isIdentifier(child.name)) {\n const name = child.name.escapedText.toString();\n exportModels.push(new Export(name, staticProperties.get(name)));\n }\n } else if (ts.isFunctionDeclaration(statement)) {\n if (statement.name) {\n const name = statement.name.escapedText.toString();\n exportModels.push(new Export(name, staticProperties.get(name)));\n }\n } else if (ts.isClassDeclaration(statement)) {\n if (statement.name) {\n const name = statement.name.escapedText.toString();\n exportModels.push(new Export(name, staticProperties.get(name)));\n }\n }\n return true;\n }\n return false;\n });\n }\n });\n\n const withoutEmpty = exportModels.filter((exportModel) => exportModel !== undefined);\n return withoutEmpty;\n }\n\n parseModule(modulePath: string, content?: string) {\n const ast = ts.createSourceFile(modulePath, content ?? readFileSync(modulePath, 'utf8'), ts.ScriptTarget.Latest);\n\n const moduleExports = this.getExports(ast);\n return moduleExports;\n }\n\n parseStaticProperties(sourceFile: ts.SourceFile) {\n // TODO - should we also parse staticProperties inside classes / objects?\n\n const exportStaticProperties = new Map<string, StaticProperties>();\n\n sourceFile.statements.forEach((statement) => {\n try {\n if (!ts.isExpressionStatement(statement)) return;\n if (!ts.isBinaryExpression(statement.expression)) return;\n if (statement.expression.operatorToken.kind !== ts.SyntaxKind.EqualsToken) return;\n if (!ts.isPropertyAccessExpression(statement.expression.left)) return;\n if (!ts.isIdentifier(statement.expression.left.expression)) return;\n\n const targetName = statement.expression.left.expression.text;\n const propertyName = statement.expression.left.name.text;\n\n if (!exportStaticProperties.has(targetName)) exportStaticProperties.set(targetName, new Map());\n\n const existingProperties = exportStaticProperties.get(targetName);\n\n if (ts.isStringLiteral(statement.expression.right)) {\n existingProperties?.set(propertyName, statement.expression.right.text);\n } else if (ts.isNumericLiteral(statement.expression.right)) {\n existingProperties?.set(propertyName, +statement.expression.right.text);\n } else if (statement.expression.right.kind === ts.SyntaxKind.UndefinedKeyword) {\n existingProperties?.set(propertyName, undefined);\n } else if (statement.expression.right.kind === ts.SyntaxKind.NullKeyword) {\n existingProperties?.set(propertyName, null);\n } else if (statement.expression.right.kind === ts.SyntaxKind.TrueKeyword) {\n existingProperties?.set(propertyName, true);\n } else if (statement.expression.right.kind === ts.SyntaxKind.FalseKeyword) {\n existingProperties?.set(propertyName, false);\n }\n } catch (err) {\n this.logger?.error('failed parsing static properties', err);\n }\n });\n\n return exportStaticProperties;\n }\n\n constructor(private logger?: Logger | undefined) {}\n}\n"],"mappings":";;;;;;AAEA,SAAAA,mBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,kBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,SAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,YAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAE,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AA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EAAE,KAAK,CAAC;QAC9C;MACF,CAAC,CAAC,OAAOW,GAAG,EAAE;QACZ,IAAI,CAACC,MAAM,EAAEC,KAAK,CAAC,kCAAkC,EAAEF,GAAG,CAAC;MAC7D;IACF,CAAC,CAAC;IAEF,OAAOrB,sBAAsB;EAC/B;EAEAwB,WAAWA,CAASF,MAA2B,EAAE;IAAA,KAA7BA,MAA2B,GAA3BA,MAA2B;IAAA5F,eAAA,oBAxH5B,uBAAuB;EAwHQ;AACpD;AAAC+F,OAAA,CAAA7E,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_semanticsEntities","data","require","_fsExtra","_typescript","_interopRequireDefault","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","TypeScriptParser","getExports","sourceFile","staticProperties","parseStaticProperties","exportModels","statements","forEach","statement","ts","isExportAssignment","isExportDeclaration","exportClause","isNamedExports","elements","length","element","name","isIdentifier","escapedText","toString","text","push","Export","get","isNamespaceExport","nameNode","statementModifiers","canHaveModifiers","getModifiers","undefined","some","modifier","kind","SyntaxKind","ExportKeyword","isVariableStatement","declarations","declarationList","child","isFunctionDeclaration","isClassDeclaration","logger","error","withoutEmpty","filter","exportModel","parseModule","modulePath","content","ast","createSourceFile","readFileSync","ScriptTarget","Latest","moduleExports","exportStaticProperties","Map","isExpressionStatement","isBinaryExpression","expression","operatorToken","EqualsToken","isPropertyAccessExpression","left","targetName","propertyName","has","set","existingProperties","isStringLiteral","right","isNumericLiteral","UndefinedKeyword","NullKeyword","TrueKeyword","FalseKeyword","err","constructor","exports"],"sources":["typescript.parser.ts"],"sourcesContent":["import type { Parser } from '@teambit/schema';\nimport type { StaticProperties } from '@teambit/semantics.entities.semantic-schema';\nimport { Export } from '@teambit/semantics.entities.semantic-schema';\nimport type { Logger } from '@teambit/logger';\nimport { readFileSync } from 'fs-extra';\nimport ts from 'typescript';\n\nexport class TypeScriptParser implements Parser {\n public extension = /^.*\\.(js|jsx|ts|tsx)$/;\n\n getExports(sourceFile: ts.SourceFile): Export[] {\n const staticProperties = this.parseStaticProperties(sourceFile);\n const exportModels: Export[] = [];\n\n sourceFile.statements.forEach((statement) => {\n try {\n // export default\n if (ts.isExportAssignment(statement)) {\n // export default\n }\n\n // export declarations or re-exports\n if (ts.isExportDeclaration(statement)) {\n if (statement.exportClause) {\n if (ts.isNamedExports(statement.exportClause)) {\n const elements = statement.exportClause.elements;\n if (!elements || elements.length === 0) return;\n elements.forEach((element) => {\n // Handle both Identifier and StringLiteral export names (TypeScript 5.6+ arbitrary module namespace identifiers)\n const name = ts.isIdentifier(element.name)\n ? element.name.escapedText.toString()\n : (element.name as ts.StringLiteral).text;\n if (name !== 'default') {\n exportModels.push(new Export(name, staticProperties.get(name)));\n }\n });\n }\n if (ts.isNamespaceExport(statement.exportClause)) {\n const nameNode = statement.exportClause.name;\n if (!nameNode) return;\n\n // Handle both Identifier and StringLiteral export names (TypeScript 5.6+ arbitrary module namespace identifiers)\n const name = ts.isIdentifier(nameNode)\n ? nameNode.escapedText.toString()\n : (nameNode as ts.StringLiteral).text;\n exportModels.push(new Export(name, staticProperties.get(name)));\n }\n }\n }\n\n // export modifiers\n // - variable statement\n // - function statement\n // - class statement\n const statementModifiers = ts.canHaveModifiers(statement) ? ts.getModifiers(statement) : undefined;\n if (statementModifiers) {\n statementModifiers.some((modifier) => {\n if (modifier.kind === ts.SyntaxKind.ExportKeyword) {\n if (ts.isVariableStatement(statement)) {\n const declarations = statement.declarationList?.declarations;\n if (!declarations || declarations.length === 0) return true;\n const child = declarations[0];\n if (!child) return true;\n if (ts.isIdentifier(child.name)) {\n const name = child.name.escapedText.toString();\n exportModels.push(new Export(name, staticProperties.get(name)));\n }\n } else if (ts.isFunctionDeclaration(statement)) {\n if (statement.name) {\n const name = statement.name.escapedText.toString();\n exportModels.push(new Export(name, staticProperties.get(name)));\n }\n } else if (ts.isClassDeclaration(statement)) {\n if (statement.name) {\n const name = statement.name.escapedText.toString();\n exportModels.push(new Export(name, staticProperties.get(name)));\n }\n }\n return true;\n }\n return false;\n });\n }\n } catch (e) {\n this.logger?.error('failed parsing statement', e);\n }\n });\n\n const withoutEmpty = exportModels.filter((exportModel) => exportModel !== undefined);\n return withoutEmpty;\n }\n\n parseModule(modulePath: string, content?: string) {\n const ast = ts.createSourceFile(modulePath, content ?? readFileSync(modulePath, 'utf8'), ts.ScriptTarget.Latest);\n\n const moduleExports = this.getExports(ast);\n return moduleExports;\n }\n\n parseStaticProperties(sourceFile: ts.SourceFile) {\n // TODO - should we also parse staticProperties inside classes / objects?\n\n const exportStaticProperties = new Map<string, StaticProperties>();\n\n sourceFile.statements.forEach((statement) => {\n try {\n if (!ts.isExpressionStatement(statement)) return;\n if (!ts.isBinaryExpression(statement.expression)) return;\n if (statement.expression.operatorToken.kind !== ts.SyntaxKind.EqualsToken) return;\n if (!ts.isPropertyAccessExpression(statement.expression.left)) return;\n if (!ts.isIdentifier(statement.expression.left.expression)) return;\n\n const targetName = statement.expression.left.expression.text;\n const propertyName = statement.expression.left.name.text;\n\n if (!exportStaticProperties.has(targetName)) exportStaticProperties.set(targetName, new Map());\n\n const existingProperties = exportStaticProperties.get(targetName);\n\n if (ts.isStringLiteral(statement.expression.right)) {\n existingProperties?.set(propertyName, statement.expression.right.text);\n } else if (ts.isNumericLiteral(statement.expression.right)) {\n existingProperties?.set(propertyName, +statement.expression.right.text);\n } else if (statement.expression.right.kind === ts.SyntaxKind.UndefinedKeyword) {\n existingProperties?.set(propertyName, undefined);\n } else if (statement.expression.right.kind === ts.SyntaxKind.NullKeyword) {\n existingProperties?.set(propertyName, null);\n } else if (statement.expression.right.kind === ts.SyntaxKind.TrueKeyword) {\n existingProperties?.set(propertyName, true);\n } else if (statement.expression.right.kind === ts.SyntaxKind.FalseKeyword) {\n existingProperties?.set(propertyName, false);\n }\n } catch (err) {\n this.logger?.error('failed parsing static properties', err);\n }\n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GAAAA,gBAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/typescript",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.871",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/typescript/typescript",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.typescript",
|
|
8
8
|
"name": "typescript",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.871"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash": "4.17.21",
|
|
@@ -17,28 +17,28 @@
|
|
|
17
17
|
"minimatch": "3.0.5",
|
|
18
18
|
"fs-extra": "10.0.0",
|
|
19
19
|
"chalk": "4.1.2",
|
|
20
|
-
"@teambit/legacy.utils": "0.0.
|
|
20
|
+
"@teambit/legacy.utils": "0.0.33",
|
|
21
21
|
"@teambit/typescript.modules.ts-config-mutator": "0.0.87",
|
|
22
|
-
"@teambit/typescript.typescript-compiler": "2.0.
|
|
23
|
-
"@teambit/component.sources": "0.0.
|
|
24
|
-
"@teambit/semantics.entities.semantic-schema": "0.0.
|
|
25
|
-
"@teambit/ts-server": "0.0.
|
|
22
|
+
"@teambit/typescript.typescript-compiler": "2.0.68",
|
|
23
|
+
"@teambit/component.sources": "0.0.149",
|
|
24
|
+
"@teambit/semantics.entities.semantic-schema": "0.0.99",
|
|
25
|
+
"@teambit/ts-server": "0.0.75",
|
|
26
26
|
"@teambit/harmony": "0.4.7",
|
|
27
|
-
"@teambit/logger": "0.0.
|
|
28
|
-
"@teambit/cli": "0.0.
|
|
29
|
-
"@teambit/legacy.constants": "0.0.
|
|
30
|
-
"@teambit/compiler": "1.0.
|
|
31
|
-
"@teambit/builder": "1.0.
|
|
32
|
-
"@teambit/component": "1.0.
|
|
33
|
-
"@teambit/dependency-resolver": "1.0.
|
|
34
|
-
"@teambit/formatter": "1.0.
|
|
35
|
-
"@teambit/aspect-loader": "1.0.
|
|
36
|
-
"@teambit/envs": "1.0.
|
|
37
|
-
"@teambit/schema": "1.0.
|
|
38
|
-
"@teambit/scope": "1.0.
|
|
39
|
-
"@teambit/workspace": "1.0.
|
|
40
|
-
"@teambit/pkg": "1.0.
|
|
41
|
-
"@teambit/watcher": "1.0.
|
|
27
|
+
"@teambit/logger": "0.0.1391",
|
|
28
|
+
"@teambit/cli": "0.0.1298",
|
|
29
|
+
"@teambit/legacy.constants": "0.0.23",
|
|
30
|
+
"@teambit/compiler": "1.0.871",
|
|
31
|
+
"@teambit/builder": "1.0.871",
|
|
32
|
+
"@teambit/component": "1.0.871",
|
|
33
|
+
"@teambit/dependency-resolver": "1.0.871",
|
|
34
|
+
"@teambit/formatter": "1.0.871",
|
|
35
|
+
"@teambit/aspect-loader": "1.0.871",
|
|
36
|
+
"@teambit/envs": "1.0.871",
|
|
37
|
+
"@teambit/schema": "1.0.871",
|
|
38
|
+
"@teambit/scope": "1.0.871",
|
|
39
|
+
"@teambit/workspace": "1.0.871",
|
|
40
|
+
"@teambit/pkg": "1.0.871",
|
|
41
|
+
"@teambit/watcher": "1.0.871"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/lodash": "4.14.165",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@types/fs-extra": "9.0.7",
|
|
47
47
|
"@types/mocha": "9.1.0",
|
|
48
48
|
"@teambit/typescript.aspect-docs.typescript": "0.0.173",
|
|
49
|
-
"@teambit/harmony.envs.core-aspect-env": "0.1.
|
|
49
|
+
"@teambit/harmony.envs.core-aspect-env": "0.1.4"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"react": "^17.0.0 || ^18.0.0",
|