@oriflame/config-typescript 5.1.12-alpha.2 → 5.1.12-alpha.4
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 +1 -1
- package/lib/index.js +6 -1
- package/lib/index.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +6 -1
package/dts/index.d.ts
CHANGED
|
@@ -14,6 +14,6 @@ export interface TypeScriptOptions {
|
|
|
14
14
|
emitDeclarationOnly?: boolean;
|
|
15
15
|
skipLibCheck?: boolean;
|
|
16
16
|
}
|
|
17
|
-
export declare function getCompilerOptions({ library, future, react, srcFolder, allowJs, skipLibCheck, sourceMaps, emitDeclarationOnly, declarationDir, workspaces, }: Partial<TypeScriptOptions>): import("@beemo/driver-typescript").CompilerOptions;
|
|
17
|
+
export declare function getCompilerOptions({ library, future, react, srcFolder, allowJs, skipLibCheck, sourceMaps, emitDeclarationOnly, declarationDir, includeTests, workspaces, }: Partial<TypeScriptOptions>): import("@beemo/driver-typescript").CompilerOptions;
|
|
18
18
|
export declare function getConfig(options: TypeScriptOptions): TypeScriptConfig;
|
|
19
19
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.js
CHANGED
|
@@ -20,6 +20,7 @@ function getCompilerOptions({
|
|
|
20
20
|
sourceMaps = true,
|
|
21
21
|
emitDeclarationOnly = false,
|
|
22
22
|
declarationDir = 'dts',
|
|
23
|
+
includeTests,
|
|
23
24
|
workspaces
|
|
24
25
|
}) {
|
|
25
26
|
if (workspaces) {
|
|
@@ -27,7 +28,7 @@ function getCompilerOptions({
|
|
|
27
28
|
} // Do we need isolated modules?
|
|
28
29
|
|
|
29
30
|
|
|
30
|
-
compilerOptions.isolatedModules = future && library;
|
|
31
|
+
compilerOptions.isolatedModules = future && library && !includeTests;
|
|
31
32
|
compilerOptions.useDefineForClassFields = future && process.env.NODE_ENV === 'development';
|
|
32
33
|
compilerOptions.allowJs = allowJs;
|
|
33
34
|
compilerOptions.skipLibCheck = skipLibCheck;
|
|
@@ -47,6 +48,10 @@ function getCompilerOptions({
|
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
50
|
|
|
51
|
+
if (!workspaces && library) {
|
|
52
|
+
compilerOptions.declarationDir = `./${declarationDir}`;
|
|
53
|
+
}
|
|
54
|
+
|
|
50
55
|
if (!workspaces) {
|
|
51
56
|
compilerOptions.outDir = `./${declarationDir}`;
|
|
52
57
|
}
|
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","workspaces","Object","assign","isolatedModules","useDefineForClassFields","process","env","NODE_ENV","declaration","lib","jsx","baseUrl","paths","ALIAS_PATTERN","outDir","composite","sourceMap","declarationMap","getConfig","options","typesFolder","
|
|
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,MAAMC,eAAe,GAAGF,MAAM,CAACE,eAA/B;AAkBO,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;AA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AA0B,KAAIhB,cAAe,EAA7C;AACD;;AAEDV,EAAAA,eAAe,CAAC2B,SAAhB,GAA4BzB,OAAO,IAAI,CAACU,UAAxC;;AAEA,MAAIJ,UAAJ,EAAgB;AACdR,IAAAA,eAAe,CAAC4B,SAAhB,GAA4B,IAA5B;AACA5B,IAAAA,eAAe,CAAC6B,cAAhB,GAAiC,IAAjC;AACD;;AAED,SAAO7B,eAAP;AACD;AAEM,SAAS8B,SAAT,CAAmBC,OAAnB,EAAiE;AACtE,QAAM;AAAEnB,IAAAA,UAAF;AAAcP,IAAAA,SAAd;AAAyB2B,IAAAA,WAAzB;AAAsCrB,IAAAA,YAAtC;AAAoDsB,IAAAA;AAApD,MAAoEF,OAA1E;;AACA,MAAInB,UAAJ,EAAgB;AACd,WAAO;AACLZ,MAAAA,eAAe,EAAEC,kBAAkB,CAAC8B,OAAD;AAD9B,KAAP;AAGD;;AAED,QAAMG,QAAQ,GAAG;AACflC,IAAAA,eAAe,EAAEC,kBAAkB,CAAC8B,OAAD,CADpB;AAEfI,IAAAA,OAAO,EAAE,CAAE,KAAI9B,SAAU,OAAhB,EAAyB,KAAI2B,WAAY,OAAzC,CAFM;AAGfI,IAAAA,OAAO,EAAE,CAAC,mBAAD;AAHM,GAAjB;;AAMA,MAAIzB,YAAJ,EAAkB;AAChBuB,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.
|
|
3
|
+
"version": "5.1.12-alpha.4+c1e86871",
|
|
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.
|
|
32
|
-
"tsconfig-oriflame": "^5.1.12-alpha.
|
|
31
|
+
"@oriflame/lumos-common": "^5.1.12-alpha.4+c1e86871",
|
|
32
|
+
"tsconfig-oriflame": "^5.1.12-alpha.4+c1e86871"
|
|
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": "
|
|
48
|
+
"gitHead": "c1e868712877a4104a3be0b8cd9c18da6bf39262"
|
|
49
49
|
}
|
package/src/index.ts
CHANGED
|
@@ -31,6 +31,7 @@ export function getCompilerOptions({
|
|
|
31
31
|
sourceMaps = true,
|
|
32
32
|
emitDeclarationOnly = false,
|
|
33
33
|
declarationDir = 'dts',
|
|
34
|
+
includeTests,
|
|
34
35
|
workspaces,
|
|
35
36
|
}: Partial<TypeScriptOptions>) {
|
|
36
37
|
if (workspaces) {
|
|
@@ -40,7 +41,7 @@ export function getCompilerOptions({
|
|
|
40
41
|
);
|
|
41
42
|
}
|
|
42
43
|
// Do we need isolated modules?
|
|
43
|
-
compilerOptions.isolatedModules = future && library;
|
|
44
|
+
compilerOptions.isolatedModules = future && library && !includeTests;
|
|
44
45
|
compilerOptions.useDefineForClassFields = future && process.env.NODE_ENV === 'development';
|
|
45
46
|
compilerOptions.allowJs = allowJs;
|
|
46
47
|
compilerOptions.skipLibCheck = skipLibCheck;
|
|
@@ -58,6 +59,10 @@ export function getCompilerOptions({
|
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
61
|
|
|
62
|
+
if (!workspaces && library) {
|
|
63
|
+
compilerOptions.declarationDir = `./${declarationDir}`;
|
|
64
|
+
}
|
|
65
|
+
|
|
61
66
|
if (!workspaces) {
|
|
62
67
|
compilerOptions.outDir = `./${declarationDir}`;
|
|
63
68
|
}
|