Skip to content

Commit

Permalink
feat(packages/solid): Support Solid via @gqty/solid (#1758)
Browse files Browse the repository at this point in the history
* feat(packages/solid): inital commit with tests and examples

* fix(ci): build errors

* chore(packages/solid): update peer deps

* chore(examples/solid): rename components

* fix(package/solid): clear selections after each fetch

* chore: deps and file structure cleanup

* fix(package/react): test sub-selection for null and empty arrays

* fix(package/solid): added more tests and enhanced suspense support

---------

Co-authored-by: Luboš Matejčík <[email protected]>
  • Loading branch information
vicary and lubosmato committed Aug 24, 2024
1 parent 8bf252e commit 3297a2d
Show file tree
Hide file tree
Showing 69 changed files with 4,881 additions and 451 deletions.
6 changes: 6 additions & 0 deletions .changeset/honest-fishes-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@gqty/solid': minor
'@gqty/cli': minor
---

Improves Solid support using createResource over createSignal
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ jobs:
run: node scripts/test-esm.mjs

- name: Test everything
run: pnpm test:ci
run: pnpm test
6 changes: 2 additions & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm --quiet dlx pretty-quick --staged

pnpm --quiet dlx sort-package-json --quiet packages/*/package.json && git add packages/*/package.json
pnpm --quiet dlx sort-package-json --quiet packages/*/package.json && \
git add packages/*/package.json
1 change: 0 additions & 1 deletion examples/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"bob-tsm": "^1.1.2",
"concurrently": "^8.2.2",
"cross-env": "^7.0.3",
"esbuild": "^0.23.0",
"jest": "^29.7.0",
"open-cli": "^8.0.0",
"wait-on": "^7.2.0"
Expand Down
9 changes: 9 additions & 0 deletions examples/solid/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# GQty Solid Example

Run the example with the following commands:

```bash
cd examples/solid
pnpm install
pnpm dev
```
16 changes: 16 additions & 0 deletions examples/solid/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link rel="shortcut icon" type="image/ico" href="/src/assets/favicon.ico" />
<title>Solid App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>

<script src="/src/index.tsx" type="module"></script>
</body>
</html>
30 changes: 30 additions & 0 deletions examples/solid/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "@gqty/example-solid",
"version": "0.0.0-development",
"type": "module",
"private": true,
"author": "Vicary Archangel <[email protected]>",
"scripts": {
"start": "vite",
"dev": "vite",
"build": "vite build",
"serve": "vite preview"
},
"license": "MIT",
"devDependencies": {
"@tailwindcss/typography": "^0.5.13",
"autoprefixer": "^10.4.19",
"graphql": "^16.8.1",
"postcss": "^8.4.38",
"solid-devtools": "^0.29.2",
"tailwindcss": "^3.4.3",
"typescript": "^5.3.3",
"vite": "^5.0.11",
"vite-plugin-solid": "^2.8.2"
},
"dependencies": {
"@gqty/solid": "workspace:^",
"gqty": "workspace:^",
"solid-js": "^1.8.11"
}
}
Loading

0 comments on commit 3297a2d

Please sign in to comment.