Skip to content

Commit 76cd5af

Browse files
authored
Merge pull request #973 from tradingstrategy-ai/svelte-upgrades
Upgrades (node, svelte, sveltekit, etc.)
2 parents 22380ee + 71157b5 commit 76cd5af

18 files changed

Lines changed: 11380 additions & 16327 deletions

.env.development

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ TS_PRIVATE_ADMIN_PW=youbetcha
1616
# Clear geo-blocks for development
1717
TS_PUBLIC_GEO_BLOCK="{}"
1818

19+
# Use dummy Cloudflare Turnstile keys for dev
20+
# See: https://developers.cloudflare.com/turnstile/troubleshooting/testing/
21+
TS_PUBLIC_TURNSTILE_SITE_KEY="1x00000000000000000000AA"
22+
TS_PRIVATE_TURNSTILE_SECRET_KEY="1x0000000000000000000000000000000AA"
23+
1924
# Uncomment to test chain maintenance error
2025
# TS_PUBLIC_CHAINS_UNDER_MAINTENANCE=`{ "binance": "BNB Chain" }`
2126

.github/workflows/javascript.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- uses: actions/checkout@v4
2222
- uses: actions/setup-node@v4
2323
with:
24-
node-version: 20.11
24+
node-version: 20.19
2525
cache: npm
2626
- name: Install dependencies
2727
run: npm ci
@@ -40,7 +40,7 @@ jobs:
4040
submodules: 'recursive'
4141
- uses: actions/setup-node@v4
4242
with:
43-
node-version: 20.11
43+
node-version: 20.19
4444
cache: npm
4545
- name: Install dependencies
4646
run: npm ci

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.11
1+
20.19

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#######################################
22
# Build stage
33
#######################################
4-
FROM node:20.11 as builder
4+
FROM node:20.19 as builder
55

66
WORKDIR /app
77

@@ -22,7 +22,7 @@ RUN npm run build
2222
#######################################
2323
# Serve stage
2424
#######################################
25-
FROM node:20.11-slim
25+
FROM node:20.19-slim
2626

2727
WORKDIR /app
2828

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A frontend for [Trading Strategy protocol](https://tradingstrategy.ai).
66

77
## Install NPM dependencies
88

9-
Node >=20.11 required.
9+
Node >=20.19 required.
1010

1111
```shell
1212
npm install

eslint.config.js

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,39 @@
11
import prettier from 'eslint-config-prettier';
2-
import js from '@eslint/js';
32
import { includeIgnoreFile } from '@eslint/compat';
3+
import js from '@eslint/js';
44
import svelte from 'eslint-plugin-svelte';
55
import globals from 'globals';
66
import { fileURLToPath } from 'node:url';
77
import ts from 'typescript-eslint';
8+
import svelteConfig from './svelte.config.js';
9+
810
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
911

1012
export default ts.config(
1113
includeIgnoreFile(gitignorePath),
1214
js.configs.recommended,
1315
...ts.configs.recommended,
14-
...svelte.configs['flat/recommended'],
16+
...svelte.configs.recommended,
1517
prettier,
16-
...svelte.configs['flat/prettier'],
18+
...svelte.configs.prettier,
1719
{
1820
languageOptions: {
19-
globals: {
20-
...globals.browser,
21-
...globals.node
22-
}
21+
globals: { ...globals.browser, ...globals.node }
22+
},
23+
rules: {
24+
// typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
25+
// see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
26+
'no-undef': 'off'
2327
}
2428
},
2529
{
26-
files: ['**/*.svelte'],
27-
30+
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
2831
languageOptions: {
2932
parserOptions: {
30-
parser: ts.parser
33+
projectService: true,
34+
extraFileExtensions: ['.svelte'],
35+
parser: ts.parser,
36+
svelteConfig
3137
}
3238
}
3339
}

0 commit comments

Comments
 (0)