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

@locker/shared-dom

Package Overview
Dependencies
Maintainers
8
Versions
232
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@locker/shared-dom - npm Package Compare versions

Comparing version 0.20.10 to 0.20.11

1

dist/index.cjs.d.ts

@@ -280,2 +280,3 @@ /// <reference types="cacheable-request" />

compile(input: string): string;
private beginsWithPeriod;
private isAlphanumeric;

@@ -282,0 +283,0 @@ private trimEndingChar;

@@ -782,6 +782,15 @@ /*!

const firstCharCode$LWS = shared$LWS.ReflectApply(shared$LWS.StringProtoCharCodeAt, prop$LWS, [0]);
// REGEX:
// [\w] === [a-zA-Z0-9_]
// [\s] === Whitespace
// 1. [\\w\\$\\#]+?\\[['"\`\\w\\s]+?\\]\\. Checks for code in the form of "foo[bar]."
// 2. ([\\w\\$\\#]+?)\\(['"\`\\w\\s]{0,}\\)\\. Checks for code in the form of "foo(bar)."
// 3. ([\\w\\$\\#]+?)\\. Check for code in the form of "foobar."
// {1,} Matches 1 or more of the top 1-3. All must end in a period.
// (?!['"\`]) Ensures that strings are not matched.
// Object keys can contain Symbols or other Special Characters. We only deal with [_, $, #].
if (this.isAlphanumeric(firstCharCode$LWS)) {
return `(?!['"\`])((([a-zA-Z0-9_\\$\\#]+?)\\.){1,})${prop$LWS}(?!['"\`])\\b`;
return `(?!['"\`])(([\\w\\$\\#]+?\\[['"\`\\w\\s]+?\\]\\.|([\\w\\$\\#]+?)\\(['"\`\\w\\s]{0,}\\)\\.|([\\w\\$\\#]+?)\\.){1,})${prop$LWS}(?!['"\`])\\b`;
}
return `(?!['"\`])((([a-zA-Z0-9_\\$\\#]+?)\\.){1,})\\${prop$LWS}(?!['"\`])\\b`;
return `(?!['"\`])(([\\w\\$\\#]+?\\[['"\`\\w\\s]+?\\]\\.|([\\w\\$\\#]+?)\\(['"\`\\w\\s]{0,}\\)\\.|([\\w\\$\\#]+?)\\.){1,})\\${prop$LWS}(?!['"\`])\\b`;
});

@@ -804,2 +813,8 @@ const regexString$LWS = shared$LWS.ReflectApply(shared$LWS.ArrayProtoJoin, regexParts$LWS, ['|']);

let property$LWS = '';
// Check if the match is the full object, else skip.
if (this.beginsWithPeriod(input$LWS, match$LWS.index)) {
compiledOutput$LWS += expr$LWS;
match$LWS = shared$LWS.ReflectApply(shared$LWS.RegExpProtoExec, this.memberExprPatt, [input$LWS]);
continue;
}
// Loop through the properties and find out which Regex matched

@@ -809,3 +824,3 @@ for (let i$LWS = 0, {

} = this.memberProperties; i$LWS < length$LWS; i$LWS++) {
const memberExprObj$LWS = match$LWS[1 + i$LWS * 3];
const memberExprObj$LWS = match$LWS[1 + i$LWS * 4];
if (memberExprObj$LWS) {

@@ -864,2 +879,5 @@ object$LWS = this.trimEndingChar(memberExprObj$LWS);

}
beginsWithPeriod(input$LWS, matchIndex$LWS) {
return input$LWS[matchIndex$LWS - 1] === '.';
}
isAlphanumeric(code$LWS) {

@@ -1142,2 +1160,2 @@ if (code$LWS > 47 && code$LWS < 58 || code$LWS > 64 && code$LWS < 91 || code$LWS > 96 && code$LWS < 123) {

exports.transformSourceText = transformSourceText$LWS;
/*! version: 0.20.10 */
/*! version: 0.20.11 */

@@ -280,2 +280,3 @@ /// <reference types="cacheable-request" />

compile(input: string): string;
private beginsWithPeriod;
private isAlphanumeric;

@@ -282,0 +283,0 @@ private trimEndingChar;

@@ -777,6 +777,15 @@ /*!

const firstCharCode$LWS = ReflectApply$LWS(StringProtoCharCodeAt$LWS, prop$LWS, [0]);
// REGEX:
// [\w] === [a-zA-Z0-9_]
// [\s] === Whitespace
// 1. [\\w\\$\\#]+?\\[['"\`\\w\\s]+?\\]\\. Checks for code in the form of "foo[bar]."
// 2. ([\\w\\$\\#]+?)\\(['"\`\\w\\s]{0,}\\)\\. Checks for code in the form of "foo(bar)."
// 3. ([\\w\\$\\#]+?)\\. Check for code in the form of "foobar."
// {1,} Matches 1 or more of the top 1-3. All must end in a period.
// (?!['"\`]) Ensures that strings are not matched.
// Object keys can contain Symbols or other Special Characters. We only deal with [_, $, #].
if (this.isAlphanumeric(firstCharCode$LWS)) {
return `(?!['"\`])((([a-zA-Z0-9_\\$\\#]+?)\\.){1,})${prop$LWS}(?!['"\`])\\b`;
return `(?!['"\`])(([\\w\\$\\#]+?\\[['"\`\\w\\s]+?\\]\\.|([\\w\\$\\#]+?)\\(['"\`\\w\\s]{0,}\\)\\.|([\\w\\$\\#]+?)\\.){1,})${prop$LWS}(?!['"\`])\\b`;
}
return `(?!['"\`])((([a-zA-Z0-9_\\$\\#]+?)\\.){1,})\\${prop$LWS}(?!['"\`])\\b`;
return `(?!['"\`])(([\\w\\$\\#]+?\\[['"\`\\w\\s]+?\\]\\.|([\\w\\$\\#]+?)\\(['"\`\\w\\s]{0,}\\)\\.|([\\w\\$\\#]+?)\\.){1,})\\${prop$LWS}(?!['"\`])\\b`;
});

@@ -799,2 +808,8 @@ const regexString$LWS = ReflectApply$LWS(ArrayProtoJoin$LWS, regexParts$LWS, ['|']);

let property$LWS = '';
// Check if the match is the full object, else skip.
if (this.beginsWithPeriod(input$LWS, match$LWS.index)) {
compiledOutput$LWS += expr$LWS;
match$LWS = ReflectApply$LWS(RegExpProtoExec$LWS, this.memberExprPatt, [input$LWS]);
continue;
}
// Loop through the properties and find out which Regex matched

@@ -804,3 +819,3 @@ for (let i$LWS = 0, {

} = this.memberProperties; i$LWS < length$LWS; i$LWS++) {
const memberExprObj$LWS = match$LWS[1 + i$LWS * 3];
const memberExprObj$LWS = match$LWS[1 + i$LWS * 4];
if (memberExprObj$LWS) {

@@ -859,2 +874,5 @@ object$LWS = this.trimEndingChar(memberExprObj$LWS);

}
beginsWithPeriod(input$LWS, matchIndex$LWS) {
return input$LWS[matchIndex$LWS - 1] === '.';
}
isAlphanumeric(code$LWS) {

@@ -983,2 +1001,2 @@ if (code$LWS > 47 && code$LWS < 58 || code$LWS > 64 && code$LWS < 91 || code$LWS > 96 && code$LWS < 123) {

export { AbortControllerCtor$LWS as AbortControllerCtor, AbortControllerProto$LWS as AbortControllerProto, AbortControllerProtoAbort$LWS as AbortControllerProtoAbort, AbortControllerProtoSignalGetter$LWS as AbortControllerProtoSignalGetter, AttrProtoNameGetter$LWS as AttrProtoNameGetter, AttrProtoNamespaceURIGetter$LWS as AttrProtoNamespaceURIGetter, AttrProtoOwnerElementGetter$LWS as AttrProtoOwnerElementGetter, AttrProtoValueGetter$LWS as AttrProtoValueGetter, AttrProtoValueSetter$LWS as AttrProtoValueSetter, BlobCtor$LWS as BlobCtor, BlobProtoSizeGetter$LWS as BlobProtoSizeGetter, BlobProtoSlice$LWS as BlobProtoSlice, BlobProtoTypeGetter$LWS as BlobProtoTypeGetter, CUSTOM_ELEMENT_REGISTRY_ATTRIBUTE_NAME$LWS as CUSTOM_ELEMENT_REGISTRY_ATTRIBUTE_NAME, DATA_CLONE_ERROR_CODE$LWS as DATA_CLONE_ERROR_CODE, DOMExceptionCtor$LWS as DOMExceptionCtor, DOMExceptionProtoCodeGetter$LWS as DOMExceptionProtoCodeGetter, DOMImplementationProtoCreateDocument$LWS as DOMImplementationProtoCreateDocument, DOMTokenListProtoValueGetter$LWS as DOMTokenListProtoValueGetter, DocumentFragmentProtoGetElementById$LWS as DocumentFragmentProtoGetElementById, DocumentProtoBodyGetter$LWS as DocumentProtoBodyGetter, DocumentProtoClose$LWS as DocumentProtoClose, DocumentProtoCookieGetter$LWS as DocumentProtoCookieGetter, DocumentProtoCookieSetter$LWS as DocumentProtoCookieSetter, DocumentProtoCreateComment$LWS as DocumentProtoCreateComment, DocumentProtoCreateElement$LWS as DocumentProtoCreateElement, DocumentProtoCreateElementNS$LWS as DocumentProtoCreateElementNS, DocumentProtoDefaultViewGetter$LWS as DocumentProtoDefaultViewGetter, DocumentProtoDocumentElementGetter$LWS as DocumentProtoDocumentElementGetter, DocumentProtoGetElementById$LWS as DocumentProtoGetElementById, DocumentProtoHeadGetter$LWS as DocumentProtoHeadGetter, DocumentProtoImplementationGetter$LWS as DocumentProtoImplementationGetter, DocumentProtoOpen$LWS as DocumentProtoOpen, ElementAriaAttributesToPropertyName$LWS as ElementAriaAttributesToPropertyName, ElementProtoClosest$LWS as ElementProtoClosest, ElementProtoGetAttribute$LWS as ElementProtoGetAttribute, ElementProtoGetAttributeNode$LWS as ElementProtoGetAttributeNode, ElementProtoGetAttributeNodeNS$LWS as ElementProtoGetAttributeNodeNS, ElementProtoHasAttribute$LWS as ElementProtoHasAttribute, ElementProtoInnerHTMLGetter$LWS as ElementProtoInnerHTMLGetter, ElementProtoInnerHTMLSetter$LWS as ElementProtoInnerHTMLSetter, ElementProtoNamespaceURIGetter$LWS as ElementProtoNamespaceURIGetter, ElementProtoOuterHTMLGetter$LWS as ElementProtoOuterHTMLGetter, ElementProtoQuerySelector$LWS as ElementProtoQuerySelector, ElementProtoQuerySelectorAll$LWS as ElementProtoQuerySelectorAll, ElementProtoRemove$LWS as ElementProtoRemove, ElementProtoRemoveAttribute$LWS as ElementProtoRemoveAttribute, ElementProtoRemoveAttributeNS$LWS as ElementProtoRemoveAttributeNS, ElementProtoRemoveAttributeNode$LWS as ElementProtoRemoveAttributeNode, ElementProtoSetAttribute$LWS as ElementProtoSetAttribute, ElementProtoSetAttributeNS$LWS as ElementProtoSetAttributeNS, ElementProtoTagNameGetter$LWS as ElementProtoTagNameGetter, ElementProtoToggleAttribute$LWS as ElementProtoToggleAttribute, ErrorEventCtor$LWS as ErrorEventCtor, EventCtor$LWS as EventCtor, EventProtoCurrentTargetGetter$LWS as EventProtoCurrentTargetGetter, EventProtoStopPropagation$LWS as EventProtoStopPropagation, EventTargetProtoAddEventListener$LWS as EventTargetProtoAddEventListener, EventTargetProtoDispatchEvent$LWS as EventTargetProtoDispatchEvent, EventTargetProtoRemoveEventListener$LWS as EventTargetProtoRemoveEventListener, HTMLAnchorElementProtoHostnameGetter$LWS as HTMLAnchorElementProtoHostnameGetter, HTMLAnchorElementProtoHrefGetter$LWS as HTMLAnchorElementProtoHrefGetter, HTMLAnchorElementProtoHrefSetter$LWS as HTMLAnchorElementProtoHrefSetter, HTMLAnchorElementProtoPathnameGetter$LWS as HTMLAnchorElementProtoPathnameGetter, HTMLAnchorElementProtoProtocolGetter$LWS as HTMLAnchorElementProtoProtocolGetter, HTMLElementGlobalAttributesToPropertyName$LWS as HTMLElementGlobalAttributesToPropertyName, HTMLElementProto$LWS as HTMLElementProto, HTMLElementProtoStyleGetter$LWS as HTMLElementProtoStyleGetter, HTMLIFrameElementProtoContentWindowGetter$LWS as HTMLIFrameElementProtoContentWindowGetter, HTMLIFrameElementProtoSrcSetter$LWS as HTMLIFrameElementProtoSrcSetter, HTMLScriptElementCtor$LWS as HTMLScriptElementCtor, HTMLScriptElementProto$LWS as HTMLScriptElementProto, HTMLScriptElementProtoSrcGetter$LWS as HTMLScriptElementProtoSrcGetter, HTMLScriptElementProtoSrcSetter$LWS as HTMLScriptElementProtoSrcSetter, HTMLTemplateElementProtoContentGetter$LWS as HTMLTemplateElementProtoContentGetter, IS_CHROMIUM_BROWSER$LWS as IS_CHROMIUM_BROWSER, IS_OLD_CHROMIUM_BROWSER$LWS as IS_OLD_CHROMIUM_BROWSER, IS_WEBKIT_BROWSER$LWS as IS_WEBKIT_BROWSER, NAMESPACE_DEFAULT$LWS as NAMESPACE_DEFAULT, NAMESPACE_SVG$LWS as NAMESPACE_SVG, NAMESPACE_XHTML$LWS as NAMESPACE_XHTML, NAMESPACE_XLINK$LWS as NAMESPACE_XLINK, NodeProtoAppendChild$LWS as NodeProtoAppendChild, NodeProtoChildNodesGetter$LWS as NodeProtoChildNodesGetter, NodeProtoCloneNode$LWS as NodeProtoCloneNode, NodeProtoFirstChildGetter$LWS as NodeProtoFirstChildGetter, NodeProtoIsConnectedGetter$LWS as NodeProtoIsConnectedGetter, NodeProtoIsEqualNode$LWS as NodeProtoIsEqualNode, NodeProtoLastChildGetter$LWS as NodeProtoLastChildGetter, NodeProtoNodeNameGetter$LWS as NodeProtoNodeNameGetter, NodeProtoOwnerDocumentGetter$LWS as NodeProtoOwnerDocumentGetter, NodeProtoTextContentGetter$LWS as NodeProtoTextContentGetter, NodeProtoTextContentSetter$LWS as NodeProtoTextContentSetter, RangeProtoCreateContextualFragment$LWS as RangeProtoCreateContextualFragment, RequestProtoURLGetter$LWS as RequestProtoURLGetter, ResponseCtor$LWS as ResponseCtor, ResponseProtoOkGetter$LWS as ResponseProtoOkGetter, ResponseProtoStatus$LWS as ResponseProtoStatus, ResponseProtoStatusText$LWS as ResponseProtoStatusText, ResponseProtoText$LWS as ResponseProtoText, SCRIPT_HOOK_SOURCE_TEXT$LWS as SCRIPT_HOOK_SOURCE_TEXT, SVGScriptElementProtoHrefGetter$LWS as SVGScriptElementProtoHrefGetter, SVGScriptElementProtoHrefSetter$LWS as SVGScriptElementProtoHrefSetter, StorageProtoGetItem$LWS as StorageProtoGetItem, StorageProtoKey$LWS as StorageProtoKey, StorageProtoRemoveItem$LWS as StorageProtoRemoveItem, StorageProtoSetItem$LWS as StorageProtoSetItem, Transpiler$LWS as Transpiler, UNIVERSAL_CONTEXT_NAMES$LWS as UNIVERSAL_CONTEXT_NAMES, URLCreateObjectURL$LWS as URLCreateObjectURL, URLRevokeObjectURL$LWS as URLRevokeObjectURL, WindowClearInterval$LWS as WindowClearInterval, WindowDecodeURIComponent$LWS as WindowDecodeURIComponent, WindowDocumentGetter$LWS as WindowDocumentGetter, WindowEncodeURIComponent$LWS as WindowEncodeURIComponent, WindowFetch$LWS as WindowFetch, WindowFrameElementGetter$LWS as WindowFrameElementGetter, WindowLengthGetter$LWS as WindowLengthGetter, WindowLocationGetter$LWS as WindowLocationGetter, WindowQueueMicrotask$LWS as WindowQueueMicrotask, WindowSetInterval$LWS as WindowSetInterval, XhrCtor$LWS as XhrCtor, XhrProtoAbort$LWS as XhrProtoAbort, XhrProtoOpen$LWS as XhrProtoOpen, XhrProtoResponseTextGetter$LWS as XhrProtoResponseTextGetter, XhrProtoSend$LWS as XhrProtoSend, XhrProtoStatusGetter$LWS as XhrProtoStatusGetter, XhrProtoWithCredentialsSetter$LWS as XhrProtoWithCredentialsSetter, compileSourceText$LWS as compileSourceText, defineScriptAccessorProperty$LWS as defineScriptAccessorProperty, defineScriptEvaluatorProperty$LWS as defineScriptEvaluatorProperty, deleteOriginalScriptProperty$LWS as deleteOriginalScriptProperty, deleteResolvedScriptURL$LWS as deleteResolvedScriptURL, deleteScriptEvaluatorProperty$LWS as deleteScriptEvaluatorProperty, generateContextAssignmentCodeFromContextNames$LWS as generateContextAssignmentCodeFromContextNames, getOriginalScriptProperty$LWS as getOriginalScriptProperty, getResolvedScriptURL$LWS as getResolvedScriptURL, getScriptSrcEvaluatorHookURL$LWS as getScriptSrcEvaluatorHookURL, getValidator$LWS as getValidator, initWindowOpenChildWindow$LWS as initWindowOpenChildWindow, isScriptEvaluated$LWS as isScriptEvaluated, isScriptPropertyEvaluatorHookDefined$LWS as isScriptPropertyEvaluatorHookDefined, isScriptURLEvaluatorHookDefined$LWS as isScriptURLEvaluatorHookDefined, isWindow$LWS as isWindow, normalizeNamespacedAttributeName$LWS as normalizeNamespacedAttributeName, normalizeWindowOpenArguments$LWS as normalizeWindowOpenArguments, rootDocument$LWS as rootDocument, rootValidator$LWS as rootValidator, rootWindow$LWS as rootWindow, rootWindowLocation$LWS as rootWindowLocation, rootWindowTop$LWS as rootWindowTop, setOriginalScriptScriptProperty$LWS as setOriginalScriptScriptProperty, setResolvedScriptURL$LWS as setResolvedScriptURL, trackScriptAsEvaluated$LWS as trackScriptAsEvaluated, transformSourceText$LWS as transformSourceText };
/*! version: 0.20.10 */
/*! version: 0.20.11 */

4

package.json
{
"name": "@locker/shared-dom",
"version": "0.20.10",
"version": "0.20.11",
"license": "SEE LICENSE IN LICENSE.txt",

@@ -19,3 +19,3 @@ "author": "Salesforce UI Security Team",

"dependencies": {
"@locker/shared": "0.20.10"
"@locker/shared": "0.20.11"
},

@@ -22,0 +22,0 @@ "files": [

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