Skip to content

Commit d867e84

Browse files
committed
feat: v1.0.0
1 parent 936dd68 commit d867e84

11 files changed

+180
-992
lines changed

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "veact",
3-
"version": "1.0.0-rc.1",
3+
"version": "1.0.0",
44
"description": "Mutable state enhancer library for React by @vue/reactivity",
55
"keywords": [
66
"React",
@@ -50,7 +50,7 @@
5050
"react-dom": "^16.8.0 || ^17 || ^18 || ^19"
5151
},
5252
"dependencies": {
53-
"@vue/reactivity": "^3.5.0-rc.1"
53+
"@vue/reactivity": ">=3.5"
5454
},
5555
"devDependencies": {
5656
"@eslint/js": "^9.x",
@@ -64,14 +64,14 @@
6464
"eslint-config-prettier": "^9.x",
6565
"eslint-plugin-prettier": "^5.x",
6666
"globals": "^15.9.0",
67-
"jsdom": "^25.x",
67+
"happy-dom": "^15.x",
6868
"prettier": "^3.x",
6969
"react": "^18.x",
7070
"react-dom": "^18.x",
7171
"typescript": "^5.5.4",
7272
"typescript-eslint": "^8.x",
7373
"vite": "^5.x",
74-
"vite-plugin-dts": "^4.0.3",
74+
"vite-plugin-dts": "^4.1.0",
7575
"vitest": "^2.x"
7676
}
7777
}

pnpm-lock.yaml

+141-429
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/_utils.ts

-45
Original file line numberDiff line numberDiff line change
@@ -10,48 +10,3 @@ export type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N
1010

1111
export const increment = (s: number) => s + 1
1212
export const useForceUpdate = () => useReducer(increment, 0)[1]
13-
14-
// compare whether a value has changed, accounting for NaN.
15-
export const hasChanged = (value: any, oldValue: any): boolean => {
16-
return value !== oldValue && (value === value || oldValue === oldValue)
17-
}
18-
19-
export const isArray = Array.isArray
20-
export const objectToString = Object.prototype.toString
21-
export const toTypeString = (value: unknown): string => {
22-
return objectToString.call(value)
23-
}
24-
export const isMap = (value: unknown): value is Map<any, any> => {
25-
return toTypeString(value) === '[object Map]'
26-
}
27-
export const isSet = (value: unknown): value is Set<any> => {
28-
return toTypeString(value) === '[object Set]'
29-
}
30-
export const isDate = (value: unknown): value is Date => {
31-
return value instanceof Date
32-
}
33-
export const isFunction = (value: unknown): value is (...args: any[]) => any => {
34-
return typeof value === 'function'
35-
}
36-
export const isString = (value: unknown): value is string => {
37-
return typeof value === 'string'
38-
}
39-
export const isSymbol = (value: unknown): value is symbol => {
40-
return typeof value === 'symbol'
41-
}
42-
export const isObject = (value: unknown): value is Record<any, any> => {
43-
return value !== null && typeof value === 'object'
44-
}
45-
export const isPlainObject = (value: unknown): value is object => {
46-
return toTypeString(value) === '[object Object]'
47-
}
48-
export const isPromise = <T = any>(value: unknown): value is Promise<T> => {
49-
return isObject(value) && isFunction(value.then) && isFunction(value.catch)
50-
}
51-
52-
export const removeArrayItem = <T>(array: T[], element: T) => {
53-
const i = array.indexOf(element)
54-
if (i > -1) {
55-
array.splice(i, 1)
56-
}
57-
}

src/watch-bak/patch.ts

-83
This file was deleted.

src/watch-bak/type.ts

-21
This file was deleted.

0 commit comments

Comments
 (0)