Skip to content

Commit 228efd5

Browse files
feat/add differentiation when instances swap (#52)
* chore: use more strict deps * chore: disable promise rule * feat: add differentiation when instanes swap * fix: tests
1 parent 854c280 commit 228efd5

File tree

4 files changed

+132
-87
lines changed

4 files changed

+132
-87
lines changed

biome.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"enabled": true,
77
"rules": {
88
"suspicious": {
9-
"noExplicitAny": "warn"
9+
"noExplicitAny": "warn",
10+
"noAsyncPromiseExecutor": "warn"
1011
},
1112
"complexity": {
1213
"noExtraBooleanCast": "warn"

src/constants.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ export const ANINIX_PROJECT_KEY = 'aninix_project_id'
1717
* Used to get Aninix node id on nodes
1818
*/
1919
export const ANINIX_NODE_KEY = 'aninix_node_id'
20+
21+
/**
22+
* Used to get Aninix main node id on nodes
23+
*/
24+
export const ANINIX_MAIN_NODE_KEY = 'aninix_main_node_id'

src/index.test.ts

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,7 @@ describe('mapEntityBlendProperties', () => {
140140
isMask: false,
141141
effects: [],
142142
},
143-
{
144-
projectId: 'test-project',
145-
nodeId: 'test-node',
146-
initialNodeId: 'initial-test-node',
147-
parentNodeId: 'test-parent-node',
148-
}
143+
'test-node'
149144
)
150145
expect(entities).toMatchSnapshot()
151146
expect(relations.toJSON()).toMatchSnapshot()
@@ -179,12 +174,7 @@ describe('mapEntityBlendProperties', () => {
179174
},
180175
],
181176
},
182-
{
183-
projectId: 'test-project',
184-
nodeId: 'test-node',
185-
initialNodeId: 'initial-test-node',
186-
parentNodeId: 'test-parent-node',
187-
}
177+
'test-node'
188178
)
189179
expect(entities).toMatchSnapshot()
190180
expect(relations.toJSON()).toMatchSnapshot()
@@ -218,12 +208,7 @@ describe('mapEntityBlendProperties', () => {
218208
},
219209
],
220210
},
221-
{
222-
projectId: 'test-project',
223-
nodeId: 'test-node',
224-
initialNodeId: 'initial-test-node',
225-
parentNodeId: 'test-parent-node',
226-
}
211+
'test-node'
227212
)
228213
expect(entities).toMatchSnapshot()
229214
expect(relations.toJSON()).toMatchSnapshot()
@@ -246,12 +231,7 @@ describe('mapEntityBlendProperties', () => {
246231
},
247232
],
248233
},
249-
{
250-
projectId: 'test-project',
251-
nodeId: 'test-node',
252-
initialNodeId: 'initial-test-node',
253-
parentNodeId: 'test-parent-node',
254-
}
234+
'test-node'
255235
)
256236
expect(entities).toMatchSnapshot()
257237
expect(relations.toJSON()).toMatchSnapshot()
@@ -274,12 +254,7 @@ describe('mapEntityBlendProperties', () => {
274254
},
275255
],
276256
},
277-
{
278-
projectId: 'test-project',
279-
nodeId: 'test-node',
280-
initialNodeId: 'initial-test-node',
281-
parentNodeId: 'test-parent-node',
282-
}
257+
'test-node'
283258
)
284259
expect(entities).toMatchSnapshot()
285260
expect(relations.toJSON()).toMatchSnapshot()
@@ -339,12 +314,7 @@ describe('mapEntityBlendProperties', () => {
339314
},
340315
],
341316
},
342-
{
343-
projectId: 'test-project',
344-
nodeId: 'test-node',
345-
initialNodeId: 'initial-test-node',
346-
parentNodeId: 'test-parent-node',
347-
}
317+
'test-node'
348318
)
349319
expect(entities).toMatchSnapshot()
350320
expect(relations.toJSON()).toMatchSnapshot()

0 commit comments

Comments
 (0)