Skip to content

Commit 7a8f165

Browse files
committed
chore: refresh lock file
1 parent c808107 commit 7a8f165

File tree

11 files changed

+2732
-3422
lines changed

11 files changed

+2732
-3422
lines changed

packages/cli/tsconfig.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
{
1616
"path": "../plugins-manager/tsconfig.json"
1717
},
18-
{
19-
"path": "../mdjs-core/tsconfig.json"
20-
},
2118
{
2219
"path": "../engine/tsconfig.json"
2320
}

packages/engine/src/dev-server/devServerAdjustAssetUrls.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ export function devServerAdjustAssetUrls({
4646
const outputFilePath = getOutputFilePath(sourceFilePath);
4747
const sourceRelativeFilePath = path.relative(inputDir, sourceFilePath);
4848
const outputRelativeFilePath = path.relative(outputDir, outputFilePath);
49-
const newBody = await adjustAssetUrl.transform(context.body, {
49+
const body = /** @type {string} */ (context.body);
50+
const newBody = await adjustAssetUrl.transform(body, {
5051
sourceFilePath,
5152
sourceRelativeFilePath,
5253
outputFilePath,

packages/engine/src/formats/markdown.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import 'rehype-prism';
44
import '@lit-labs/ssr/lib/install-global-dom-shim.js';
55

66
/* eslint-disable @typescript-eslint/ban-ts-comment */
7+
// @ts-ignore
78
import { mdjsProcess } from '@mdjs/core';
89
import { existsSync } from 'fs';
910
import { readFile, writeFile } from 'fs/promises';

packages/engine/test-node/14c-components-e2e.spec.js

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,41 +179,57 @@ test.describe('hydration', async () => {
179179
await cleanup();
180180
});
181181

182-
test("55: hydrate onMedia('(min-width: 640px)') || onClick", async ({ page }) => {
182+
test("55: hydrate onMedia('(min-width: 640px)') || onClick - on desktop", async ({ page }) => {
183183
const { engine, cleanup } = await setupTestEngine(
184184
'fixtures/14-components/55-hydration-onMedia-or-onClick/docs',
185185
);
186186
await engine.start();
187187
const { port } = engine.devServer.config;
188188

189+
// 1. start on small screen
189190
await page.setViewportSize({
190-
width: 640,
191+
width: 320,
191192
height: 480,
192193
});
193194
await page.goto(`localhost:${port}`);
194195
const myEl = await page.locator('my-el');
195196
const hydrated1 = await myEl.getAttribute('hydrated');
196197
expect(hydrated1).toBe(null); // not hydrated
197198

199+
// 2. go bigger
200+
await page.setViewportSize({
201+
width: 640,
202+
height: 480,
203+
});
198204
await page.waitForLoadState('networkidle0');
199205

200206
const hydrated2 = await myEl.getAttribute('hydrated');
201207
expect(hydrated2).toBe(''); // boolean attribute is there
202208

203-
// revisit page on "mobile"
209+
await cleanup();
210+
});
211+
212+
test("55b: hydrate onMedia('(min-width: 640px)') || onClick - on mobile", async ({ page }) => {
213+
const { engine, cleanup } = await setupTestEngine(
214+
'fixtures/14-components/55-hydration-onMedia-or-onClick/docs',
215+
);
216+
await engine.start();
217+
const { port } = engine.devServer.config;
218+
204219
await page.setViewportSize({
205220
width: 320,
206221
height: 480,
207222
});
208-
await page.reload();
209-
const myEl2 = await page.locator('my-el');
210-
const hydrated3 = await myEl2.getAttribute('hydrated');
223+
await page.goto(`localhost:${port}`);
224+
const myEl = await page.locator('my-el');
225+
226+
const hydrated3 = await myEl.getAttribute('hydrated');
211227
expect(hydrated3).toBe(null); // not hydrated
212228

213229
await myEl.click();
214230
await page.waitForLoadState('networkidle0');
215231

216-
const hydrated4 = await myEl2.getAttribute('hydrated');
232+
const hydrated4 = await myEl.getAttribute('hydrated');
217233
expect(hydrated4).toBe(''); // boolean attribute is there
218234

219235
await cleanup();
@@ -243,7 +259,7 @@ test.describe('hydration', async () => {
243259
const focusInEv = await myEl.getAttribute('focusin-ev');
244260
expect(focusInEv).toBe('');
245261

246-
// NOTE: focus event is NOT supported as it does not bubble
262+
// NOTE: we are using the focusin event as the focus event is NOT supported as it does not bubble
247263
await cleanup();
248264
});
249265
});

packages/engine/tsconfig.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
"references": [
1515
{
1616
"path": "../plugins-manager/tsconfig.json"
17-
},
18-
{
19-
"path": "../mdjs-core/tsconfig.json"
2017
}
2118
],
2219
"include": [

packages/launch/tsconfig.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
{
1616
"path": "../plugins-manager/tsconfig.json"
1717
},
18-
{
19-
"path": "../mdjs-core/tsconfig.json"
20-
},
2118
{
2219
"path": "../engine/tsconfig.json"
2320
},

packages/search/tsconfig.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
{
1616
"path": "../plugins-manager/tsconfig.json"
1717
},
18-
{
19-
"path": "../mdjs-core/tsconfig.json"
20-
},
2118
{
2219
"path": "../engine/tsconfig.json"
2320
},

site/pages/pageTreeData.rocketGenerated.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2529,6 +2529,11 @@
25292529
"text": "Simulator states",
25302530
"id": "simulator-states",
25312531
"level": 2
2532+
},
2533+
{
2534+
"text": "Extending mdjs-preview",
2535+
"id": "extending-mdjs-preview",
2536+
"level": 2
25322537
}
25332538
],
25342539
"name": "Preview",

tsconfig.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
{
88
"path": "./packages/plugins-manager/tsconfig.json"
99
},
10-
{
11-
"path": "./packages/mdjs-core/tsconfig.json"
12-
},
1310
{
1411
"path": "./packages/engine/tsconfig.json"
1512
},

workspace-packages.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const packages = [
66
{ name: 'search', type: 'js', environment: 'node-esm' },
77
// { name: 'check-html-links', type: 'js', environment: 'node-esm' },
88
// { name: 'drawer', type: 'js', environment: 'browser' },
9-
{ name: 'mdjs-core', type: 'js', environment: 'node' },
9+
// { name: 'mdjs-core', type: 'js', environment: 'node' },
1010
// { name: 'mdjs-preview', type: 'js', environment: 'browser' },
1111
// { name: 'mdjs-story', type: 'js', environment: 'browser' },
1212
];

0 commit comments

Comments
 (0)