Skip to content

Commit

Permalink
migrate to valtio v2-beta (#10)
Browse files Browse the repository at this point in the history
* migrate to valtio v2-beta

* update CHANGELOG

* update csb ci.json

* update ci/cd

* use canary/next versions in examples
  • Loading branch information
dai-shi authored Mar 23, 2024
1 parent 66e3c6d commit c7251e7
Show file tree
Hide file tree
Showing 14 changed files with 77 additions and 107 deletions.
2 changes: 1 addition & 1 deletion .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"buildCommand": "compile",
"sandboxes": ["new", "react-typescript-react-ts"],
"node": "14"
"node": "18"
}
14 changes: 10 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: DerYeger/pnpm-setup-action@master
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.2.0
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- run: pnpm install --frozen-lockfile
- run: npm test
- run: npm run compile
- run: |
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc
npm publish
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: DerYeger/pnpm-setup-action@master
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.2.0
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- run: pnpm install --frozen-lockfile
- run: npm test
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Change Log

## [Unreleased]
### Added
- migrate to valtio v2-beta #10

## [0.4.3] - 2023-02-26
### Changed
Expand Down
6 changes: 3 additions & 3 deletions examples/01_typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"dependencies": {
"@types/react": "latest",
"@types/react-dom": "latest",
"react": "latest",
"react-dom": "latest",
"react": "canary",
"react-dom": "canary",
"react-scripts": "latest",
"typescript": "latest",
"valtio": "latest",
"valtio": "next",
"valtio-signal": "latest"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions examples/02_props/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"dependencies": {
"@types/react": "latest",
"@types/react-dom": "latest",
"react": "latest",
"react-dom": "latest",
"react": "canary",
"react-dom": "canary",
"react-scripts": "latest",
"typescript": "latest",
"valtio": "latest",
"valtio": "next",
"valtio-signal": "latest"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions examples/03_async/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"dependencies": {
"@types/react": "latest",
"@types/react-dom": "latest",
"react": "latest",
"react-dom": "latest",
"react": "canary",
"react-dom": "canary",
"react-scripts": "latest",
"typescript": "latest",
"valtio": "latest",
"valtio": "next",
"valtio-signal": "latest"
},
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/03_async/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// <reference types="react/experimental" />
/** @jsxImportSource valtio-signal */

import { Suspense } from 'react';
Expand Down
6 changes: 3 additions & 3 deletions examples/04_todos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"dependencies": {
"@types/react": "latest",
"@types/react-dom": "latest",
"react": "latest",
"react-dom": "latest",
"react": "canary",
"react-dom": "canary",
"react-scripts": "latest",
"typescript": "latest",
"valtio": "latest",
"valtio": "next",
"valtio-signal": "latest"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion examples/04_todos/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { memo } from 'react';
import type { FormEvent } from 'react';
import { proxy } from 'valtio/vanilla';
import { derive } from 'valtio/utils';
import { derive } from 'derive-valtio';
import { useSnapshot } from 'valtio';
import { $ } from 'valtio-signal';

Expand Down
6 changes: 3 additions & 3 deletions examples/05_setvalue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"dependencies": {
"@types/react": "latest",
"@types/react-dom": "latest",
"react": "latest",
"react-dom": "latest",
"react": "canary",
"react-dom": "canary",
"react-scripts": "latest",
"typescript": "latest",
"valtio": "latest",
"valtio": "next",
"valtio-signal": "latest"
},
"scripts": {
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"@types/react-dom": "^18.2.22",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"derive-valtio": "^0.1.0",
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -87,18 +88,18 @@
"microbundle": "^0.15.1",
"npm-run-all": "^4.1.5",
"prettier": "^3.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^18.3.0-canary-670811593-20240322",
"react-dom": "^18.3.0-canary-670811593-20240322",
"ts-jest": "^29.1.2",
"ts-loader": "^9.5.1",
"typescript": "^5.4.3",
"valtio": "^1.13.2",
"valtio": "^2.0.0-beta.2",
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.4"
},
"peerDependencies": {
"react": ">=17.0.0",
"valtio": ">=1.0.0"
"react": "*",
"valtio": ">=2.0.0-beta.1"
}
}
70 changes: 30 additions & 40 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c7251e7

Please sign in to comment.