Skip to content

Commit

Permalink
Updates from upstream.
Browse files Browse the repository at this point in the history
  • Loading branch information
danfuzz committed Sep 28, 2023
1 parent f9df432 commit 07a835e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion scripts/lib/bashy-basics/buildy/ls-files
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ for i in "${!paths[@]}"; do
continue
}

if [[ ! (${newPath} =~ ^"${baseDir}/") ]]; then
if [[ ! ((${newPath} =~ ^"${baseDir}/") || (${newPath} == ${baseDir})) ]]; then
error-msg "Not a project path: ${p}"
error=1
fi
Expand Down
16 changes: 9 additions & 7 deletions scripts/lib/bashy-node/node-project/fix-package-json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ WRANGLER_AWK=$'
$0 = from;
if (from ~ /^@this\//) {
deps[from] = 1;
#print from;
}
}
Expand Down Expand Up @@ -79,11 +78,14 @@ function get-deps {
local files

files=($(
find "${srcDir}" \
'(' -type d -name tests -prune ')' \
-o -name '*.js' -print
))
awk "${WRANGLER_AWK}" "${files[@]}"
lib buildy ls-files --output=lines --include='\.js$' "${srcDir}"
)) \
|| return "$?"

if (( ${#files[@]} != 0 )); then
awk "${WRANGLER_AWK}" "${files[@]}" \
|| return "$?"
fi
}

# Runs the fixer on the given file.
Expand Down Expand Up @@ -118,7 +120,7 @@ function do-fix {
version: .version,
type: "module",
private: true,
license: "Apache-2.0",
license: (.license // "UNLICENSED"),
BLANK_LINE_1: "",
exports: "./index.js",
imports: {
Expand Down

0 comments on commit 07a835e

Please sign in to comment.