-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c542112
Showing
302 changed files
with
12,355 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Check http://editorconfig.org for more information | ||
# This is the main config file for this project: | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_size = 4 | ||
end_of_line = lf | ||
|
||
[*.{js,ts,mjs}] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
*.ts linguist-detectable=false | ||
*.mjs linguist-detectable=false | ||
test_data/** linguist-detectable=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
env: | ||
CARGO_INCREMENTAL: 0 | ||
CARGO_TERM_COLOR: "always" | ||
RUST_LOG: "off" | ||
|
||
jobs: | ||
wasm-build: | ||
name: Wasm build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install wasm-pack | ||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
|
||
- name: Build wasm | ||
run: ./crates/lua_fmt/scripts/build.sh | ||
|
||
- name: Upload | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build | ||
path: crates/lua_fmt/pkg | ||
|
||
publish-npm: | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
runs-on: ubuntu-latest | ||
needs: wasm-build | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: build | ||
path: crates/lua_fmt/pkg/ | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".node-version" | ||
registry-url: "https://registry.npmjs.org" | ||
|
||
- name: Publish | ||
working-directory: crates/lua_fmt/pkg | ||
run: npm publish --provenance | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
publish-github: | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
runs-on: ubuntu-latest | ||
needs: wasm-build | ||
permissions: | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: build | ||
path: crates/lua_fmt/pkg/ | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".node-version" | ||
registry-url: "https://npm.pkg.github.com" | ||
|
||
- name: Publish | ||
working-directory: crates/lua_fmt/pkg | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
publish-github-release: | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
runs-on: ubuntu-latest | ||
needs: wasm-build | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: build | ||
path: crates/lua_fmt/pkg/ | ||
|
||
- name: Package | ||
working-directory: crates/lua_fmt/pkg | ||
run: npm pack | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@975c1b265e11dd76618af1c374e7981f9a6ff44a | ||
with: | ||
files: | | ||
crates/*/pkg/*.tgz | ||
crates/*/pkg/*.wasm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
types: ["opened", "reopened", "synchronize"] | ||
|
||
env: | ||
CARGO_INCREMENTAL: 0 | ||
CARGO_TERM_COLOR: "always" | ||
DIFF: 0 | ||
RUST_LOG: "off" | ||
|
||
jobs: | ||
cargo-fmt: | ||
name: Cargo fmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: cargo fmt -- --check | ||
|
||
cargo-clippy: | ||
name: Cargo clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: cargo clippy | ||
|
||
cargo-test: | ||
name: Cargo test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: cargo check | ||
- run: cargo test | ||
|
||
wasm-build: | ||
name: Wasm build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install wasm-pack | ||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
|
||
- name: Build wasm | ||
run: ./crates/lua_fmt/scripts/build.sh | ||
|
||
- run: npm pack | ||
working-directory: crates/lua_fmt/pkg | ||
|
||
- name: Upload | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build | ||
path: crates/lua_fmt/pkg | ||
|
||
node-test: | ||
runs-on: ubuntu-latest | ||
needs: wasm-build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: build | ||
path: crates/lua_fmt/pkg/ | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".node-version" | ||
|
||
- run: node --test | ||
|
||
deno-test: | ||
runs-on: ubuntu-latest | ||
needs: wasm-build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: build | ||
path: crates/lua_fmt/pkg/ | ||
|
||
- uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: v1.x | ||
|
||
- run: deno test --allow-read | ||
|
||
bun-test: | ||
runs-on: ubuntu-latest | ||
needs: wasm-build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: build | ||
path: crates/lua_fmt/pkg/ | ||
|
||
- uses: oven-sh/setup-bun@v1 | ||
name: Install bun | ||
|
||
- run: bun test test_bun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/target | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
20.11.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# group_imports = "StdExternalCrate" | ||
# imports_granularity = "Crate" | ||
reorder_imports = true | ||
use_small_heuristics = "Max" | ||
|
||
# normalize_comments = true | ||
# wrap_comments = true | ||
|
||
# condense_wildcard_suffixes = true | ||
# enum_discrim_align_threshold = 20 | ||
# reorder_impl_items = true | ||
use_field_init_shorthand = true | ||
|
||
# format_code_in_doc_comments = true | ||
# format_macro_matchers = true | ||
# format_strings = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# https://taplo.tamasfe.dev/configuration/formatter-options.html | ||
[formatting] | ||
align_entries = true | ||
indent_tables = true | ||
reorder_keys = true |
Oops, something went wrong.