@alexaegis/turbowatch 0.7.0 → 0.7.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.
Files changed (3) hide show
  1. package/index.cjs +12 -2
  2. package/index.js +12 -2
  3. package/package.json +5 -5
package/index.cjs CHANGED
@@ -36,11 +36,14 @@ const turbowatchLocalNodeModules = async (rawOptions) => {
36
36
  ];
37
37
  const commonIgnoredDirs = [
38
38
  ["dirname", "dist"],
39
+ ["dirname", "out"],
40
+ ["dirname", "build"],
41
+ ["dirname", "coverage"],
39
42
  ["dirname", ".turbo"],
40
43
  ["dirname", ".vercel"],
41
44
  ["dirname", ".cache"],
42
- ["dirname", "coverage"],
43
- ["dirname", "build"],
45
+ ["dirname", ".svelte-kit"],
46
+ ["dirname", ".next"],
44
47
  ["match", "vite(st)?.config.*"]
45
48
  ];
46
49
  if (!options.deep) {
@@ -74,9 +77,11 @@ const turbowatchLocalNodeModules = async (rawOptions) => {
74
77
  });
75
78
  };
76
79
  let spawnedOnFirstBuild;
80
+ const abortController = new AbortController();
77
81
  return {
78
82
  project: currentPackagesNodeModulesPath,
79
83
  debounce: { wait: 50 },
84
+ abortController,
80
85
  triggers: [
81
86
  {
82
87
  expression: watchExpression,
@@ -89,6 +94,11 @@ const turbowatchLocalNodeModules = async (rawOptions) => {
89
94
  await spawn2`${options.packageManagerCommand} run ${options.buildDependenciesScript}`;
90
95
  if (changeCount < 1) {
91
96
  spawnedOnFirstBuild = options.onFirstBuild ? options.onFirstBuild() : startCommand();
97
+ if (spawnedOnFirstBuild) {
98
+ spawnedOnFirstBuild.on("exit", () => {
99
+ abortController.abort("onFirstBuild command exited!");
100
+ });
101
+ }
92
102
  }
93
103
  changeCount++;
94
104
  },
package/index.js CHANGED
@@ -34,11 +34,14 @@ const turbowatchLocalNodeModules = async (rawOptions) => {
34
34
  ];
35
35
  const commonIgnoredDirs = [
36
36
  ["dirname", "dist"],
37
+ ["dirname", "out"],
38
+ ["dirname", "build"],
39
+ ["dirname", "coverage"],
37
40
  ["dirname", ".turbo"],
38
41
  ["dirname", ".vercel"],
39
42
  ["dirname", ".cache"],
40
- ["dirname", "coverage"],
41
- ["dirname", "build"],
43
+ ["dirname", ".svelte-kit"],
44
+ ["dirname", ".next"],
42
45
  ["match", "vite(st)?.config.*"]
43
46
  ];
44
47
  if (!options.deep) {
@@ -72,9 +75,11 @@ const turbowatchLocalNodeModules = async (rawOptions) => {
72
75
  });
73
76
  };
74
77
  let spawnedOnFirstBuild;
78
+ const abortController = new AbortController();
75
79
  return {
76
80
  project: currentPackagesNodeModulesPath,
77
81
  debounce: { wait: 50 },
82
+ abortController,
78
83
  triggers: [
79
84
  {
80
85
  expression: watchExpression,
@@ -87,6 +92,11 @@ const turbowatchLocalNodeModules = async (rawOptions) => {
87
92
  await spawn2`${options.packageManagerCommand} run ${options.buildDependenciesScript}`;
88
93
  if (changeCount < 1) {
89
94
  spawnedOnFirstBuild = options.onFirstBuild ? options.onFirstBuild() : startCommand();
95
+ if (spawnedOnFirstBuild) {
96
+ spawnedOnFirstBuild.on("exit", () => {
97
+ abortController.abort("onFirstBuild command exited!");
98
+ });
99
+ }
90
100
  }
91
101
  changeCount++;
92
102
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alexaegis/turbowatch",
3
3
  "description": "A turbowatch configuration to watch local dependencies through node_modules",
4
- "version": "0.7.0",
4
+ "version": "0.7.1",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "archetype": {
@@ -60,10 +60,10 @@
60
60
  "@alexaegis/workspace-tools": "^0.6.1"
61
61
  },
62
62
  "devDependencies": {
63
- "@alexaegis/eslint-config-vitest": "^0.7.0",
64
- "@alexaegis/ts": "^0.7.0",
65
- "@alexaegis/vite": "^0.7.0",
66
- "@alexaegis/vitest": "^0.7.0",
63
+ "@alexaegis/eslint-config-vitest": "^0.7.1",
64
+ "@alexaegis/ts": "^0.7.1",
65
+ "@alexaegis/vite": "^0.7.1",
66
+ "@alexaegis/vitest": "^0.7.1",
67
67
  "@types/node": "^20.4.6",
68
68
  "publint": "^0.2.0",
69
69
  "turbowatch": "^2.29.4",