@player-ui/player 0.11.0-next.0 → 0.11.0-next.2
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/dist/Player.native.js +0 -1
- package/dist/Player.native.js.map +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/__tests__/validation.test.ts +3 -13
- package/src/binding/__tests__/parser.bench.ts +1 -1
- package/src/controllers/flow/__tests__/flow.test.ts +1 -1
- package/src/expressions/utils.ts +0 -1
- package/src/player.ts +1 -1
- package/src/view/builder/index.ts +0 -3
- package/src/view/resolver/__tests__/edgecases.test.ts +0 -2
- package/src/view/resolver/types.ts +0 -1
package/package.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"types"
|
|
7
7
|
],
|
|
8
8
|
"name": "@player-ui/player",
|
|
9
|
-
"version": "0.11.0-next.
|
|
9
|
+
"version": "0.11.0-next.2",
|
|
10
10
|
"main": "dist/cjs/index.cjs",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@player-ui/partial-match-registry": "0.11.0-next.
|
|
13
|
-
"@player-ui/make-flow": "0.11.0-next.
|
|
14
|
-
"@player-ui/types": "0.11.0-next.
|
|
12
|
+
"@player-ui/partial-match-registry": "0.11.0-next.2",
|
|
13
|
+
"@player-ui/make-flow": "0.11.0-next.2",
|
|
14
|
+
"@player-ui/types": "0.11.0-next.2",
|
|
15
15
|
"@types/dlv": "^1.1.4",
|
|
16
16
|
"dequal": "^2.0.2",
|
|
17
17
|
"dlv": "^1.1.3",
|
|
@@ -1316,7 +1316,9 @@ describe("validation", () => {
|
|
|
1316
1316
|
|
|
1317
1317
|
expect(currentValidations).toHaveLength(5);
|
|
1318
1318
|
expect(
|
|
1319
|
-
currentValidations[0]
|
|
1319
|
+
currentValidations[0]?.validation.value[
|
|
1320
|
+
VALIDATION_PROVIDER_NAME_SYMBOL
|
|
1321
|
+
],
|
|
1320
1322
|
).toBe("schema");
|
|
1321
1323
|
});
|
|
1322
1324
|
|
|
@@ -3006,23 +3008,11 @@ describe("Validations with multiple inputs", () => {
|
|
|
3006
3008
|
});
|
|
3007
3009
|
|
|
3008
3010
|
let player: Player;
|
|
3009
|
-
let validationController: ValidationController;
|
|
3010
|
-
let schema: SchemaController;
|
|
3011
|
-
let parser: BindingParser;
|
|
3012
3011
|
|
|
3013
3012
|
beforeEach(() => {
|
|
3014
3013
|
player = new Player({
|
|
3015
3014
|
plugins: [new TrackBindingPlugin(), new TestExpressionPlugin()],
|
|
3016
3015
|
});
|
|
3017
|
-
player.hooks.validationController.tap("test", (vc) => {
|
|
3018
|
-
validationController = vc;
|
|
3019
|
-
});
|
|
3020
|
-
player.hooks.schema.tap("test", (s) => {
|
|
3021
|
-
schema = s;
|
|
3022
|
-
});
|
|
3023
|
-
player.hooks.bindingParser.tap("test", (p) => {
|
|
3024
|
-
parser = p;
|
|
3025
|
-
});
|
|
3026
3016
|
|
|
3027
3017
|
player.start(flowWithThings);
|
|
3028
3018
|
});
|
package/src/expressions/utils.ts
CHANGED
package/src/player.ts
CHANGED
|
@@ -50,7 +50,7 @@ export interface PlayerPlugin {
|
|
|
50
50
|
apply: (player: Player) => void;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
54
54
|
export interface ExtendedPlayerPlugin<
|
|
55
55
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
56
56
|
Assets = void,
|
|
@@ -51,7 +51,6 @@ export class Builder {
|
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
values.forEach((v) => {
|
|
54
|
-
// eslint-disable-next-line no-param-reassign
|
|
55
54
|
v.parent = m;
|
|
56
55
|
});
|
|
57
56
|
|
|
@@ -89,7 +88,6 @@ export class Builder {
|
|
|
89
88
|
path: Node.PathSegment | Node.PathSegment[],
|
|
90
89
|
child: Node.Node,
|
|
91
90
|
) {
|
|
92
|
-
// eslint-disable-next-line no-param-reassign
|
|
93
91
|
child.parent = node as Node.Node;
|
|
94
92
|
|
|
95
93
|
const newChild: Node.Child = {
|
|
@@ -97,7 +95,6 @@ export class Builder {
|
|
|
97
95
|
value: child,
|
|
98
96
|
};
|
|
99
97
|
|
|
100
|
-
// eslint-disable-next-line no-param-reassign
|
|
101
98
|
node.children = node.children || [];
|
|
102
99
|
node.children.push(newChild);
|
|
103
100
|
|
|
@@ -96,7 +96,6 @@ describe("Dynamic AST Transforms", () => {
|
|
|
96
96
|
// We updated something, set the children of the newNode to have the correct parent
|
|
97
97
|
newNode.children?.forEach((child) => {
|
|
98
98
|
// Don't worry about mutating here any new children are ones we created above
|
|
99
|
-
// eslint-disable-next-line no-param-reassign
|
|
100
99
|
child.value.parent = newNode;
|
|
101
100
|
});
|
|
102
101
|
}
|
|
@@ -608,7 +607,6 @@ describe("Root AST Immutability", () => {
|
|
|
608
607
|
resolver.hooks.beforeResolve.tap("beforeResolve", (node) => {
|
|
609
608
|
if (node?.type !== NodeType.View) return node;
|
|
610
609
|
|
|
611
|
-
// eslint-disable-next-line no-param-reassign
|
|
612
610
|
node.value.type = "not-collection";
|
|
613
611
|
return node;
|
|
614
612
|
});
|
|
@@ -33,7 +33,6 @@ export interface PlayerUtils {
|
|
|
33
33
|
findPlugin<Plugin = unknown>(symbol: symbol): Plugin | undefined;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
37
36
|
export declare namespace Resolve {
|
|
38
37
|
export interface Validation {
|
|
39
38
|
/** Fetch the data-type for the given binding */
|