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

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,2 +1,22 @@
1
- include ./node_modules/@meistrari/mise-en-place/Makefile
1
+ .PHONY: default
2
+ default: help
2
3
 
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/dist/cli.d.mts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { };
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { };
package/dist/cli.mjs ADDED
@@ -0,0 +1,9 @@
1
+ import { execSync } from 'node:child_process';
2
+ import { argv } from 'node:process';
3
+
4
+ const [command] = argv.slice(2);
5
+ if (command === "postinstall") {
6
+ execSync("sh ./scripts/postinstall.sh", { stdio: "inherit" });
7
+ process.exit(0);
8
+ }
9
+ throw new Error(`Unknown command: ${command}`);
package/package.json CHANGED
@@ -1,15 +1,17 @@
1
1
  {
2
2
  "name": "@meistrari/mise-en-place",
3
- "version": "1.2.0-beta3",
3
+ "version": "1.2.0-beta5",
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": "./postinstall.sh",
11
10
  "build": "unbuild"
12
11
  },
12
+ "bin": {
13
+ "mise-en-place": "dist/cli.mjs"
14
+ },
13
15
  "exports": {
14
16
  "./eslint": {
15
17
  "types": "./dist/eslint.d.ts",
@@ -21,7 +23,7 @@
21
23
  "Makefile",
22
24
  ".editorconfig",
23
25
  "tsconfig.json",
24
- "postinstall.sh"
26
+ "scripts"
25
27
  ],
26
28
  "keywords": [],
27
29
  "author": "",
@@ -38,6 +40,7 @@
38
40
  "eslint-plugin-drizzle": "0.2.3"
39
41
  },
40
42
  "devDependencies": {
43
+ "@types/node": "24.10.1",
41
44
  "unbuild": "3.6.1"
42
45
  }
43
46
  }
@@ -1,13 +1,14 @@
1
1
  #!/bin/sh
2
2
 
3
- if [ test -f Makefile ]; then
3
+ if test -f Makefile; then
4
4
  echo 'Makefile already exists. Skipping initial Makefile generation'
5
5
  else
6
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
7
+ echo 'include ./node_modules/@meistrari/mise-en-place/Makefile' > Makefile
8
8
  fi
9
9
 
10
10
  WORKSPACE_PATTERNS=$(jq -r '.workspaces[]? // empty' package.json 2>/dev/null)
11
+ JQ_EXPRESSION='(.dependencies // {}, .devDependencies // {}) | keys[] | select(startswith("@meistrari/"))'
11
12
 
12
13
  # If workspaces exist, find package.json files matching the patterns, otherwise just use root
13
14
  if [ -n "$WORKSPACE_PATTERNS" ]; then
@@ -17,10 +18,10 @@ if [ -n "$WORKSPACE_PATTERNS" ]; then
17
18
  PACKAGE_JSONS="$PACKAGE_JSONS $(find $pattern -maxdepth 1 -name "package.json" 2>/dev/null)"
18
19
  done
19
20
  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
+ MEISTRARI_LIBS_LIST=$(echo "$PACKAGE_JSONS" | xargs jq -r "$JQ_EXPRESSION" 2>/dev/null | sort -u)
21
22
  else
22
23
  # 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
+ MEISTRARI_LIBS_LIST=$(jq -r "$JQ_EXPRESSION" package.json 2>/dev/null | sort -u)
24
25
  fi
25
26
 
26
27
  log_header () {
@@ -33,5 +34,7 @@ if [ -n "$MEISTRARI_LIBS_LIST" ]; then
33
34
  test -f bun.lockb && (log_header "bun.lockb" && bun update $MEISTRARI_LIBS_LIST --ignore-scripts -r)
34
35
  test -f package-lock.json && (log_header "package-lock.json" && npm update $MEISTRARI_LIBS_LIST --ignore-scripts)
35
36
  test -f yarn.lock && (log_header "yarn.lock" && yarn up $MEISTRARI_LIBS_LIST --ignore-scripts)
37
+ else
38
+ echo "No @meistrari/* libraries found in dependencies. Skipping update."
36
39
  fi
37
40