@tanstack/form-core
Advanced tools
Comparing version 0.13.1 to 0.13.3
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import { Store } from '@tanstack/store'; | ||
@@ -3,0 +2,0 @@ import type { DeepKeys, DeepValue, Updater } from './utils'; |
@@ -46,2 +46,4 @@ function functionalUpdate(updater, input) { | ||
function doDelete(parent) { | ||
if (!parent) | ||
return; | ||
if (path.length === 1) { | ||
@@ -63,2 +65,5 @@ const finalPath = path[0]; | ||
if (Array.isArray(parent)) { | ||
if (key >= parent.length) { | ||
return parent; | ||
} | ||
const prefix = parent.slice(0, key); | ||
@@ -65,0 +70,0 @@ return [ |
{ | ||
"name": "@tanstack/form-core", | ||
"version": "0.13.1", | ||
"version": "0.13.3", | ||
"description": "Powerful, type-safe, framework agnostic forms.", | ||
@@ -41,5 +41,5 @@ "author": "tannerlinsley", | ||
"test:eslint": "eslint --ext .ts,.tsx ./src", | ||
"test:types:versions49": "../../node_modules/typescript49/bin/tsc --project tsconfig.legacy.json", | ||
"test:types:versions50": "../../node_modules/typescript50/bin/tsc", | ||
"test:types:versions51": "../../node_modules/typescript51/bin/tsc", | ||
"test:types:versions49": "node ../../node_modules/typescript49/lib/tsc.js --project tsconfig.legacy.json", | ||
"test:types:versions50": "node ../../node_modules/typescript50/lib/tsc.js", | ||
"test:types:versions51": "node ../../node_modules/typescript51/lib/tsc.js", | ||
"test:types:versions52": "tsc", | ||
@@ -46,0 +46,0 @@ "test:types": "pnpm run \"/^test:types:versions.*/\"", |
@@ -73,2 +73,9 @@ import { describe, expect, it } from 'vitest' | ||
}) | ||
it('should delete non-existent paths like a noop', () => { | ||
expect(deleteBy(structure, 'nonexistent')).toEqual(structure) | ||
expect(deleteBy(structure, 'nonexistent.nonexistent')).toEqual(structure) | ||
expect(deleteBy(structure, 'kids.3.name')).toEqual(structure) | ||
expect(deleteBy(structure, 'nonexistent.3.nonexistent')).toEqual(structure) | ||
}) | ||
}) |
@@ -79,2 +79,3 @@ import type { ValidationCause, Validator } from './types' | ||
function doDelete(parent: any): any { | ||
if (!parent) return | ||
if (path.length === 1) { | ||
@@ -99,2 +100,5 @@ const finalPath = path[0]! | ||
if (Array.isArray(parent)) { | ||
if (key >= parent.length) { | ||
return parent | ||
} | ||
const prefix = parent.slice(0, key) | ||
@@ -101,0 +105,0 @@ return [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
341634
5464
0