Skip to content

📦 Bump to svelte-5 #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .babelrc

This file was deleted.

16 changes: 0 additions & 16 deletions .eslintignore

This file was deleted.

37 changes: 0 additions & 37 deletions .eslintrc.cjs

This file was deleted.

6 changes: 4 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: lint
on:
push:
branches: [main]
branches:
- main
pull_request:
branches: [main]
branches:
- '**'
env:
CI: true
jobs:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: test
on:
push:
branches: [main]
branches:
- main
pull_request:
branches: [main]
branches:
- '**'
env:
CI: true
jobs:
Expand Down
18 changes: 15 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
.DS_Store
test-results
node_modules

# Output
.output
.vercel
/.svelte-kit
/build
/dist
/.svelte-kit
/package

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
4 changes: 0 additions & 4 deletions .npmignore

This file was deleted.

1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
engine-strict=true
resolution-mode=highest
File renamed without changes.
30 changes: 30 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import js from '@eslint/js';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import ts from 'typescript-eslint';

export default ts.config(
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs["flat/recommended"],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node
}
}
},
{
files: ["**/*.svelte"],

languageOptions: {
parserOptions: {
parser: ts.parser
}
}
},
{
ignores: ["build/", ".svelte-kit/", "dist/"]
}
);
41 changes: 25 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,29 @@
"preview": "vite preview",
"package": "svelte-kit sync && svelte-package && publint",
"prepublishOnly": "npm run package",
"test": "npm run check && npm run lint && npm run test:integration",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "eslint . --ext .js,.ts,.svelte",
"lint": "eslint .",
"test:unit": "vitest",
"test": "npm run test:unit -- --run && npm run test:e2e",
"test:e2e": "playwright test",
"lint:fix": "eslint . --ext .js,.ts,.svelte --fix",
"test:integration": "playwright test",
"release": "npm run package && np --no-yarn"
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"svelte": "./dist/index.js",
"default": "./dist/index.js"
"svelte": "./dist/index.js"
}
},
"files": [
"dist",
"!dist/**/*.test.*",
"!dist/**/*.spec.*"
],
"sideEffects": [
"**/*.css"
],
"engines": {
"node": ">= 18"
},
Expand All @@ -45,24 +48,30 @@
"*.svelte": "eslint ./ --fix --quiet"
},
"peerDependencies": {
"svelte": "^4.0.0"
"svelte": "^5.0.0"
},
"devDependencies": {
"@playwright/test": "^1.37.1",
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/kit": "^1.24.1",
"@sveltejs/package": "^2.2.2",
"@playwright/test": "^1.45.3",
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/package": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"@types/eslint": "^9.6.0",
"eslint": "^9.7.0",
"eslint-plugin-svelte": "^2.36.0",
"eslint-config-himynameisdave": "^8.1.0",
"globals": "^15.0.0",
"husky": "^8.0.3",
"less": "^4.2.0",
"lint-staged": "^14.0.1",
"np": "^8.0.4",
"publint": "^0.2.2",
"svelte": "^4.2.0",
"svelte-check": "^3.5.1",
"publint": "^0.2.0",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vite": "^4.4.9"
"typescript": "^5.0.0",
"typescript-eslint": "^8.0.0",
"vite": "^5.0.11",
"vitest": "^2.0.4"
},
"keywords": [
"svelte",
Expand Down
22 changes: 8 additions & 14 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
import type { PlaywrightTestConfig } from '@playwright/test';
import { defineConfig } from '@playwright/test';

const config: PlaywrightTestConfig = {
webServer: {
command: 'npm run build && npm run preview',
port: 4173
},
testDir: 'tests',
testMatch: /(.+\.)?(test|spec)\.[jt]s/,
// Uncomment this to enable headful browser, useful for debugging.
// use: {
// headless: false,
// },
};
export default defineConfig({
webServer: {
command: 'npm run build && npm run preview',
port: 4173
},

export default config;
testDir: 'e2e'
});
Loading