Skip to content

Commit

Permalink
upgrade to WCC with spec compliant support shadowrootmode attribute (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Jan 20, 2024
1 parent 8af3519 commit 70ecb68
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"remark-rehype": "^7.0.0",
"rollup": "^2.58.0",
"unified": "^9.2.0",
"wc-compiler": "~0.9.1"
"wc-compiler": "~0.10.0"
},
"devDependencies": {
"@babel/runtime": "^7.10.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ describe('Build Greenwood With: ', function() {
});

it('should have one top level <app-footer> element with a <template> with an open shadowroot', function() {
expect(dom.window.document.querySelectorAll('app-footer template[shadowroot="open"]').length).to.equal(1);
expect(dom.window.document.querySelectorAll('app-footer template[shadowrootmode="open"]').length).to.equal(1);
expect(dom.window.document.querySelectorAll('template').length).to.equal(1);
});

it('should have the expected SSR Shadow DOM content for the footer', function() {
const wrapper = new JSDOM(dom.window.document.querySelectorAll('app-footer template[shadowroot="open"]')[0].innerHTML);
const wrapper = new JSDOM(dom.window.document.querySelectorAll('app-footer template[shadowrootmode="open"]')[0].innerHTML);
const footer = wrapper.window.document.querySelectorAll('footer');

expect(footer.length).to.equal(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ describe('Serve Greenwood With: ', function() {
});

it('should have the expected number of <wc-card> tags in the <head>', function() {
const cards = dom.window.document.querySelectorAll('body > wc-card template[shadowroot="open"]');
const cards = dom.window.document.querySelectorAll('body > wc-card template[shadowrootmode="open"]');

expect(cards.length).to.be.greaterThan(0);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-import-jsx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@greenwood/cli": "^0.28.0-alpha.4"
},
"dependencies": {
"wc-compiler": "~0.9.1"
"wc-compiler": "~0.10.0"
},
"devDependencies": {
"@greenwood/cli": "^0.29.1"
Expand Down
2 changes: 1 addition & 1 deletion www/pages/blog/release/v0-26-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ For those curious, let's take a quick peek under the hood to see how it works.
1. Get HTML!
```html
<wcc-footer>
<template shadowroot="open">
<template shadowrootmode="open">
<style>
.footer {
color: white;
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16787,10 +16787,10 @@ wait-port@1.0.4:
commander "^9.3.0"
debug "^4.3.4"

wc-compiler@~0.9.1:
version "0.9.1"
resolved "https://registry.yarnpkg.com/wc-compiler/-/wc-compiler-0.9.1.tgz#65348882a63bf8094722a293c422b4d6f07215d5"
integrity sha512-zdXSXeeoB6jKGV8mELFpY3fe6kxeM+i+TULqMPaP+hXHyQHUWnGAqK6juQUOFc0TVixDTcCmCuQ/GXknqXwRqA==
wc-compiler@~0.10.0:
version "0.10.0"
resolved "https://registry.yarnpkg.com/wc-compiler/-/wc-compiler-0.10.0.tgz#3a0c32c500425c4493def7c47ea8df230d7cd0b8"
integrity sha512-GwtQw/cgbaCedoeguMc5YlRvHujDRTfpJxgglPAVT3LuJCRGXqG3nyckuV4mvblOBAPwePuP9T5nOTxbW/ZIRA==
dependencies:
acorn "^8.7.0"
acorn-jsx "^5.3.2"
Expand Down

0 comments on commit 70ecb68

Please sign in to comment.