un-ts / sh-syntax Goto Github PK
View Code? Open in Web Editor NEWA WASM shell parser and formatter with bash support, based on `mvdan/sh`
License: MIT License
A WASM shell parser and formatter with bash support, based on `mvdan/sh`
License: MIT License
Hello,
Thank you for providing the WASM version of mvdan-sh. Is there a way to obtain the node type?
After updating prettier-plugin-sh from 0.11.0 to 0.12.3 we see issues being reported in files that were ok so far, but when applying to fix, e.g. npx prettier --write .
the reported files appear to be empty.
Noticed here: digitalservicebund/typescript-vite-application-template#60
The repo is public so you should be able to try out.
via un-ts/prettier#182 (comment)
#!/usr/bin/env bash
set -euo pipefail
stage_path="$(dirname "$(realpath -s "$0")")/../../globals.stage"
# git on vercel https://vercel.com/docs/concepts/deployments/build-step#build-image
# check if program does not exist https://stackoverflow.com/a/26759734
# check if in github repo https://stackoverflow.com/a/16925062
if [[ ! -x "$(command -v git)" ]] || [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) != "true" ]]; then
# check if file does not exist https://linuxize.com/post/bash-check-if-file-exists/
if [[ ! -f "globals.stage" ]]; then
if [[ ! -x "$(command -v git)" ]]; then
echo '[stage]: git is not installed.' >&2
exit 1
else
echo '[stage]: not a git repository.' >&2
exit 1
fi
else
stage=$(cat "globals.stage")
# trim newlines https://stackoverflow.com/a/12973694
# trim whitespace https://stackoverflow.com/a/13092379
stage=$(echo "$stage" | xargs)
echo "$stage"
exit 0
fi
fi
# current git branch https://stackoverflow.com/a/1593487
branch_name=$(git symbolic-ref -q HEAD)
branch_name=${branch_name##refs/heads/}
branch_name=${branch_name:-HEAD}
# bash kebab-case https://stackoverflow.com/a/56080830
branch_name=$(echo "$branch_name" \
| sed 's/\([^A-Z]\)\([A-Z0-9]\)/\1-\2/g' \
| sed 's/\([A-Z0-9]\)\([A-Z0-9]\)\([^A-Z]\)/\1-\2\3/g' \
| tr '[:upper:]' '[:lower:]')
monorepo_path="$("$(dirname "$(realpath -s "$0")")/../functions/monorepo_path")"
# extract json key https://unix.stackexchange.com/questions/480481/grep-the-name-from-package-json-file#comment1308267_691616
base_branch="$(grep -o '"baseBranch"\s*:\s*"[^"]*' "$monorepo_path/turbo.json" | grep -o '[^"]*$')"
base_branch="${base_branch##*/}"
# if statement https://www.tutorialkart.com/bash-shell-scripting/bash-else-if/
if [[ "$branch_name" == "production" ]]; then
echo '[stage]: "production" is not a valid branch name' >&2
exit 1
fi
if [[ "$branch_name" == "$base_branch" ]]; then
branch_name="production"
fi
# noclobber https://stackoverflow.com/a/56138414
set -o noclobber
echo "$branch_name" >| "$stage_path"
echo "$branch_name"
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These problems occurred while renovating this repository.
These updates are awaiting their schedule. Click on a checkbox to get an update now.
@vitest/coverage-istanbul
, vitest
).github/workflows/ci.yml
actions/checkout v3
pnpm/action-setup v2
actions/setup-node v3
codecov/codecov-action v3
.github/workflows/codeql.yml
actions/checkout v3
github/codeql-action v2
github/codeql-action v2
github/codeql-action v2
.github/workflows/release.yml
actions/checkout v3
pnpm/action-setup v2
actions/setup-node v3
changesets/action v1
.github/workflows/size-limit.yml
actions/checkout v3
pnpm/action-setup v2
actions/setup-node v3
andresz1/size-limit-action v1
go.mod
go 1.20
github.com/mailru/easyjson v0.7.7
mvdan.cc/sh/v3 v3.6.0
package.json
tslib ^2.6.0
@1stg/lib-config ^12.0.0
@changesets/changelog-github ^0.4.8
@changesets/cli ^2.26.2
@types/golang-wasm-exec ^1.15.0
@types/mvdan-sh ^0.10.2
@types/node ^20.4.0
@types/web ^0.0.103
@vitest/coverage-istanbul ^0.32.4
mitata ^0.1.6
mvdan-sh ^0.10.1
size-limit ^8.2.6
size-limit-preset-node-lib ^0.2.0
synckit ^0.8.5
type-coverage ^2.26.0
typescript ^5.1.6
vitest ^0.32.4
node >=16.0.0
pnpm 8.6.6
.nvmrc
node 18
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.