@meistrari/mise-en-place 2.4.0 → 2.4.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/package.json +1 -1
- package/scripts/postinstall.sh +16 -3
package/package.json
CHANGED
package/scripts/postinstall.sh
CHANGED
|
@@ -12,9 +12,9 @@ make mise-en-place
|
|
|
12
12
|
WORKSPACE_PATTERNS=$(jq -r '.workspaces[]? // empty' package.json 2>/dev/null)
|
|
13
13
|
JQ_EXPRESSION='(.dependencies // {}, .devDependencies // {}) | keys[] | select(startswith("@meistrari/"))'
|
|
14
14
|
|
|
15
|
+
PACKAGE_JSONS="./package.json"
|
|
15
16
|
# If workspaces exist, find package.json files matching the patterns, otherwise just use root
|
|
16
17
|
if [ -n "$WORKSPACE_PATTERNS" ]; then
|
|
17
|
-
PACKAGE_JSONS="package.json"
|
|
18
18
|
for pattern in $WORKSPACE_PATTERNS; do
|
|
19
19
|
# Use find with the workspace pattern (e.g., "packages/*" becomes "packages/*/package.json")
|
|
20
20
|
PACKAGE_JSONS="$PACKAGE_JSONS $(find $pattern -maxdepth 1 -name "package.json" 2>/dev/null)"
|
|
@@ -38,15 +38,29 @@ if [ -n "$MEISTRARI_LIBS_LIST" ]; then
|
|
|
38
38
|
if test -f pnpm-lock.yaml; then
|
|
39
39
|
log_header "pnpm-lock.yaml"
|
|
40
40
|
pnpm update $MEISTRARI_LIBS_LIST --ignore-scripts -r
|
|
41
|
+
|
|
41
42
|
elif test -f bun.lock || test -f bun.lockb; then
|
|
42
43
|
log_header "bun.lock or bun.lockb"
|
|
43
|
-
|
|
44
|
+
|
|
45
|
+
for pkg_json in $PACKAGE_JSONS; do
|
|
46
|
+
PKG_JSON_DIR=$(dirname "$pkg_json")
|
|
47
|
+
cd "$PKG_JSON_DIR"
|
|
48
|
+
MEISTRARI_LIBS_LIST_LOCAL_DIR=$(jq -r "$JQ_EXPRESSION" package.json 2>/dev/null | sort -u)
|
|
49
|
+
|
|
50
|
+
echo "Updating $MEISTRARI_LIBS_LIST_LOCAL_DIR libraries in $PKG_JSON_DIR"
|
|
51
|
+
|
|
52
|
+
bun update --silent $MEISTRARI_LIBS_LIST_LOCAL_DIR --ignore-scripts
|
|
53
|
+
cd - > /dev/null
|
|
54
|
+
done
|
|
55
|
+
|
|
44
56
|
elif test -f yarn.lock; then
|
|
45
57
|
log_header "yarn.lock"
|
|
46
58
|
yarn up $MEISTRARI_LIBS_LIST --ignore-scripts -r
|
|
59
|
+
|
|
47
60
|
elif test -f package-lock.json; then
|
|
48
61
|
log_header "package-lock.json"
|
|
49
62
|
npm update $MEISTRARI_LIBS_LIST --ignore-scripts
|
|
63
|
+
|
|
50
64
|
else
|
|
51
65
|
echo "No recognized lock file found (pnpm-lock.yaml, yarn.lock, package-lock.json)"
|
|
52
66
|
exit 1
|
|
@@ -54,4 +68,3 @@ if [ -n "$MEISTRARI_LIBS_LIST" ]; then
|
|
|
54
68
|
else
|
|
55
69
|
echo "No @meistrari/* libraries found in dependencies. Skipping update."
|
|
56
70
|
fi
|
|
57
|
-
|