Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .changeset/lovely-mangos-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lit-labs/vue-utils': patch
---

Fixed an issue where assignSlotNodes would throw an error due to it processing an internal Vue implementation slotname
5 changes: 5 additions & 0 deletions .changeset/witty-masks-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lit-internal/scripts': patch
---

Fix CI issue regarding release image
19 changes: 19 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Repository Technical Context

This repository is a monorepo that uses Lit for building web components and no other frontend frameworks unless otherwise specified.

## Coding Patterns

- Uses standard ESM imports
- TypeScript imports end with `.js` extension
- Decorators are used, but other TypeScript features that are not standard JavaScript are avoided
- Focuses on native, modern browser features, including custom elements, Shadow DOM, and css custom properties.

## Build System

- Google Wireit orchestrates npm scripts
- Wireit script configurations:
- Declare file inputs and outputs
- Specify script dependencies
- Cache build artifacts in `.wireit` directories
- Prepending `WIREIT_LOGGER=simple npm run <command>` outputs the full logs to the console
5 changes: 4 additions & 1 deletion packages/internal-scripts/src/release-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ async function generateReleaseImage(contents: string) {
</body>
</html>
`;
const browser = await puppeteer.launch({headless: true});
const browser = await puppeteer.launch({
headless: true,
args: ['--no-sandbox'],
});
const page = await browser.newPage();
await page.setViewport({width: 800, height: 800, deviceScaleFactor: 2});
await page.setContent(html);
Expand Down
24 changes: 15 additions & 9 deletions packages/labs/vue-utils/src/wrapper-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,18 @@ const assignWrappedNode = (v: VNode, name: string) =>
// Converts Vue slot data to native slot-able nodes by directly manipulating
// vNodes.
export const assignSlotNodes = (slots: Slots) =>
Object.keys(slots).map((name) =>
slots[name]().map((v: VNode) =>
name === 'default'
? v
: isElementNode(v)
? assignNode(v, name)
: assignWrappedNode(v, name)
)
);
Object.keys(slots)
// Vue seems to have introduced a `__` slot name that holds metadata
// in the form of number[] rather than vNodes.
.filter((name) => name !== '__')
.map((name) => {
const slotValue = slots[name];
const nodes = Array.isArray(slotValue) ? slotValue : slotValue();
return nodes.map((v: VNode) =>
name === 'default'
? v
: isElementNode(v)
? assignNode(v, name)
: assignWrappedNode(v, name)
);
});