Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@astrojs/lit

Package Overview
Dependencies
Maintainers
4
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@astrojs/lit - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

6

CHANGELOG.md
# @astrojs/lit
## 1.2.1
### Patch Changes
- [#6351](https://github.com/withastro/astro/pull/6351) [`26bf12ef3`](https://github.com/withastro/astro/commit/26bf12ef3c7ab874a23ac753f841f7bb329c9361) Thanks [@hrmcdonald](https://github.com/hrmcdonald)! - Render DSD attributes based on `shadowRootOptions`
## 1.2.0

@@ -4,0 +10,0 @@

6

package.json
{
"name": "@astrojs/lit",
"version": "1.2.0",
"version": "1.2.1",
"description": "Use Lit components within Astro",

@@ -35,4 +35,4 @@ "type": "module",

"devDependencies": {
"astro": "2.0.7",
"astro-scripts": "0.0.10",
"astro": "2.0.16",
"astro-scripts": "0.0.12",
"chai": "^4.3.6",

@@ -39,0 +39,0 @@ "cheerio": "^1.0.0-rc.11",

@@ -65,3 +65,7 @@ import './server-shim.js';

if (shadowContents !== undefined) {
yield '<template shadowroot="open" shadowrootmode="open">';
const { mode = 'open', delegatesFocus } = instance.shadowRootOptions ?? {};
// `delegatesFocus` is intentionally allowed to coerce to boolean to
// match web platform behavior.
const delegatesfocusAttr = delegatesFocus ? ' shadowrootdelegatesfocus' : '';
yield `<template shadowroot="${mode}" shadowrootmode="${mode}"${delegatesfocusAttr}>`;
yield* shadowContents;

@@ -68,0 +72,0 @@ yield '</template>';

@@ -86,2 +86,16 @@ import { expect } from 'chai';

});
it('should render DSD attributes based on shadowRootOptions', async () => {
const tagName = 'lit-component';
customElements.define(
tagName,
class extends LitElement {
static shadowRootOptions = { ...LitElement.shadowRootOptions, delegatesFocus: true };
}
);
const render = await renderToStaticMarkup(tagName);
expect(render).to.deep.equal({
html: `<${tagName}><template shadowroot=\"open\" shadowrootmode=\"open\" shadowrootdelegatesfocus><!--lit-part--><!--/lit-part--></template></${tagName}>`,
});
});
});

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc