Skip to content

Commit

Permalink
Update deps, node-next module resolution
Browse files Browse the repository at this point in the history
Update to vite 6 (closes #312)
Removes solid-start dep (it wasn't used anyway)
Updates module resolution to node next
Updates vitest, jsdom
Simplifies the file structure of the frontend package to minimize number of files, dirs, imports etc
  • Loading branch information
thetarnav committed Dec 9, 2024
1 parent 5e15eaf commit 89fcdc4
Show file tree
Hide file tree
Showing 170 changed files with 5,068 additions and 9,297 deletions.
12 changes: 12 additions & 0 deletions .changeset/good-teachers-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'@solid-devtools/debugger': minor
'@solid-devtools/extension': minor
'@solid-devtools/frontend': minor
'@solid-devtools/logger': minor
'solid-devtools': minor
'@solid-devtools/overlay': minor
'@solid-devtools/shared': minor
'@solid-devtools/theme': minor
---

Update to vite 6, remove solid-start dep (was unused anyway)
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"arrowParens": "avoid",
"bracketSpacing": false,
"endOfLine": "lf",
"plugins": ["prettier-plugin-organize-imports"],
"plugins": [],
"overrides": [
{
"files": "*.yml",
Expand Down
7 changes: 5 additions & 2 deletions configs/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@
"compilerOptions": {
"strict": true,
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "node",
"module": "NodeNext",
"moduleResolution": "nodenext",
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"verbatimModuleSyntax": true,
"allowImportingTsExtensions": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"allowJs": true,
"checkJs": true,
"emitDeclarationOnly": true,
"outDir": "types",
"types": ["@total-typescript/ts-reset"]
}
Expand Down
4 changes: 2 additions & 2 deletions configs/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Plugin } from 'esbuild'
import { type Plugin } from 'esbuild'
import { solidPlugin } from 'esbuild-plugin-solid'
import { defineConfig, Options } from 'tsup'
import { defineConfig, type Options } from 'tsup'

export const CI =
process.env['CI'] === 'true' ||
Expand Down
4 changes: 2 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default [{
files: ['**/*.{js,mjs,jsx,ts,tsx}'],

plugins: {
'@typescript-eslint': ts_eslint,
'@typescript-eslint': /** @type {*} */(ts_eslint),
'@no-only-tests': no_only_tests,
'@eslint-comments': eslint_comments,
'@nothing-but': /** @type {*} */(nb_eslint),
Expand All @@ -83,7 +83,7 @@ export default [{
*/
'no-console' : 'warn',
'no-debugger' : 'warn',
'prefer-const' : 'warn',
// 'prefer-const' : 'warn',
'require-await' : 'warn',
'no-empty' : 'warn',
'@typescript-eslint/no-unused-vars': ['warn', {
Expand Down
7 changes: 3 additions & 4 deletions examples/sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@
},
"devDependencies": {
"@babel/plugin-syntax-typescript": "^7.23.3",
"@unocss/preset-typography": "0.65.0-beta.3",
"solid-devtools": "workspace:^",
"vite-plugin-inspect": "^0.7.42"
"@unocss/preset-typography": "0.65.1",
"solid-devtools": "workspace:^"
},
"dependencies": {
"@solid-devtools/debugger": "workspace:^",
"@solid-devtools/logger": "workspace:^",
"@solid-devtools/overlay": "workspace:^",
"@solid-primitives/timer": "^1.3.7"
"@solid-primitives/timer": "^1.3.10"
}
}
12 changes: 6 additions & 6 deletions examples/sandbox/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
Component,
type Component,
createComponent,
createComputed,
createEffect,
Expand All @@ -9,15 +9,15 @@ import {
createRoot,
createSignal,
ErrorBoundary,
ParentComponent,
Setter,
type ParentComponent,
type Setter,
Show,
Suspense,
} from 'solid-js'
import {createMutable} from 'solid-js/store'
import Recursive from './Recursive'
import {ThemeExample} from './Theme'
import Todos from './Todos'
import Recursive from './Recursive.tsx'
import {ThemeExample} from './Theme.tsx'
import Todos from './Todos.tsx'

const doMediumCalc = () => {
Array.from({length: 1000000}, (_, i) => i).sort(() => Math.random() - 5)
Expand Down
2 changes: 1 addition & 1 deletion examples/sandbox/src/Overlay.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Show, lazy} from 'solid-js'
const DevtoolsOverlay = lazy(() => import('./DevtoolsOverlay'))
const DevtoolsOverlay = lazy(() => import('./DevtoolsOverlay.tsx'))

export function Overlay() {
return (
Expand Down
2 changes: 1 addition & 1 deletion examples/sandbox/src/Recursive.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, createContext, For, mergeProps, splitProps, useContext} from 'solid-js'
import {type Component, createContext, For, mergeProps, splitProps, useContext} from 'solid-js'
import {createStore} from 'solid-js/store'

type NodeType = {
Expand Down
2 changes: 1 addition & 1 deletion examples/sandbox/src/Theme.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, createContext, ParentComponent, useContext} from 'solid-js'
import {type Component, createContext, type ParentComponent, useContext} from 'solid-js'
import {createStore} from 'solid-js/store'

export type ThemeContextState = {
Expand Down
4 changes: 2 additions & 2 deletions examples/sandbox/src/Todos.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import {
batch,
Component,
type Component,
createEffect,
createMemo,
createRoot,
createSignal,
For,
Show,
} from 'solid-js'
import {createStore, produce, SetStoreFunction, Store, unwrap} from 'solid-js/store'
import {createStore, produce, type SetStoreFunction, type Store, unwrap} from 'solid-js/store'

export function createLocalStore<T extends object>(
name: string,
Expand Down
2 changes: 1 addition & 1 deletion examples/sandbox/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ async function main() {
await import('@solid-devtools/debugger/bundled')
}

import('./main')
import('./main.tsx')
}
main()
6 changes: 3 additions & 3 deletions examples/sandbox/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {render} from 'solid-js/web'
import App from './App'
import {Overlay} from './Overlay'
import {ThemeProvider} from './Theme'
import App from './App.tsx'
import {Overlay} from './Overlay.tsx'
import {ThemeProvider} from './Theme.tsx'

import 'uno.css'

Expand Down
2 changes: 0 additions & 2 deletions examples/sandbox/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import devtools from 'solid-devtools/vite'
import {presetTypography} from 'unocss'
import Unocss from 'unocss/vite'
import {defineConfig} from 'vite'
import Inspect from 'vite-plugin-inspect'
import solid from 'vite-plugin-solid'

const is_ext = process.env['EXT'] === 'true' || process.env['EXT'] === '1'
Expand All @@ -24,7 +23,6 @@ export default defineConfig(mode => {
Unocss({
presets: [presetTypography()],
}),
Inspect(),
],
define: {
'process.env.EXT': JSON.stringify(is_ext),
Expand Down
24 changes: 0 additions & 24 deletions examples/start/.gitignore

This file was deleted.

25 changes: 0 additions & 25 deletions examples/start/package.json

This file was deleted.

Binary file removed examples/start/public/favicon.ico
Binary file not shown.
Binary file removed examples/start/public/img/android-chrome-192x192.png
Binary file not shown.
Binary file removed examples/start/public/img/android-chrome-512x512.png
Binary file not shown.
Binary file removed examples/start/public/img/apple-touch-icon.png
Binary file not shown.
Binary file removed examples/start/public/img/favicon-16x16.png
Binary file not shown.
Binary file removed examples/start/public/img/favicon-32x32.png
Binary file not shown.
Binary file removed examples/start/public/img/mstile-150x150.png
Binary file not shown.
20 changes: 0 additions & 20 deletions examples/start/public/manifest.webmanifest

This file was deleted.

2 changes: 0 additions & 2 deletions examples/start/public/robots.txt

This file was deleted.

16 changes: 0 additions & 16 deletions examples/start/public/sw.js

This file was deleted.

25 changes: 0 additions & 25 deletions examples/start/src/components/comment.tsx

This file was deleted.

35 changes: 0 additions & 35 deletions examples/start/src/components/nav.tsx

This file was deleted.

44 changes: 0 additions & 44 deletions examples/start/src/components/story.tsx

This file was deleted.

Loading

0 comments on commit 89fcdc4

Please sign in to comment.