foresthouse 1.1.0-dev.3 → 1.1.1-dev.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.
package/README.md
CHANGED
|
@@ -142,6 +142,122 @@ Common examples:
|
|
|
142
142
|
- `foresthouse deps ./packages/a`
|
|
143
143
|
- `foresthouse deps . --diff origin/dev...HEAD`
|
|
144
144
|
|
|
145
|
+
## Benchmark
|
|
146
|
+
|
|
147
|
+
<details>
|
|
148
|
+
<summary>Environment</summary>
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
+----------+--------------+
|
|
152
|
+
| Metric | Value |
|
|
153
|
+
+----------+--------------+
|
|
154
|
+
| Platform | darwin arm64 |
|
|
155
|
+
| Node | v24.14.0 |
|
|
156
|
+
| CPU | Apple M2 Max |
|
|
157
|
+
| Cores | 12 |
|
|
158
|
+
| Memory | 32.0 GB |
|
|
159
|
+
+----------+--------------+
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
</details>
|
|
163
|
+
|
|
164
|
+
<details>
|
|
165
|
+
<summary><code>foresthouse deps</code></summary>
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
+-----------+---------+-----------------+---------+---------+----------+----------+-------------------------------------------+
|
|
169
|
+
| Target | Options | Project | LOC | Status | Median | P95 | Note |
|
|
170
|
+
+-----------+---------+-----------------+---------+---------+----------+----------+-------------------------------------------+
|
|
171
|
+
| directory | (none) | supabase-studio | 493,979 | ok | 184.37ms | 216.11ms | |
|
|
172
|
+
| directory | (none) | cal-com-web | 218,466 | ok | 182.89ms | 196.84ms | |
|
|
173
|
+
| directory | (none) | outline-app | 87,658 | ok | 171.15ms | 172.83ms | |
|
|
174
|
+
| directory | (none) | dub-web | 345,285 | ok | 181.13ms | 186.52ms | |
|
|
175
|
+
| directory | (none) | commerce | 3,968 | skipped | - | - | Package manifest is missing a valid name. |
|
|
176
|
+
| directory | (none) | formbricks-web | 247,895 | ok | 171.78ms | 181.43ms | |
|
|
177
|
+
| directory | (none) | platforms | 1,308 | skipped | - | - | Package manifest is missing a valid name. |
|
|
178
|
+
| directory | (none) | t3-nextjs | 711 | ok | 173.51ms | 184.11ms | |
|
|
179
|
+
+-----------+---------+-----------------+---------+---------+----------+----------+-------------------------------------------+
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
</details>
|
|
183
|
+
|
|
184
|
+
<details>
|
|
185
|
+
<summary><code>foresthouse import</code></summary>
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
+--------+-----------------+-----------------+---------+--------+-----------+-----------+------+
|
|
189
|
+
| Target | Options | Project | LOC | Status | Median | P95 | Note |
|
|
190
|
+
+--------+-----------------+-----------------+---------+--------+-----------+-----------+------+
|
|
191
|
+
| entry | (none) | supabase-studio | 493,979 | ok | 1014.23ms | 1413.45ms | |
|
|
192
|
+
| entry | --project-only | supabase-studio | 493,979 | ok | 782.13ms | 838.64ms | |
|
|
193
|
+
| entry | --no-workspaces | supabase-studio | 493,979 | ok | 782.02ms | 833.00ms | |
|
|
194
|
+
| entry | (none) | cal-com-web | 218,466 | ok | 1042.08ms | 1109.40ms | |
|
|
195
|
+
| entry | --project-only | cal-com-web | 218,466 | ok | 284.00ms | 426.76ms | |
|
|
196
|
+
| entry | --no-workspaces | cal-com-web | 218,466 | ok | 250.25ms | 320.31ms | |
|
|
197
|
+
| entry | (none) | outline-app | 87,658 | ok | 600.36ms | 840.67ms | |
|
|
198
|
+
| entry | (none) | dub-web | 345,285 | ok | 259.89ms | 309.41ms | |
|
|
199
|
+
| entry | --project-only | dub-web | 345,285 | ok | 253.14ms | 254.04ms | |
|
|
200
|
+
| entry | --no-workspaces | dub-web | 345,285 | ok | 257.75ms | 259.07ms | |
|
|
201
|
+
| entry | (none) | commerce | 3,968 | ok | 199.93ms | 205.46ms | |
|
|
202
|
+
| entry | (none) | formbricks-web | 247,895 | ok | 333.93ms | 405.91ms | |
|
|
203
|
+
| entry | --project-only | formbricks-web | 247,895 | ok | 313.35ms | 342.89ms | |
|
|
204
|
+
| entry | --no-workspaces | formbricks-web | 247,895 | ok | 296.93ms | 355.40ms | |
|
|
205
|
+
| entry | (none) | platforms | 1,308 | ok | 189.81ms | 199.19ms | |
|
|
206
|
+
| entry | (none) | t3-nextjs | 711 | ok | 217.94ms | 247.73ms | |
|
|
207
|
+
| entry | --project-only | t3-nextjs | 711 | ok | 202.47ms | 215.69ms | |
|
|
208
|
+
| entry | --no-workspaces | t3-nextjs | 711 | ok | 200.04ms | 200.67ms | |
|
|
209
|
+
+--------+-----------------+-----------------+---------+--------+-----------+-----------+------+
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
</details>
|
|
213
|
+
|
|
214
|
+
<details>
|
|
215
|
+
<summary><code>foresthouse react</code></summary>
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
+--------+-----------------+-----------------+---------+--------+-----------+-----------+------+
|
|
219
|
+
| Target | Options | Project | LOC | Status | Median | P95 | Note |
|
|
220
|
+
+--------+-----------------+-----------------+---------+--------+-----------+-----------+------+
|
|
221
|
+
| entry | (none) | supabase-studio | 493,979 | ok | 1333.58ms | 1494.41ms | |
|
|
222
|
+
| entry | --project-only | supabase-studio | 493,979 | ok | 996.02ms | 1059.62ms | |
|
|
223
|
+
| entry | --no-workspaces | supabase-studio | 493,979 | ok | 1005.37ms | 1137.48ms | |
|
|
224
|
+
| nextjs | (none) | supabase-studio | 493,979 | ok | 3059.37ms | 3534.34ms | |
|
|
225
|
+
| nextjs | --project-only | supabase-studio | 493,979 | ok | 2602.21ms | 2716.90ms | |
|
|
226
|
+
| nextjs | --no-workspaces | supabase-studio | 493,979 | ok | 2716.09ms | 3007.85ms | |
|
|
227
|
+
| entry | (none) | cal-com-web | 218,466 | ok | 1832.85ms | 1859.41ms | |
|
|
228
|
+
| entry | --project-only | cal-com-web | 218,466 | ok | 244.83ms | 347.60ms | |
|
|
229
|
+
| entry | --no-workspaces | cal-com-web | 218,466 | ok | 242.31ms | 249.87ms | |
|
|
230
|
+
| nextjs | (none) | cal-com-web | 218,466 | ok | 4418.86ms | 5438.14ms | |
|
|
231
|
+
| nextjs | --project-only | cal-com-web | 218,466 | ok | 1400.78ms | 1498.16ms | |
|
|
232
|
+
| nextjs | --no-workspaces | cal-com-web | 218,466 | ok | 1405.46ms | 1452.13ms | |
|
|
233
|
+
| entry | (none) | outline-app | 87,658 | ok | 931.17ms | 946.86ms | |
|
|
234
|
+
| entry | (none) | dub-web | 345,285 | ok | 265.47ms | 273.70ms | |
|
|
235
|
+
| entry | --project-only | dub-web | 345,285 | ok | 266.99ms | 268.79ms | |
|
|
236
|
+
| entry | --no-workspaces | dub-web | 345,285 | ok | 265.71ms | 276.33ms | |
|
|
237
|
+
| nextjs | (none) | dub-web | 345,285 | ok | 1568.90ms | 1964.85ms | |
|
|
238
|
+
| nextjs | --project-only | dub-web | 345,285 | ok | 1589.73ms | 1624.88ms | |
|
|
239
|
+
| nextjs | --no-workspaces | dub-web | 345,285 | ok | 1507.13ms | 1859.47ms | |
|
|
240
|
+
| entry | (none) | commerce | 3,968 | ok | 213.42ms | 218.10ms | |
|
|
241
|
+
| nextjs | (none) | commerce | 3,968 | ok | 222.09ms | 227.03ms | |
|
|
242
|
+
| entry | (none) | formbricks-web | 247,895 | ok | 381.40ms | 391.71ms | |
|
|
243
|
+
| entry | --project-only | formbricks-web | 247,895 | ok | 321.40ms | 331.36ms | |
|
|
244
|
+
| entry | --no-workspaces | formbricks-web | 247,895 | ok | 323.95ms | 327.12ms | |
|
|
245
|
+
| nextjs | (none) | formbricks-web | 247,895 | ok | 1118.63ms | 1303.93ms | |
|
|
246
|
+
| nextjs | --project-only | formbricks-web | 247,895 | ok | 1041.12ms | 1062.49ms | |
|
|
247
|
+
| nextjs | --no-workspaces | formbricks-web | 247,895 | ok | 1055.21ms | 1107.24ms | |
|
|
248
|
+
| entry | (none) | platforms | 1,308 | ok | 201.30ms | 205.59ms | |
|
|
249
|
+
| nextjs | (none) | platforms | 1,308 | ok | 202.98ms | 209.47ms | |
|
|
250
|
+
| entry | (none) | t3-nextjs | 711 | ok | 231.38ms | 234.95ms | |
|
|
251
|
+
| entry | --project-only | t3-nextjs | 711 | ok | 212.96ms | 214.89ms | |
|
|
252
|
+
| entry | --no-workspaces | t3-nextjs | 711 | ok | 212.09ms | 218.98ms | |
|
|
253
|
+
| nextjs | (none) | t3-nextjs | 711 | ok | 232.97ms | 233.53ms | |
|
|
254
|
+
| nextjs | --project-only | t3-nextjs | 711 | ok | 211.67ms | 215.33ms | |
|
|
255
|
+
| nextjs | --no-workspaces | t3-nextjs | 711 | ok | 211.65ms | 215.49ms | |
|
|
256
|
+
+--------+-----------------+-----------------+---------+--------+-----------+-----------+------+
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
</details>
|
|
260
|
+
|
|
145
261
|
## Development
|
|
146
262
|
|
|
147
263
|
```bash
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as printReactUsageTree, c as printPackageDependencyTree, f as analyzeReactUsage, g as analyzePackageDependencies, h as analyzePackageDependencyDiff, i as graphToSerializablePackageTree, m as isSourceCodeFile, n as graphToSerializableTree, o as printDependencyTree, p as analyzeDependencies, r as diffGraphToSerializablePackageTree, s as printPackageDependencyDiffTree, t as graphToSerializableReactTree } from "./react-
|
|
2
|
+
import { a as printReactUsageTree, c as printPackageDependencyTree, f as analyzeReactUsage, g as analyzePackageDependencies, h as analyzePackageDependencyDiff, i as graphToSerializablePackageTree, m as isSourceCodeFile, n as graphToSerializableTree, o as printDependencyTree, p as analyzeDependencies, r as diffGraphToSerializablePackageTree, s as printPackageDependencyDiffTree, t as graphToSerializableReactTree } from "./react-sfQ3TdGw.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import path from "node:path";
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as printReactUsageTree, c as printPackageDependencyTree, d as getReactUsageRoots, f as analyzeReactUsage, g as analyzePackageDependencies, h as analyzePackageDependencyDiff, i as graphToSerializablePackageTree, l as getFilteredUsages, n as graphToSerializableTree, o as printDependencyTree, p as analyzeDependencies, r as diffGraphToSerializablePackageTree, s as printPackageDependencyDiffTree, t as graphToSerializableReactTree, u as getReactUsageEntries } from "./react-
|
|
1
|
+
import { a as printReactUsageTree, c as printPackageDependencyTree, d as getReactUsageRoots, f as analyzeReactUsage, g as analyzePackageDependencies, h as analyzePackageDependencyDiff, i as graphToSerializablePackageTree, l as getFilteredUsages, n as graphToSerializableTree, o as printDependencyTree, p as analyzeDependencies, r as diffGraphToSerializablePackageTree, s as printPackageDependencyDiffTree, t as graphToSerializableReactTree, u as getReactUsageEntries } from "./react-sfQ3TdGw.mjs";
|
|
2
2
|
export { analyzeDependencies, analyzePackageDependencies, analyzePackageDependencyDiff, analyzeReactUsage, diffGraphToSerializablePackageTree, getFilteredUsages, getReactUsageEntries, getReactUsageRoots, graphToSerializablePackageTree, graphToSerializableReactTree, graphToSerializableTree, printDependencyTree, printPackageDependencyDiffTree, printPackageDependencyTree, printReactUsageTree };
|
|
@@ -1536,7 +1536,7 @@ function collectImportsAndExports(statement, sourceDependencies, symbolsByName,
|
|
|
1536
1536
|
collectExportAllBindings(statement, sourceDependencies, exportAllBindings);
|
|
1537
1537
|
return;
|
|
1538
1538
|
case "ExportDefaultDeclaration":
|
|
1539
|
-
collectDefaultExport(statement, symbolsByName, exportsByName);
|
|
1539
|
+
collectDefaultExport(statement, symbolsByName, importsByLocalName, exportsByName, reExportBindingsByName);
|
|
1540
1540
|
return;
|
|
1541
1541
|
default: return;
|
|
1542
1542
|
}
|
|
@@ -1611,14 +1611,19 @@ function collectExportAllBindings(declaration, sourceDependencies, exportAllBind
|
|
|
1611
1611
|
...sourcePath === void 0 ? {} : { sourcePath }
|
|
1612
1612
|
});
|
|
1613
1613
|
}
|
|
1614
|
-
function collectDefaultExport(declaration, symbolsByName, exportsByName) {
|
|
1614
|
+
function collectDefaultExport(declaration, symbolsByName, importsByLocalName, exportsByName, reExportBindingsByName) {
|
|
1615
1615
|
if (declaration.declaration.type === "FunctionDeclaration" || declaration.declaration.type === "FunctionExpression") {
|
|
1616
1616
|
const localName = declaration.declaration.id?.name;
|
|
1617
1617
|
if (localName !== void 0) addExportBinding(localName, "default", symbolsByName, exportsByName);
|
|
1618
1618
|
return;
|
|
1619
1619
|
}
|
|
1620
1620
|
if (declaration.declaration.type === "Identifier") {
|
|
1621
|
-
|
|
1621
|
+
const localName = declaration.declaration.name;
|
|
1622
|
+
addExportBinding(localName, "default", symbolsByName, exportsByName);
|
|
1623
|
+
if (!exportsByName.has("default")) {
|
|
1624
|
+
const importBinding = importsByLocalName.get(localName);
|
|
1625
|
+
if (importBinding !== void 0) reExportBindingsByName.set("default", importBinding);
|
|
1626
|
+
}
|
|
1622
1627
|
return;
|
|
1623
1628
|
}
|
|
1624
1629
|
if (declaration.declaration.type === "ArrowFunctionExpression") addExportBinding("default", "default", symbolsByName, exportsByName);
|
|
@@ -2825,4 +2830,4 @@ function formatReactNodeFilePath(filePath, kind, cwd) {
|
|
|
2825
2830
|
//#endregion
|
|
2826
2831
|
export { printReactUsageTree as a, printPackageDependencyTree as c, getReactUsageRoots as d, analyzeReactUsage as f, analyzePackageDependencies as g, analyzePackageDependencyDiff as h, graphToSerializablePackageTree as i, getFilteredUsages as l, isSourceCodeFile as m, graphToSerializableTree as n, printDependencyTree as o, analyzeDependencies as p, diffGraphToSerializablePackageTree as r, printPackageDependencyDiffTree as s, graphToSerializableReactTree as t, getReactUsageEntries as u };
|
|
2827
2832
|
|
|
2828
|
-
//# sourceMappingURL=react-
|
|
2833
|
+
//# sourceMappingURL=react-sfQ3TdGw.mjs.map
|