Skip to content

Commit

Permalink
Merge branch 'master' into unicode-script
Browse files Browse the repository at this point in the history
  • Loading branch information
elijah-potter committed Jan 28, 2025
2 parents c44905a + 8212d58 commit 3aabf9c
Show file tree
Hide file tree
Showing 35 changed files with 718 additions and 316 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ updates:
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/packages"
schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/build_harper_binaries.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: Build Binaries

on:
push:
Expand Down
118 changes: 118 additions & 0 deletions .github/workflows/release_harper_binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Release Binaries

on:
push:
tags:
- "v*"

jobs:
release:
name: Release ${{ matrix.platform.project }} - ${{ matrix.platform.release_for }}
if: github.event.pull_request.draft == false
strategy:
matrix:
platform:
- release_for: Windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
project: harper-ls
bin: harper-ls.exe
name: harper-ls-x86_64-pc-windows-msvc.zip
command: build
- release_for: macOS-x86_64
os: macOS-latest
target: x86_64-apple-darwin
project: harper-ls
bin: harper-ls
name: harper-ls-x86_64-apple-darwin.tar.gz
command: build
- release_for: macOS-aarch64
os: macOS-latest
target: aarch64-apple-darwin
project: harper-ls
bin: harper-ls
name: harper-ls-aarch64-apple-darwin.tar.gz
command: build
- release_for: Linux-x86_64-GNU
os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
project: harper-ls
bin: harper-ls
name: harper-ls-x86_64-unknown-linux-gnu.tar.gz
command: build
- release_for: Linux-aarch64-GNU
os: ubuntu-20.04
target: aarch64-unknown-linux-gnu
project: harper-ls
bin: harper-ls
name: harper-ls-aarch64-unknown-linux-gnu.tar.gz
command: build

- release_for: Windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
project: harper-cli
bin: harper-cli.exe
name: harper-cli-x86_64-pc-windows-msvc.zip
command: build
- release_for: macOS-x86_64
os: macOS-latest
target: x86_64-apple-darwin
project: harper-cli
bin: harper-cli
name: harper-cli-x86_64-apple-darwin.tar.gz
command: build
- release_for: macOS-aarch64
os: macOS-latest
target: aarch64-apple-darwin
project: harper-cli
bin: harper-cli
name: harper-cli-aarch64-apple-darwin.tar.gz
command: build
- release_for: Linux-x86_64-GNU
os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
project: harper-cli
bin: harper-cli
name: harper-cli-x86_64-unknown-linux-gnu.tar.gz
command: build
- release_for: Linux-aarch64-GNU
os: ubuntu-20.04
target: aarch64-unknown-linux-gnu
project: harper-cli
bin: harper-cli
name: harper-cli-aarch64-unknown-linux-gnu.tar.gz
command: build

runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: ${{ matrix.platform.command }}
target: ${{ matrix.platform.target }}
args: "--locked --release --bin ${{ matrix.platform.project }}"
strip: true
- name: Package as archive
shell: bash
run: |
cd target/${{ matrix.platform.target }}/release
if [[ "${{ matrix.platform.os }}" == "windows-latest" ]]; then
7z a ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
else
tar czvf ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
fi
cd -
- uses: ncipollo/release-action@v1
with:
artifacts: ${{ matrix.platform.name }}
allowUpdates: true
draft: true
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform.bin }}-${{ matrix.platform.target }}
path: ${{ matrix.platform.name }}

77 changes: 77 additions & 0 deletions .github/workflows/release_vscode_plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Release VS Code Plugin

on:
push:
tags:
- "v*"

jobs:
package:
name: Package - ${{ matrix.platform.code_target }}
if: github.event.pull_request.draft == false
strategy:
matrix:
platform:
- os: windows-latest
rust_target: x86_64-pc-windows-msvc
code_target: win32-x64
- os: macOS-latest
rust_target: x86_64-apple-darwin
code_target: darwin-x64
- os: macOS-latest
rust_target: aarch64-apple-darwin
code_target: darwin-arm64
- os: ubuntu-20.04
rust_target: x86_64-unknown-linux-gnu
code_target: linux-x64
- os: ubuntu-20.04
rust_target: aarch64-unknown-linux-gnu
code_target: linux-arm64
runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Build harper-ls
uses: houseabsolute/actions-rust-cross@v0
with:
target: ${{ matrix.platform.rust_target }}
args: "--locked --release --bin harper-ls"
strip: true
- name: Package extension
id: package_extension
shell: bash
run: |
bin_dir="packages/vscode-plugin/bin"
release_dir="target/${{ matrix.platform.rust_target }}/release"
mkdir "$bin_dir"
if [[ "${{ matrix.platform.os }}" == "windows-latest" ]]; then
cp "${release_dir}/harper-ls.exe" "$bin_dir"
else
cp "${release_dir}/harper-ls" "$bin_dir"
fi
just package-vscode ${{ matrix.platform.code_target }}
echo artifact=$(echo packages/vscode-plugin/*.vsix) >> $GITHUB_OUTPUT
- uses: ncipollo/release-action@v1
with:
artifacts: "./packages/vscode-plugin/*.vsix"
allowUpdates: true
draft: true
- name: Publish to OpenVSX
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
packagePath: "./packages/vscode-plugin/"
extensionFile: ${{ steps.package_extension.outputs.artifact }}
- name: Publish to the Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
packagePath: "./packages/vscode-plugin/"
extensionFile: ${{ steps.package_extension.outputs.artifact }}
registryUrl: https://marketplace.visualstudio.com
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions harper-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ repository = "https://github.com/automattic/harper"
anyhow = "1.0.95"
ariadne = "0.4.1"
clap = { version = "4.5.27", features = ["derive"] }
harper-literate-haskell = { path = "../harper-literate-haskell", version = "0.17.0" }
harper-core = { path = "../harper-core", version = "0.17.0" }
harper-comments = { path = "../harper-comments", version = "0.17.0" }
harper-typst = { path = "../harper-typst", version = "0.17.0" }
harper-literate-haskell = { path = "../harper-literate-haskell", version = "0.18.0" }
harper-core = { path = "../harper-core", version = "0.18.0" }
harper-comments = { path = "../harper-comments", version = "0.18.0" }
harper-typst = { path = "../harper-typst", version = "0.18.0" }
serde = { version = "1.0.214", features = ["derive"] }
serde_json = "1.0.137"

Expand Down
8 changes: 4 additions & 4 deletions harper-comments/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "harper-comments"
version = "0.17.0"
version = "0.18.0"
edition = "2021"
description = "The language checker for developers."
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/automattic/harper"

[dependencies]
harper-core = { path = "../harper-core", version = "0.17.0" }
harper-html = { path = "../harper-html", version = "0.17.0" }
harper-tree-sitter = { path = "../harper-tree-sitter", version = "0.17.0" }
harper-core = { path = "../harper-core", version = "0.18.0" }
harper-html = { path = "../harper-html", version = "0.18.0" }
harper-tree-sitter = { path = "../harper-tree-sitter", version = "0.18.0" }
tree-sitter = "0.20.10"
tree-sitter-rust = "0.20.4"
tree-sitter-typescript = "0.20.3"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Below, we have situation where the line terminates and should end the sentence.
-- Below, we have a situation where the line terminates and should end the sentence.

local alphabet = {
[1] = "a", -- This is a test
Expand Down
2 changes: 1 addition & 1 deletion harper-comments/tests/language_support_sources/issue_96.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Below, we have situation where the line terminates and should end the sentence.
# Below, we have a situation where the line terminates and should end the sentence.

alphabet = [
"a", # This is a test
Expand Down
2 changes: 1 addition & 1 deletion harper-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "harper-core"
version = "0.17.0"
version = "0.18.0"
edition = "2021"
description = "The language checker for developers."
license = "Apache-2.0"
Expand Down
19 changes: 19 additions & 0 deletions harper-core/dictionary.dict
Original file line number Diff line number Diff line change
Expand Up @@ -7819,6 +7819,7 @@ Pinkerton/21M
Pinocchio/21M
Pinochet/2M
Pinter/2M
Pinterest/21M
Pinyin/21
Pippin/2M
Piraeus/2M
Expand Down Expand Up @@ -47557,6 +47558,7 @@ usurp/4SDRZG
usurpation/1M
usurper/1M
usury/1M
us/8
utensil/1SM
uteri/1
uterine/51
Expand Down Expand Up @@ -49773,3 +49775,20 @@ a8c/SM
a11n/1
a12s/9
intergenerational
DBMS/12SM
RDBMS/12SM
WhatsApp/124MG
VARCHAR/1MS
DATETIME/1MS
hardcode/4GDS
subquery/14SGD
CTE/1S
unnest/4SGD
ORM/12S
NoSQL/1
HQL/1
CQL/1
KSQL/1
PRQL/1
MapReduce/1
SQLAlchemy/1
2 changes: 1 addition & 1 deletion harper-core/src/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ impl Document {
}

/// Searches for quotation marks and fills the
/// [`Punctuation::Quote::twin_loc`] field. This is on a best effort
/// [`Punctuation::Quote::twin_loc`] field. This is on a best-effort
/// basis.
///
/// Current algorithm is basic and could use some work.
Expand Down
Loading

0 comments on commit 3aabf9c

Please sign in to comment.