@oriflame/config-typescript 5.1.12-alpha.5 → 5.1.13

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.
package/dts/index.d.ts CHANGED
@@ -1,19 +1,20 @@
1
- import type { TypeScriptConfig } from '@beemo/driver-typescript';
2
- export interface TypeScriptOptions {
3
- sourceMaps?: boolean;
4
- library?: boolean;
5
- future?: boolean;
6
- react?: boolean;
7
- srcFolder: string;
8
- typesFolder: string;
9
- workspaces?: boolean;
10
- allowJs?: boolean;
11
- includeTests?: boolean;
12
- testsFolder: string;
13
- declarationDir?: string;
14
- emitDeclarationOnly?: boolean;
15
- skipLibCheck?: boolean;
16
- }
17
- export declare function getCompilerOptions({ library, future, react, srcFolder, allowJs, skipLibCheck, sourceMaps, emitDeclarationOnly, declarationDir, includeTests, workspaces, }: Partial<TypeScriptOptions>): import("@beemo/driver-typescript").CompilerOptions;
18
- export declare function getConfig(options: TypeScriptOptions): TypeScriptConfig;
1
+ import type { TypeScriptConfig } from '@beemo/driver-typescript';
2
+ export interface TypeScriptOptions {
3
+ sourceMaps?: boolean;
4
+ library?: boolean;
5
+ future?: boolean;
6
+ react?: boolean;
7
+ srcFolder: string;
8
+ typesFolder: string;
9
+ workspaces?: boolean;
10
+ allowJs?: boolean;
11
+ includeTests?: boolean;
12
+ testsFolder: string;
13
+ buildFolder: string;
14
+ declarationFolder?: string;
15
+ declarationOnly?: boolean;
16
+ skipLibCheck?: boolean;
17
+ }
18
+ export declare function getCompilerOptions({ library, future, react, srcFolder, allowJs, skipLibCheck, sourceMaps, declarationOnly, declarationFolder, buildFolder, includeTests, workspaces, }: Partial<TypeScriptOptions>): import("@beemo/driver-typescript").CompilerOptions;
19
+ export declare function getConfig(options: TypeScriptOptions): TypeScriptConfig;
19
20
  //# sourceMappingURL=index.d.ts.map
package/lib/index.js CHANGED
@@ -18,8 +18,9 @@ function getCompilerOptions({
18
18
  allowJs = false,
19
19
  skipLibCheck = false,
20
20
  sourceMaps = true,
21
- emitDeclarationOnly = false,
22
- declarationDir = 'dts',
21
+ declarationOnly = false,
22
+ declarationFolder,
23
+ buildFolder,
23
24
  includeTests,
24
25
  workspaces
25
26
  }) {
@@ -32,7 +33,6 @@ function getCompilerOptions({
32
33
  compilerOptions.useDefineForClassFields = future && process.env.NODE_ENV === 'development';
33
34
  compilerOptions.allowJs = allowJs;
34
35
  compilerOptions.skipLibCheck = skipLibCheck;
35
- compilerOptions.declaration = library || emitDeclarationOnly;
36
36
 
37
37
  if (react) {
38
38
  var _compilerOptions$lib;
@@ -49,15 +49,20 @@ function getCompilerOptions({
49
49
  }
50
50
 
51
51
  if (!workspaces && library) {
52
- compilerOptions.declarationDir = declarationDir;
52
+ compilerOptions.declarationDir = declarationFolder || buildFolder;
53
53
  }
54
54
 
55
55
  if (!workspaces) {
56
- compilerOptions.outDir = declarationDir;
56
+ if (!includeTests) {
57
+ compilerOptions.rootDir = srcFolder;
58
+ compilerOptions.emitDeclarationOnly = declarationOnly;
59
+ compilerOptions.declaration = library || declarationOnly;
60
+ compilerOptions.outDir = buildFolder;
61
+ }
62
+
63
+ compilerOptions.composite = library;
57
64
  }
58
65
 
59
- compilerOptions.composite = library && !workspaces;
60
-
61
66
  if (sourceMaps) {
62
67
  compilerOptions.sourceMap = true;
63
68
  compilerOptions.declarationMap = true;
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":null,"names":["config","require","compilerOptions","getCompilerOptions","library","future","react","srcFolder","allowJs","skipLibCheck","sourceMaps","emitDeclarationOnly","declarationDir","includeTests","workspaces","Object","assign","isolatedModules","useDefineForClassFields","process","env","NODE_ENV","declaration","lib","jsx","baseUrl","paths","ALIAS_PATTERN","outDir","composite","sourceMap","declarationMap","getConfig","options","typesFolder","testsFolder","tsconfig","include","exclude","push"],"mappings":";;;;;;AAGA,MAAMA,MAAM,GAAGC,OAAO,CAAC,iCAAD,CAAtB;;AAEA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":["config","require","compilerOptions","getCompilerOptions","library","future","react","srcFolder","allowJs","skipLibCheck","sourceMaps","declarationOnly","declarationFolder","buildFolder","includeTests","workspaces","Object","assign","isolatedModules","useDefineForClassFields","process","env","NODE_ENV","lib","jsx","baseUrl","paths","ALIAS_PATTERN","declarationDir","rootDir","emitDeclarationOnly","declaration","outDir","composite","sourceMap","declarationMap","getConfig","options","typesFolder","testsFolder","tsconfig","include","exclude","push"],"mappings":";;;;;;AAGA,MAAMA,MAAM,GAAGC,OAAO,CAAC,iCAAD,CAAtB;;AAEA,MAAMC,eAAe,GAAGF,MAAM,CAACE,eAA/B;AAmBO,SAASC,kBAAT,CAA4B;AACjCC,EAAAA,OAAO,GAAG,KADuB;AAEjCC,EAAAA,MAAM,GAAG,KAFwB;AAGjCC,EAAAA,KAAK,GAAG,KAHyB;AAIjCC,EAAAA,SAAS,GAAG,KAJqB;AAKjCC,EAAAA,OAAO,GAAG,KALuB;AAMjCC,EAAAA,YAAY,GAAG,KANkB;AAOjCC,EAAAA,UAAU,GAAG,IAPoB;AAQjCC,EAAAA,eAAe,GAAG,KARe;AASjCC,EAAAA,iBATiC;AAUjCC,EAAAA,WAViC;AAWjCC,EAAAA,YAXiC;AAYjCC,EAAAA;AAZiC,CAA5B,EAawB;AAC7B,MAAIA,UAAJ,EAAgB;AACdC,IAAAA,MAAM,CAACC,MAAP,CACEf,eADF,EAEGD,OAAO,CAAC,4CAAD,CAAR,CAA4EC,eAF9E;AAID,GAN4B;;;AAQ7BA,EAAAA,eAAe,CAACgB,eAAhB,GAAkCb,MAAM,IAAID,OAAV,IAAqB,CAACU,YAAxD;AACAZ,EAAAA,eAAe,CAACiB,uBAAhB,GAA0Cd,MAAM,IAAIe,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,aAA7E;AACApB,EAAAA,eAAe,CAACM,OAAhB,GAA0BA,OAA1B;AACAN,EAAAA,eAAe,CAACO,YAAhB,GAA+BA,YAA/B;;AAEA,MAAIH,KAAJ,EAA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,MAAAA,eAAe,EAAEC,kBAAkB,CAACkC,OAAD;AAD9B,KAAP;AAGD;;AAED,QAAMG,QAAQ,GAAG;AACftC,IAAAA,eAAe,EAAEC,kBAAkB,CAACkC,OAAD,CADpB;AAEfI,IAAAA,OAAO,EAAE,CAAE,KAAIlC,SAAU,OAAhB,EAAyB,KAAI+B,WAAY,OAAzC,CAFM;AAGfI,IAAAA,OAAO,EAAE,CAAC,mBAAD;AAHM,GAAjB;;AAMA,MAAI5B,YAAJ,EAAkB;AAChB0B,IAAAA,QAAQ,CAACC,OAAT,CAAiBE,IAAjB,CAAuB,KAAIJ,WAAY,OAAvC;AACD;;AAED,SAAOC,QAAP;AACD;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oriflame/config-typescript",
3
- "version": "5.1.12-alpha.5+2dc04301",
3
+ "version": "5.1.13",
4
4
  "description": "Reusable typescript config.",
5
5
  "keywords": [
6
6
  "lumos",
@@ -28,8 +28,8 @@
28
28
  "src/**/*.{ts,tsx,json}"
29
29
  ],
30
30
  "dependencies": {
31
- "@oriflame/lumos-common": "^5.1.12-alpha.5+2dc04301",
32
- "tsconfig-oriflame": "^5.1.12-alpha.5+2dc04301"
31
+ "@oriflame/lumos-common": "^5.1.13",
32
+ "tsconfig-oriflame": "^5.1.13"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@beemo/core": "^2.1.3",
@@ -45,5 +45,5 @@
45
45
  "format": "lib",
46
46
  "platform": "node"
47
47
  },
48
- "gitHead": "2dc04301cc72437c3effd72f6923ad485d1b2643"
48
+ "gitHead": "80e94a6ad1cdccada947e9292e60f5c4ca620461"
49
49
  }
package/src/index.ts CHANGED
@@ -16,8 +16,9 @@ export interface TypeScriptOptions {
16
16
  allowJs?: boolean;
17
17
  includeTests?: boolean;
18
18
  testsFolder: string;
19
- declarationDir?: string;
20
- emitDeclarationOnly?: boolean;
19
+ buildFolder: string;
20
+ declarationFolder?: string;
21
+ declarationOnly?: boolean;
21
22
  skipLibCheck?: boolean;
22
23
  }
23
24
 
@@ -29,8 +30,9 @@ export function getCompilerOptions({
29
30
  allowJs = false,
30
31
  skipLibCheck = false,
31
32
  sourceMaps = true,
32
- emitDeclarationOnly = false,
33
- declarationDir = 'dts',
33
+ declarationOnly = false,
34
+ declarationFolder,
35
+ buildFolder,
34
36
  includeTests,
35
37
  workspaces,
36
38
  }: Partial<TypeScriptOptions>) {
@@ -45,7 +47,6 @@ export function getCompilerOptions({
45
47
  compilerOptions.useDefineForClassFields = future && process.env.NODE_ENV === 'development';
46
48
  compilerOptions.allowJs = allowJs;
47
49
  compilerOptions.skipLibCheck = skipLibCheck;
48
- compilerOptions.declaration = library || emitDeclarationOnly;
49
50
 
50
51
  if (react) {
51
52
  compilerOptions.lib = [...(compilerOptions.lib ?? []), 'dom.iterable'];
@@ -60,15 +61,19 @@ export function getCompilerOptions({
60
61
  }
61
62
 
62
63
  if (!workspaces && library) {
63
- compilerOptions.declarationDir = declarationDir;
64
+ compilerOptions.declarationDir = declarationFolder || buildFolder;
64
65
  }
65
66
 
66
67
  if (!workspaces) {
67
- compilerOptions.outDir = declarationDir;
68
+ if (!includeTests) {
69
+ compilerOptions.rootDir = srcFolder;
70
+ compilerOptions.emitDeclarationOnly = declarationOnly;
71
+ compilerOptions.declaration = library || declarationOnly;
72
+ compilerOptions.outDir = buildFolder;
73
+ }
74
+ compilerOptions.composite = library;
68
75
  }
69
76
 
70
- compilerOptions.composite = library && !workspaces;
71
-
72
77
  if (sourceMaps) {
73
78
  compilerOptions.sourceMap = true;
74
79
  compilerOptions.declarationMap = true;