@hackwaly/task 0.3.9 → 0.3.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hackwaly/task",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
package/src/config.js CHANGED
@@ -26,7 +26,7 @@ export function configInit(importMeta) {
26
26
  const meta = {
27
27
  name: config.name,
28
28
  description: config.description,
29
- cwd: NodePath.resolve(config.cwd ?? ".", dir),
29
+ cwd: NodePath.resolve(dir, config.cwd ?? "."),
30
30
  env: config.env ?? {},
31
31
  inputs: config.inputs ?? ["**/*"],
32
32
  outputs: config.outputs ?? ["**/*"],
package/src/scheduler.js CHANGED
@@ -71,7 +71,7 @@ export async function start(taskChan, options) {
71
71
  }
72
72
  await Promise.allSettled([promise]);
73
73
  }
74
- await task.run({ abort });
74
+ await task.run({ cwd: task.meta.cwd, abort });
75
75
  upToDateSet.add(task);
76
76
  for (const invDep of task.invDeps) {
77
77
  if (pendingSet.has(invDep)) {
package/src/types.d.ts CHANGED
@@ -3,6 +3,7 @@ export interface Command {
3
3
  args: string[];
4
4
  }
5
5
  export interface TaskRunContext {
6
+ cwd: string;
6
7
  abort: AbortSignal;
7
8
  }
8
9
  export interface TaskMeta {