Skip to content
Merged
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export default () => (

```tsx
import { createSignal } from "solid-js";
import { render } from "solid-js/web";
import { render } from "@solidjs/web";

const Counter = () => {
const [count, setCount] = createSignal(0);
Expand Down
795 changes: 309 additions & 486 deletions aube-lock.yaml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tools]
node = "26"
aube = "2.10.1"
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@
}
},
"peerDependencies": {
"solid-js": "^1.9.14",
"vite": "^8.3.5"
"@solidjs/web": "^2.0.3",
"solid-js": "^2.0.3",
"vite": "^8.3.8"
},
"dependencies": {
"@mdx-js/rollup": "^3.1.1",
"@solidjs/vite-plugin": "^3.0.1",
"@types/hast": "^3.0.5",
"@types/mdast": "^4.0.4",
"github-slugger": "^2.0.0",
Expand All @@ -74,11 +76,11 @@
"sharp": "^0.35.3",
"unified": "11.0.5",
"unist-util-visit": "^5.1.0",
"vfile": "^6.0.3",
"vite-plugin-solid": "^2.11.14"
"vfile": "^6.0.3"
},
"devDependencies": {
"@fontsource/inter": "^5.3.0",
"@solidjs/web": "^2.0.3",
"@types/estree": "^1.0.9",
"@types/js-yaml": "^4.0.9",
"@types/node": "^26.2.0",
Expand All @@ -87,15 +89,15 @@
"oxlint": "^1.78.0",
"postcss": "^8.5.28",
"remark-parse": "^11.0.0",
"solid-js": "^1.9.14",
"solid-js": "^2.0.3",
"typescript": "^7.0.2",
"vite": "8.3.5",
"vite": "8.3.8",
"vitest": "^4.1.10"
},
"devEngines": {
"packageManager": {
"name": "aube",
"version": "2.5.1",
"version": "2.10.1",
"onFail": "warn"
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/client-islands-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default () => (
writeFile(
join(sourceDirectory, "counter-island.tsx"),
`import { createSignal } from "solid-js"
import { render } from "solid-js/web"
import { render } from "@solidjs/web"
import "./counter.css"

const Counter = () => {
Expand Down Expand Up @@ -191,7 +191,7 @@ export const sharedPayload = "shared dependency payload retained as one chunk"
),
writeFile(
join(clientDirectory, "alpha.tsx"),
`import { render } from "solid-js/web"
`import { render } from "@solidjs/web"
import { definedLabel, mode, sharedPayload, transformedLabel } from "@client/shared.ts"
import styles from "./alpha.module.css"

Expand All @@ -202,7 +202,7 @@ render(() => <button class={styles.alpha}>{definedLabel}:{transformedLabel}:{mod
),
writeFile(
join(clientDirectory, "beta.tsx"),
`import { render } from "solid-js/web"
`import { render } from "@solidjs/web"
import { definedLabel, mode, sharedPayload, transformedLabel } from "@client/shared.ts"
import styles from "./beta.module.css"

Expand Down
2 changes: 1 addition & 1 deletion src/client-islands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
type ResolvedConfig,
type UserConfig,
} from "vite"
import solid from "vite-plugin-solid"
import solid from "@solidjs/vite-plugin"

interface RegisteredIsland {
entryPath: string
Expand Down
17 changes: 9 additions & 8 deletions src/image.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { splitProps, type JSX } from "solid-js"
import { omit } from "solid-js"
import type { JSX } from "@solidjs/web"
import { deferred, jsx } from "./jsx-runtime.ts"
import { renderEnvironment } from "./render-environment.ts"
import {
Expand Down Expand Up @@ -31,17 +32,17 @@ export interface ResponsiveImageProps
}

export function ResponsiveImage(props: ResponsiveImageProps): JSX.Element {
const [local, attributes] = splitProps(props, [
const attributes = omit(props,
"decoding", "fetchpriority", "format", "layout", "loading", "priority", "sizes", "widths",
])
)

return deferred(async () => jsx("img", {
...attributes,
...await renderEnvironment().responsiveImage(props),
"data-astro-image": local.layout === undefined || local.layout === "none" ? undefined : local.layout,
decoding: local.decoding ?? (local.priority ? "sync" : "async"),
fetchpriority: local.fetchpriority ?? (local.priority ? "high" : undefined),
loading: local.loading ?? (local.priority ? "eager" : "lazy"),
sizes: local.sizes ?? getSizesAttribute({ layout: local.layout ?? "none", width: props.width }),
"data-astro-image": props.layout === undefined || props.layout === "none" ? undefined : props.layout,
decoding: props.decoding ?? (props.priority ? "sync" : "async"),
fetchpriority: props.fetchpriority ?? (props.priority ? "high" : undefined),
loading: props.loading ?? (props.priority ? "eager" : "lazy"),
sizes: props.sizes ?? getSizesAttribute({ layout: props.layout ?? "none", width: props.width }),
}))
}
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
type UserConfig,
type ViteDevServer,
} from "vite"
import solid from "vite-plugin-solid"
import solid from "@solidjs/vite-plugin"
import {
loadCollections,
type CollectionDefinitions,
Expand Down Expand Up @@ -864,7 +864,7 @@ export const staticSite = (options: StaticSiteOptions): PluginOption => {
markdownImages(serialize),
...options.integrations,
clientIslands.plugin,
solid({ ssr: true, hot: false, exclude: /\.satori\.tsx$/ }),
solid({ ssr: true, refresh: false, exclude: /\.satori\.tsx$/ }),
staticSitePlugin(options, clientIslands),
]
}
2 changes: 1 addition & 1 deletion src/jsx-runtime.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { JSX } from "solid-js"
import type { JSX } from "@solidjs/web"

export interface RenderElement {
type: "solid-static:element"
Expand Down
3 changes: 2 additions & 1 deletion src/render.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Component, JSX } from "solid-js"
import type { Component } from "solid-js"
import type { JSX } from "@solidjs/web"
import type { Root } from "hast"
import type { LoadedCollections, MarkdownHeading, RenderedMarkdown } from "./content.ts"
import { setCollections } from "./runtime.ts"
Expand Down
2 changes: 1 addition & 1 deletion src/route-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default (props: { route: { fileName: string; path: string } }) =>
</html>
`
const layoutComponent = `
import type { JSX } from "solid-js"
import type { JSX } from "@solidjs/web"

export default (props: {
children: JSX.Element
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"allowImportingTsExtensions": true,
"exactOptionalPropertyTypes": true,
"jsx": "preserve",
"jsxImportSource": "solid-js",
"jsxImportSource": "@solidjs/web",
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"module": "ESNext",
"moduleResolution": "Bundler",
Expand Down
6 changes: 4 additions & 2 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import solid from "vite-plugin-solid"
import solid from "@solidjs/vite-plugin"
import { defineConfig } from "vitest/config"
import { renderJsx } from "./src/render-jsx.ts"

export default defineConfig({
plugins: [renderJsx(), solid({ ssr: true, hot: false })],
plugins: [renderJsx(), solid({ ssr: true, refresh: false })],
// @solidjs/vite-plugin applies browser resolve conditions to tests unless the environment is explicitly node.
test: { environment: "node" },
})