Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One #412

Draft
wants to merge 56 commits into
base: main
Choose a base branch
from
Draft

One #412

Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
f9f7f87
fix: respect typescript null reference
RodrigoHamuy Oct 24, 2022
ff9f7a7
chore: migrate to pnpm + package updates
dbismut Nov 23, 2022
48aaf54
fix: properly handle the panel's height
dbismut Nov 23, 2022
73d2c6a
chore: upgrade zustand
dbismut Nov 23, 2022
98ca2c0
chore: remove cypress for now
dbismut Nov 23, 2022
d324808
demo: update deps for @react-three
dbismut Nov 23, 2022
55a5755
chore: upgrade mathjs
dbismut Nov 23, 2022
e0f45c9
chore: upgrade react-dropzone
dbismut Nov 23, 2022
c8cd3a0
fix: remove cypress
dbismut Nov 23, 2022
0f2851b
fix: remove useless react imports
dbismut Nov 23, 2022
1893f47
fix: add typescript parser (not sure it's necessary)
dbismut Nov 23, 2022
0325b67
chore: cleaning
dbismut Nov 23, 2022
2f89939
fix: wip update to zustand v4
dbismut Nov 24, 2022
a497ca1
chore: use fireImmediately: true in store subscriptions
dbismut Nov 24, 2022
85289cf
chore: rename option transient to reactive
dbismut Nov 24, 2022
1ed7dc8
demo: cleaning and add new react18 demo
dbismut Nov 25, 2022
36de9b2
chore: cleanup
dbismut Nov 26, 2022
dd042d4
chore: trying to use vanilla store
dbismut Nov 26, 2022
abb2978
chore: refactor StoreType into LevaStore using classes
dbismut Nov 27, 2022
28132ec
ci: upgrade github actions
dbismut Nov 27, 2022
33da4b2
stories: negate us of postcss to disable deprecation warning
dbismut Nov 27, 2022
03dbcd5
stories: remove temp fix for TS 4.3.2
dbismut Nov 27, 2022
7c4ade3
Merge remote-tracking branch 'github-desktop-RodrigoHamuy/fix/respect…
dbismut Nov 27, 2022
d7c060e
chore: upgrade deps
dbismut Nov 27, 2022
a55147f
chore: fix deps
dbismut Nov 27, 2022
389e0c2
chore: fix lock file
dbismut Nov 27, 2022
9f79dc3
chore: fix peerDeps
dbismut Nov 28, 2022
59983b4
types: fix type
dbismut Nov 28, 2022
b116bbb
chore: move wdyr dev deps to repo
dbismut Nov 28, 2022
d7d498c
fix: call resizing of the canvas right away
dbismut Nov 29, 2022
bd6eb04
lint: add import/no-relative-package rule
dbismut Nov 29, 2022
a819c37
fix: remove use-zustand
dbismut Nov 29, 2022
6644f27
chore: add import/no-extraneous-dependencies rule
dbismut Nov 29, 2022
14738f0
fix: set the ctx before resizing
dbismut Nov 29, 2022
d4135be
chore: deps updates
dbismut Nov 29, 2022
a56378c
fix: remove cypress
dbismut Nov 29, 2022
7adfc1f
stories: properly capitalize story names
dbismut Nov 29, 2022
7264efb
chore: clean package.json
dbismut Nov 29, 2022
8693037
fix: catch error when path doesn't exist in get
dbismut Nov 29, 2022
42267da
fix: package deps
dbismut Jan 2, 2023
21ecb46
lint: fix import order
dbismut Jan 2, 2023
01f95d9
feat: stringify select keys
dbismut Jan 10, 2023
66a5b30
fix: add pointerEvents auto as parent may have pointer events set to …
dbismut Jan 17, 2023
bf1c726
chore: remove useless React import
dbismut Jan 17, 2023
b872755
chore: it sucks but preconstruct doesn't build without flat deps
dbismut Jan 17, 2023
6ce2203
ci: test
dbismut Jan 17, 2023
fca4099
ci: CI: true
dbismut Jan 17, 2023
cc6c037
ci: upgrade version pnpm in github action
dbismut Jan 17, 2023
ce4da5e
ci: fix husky?
dbismut Jan 17, 2023
1d84b19
fix: remove husky for now
dbismut Jan 17, 2023
d4a83ae
ts: fix react generation?
dbismut Jan 17, 2023
9f6dc25
chore: fix babel
dbismut Jan 17, 2023
faeb005
fix: exports
dbismut Jan 17, 2023
e8f69a8
roll back use-gesture to 10.2.22
dbismut Jan 17, 2023
5bf23fa
ci: trigger
dbismut Jan 17, 2023
5e03da0
fix: fix regression
dbismut Jan 17, 2023
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
5 changes: 5 additions & 0 deletions .changeset/fuzzy-drinks-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'leva': patch
---

fix: respect ts null reference
12 changes: 7 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"extends": "react-app",
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": ["react-app"],
"rules": {
"no-console": "warn"
},
"plugins": ["cypress"],
"env": {
"cypress/globals": true
}
// "plugins": ["cypress"],
// "env": {
// "cypress/globals": true
// }
}
93 changes: 45 additions & 48 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,62 @@
name: CI

on:
push:
branches:
- main
paths:
- '.github/**'
- 'packages/**'
- 'package.json'
- 'yarn.lock'
- '!demo/**'
- '!docs/**'
- '!**.md'
- '!.changeset/**'
- '**/package.json'
- '.changeset/**'
- '.github/workflows/release.yml'

env:
HUSKY: 0 # Bypass husky commit hook for CI

jobs:
build:
name: Build, lint, and test
version:
timeout-minutes: 8
runs-on: ubuntu-latest

steps:
- name: Checkout repo
- name: checkout code repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Use Node
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
node-version: '16'

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
- name: Cache pnpm modules
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
run: yarn --silent
${{ runner.os }}-

- name: Check types
run: yarn tsc

- name: Check formatting
run: yarn prettier

- name: Lint files
run: yarn lint:full

- uses: actions/cache@v2
name: Setup Yarn build cache
id: yarn-build-cache
- uses: pnpm/[email protected]
with:
path: packages/**/dist
key: ${{ runner.os }}-yarn-build-${{ hashFiles('packages/') }}
restore-keys: |
${{ runner.os }}-yarn-build-

- name: Yarn build without cache
if: steps.yarn-build-cache.outputs.cache-hit != 'true'
run: yarn build

- name: Cypress run
run: yarn ci:test
version: 6.9.1
run_install: true

- name: Set up NPM credentials
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create versions PR & prepare publish
id: changesets
uses: changesets/action@master
# if: github.ref == 'refs/heads/master'
with:
version: pnpm ci:version
publish: pnpm ci:publish
# Messages
commit: 'chore(deploy): Release'
title: 'chore(deploy): Release'
env:
# npm publish token required for publishing. Set this in secrets
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# automatically available in actions
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55 changes: 31 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,53 @@ on:
- '**/package.json'
- '.changeset/**'
- '.github/workflows/release.yml'

env:
HUSKY: 0 # Bypass husky commit hook for CI
jobs:
release:
name: Release
version:
timeout-minutes: 8
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
- name: checkout code repository
uses: actions/checkout@v2
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Use Node
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
node-version: '16'

- uses: actions/cache@v2
id: yarn-cache
- name: Cache pnpm modules
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-

- uses: pnpm/[email protected]
with:
version: 6.9.1
run_install: true

- name: Install dependencies
run: yarn install --silent
- name: Set up NPM credentials
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create Release Pull Request or Publish to npm
- name: Create versions PR & prepare publish
id: changesets
uses: changesets/action@v1
uses: changesets/action@master
# if: github.ref == 'refs/heads/master'
with:
version: yarn ci:version
publish: yarn ci:release
commit: 'chore(release): update monorepo packages versions'
title: 'Upcoming Release Changes'
version: pnpm ci:version
publish: pnpm ci:publish
# Messages
commit: 'chore(deploy): Release'
title: 'chore(deploy): Release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# npm publish token required for publishing. Set this in secrets
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# automatically available in actions
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
// Return the altered config
return config
},
typescript: {
reactDocgen: 'none', // temp fix for TS 4.3.2
features: {
postcss: false
},
}
546 changes: 0 additions & 546 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

550 changes: 0 additions & 550 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

This file was deleted.

28 changes: 0 additions & 28 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

768 changes: 0 additions & 768 deletions .yarn/releases/yarn-sources.cjs

This file was deleted.

5 changes: 0 additions & 5 deletions cypress/fixtures/example.json

This file was deleted.

69 changes: 0 additions & 69 deletions cypress/integration/spec.js

This file was deleted.

21 changes: 0 additions & 21 deletions cypress/plugins/index.js

This file was deleted.

1 change: 0 additions & 1 deletion cypress/support/commands.js

This file was deleted.

20 changes: 0 additions & 20 deletions cypress/support/index.js

This file was deleted.

22 changes: 11 additions & 11 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@
},
"dependencies": {
"@radix-ui/react-icons": "^1.0.3",
"@react-three/drei": "^8.8.3",
"@react-three/fiber": "^7.0.26",
"@stitches/react": "1.2.8",
"@react-three/drei": "^9.44.1",
"@react-three/fiber": "^8.9.1",
"@stitches/react": "^1.2.8",
"leva": "*",
"noisejs": "^2.1.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-use": "^17.3.2",
"three": "^0.143.0",
"three": "^0.146.0",
"wouter": "^2.7.5"
},
"devDependencies": {
"@types/react": "^17.0.39",
"@types/react-dom": "^17.0.11",
"@vitejs/plugin-react-refresh": "^1.3.6",
"typescript": "^4.5.5",
"vite": "2.7.13"
"@types/react": "^18.0.25",
"@types/react-dom": "^18.0.9",
"@vitejs/plugin-react": "^2.2.0",
"typescript": "^4.9.3",
"vite": "^3.2.4"
}
}
3 changes: 2 additions & 1 deletion demo/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react'
import { Link, Route } from 'wouter'
import { createStitches } from '@stitches/react'

import styles from './styles.module.css'

import Minimal from './sandboxes/leva-minimal/src/App'
import React18 from './sandboxes/leva-react18/src/App'
import PluginSpring from './sandboxes/leva-plugin-spring/src/App'
import PluginPlot from './sandboxes/leva-plugin-plot/src/App'
import PluginBezier from './sandboxes/leva-plugin-bezier/src/App'
Expand Down Expand Up @@ -34,6 +34,7 @@ const Page = styled('div', {

const links = {
'leva-minimal': Minimal,
'leva-react18': React18,
'leva-busy': Busy,
'leva-advanced-panels': AdvancedPanels,
'leva-scroll': Scroll,
Expand Down
Loading