Skip to content

Commit 24aa953

Browse files
authored
Merge pull request #546 from aminya/update-minijson
fix: update aminya/minijson + build: fix build issues
2 parents 533dce5 + 2197b37 commit 24aa953

19 files changed

Lines changed: 182 additions & 171 deletions

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"solid-utils": "^0.8.1"
5757
},
5858
"devDependencies": {
59-
"@aminya/minijson": "^0.6.2",
59+
"@aminya/minijson": "^1.1.0",
6060
"@mdx-js/rollup": "^3.0.1",
6161
"@tailwindcss/typography": "^0.5.10",
6262
"@types/markdown-it": "^13.0.7",

pnpm-lock.yaml

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/App.tsx

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,26 @@ import { AppContextProvider } from './AppContext';
77
import { preventSmoothScrollOnTabbing } from './utils';
88

99
export const App = () => {
10-
1110
preventSmoothScrollOnTabbing();
1211

1312
return (
14-
<MetaProvider>
13+
<MetaProvider>
1514
<main class="min-h-screen">
16-
<Router root={(props)=>(
17-
<AppContextProvider>
18-
<Header />
19-
{/* two div wrappers to make page animation work and performant */}
20-
<div id="main-content">
21-
<div>
22-
{/* <TransitionRoutes> */}
23-
<Suspense>
24-
{props.children}
25-
</Suspense>
26-
{/* </TransitionRoutes> */}
15+
<Router
16+
root={(props) => (
17+
<AppContextProvider>
18+
<Header />
19+
{/* two div wrappers to make page animation work and performant */}
20+
<div id="main-content">
21+
<div>
22+
{/* <TransitionRoutes> */}
23+
<Suspense>{props.children}</Suspense>
24+
{/* </TransitionRoutes> */}
25+
</div>
2726
</div>
28-
</div>
29-
</AppContextProvider>
30-
)}>
27+
</AppContextProvider>
28+
)}
29+
>
3130
{routes}
3231
</Router>
3332
</main>

src/AppContext.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ export type Locale =
4545
for validating of other dictionaries have same keys as en dictionary
4646
some might be missing, but the shape should be the same
4747
*/
48-
type DeepPartial<T> = T extends Record<string, unknown>
49-
? { [K in keyof T]?: DeepPartial<T[K]> }
50-
: T;
48+
type DeepPartial<T> =
49+
T extends Record<string, unknown> ? { [K in keyof T]?: DeepPartial<T[K]> } : T;
5150

5251
const raw_dict_map: Record<Locale, () => Promise<{ dict: DeepPartial<RawDictionary> }>> = {
5352
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-explicit-any
@@ -96,8 +95,8 @@ const toLocale = (string: string): Locale | undefined =>
9695
string in raw_dict_map
9796
? (string as Locale)
9897
: string in LANG_ALIASES
99-
? (LANG_ALIASES[string] as Locale)
100-
: undefined;
98+
? (LANG_ALIASES[string] as Locale)
99+
: undefined;
101100

102101
interface Settings {
103102
locale: Locale;

src/main.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { render } from "solid-js/web";
1+
import { render } from 'solid-js/web';
22
import './assets/main.css';
33

44
// import { registerSW } from 'virtual:pwa-register';
55
import { App } from './App';
66

7-
render(() => <App />, document.getElementById("app"));
7+
render(() => <App />, document.getElementById('app')!);
88

99
// Register service worker
1010
// registerSW({ onOfflineReady() {} });

src/pages/Blog.data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export type MDXComponent = Component<{
88
Twitch?: Component<TwitchProps>;
99
YouTube?: Component<YouTubeProps>;
1010
Spotify?: Component<SpotifyProps>;
11-
Notice?: Component<any>
11+
Notice?: Component<any>;
1212
};
1313
}>;
1414

src/pages/Blog.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import { Title } from '@solidjs/meta';
55
import { useRouteReadyState } from '../utils/routeReadyState';
66
import type { BlogData } from './Blog.data';
77

8-
const Blog: Component<{data:BlogData}> = (props) => {
9-
8+
const Blog: Component<{ data: BlogData }> = (props) => {
109
const data = props.data;
1110

1211
useRouteReadyState();

src/pages/Contributors.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const Contributor: Component<ContributorProps> = (props) => {
6363
);
6464
};
6565

66-
const Contributors: Component<{data:ContributorsDataProps}> = (props) => {
66+
const Contributors: Component<{ data: ContributorsDataProps }> = (props) => {
6767
const { t } = useAppState();
6868
const data = props.data;
6969

src/pages/Docs.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ const Content: Component<{
120120
</Switch>
121121
);
122122

123-
const Docs: Component<{ hash?: string, data: DocData }> = (props) => {
123+
const Docs: Component<{ hash?: string; data: DocData }> = (props) => {
124124
const data = props.data;
125125
const [current, setCurrent] = createSignal<string | null>(null);
126126
const [toggleSections, setToggleSections] = createSignal(false);
@@ -169,7 +169,7 @@ const Docs: Component<{ hash?: string, data: DocData }> = (props) => {
169169
aside={<Sidebar items={sections()} current={current} hash={props.hash} />}
170170
content={<Content data={data} />}
171171
/>
172-
</>
172+
</>
173173
);
174174
};
175175

src/pages/Examples.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type { Tab } from 'solid-repl';
1010
import { entries } from '@solid-primitives/utils';
1111
import { Title } from '@solidjs/meta';
1212

13-
const Examples: Component<{data: ExamplesDataRoute}> = (props) => {
13+
const Examples: Component<{ data: ExamplesDataRoute }> = (props) => {
1414
const data = props.data;
1515
const context = useAppState();
1616
const { t } = context;

0 commit comments

Comments
 (0)