Skip to content

Commit

Permalink
Merge branch 'main' into 6048_eslint-flag
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryWu1234 authored Nov 22, 2024
2 parents 83909c4 + 34d4324 commit 6953229
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changeset/proud-carrots-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@builder.io/qwik': patch
---

Fix: add subscription when doing `"prop" in store`
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
"build.core": "tsx --require ./scripts/runBefore.ts scripts/index.ts --tsc --build --qwikcity --api --platform-binding",
"build.eslint": "tsx --require ./scripts/runBefore.ts scripts/index.ts --eslint",
"build.full": "tsx --require ./scripts/runBefore.ts scripts/index.ts --tsc --tsc-docs --build --supabaseauthhelpers --api --eslint --qwikcity --qwikworker --qwiklabs --qwikreact --qwikauth --cli --platform-binding --wasm",
"build.local": "tsx --require ./scripts/runBefore.tsscripts/index.ts --tsc --tsc-docs --build --supabaseauthhelpers --api --eslint --qwikcity --qwikworker --qwiklabs --qwikreact --qwikauth --cli --platform-binding-wasm-copy",
"build.local": "tsx --require ./scripts/runBefore.ts scripts/index.ts --tsc --tsc-docs --build --supabaseauthhelpers --api --eslint --qwikcity --qwikworker --qwiklabs --qwikreact --qwikauth --cli --platform-binding-wasm-copy",
"build.only_javascript": "tsx --require ./scripts/runBefore.ts scripts/index.ts --tsc --build --api",
"build.packages.docs": "pnpm -C ./packages/docs/ run build",
"build.packages.insights": "pnpm -C ./packages/insights/ run build",
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/public/_redirects
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/chat https://discord.gg/eDrWHeqnnQ 307
/chat/ https://discord.gg/eDrWHeqnnQ 307
/chat https://discord.gg/TsNCMd6uGW 307
/chat/ https://discord.gg/TsNCMd6uGW 307

/examples /examples/introduction/hello-world/ 307
/examples/ /examples/introduction/hello-world/ 307
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ The community and the Qwik team love this API for a number of reasons:
Add the `?jsx` suffix **at the end** of the import

```tsx
import Image from '[IMAGE_PATH]??w=24&h=24&jsx';
import Image from '[IMAGE_PATH]?w=24&h=24&jsx';
```

> ⚠️ Make sure to put the `jsx` query parameter at the end of the import path, otherwise typescript might complain.
Expand Down
8 changes: 4 additions & 4 deletions packages/qwik/src/cli/migrate-v2/versions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const versions = {
'@qwik.dev/core': '2.0.0-alpha.0',
'@qwik.dev/router': '2.0.0-alpha.0',
'@qwik.dev/react': '2.0.0-alpha.0',
'eslint-plugin-qwik': '2.0.0-alpha.0',
'@qwik.dev/core': '2.0.0-alpha.1',
'@qwik.dev/router': '2.0.0-alpha.1',
'@qwik.dev/react': '2.0.0-alpha.1',
'eslint-plugin-qwik': '2.0.0-alpha.1',
};
16 changes: 12 additions & 4 deletions packages/qwik/src/core/state/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,23 @@ export class ReadWriteProxyHandler implements ProxyHandler<TargetType> {
return true;
}

has(target: TargetType, property: string | symbol): boolean {
if (property === QOjectTargetSymbol) {
has(target: TargetType, prop: string | symbol): boolean {
if (prop === QOjectTargetSymbol) {
return true;
}
const invokeCtx = tryGetInvokeContext();
if (typeof prop === 'string' && invokeCtx) {
const subscriber = invokeCtx.$subscriber$;
if (subscriber) {
const isA = isArray(target);
this.$manager$.$addSub$(subscriber, isA ? undefined : prop);
}
}
const hasOwnProperty = Object.prototype.hasOwnProperty;
if (hasOwnProperty.call(target, property)) {
if (hasOwnProperty.call(target, prop)) {
return true;
}
if (typeof property === 'string' && hasOwnProperty.call(target, _IMMUTABLE_PREFIX + property)) {
if (typeof prop === 'string' && hasOwnProperty.call(target, _IMMUTABLE_PREFIX + prop)) {
return true;
}
return false;
Expand Down

0 comments on commit 6953229

Please sign in to comment.