Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build/v2 signals #4

Merged
merged 52 commits into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
ae82eda
test: fix locale e2e test (#6432)
shairez Jun 6, 2024
078621b
chore: merge main (#6457)
wmertens Jun 7, 2024
fbd644f
fix(v2): inline component rendering fixes (#6428)
Varixo Jun 12, 2024
c074770
fix(v2): fix setting store value with serialization constant at the s…
Varixo Jun 12, 2024
44034f7
fix(v2): docs build
Varixo Jun 15, 2024
6d5c545
fix(v2): slot toggle fixes (#6545)
Varixo Jun 15, 2024
eefc38b
docs(v2/ssr-container): add context to tag nesting property (#6552)
naorpeled Jun 15, 2024
164f103
fix(v2): fix streaming tests (#6553)
Varixo Jun 16, 2024
b94a6e8
fix(v2): fix toggle named projection (#6563)
Varixo Jun 18, 2024
f4b5b11
refactor(v2/ssr-container): rename ContainerElementFrame to ElementFr…
naorpeled Jun 23, 2024
aea1a33
fix(v2): resource e2e test fixes (#6454)
Varixo Jun 24, 2024
a223f6b
fix(v2): fix vnode separators (#6596)
Varixo Jun 25, 2024
7840f17
fix(v2): process only nodes with props separator (#6608)
Varixo Jun 25, 2024
6f3818b
fix(v2): render issue (#6610)
Varixo Jun 29, 2024
68d92f2
fix(v2): fix string deserialization with serialization constant (#6622)
Varixo Jun 30, 2024
a5f9276
fix(v2): fix the same task duplicates in serialized state (#6623)
Varixo Jul 1, 2024
eb1956e
fix: there is a bug when we change DEBUG into true (#6633)
JerryWu1234 Jul 3, 2024
4138bea
fix(v2): do not use tag nesting for production build (#6644)
Varixo Jul 4, 2024
b147210
fix: show a warning instead of an error for rerunning tasks on a diff…
dmitry-stepanenko Jul 4, 2024
d8ada7f
fix(v2): attribute setting and CSR event registration (#6649)
Varixo Jul 8, 2024
b20fc54
fix(optim): be more lenient with fnSignal
wmertens May 8, 2024
9d639e9
perf(optimizer): "value" optional in _wrapProp
wmertens Jul 9, 2024
3d02980
fix(v2): qwik inspector
Varixo Jul 10, 2024
0bea5c1
fix(v2): docs build (#6669)
Varixo Jul 12, 2024
47be48f
feat(repl): bundle wasm
wmertens Jul 13, 2024
be7de74
feat(v2): docs deployment (#6679)
Varixo Jul 13, 2024
067b191
fix(v2): deep store update (#6681)
Varixo Jul 14, 2024
04ce4da
fix(v2): mutating props (#6684)
Varixo Jul 17, 2024
68762d5
fix(v2): use on events fixes (#6711)
Varixo Jul 19, 2024
a805502
feat(v2): ref value as a function (#6716)
Varixo Jul 23, 2024
37bfb74
fix(v2): more useOn fixes (#6718)
Varixo Jul 24, 2024
ea2a48c
feat(v2): q-ignore and q-container-island implementation (#6721)
Varixo Jul 24, 2024
49ef55e
fix(v2): qwik react (#6722)
Varixo Jul 25, 2024
a85a2b9
fix(v2): mutating component props (#6725)
Varixo Jul 26, 2024
3e940b7
chore: Remove undici, set minimum node version to 18.17 (#5702)
wmertens Jul 28, 2024
5ed507e
fix: Remove Cannot resolve symbol from the integration tests in v2 (#…
JerryWu1234 Jul 30, 2024
8800555
feat(v2): new server$, actions and loaders serialization (#6763)
Varixo Aug 5, 2024
227d9dd
fix store impl
Varixo Aug 6, 2024
087872e
fix useComputed$
Varixo Aug 7, 2024
9e53aa9
fix some use-task and use-visible tests
Varixo Aug 8, 2024
1a53f55
fix ref
Varixo Aug 8, 2024
e91b6dd
fix use computed infinity loop
Varixo Aug 9, 2024
3ef8169
implement qrl resolve chore
Varixo Aug 9, 2024
f287219
remove computed chore
Varixo Aug 9, 2024
4289406
fix v2-signals tests
Varixo Aug 9, 2024
c6cee75
fix isPromise check
Varixo Aug 9, 2024
54aa838
Merge branch 'build/v2' into build/v2-signals
Varixo Aug 9, 2024
9f3c4ee
after merge changes
Varixo Aug 10, 2024
a4ae10a
fix csr use-resource tests
Varixo Aug 10, 2024
a14dc9f
serialization cleanup
Varixo Aug 10, 2024
66185ea
fix some projection tests
Varixo Aug 10, 2024
d6542fa
fix imports
Varixo Aug 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ body:
id: system-info
attributes:
label: System Info
description: Output of `npx envinfo --system --npmPackages '{vite,undici,typescript,@builder.io/*}' --binaries --browsers`
description: Output of `npx envinfo --system --npmPackages '{vite,typescript,@builder.io/*}' --binaries --browsers`
render: shell
placeholder: System, Binaries, Browsers
validations:
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ jobs:
build-qwik: ${{ steps.cache-qwik.outputs.cache-hit != 'true' }}
build-rust: ${{ steps.cache-rust.outputs.cache-hit != 'true' }}
build-others: ${{ steps.cache-others.outputs.cache-hit != 'true' }}
# TEMP v2: disable docs build until we have v2 deps building (qwik-ui, qwik-sdk)
# build-docs: ${{ steps.cache-docs.outputs.cache-hit != 'true' }}
build-docs: false
build-docs: ${{ steps.cache-docs.outputs.cache-hit != 'true' }}
# TEMP v2: disable insights build
# build-insights: ${{ steps.cache-insights.outputs.cache-hit != 'true' }}
build-insights: false
Expand Down Expand Up @@ -510,6 +508,15 @@ jobs:
- name: Build Qwik Docs
run: pnpm run build.packages.docs

- name: Cloudflare Pages Deployment
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: 'qwik-docs'
directory: packages/docs/dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

############ RELEASE ############
release:
name: Release
Expand Down
4 changes: 2 additions & 2 deletions contributing/TRIAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ flowchart TD
maj --YES--> P4[P4: urgent]
maj --NO--> P3[P3: important]
unusable --NO--> workarounds{Are there\nworkarounds for\nthe bug?}
workarounds --NO--> P2[P2: minor bug]
workarounds --NO--> P2[P2: minor]
workarounds --YES--> P1[P1: nice to have / fix]
```

Expand Down Expand Up @@ -74,7 +74,7 @@ flowchart TD
discussion --YES--> close3[Tag with\n 'STATUS-2: requires discussion'\nand 'WAITING FOR: team'\nor 'WAITING FOR: user']
discussion --NO--> implement{Should it be\nimplemented by core?}
implement --NO--> community{Should it be implemented\nby the community?}
community --YES--> incubate[Close and tag with\n'STATUS-3: incubation']
community --YES--> incubate[Close and tag with either\n'STATUS-3: incubation'\nor 'STATUS-2: waiting for community PR'\nand 'COMMUNITY: PR is welcomed']
community --NO--> wontfix[Close and tag with\n'STATUS-3: won't be worked on']
implement --YES--> doimplement["1. Tag with 'STATUS-2: team is working on this'\n2. Add related feature label if\napplicable (e.g. 'COMP: runtime')\n3. Add version \nlabels (e.g. 'VERSION: upcoming major')"]
```
Expand Down
27 changes: 9 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,6 @@
],
"pinVersion": "1.40.0"
}
],
"semverGroups": [
{
"label": "Undici should always be * until we remove it",
"range": "*",
"dependencies": [
"undici"
]
}
]
}
},
Expand Down Expand Up @@ -68,22 +59,22 @@
"@clack/prompts": "^0.7.0",
"@eslint/eslintrc": "^3.0.2",
"@mdx-js/mdx": "^3.0.1",
"@microsoft/api-documenter": "^7.24.2",
"@microsoft/api-extractor": "^7.43.1",
"@microsoft/api-documenter": "7.24.2",
"@microsoft/api-extractor": "7.43.1",
"@napi-rs/cli": "^2.18.2",
"@napi-rs/triples": "^1.2.0",
"@node-rs/helper": "^1.6.0",
"@octokit/action": "6.1.0",
"@playwright/test": "1.40.0",
"@types/brotli": "^1.3.4",
"@types/bun": "^1.1.1",
"@types/bun": "^1.1.3",
"@types/cross-spawn": "^6.0.6",
"@types/eslint": "^8.56.10",
"@types/express": "^4.17.21",
"@types/node": "^20.12.8",
"@types/node": "^20.14.1",
"@types/path-browserify": "^1.0.2",
"@types/prompts": "^2.4.9",
"@types/react": "^18.3.1",
"@types/react": "^18.3.3",
"@types/semver": "^7.5.8",
"@types/which-pm-runs": "^1.0.2",
"@typescript-eslint/eslint-plugin": "^7.8.0",
Expand Down Expand Up @@ -123,7 +114,6 @@
"terser": "^5.31.0",
"tsm": "^2.3.0",
"typescript": "5.4.5",
"undici": "*",
"vfile": "^6.0.1",
"vite": "^5.2.11",
"vite-imagetools": "^6.2.9",
Expand All @@ -132,10 +122,10 @@
"vitest": "^1.6.0",
"watchlist": "0.3.1",
"which-pm-runs": "1.1.0",
"zod": "^3.23.6"
"zod": "^3.23.8"
},
"engines": {
"node": ">=16.8.0 <18.0.0 || >=18.11",
"node": "^18.17.0 || ^20.3.0 || >=21.0.0",
"npm": "please-use-pnpm",
"yarn": "please-use-pnpm",
"pnpm": ">=9.0.5"
Expand All @@ -145,6 +135,7 @@
"overrides": {
"typescript": "5.4.5",
"vfile": "^6.0.1",
"sharp": ">=0.33",
"@supabase/realtime-js": "2.8.4"
},
"patchedDependencies": {
Expand Down Expand Up @@ -200,10 +191,10 @@
"start": "concurrently \"npm:build.watch\" \"npm:tsc.watch\" -n build,tsc -c green,cyan",
"test": "pnpm build.full && pnpm test.unit && pnpm test.e2e",
"test.e2e": "pnpm test.e2e.chromium && pnpm test.e2e.webkit",
"test.e2e.cli": "tsm scripts/e2e-cli.ts",
"test.e2e.chromium": "playwright test starters --browser=chromium --config starters/playwright.config.ts",
"test.e2e.chromium.debug": "PWDEBUG=1 playwright test starters --browser=chromium --config starters/playwright.config.ts",
"test.e2e.city": "playwright test starters/e2e/qwikcity --browser=chromium --config starters/playwright.config.ts",
"test.e2e.cli": "tsm scripts/e2e-cli.ts",
"test.e2e.firefox": "playwright test starters --browser=firefox --config starters/playwright.config.ts",
"test.e2e.webkit": "playwright test starters --browser=webkit --config starters/playwright.config.ts",
"test.rust": "make test",
Expand Down
5 changes: 4 additions & 1 deletion packages/create-qwik/src/helpers/jokes.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,5 +162,8 @@
"Knock knock. \n Who's there? \n Opportunity.",
"That is impossible. Opportunity doesn’t come knocking twice!"
],
["Knock knock. \n Who's there? \n Hatch. \n Hatch who?", "Bless you!"]
["Knock knock. \n Who's there? \n Hatch. \n Hatch who?", "Bless you!"],
["Man said: I changed my Mind, Machine replied: I changed my CPU"],
["Man said: I dreamed of God, Machine replied: I dreamed of Rust"],
["Person: give me just a second, Programmer: give me just a 100 milliseconds"]
]
3 changes: 2 additions & 1 deletion packages/docs/check-qwik-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
import fs from 'fs';
import path from 'path';
import { spawnSync } from 'child_process';
import { fileURLToPath } from 'url';

const __dirname = path.dirname(new URL(import.meta.url).pathname);
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const qwikPkgDir = path.join(__dirname, '..', 'qwik', 'dist');

if (!fs.existsSync(path.join(qwikPkgDir, 'core.d.ts'))) {
Expand Down
1 change: 0 additions & 1 deletion packages/docs/contributors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable no-console */
import { fetch } from 'undici';
import fs from 'node:fs';
import path from 'node:path';
import url from 'node:url';
Expand Down
11 changes: 3 additions & 8 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,16 @@
"@builder.io/qwik-city": "workspace:^",
"@builder.io/qwik-labs": "workspace:^",
"@builder.io/qwik-react": "workspace:^",
"@builder.io/sdk-qwik": "^0.14.21",
"@docsearch/css": "^3.5.2",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.0",
"@modular-forms/qwik": "^0.23.1",
"@mui/material": "^5.15.14",
"@mui/system": "^5.15.14",
"@mui/x-data-grid": "^6.19.6",
"@supabase/supabase-js": "^2.39.8",
"@types/prismjs": "^1.26.3",
"@types/react": "^18.3.1",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@unpic/core": "^0.0.42",
"@unpic/qwik": "^0.0.38",
"algoliasearch": "4.16.0",
"autoprefixer": "^10.4.19",
"fflate": "^0.8.2",
Expand All @@ -36,7 +32,7 @@
"prism-themes": "1.9.0",
"prismjs": "1.29.0",
"puppeteer": "^22.6.0",
"qwik-image": "^0.0.10",
"qwik-image": "0.0.14-alpha",
"react": "18.3.1",
"react-dom": "18.3.1",
"rehype-pretty-code": "^0.11.0",
Expand All @@ -47,14 +43,13 @@
"terser": "^5.31.0",
"tsm": "^2.3.0",
"typescript": "5.4.5",
"undici": "*",
"valibot": "^0.29.0",
"vite": "^5.2.11",
"vite-plugin-inspect": "^0.8.4",
"wrangler": "^3.53.1"
},
"engines": {
"node": ">=18.11",
"node": "^18.17.0 || ^20.3.0 || >=21.0.0",
"npm": "please-use-pnpm",
"yarn": "please-use-pnpm",
"pnpm": ">=8.6.12"
Expand Down
Binary file not shown.
4 changes: 4 additions & 0 deletions packages/docs/scripts/pages.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"size": "large",
"tags": "site,healthcare,services,webrtc,websocket"
},
{
"href": "https://ohayo-dev-design.com/",
"tags": "web, dev, agency"
},
{
"href": "https://linkfang-portfolio.vercel.app/",
"tags": "portfolio"
Expand Down
1 change: 0 additions & 1 deletion packages/docs/scripts/showcase.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ async function captureMultipleScreenshots() {
}

async function getPagespeedData(url) {
const { fetch } = await import('undici');
const requestURL = `https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=${encodeURIComponent(
url
)}&key=AIzaSyApBC9gblaCzWrtEBgHnZkd_B37OF49BfM&category=PERFORMANCE&strategy=MOBILE`;
Expand Down
49 changes: 10 additions & 39 deletions packages/docs/src/components/builder-content/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { component$, Resource, useResource$ } from '@builder.io/qwik';
import { useLocation } from '@builder.io/qwik-city';
import { getBuilderSearchParams, fetchOneEntry, Content } from '@builder.io/sdk-qwik';
import { QWIK_MODEL } from '../../constants';

export default component$<{
Expand All @@ -17,52 +16,24 @@ export default component$<{
? query.get(name)
: (query as unknown as Record<string, string>)[name];

const render = queryGet('render');
const contentId = props.model === QWIK_MODEL ? queryGet('content') : undefined;
const isSDK = render === 'sdk';
cache('immutable');
if (isSDK) {
return getCachedValue(
{
model: props.model!,
apiKey: props.apiKey!,
options: getBuilderSearchParams(query),
userAttributes: {
urlPath: location.url.pathname,
site: 'qwik.dev',
},
...(contentId && {
query: {
id: contentId,
},
}),
},
fetchOneEntry
);
} else {
return getCachedValue(
{
apiKey: props.apiKey,
model: props.model,
urlPath: location.url.pathname,
contentId: contentId,
},
getBuilderContent
);
}
return getCachedValue(
{
apiKey: props.apiKey,
model: props.model,
urlPath: location.url.pathname,
contentId: contentId,
},
getBuilderContent
);
});

return (
<Resource
value={builderContentRsrc}
onPending={() => <div>Loading...</div>}
onResolved={(content) =>
content.html ? (
<props.tag class="builder" dangerouslySetInnerHTML={content.html} />
) : (
<Content model={props.model} content={content} apiKey={props.apiKey} />
)
}
onResolved={(content) => <props.tag class="builder" dangerouslySetInnerHTML={content.html} />}
/>
);
});
Expand Down
6 changes: 3 additions & 3 deletions packages/docs/src/components/docsearch/result.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Slot, component$, useContext, useSignal, useStore, useTask$ } from '@builder.io/qwik';
import { QwikGPT } from '../qwik-gpt';
// import { QwikGPT } from '../qwik-gpt';
import { SearchContext } from './context';
import { AiResultOpenContext, type DocSearchState } from './doc-search';
import { Snippet } from './snippet';
Expand Down Expand Up @@ -134,7 +134,7 @@ export const AIButton = component$(({ state }: { state: DocSearchState }) => {
}
}}
>
<div class="ai-button">
{/* <div class="ai-button">
<button
onClick$={() => {
gpt.value = state.query;
Expand All @@ -157,7 +157,7 @@ export const AIButton = component$(({ state }: { state: DocSearchState }) => {
<QwikGPT query={gpt.value}></QwikGPT>
</div>
)}
</div>
</div> */}
</li>
)}
</>
Expand Down
3 changes: 2 additions & 1 deletion packages/docs/src/components/docsearch/results-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export const ResultsScreen = component$((props: { state: DocSearchState }) => {
<ul role="listbox" aria-labelledby="docsearch-label" id="docsearch-list">
{collection.items.map((item, index) => {
return (
<Result state={props.state} item={item} key={item.objectID}>
// TODO: the key should be {item.objectID}, but for now in v2 there is a bug
<Result state={props.state} item={item} key={item.__autocomplete_id}>
{item.__docsearch_parent && (
<svg q:slot="start-action" class="DocSearch-Hit-Tree" viewBox="0 0 24 54">
<g
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/components/docsearch/search-box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const SearchBox = component$((props: SearchBoxProps) => {
enterKeyHint={props.state.activeItemId ? 'go' : 'search'}
spellcheck={false}
autoFocus={props.autoFocus}
placeholder="Search docs or ask a question"
placeholder="Search docs"
type="search"
ref={props.inputRef as any}
onInput$={(event) => {
Expand Down
Loading
Loading