Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: turtton/volglass
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.4.12
Choose a base ref
...
head repository: turtton/volglass
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -8,4 +8,5 @@ npm-debug.log
/kotlin/.gradle
/kotlin/.idea
/kotlin/build
/kotlin/jflex*
/kotlin/jflex*
.direnv
4 changes: 4 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
if ! has nix_direnv_version || ! nix_direnv_version 3.0.5; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.5/direnvrc" "sha256-RuwIS+QKFj/T9M2TFXScjBsLR6V3A17YVoEW/Q6AZ1w="
fi
use flake
29 changes: 19 additions & 10 deletions .github/workflows/lint-and-build.yml
Original file line number Diff line number Diff line change
@@ -9,14 +9,18 @@ on:
pull_request:
branches: [ "main" ]

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
check-kotlin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate gradle-wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v3
- name: Lint
uses: musichin/ktlint-check@v2
with:
@@ -25,27 +29,35 @@ jobs:
./kotlin/**/**.kt
!./kotlin/**/generated/**
check-typescript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: biomejs/setup-biome@v2
- name: Run Biome
run: biome ci src

lint-and-build:
needs: check-kotlin
needs: [ check-kotlin, check-typescript ]
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
build-root-directory: kotlin

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16

@@ -61,7 +73,7 @@ jobs:
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup next cache
with:
path: |
@@ -74,9 +86,6 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Lint
run: pnpm run lint

- name: Download template contents
run: |
curl -L -o temp.zip https://github.com/turtton/volglass-docs/archive/refs/heads/main.zip
@@ -105,4 +114,4 @@ jobs:
with:
file: ./Dockerfile
push: false
context: .
context: .
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
/.yarn
/kotlin/jflex*.jar
/tsconfig.tsbuildinfo
/.direnv

# dependencies
/node_modules
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -9,9 +9,9 @@ WORKDIR /app

# Install dependencies based on the preferred package manager
COPY package.json pnpm-lock.yaml* ./
RUN yarn global add pnpm && pnpm i
RUN corepack enable && pnpm i

FROM gradle:8.6.0-jdk11 AS kdeps
FROM gradle:8.12.0-jdk11 AS kdeps
WORKDIR /app
COPY kotlin/*gradle* kotlin/kotlin-js-store ./kotlin/
WORKDIR /app/kotlin
@@ -35,7 +35,7 @@ COPY . .
# Uncomment the following line in case you want to disable telemetry during the build.
ENV NEXT_TELEMETRY_DISABLED 1

RUN yarn global add pnpm && pnpm run buildnd
RUN corepack enable && pnpm run buildnd

# If using npm comment out above and use below instead
# RUN npm run build
61 changes: 61 additions & 0 deletions flake.lock

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

25 changes: 25 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
description = "A basic flake with a shell";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";

outputs = { nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
corepack = with pkgs; stdenv.mkDerivation {
name = "corepack";
buildInputs = [ pkgs.nodejs-slim ];
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out/bin
corepack enable --install-directory=$out/bin
'';
};
in
{
devShells.default = with pkgs; mkShell {
packages = [ bashInteractive corepack ];
};
});
}
14 changes: 7 additions & 7 deletions kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -12,8 +12,8 @@ buildscript {
}
}
plugins {
kotlin("multiplatform") version "1.9.22"
kotlin("plugin.serialization") version "1.9.22"
kotlin("multiplatform") version "1.9.25"
kotlin("plugin.serialization") version "1.9.25"
id("org.jmailen.kotlinter") version "3.16.0"
}

@@ -45,21 +45,21 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation("org.jetbrains:markdown:0.6.1")
implementation("org.jetbrains:markdown:0.7.3")
}
}
val jsMain by getting {
dependencies {
implementation(enforcedPlatform("org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:1.0.0-pre.707"))
implementation(enforcedPlatform("org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:1.0.0-pre.856"))
implementation("org.jetbrains.kotlin-wrappers:kotlin-react")
implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom")
implementation("org.jetbrains.kotlin-wrappers:kotlin-emotion")
implementation("org.jetbrains.kotlin-wrappers:kotlin-react-router-dom")

implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.1")

implementation("io.github.xxfast:kstore:0.7.1")?.version?.also {
implementation("io.github.xxfast:kstore:0.9.1")?.version?.also {
implementation("io.github.xxfast:kstore-file:$it")
}

Binary file modified kotlin/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion kotlin/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
6 changes: 4 additions & 2 deletions kotlin/gradlew
Original file line number Diff line number Diff line change
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
2 changes: 2 additions & 0 deletions kotlin/gradlew.bat
Original file line number Diff line number Diff line change
@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -12,8 +12,8 @@
"build:kotlinnd": "cd kotlin && ./gradlew build --stacktrace --no-daemon",
"start": "next start",
"deploy": "pnpm build && git add . && git commit -m '...' && git push",
"format": "pnpm dlx @biomejs/biome check --apply src *.js",
"lint": "pnpm dlx @biomejs/biome check src *.js",
"format": "pnpm biome check --apply src *.js",
"lint": "pnpm biome check src *.js",
"export": "next export"
},
"dependencies": {
@@ -22,16 +22,17 @@
"@emotion/server": "latest",
"@emotion/styled": "latest",
"@mui/icons-material": "latest",
"@mui/x-tree-view": "latest",
"@mui/material": "latest",
"@types/wanakana": "^4.0.3",
"@mui/x-tree-view": "latest",
"@types/wanakana": "^5.0.0",
"directory-tree": "^3.2.2",
"fs": "^0.0.1-security",
"fuse.js": "^6.6.2",
"hast-util-to-html": "^9.0.0",
"jotai": "^2.0.1",
"katex": "^0.16.4",
"mermaid": "^10.0.2",
"natural-compare": "^1.4.0",
"next": "^13.0.0",
"path": "^0.12.7",
"react": "^18.2.0",
@@ -44,11 +45,13 @@
"wanakana": "^5.0.2"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/babel__core": "^7.20.0",
"@types/cytoscape": "^3.19.9",
"@types/d3": "^7.0.0",
"@types/katex": "^0.16.0",
"@types/node": "^18.11.18",
"@types/natural-compare": "^1.4.3",
"@types/node": "^20.0.0",
"@types/react": "^18.0.27",
"@types/react-cytoscapejs": "^1.2.2",
"@types/react-dom": "^18.0.11",
@@ -57,9 +60,8 @@
"autoprefixer": "^10.4.13",
"cytoscape": "^3.17.0",
"postcss": "^8.4.21",
"@biomejs/biome": "^1.0.0",
"tailwindcss": "^3.2.4",
"typescript": "^5.0.0"
},
"packageManager": "pnpm@8.15.4"
"packageManager": "pnpm@8.15.9"
}
Loading