@player-ui/player
Advanced tools
Comparing version 0.9.2--canary.524.17782 to 0.9.2--canary.536.18200
@@ -9,8 +9,8 @@ { | ||
"name": "@player-ui/player", | ||
"version": "0.9.2--canary.524.17782", | ||
"version": "0.9.2--canary.536.18200", | ||
"main": "dist/cjs/index.cjs", | ||
"dependencies": { | ||
"@player-ui/partial-match-registry": "0.9.2--canary.524.17782", | ||
"@player-ui/make-flow": "0.9.2--canary.524.17782", | ||
"@player-ui/types": "0.9.2--canary.524.17782", | ||
"@player-ui/partial-match-registry": "0.9.2--canary.536.18200", | ||
"@player-ui/make-flow": "0.9.2--canary.536.18200", | ||
"@player-ui/types": "0.9.2--canary.536.18200", | ||
"@types/dlv": "^1.1.4", | ||
@@ -17,0 +17,0 @@ "dequal": "^2.0.2", |
@@ -85,3 +85,3 @@ import type { | ||
let value = ch; | ||
let value: string | number = ch; | ||
@@ -97,2 +97,4 @@ while (next()) { | ||
if (value) { | ||
const maybeNumber = Number(value); | ||
value = isNaN(maybeNumber) ? value : maybeNumber; | ||
return toValue(value); | ||
@@ -265,2 +267,10 @@ } | ||
if (bracketSegment?.name === "Value") { | ||
const maybeNumber = Number(bracketSegment.value); | ||
bracketSegment.value = | ||
isNaN(maybeNumber) || String(maybeNumber) !== bracketSegment.value | ||
? bracketSegment.value | ||
: maybeNumber; | ||
} | ||
while (bracketSegment !== undefined) { | ||
@@ -267,0 +277,0 @@ parsed.push(bracketSegment); |
@@ -8,3 +8,3 @@ import { describe, test, expect, vitest } from "vitest"; | ||
const testModel = { | ||
export const testModel = { | ||
foo: { | ||
@@ -27,7 +27,10 @@ pets: [ | ||
}, | ||
}; | ||
} as const; | ||
const testCases: Array<[string, string]> = [ | ||
export const testCases: Array<[string, string]> = [ | ||
["foo.bar", "foo.bar"], | ||
["foo.pets.1.name", "foo.pets.1.name"], | ||
["foo.pets.01.name", "foo.pets.1.name"], | ||
["foo.pets['01'].name", "foo.pets.01.name"], | ||
["foo.pets[01].name", "foo.pets.1.name"], | ||
['foo.pets[name = "frodo"].type', "foo.pets.2.type"], | ||
@@ -34,0 +37,0 @@ ['foo.pets["name" = "sprinkles"].type', "foo.pets.4.type"], |
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 too big to display
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 too big to display
Sorry, the diff of this file is not supported yet
2843298
217
46210
+ Added@player-ui/make-flow@0.9.2--canary.536.18200(transitive)
+ Added@player-ui/partial-match-registry@0.9.2--canary.536.18200(transitive)
+ Added@player-ui/types@0.9.2--canary.536.18200(transitive)
- Removed@player-ui/make-flow@0.9.2--canary.524.17782(transitive)
- Removed@player-ui/partial-match-registry@0.9.2--canary.524.17782(transitive)
- Removed@player-ui/types@0.9.2--canary.524.17782(transitive)
Updated@player-ui/partial-match-registry@0.9.2--canary.536.18200