diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json new file mode 100644 index 0000000..791b64e --- /dev/null +++ b/.codesandbox/ci.json @@ -0,0 +1,6 @@ +{ + "installCommand": "codesandbox-ci", + "buildCommand": "build", + "sandboxes": ["/example"], + "node": "18" +} diff --git a/.codesandbox/ci.sh b/.codesandbox/ci.sh new file mode 100755 index 0000000..f87dae3 --- /dev/null +++ b/.codesandbox/ci.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# CodeSandbox CI doesn't have the `alias` or `source` commands available, +# so we can't use the line below (the preferred installation method). +# curl -fsSL https://bun.sh/install | bash + +# We can use an npm global install, but we have to override the +# npm_config_user_agent environment variable. Otherwise, Bun throws +# an error about not being compatible with Yarn because it sees Yarn's +# user agent string since CodeSandbox always runs `yarn run ...`. +# See https://github.com/oven-sh/bun/issues/2530. +npm_config_user_agent="npm/? node/?" npm install --global bun +# Use this to pin Bun version: +# npm_config_user_agent="npm/? node/?" npm install --global bun@1.1.29 + +# Now we can get on with business... +bun install --frozen-lockfile diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..4c6de87 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: [jakeboone02] diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..7adad94 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,12 @@ +name: CI +on: [push, pull_request, workflow_dispatch] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v1 + - run: bun install --frozen-lockfile + - run: bun --bun run build diff --git a/README.md b/README.md index 046de4d..d8c35fe 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Official [react-querybuilder](https://npmjs.com/package/react-querybuilder) comp > > This package is only compatible with Chakra UI **version 2**. > -> For Chakra UI version 3 compatibility, use [`@react-querybuilder/chakra`](https://npmjs.com/package/@react-querybuilder/chakra). +> For Chakra UI version 3 compatibility, use [`@react-querybuilder/chakra`](https://npmjs.com/package/@react-querybuilder/chakra) >= 8. - [Demo (using latest Chakra UI)](https://react-querybuilder.js.org/demo/chakra) - [Full documentation](https://react-querybuilder.js.org/) diff --git a/example/src/App.tsx b/example/src/App.tsx index 0cd8b81..0c37a7e 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -1,5 +1,5 @@ import { ChakraProvider, extendTheme } from '@chakra-ui/react'; -import { QueryBuilderChakra } from '@react-querybuilder/chakra'; +import { QueryBuilderChakra } from '@react-querybuilder/chakra2'; import { useState } from 'react'; import type { Field, RuleGroupType } from 'react-querybuilder'; import { QueryBuilder, formatQuery } from 'react-querybuilder'; diff --git a/package.json b/package.json index 8ba387e..edf3b48 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,8 @@ "typecheck:watch": "tsc --noEmit --watch", "pretty-print": "prettier --config prettier.config.mjs --write '*.*' './src/**' './dev/**' './example/**'", "pretty-check": "prettier --config prettier.config.mjs --check '*.*' './src/**' './dev/**' './example/**'", - "are-the-types-wrong": "attw --format table-flipped --pack ." + "are-the-types-wrong": "attw --format table-flipped --pack .", + "codesandbox-ci": "bash .codesandbox/ci.sh" }, "devDependencies": { "@arethetypeswrong/cli": "^0.16.4",