mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-12-06 19:56:45 +10:30
chore: node 26, lf line endings and tooling fixes
This commit is contained in:
11 files changed
+55
-55
No files matched your search
@@ -0,0 +1 @@
|
||||
* text=auto eol=lf
|
||||
@@ -1,13 +1,13 @@
|
||||
name: Setup Node and dependencies
|
||||
description: Install Node.js 22.x and npm dependencies.
|
||||
description: Install Node.js 26.x and npm dependencies.
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Use Node.js 22.x
|
||||
uses: actions/setup-node@v4
|
||||
- name: Use Node.js 26.x
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: 22.x
|
||||
node-version: 26.x
|
||||
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
shell: bash
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- name: Set build date
|
||||
id: build_date
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- name: Setup Node and dependencies
|
||||
uses: ./.github/actions/setup-node-deps
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- name: Setup Node and dependencies
|
||||
uses: ./.github/actions/setup-node-deps
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- name: Build extension
|
||||
id: build
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
gh_release_update_check: "false"
|
||||
|
||||
- name: Upload extension zips
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: extension-zips
|
||||
path: |
|
||||
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
echo "Check the confirmation box: you must update package.json version before releasing."
|
||||
exit 1
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- name: Read version
|
||||
id: version
|
||||
|
||||
@@ -17,7 +17,7 @@ Welcome to BetterSEQTA+! 🎉 This guide will walk you through making your first
|
||||
## Before You Start
|
||||
|
||||
### What You'll Need
|
||||
- **Node.js** (v22.12 or higher) - [Download here](https://nodejs.org/)
|
||||
- **Node.js** (v26 or higher) - [Download here](https://nodejs.org/)
|
||||
- **Git** - [Download here](https://git-scm.com/)
|
||||
- **A code editor** - We recommend [VS Code](https://code.visualstudio.com/)
|
||||
- **A Chromium browser** (Chrome, Edge, Brave) for testing (recommended, however you can use firefox although it requires being built every time you make a change)
|
||||
|
||||
@@ -38,7 +38,7 @@ npm install
|
||||
|
||||
2. **Check Node.js version**:
|
||||
```bash
|
||||
node --version # Should be v22.12 or higher
|
||||
node --version # Should be v26 or higher
|
||||
```
|
||||
|
||||
3. **Try with npm cache clean**:
|
||||
|
||||
@@ -8,7 +8,7 @@ This guide will walk you through the process of installing and setting up Better
|
||||
|
||||
Before you begin, make sure you have the following installed:
|
||||
|
||||
- [Node.js](https://nodejs.org/) v22.12 or higher
|
||||
- [Node.js](https://nodejs.org/) v26 or higher
|
||||
- A modern web browser (Chrome, Firefox, Edge, etc.)
|
||||
|
||||
## Installation Methods
|
||||
|
||||
+3
-4
@@ -11,10 +11,9 @@
|
||||
* or `node lib/publish.js --b firefox`
|
||||
*/
|
||||
|
||||
const { globSync } = require("glob");
|
||||
const semver = require("semver");
|
||||
const { execSync } = require("child_process");
|
||||
const path = require("path");
|
||||
import { globSync } from "glob";
|
||||
import semver from "semver";
|
||||
import { execSync } from "node:child_process";
|
||||
|
||||
/**
|
||||
* Determines the latest version string from a list of filenames that include version numbers.
|
||||
|
||||
+3
-3
@@ -5,7 +5,7 @@
|
||||
"description": "Enhance SEQTA Learn's usability and aesthetics! A fork of BetterSEQTA to continue development and add heaps more features!",
|
||||
"browserslist": "> 0.5%, last 2 versions, not dead",
|
||||
"engines": {
|
||||
"node": ">=22.12"
|
||||
"node": ">=26"
|
||||
},
|
||||
"scripts": {
|
||||
"compile:layerchart": "node scripts/compile-layerchart-vendor.mjs",
|
||||
@@ -23,11 +23,11 @@
|
||||
"dependency-graph": "depcruise src --include-only \"^src\" --output-type dot | dot -T svg > dependency-graph.svg",
|
||||
"lint": "eslint \"src/**/*.{js,ts}\"",
|
||||
"test": "npm run test:unit",
|
||||
"test:unit": "jest",
|
||||
"test:unit": "cross-env NODE_OPTIONS=--no-experimental-webstorage jest",
|
||||
"test:smoke": "node scripts/smoke-test.mjs",
|
||||
"test:ci": "npm run test:unit && npm run build && npm run test:smoke",
|
||||
"release": "gh release create $npm_package_version --repo BetterSEQTA/BetterSEQTA-Plus ./dist/*.zip --generate-notes",
|
||||
"publish": "bun lib/publish.js --b",
|
||||
"publish": "node lib/publish.js --b",
|
||||
"zip": "node scripts/package-extension-zips.mjs"
|
||||
},
|
||||
"keywords": [],
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
<script lang="ts">
|
||||
import HighlightedText from '../../utils/HighlightedText.svelte';
|
||||
import type { IndexItem } from '../../indexing/types';
|
||||
import type { FuseResultMatch } from '../../core/types';
|
||||
|
||||
export let item: IndexItem;
|
||||
export let isSelected: boolean;
|
||||
export let searchTerm: string;
|
||||
export let matches: readonly FuseResultMatch[] | undefined;
|
||||
export let onclick: (() => void) | undefined;
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<button
|
||||
class="w-full flex flex-col px-2 py-1.5 rounded-lg select-none cursor-pointer group transition-colors duration-100 ring-0 dark:ring-zinc-600/50
|
||||
{isSelected ? 'bg-zinc-900/5 dark:bg-white/10 text-zinc-900 dark:text-white dark:ring-[1px] dark:shadow-sm' : 'hover:bg-zinc-500/5 dark:hover:bg-white/5 text-zinc-800 dark:text-zinc-200'}"
|
||||
onclick={onclick}
|
||||
>
|
||||
<div class="flex items-center w-full">
|
||||
<div class="flex-none scale-90 w-8 h-8 text-xl font-IconFamily flex items-center justify-center text-white {item.metadata?.type === 'assessments' ? 'bg-linear-to-br from-[#fa915d] to-[#dc6c2f] rounded-md' : 'bg-linear-to-br from-[#4FBBFE] to-[#2090F3] rounded-md'} {item.metadata.isActive ? 'opacity-100' : 'opacity-80'}">
|
||||
{item.metadata?.type === 'assessments' ? '\ueac3' : '\ueb4d'}
|
||||
</div>
|
||||
<span class="ml-4 text-lg truncate {item.metadata.isActive ? 'opacity-100' : 'opacity-70'}">
|
||||
<HighlightedText text={item.text} term={searchTerm} matches={matches} />
|
||||
</span>
|
||||
<span class="flex-none ml-auto text-xs text-zinc-500 dark:text-zinc-400 {item.metadata.isActive ? 'opacity-100' : 'opacity-70'}">
|
||||
{item.metadata?.subjectCode}
|
||||
</span>
|
||||
</div>
|
||||
{#if item.content}
|
||||
<div class="mt-1 ml-12 text-sm text-zinc-600 dark:text-zinc-400 line-clamp-2 text-start">
|
||||
<HighlightedText text={item.content} term={searchTerm} matches={matches} />
|
||||
</div>
|
||||
{/if}
|
||||
<script lang="ts">
|
||||
import HighlightedText from '../../utils/HighlightedText.svelte';
|
||||
import type { IndexItem } from '../../indexing/types';
|
||||
import type { FuseResultMatch } from '../../core/types';
|
||||
|
||||
export let item: IndexItem;
|
||||
export let isSelected: boolean;
|
||||
export let searchTerm: string;
|
||||
export let matches: readonly FuseResultMatch[] | undefined;
|
||||
export let onclick: (() => void) | undefined;
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<button
|
||||
class="w-full flex flex-col px-2 py-1.5 rounded-lg select-none cursor-pointer group transition-colors duration-100 ring-0 dark:ring-zinc-600/50
|
||||
{isSelected ? 'bg-zinc-900/5 dark:bg-white/10 text-zinc-900 dark:text-white dark:ring-[1px] dark:shadow-sm' : 'hover:bg-zinc-500/5 dark:hover:bg-white/5 text-zinc-800 dark:text-zinc-200'}"
|
||||
onclick={onclick}
|
||||
>
|
||||
<div class="flex items-center w-full">
|
||||
<div class="flex-none scale-90 w-8 h-8 text-xl font-IconFamily flex items-center justify-center text-white {item.metadata?.type === 'assessments' ? 'bg-linear-to-br from-[#fa915d] to-[#dc6c2f] rounded-md' : 'bg-linear-to-br from-[#4FBBFE] to-[#2090F3] rounded-md'} {item.metadata.isActive ? 'opacity-100' : 'opacity-80'}">
|
||||
{item.metadata?.type === 'assessments' ? '\ueac3' : '\ueb4d'}
|
||||
</div>
|
||||
<span class="ml-4 text-lg truncate {item.metadata.isActive ? 'opacity-100' : 'opacity-70'}">
|
||||
<HighlightedText text={item.text} term={searchTerm} matches={matches} />
|
||||
</span>
|
||||
<span class="flex-none ml-auto text-xs text-zinc-500 dark:text-zinc-400 {item.metadata.isActive ? 'opacity-100' : 'opacity-70'}">
|
||||
{item.metadata?.subjectCode}
|
||||
</span>
|
||||
</div>
|
||||
{#if item.content}
|
||||
<div class="mt-1 ml-12 text-sm text-zinc-600 dark:text-zinc-400 line-clamp-2 text-start">
|
||||
<HighlightedText text={item.content} term={searchTerm} matches={matches} />
|
||||
</div>
|
||||
{/if}
|
||||
</button>
|
||||
Reference in new issue
Block a user