Skip to content

Commit 605c676

Browse files
committed
fixup
1 parent b20351b commit 605c676

File tree

8 files changed

+65
-95
lines changed

8 files changed

+65
-95
lines changed

e2e/docs-e2e/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"author": "",
66
"devDependencies": {
77
"@playwright/test": "1.50.1",
8-
"@types/node": "20.19.0"
8+
"@types/node": "24.2.1"
99
},
1010
"keywords": [],
1111
"license": "ISC",

packages/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@tailwindcss/vite": "4.1.11",
3131
"@types/leaflet": "1.9.20",
3232
"@types/prismjs": "1.26.5",
33-
"@types/react": "18.3.3",
33+
"@types/react": "19.1.10",
3434
"@types/react-dom": "18.3.0",
3535
"@unpic/core": "0.0.42",
3636
"@unpic/qwik": "0.0.38",

packages/docs/src/repl/bundler/index.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@ import { getDeps } from './bundled';
55
import type { InitMessage, BundleMessage, OutgoingMessage } from './bundler-worker';
66
import bundlerWorkerUrl from './bundler-worker?worker&url';
77

8-
import ssrWorkerStringPre from './repl-ssr-worker?compiled-string';
9-
import listenerScript from './client-events-listener?compiled-string';
10-
11-
export const ssrWorkerString = ssrWorkerStringPre
12-
.replace(/globalThis\.DO_NOT_TOUCH_IMPORT/g, 'import')
13-
.replace('globalThis.LISTENER_SCRIPT', JSON.stringify(listenerScript));
14-
158
const bundlers = new Map<string, Bundler>();
169

1710
class Bundler {

packages/docs/src/repl/ui/editor.tsx

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
import {
22
component$,
3-
type NoSerialize,
4-
type QRL,
5-
useVisibleTask$,
6-
useContext,
73
useSignal,
84
useStore,
95
useTask$,
6+
useVisibleTask$,
7+
type NoSerialize,
8+
type QRL,
109
} from '@qwik.dev/core';
10+
import { getThemeSignal } from '../../components/theme-toggle/theme-toggle';
11+
import type { ReplAppInput, ReplStore } from '../types';
1112
import type { IStandaloneCodeEditor } from './monaco';
1213
import {
1314
addQwikLibs,
1415
getEditorTheme,
15-
type ICodeEditorViewState,
1616
initMonacoEditor,
1717
updateMonacoEditor,
18+
type ICodeEditorViewState,
1819
} from './monaco';
19-
import type { ReplAppInput, ReplStore } from '../types';
20-
import { GlobalStore } from '../../context';
2120

2221
export const Editor = component$((props: EditorProps) => {
2322
const hostRef = useSignal<Element>();
@@ -29,8 +28,6 @@ export const Editor = component$((props: EditorProps) => {
2928
viewStates: {},
3029
});
3130

32-
const globalStore = useContext(GlobalStore);
33-
3431
useVisibleTask$(async () => {
3532
if (!store.editor) {
3633
await initMonacoEditor(hostRef.value, props, store, props.store);
@@ -43,12 +40,10 @@ export const Editor = component$((props: EditorProps) => {
4340
});
4441

4542
useVisibleTask$(({ track }) => {
46-
track(() => globalStore.theme);
47-
if (globalStore.theme !== 'auto') {
48-
store.editor?.updateOptions({
49-
theme: getEditorTheme(globalStore.theme === 'dark'),
50-
});
51-
}
43+
const theme = track(getThemeSignal());
44+
store.editor?.updateOptions({
45+
theme: getEditorTheme(theme === 'dark'),
46+
});
5247
});
5348

5449
useTask$(async ({ track }) => {

packages/docs/vite.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { transformerMetaHighlight, transformerMetaWordHighlight } from '@shikijs
1010
import type { ShikiTransformer } from '@shikijs/types';
1111
import tailwindcss from '@tailwindcss/vite';
1212
import path, { resolve } from 'node:path';
13-
import { defineConfig, loadEnv, type Plugin, type Rollup } from 'vite';
13+
import { defineConfig, loadEnv, type Plugin, type Rollup, type UserConfig } from 'vite';
1414
import { compiledStringPlugin } from '../../scripts/compiled-string-plugin';
1515
import { examplesData, playgroundData, rawSource, tutorialData } from './vite.repl-apps';
1616
import { sourceResolver } from './vite.source-resolver';
@@ -262,5 +262,5 @@ export default defineConfig(() => {
262262
'Cross-Origin-Embedder-Policy': 'require-corp',
263263
},
264264
},
265-
};
265+
} as UserConfig;
266266
});

packages/qwik/src/cli/add/update-files.unit.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ describe('mergeIntegrationDir', () => {
7474
normalizePath(join('destDir', 'subDestDir', 'src', 'global.css')),
7575
];
7676

77-
expect(actualResults).toEqual(expectedResults);
77+
expect(actualResults.sort()).toEqual(expectedResults.sort());
7878
});
7979

8080
test('should merge integration directory in a monorepo', async () => {
@@ -118,7 +118,7 @@ describe('mergeIntegrationDir', () => {
118118
normalizePath(join('destDir', 'subDestDir', 'apps', 'subpackage', 'src', 'global.css')),
119119
];
120120

121-
expect(actualResults).toEqual(expectedResults);
121+
expect(actualResults.sort()).toEqual(expectedResults.sort());
122122

123123
const tests = {
124124
'destDir/subDestDir/apps/subpackage/fake.ts': 'fake file',
@@ -130,7 +130,10 @@ describe('mergeIntegrationDir', () => {
130130
'destDir/subDestDir/apps/subpackage/src/global.css': 'p{color: red}\n\n/* CSS */\n',
131131
};
132132
for (const [fileName, content] of Object.entries(tests)) {
133-
const file = fakeFileUpdates.files.find((f) => f.path === fileName);
133+
const file = fakeFileUpdates.files.find((f) => normalizePath(f.path) === fileName);
134+
if (!file) {
135+
console.error(`File %s not found:`, fakeFileUpdates.files);
136+
}
134137
expect(file?.content.toString()).toBe(content);
135138
}
136139
});

packages/qwik/src/testing/document.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { MockDocumentOptions, MockWindow } from './types';
22
import domino from 'domino';
33
import { normalizeUrl } from './util';
4-
const domino = qwikDom as any;
54

65
export function mockAttachShadow(el: Element) {
76
if (typeof (el as any).attachShadow !== 'function') {
@@ -92,7 +91,7 @@ const noop = () => {};
9291

9392
const QWIK_DOC = Symbol();
9493

95-
class MockShadowRoot extends domino.impl.DocumentFragment {
94+
class MockShadowRoot extends (domino as any).impl.DocumentFragment {
9695
nodeType = 11; // DOCUMENT_FRAGMENT_NODE
9796
host: Element;
9897

0 commit comments

Comments
 (0)