@teambit/typescript 1.0.662 → 1.0.663
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.663/dist/typescript.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.typescript_typescript@1.0.663/dist/typescript.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
@@ -42,9 +42,11 @@ class ExportAssignmentTransformer {
|
|
|
42
42
|
const absoluteFilePath = exportDec.getSourceFile().fileName;
|
|
43
43
|
const exportNode = await context.getTypeRef(specifier.getText(), absoluteFilePath, location);
|
|
44
44
|
if (exportNode) {
|
|
45
|
-
return new (_semanticsEntities().ExportSchema)(location,
|
|
45
|
+
return new (_semanticsEntities().ExportSchema)(location, `${exportNode.name} (default)`, new (_semanticsEntities().TypeRefSchema)(exportNode.location, exportNode.name, exportNode.componentId, exportNode.packageName, exportNode.internalFilePath), `${exportNode.name} (default)`);
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
const schemaNode = await context.computeSchema(specifier);
|
|
48
|
+
const nodeName = schemaNode.name ? `${schemaNode.name} (default)` : 'default';
|
|
49
|
+
return new (_semanticsEntities().ExportSchema)(location, nodeName, schemaNode, nodeName);
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
52
|
exports.ExportAssignmentTransformer = ExportAssignmentTransformer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_semanticsEntities","data","require","_typescript","_exportIdentifier","ExportAssignmentTransformer","predicate","node","kind","SyntaxKind","ExportAssignment","getIdentifiers","exportDec","ExportIdentifier","getSourceFile","fileName","transform","context","specifier","expression","location","getLocation","absoluteFilePath","exportNode","getTypeRef","getText","ExportSchema","computeSchema","exports"],"sources":["export-assignment.ts"],"sourcesContent":["import { ExportSchema, SchemaNode } from '@teambit/semantics.entities.semantic-schema';\nimport { Node, SyntaxKind, ExportAssignment as ExportAssignmentNode } from 'typescript';\nimport { ExportIdentifier } from '../export-identifier';\nimport { SchemaExtractorContext } from '../schema-extractor-context';\nimport { SchemaTransformer } from '../schema-transformer';\n\n/**\n * This is either an export = or an export default declaration.\n * Unless isExportEquals is set, this node was parsed as an export default\n */\nexport class ExportAssignmentTransformer implements SchemaTransformer {\n predicate(node: Node) {\n return node.kind === SyntaxKind.ExportAssignment;\n }\n\n async getIdentifiers(exportDec: ExportAssignmentNode) {\n return [new ExportIdentifier('default', exportDec.getSourceFile().fileName)];\n }\n\n async transform(exportDec: ExportAssignmentNode, context: SchemaExtractorContext): Promise<SchemaNode> {\n const specifier = exportDec.expression;\n const location = context.getLocation(exportDec);\n const absoluteFilePath = exportDec.getSourceFile().fileName;\n\n const exportNode = await context.getTypeRef(specifier.getText(), absoluteFilePath, location);\n\n if (exportNode) {\n return new ExportSchema(location
|
|
1
|
+
{"version":3,"names":["_semanticsEntities","data","require","_typescript","_exportIdentifier","ExportAssignmentTransformer","predicate","node","kind","SyntaxKind","ExportAssignment","getIdentifiers","exportDec","ExportIdentifier","getSourceFile","fileName","transform","context","specifier","expression","location","getLocation","absoluteFilePath","exportNode","getTypeRef","getText","ExportSchema","name","TypeRefSchema","componentId","packageName","internalFilePath","schemaNode","computeSchema","nodeName","exports"],"sources":["export-assignment.ts"],"sourcesContent":["import { ExportSchema, SchemaNode, TypeRefSchema } from '@teambit/semantics.entities.semantic-schema';\nimport { Node, SyntaxKind, ExportAssignment as ExportAssignmentNode } from 'typescript';\nimport { ExportIdentifier } from '../export-identifier';\nimport { SchemaExtractorContext } from '../schema-extractor-context';\nimport { SchemaTransformer } from '../schema-transformer';\n\n/**\n * This is either an export = or an export default declaration.\n * Unless isExportEquals is set, this node was parsed as an export default\n */\nexport class ExportAssignmentTransformer implements SchemaTransformer {\n predicate(node: Node) {\n return node.kind === SyntaxKind.ExportAssignment;\n }\n\n async getIdentifiers(exportDec: ExportAssignmentNode) {\n return [new ExportIdentifier('default', exportDec.getSourceFile().fileName)];\n }\n\n async transform(exportDec: ExportAssignmentNode, context: SchemaExtractorContext): Promise<SchemaNode> {\n const specifier = exportDec.expression;\n const location = context.getLocation(exportDec);\n const absoluteFilePath = exportDec.getSourceFile().fileName;\n\n const exportNode = await context.getTypeRef(specifier.getText(), absoluteFilePath, location);\n\n if (exportNode) {\n return new ExportSchema(\n location,\n `${exportNode.name} (default)`,\n new TypeRefSchema(\n exportNode.location,\n exportNode.name,\n exportNode.componentId,\n exportNode.packageName,\n exportNode.internalFilePath\n ),\n `${exportNode.name} (default)`\n );\n }\n\n const schemaNode = await context.computeSchema(specifier);\n const nodeName = schemaNode.name ? `${schemaNode.name} (default)` : 'default';\n return new ExportSchema(location, nodeName, schemaNode, nodeName);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,mBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,kBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,kBAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,iBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA;AACA;AACA;AACA;AACO,MAAMI,2BAA2B,CAA8B;EACpEC,SAASA,CAACC,IAAU,EAAE;IAC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+1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/typescript",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.663",
|
|
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.663"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash": "4.17.21",
|
|
@@ -24,20 +24,20 @@
|
|
|
24
24
|
"@teambit/ts-server": "0.0.65",
|
|
25
25
|
"@teambit/harmony": "0.4.7",
|
|
26
26
|
"@teambit/legacy.constants": "0.0.13",
|
|
27
|
-
"@teambit/compiler": "1.0.
|
|
28
|
-
"@teambit/builder": "1.0.
|
|
29
|
-
"@teambit/component": "1.0.
|
|
30
|
-
"@teambit/dependency-resolver": "1.0.
|
|
31
|
-
"@teambit/formatter": "1.0.
|
|
32
|
-
"@teambit/aspect-loader": "1.0.
|
|
33
|
-
"@teambit/envs": "1.0.
|
|
34
|
-
"@teambit/logger": "0.0.
|
|
35
|
-
"@teambit/schema": "1.0.
|
|
36
|
-
"@teambit/scope": "1.0.
|
|
37
|
-
"@teambit/workspace": "1.0.
|
|
38
|
-
"@teambit/cli": "0.0.
|
|
39
|
-
"@teambit/pkg": "1.0.
|
|
40
|
-
"@teambit/watcher": "1.0.
|
|
27
|
+
"@teambit/compiler": "1.0.663",
|
|
28
|
+
"@teambit/builder": "1.0.663",
|
|
29
|
+
"@teambit/component": "1.0.663",
|
|
30
|
+
"@teambit/dependency-resolver": "1.0.663",
|
|
31
|
+
"@teambit/formatter": "1.0.663",
|
|
32
|
+
"@teambit/aspect-loader": "1.0.663",
|
|
33
|
+
"@teambit/envs": "1.0.663",
|
|
34
|
+
"@teambit/logger": "0.0.1333",
|
|
35
|
+
"@teambit/schema": "1.0.663",
|
|
36
|
+
"@teambit/scope": "1.0.663",
|
|
37
|
+
"@teambit/workspace": "1.0.663",
|
|
38
|
+
"@teambit/cli": "0.0.1240",
|
|
39
|
+
"@teambit/pkg": "1.0.663",
|
|
40
|
+
"@teambit/watcher": "1.0.663"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/lodash": "4.14.165",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExportSchema, SchemaNode } from '@teambit/semantics.entities.semantic-schema';
|
|
1
|
+
import { ExportSchema, SchemaNode, TypeRefSchema } from '@teambit/semantics.entities.semantic-schema';
|
|
2
2
|
import { Node, SyntaxKind, ExportAssignment as ExportAssignmentNode } from 'typescript';
|
|
3
3
|
import { ExportIdentifier } from '../export-identifier';
|
|
4
4
|
import { SchemaExtractorContext } from '../schema-extractor-context';
|
|
@@ -25,9 +25,22 @@ export class ExportAssignmentTransformer implements SchemaTransformer {
|
|
|
25
25
|
const exportNode = await context.getTypeRef(specifier.getText(), absoluteFilePath, location);
|
|
26
26
|
|
|
27
27
|
if (exportNode) {
|
|
28
|
-
return new ExportSchema(
|
|
28
|
+
return new ExportSchema(
|
|
29
|
+
location,
|
|
30
|
+
`${exportNode.name} (default)`,
|
|
31
|
+
new TypeRefSchema(
|
|
32
|
+
exportNode.location,
|
|
33
|
+
exportNode.name,
|
|
34
|
+
exportNode.componentId,
|
|
35
|
+
exportNode.packageName,
|
|
36
|
+
exportNode.internalFilePath
|
|
37
|
+
),
|
|
38
|
+
`${exportNode.name} (default)`
|
|
39
|
+
);
|
|
29
40
|
}
|
|
30
41
|
|
|
31
|
-
|
|
42
|
+
const schemaNode = await context.computeSchema(specifier);
|
|
43
|
+
const nodeName = schemaNode.name ? `${schemaNode.name} (default)` : 'default';
|
|
44
|
+
return new ExportSchema(location, nodeName, schemaNode, nodeName);
|
|
32
45
|
}
|
|
33
46
|
}
|