@bun-native/solid 0.33.1 → 0.33.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  SolidJS renderer for Bun Native desktop windows.
4
4
 
5
- Part of [Bun Native](https://github.com/0xPlayerOne/bun-native), an experimental developer preview. Version 0.33.1 was built from [c56fdd675365](https://github.com/0xPlayerOne/bun-native/tree/c56fdd6753653a10144a4167c1d3dfb3c38a0647) and published from GitHub Actions with npm provenance. Use the Bun revision pinned in that commit's toolchain.json. Start with the [getting-started guide](https://github.com/0xPlayerOne/bun-native/blob/c56fdd6753653a10144a4167c1d3dfb3c38a0647/docs/getting-started.md); `bun-native host install` fetches the matching release host. The license notice is in LICENSE.
5
+ Part of [Bun Native](https://github.com/0xPlayerOne/bun-native), an experimental developer preview. Version 0.33.3 was built from [bf02b4420333](https://github.com/0xPlayerOne/bun-native/tree/bf02b44203336646cf156e369cd57b84496a3a7d) and published from GitHub Actions with npm provenance. Use the Bun revision pinned in that commit's toolchain.json. Start with the [getting-started guide](https://github.com/0xPlayerOne/bun-native/blob/bf02b44203336646cf156e369cd57b84496a3a7d/docs/getting-started.md); `bun-native host install` fetches the matching release host. The license notice is in LICENSE.
@@ -1,15 +1,19 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "commit": "c56fdd6753653a10144a4167c1d3dfb3c38a0647",
4
- "tree": "c6e81b3f9d041e11dd0413b5fdd7a50910383854",
3
+ "commit": "bf02b44203336646cf156e369cd57b84496a3a7d",
4
+ "tree": "5943b16183fcc166a5694a7da25bd1d33a3788d4",
5
5
  "files": {
6
6
  "package.json": {
7
- "bytes": 2115,
8
- "sha256": "caf866d56f3cd7530d5735ecbf62512e9e22526bc44c75a4b48a18c26352c0b8"
7
+ "bytes": 2258,
8
+ "sha256": "52d4fbfcecc45b4c0da143af60977d68491559283dc78ee31ce720e51d001106"
9
9
  },
10
10
  "packages/solid/package.json": {
11
- "bytes": 310,
12
- "sha256": "5da76ecbbb9ba781fc827191b33a42b25ddcfd8ba1838c0256f82ea1c6838b84"
11
+ "bytes": 408,
12
+ "sha256": "ecea265a255dac75a48480dc22fbe29bd0df9f70892a05b4ac0383f0c19d387a"
13
+ },
14
+ "packages/solid/src/build.ts": {
15
+ "bytes": 832,
16
+ "sha256": "39c534b13c030926e6fd62c83eb2ab9708c33c3274b71fb971001f3d1afe08fa"
13
17
  },
14
18
  "packages/solid/src/index.ts": {
15
19
  "bytes": 695,
@@ -37,7 +41,7 @@
37
41
  "sha256": "9f4d9362cb4cc38c0f4e705295789a0cbfec46ffdd007e0541b9441a7c3003a7"
38
42
  },
39
43
  "dependencyLock": {
40
- "bytes": 28357,
41
- "sha256": "65e3dbd01be4a1889367690faf1a9c3f08fb31d22dbd273d9bb9f39dd6baa6fb"
44
+ "bytes": 28430,
45
+ "sha256": "9d321f65b9224958ec99286628d652232a16e3242ea9536a396bceaf72892460"
42
46
  }
43
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bun-native/solid",
3
- "version": "0.33.1",
3
+ "version": "0.33.3",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -14,12 +14,15 @@
14
14
  },
15
15
  "exports": {
16
16
  ".": "./src/index.ts",
17
- "./jsx-runtime": "./src/jsx.ts"
17
+ "./jsx-runtime": "./src/jsx.ts",
18
+ "./build": "./src/build.ts"
18
19
  },
19
20
  "description": "SolidJS renderer for Bun Native desktop windows.",
20
21
  "dependencies": {
21
- "@bun-native/core": "0.33.1",
22
- "@bun-native/renderer": "0.33.1"
22
+ "@babel/core": "7.29.7",
23
+ "@bun-native/core": "0.33.3",
24
+ "babel-preset-solid": "1.9.16",
25
+ "@bun-native/renderer": "0.33.3"
23
26
  },
24
27
  "peerDependencies": {
25
28
  "solid-js": "1.9.18"
package/src/build.ts ADDED
@@ -0,0 +1,21 @@
1
+ import { transformSync } from '@babel/core'
2
+ import solid from 'babel-preset-solid'
3
+
4
+ /**
5
+ * The build-time half of the Solid adapter (`@bun-native/solid/build`): the
6
+ * official Solid universal JSX transform. The CLI loads it from the project only
7
+ * for Solid builds, so React projects never install Babel. Project or Babel
8
+ * configuration cannot select DOM output.
9
+ */
10
+ export function transformSolid(source: string, filename: string): string {
11
+ const result = transformSync(source, {
12
+ filename,
13
+ babelrc: false,
14
+ configFile: false,
15
+ sourceMaps: false,
16
+ parserOpts: { plugins: ['typescript', 'jsx'] },
17
+ presets: [[solid, { generate: 'universal', moduleName: '@bun-native/solid', dev: false }]],
18
+ })
19
+ if (!result?.code) throw new Error('Solid JSX transform produced no application code')
20
+ return result.code
21
+ }