diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff447de..e895200 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,16 +1,17 @@ name: ci + on: push: branches: [ main ] pull_request: branches: [ main ] - workflow_dispatch: permissions: contents: read + pull-requests: write jobs: - build: + test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -19,3 +20,12 @@ jobs: node-version-file: package.json - run: npm ci - run: npm run build + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: package.json + - run: npm ci + - run: npm run lint diff --git a/package-lock.json b/package-lock.json index 5d82895..ce529da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,8 @@ "version": "1.0.0", "dependencies": { "sirv-cli": "^2.0.2", - "svelte-persisted-store": "^0.11.0" + "svelte-persisted-store": "^0.11.0", + "typescript": "^5.7.3" }, "devDependencies": { "@rollup/plugin-commonjs": "^25.0.7", @@ -25,6 +26,10 @@ "svelte-check": "^4.1.1", "svelte-preprocess": "^6.0.3", "svelte-spa-router": "^4.0.1" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=10" } }, "node_modules/@ampproject/remapping": { @@ -212,12 +217,13 @@ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" }, "node_modules/@types/node": { - "version": "20.12.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz", - "integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==", + "version": "22.13.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.4.tgz", + "integrity": "sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==", "dev": true, + "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.20.0" } }, "node_modules/@types/resolve": { @@ -1413,11 +1419,10 @@ } }, "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", - "dev": true, - "peer": true, + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -1427,10 +1432,11 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "dev": true, + "license": "MIT" }, "node_modules/wrappy": { "version": "1.0.2", diff --git a/package.json b/package.json index fb46283..6cc95b3 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "build": "rollup -c", "dev": "rollup -c -w", "start": "sirv docs --no-clear", - "check": "svelte-check" + "check": "svelte-check", + "lint": "svelte-check" }, "devDependencies": { "@rollup/plugin-commonjs": "^25.0.7", @@ -25,10 +26,11 @@ }, "dependencies": { "sirv-cli": "^2.0.2", - "svelte-persisted-store": "^0.11.0" + "svelte-persisted-store": "^0.11.0", + "typescript": "^5.7.3" }, - "engines" : { - "npm" : ">=10", - "node" : ">=18.0.0" + "engines": { + "npm": ">=10", + "node": ">=18.0.0" } }