Skip to content

Commit 8195c88

Browse files
authored
Packaging: Additional conditional exports (#451)
1 parent d983a7e commit 8195c88

29 files changed

+251
-124
lines changed

depcheck.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# Run depcheck in all workspaces defined in the monorepo
4+
# make sure depcheck is actually installed with `npm install -g depcheck`
5+
6+
# Define the location of the package.json file
7+
PACKAGE_JSON="./package.json"
8+
9+
# Extract workspace directories from package.json
10+
# This assumes workspaces are defined under "workspaces" and are in a simple list format
11+
WORKSPACES=$(jq -r '.workspaces[]' $PACKAGE_JSON)
12+
13+
# Loop through each workspace directory and run depcheck
14+
for WORKSPACE in $WORKSPACES; do
15+
echo "Running depcheck in workspace: $WORKSPACE"
16+
(cd $WORKSPACE && npx depcheck --skip-missing)
17+
done

examples/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@
4848
},
4949
"devDependencies": {
5050
"dotenv": "^16.3.1",
51-
"tsx": "^4.7.0",
52-
"algosdk": "^2.7.0"
51+
"tsx": "^4.7.0"
5352
},
5453
"dependencies": {
5554
"@wormhole-foundation/sdk": "0.5.2"

0 commit comments

Comments
 (0)