@teambit/typescript 1.0.409 → 1.0.411

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,37 +1,37 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites tests="32" failures="0" errors="0" skipped="0">
3
- <testsuite name="teambit.typescript/typescript@1.0.409" tests="32" failures="0" errors="0" skipped="0">
3
+ <testsuite name="teambit.typescript/typescript@1.0.411" tests="32" failures="0" errors="0" skipped="0">
4
4
  <testcase classname="dist/transform-source-file.spec.js" name="should correctly transform source code with classNamesTransformer" time="0.006"/>
5
5
  <testcase classname="dist/transform-source-file.spec.js" name="should correctly transform source code with functionNamesTransformer" time="0.003"/>
6
6
  <testcase classname="dist/transform-source-file.spec.js" name="should correctly transform source code with importTransformer" time="0.003"/>
7
- <testcase classname="dist/transform-source-file.spec.js" name="should correctly transform source code with interfaceNamesTransformer" time="0.002"/>
7
+ <testcase classname="dist/transform-source-file.spec.js" name="should correctly transform source code with interfaceNamesTransformer" time="0.001"/>
8
8
  <testcase classname="dist/transform-source-file.spec.js" name="should correctly transform source code with typeAliasNamesTransformer" time="0.002"/>
9
9
  <testcase classname="dist/transform-source-file.spec.js" name="should correctly transform source code with variableNamesTransformer" time="0.002"/>
10
10
  <testcase classname="dist/transform-source-file.spec.js" name="should correctly transform source code with classNamesTransformer" time="0.002"/>
11
- <testcase classname="dist/transform-source-file.spec.js" name="should correctly transform source code with classNamesTransformer" time="0.002"/>
11
+ <testcase classname="dist/transform-source-file.spec.js" name="should correctly transform source code with classNamesTransformer" time="0.001"/>
12
12
  <testcase classname="dist/transform-source-file.spec.js" name="should correctly transform source code with expressionStatementTransformer" time="0.002"/>
13
13
  <testcase classname="dist/transform-source-file.spec.js" name="should correctly transform source code with expressionStatementTransformer" time="0.002"/>
14
- <testcase classname="dist/transform-source-file.spec.js" name="should correctly transform source code with interfaceNamesTransformer" time="0.002"/>
14
+ <testcase classname="dist/transform-source-file.spec.js" name="should correctly transform source code with interfaceNamesTransformer" time="0.001"/>
15
15
  <testcase classname="dist/transform-source-file.spec.js" name="should correctly transform source code with importTransformer" time="0.001"/>
16
16
  <testcase classname="dist/transform-source-file.spec.js" name="should correctly transform source code with exportTransformer" time="0.002"/>
17
- <testcase classname="dist/transform-source-file.spec.js" name="should correctly transform source code with exportTransformer" time="0.001"/>
17
+ <testcase classname="dist/transform-source-file.spec.js" name="should correctly transform source code with exportTransformer"/>
18
18
  <testcase classname="dist/transform-source-file.spec.js" name="should correctly transform source code with exportTransformer" time="0.001"/>
19
19
  <testcase classname="dist/transform-source-file.spec.js" name="should return original source code if no transformations are applied" time="0.001"/>
20
- <testcase classname="dist/transform-source-file.spec.js" name="should handle multiple transformers" time="0.001"/>
21
- <testcase classname="dist/typescript.parser.spec.js" name="should parse arrowFunctions" time="0.003"/>
20
+ <testcase classname="dist/transform-source-file.spec.js" name="should handle multiple transformers" time="0.002"/>
21
+ <testcase classname="dist/typescript.parser.spec.js" name="should parse arrowFunctions" time="0.002"/>
22
22
  <testcase classname="dist/typescript.parser.spec.js" name="should parse function exports"/>
23
23
  <testcase classname="dist/typescript.parser.spec.js" name="should parse classes"/>
24
24
  <testcase classname="dist/typescript.parser.spec.js" name="should parse declarations"/>
25
25
  <testcase classname="dist/typescript.parser.spec.js" name="should parse renamed declarations"/>
26
- <testcase classname="dist/typescript.parser.spec.js" name="should parse re-exports"/>
27
- <testcase classname="dist/typescript.parser.spec.js" name="should parse re-exports with default" time="0.001"/>
26
+ <testcase classname="dist/typescript.parser.spec.js" name="should parse re-exports" time="0.001"/>
27
+ <testcase classname="dist/typescript.parser.spec.js" name="should parse re-exports with default"/>
28
28
  <testcase classname="dist/typescript.parser.spec.js" name="should parse renamed re-exports all"/>
29
- <testcase classname="dist/typescript.parser.spec.js" name="should parse default exports" time="0.001"/>
30
- <testcase classname="dist/typescript.parser.spec.js" name="should include staticProperties, when on arrowFunctions"/>
29
+ <testcase classname="dist/typescript.parser.spec.js" name="should parse default exports"/>
30
+ <testcase classname="dist/typescript.parser.spec.js" name="should include staticProperties, when on arrowFunctions" time="0.001"/>
31
31
  <testcase classname="dist/typescript.parser.spec.js" name="should include staticProperties, when on regular functions"/>
32
32
  <testcase classname="dist/typescript.parser.spec.js" name="should include staticProperties, when on classes"/>
33
- <testcase classname="dist/typescript.parser.spec.js" name="should parse all primitive values" time="0.001"/>
34
- <testcase classname="dist/typescript.parser.spec.js" name="should skip non primitive values" time="0.001"/>
33
+ <testcase classname="dist/typescript.parser.spec.js" name="should parse all primitive values" time="0.002"/>
34
+ <testcase classname="dist/typescript.parser.spec.js" name="should skip non primitive values"/>
35
35
  <testcase classname="dist/typescript.parser.spec.js" name="should skip non assignment statements" time="0.001"/>
36
36
  </testsuite>
37
37
  </testsuites>
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.typescript/typescript-preview"]=t():e["teambit.typescript/typescript-preview"]=t()}(self,(()=>(()=>{"use strict";var e={60419:(e,t,n)=>{Object.defineProperty(t,"S",{enumerable:!0,get:function(){return o.default}});var o=r(n(16109));function r(e){return e&&e.__esModule?e:{default:e}}r.__bit_component={id:"teambit.typescript/aspect-docs/typescript@0.0.168",homepage:"https://bit.cloud/teambit/typescript/aspect-docs/typescript",exported:!0}},16109:(e,t,n)=>{var o={id:"teambit.typescript/aspect-docs/typescript@0.0.168",homepage:"https://bit.cloud/teambit/typescript/aspect-docs/typescript",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=m,p(n(41594));var r=n(5016),i=["components"];function p(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s.apply(null,arguments)}function a(e,t){if(null==e)return{};var n,o,r=c(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function c(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.includes(o))continue;n[o]=e[o]}return n}p.__bit_component=o,s.__bit_component=o,a.__bit_component=o,c.__bit_component=o;var l={},d="wrapper";function m(e){var t=e.components,n=a(e,i);return(0,r.mdx)(d,s({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("p",null,"Typescript aspect implements the ",(0,r.mdx)("inlineCode",{parentName:"p"},"Compiler")," interface and provides the ability to transpile files on the workspace and build components in the isolated capsules."),(0,r.mdx)("h2",null,"Configuration - tsconfig.json"),(0,r.mdx)("p",null,"An env that uses typescript compiler can have two tsconfig.json files, one for the workspace and one for the build process."),(0,r.mdx)("p",null,"On the workspace, the following two configurations are overridden:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"compilerOptions.sourceRoot = <componentDir>;\ncompilerOptions.rootDir = '.';\n")),(0,r.mdx)("p",null,"The reason to override them is to make the source-map working on the workspace."),(0,r.mdx)("p",null,"As a reminder, the ",(0,r.mdx)("inlineCode",{parentName:"p"},"dists")," are written into the node_modules and not in the component-dir, without the configuration above, the source-map won't have the correct ",(0,r.mdx)("inlineCode",{parentName:"p"},"sourceRoot")," and ",(0,r.mdx)("inlineCode",{parentName:"p"},"sources")," values, and as a result, the debugger won't work."),(0,r.mdx)("p",null,"On the capsules, the following configurion is overridden:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"compilerOptions.outDir = <CompilerOptions.distDir>\n")),(0,r.mdx)("p",null,"This is done to avoid confusion when the distDir is ",(0,r.mdx)("inlineCode",{parentName:"p"},"x")," and ts-config outDir is ",(0,r.mdx)("inlineCode",{parentName:"p"},"y"),",\nin which case, the dists in the capsule are written into ",(0,r.mdx)("inlineCode",{parentName:"p"},"y"),", but other bit processes expect to find them in ",(0,r.mdx)("inlineCode",{parentName:"p"},"x"),"."),(0,r.mdx)("h1",null,"Override typescript configuration in a custom env:"),(0,r.mdx)("p",null,"When creating a new custom environment, use the following API to change the typescript compiler config."),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"useTypescript(modifiers?: UseTypescriptModifiers, tsModule: any = ts)\n")),(0,r.mdx)("p",null,"The modifiers are:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"type UseTypescriptModifiers = {\n buildConfig?: TsConfigTransformer[];\n devConfig?: TsConfigTransformer[];\n};\n")),(0,r.mdx)("p",null,"As you can see, you can customize the configuration for both: the build process and for the compilation on the workspace."),(0,r.mdx)("p",null,"An example of a TsConfigTransformer used by ",(0,r.mdx)("inlineCode",{parentName:"p"},"teambit/aspect")," for the build process, which uses the typescript compiler only for generating the types:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"const tsconfig = require(\"./tsconfig.json\");\n\nconst transformer: TsConfigTransformer = (config: TypescriptConfigMutator) => {\n config\n .mergeTsConfig(tsconfig)\n .setArtifactName('declaration')\n .setDistGlobPatterns([`dist/**/*.d.ts`])\n .setShouldCopyNonSupportedFiles(false);\n return config;\n };\n")),(0,r.mdx)("p",null,"In the last example, a custom tsconfig.json was merged to the builtin tsconfig.json."),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},'{\n "compilerOptions": {\n ...\n "emitDeclarationOnly": true,\n ...\n },\n}\n')),(0,r.mdx)("p",null,"Some more props were changed as well to accomodate this env"))}m.__bit_component=o,m.isMDXComponent=!0},24328:(e,t,n)=>{var o={id:"teambit.typescript/typescript@1.0.409",homepage:"https://bit.cloud/teambit/typescript/typescript",exported:!0};function r(){const e=i(n(41594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=o,i.__bit_component=o;const p=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/brands/logo-typescript.svg"}));p.__bit_component=o,t.Logo=p},5016:e=>{e.exports=MdxJsReact},41594:e=>{e.exports=React}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};n.r(o),n.d(o,{compositions:()=>f,compositions_metadata:()=>h,overview:()=>y});var r={};n.r(r),n.d(r,{default:()=>u});var i=n(24328),p=(n(41594),n(5016));const s=TeambitMdxUiMdxScopeContext;var a=n(60419),c=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},l.apply(null,arguments)}var d={},m="wrapper";function u(e){var t=e.components,n=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.includes(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,c);return(0,p.mdx)(m,l({},d,n,{components:t,mdxType:"MDXLayout"}),(0,p.mdx)(s.MDXScopeProvider,{components:{Typescript:a.S},mdxType:"MDXScopeProvider"},(0,p.mdx)(a.S,{mdxType:"Typescript"})))}u.isMDXComponent=!0;const f=[i],y=[r],h={compositions:[{displayName:"Logo",identifier:"Logo"}]};return o})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.typescript/typescript-preview"]=t():e["teambit.typescript/typescript-preview"]=t()}(self,(()=>(()=>{"use strict";var e={60419:(e,t,n)=>{Object.defineProperty(t,"S",{enumerable:!0,get:function(){return o.default}});var o=r(n(16109));function r(e){return e&&e.__esModule?e:{default:e}}r.__bit_component={id:"teambit.typescript/aspect-docs/typescript@0.0.168",homepage:"https://bit.cloud/teambit/typescript/aspect-docs/typescript",exported:!0}},16109:(e,t,n)=>{var o={id:"teambit.typescript/aspect-docs/typescript@0.0.168",homepage:"https://bit.cloud/teambit/typescript/aspect-docs/typescript",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=m,p(n(41594));var r=n(5016),i=["components"];function p(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s.apply(null,arguments)}function a(e,t){if(null==e)return{};var n,o,r=c(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function c(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.includes(o))continue;n[o]=e[o]}return n}p.__bit_component=o,s.__bit_component=o,a.__bit_component=o,c.__bit_component=o;var l={},d="wrapper";function m(e){var t=e.components,n=a(e,i);return(0,r.mdx)(d,s({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("p",null,"Typescript aspect implements the ",(0,r.mdx)("inlineCode",{parentName:"p"},"Compiler")," interface and provides the ability to transpile files on the workspace and build components in the isolated capsules."),(0,r.mdx)("h2",null,"Configuration - tsconfig.json"),(0,r.mdx)("p",null,"An env that uses typescript compiler can have two tsconfig.json files, one for the workspace and one for the build process."),(0,r.mdx)("p",null,"On the workspace, the following two configurations are overridden:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"compilerOptions.sourceRoot = <componentDir>;\ncompilerOptions.rootDir = '.';\n")),(0,r.mdx)("p",null,"The reason to override them is to make the source-map working on the workspace."),(0,r.mdx)("p",null,"As a reminder, the ",(0,r.mdx)("inlineCode",{parentName:"p"},"dists")," are written into the node_modules and not in the component-dir, without the configuration above, the source-map won't have the correct ",(0,r.mdx)("inlineCode",{parentName:"p"},"sourceRoot")," and ",(0,r.mdx)("inlineCode",{parentName:"p"},"sources")," values, and as a result, the debugger won't work."),(0,r.mdx)("p",null,"On the capsules, the following configurion is overridden:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"compilerOptions.outDir = <CompilerOptions.distDir>\n")),(0,r.mdx)("p",null,"This is done to avoid confusion when the distDir is ",(0,r.mdx)("inlineCode",{parentName:"p"},"x")," and ts-config outDir is ",(0,r.mdx)("inlineCode",{parentName:"p"},"y"),",\nin which case, the dists in the capsule are written into ",(0,r.mdx)("inlineCode",{parentName:"p"},"y"),", but other bit processes expect to find them in ",(0,r.mdx)("inlineCode",{parentName:"p"},"x"),"."),(0,r.mdx)("h1",null,"Override typescript configuration in a custom env:"),(0,r.mdx)("p",null,"When creating a new custom environment, use the following API to change the typescript compiler config."),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"useTypescript(modifiers?: UseTypescriptModifiers, tsModule: any = ts)\n")),(0,r.mdx)("p",null,"The modifiers are:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"type UseTypescriptModifiers = {\n buildConfig?: TsConfigTransformer[];\n devConfig?: TsConfigTransformer[];\n};\n")),(0,r.mdx)("p",null,"As you can see, you can customize the configuration for both: the build process and for the compilation on the workspace."),(0,r.mdx)("p",null,"An example of a TsConfigTransformer used by ",(0,r.mdx)("inlineCode",{parentName:"p"},"teambit/aspect")," for the build process, which uses the typescript compiler only for generating the types:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"const tsconfig = require(\"./tsconfig.json\");\n\nconst transformer: TsConfigTransformer = (config: TypescriptConfigMutator) => {\n config\n .mergeTsConfig(tsconfig)\n .setArtifactName('declaration')\n .setDistGlobPatterns([`dist/**/*.d.ts`])\n .setShouldCopyNonSupportedFiles(false);\n return config;\n };\n")),(0,r.mdx)("p",null,"In the last example, a custom tsconfig.json was merged to the builtin tsconfig.json."),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},'{\n "compilerOptions": {\n ...\n "emitDeclarationOnly": true,\n ...\n },\n}\n')),(0,r.mdx)("p",null,"Some more props were changed as well to accomodate this env"))}m.__bit_component=o,m.isMDXComponent=!0},11669:(e,t,n)=>{var o={id:"teambit.typescript/typescript@1.0.411",homepage:"https://bit.cloud/teambit/typescript/typescript",exported:!0};function r(){const e=i(n(41594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=o,i.__bit_component=o;const p=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/brands/logo-typescript.svg"}));p.__bit_component=o,t.Logo=p},5016:e=>{e.exports=MdxJsReact},41594:e=>{e.exports=React}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};n.r(o),n.d(o,{compositions:()=>f,compositions_metadata:()=>h,overview:()=>y});var r={};n.r(r),n.d(r,{default:()=>u});var i=n(11669),p=(n(41594),n(5016));const s=TeambitMdxUiMdxScopeContext;var a=n(60419),c=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},l.apply(null,arguments)}var d={},m="wrapper";function u(e){var t=e.components,n=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.includes(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,c);return(0,p.mdx)(m,l({},d,n,{components:t,mdxType:"MDXLayout"}),(0,p.mdx)(s.MDXScopeProvider,{components:{Typescript:a.S},mdxType:"MDXScopeProvider"},(0,p.mdx)(a.S,{mdxType:"Typescript"})))}u.isMDXComponent=!0;const f=[i],y=[r],h={compositions:[{displayName:"Logo",identifier:"Logo"}]};return o})()));
@@ -20,20 +20,16 @@
20
20
  "line": 1,
21
21
  "character": 10
22
22
  },
23
+ "signature": "export { TypescriptConfigMutator };\n\nTypescriptConfigMutator",
23
24
  "name": "TypescriptConfigMutator",
24
25
  "exportNode": {
25
- "__schema": "TypeRefSchema",
26
+ "__schema": "UnresolvedSchema",
26
27
  "location": {
27
28
  "filePath": "index.ts",
28
29
  "line": 1,
29
30
  "character": 10
30
31
  },
31
- "name": "TypescriptConfigMutator",
32
- "componentId": {
33
- "scope": "teambit.typescript",
34
- "name": "modules/ts-config-mutator",
35
- "version": "0.0.83"
36
- }
32
+ "name": "TypescriptConfigMutator"
37
33
  }
38
34
  },
39
35
  {
@@ -43,6 +39,7 @@
43
39
  "line": 2,
44
40
  "character": 10
45
41
  },
42
+ "signature": "class TypeScriptExtractor",
46
43
  "name": "TypeScriptExtractor",
47
44
  "exportNode": {
48
45
  "__schema": "ClassSchema",
@@ -995,7 +992,7 @@
995
992
  "_legacy": {
996
993
  "scope": "teambit.typescript",
997
994
  "name": "typescript",
998
- "version": "1.0.409"
995
+ "version": "1.0.411"
999
996
  },
1000
997
  "_scope": "teambit.typescript"
1001
998
  }
@@ -1011,20 +1008,16 @@
1011
1008
  "line": 3,
1012
1009
  "character": 10
1013
1010
  },
1011
+ "signature": "export { TypescriptCompiler };\n\nTypescriptCompiler",
1014
1012
  "name": "TypescriptCompiler",
1015
1013
  "exportNode": {
1016
- "__schema": "TypeRefSchema",
1014
+ "__schema": "UnresolvedSchema",
1017
1015
  "location": {
1018
1016
  "filePath": "index.ts",
1019
1017
  "line": 3,
1020
1018
  "character": 10
1021
1019
  },
1022
- "name": "TypescriptCompiler",
1023
- "componentId": {
1024
- "scope": "teambit.typescript",
1025
- "name": "typescript-compiler",
1026
- "version": "2.0.44"
1027
- }
1020
+ "name": "TypescriptCompiler"
1028
1021
  }
1029
1022
  },
1030
1023
  {
@@ -1034,6 +1027,7 @@
1034
1027
  "line": 5,
1035
1028
  "character": 3
1036
1029
  },
1030
+ "signature": "class TypescriptMain",
1037
1031
  "name": "TypescriptMain",
1038
1032
  "exportNode": {
1039
1033
  "__schema": "ClassSchema",
@@ -2729,6 +2723,7 @@
2729
2723
  "line": 6,
2730
2724
  "character": 3
2731
2725
  },
2726
+ "signature": "type TsConfigTransformer = (config: TypescriptConfigMutator, context: TsConfigTransformContext) => TypescriptConfigMutator",
2732
2727
  "name": "TsConfigTransformer",
2733
2728
  "exportNode": {
2734
2729
  "__schema": "TypeSchema",
@@ -2810,6 +2805,7 @@
2810
2805
  "line": 7,
2811
2806
  "character": 3
2812
2807
  },
2808
+ "signature": "type SchemaTransformerSlot = SlotRegistry<SchemaTransformer[]>",
2813
2809
  "name": "SchemaTransformerSlot",
2814
2810
  "exportNode": {
2815
2811
  "__schema": "TypeSchema",
@@ -2857,6 +2853,7 @@
2857
2853
  "line": 8,
2858
2854
  "character": 3
2859
2855
  },
2856
+ "signature": "type APITransformerSlot = SlotRegistry<SchemaNodeTransformer[]>",
2860
2857
  "name": "APITransformerSlot",
2861
2858
  "exportNode": {
2862
2859
  "__schema": "TypeSchema",
@@ -2904,6 +2901,7 @@
2904
2901
  "line": 10,
2905
2902
  "character": 15
2906
2903
  },
2904
+ "signature": "type TypeScriptCompilerOptions = {\n tsconfig: Record<string, any>;\n types: string[];\n compileJs?: boolean | undefined;\n compileJsx?: boolean | undefined;\n} & Partial<CompilerOptions>",
2907
2905
  "name": "TypeScriptCompilerOptions",
2908
2906
  "exportNode": {
2909
2907
  "__schema": "TypeSchema",
@@ -3115,6 +3113,7 @@
3115
3113
  "line": 10,
3116
3114
  "character": 42
3117
3115
  },
3116
+ "signature": "type TsCompilerOptionsWithoutTsConfig = {\n name?: string | undefined;\n distDir?: string | undefined;\n distGlobPatterns?: string[] | undefined;\n shouldCopyNonSupportedFiles?: boolean | undefined;\n artifactName?: string | undefined;\n types: string[];\n compileJs?: boolean | undefined;\n compileJsx?: boolean | undefined;\n}",
3118
3117
  "name": "TsCompilerOptionsWithoutTsConfig",
3119
3118
  "exportNode": {
3120
3119
  "__schema": "TypeSchema",
@@ -3163,6 +3162,7 @@
3163
3162
  "line": 11,
3164
3163
  "character": 10
3165
3164
  },
3165
+ "signature": "const TypescriptAspect: Aspect",
3166
3166
  "name": "TypescriptAspect",
3167
3167
  "exportNode": {
3168
3168
  "__schema": "VariableLikeSchema",
@@ -3281,6 +3281,7 @@
3281
3281
  "line": 5,
3282
3282
  "character": 10
3283
3283
  },
3284
+ "signature": "function classNamesTransformer(nameMapping: Record<string, string>): ts.TransformerFactory<ts.SourceFile>",
3284
3285
  "name": "classNamesTransformer",
3285
3286
  "exportNode": {
3286
3287
  "__schema": "FunctionLikeSchema",
@@ -3365,6 +3366,7 @@
3365
3366
  "line": 6,
3366
3367
  "character": 10
3367
3368
  },
3369
+ "signature": "function interfaceNamesTransformer(nameMapping: Record<string, string>): ts.TransformerFactory<ts.SourceFile>",
3368
3370
  "name": "interfaceNamesTransformer",
3369
3371
  "exportNode": {
3370
3372
  "__schema": "FunctionLikeSchema",
@@ -3449,6 +3451,7 @@
3449
3451
  "line": 7,
3450
3452
  "character": 10
3451
3453
  },
3454
+ "signature": "function variableNamesTransformer(nameMapping: Record<string, string>): ts.TransformerFactory<ts.SourceFile>",
3452
3455
  "name": "variableNamesTransformer",
3453
3456
  "exportNode": {
3454
3457
  "__schema": "FunctionLikeSchema",
@@ -3533,6 +3536,7 @@
3533
3536
  "line": 8,
3534
3537
  "character": 10
3535
3538
  },
3539
+ "signature": "function(mapping: Record<string, string>): (context: ts.TransformationContext) => (node: ts.SourceFile) => ts.SourceFile",
3536
3540
  "name": "functionNamesTransformer",
3537
3541
  "exportNode": {
3538
3542
  "__schema": "FunctionLikeSchema",
@@ -3584,6 +3588,7 @@
3584
3588
  "line": 9,
3585
3589
  "character": 10
3586
3590
  },
3591
+ "signature": "function typeAliasNamesTransformer(nameMapping: Record<string, string>): ts.TransformerFactory<ts.SourceFile>",
3587
3592
  "name": "typeAliasNamesTransformer",
3588
3593
  "exportNode": {
3589
3594
  "__schema": "FunctionLikeSchema",
@@ -3668,6 +3673,7 @@
3668
3673
  "line": 10,
3669
3674
  "character": 10
3670
3675
  },
3676
+ "signature": "function(mapping: Record<string, string>): (context: ts.TransformationContext) => (node: ts.SourceFile) => ts.SourceFile",
3671
3677
  "name": "importTransformer",
3672
3678
  "exportNode": {
3673
3679
  "__schema": "FunctionLikeSchema",
@@ -3719,6 +3725,7 @@
3719
3725
  "line": 11,
3720
3726
  "character": 10
3721
3727
  },
3728
+ "signature": "function(mapping: Record<string, string>): (context: ts.TransformationContext) => (node: ts.SourceFile) => ts.SourceFile",
3722
3729
  "name": "expressionStatementTransformer",
3723
3730
  "exportNode": {
3724
3731
  "__schema": "FunctionLikeSchema",
@@ -3770,6 +3777,7 @@
3770
3777
  "line": 12,
3771
3778
  "character": 10
3772
3779
  },
3780
+ "signature": "function(mapping: Record<string, string>): (context: ts.TransformationContext) => (node: ts.SourceFile) => ts.SourceFile",
3773
3781
  "name": "exportTransformer",
3774
3782
  "exportNode": {
3775
3783
  "__schema": "FunctionLikeSchema",
@@ -3821,6 +3829,7 @@
3821
3829
  "line": 13,
3822
3830
  "character": 10
3823
3831
  },
3832
+ "signature": "function transformSourceFile(sourceFilePath: string, sourceFileContent: string, transformers: ts.TransformerFactory<ts.SourceFile>[], formatter?: Formatter, updates?: Record<string, string>): Promise<string>",
3824
3833
  "name": "transformSourceFile",
3825
3834
  "exportNode": {
3826
3835
  "__schema": "FunctionLikeSchema",
@@ -4071,6 +4080,7 @@
4071
4080
  "line": 14,
4072
4081
  "character": 10
4073
4082
  },
4083
+ "signature": "function typeReferenceTransformer(mapping: Record<string, string>): ts.TransformerFactory<ts.SourceFile>",
4074
4084
  "name": "typeReferenceTransformer",
4075
4085
  "exportNode": {
4076
4086
  "__schema": "FunctionLikeSchema",
@@ -4155,6 +4165,7 @@
4155
4165
  "line": 13,
4156
4166
  "character": 15
4157
4167
  },
4168
+ "signature": "type SchemaNodeTransformer = {\n predicate(node: SchemaNode): boolean;\n transform(node: SchemaNode, context: SchemaExtractorContext): Promise<SchemaNode | null>;\n}",
4158
4169
  "name": "SchemaNodeTransformer",
4159
4170
  "exportNode": {
4160
4171
  "__schema": "TypeSchema",
@@ -4318,6 +4329,7 @@
4318
4329
  "line": 13,
4319
4330
  "character": 38
4320
4331
  },
4332
+ "signature": "type SchemaTransformer = {\n predicate(node: Node): boolean;\n getIdentifiers(node: Node, context: SchemaExtractorContext): Promise<Identifier[]>;\n transform(node: Node, context: SchemaExtractorContext): Promise<SchemaNode>;\n}",
4321
4333
  "name": "SchemaTransformer",
4322
4334
  "exportNode": {
4323
4335
  "__schema": "TypeSchema",
@@ -4565,6 +4577,7 @@
4565
4577
  "line": 14,
4566
4578
  "character": 10
4567
4579
  },
4580
+ "signature": "class SchemaExtractorContext",
4568
4581
  "name": "SchemaExtractorContext",
4569
4582
  "exportNode": {
4570
4583
  "__schema": "ClassSchema",
@@ -5442,7 +5455,7 @@
5442
5455
  "componentId": {
5443
5456
  "scope": "teambit.semantics",
5444
5457
  "name": "entities/semantic-schema",
5445
- "version": "0.0.70"
5458
+ "version": "0.0.71"
5446
5459
  }
5447
5460
  },
5448
5461
  "modifiers": []
@@ -8284,7 +8297,7 @@
8284
8297
  "_legacy": {
8285
8298
  "scope": "teambit.typescript",
8286
8299
  "name": "typescript",
8287
- "version": "1.0.409"
8300
+ "version": "1.0.411"
8288
8301
  },
8289
8302
  "_scope": "teambit.typescript"
8290
8303
  }
@@ -12476,7 +12489,7 @@
12476
12489
  "componentId": {
12477
12490
  "scope": "teambit.semantics",
12478
12491
  "name": "entities/semantic-schema",
12479
- "version": "0.0.70"
12492
+ "version": "0.0.71"
12480
12493
  }
12481
12494
  },
12482
12495
  "modifiers": []
@@ -14361,7 +14374,7 @@
14361
14374
  "componentId": {
14362
14375
  "scope": "teambit.typescript",
14363
14376
  "name": "typescript",
14364
- "version": "1.0.409"
14377
+ "version": "1.0.411"
14365
14378
  },
14366
14379
  "taggedModuleExports": []
14367
14380
  }
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.typescript_typescript@1.0.409/dist/typescript.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.typescript_typescript@1.0.409/dist/typescript.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.typescript_typescript@1.0.411/dist/typescript.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.typescript_typescript@1.0.411/dist/typescript.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/typescript",
3
- "version": "1.0.409",
3
+ "version": "1.0.411",
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.409"
9
+ "version": "1.0.411"
10
10
  },
11
11
  "dependencies": {
12
12
  "lodash": "4.17.21",
@@ -18,25 +18,25 @@
18
18
  "chalk": "2.4.2",
19
19
  "@teambit/typescript.typescript-compiler": "2.0.44",
20
20
  "@teambit/harmony": "0.4.6",
21
- "@teambit/compiler": "1.0.409",
21
+ "@teambit/compiler": "1.0.411",
22
22
  "@teambit/typescript.modules.ts-config-mutator": "0.0.83",
23
- "@teambit/builder": "1.0.409",
24
- "@teambit/component.sources": "0.0.29",
25
- "@teambit/component": "1.0.409",
26
- "@teambit/dependency-resolver": "1.0.409",
27
- "@teambit/formatter": "1.0.409",
23
+ "@teambit/builder": "1.0.411",
24
+ "@teambit/component.sources": "0.0.30",
25
+ "@teambit/component": "1.0.411",
26
+ "@teambit/dependency-resolver": "1.0.411",
27
+ "@teambit/formatter": "1.0.411",
28
28
  "@teambit/legacy.utils": "0.0.5",
29
- "@teambit/semantics.entities.semantic-schema": "0.0.70",
29
+ "@teambit/semantics.entities.semantic-schema": "0.0.71",
30
30
  "@teambit/ts-server": "0.0.56",
31
- "@teambit/aspect-loader": "1.0.409",
32
- "@teambit/envs": "1.0.409",
33
- "@teambit/logger": "0.0.1079",
34
- "@teambit/schema": "1.0.409",
35
- "@teambit/scope": "1.0.409",
36
- "@teambit/workspace": "1.0.409",
37
- "@teambit/cli": "0.0.986",
38
- "@teambit/pkg": "1.0.409",
39
- "@teambit/watcher": "1.0.409"
31
+ "@teambit/aspect-loader": "1.0.411",
32
+ "@teambit/envs": "1.0.411",
33
+ "@teambit/logger": "0.0.1081",
34
+ "@teambit/schema": "1.0.411",
35
+ "@teambit/scope": "1.0.411",
36
+ "@teambit/workspace": "1.0.411",
37
+ "@teambit/cli": "0.0.988",
38
+ "@teambit/pkg": "1.0.411",
39
+ "@teambit/watcher": "1.0.411"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/lodash": "4.14.165",