@plugjs/tsgo 0.0.6 → 0.1.1

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,6 +1,4 @@
1
1
  import type { ReportRecord } from '@plugjs/plug/logging';
2
- import type { AbsolutePath } from '@plugjs/plug/paths';
3
- import type { Diagnostic, Program } from 'typescript/unstable/async';
4
- export declare function convertDiagnostics(diagnostics: readonly Diagnostic[], program: Program, deprecations?: 'warn' | 'notice' | 'off'): Promise<ReportRecord[]>;
5
- export declare function convertProjectDiagnostics(diagnostics: readonly Diagnostic[], program: Program, fileName: AbsolutePath): Promise<ReportRecord[]>;
2
+ import type { Diagnostic } from 'typescript/async';
3
+ export declare function convertDiagnostics(diagnostics: readonly Diagnostic[], deprecations?: 'warn' | 'notice' | 'off'): ReportRecord[];
6
4
  //# sourceMappingURL=diagnostics.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEtD,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAqCpE,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,SAAS,UAAU,EAAE,EAClC,OAAO,EAAE,OAAO,EAChB,YAAY,GAAE,MAAM,GAAG,QAAQ,GAAG,KAAgB,GACjD,OAAO,CAAC,YAAY,EAAE,CAAC,CA2DzB;AAED,wBAAsB,yBAAyB,CAC7C,WAAW,EAAE,SAAS,UAAU,EAAE,EAClC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,YAAY,GACrB,OAAO,CAAC,YAAY,EAAE,CAAC,CASzB"}
1
+ {"version":3,"file":"diagnostics.d.ts","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAqClD,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,SAAS,UAAU,EAAE,EAClC,YAAY,GAAE,MAAM,GAAG,QAAQ,GAAG,KAAgB,GACjD,YAAY,EAAE,CAsChB"}
@@ -1,7 +1,7 @@
1
1
  import { ERROR, NOTICE, WARN } from '@plugjs/plug/logging';
2
2
  import { assertAbsolutePath } from '@plugjs/plug/paths';
3
- import { DiagnosticCategory } from 'typescript/unstable/async';
4
- function convertDiagnostic(diagnostic, sourceFile) {
3
+ import { DiagnosticCategory } from 'typescript/async';
4
+ function convertDiagnostic(diagnostic) {
5
5
  const record = {
6
6
  level: NOTICE,
7
7
  message: diagnostic.text,
@@ -23,16 +23,16 @@ function convertDiagnostic(diagnostic, sourceFile) {
23
23
  assertAbsolutePath(diagnostic.fileName);
24
24
  record.file = diagnostic.fileName;
25
25
  }
26
- if (sourceFile) {
27
- const pos = sourceFile.getLineAndCharacterOfPosition(diagnostic.pos);
26
+ if (diagnostic.startPosition) {
27
+ const pos = diagnostic.startPosition;
28
28
  record.line = pos.line + 1;
29
29
  record.column = pos.character + 1;
30
30
  record.length = diagnostic.end - diagnostic.pos;
31
- record.source = sourceFile.getFullText();
31
+ record.source = diagnostic.source;
32
32
  }
33
33
  return record;
34
34
  }
35
- export async function convertDiagnostics(diagnostics, program, deprecations = 'notice') {
35
+ export function convertDiagnostics(diagnostics, deprecations = 'notice') {
36
36
  // Filter out any duplicate diagnostic *before* we convert them to report
37
37
  // records (that might be expensive because of source file lookups)
38
38
  const seen = new Set();
@@ -51,7 +51,7 @@ export async function convertDiagnostics(diagnostics, program, deprecations = 'n
51
51
  return true;
52
52
  });
53
53
  // Convert all diagnostics to report records
54
- const converted = await Promise.all(unique.map(async (diagnostic) => {
54
+ const converted = unique.map((diagnostic) => {
55
55
  // Anything not an error is not critical
56
56
  const isNonCritical = diagnostic.category !== DiagnosticCategory.Error;
57
57
  // First of all see how we need to handle non-error deprecations: when
@@ -63,37 +63,10 @@ export async function convertDiagnostics(diagnostics, program, deprecations = 'n
63
63
  diagnostic = { ...diagnostic, category: DiagnosticCategory.Warning };
64
64
  }
65
65
  }
66
- // First figure out where this diagnostic came from...
67
- const sourceFileMetadata = diagnostic.fileName
68
- ? await program.getSourceFileMetadata(diagnostic.fileName)
69
- : /* coverage ignore next */ undefined;
70
- // If the source file is in the default library (e.g. "lib.dom.ts") or
71
- // from an external library (in "node_modules") then we ONLY keep errors
72
- // and (we ignore things like warnings, suggestions, ...)
73
- const isExternal = sourceFileMetadata?.isDefaultLibrary || sourceFileMetadata?.isFromExternalLibrary;
74
- if (isExternal && isNonCritical)
75
- return;
76
- // Get the source file and its metadata (if any) for the diagnostic...
77
- // We do this *after* the external check above as getting the source file
78
- // is quite expensive (especially for things like "lib.es5.dts")...
79
- const sourceFile = diagnostic.fileName
80
- ? ((await program.getSourceFile(diagnostic.fileName)) ??
81
- (await program.getConfigSourceFile(diagnostic.fileName)))
82
- : /* coverage ignore next */ undefined;
83
66
  // Convert our diagnostic to a report record and return it
84
- return convertDiagnostic(diagnostic, sourceFile);
85
- }));
67
+ return convertDiagnostic(diagnostic);
68
+ });
86
69
  // Filter out any null/undefined records
87
70
  return converted.filter((record) => !!record);
88
71
  }
89
- export async function convertProjectDiagnostics(diagnostics, program, fileName) {
90
- // Make sure that we have a file name for the diagnostics
91
- const fileDiagnostics = diagnostics.map((diagnostic) => {
92
- if (diagnostic.fileName)
93
- return diagnostic;
94
- return { ...diagnostic, fileName };
95
- });
96
- // Convert the diagnostics to report records and return them
97
- return convertDiagnostics(fileDiagnostics, program);
98
- }
99
72
  //# sourceMappingURL=diagnostics.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,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U,EAAE,QAAQ,EAAE,kBAAkB,CAAC,OAAO,EAAE,CAAA;YACtE,CAAC;QACH,CAAC;QAED,0DAA0D;QAC1D,OAAO,iBAAiB,CAAC,UAAU,CAAC,CAAA;IACtC,CAAC,CAAC,CAAA;IAEF,wCAAwC;IACxC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,MAAM,EAA0B,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;AACvE,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,30 @@
1
- /** Options for the {@link Pipe.typescript TypeScript} plug. */
1
+ import type { OverrideCompilerOptions } from 'typescript/async';
2
+ /** Options for the `typescriptBuild` plug. */
3
+ export interface TypeScriptBuildOptions {
4
+ /**
5
+ * Force building all projects in the build. Defaults to `true`.
6
+ *
7
+ * This is equivalent to running `tsc --build --force`.
8
+ */
9
+ force?: boolean;
10
+ /**
11
+ * Skip building downstream projects on error in upstream project. Defaults
12
+ * to `false`.
13
+ *
14
+ * This is equivalent to running `tsc --build --stopBuildOnErrors`.
15
+ */
16
+ stopBuildOnErrors?: boolean;
17
+ /**
18
+ * Enable verbose logging during the build. Defaults to `true`.
19
+ *
20
+ * This is equivalent to running `tsc --build --verbose`.
21
+ */
22
+ verbose?: boolean;
23
+ /** Override the default TypeScript compiler options for the build. */
24
+ overrideCompilerOptions?: OverrideCompilerOptions;
25
+ }
26
+ /** Options for the `typescript` plug. */
2
27
  export interface TypeScriptOptions {
3
- /** Whether referenced projects are built too. Defaults to `false`. */
4
- projectReferences?: boolean;
5
28
  /**
6
29
  * Controls how deprecation diagnostics are reported. Use `'notice'` or
7
30
  * `true` for notices, `'warn'` for warnings, and `'off'` or `false` to
@@ -16,8 +39,13 @@ export interface TypeScriptOptions {
16
39
  */
17
40
  emitOnly?: 'js' | 'dts' | 'all' | 'none' | boolean;
18
41
  }
19
- /** Options for the {@link tsc} and {@link tsbuild} helpers. */
20
- export interface TscOptions extends Omit<TypeScriptOptions, 'projectReferences'> {
42
+ /** Options for the {@link tsc} helper. */
43
+ export interface TscOptions extends TypeScriptOptions {
44
+ /** Base directory used to resolve the configuration path. */
45
+ directory?: string;
46
+ }
47
+ /** Options for the {@link tscBuild} helper. */
48
+ export interface TscBuildOptions extends TypeScriptBuildOptions {
21
49
  /** Base directory used to resolve the configuration path. */
22
50
  directory?: string;
23
51
  }
@@ -27,6 +55,8 @@ declare module '@plugjs/plug' {
27
55
  * Run the {@link https://www.typescriptlang.org/ TypeScript Compiler}
28
56
  * version 7 (native) over the `tsconfig.json` configuration files
29
57
  * given as input to this {@link Pipe} instance.
58
+ *
59
+ * This is equivalent to running `tsc --project`.
30
60
  */
31
61
  typescript(): Pipe;
32
62
  /**
@@ -34,9 +64,29 @@ declare module '@plugjs/plug' {
34
64
  * version 7 (native) over the `tsconfig.json` configuration files
35
65
  * given as input to this {@link Pipe} instance.
36
66
  *
67
+ * This is equivalent to running `tsc --project`.
68
+ *
37
69
  * @param options {@link TypeScriptOptions} to use for the build.
38
70
  */
39
71
  typescript(options: TypeScriptOptions): Pipe;
72
+ /**
73
+ * Run the {@link https://www.typescriptlang.org/ TypeScript Builder}
74
+ * version 7 (native) over the `tsconfig.json` configuration files
75
+ * given as input to this {@link Pipe} instance.
76
+ *
77
+ * This is equivalent to running `tsc --build`.
78
+ */
79
+ typescriptBuild(): Promise<undefined>;
80
+ /**
81
+ * Run the {@link https://www.typescriptlang.org/ TypeScript Builder}
82
+ * version 7 (native) over the `tsconfig.json` configuration files
83
+ * given as input to this {@link Pipe} instance.
84
+ *
85
+ * This is equivalent to running `tsc --build`.
86
+ *
87
+ * @param options {@link TypeScriptBuildOptions} to use for the build.
88
+ */
89
+ typescriptBuild(options: TypeScriptBuildOptions): Promise<undefined>;
40
90
  }
41
91
  }
42
92
  export { tsbuild, tsc } from './typescript.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,+DAA+D;AAC/D,MAAM,W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AAG,MAAM,GAAG,OAAO,CAAA;CACnD;AAED,0CAA0C;AAC1C,MAAM,WAAW,UAAW,SAAQ,iBAAiB;IACnD,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,+CAA+C;AAC/C,MAAM,WAAW,eAAgB,SAAQ,sBAAsB;IAC7D,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,OAAO,QAAQ,cAAc,CAAC;IAC5B,UAAiB,IAAI;QACnB;;;;;;WAMG;QACH,UAAU,IAAI,IAAI,CAAA;QAElB;;;;;;;;WAQG;QACH,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAAA;QAE5C;;;;;;WAMG;QACH,eAAe,IAAI,OAAO,CAAC,SAAS,CAAC,CAAA;QAErC;;;;;;;;WAQG;QACH,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,SAAS,CAAC,CAAA;KACrE;CACF;AAKD,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA"}
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { install } from '@plugjs/plug/pipe';
2
- import { TypeScript } from './typescript.js';
2
+ import { TypeScript, TypeScriptBuild } from './typescript.js';
3
3
  install('typescript', TypeScript);
4
+ install('typescriptBuild', TypeScriptBuild);
4
5
  export { tsbuild, tsc } from './typescript.js';
5
6
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAiD5C,OAAO,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;AAEjC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAE3C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AA0G7D,OAAO,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;AACjC,OAAO,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAA;AAE3C,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA"}
@@ -1,14 +1,23 @@
1
1
  import { Files } from '@plugjs/plug/files';
2
- import type { TscOptions, TypeScriptOptions } from './index.ts';
2
+ import type { TscBuildOptions, TscOptions, TypeScriptBuildOptions, TypeScriptOptions } from './index.ts';
3
3
  import type { Pipe } from '@plugjs/plug';
4
4
  import type { Context, Plug } from '@plugjs/plug/pipe';
5
+ /** This is marked as "@internal" in TypeScript 7.1 as it's still unstable */
6
+ declare module 'typescript/async' {
7
+ interface API {
8
+ createBuildOrchestrator(rootNames: readonly string[], buildOrchestratorOptions: BuildOrchestratorOptions): Promise<BuildOrchestrator>;
9
+ }
10
+ }
5
11
  export declare class TypeScript implements Plug<Files> {
6
- private _emitOnly;
7
- private _reportDeprecations;
8
- private _projectReferences;
9
- constructor(options?: TypeScriptOptions);
12
+ private readonly _options;
13
+ constructor(_options?: TypeScriptOptions);
10
14
  pipe(files: Files, context: Context): Promise<Files>;
11
15
  }
16
+ export declare class TypeScriptBuild implements Plug<void> {
17
+ private readonly _options;
18
+ constructor(_options?: TypeScriptBuildOptions);
19
+ pipe(files: Files, context: Context): Promise<void>;
20
+ }
12
21
  /**
13
22
  * Compile the project identified by the specified configuration file
14
23
  * (either a `tsconfig.json` or a directory containing one).
@@ -23,5 +32,5 @@ export declare function tsc(config: string, options?: TscOptions): Pipe;
23
32
  *
24
33
  * This is roughly equivalent to the command line `tsc --build <config>`.
25
34
  */
26
- export declare function tsbuild(config: string, options?: TscOptions): Pipe;
35
+ export declare function tsbuild(config: string, options: TscBuildOptions): Promise<undefined>;
27
36
  //# sourceMappingURL=typescript.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../src/typescript.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAQ1C,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAC/D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAExC,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAOtD,qBAAa,UAAW,YAAW,IAAI,CAAC,KAAK,CAAC;IAC5C,OAAO,CAAC,SAAS,CAAiB;IAClC,OAAO,CAAC,mBAAmB,CAA2B;IACtD,OAAO,CAAC,kBAAkB,CAAS;IAEnC,YAAY,OAAO,GAAE,iBAAsB,EA2C1C;IAEK,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAqGzD;CACF;AAMD;;;;;GAKG;AACH,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,UAAe,GAAG,IAAI,CAGlE;AAID;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,UAAe,GAAG,IAAI,CAGtE"}
1
+ {"version":3,"file":"typescript.d.ts","sources":["../src/typescript.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAQ1C,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACxG,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAExC,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAItD,6EAA6E;AAC7E,OAAO,QAAQ,kBAAkB,CAAC;IAChC,UAAU,GAAG;QACX,uBAAuB,CACrB,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,wBAAwB,EAAE,wBAAwB,GACjD,OAAO,CAAC,iBAAiB,CAAC,CAAA;KAC9B;CACF;AAMD,qBAAa,UAAW,YAAW,IAAI,CAAC,KAAK,CAAC;IAChC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAArC,YAA6B,QAAQ,GAAE,iBAAsB,EAAI;IAE3D,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAmHzD;CACF;AAED,qBAAa,eAAgB,YAAW,IAAI,CAAC,IAAI,CAAC;IACpC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAArC,YAA6B,QAAQ,GAAE,sBAA2B,EAAI;IAEhE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAoCxD;CACF;AAMD;;;;;GAKG;AACH,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,UAAe,GAAG,IAAI,CAGlE;AAID;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,SAAS,CAAC,CAGpF"}
@@ -1,145 +1,111 @@
1
1
  import { using } from '@plugjs/plug';
2
- import { assert } from '@plugjs/plug/asserts';
3
2
  import { Files } from '@plugjs/plug/files';
4
3
  import { ERROR } from '@plugjs/plug/logging';
5
- import { commonPath, getAbsoluteParent, resolveAbsolutePath } from '@plugjs/plug/paths';
6
- import { API, EmitOnly } from 'typescript/unstable/async';
4
+ import { assertAbsolutePath, commonPath, isAbsolutePath } from '@plugjs/plug/paths';
5
+ import { API, DiagnosticCategory } from 'typescript/async';
7
6
  import { convertDiagnostics } from './diagnostics.js';
8
- import { findProjectConfig, findProjectReferences, readProjectConfig, resolveProjectOrder } from './projects.js';
7
+ import { diagnosticDeprecationLevel, emitOnlyOption, findProjectConfig } from './utils.js';
9
8
  /* ========================================================================== *
10
9
  * TYPESCRIPT 7 PLUG IMPLEMENTATION *
11
10
  * ========================================================================== */
12
11
  export class TypeScript {
13
- _emitOnly;
14
- _reportDeprecations;
15
- _projectReferences;
16
- constructor(options = {}) {
17
- const { projectReferences, reportDeprecations, emitOnly } = options;
18
- this._projectReferences = !!projectReferences;
19
- switch (emitOnly) {
20
- // If *none* or *false* we don't emit any files at all
21
- case 'none':
22
- case false:
23
- this._emitOnly = null;
24
- break;
25
- // If *js* we only emit JavaScript files
26
- case 'js':
27
- this._emitOnly = EmitOnly.OnlyJs;
28
- break;
29
- // If *dts* we only emit declaration files
30
- case 'dts':
31
- this._emitOnly = EmitOnly.OnlyDts;
32
- break;
33
- // If *all* or *true* (default) we emit all files
34
- case 'all':
35
- case true:
36
- default:
37
- this._emitOnly = EmitOnly.All;
38
- break;
39
- }
40
- switch (reportDeprecations) {
41
- // If *warn* we report deprecations as warnings
42
- case 'warn':
43
- this._reportDeprecations = 'warn';
44
- break;
45
- // If *off* or *false* we don't report deprecations at all
46
- case 'off':
47
- case false:
48
- this._reportDeprecations = 'off';
49
- break;
50
- // If *notice* or *true* (default) we report deprecations as notices
51
- case 'notice':
52
- case true:
53
- default:
54
- this._reportDeprecations = 'notice';
55
- break;
56
- }
12
+ _options;
13
+ constructor(_options = {}) {
14
+ this._options = _options;
57
15
  }
58
16
  async pipe(files, context) {
17
+ // Convert our options
18
+ const deprecationsLevel = diagnosticDeprecationLevel(this._options.reportDeprecations);
19
+ const emitOnly = emitOnlyOption(this._options.emitOnly);
59
20
  // Create our TypeScript API and report for this plug
60
- const api = new API({ cwd: files.directory });
61
21
  const report = context.log.report('TypeScript Report');
62
22
  // This is the list of emitted files to return to the pipe...
63
23
  const emittedFiles = [];
24
+ let api = undefined;
64
25
  try {
65
- // The list of projects to build (in order) and the snapshot used
66
- // to build them.
67
- let projects;
68
- let snapshot;
69
- // First of all figure out whether we have to build project references
70
- // too or not... This will determine whether we have to resolve them....
71
- if (this._projectReferences) {
72
- // Find all project references for the given configuration files
73
- const projectReferences = await findProjectReferences(api, ...files.absolutePaths());
74
- report.add(...projectReferences.errors);
75
- if (report.errors)
76
- report.done();
77
- // Then determine the build order for all projects and their references
78
- const projectOrder = resolveProjectOrder(projectReferences.projects);
79
- report.add(...projectOrder.errors);
80
- if (report.errors)
81
- report.done();
82
- // At this point, our list of projects to build is the "order"
83
- snapshot = await api.updateSnapshot({ openProjects: projectOrder.order });
84
- projects = [...projectOrder.order];
85
- }
86
- else {
87
- // If we're not building references, then we just build our files
88
- const configs = [...files.absolutePaths()].map(findProjectConfig);
89
- snapshot = await api.updateSnapshot({ openProjects: configs });
90
- projects = [...configs];
91
- // When resolving the project references above, we already processed
92
- // any configuration files and added any errors to the report...
93
- // In this case, we have to do it ourselves by reading each config!
94
- for (const config of configs) {
95
- const { errors } = await readProjectConfig(api, config);
96
- report.add(...errors);
97
- }
98
- // If we have any errors at this point, we can't continue...
99
- if (report.errors)
100
- report.done();
101
- }
26
+ api = new API({ cwd: files.directory });
27
+ // If we're not building references, then we just build our files
28
+ const configs = [...files.absolutePaths()].map(findProjectConfig);
29
+ const snapshot = await api.createSnapshot({ openProjects: configs });
30
+ const projects = snapshot.getProjects();
102
31
  // Now build all projects in the order we determined earlier
103
32
  for (const project of projects) {
104
33
  // Get the actual TypeScript program for this project...
105
- const program = snapshot.getProject(project)?.program;
106
- assert(program, `Project "${project}" not found in snapshot`);
34
+ const program = project.program;
107
35
  // Collect compilation diagnostics for this project (has files)
108
- const diagnostics = await Promise.all([
36
+ const fullDiagnostics = await Promise.all([
109
37
  program.getBindDiagnostics(),
38
+ program.getConfigFileParsingDiagnostics(),
39
+ program.getDeclarationDiagnostics(),
40
+ program.getGlobalDiagnostics(),
41
+ program.getProgramDiagnostics(),
110
42
  program.getSemanticDiagnostics(),
111
- program.getSyntacticDiagnostics(),
112
43
  program.getSuggestionDiagnostics(),
113
- program.getDeclarationDiagnostics(),
44
+ program.getSyntacticDiagnostics(),
114
45
  ]).then((results) => results.flat());
46
+ // Keep a set of external files we can ignore non-critical diags for
47
+ const externalFiles = new Set();
48
+ // Filter out diagnostics that are not relevant for this project
49
+ const now = Date.now();
50
+ const diagnostics = (await Promise.all(fullDiagnostics.map(async (diagnostic) => {
51
+ // Always keep all the errors...
52
+ if (diagnostic.category === DiagnosticCategory.Error)
53
+ return diagnostic;
54
+ // coverage ignore if // Keep diagnostics that do not have an associated file
55
+ if (!diagnostic.fileName)
56
+ return diagnostic;
57
+ // coverage ignore if // Before we do all the async resolution below, check our cache
58
+ if (externalFiles.has(diagnostic.fileName))
59
+ return undefined;
60
+ // Get the source file metadata for this diagnostic (expensive)
61
+ // and filter out anything from external libraries....
62
+ const metadata = await program.getSourceFileMetadata(diagnostic.fileName);
63
+ if (metadata?.isDefaultLibrary || metadata?.isFromExternalLibrary) {
64
+ externalFiles.add(diagnostic.fileName);
65
+ return undefined;
66
+ }
67
+ // Anything else, we keep!
68
+ return diagnostic;
69
+ }))).filter((diagnostic) => !!diagnostic);
70
+ context.log.warn(`Filtered diagnostics in ${Date.now() - now}ms`);
115
71
  // When emitting, let's emit the files
116
- if (this._emitOnly !== null) {
72
+ if (emitOnly !== null) {
117
73
  // Emit the files for this program and collect diagnostics
118
- const emitted = await program.emit(this._emitOnly);
74
+ const emitted = await program.emit(emitOnly);
119
75
  diagnostics.push(...emitted.diagnostics);
120
76
  // Make sure that we add any emitted file to the list to be returned
121
77
  if (emitted.emittedFiles?.length) {
122
- const directory = getAbsoluteParent(project);
123
- const mapper = resolveAbsolutePath.bind(null, directory);
124
- emittedFiles.push(...emitted.emittedFiles.map((file) => mapper(file)));
78
+ emitted.emittedFiles.forEach((file) => {
79
+ assertAbsolutePath(file);
80
+ emittedFiles.push(file);
81
+ });
125
82
  }
126
83
  // Report an error if emitting was skipped for some reason (we should
127
84
  // have some diagnostics associated with this, but still...)
128
85
  // coverage ignore if // don't know how to test this...
129
86
  if (emitted.emitSkipped) {
130
- report.add({
131
- level: ERROR,
132
- message: `Unable to emit files for this project`,
133
- file: project,
134
- });
87
+ if (project.configFileName && isAbsolutePath(project.configFileName)) {
88
+ report.add({
89
+ level: ERROR,
90
+ message: `Unable to emit files for this project`,
91
+ file: project.configFileName,
92
+ });
93
+ }
94
+ else {
95
+ report.add({
96
+ level: ERROR,
97
+ message: `Unable to emit files for unknown project`,
98
+ });
99
+ }
135
100
  }
136
101
  }
137
102
  // Add all diagnostics to the report
138
- report.add(...(await convertDiagnostics(diagnostics, program, this._reportDeprecations)));
103
+ report.add(...convertDiagnostics(diagnostics, deprecationsLevel));
139
104
  }
140
105
  }
141
106
  finally {
142
- await api.close();
107
+ if (api)
108
+ await api.close();
143
109
  }
144
110
  report.done();
145
111
  const outputPath = commonPath(files.directory, ...emittedFiles);
@@ -148,6 +114,47 @@ export class TypeScript {
148
114
  .build();
149
115
  }
150
116
  }
117
+ export class TypeScriptBuild {
118
+ _options;
119
+ constructor(_options = {}) {
120
+ this._options = _options;
121
+ }
122
+ async pipe(files, context) {
123
+ // Destructure the build options for easier access
124
+ const { overrideCompilerOptions = {}, stopBuildOnErrors = false, verbose = true, force = true } = this._options;
125
+ // Create our TypeScript API and report for this plug
126
+ const report = context.log.report('TypeScript Build Report');
127
+ let api = undefined;
128
+ let orchestrator = undefined;
129
+ try {
130
+ api = new API({ cwd: files.directory });
131
+ orchestrator = await api.createBuildOrchestrator([...files.absolutePaths()], {
132
+ cwd: files.directory,
133
+ // From our options
134
+ overrideCompilerOptions,
135
+ stopBuildOnErrors,
136
+ verbose,
137
+ force,
138
+ });
139
+ const results = await orchestrator.build();
140
+ if (results.diagnostics)
141
+ report.add(...convertDiagnostics(results.diagnostics));
142
+ if (results.status !== 0) {
143
+ report.add({
144
+ level: ERROR,
145
+ message: `Build failed with status code ${results.status}`,
146
+ });
147
+ }
148
+ }
149
+ finally {
150
+ if (orchestrator)
151
+ await orchestrator.dispose();
152
+ if (api)
153
+ await api.close();
154
+ }
155
+ report.done();
156
+ }
157
+ }
151
158
  /* ========================================================================== *
152
159
  * TYPESCRIPT 7 HELPERS *
153
160
  * ========================================================================== */
@@ -159,7 +166,7 @@ export class TypeScript {
159
166
  */
160
167
  export function tsc(config, options = {}) {
161
168
  const { directory, ...opts } = options;
162
- return using(config, { directory }).plug(new TypeScript({ ...opts, projectReferences: false }));
169
+ return using(config, { directory }).plug(new TypeScript(opts));
163
170
  }
164
171
  /* ========================================================================== */
165
172
  /**
@@ -169,8 +176,8 @@ export function tsc(config, options = {}) {
169
176
  *
170
177
  * This is roughly equivalent to the command line `tsc --build <config>`.
171
178
  */
172
- export function tsbuild(config, options = {}) {
179
+ export function tsbuild(config, options) {
173
180
  const { directory, ...opts } = options;
174
- return using(config, { directory }).plug(new TypeScript({ ...opts, projectReferences: true }));
181
+ return using(config, { directory }).plug(new TypeScriptBuild(opts));
175
182
  }
176
183
  //# sourceMappingURL=typescript.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"typescript.js","sourceRoot":"","sources":["../src/typescript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACvF,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;A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CAAC;oBACT,KAAK,EAAE,KAAK;oBACZ,OAAO,EAAE,iCAAiC,OAAO,CAAC,MAAM,EAAE;iBAC3D,CAAC,CAAA;YACJ,CAAC;QACH,CAAC;gBAAS,CAAC;YACT,IAAI,YAAY;gBAAE,MAAM,YAAY,CAAC,OAAO,EAAE,CAAA;YAC9C,IAAI,GAAG;gBAAE,MAAM,GAAG,CAAC,KAAK,EAAE,CAAA;QAC5B,CAAC;QAED,MAAM,CAAC,IAAI,EAAE,CAAA;IACf,CAAC;CACF;AAED;;gFAEgF;AAEhF;;;;;GAKG;AACH,MAAM,UAAU,GAAG,CAAC,MAAc,EAAE,OAAO,GAAe,EAAE;IAC1D,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,OAAO,CAAA;IACtC,OAAO,KAAK,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAA;AAChE,CAAC;AAED,gFAAgF;AAEhF;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAAC,MAAc,EAAE,OAAwB;IAC9D,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,OAAO,CAAA;IACtC,OAAO,KAAK,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC,CAAA;AACrE,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { EmitOnly } from 'typescript/async';
2
+ import type { TypeScriptOptions } from './index.ts';
3
+ import type { AbsolutePath } from '@plugjs/plug/paths';
4
+ /**
5
+ * Find the TypeScript project configuration file for a given path.
6
+ *
7
+ * The path specified can be a `tsconfig.json` file name or a directory
8
+ * containing a `tsconfig.json` file.
9
+ *
10
+ * The returned path is the absolute path of the actual `tsconfig.json` file.
11
+ */
12
+ export declare function findProjectConfig(path: AbsolutePath): AbsolutePath;
13
+ /** Convert a diagnostic level option for deprecations into a consistent value. */
14
+ export declare function diagnosticDeprecationLevel(deprecations?: TypeScriptOptions['reportDeprecations']): 'warn' | 'notice' | 'off';
15
+ /** Convert a emit only option into its corresponding enum value. */
16
+ export declare function emitOnlyOption(emitOnly?: TypeScriptOptions['emitOnly']): EmitOnly | null;
17
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAE3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEtD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,YAAY,CAOlE;AAED,kFAAkF;AAClF,wBAAgB,0BAA0B,CACxC,YAAY,CAAC,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,GACrD,MAAM,GAAG,QAAQ,GAAG,KAAK,CAe3B;AAED,oEAAoE;AACpE,wBAAgB,cAAc,CAAC,QAAQ,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,GAAG,QAAQ,GAAG,IAAI,CAkBxF"}