@jterrazz/typescript 4.3.0 → 4.3.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.
Files changed (2) hide show
  1. package/bin/typescript.sh +17 -6
  2. package/package.json +1 -1
package/bin/typescript.sh CHANGED
@@ -27,12 +27,23 @@ done
27
27
  SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_PATH")" && pwd)"
28
28
  PACKAGE_ROOT="$SCRIPT_DIR/.."
29
29
 
30
- # Use binaries from the package's node_modules
31
- ROLLDOWN="$PACKAGE_ROOT/node_modules/.bin/rolldown"
32
- NODEMON="$PACKAGE_ROOT/node_modules/.bin/nodemon"
33
-
34
- # Add package's node_modules/.bin to PATH so plugins can find binaries like tsgo
35
- export PATH="$PACKAGE_ROOT/node_modules/.bin:$PATH"
30
+ # Find binaries - check package's node_modules first, then project's (handles npm hoisting)
31
+ find_binary() {
32
+ local name="$1"
33
+ if [ -x "$PACKAGE_ROOT/node_modules/.bin/$name" ]; then
34
+ echo "$PACKAGE_ROOT/node_modules/.bin/$name"
35
+ elif [ -x "$PROJECT_ROOT/node_modules/.bin/$name" ]; then
36
+ echo "$PROJECT_ROOT/node_modules/.bin/$name"
37
+ else
38
+ echo "$name" # Fallback to PATH
39
+ fi
40
+ }
41
+
42
+ ROLLDOWN=$(find_binary rolldown)
43
+ NODEMON=$(find_binary nodemon)
44
+
45
+ # Add both bin directories to PATH so plugins can find binaries like tsgo
46
+ export PATH="$PACKAGE_ROOT/node_modules/.bin:$PROJECT_ROOT/node_modules/.bin:$PATH"
36
47
 
37
48
  # Parse command
38
49
  COMMAND="$1"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jterrazz/typescript",
3
- "version": "4.3.0",
3
+ "version": "4.3.1",
4
4
  "author": "Jean-Baptiste Terrazzoni <contact@jterrazz.com>",
5
5
  "bin": {
6
6
  "typescript": "bin/typescript.sh"