@feng3d/reactivity 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feng3d/reactivity",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "反应式,主要用于feng3d中的数据驱动。",
5
5
  "homepage": "https://feng3d.com/reactivity",
6
6
  "author": "feng",
@@ -46,24 +46,23 @@
46
46
  "tsconfig.json"
47
47
  ],
48
48
  "devDependencies": {
49
- "@eslint/js": "^9.0.0",
50
- "@feng3d/cli": "^0.0.19",
49
+ "@eslint/js": "9.0.0",
51
50
  "@types/node": "^22.15.19",
52
51
  "@typescript-eslint/eslint-plugin": "8.32.1",
53
52
  "@typescript-eslint/parser": "8.32.1",
54
53
  "cross-env": "7.0.3",
55
54
  "eslint": "9.26.0",
56
- "globals": "^14.0.0",
55
+ "globals": "14.0.0",
57
56
  "rimraf": "6.0.1",
58
- "tslib": "^2.8.1",
59
- "typedoc": "^0.28.4",
57
+ "tslib": "2.8.1",
58
+ "typedoc": "0.28.4",
60
59
  "typescript": "5.8.3",
61
- "typescript-eslint": "^8.32.1",
62
- "vite": "^6.3.5",
63
- "vitest": "^3.1.3",
64
- "concurrently": "^9.1.2",
65
- "husky": "^9.1.7",
66
- "lint-staged": "^15.2.10"
60
+ "typescript-eslint": "8.32.1",
61
+ "vite": "6.3.5",
62
+ "vitest": "3.1.3",
63
+ "concurrently": "9.1.2",
64
+ "husky": "9.1.7",
65
+ "lint-staged": "15.2.10"
67
66
  },
68
67
  "lint-staged": {
69
68
  "*.{js,ts}": [
@@ -448,7 +448,6 @@ export const arrayInstrumentations: Record<string | symbol, Function> = <any>{
448
448
  */
449
449
  toReversed()
450
450
  {
451
- // @ts-expect-error user code may run in es2016+
452
451
  return reactiveReadArray(this).toReversed();
453
452
  },
454
453
 
@@ -465,7 +464,6 @@ export const arrayInstrumentations: Record<string | symbol, Function> = <any>{
465
464
  */
466
465
  toSorted(comparer?: (a: unknown, b: unknown) => number)
467
466
  {
468
- // @ts-expect-error user code may run in es2016+
469
467
  return reactiveReadArray(this).toSorted(comparer);
470
468
  },
471
469
 
@@ -653,7 +651,7 @@ function apply(
653
651
  {
654
652
  const arr = shallowReadArray(self);
655
653
  const needsWrap = arr !== self;
656
- const methodFn = arr[method];
654
+ const methodFn = arr[method] as Function;
657
655
 
658
656
  // #11759
659
657
  // If the method being called is from a user-extended Array, the arguments will be unknown
package/src/index.ts CHANGED
@@ -6,5 +6,4 @@ export { isProxy, isReactive, reactive, type Reactive, type UnReadonly } from '.
6
6
  export { ReactiveObject } from './ReactiveObject';
7
7
  export { forceTrack, noTrack } from './Reactivity';
8
8
  export { isRef, ref, type Ref } from './ref';
9
- export { toRaw } from './shared/general';
10
-
9
+ export { toRaw } from './shared/general';
package/tsconfig.json CHANGED
@@ -1,20 +1,21 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "target": "ES5",
4
- "module": "CommonJS",
5
- "noImplicitAny": false,
6
- "sourceMap": true,
7
- "declarationMap": true,
8
- "declaration": true,
9
- "experimentalDecorators": true,
3
+ "target": "ESNext",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "lib": ["ESNext", "DOM", "DOM.Iterable"],
10
7
  "emitDeclarationOnly": true,
11
- "lib": [
12
- "ES2015",
13
- "DOM",
14
- ],
15
- "outDir": "lib"
8
+ "declaration": true,
9
+ "declarationMap": true,
10
+ "rootDir": "src",
11
+ "outDir": "lib",
12
+ "esModuleInterop": true,
13
+ "allowSyntheticDefaultImports": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "skipLibCheck": true,
16
+ "resolveJsonModule": true,
17
+ "isolatedModules": true
16
18
  },
17
- "include": [
18
- "src/**/*.ts"
19
- ]
20
- }
19
+ "include": ["src/**/*.ts"],
20
+ "exclude": ["node_modules", "dist", "lib", "public"]
21
+ }