Skip to content

Commit d76b001

Browse files
committed
fixup! feat(eslint): support the new serializer API
1 parent b6fc4bd commit d76b001

File tree

5 files changed

+7
-34
lines changed

5 files changed

+7
-34
lines changed

.changeset/tricky-peaches-buy.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
'@qwik.dev/core': minor
33
---
44

5-
FEAT: `NoSerializeSymbol`: objects that have this defined will not be serialized
5+
FEAT: `NoSerializeSymbol`: objects that have this symbol will not be serialized
66

7-
FEAT: `SerializerSymbol`: objects that have this defined as a function will get it called with the object as a parameter during serialization. The function should return the data that should be serialized.
8-
Use this to remove cached data, consolidate things etc.
7+
FEAT: `SerializerSymbol`: The framework will use the function defined on object with symbol `SerializeSymbol` for serialization. The function will get called with the object and is expected to returned a serializable object literal representing this object.
8+
9+
Use this to remove data from object which you do not wish to serialize such as: cached data, consolidate things etc.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
"yarn": "please-use-pnpm",
164164
"pnpm": ">=9.0.5"
165165
},
166-
"packageManager": "[email protected]",
166+
"packageManager": "[email protected]+sha512.845196026aab1cc3f098a0474b64dfbab2afe7a1b4e91dd86895d8e4aa32a7a6d03049e2d0ad770bbe4de023a7122fb68c1a1d6e0d033c7076085f9d5d4800d4",
167167
"pnpm": {
168168
"overrides": {
169169
"typescript": "5.4.5",

packages/eslint-plugin-qwik/tests/valid-lexical-scope/valid-no-serialize-symbol.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export interface Value {
2525
export const HelloWorld = component$(() => {
2626
const state: Value = { value: 12, obj1: new NoSerSym(), obj2: new SerSym() };
2727
const ser = useSerializer$({
28-
deserialize: () => new SerSym(),
28+
deserialize: (data: string) => new SerSym(),
2929
serialize: (obj) => obj.toString(),
3030
});
3131

packages/qwik/src/core/shared/shared-serialization.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ export const createSerializationContext = (
847847
});
848848
} else if (obj instanceof Signal) {
849849
/**
850-
* ComputedSignal can be left uncalculated if invalid.
850+
* ComputedSignal can be left un-calculated if invalid.
851851
*
852852
* SerializerSignal is always serialized if it was already calculated.
853853
*/

packages/qwik/src/optimizer/src/qwik-binding-map.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,6 @@ export const QWIK_BINDING_MAP = {
1111
"abi": null,
1212
"platformArchABI": "qwik.darwin-arm64.node"
1313
}
14-
],
15-
"x64": [
16-
{
17-
"platform": "darwin",
18-
"arch": "x64",
19-
"abi": null,
20-
"platformArchABI": "qwik.darwin-x64.node"
21-
}
22-
]
23-
},
24-
"win32": {
25-
"x64": [
26-
{
27-
"platform": "win32",
28-
"arch": "x64",
29-
"abi": "msvc",
30-
"platformArchABI": "qwik.win32-x64-msvc.node"
31-
}
32-
]
33-
},
34-
"linux": {
35-
"x64": [
36-
{
37-
"platform": "linux",
38-
"arch": "x64",
39-
"abi": "gnu",
40-
"platformArchABI": "qwik.linux-x64-gnu.node"
41-
}
4214
]
4315
}
4416
};

0 commit comments

Comments
 (0)