@meistrari/mise-en-place 1.1.1 → 1.2.0-beta3

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/Makefile CHANGED
@@ -1,22 +1,2 @@
1
- .PHONY: default
2
- default: help
1
+ include ./node_modules/@meistrari/mise-en-place/Makefile
3
2
 
4
- MISE_EN_PLACE_PACKAGE_NAME = @meistrari/mise-en-place
5
-
6
- ## Public commands
7
-
8
- .editorconfig: ./node_modules/$(MISE_EN_PLACE_PACKAGE_NAME)/.editorconfig ## Copy/update .editorconfig file from @meistrari/mise-en-place package
9
- @cp ./node_modules/$(MISE_EN_PLACE_PACKAGE_NAME)/.editorconfig .editorconfig
10
-
11
- .PHONY: mise-en-place
12
- mise-en-place: .editorconfig ## Setup the mise en place to start cooking
13
- @echo "export { default } from '$(MISE_EN_PLACE_PACKAGE_NAME)/eslint'" > eslint.config.mjs
14
- @echo "Mise en place is ready! 🍳"
15
-
16
- ## Hidden commands
17
-
18
- .PHONY: help
19
- help:
20
- @echo "Make tasks:"
21
- @grep -hE '^[%a-zA-Z_-]+:.*?## .*$$' Makefile ./node_modules/$(MISE_EN_PLACE_PACKAGE_NAME)/Makefile | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m %-17s\033[0m %s\n", $$1, $$2}'
22
- @echo ""
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@meistrari/mise-en-place",
3
- "version": "1.1.1",
3
+ "version": "1.2.0-beta3",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/meistrari/mise-en-place.git"
8
8
  },
9
9
  "scripts": {
10
- "postinstall": "test -f Makefile || echo 'include ./node_modules/@meistrari/mise-en-place/Makefile' > Makefile",
10
+ "postinstall": "./postinstall.sh",
11
11
  "build": "unbuild"
12
12
  },
13
13
  "exports": {
@@ -20,7 +20,8 @@
20
20
  "dist",
21
21
  "Makefile",
22
22
  ".editorconfig",
23
- "tsconfig.json"
23
+ "tsconfig.json",
24
+ "postinstall.sh"
24
25
  ],
25
26
  "keywords": [],
26
27
  "author": "",
package/postinstall.sh ADDED
@@ -0,0 +1,37 @@
1
+ #!/bin/sh
2
+
3
+ if [ test -f Makefile ]; then
4
+ echo 'Makefile already exists. Skipping initial Makefile generation'
5
+ else
6
+ echo 'No Makefile found. Generating one that includes mise-en-place Makefile.'
7
+ echo 'include ./node_modules/@meistrari/mise-en-place/Makefile\n' > Makefile
8
+ fi
9
+
10
+ WORKSPACE_PATTERNS=$(jq -r '.workspaces[]? // empty' package.json 2>/dev/null)
11
+
12
+ # If workspaces exist, find package.json files matching the patterns, otherwise just use root
13
+ if [ -n "$WORKSPACE_PATTERNS" ]; then
14
+ PACKAGE_JSONS="package.json"
15
+ for pattern in $WORKSPACE_PATTERNS; do
16
+ # Use find with the workspace pattern (e.g., "packages/*" becomes "packages/*/package.json")
17
+ PACKAGE_JSONS="$PACKAGE_JSONS $(find $pattern -maxdepth 1 -name "package.json" 2>/dev/null)"
18
+ done
19
+ echo "Found workspace package.json files: $PACKAGE_JSONS"
20
+ MEISTRARI_LIBS_LIST=$(echo "$PACKAGE_JSONS" | xargs jq -r '(.dependencies // {}, .devDependencies // {}) | keys[] | select(startswith("@meistrari/"))' 2>/dev/null | sort -u)
21
+ else
22
+ # No workspaces, just check root package.json
23
+ MEISTRARI_LIBS_LIST=$(jq -r '(.dependencies // {}, .devDependencies // {}) | keys[] | select(startswith("@meistrari/"))' package.json 2>/dev/null | sort -u)
24
+ fi
25
+
26
+ log_header () {
27
+ echo "File '$1' present. Updating @meistrari/* libraries..."
28
+ }
29
+
30
+ if [ -n "$MEISTRARI_LIBS_LIST" ]; then
31
+ test -f pnpm-lock.yaml && (log_header "pnpm-lock.yaml" && pnpm update $MEISTRARI_LIBS_LIST --ignore-scripts -r)
32
+ test -f bun.lock && (log_header "bun.lock" && bun update $MEISTRARI_LIBS_LIST --ignore-scripts -r)
33
+ test -f bun.lockb && (log_header "bun.lockb" && bun update $MEISTRARI_LIBS_LIST --ignore-scripts -r)
34
+ test -f package-lock.json && (log_header "package-lock.json" && npm update $MEISTRARI_LIBS_LIST --ignore-scripts)
35
+ test -f yarn.lock && (log_header "yarn.lock" && yarn up $MEISTRARI_LIBS_LIST --ignore-scripts)
36
+ fi
37
+
package/tsconfig.json CHANGED
@@ -13,5 +13,8 @@
13
13
  "noUnusedParameters": true,
14
14
 
15
15
  "skipLibCheck": true
16
- }
16
+ },
17
+ "exclude": [
18
+ "*.stories.ts"
19
+ ]
17
20
  }