@workday/canvas-kit-styling-transform 14.0.0-alpha.1185-next.0 → 14.0.0-alpha.1190-next.0

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 +1 @@
1
- {"version":3,"file":"createTypeScriptWatchProgram.d.ts","sourceRoot":"","sources":["../../../lib/createTypeScriptWatchProgram.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,qDAAqD;AACrD,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,wBAKnD;AAED,eAAO,MAAM,kBAAkB,iBAAkB,MAAM,uBAWtD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,oBACJ,GAAG,eAAe,gBACrB,MAAM,uCACiB,GAAG,cAAc,KAAK,IAAI,KAC9D,CAAC,GAAG,cAAc,EAAE,MAAM,IAAI,CAahC,CAAC"}
1
+ {"version":3,"file":"createTypeScriptWatchProgram.d.ts","sourceRoot":"","sources":["../../../lib/createTypeScriptWatchProgram.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,qDAAqD;AACrD,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,wBAKnD;AAED,eAAO,MAAM,kBAAkB,iBAAkB,MAAM,uBAWtD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,oBACJ,GAAG,eAAe,gBACrB,MAAM,uCACiB,GAAG,cAAc,KAAK,IAAI,KAC9D,CAAC,GAAG,cAAc,EAAE,MAAM,IAAI,CAehC,CAAC"}
@@ -35,7 +35,7 @@ exports.getCompilerOptions = getCompilerOptions;
35
35
  * @returns
36
36
  */
37
37
  const startWatch = (compilerOptions, tsconfigPath, onProgramCreatedOrUpdated) => {
38
- const host = typescript_1.default.createWatchCompilerHost(tsconfigPath, compilerOptions, typescript_1.default.sys, typescript_1.default.createSemanticDiagnosticsBuilderProgram);
38
+ const host = typescript_1.default.createWatchCompilerHost(tsconfigPath, compilerOptions, typescript_1.default.sys, typescript_1.default.createSemanticDiagnosticsBuilderProgram, reportDiagnostic, reportWatchStatusChanged);
39
39
  host.afterProgramCreate = builderProgram => {
40
40
  onProgramCreatedOrUpdated(builderProgram);
41
41
  };
@@ -43,3 +43,18 @@ const startWatch = (compilerOptions, tsconfigPath, onProgramCreatedOrUpdated) =>
43
43
  return [watch.getProgram(), watch.close];
44
44
  };
45
45
  exports.startWatch = startWatch;
46
+ const formatHost = {
47
+ getCanonicalFileName: path => path,
48
+ getCurrentDirectory: typescript_1.default.sys.getCurrentDirectory,
49
+ getNewLine: () => typescript_1.default.sys.newLine,
50
+ };
51
+ function reportDiagnostic(diagnostic) {
52
+ console.error('Error', diagnostic.code, ':', typescript_1.default.flattenDiagnosticMessageText(diagnostic.messageText, formatHost.getNewLine()));
53
+ }
54
+ /**
55
+ * Prints a diagnostic every time the watch status changes.
56
+ * This is mainly for messages like "Starting compilation" or "Compilation completed".
57
+ */
58
+ function reportWatchStatusChanged(diagnostic) {
59
+ console.log(typescript_1.default.formatDiagnostic(diagnostic, formatHost));
60
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"createTypeScriptWatchProgram.d.ts","sourceRoot":"","sources":["../../../lib/createTypeScriptWatchProgram.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,qDAAqD;AACrD,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,wBAKnD;AAED,eAAO,MAAM,kBAAkB,iBAAkB,MAAM,uBAWtD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,oBACJ,GAAG,eAAe,gBACrB,MAAM,uCACiB,GAAG,cAAc,KAAK,IAAI,KAC9D,CAAC,GAAG,cAAc,EAAE,MAAM,IAAI,CAahC,CAAC"}
1
+ {"version":3,"file":"createTypeScriptWatchProgram.d.ts","sourceRoot":"","sources":["../../../lib/createTypeScriptWatchProgram.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,qDAAqD;AACrD,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,wBAKnD;AAED,eAAO,MAAM,kBAAkB,iBAAkB,MAAM,uBAWtD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,oBACJ,GAAG,eAAe,gBACrB,MAAM,uCACiB,GAAG,cAAc,KAAK,IAAI,KAC9D,CAAC,GAAG,cAAc,EAAE,MAAM,IAAI,CAehC,CAAC"}
@@ -27,10 +27,25 @@ export const getCompilerOptions = (tsconfigPath) => {
27
27
  * @returns
28
28
  */
29
29
  export const startWatch = (compilerOptions, tsconfigPath, onProgramCreatedOrUpdated) => {
30
- const host = ts.createWatchCompilerHost(tsconfigPath, compilerOptions, ts.sys, ts.createSemanticDiagnosticsBuilderProgram);
30
+ const host = ts.createWatchCompilerHost(tsconfigPath, compilerOptions, ts.sys, ts.createSemanticDiagnosticsBuilderProgram, reportDiagnostic, reportWatchStatusChanged);
31
31
  host.afterProgramCreate = builderProgram => {
32
32
  onProgramCreatedOrUpdated(builderProgram);
33
33
  };
34
34
  const watch = ts.createWatchProgram(host);
35
35
  return [watch.getProgram(), watch.close];
36
36
  };
37
+ const formatHost = {
38
+ getCanonicalFileName: path => path,
39
+ getCurrentDirectory: ts.sys.getCurrentDirectory,
40
+ getNewLine: () => ts.sys.newLine,
41
+ };
42
+ function reportDiagnostic(diagnostic) {
43
+ console.error('Error', diagnostic.code, ':', ts.flattenDiagnosticMessageText(diagnostic.messageText, formatHost.getNewLine()));
44
+ }
45
+ /**
46
+ * Prints a diagnostic every time the watch status changes.
47
+ * This is mainly for messages like "Starting compilation" or "Compilation completed".
48
+ */
49
+ function reportWatchStatusChanged(diagnostic) {
50
+ console.log(ts.formatDiagnostic(diagnostic, formatHost));
51
+ }
@@ -41,7 +41,9 @@ export const startWatch = (
41
41
  tsconfigPath,
42
42
  compilerOptions,
43
43
  ts.sys,
44
- ts.createSemanticDiagnosticsBuilderProgram
44
+ ts.createSemanticDiagnosticsBuilderProgram,
45
+ reportDiagnostic,
46
+ reportWatchStatusChanged
45
47
  );
46
48
  host.afterProgramCreate = builderProgram => {
47
49
  onProgramCreatedOrUpdated(builderProgram);
@@ -50,3 +52,26 @@ export const startWatch = (
50
52
  const watch = ts.createWatchProgram(host);
51
53
  return [watch.getProgram(), watch.close];
52
54
  };
55
+
56
+ const formatHost: ts.FormatDiagnosticsHost = {
57
+ getCanonicalFileName: path => path,
58
+ getCurrentDirectory: ts.sys.getCurrentDirectory,
59
+ getNewLine: () => ts.sys.newLine,
60
+ };
61
+
62
+ function reportDiagnostic(diagnostic: ts.Diagnostic) {
63
+ console.error(
64
+ 'Error',
65
+ diagnostic.code,
66
+ ':',
67
+ ts.flattenDiagnosticMessageText(diagnostic.messageText, formatHost.getNewLine())
68
+ );
69
+ }
70
+
71
+ /**
72
+ * Prints a diagnostic every time the watch status changes.
73
+ * This is mainly for messages like "Starting compilation" or "Compilation completed".
74
+ */
75
+ function reportWatchStatusChanged(diagnostic: ts.Diagnostic) {
76
+ console.log(ts.formatDiagnostic(diagnostic, formatHost));
77
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-styling-transform",
3
- "version": "14.0.0-alpha.1185-next.0",
3
+ "version": "14.0.0-alpha.1190-next.0",
4
4
  "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -38,7 +38,7 @@
38
38
  ],
39
39
  "dependencies": {
40
40
  "@emotion/serialize": "^1.0.2",
41
- "@workday/canvas-kit-styling": "^14.0.0-alpha.1185-next.0",
41
+ "@workday/canvas-kit-styling": "^14.0.0-alpha.1190-next.0",
42
42
  "@workday/canvas-tokens-web": "3.0.0-alpha.10",
43
43
  "stylis": "4.0.13",
44
44
  "ts-node": "^10.9.1",
@@ -51,5 +51,5 @@
51
51
  "peerDependencies": {
52
52
  "typescript": ">=5.0"
53
53
  },
54
- "gitHead": "9e540576d16adbd28a834f86cfcc6d327105db67"
54
+ "gitHead": "152cb8d23c62761fd6e0af7b99c871907d986134"
55
55
  }