@lit-labs/ssr
Advanced tools
Comparing version 1.0.0-rc.2 to 1.0.0-rc.3
@@ -114,3 +114,2 @@ /** | ||
window: undefined, | ||
global: undefined, | ||
// User-provided globals, like `require` | ||
@@ -120,3 +119,2 @@ ...props, | ||
window.window = window; | ||
window.global = window; // Required for node-fetch | ||
if (includeJSBuiltIns) { | ||
@@ -123,0 +121,0 @@ Object.assign(window, { |
@@ -13,3 +13,3 @@ /// <reference lib="dom" /> | ||
declare type AttributesMap = Map<string, string>; | ||
export declare const getElementRenderer: ({ elementRenderers }: RenderInfo, tagName: string, ceClass?: typeof HTMLElement, attributes?: AttributesMap) => ElementRenderer | undefined; | ||
export declare const getElementRenderer: ({ elementRenderers }: RenderInfo, tagName: string, ceClass?: typeof HTMLElement | undefined, attributes?: AttributesMap) => ElementRenderer | undefined; | ||
/** | ||
@@ -16,0 +16,0 @@ * An object that renders elements of a certain type. |
/// <reference lib="dom" /> | ||
import { ElementRenderer, ElementRendererConstructor } from './element-renderer.js'; | ||
declare module 'parse5' { | ||
interface DefaultTreeElement { | ||
interface Element { | ||
isDefinedCustomElement?: boolean; | ||
@@ -6,0 +6,0 @@ } |
@@ -13,3 +13,3 @@ /** | ||
*/ | ||
import { DefaultTreeNode, DefaultTreeElement, Node, DefaultTreeCommentNode, DefaultTreeDocumentFragment, DefaultTreeParentNode } from 'parse5'; | ||
import { Node, Element, CommentNode, DocumentFragment, ParentNode } from 'parse5'; | ||
import * as parse5lib from 'parse5'; | ||
@@ -23,9 +23,9 @@ export declare const parseFragment: typeof parse5lib.parseFragment; | ||
export declare function insertNode(parent: any, index: any, newNode: any, replace?: any): void; | ||
export declare function isElement(node: DefaultTreeNode): node is DefaultTreeElement; | ||
export declare function isCommentNode(node: DefaultTreeNode): node is DefaultTreeCommentNode; | ||
export declare function isDocumentFragment(node: DefaultTreeNode): node is DefaultTreeDocumentFragment; | ||
export declare function isTextNode(node: DefaultTreeNode): node is parse5lib.DefaultTreeTextNode; | ||
export declare type GetChildNodes = (node: DefaultTreeParentNode) => Array<DefaultTreeNode> | undefined; | ||
export declare function isElement(node: Node): node is Element; | ||
export declare function isCommentNode(node: Node): node is CommentNode; | ||
export declare function isDocumentFragment(node: Node): node is DocumentFragment; | ||
export declare function isTextNode(node: Node): node is parse5lib.TextNode; | ||
export declare type GetChildNodes = (node: ParentNode) => Array<Node> | undefined; | ||
export declare const defaultChildNodes: GetChildNodes; | ||
export declare function depthFirst(node: DefaultTreeNode | DefaultTreeDocumentFragment, getChildNodes?: GetChildNodes): Iterable<DefaultTreeNode>; | ||
export declare function depthFirst(node: Node | DocumentFragment, getChildNodes?: GetChildNodes): Iterable<Node>; | ||
export declare function nodeWalkAll(node: any, predicate: any, matches?: any, getChildNodes?: any): any[]; | ||
@@ -44,7 +44,7 @@ export declare function removeFakeRootElements(node: any): void; | ||
export interface Visitor { | ||
pre?: (node: DefaultTreeNode, parent?: DefaultTreeParentNode) => boolean | void; | ||
post?: (node: DefaultTreeNode, parent?: DefaultTreeParentNode) => boolean | void; | ||
pre?: (node: Node, parent?: ParentNode) => boolean | void; | ||
post?: (node: Node, parent?: ParentNode) => boolean | void; | ||
getChildNodes?: GetChildNodes; | ||
} | ||
export declare const traverse: (node: DefaultTreeNode, visitor: Visitor, parent?: DefaultTreeParentNode | undefined) => void; | ||
export declare const traverse: (node: Node, visitor: Visitor, parent?: ParentNode | undefined) => void; | ||
//# sourceMappingURL=parse5-utils.d.ts.map |
@@ -21,3 +21,3 @@ /** | ||
if (ast.hasOwnProperty('attrs')) { | ||
const attr = (ast.attrs).find(({ name: attrName }) => attrName === name); | ||
const attr = ast.attrs.find(({ name: attrName }) => attrName === name); | ||
if (attr) { | ||
@@ -24,0 +24,0 @@ return attr.value; |
{ | ||
"name": "@lit-labs/ssr", | ||
"type": "module", | ||
"version": "1.0.0-rc.2", | ||
"version": "1.0.0-rc.3", | ||
"publishConfig": { | ||
@@ -35,5 +35,5 @@ "access": "public" | ||
"devDependencies": { | ||
"@koa/router": "^8.0.8", | ||
"@koa/router": "^10.1.1", | ||
"@open-wc/testing": "^3.0.0-next.1", | ||
"@open-wc/testing-karma": "^3.3.10", | ||
"@open-wc/testing-karma": "^4.0.9", | ||
"@types/chai": "^4.2.11", | ||
@@ -46,8 +46,8 @@ "@types/command-line-args": "^5.0.0", | ||
"@types/koa-static": "^4.0.1", | ||
"@types/mocha": "^7.0.2", | ||
"@types/node": "^13.7.4", | ||
"@types/mocha": "^9.0.0", | ||
"@types/node": "^16.7.8", | ||
"@types/node-fetch": "^2.5.7", | ||
"@types/parse5": "^5.0.0", | ||
"@types/parse5": "^6.0.1", | ||
"@types/resolve": "^1.14.0", | ||
"@web/test-runner": "^0.12.19", | ||
"@web/test-runner": "^0.13.16", | ||
"chai": "^4.2.0", | ||
@@ -57,4 +57,4 @@ "command-line-args": "^5.1.1", | ||
"koa-cors": "^0.0.16", | ||
"mocha": "^7.1.1", | ||
"typescript": "^4.1.3", | ||
"mocha": "^9.1.1", | ||
"typescript": "^4.3.5", | ||
"uvu": "^0.5.1" | ||
@@ -73,3 +73,3 @@ }, | ||
"node-fetch": "^2.6.0", | ||
"parse5": "^5.1.0", | ||
"parse5": "^6.0.1", | ||
"resolve": "^1.10.1" | ||
@@ -76,0 +76,0 @@ }, |
@@ -53,3 +53,3 @@ # @lit-labs/ssr | ||
import {renderModule} from 'lit-ssr/lib/render-module.js'; | ||
import {renderModule} from '@lit-labs/ssr/lib/render-module.js'; | ||
@@ -56,0 +56,0 @@ // Execute the above `renderTemplate` in a separate VM context with a minimal DOM shim |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
124681
1713
+ Addedparse5@6.0.1(transitive)
Updatedparse5@^6.0.1