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

chore: add keywords #18

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This package draws strong inspiration from [KnockoutJS](https://github.com/knock

## Run this monorepo locally

Please check the root [`package.json`](https://github.com/kaisergeX/signal-proxy/blob/main/package.json#L29)'s `engines` field for the env requirement, then run:
Please check the root [`package.json`](https://github.com/kaisergeX/signal-proxy/blob/main/package.json#L36)'s `engines` field for the env requirement, then run:

```
pnpm i
Expand Down
6 changes: 3 additions & 3 deletions apps/playground/src/routes/signal/route.lazy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const [globalCount, setGlobalCount] = playgroundSignal;
function PlaygroundChild1() {
const [multiple, setMultiple] = useSignal(1);
const [count, setCount] = useState(0);
const isUnSafeInterger = multiple() >= Number.MAX_SAFE_INTEGER;
const isSafeInterger = Number.isSafeInteger(multiple());

useSignalEffect(() => {
console.log(
Expand Down Expand Up @@ -68,9 +68,9 @@ function PlaygroundChild1() {
className="button"
type="button"
onClick={() => setMultiple((v) => v * 4)}
disabled={isUnSafeInterger}
disabled={!isSafeInterger}
>
{isUnSafeInterger ? 'Greater than MAX_SAFE_INTEGER' : 'Local multiplier 4x'}
{isSafeInterger ? 'Local multiplier 4x' : 'Greater than MAX_SAFE_INTEGER'}
</button>
<button
className="button-secondary"
Expand Down
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@
"name": "signal-proxy",
"private": true,
"repository": "https://github.com/kaisergeX/signal-proxy.git",
"keywords": [
"signal",
"proxy",
"reactive",
"reactivity",
"typescript"
],
"scripts": {
"build": "turbo build",
"build:pkgs": "turbo build --filter=./packages/*",
"dev": "turbo dev",
"lint": "turbo lint",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"clean": "turbo run clean && rm -rf node_modules",
"clean": "rm -rf {node_modules,.turbo} && pnpm -r exec rm -rf {node_modules,dist,.turbo}",
"publish:npm": "turbo run build lint --filter=./packages/signal && pnpm publish --filter './packages/signal' --access public && changeset tag",
"publish:jsr": "cd ./packages/signal && pnpm dlx jsr publish"
},
Expand Down
9 changes: 8 additions & 1 deletion packages/signal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
"description": "A simple reactive system for your Javascript application",
"author": "Vu Duc Khai",
"license": "MIT",
"keywords": [
"signal",
"proxy",
"reactive",
"reactivity",
"typescript"
],
"repository": {
"type": "git",
"url": "https://github.com/kaisergeX/signal-proxy.git",
Expand Down Expand Up @@ -41,4 +48,4 @@
"vite": "^5.4.1",
"vite-plugin-dts": "^4.0.3"
}
}
}