@dotcom-tool-kit/typescript 3.0.2 → 3.1.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,8 +1,8 @@
1
- import { Task } from '@dotcom-tool-kit/base';
1
+ import { Task, TaskRunContext } from '@dotcom-tool-kit/base';
2
2
  import type { TypeScriptSchema } from '@dotcom-tool-kit/schemas/lib/tasks/typescript';
3
3
  export default class TypeScript extends Task<{
4
4
  task: typeof TypeScriptSchema;
5
5
  }> {
6
- run(): Promise<void>;
6
+ run({ cwd }: TaskRunContext): Promise<void>;
7
7
  }
8
8
  //# sourceMappingURL=typescript.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/tasks/typescript.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAA;AAKrF,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,IAAI,CAAC;IAAE,IAAI,EAAE,OAAO,gBAAgB,CAAA;CAAE,CAAC;IACvE,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA+B3B"}
1
+ {"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/tasks/typescript.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAA;AAKrF,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,IAAI,CAAC;IAAE,IAAI,EAAE,OAAO,gBAAgB,CAAA;CAAE,CAAC;IACvE,GAAG,CAAC,EAAC,GAAG,EAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CA+BhD"}
@@ -5,7 +5,7 @@ const base_1 = require("@dotcom-tool-kit/base");
5
5
  const child_process_1 = require("child_process");
6
6
  const tscPath = require.resolve('typescript/bin/tsc');
7
7
  class TypeScript extends base_1.Task {
8
- async run() {
8
+ async run({ cwd }) {
9
9
  const args = [];
10
10
  // TODO:KB:20240408 refactor this
11
11
  if (this.options.build) {
@@ -20,7 +20,7 @@ class TypeScript extends base_1.Task {
20
20
  if (this.options.configPath) {
21
21
  args.push('--project', this.options.configPath);
22
22
  }
23
- const child = (0, child_process_1.fork)(tscPath, args, { silent: true });
23
+ const child = (0, child_process_1.fork)(tscPath, args, { silent: true, cwd });
24
24
  (0, logger_1.hookFork)(this.logger, 'typescript', child);
25
25
  const exitPromise = (0, logger_1.waitOnExit)('typescript', child);
26
26
  // don't wait for tsc to exit if it's set to watch for file changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotcom-tool-kit/typescript",
3
- "version": "3.0.2",
3
+ "version": "3.1.0",
4
4
  "description": "",
5
5
  "main": "lib",
6
6
  "scripts": {
@@ -25,11 +25,11 @@
25
25
  "typescript": "3.x || 4.x || 5.x"
26
26
  },
27
27
  "dependencies": {
28
- "@dotcom-tool-kit/base": "^1.0.0",
29
- "@dotcom-tool-kit/logger": "^4.0.0"
28
+ "@dotcom-tool-kit/base": "^1.1.0",
29
+ "@dotcom-tool-kit/logger": "^4.0.1"
30
30
  },
31
31
  "devDependencies": {
32
- "@dotcom-tool-kit/schemas": "^1.1.1",
32
+ "@dotcom-tool-kit/schemas": "^1.2.0",
33
33
  "@jest/globals": "^29.3.1",
34
34
  "typescript": "^4.9.4",
35
35
  "winston": "^3.8.2"