@teambit/typescript 1.0.1280 → 1.0.1282

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.1280/dist/typescript.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.typescript_typescript@1.0.1280/dist/typescript.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.typescript_typescript@1.0.1282/dist/typescript.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.typescript_typescript@1.0.1282/dist/typescript.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -4,6 +4,7 @@ export declare class RemoveTypesTask implements BuildTask {
4
4
  readonly name = "RemoveTypesProp";
5
5
  readonly description = "remove the types prop from package.json";
6
6
  execute(context: BuildContext): Promise<BuiltTaskResult>;
7
+ requiresCapsuleInstallation(): boolean;
7
8
  /**
8
9
  * the types['index.ts'] is needed only during the build to avoid errors when tsc finds the
9
10
  * same type once in the d.ts and once in the ts file.
@@ -34,6 +34,9 @@ class RemoveTypesTask {
34
34
  };
35
35
  return result;
36
36
  }
37
+ requiresCapsuleInstallation() {
38
+ return false;
39
+ }
37
40
 
38
41
  /**
39
42
  * the types['index.ts'] is needed only during the build to avoid errors when tsc finds the
@@ -1 +1 @@
1
- {"version":3,"names":["_component","data","require","_typescript","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","RemoveTypesTask","constructor","TypescriptAspect","id","execute","context","removeTypesFromPkgJson","result","componentsResults","env","getPackageJsonProps","propsFromEnv","types","Promise","all","capsuleNetwork","seedersCapsules","map","capsule","packageJson","PackageJsonFile","loadFromCapsuleSync","path","packageJsonObject","main","write","exports"],"sources":["remove-types-task.ts"],"sourcesContent":["import { PackageJsonFile } from '@teambit/component.sources';\nimport type { BuildContext, BuildTask, BuiltTaskResult } from '@teambit/builder';\nimport { TypescriptAspect } from './typescript.aspect';\n\nexport class RemoveTypesTask implements BuildTask {\n readonly aspectId = TypescriptAspect.id;\n readonly name = 'RemoveTypesProp';\n readonly description = 'remove the types prop from package.json';\n async execute(context: BuildContext): Promise<BuiltTaskResult> {\n await this.removeTypesFromPkgJson(context);\n\n const result = {\n componentsResults: [],\n };\n\n return result;\n }\n\n /**\n * the types['index.ts'] is needed only during the build to avoid errors when tsc finds the\n * same type once in the d.ts and once in the ts file.\n */\n private async removeTypesFromPkgJson(context: BuildContext) {\n if (context.env?.getPackageJsonProps && typeof context.env.getPackageJsonProps === 'function') {\n const propsFromEnv = context.env.getPackageJsonProps();\n // in case the env has its own \"types\" prop and it's not the \"types\" automatically added to the source in order\n // to to avoid build error, then keep it.\n if (propsFromEnv.types !== '{main}.ts') {\n return;\n }\n }\n await Promise.all(\n context.capsuleNetwork.seedersCapsules.map(async (capsule) => {\n const packageJson = PackageJsonFile.loadFromCapsuleSync(capsule.path);\n // the reason for `packageJson.packageJsonObject.main` is that .d.ts components don't have a main file and they\n // do need the types prop\n if (packageJson.packageJsonObject.types && packageJson.packageJsonObject.main) {\n delete packageJson.packageJsonObject.types;\n await packageJson.write();\n }\n })\n );\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAuD,SAAAG,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,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IAAIC,YAAY,CAACC,KAAK,KAAK,WAAW,EAAE;QACtC;MACF;IACF;IACA,MAAMC,OAAO,CAACC,GAAG,CACfT,OAAO,CAACU,cAAc,CAACC,eAAe,CAACC,GAAG,CAAC,MAAOC,OAAO,IAAK;MAC5D,MAAMC,WAAW,GAAGC,4BAAe,CAACC,mBAAmB,CAACH,OAAO,CAACI,IAAI,CAAC;MACrE;MACA;MACA,IAAIH,WAAW,CAACI,iBAAiB,CAACX,KAAK,IAAIO,WAAW,CAACI,iBAAiB,CAACC,IAAI,EAAE;QAC7E,OAAOL,WAAW,CAACI,iBAAiB,CAACX,KAAK;QAC1C,MAAMO,WAAW,CAACM,KAAK,CAAC,CAAC;MAC3B;IACF,CAAC,CACH,CAAC;EACH;AACF;AAACC,OAAA,CAAA1B,eAAA,GAAAA,eAAA","ignoreList":[]}
1
+ {"version":3,"names":["_component","data","require","_typescript","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","RemoveTypesTask","constructor","TypescriptAspect","id","execute","context","removeTypesFromPkgJson","result","componentsResults","requiresCapsuleInstallation","env","getPackageJsonProps","propsFromEnv","types","Promise","all","capsuleNetwork","seedersCapsules","map","capsule","packageJson","PackageJsonFile","loadFromCapsuleSync","path","packageJsonObject","main","write","exports"],"sources":["remove-types-task.ts"],"sourcesContent":["import { PackageJsonFile } from '@teambit/component.sources';\nimport type { BuildContext, BuildTask, BuiltTaskResult } from '@teambit/builder';\nimport { TypescriptAspect } from './typescript.aspect';\n\nexport class RemoveTypesTask implements BuildTask {\n readonly aspectId = TypescriptAspect.id;\n readonly name = 'RemoveTypesProp';\n readonly description = 'remove the types prop from package.json';\n async execute(context: BuildContext): Promise<BuiltTaskResult> {\n await this.removeTypesFromPkgJson(context);\n\n const result = {\n componentsResults: [],\n };\n\n return result;\n }\n\n requiresCapsuleInstallation(): boolean {\n return false;\n }\n\n /**\n * the types['index.ts'] is needed only during the build to avoid errors when tsc finds the\n * same type once in the d.ts and once in the ts file.\n */\n private async removeTypesFromPkgJson(context: BuildContext) {\n if (context.env?.getPackageJsonProps && typeof context.env.getPackageJsonProps === 'function') {\n const propsFromEnv = context.env.getPackageJsonProps();\n // in case the env has its own \"types\" prop and it's not the \"types\" automatically added to the source in order\n // to to avoid build error, then keep it.\n if (propsFromEnv.types !== '{main}.ts') {\n return;\n }\n }\n await Promise.all(\n context.capsuleNetwork.seedersCapsules.map(async (capsule) => {\n const packageJson = PackageJsonFile.loadFromCapsuleSync(capsule.path);\n // the reason for `packageJson.packageJsonObject.main` is that .d.ts components don't have a main file and they\n // do need the types prop\n if (packageJson.packageJsonObject.types && packageJson.packageJsonObject.main) {\n delete packageJson.packageJsonObject.types;\n await packageJson.write();\n }\n })\n );\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAuD,SAAAG,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAD,CAAA,GAAAI,MAAA,CAAAC,cAAA,CAAAL,CAAA,EAAAC,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAT,CAAA,CAAAC,CAAA,IAAAC,CAAA,EAAAF,CAAA;AAAA,SAAAG,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAA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AC7E,OAAOL,WAAW,CAACI,iBAAiB,CAACX,KAAK;QAC1C,MAAMO,WAAW,CAACM,KAAK,CAAC,CAAC;MAC3B;IACF,CAAC,CACH,CAAC;EACH;AACF;AAACC,OAAA,CAAA3B,eAAA,GAAAA,eAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/typescript",
3
- "version": "1.0.1280",
3
+ "version": "1.0.1282",
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.1280"
9
+ "version": "1.0.1282"
10
10
  },
11
11
  "dependencies": {
12
12
  "lodash": "4.18.1",
@@ -24,21 +24,21 @@
24
24
  "@teambit/ts-server": "0.0.98",
25
25
  "@teambit/harmony": "0.4.12",
26
26
  "@teambit/logger": "0.0.1503",
27
- "@teambit/cli": "0.0.1433",
27
+ "@teambit/cli": "0.0.1434",
28
28
  "@teambit/harmony.modules.runtimes": "0.0.4",
29
29
  "@teambit/legacy.constants": "0.0.51",
30
- "@teambit/compiler": "1.0.1272",
31
- "@teambit/dependency-resolver": "1.0.1254",
32
- "@teambit/builder": "1.0.1272",
33
- "@teambit/component": "1.0.1249",
34
- "@teambit/schema": "1.0.1272",
35
- "@teambit/aspect-loader": "1.0.1252",
36
- "@teambit/envs": "1.0.1252",
37
- "@teambit/scope": "1.0.1271",
38
- "@teambit/workspace": "1.0.1272",
39
- "@teambit/pkg": "1.0.1272",
40
- "@teambit/watcher": "1.0.1272",
41
- "@teambit/formatter": "1.0.1280"
30
+ "@teambit/compiler": "1.0.1274",
31
+ "@teambit/dependency-resolver": "1.0.1256",
32
+ "@teambit/builder": "1.0.1274",
33
+ "@teambit/component": "1.0.1251",
34
+ "@teambit/schema": "1.0.1274",
35
+ "@teambit/aspect-loader": "1.0.1254",
36
+ "@teambit/envs": "1.0.1254",
37
+ "@teambit/scope": "1.0.1273",
38
+ "@teambit/workspace": "1.0.1274",
39
+ "@teambit/pkg": "1.0.1274",
40
+ "@teambit/watcher": "1.0.1274",
41
+ "@teambit/formatter": "1.0.1282"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/fs-extra": "9.0.7",