polyfill-library 4.2.0 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +4 -4
- package/package.json +10 -11
- package/polyfills/__dist/Array.prototype.@@iterator/meta.json +1 -1
- package/polyfills/__dist/ArrayBuffer.prototype.@@toStringTag/meta.json +1 -0
- package/polyfills/__dist/ArrayBuffer.prototype.@@toStringTag/min.js +1 -0
- package/polyfills/__dist/ArrayBuffer.prototype.@@toStringTag/raw.js +19 -0
- package/polyfills/__dist/HTMLTemplateElement/meta.json +1 -1
- package/polyfills/__dist/HTMLTemplateElement/min.js +1 -1
- package/polyfills/__dist/HTMLTemplateElement/raw.js +25 -598
- package/polyfills/__dist/Map/meta.json +1 -1
- package/polyfills/__dist/Map/min.js +1 -1
- package/polyfills/__dist/Map/raw.js +12 -0
- package/polyfills/__dist/Promise/meta.json +1 -1
- package/polyfills/__dist/Promise/min.js +1 -1
- package/polyfills/__dist/Promise/raw.js +10 -0
- package/polyfills/__dist/Set/meta.json +1 -1
- package/polyfills/__dist/Set/min.js +1 -1
- package/polyfills/__dist/Set/raw.js +12 -0
- package/polyfills/__dist/String.prototype.@@iterator/meta.json +1 -1
- package/polyfills/__dist/Symbol.toStringTag/meta.json +1 -1
- package/polyfills/__dist/TypedArray.prototype.@@iterator/meta.json +1 -0
- package/polyfills/__dist/TypedArray.prototype.@@iterator/min.js +1 -0
- package/polyfills/__dist/TypedArray.prototype.@@iterator/raw.js +22 -0
- package/polyfills/__dist/TypedArray.prototype.@@toStringTag/meta.json +1 -0
- package/polyfills/__dist/TypedArray.prototype.@@toStringTag/min.js +1 -0
- package/polyfills/__dist/TypedArray.prototype.@@toStringTag/raw.js +91 -0
- package/polyfills/__dist/TypedArray.prototype.entries/meta.json +1 -0
- package/polyfills/__dist/TypedArray.prototype.entries/min.js +1 -0
- package/polyfills/__dist/TypedArray.prototype.entries/raw.js +38 -0
- package/polyfills/__dist/TypedArray.prototype.keys/meta.json +1 -0
- package/polyfills/__dist/TypedArray.prototype.keys/min.js +1 -0
- package/polyfills/__dist/TypedArray.prototype.keys/raw.js +38 -0
- package/polyfills/__dist/TypedArray.prototype.toLocaleString/meta.json +1 -0
- package/polyfills/__dist/TypedArray.prototype.toLocaleString/min.js +1 -0
- package/polyfills/__dist/TypedArray.prototype.toLocaleString/raw.js +31 -0
- package/polyfills/__dist/TypedArray.prototype.toString/meta.json +1 -0
- package/polyfills/__dist/TypedArray.prototype.toString/min.js +1 -0
- package/polyfills/__dist/TypedArray.prototype.toString/raw.js +29 -0
- package/polyfills/__dist/TypedArray.prototype.values/meta.json +1 -0
- package/polyfills/__dist/TypedArray.prototype.values/min.js +1 -0
- package/polyfills/__dist/TypedArray.prototype.values/raw.js +43 -0
- package/polyfills/__dist/WeakMap/meta.json +1 -1
- package/polyfills/__dist/WeakSet/meta.json +1 -1
- package/polyfills/__dist/WeakSet/min.js +1 -1
- package/polyfills/__dist/WeakSet/raw.js +6 -0
- package/polyfills/__dist/_ArrayIterator/meta.json +1 -1
- package/polyfills/__dist/_ArrayIterator/min.js +1 -1
- package/polyfills/__dist/_ArrayIterator/raw.js +8 -1
- package/polyfills/__dist/_StringIterator/meta.json +1 -1
- package/polyfills/__dist/_StringIterator/min.js +1 -1
- package/polyfills/__dist/_StringIterator/raw.js +8 -1
- package/polyfills/__dist/aliases.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -4,10 +4,10 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
4
4
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
6
6
|
|
7
|
-
#### [v4.
|
7
|
+
#### [v4.3.0](https://github.com/Financial-Times/polyfill-library/compare/v4.3.0...v4.3.0)
|
8
8
|
|
9
|
-
#### v4.
|
9
|
+
#### v4.3.0
|
10
10
|
|
11
|
-
>
|
11
|
+
> 5 August 2022
|
12
12
|
|
13
|
-
-
|
13
|
+
- prepare v4.3.0 [`#1210`](https://github.com/Financial-Times/polyfill-library/pull/1210)
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "polyfill-library",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.3.0",
|
4
4
|
"description": "A polyfill combinator",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"contributors": [
|
@@ -41,7 +41,7 @@
|
|
41
41
|
"prepublishOnly": "npm run build && mv polyfills/__dist __dist && rimraf polyfills && mkdir polyfills && mv __dist polyfills/__dist",
|
42
42
|
"create-new-polyfill": "node ./tasks/create-new-polyfill.js",
|
43
43
|
"update-browserstack-list": "node ./tasks/updatebrowserstacklist.js",
|
44
|
-
"version": "auto-changelog -p
|
44
|
+
"version": "auto-changelog -p"
|
45
45
|
},
|
46
46
|
"license": "MIT",
|
47
47
|
"engines": {
|
@@ -57,11 +57,11 @@
|
|
57
57
|
"/polyfills/__dist"
|
58
58
|
],
|
59
59
|
"dependencies": {
|
60
|
-
"@financial-times/polyfill-useragent-normaliser": "^2.0.
|
60
|
+
"@financial-times/polyfill-useragent-normaliser": "^2.0.1",
|
61
61
|
"from2-string": "^1.1.0",
|
62
|
-
"graceful-fs": "^4.2.
|
62
|
+
"graceful-fs": "^4.2.10",
|
63
63
|
"merge2": "^1.0.3",
|
64
|
-
"mnemonist": "^0.
|
64
|
+
"mnemonist": "^0.39.2",
|
65
65
|
"stream-from-promise": "^1.0.0",
|
66
66
|
"stream-to-string": "^1.1.0",
|
67
67
|
"toposort": "^2.0.2"
|
@@ -78,7 +78,7 @@
|
|
78
78
|
"@formatjs/intl-relativetimeformat": "9.1.0",
|
79
79
|
"@iarna/toml": "^2.2.3",
|
80
80
|
"@juggle/resize-observer": "^3.3.1",
|
81
|
-
"@webcomponents/template": "^1.
|
81
|
+
"@webcomponents/template": "^1.5.0",
|
82
82
|
"abort-controller": "^3.0.0",
|
83
83
|
"apicache": "^1.6.3",
|
84
84
|
"array.prototype.flatmap": "^1.2.1",
|
@@ -95,7 +95,7 @@
|
|
95
95
|
"diff": "4.0.2",
|
96
96
|
"dotenv": "^8.2.0",
|
97
97
|
"eslint": "^7.0.0",
|
98
|
-
"eslint-plugin-uncalled-iife": "^1.0.
|
98
|
+
"eslint-plugin-uncalled-iife": "^1.0.2",
|
99
99
|
"eslint-plugin-unicorn": "^27.0.0",
|
100
100
|
"execa": "^5.0.0",
|
101
101
|
"express": "^4.17.1",
|
@@ -124,7 +124,7 @@
|
|
124
124
|
"proclaim": "^3.6.0",
|
125
125
|
"rimraf": "^3.0.0",
|
126
126
|
"seamless-scroll-polyfill": "1.2.4",
|
127
|
-
"semver": "^7.3.
|
127
|
+
"semver": "^7.3.7",
|
128
128
|
"sinon": "^10.0.0",
|
129
129
|
"spdx-licenses": "^1.0.0",
|
130
130
|
"uglify-js": "^2.7.5",
|
@@ -133,12 +133,11 @@
|
|
133
133
|
"web-animations-js": "^2.2.5",
|
134
134
|
"webdriverio": "^6.1.14",
|
135
135
|
"whatwg-fetch": "^3.6.2",
|
136
|
-
"wicg-inert": "^3.1.1",
|
137
136
|
"yaku": "1.0.1",
|
138
137
|
"yaml": "^1.1.0"
|
139
138
|
},
|
140
139
|
"volta": {
|
141
|
-
"node": "12.22.
|
142
|
-
"npm": "6.
|
140
|
+
"node": "12.22.12",
|
141
|
+
"npm": "6.14.16"
|
143
142
|
}
|
144
143
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"aliases":["es6","es2015","modernizr:es6array"],"dependencies":["_ESAbstract.CreateMethodProperty","Array.prototype.values","Symbol.iterator"],"spec":"https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator","docs":"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/@@iterator","browsers":{"android":"*","chrome":"<49","edge":"<13","edge_mob":"<13","firefox":"<38","ie":"*","ie_mob":"*","opera":"<25","safari":"<9.0","ios_saf":"<9.0","samsung_mob":"<5"},"detectSource":"\"Symbol\"in self&&\"iterator\"in self.Symbol&&!!Array.prototype[self.Symbol.iterator]\n","baseDir":"Array/prototype/@@iterator","hasTests":true,"isTestable":true,"isPublic":true,"size":77}
|
1
|
+
{"aliases":["es6","es2015","modernizr:es6array"],"dependencies":["_ESAbstract.CreateMethodProperty","Array.prototype.values","Symbol.iterator","Symbol.toStringTag"],"spec":"https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator","docs":"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/@@iterator","browsers":{"android":"*","chrome":"<49","edge":"<13","edge_mob":"<13","firefox":"<38","ie":"*","ie_mob":"*","opera":"<25","safari":"<9.0","ios_saf":"<9.0","samsung_mob":"<5"},"detectSource":"\"Symbol\"in self&&\"iterator\"in self.Symbol&&!!Array.prototype[self.Symbol.iterator]\n","baseDir":"Array/prototype/@@iterator","hasTests":true,"isTestable":true,"isPublic":true,"size":77}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"aliases":["es6","es2015"],"dependencies":["ArrayBuffer","Symbol.toStringTag"],"spec":"https://tc39.es/ecma262/#sec-arraybuffer.prototype-@@tostringtag","docs":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag","browsers":{"android":"*","bb":"10 - *","chrome":"<49","edge":"<15","edge_mob":"<15","firefox":"<51","ie":"*","ie_mob":"*","opera":"<36","op_mob":"<36","safari":"<10.0","ios_saf":"<10.0","samsung_mob":"<5"},"detectSource":"\"Symbol\"in self&&\"toStringTag\"in self.Symbol&&\"ArrayBuffer\"in self&&self.Symbol.toStringTag in self.ArrayBuffer.prototype&&void 0!==self.ArrayBuffer.prototype[self.Symbol.toStringTag]\n","baseDir":"ArrayBuffer/prototype/@@toStringTag","hasTests":true,"isTestable":true,"isPublic":true,"size":265}
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){Object.defineProperty(ArrayBuffer.prototype,Symbol.toStringTag,{value:"ArrayBuffer",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperty(DataView.prototype,Symbol.toStringTag,{value:"DataView",writable:!1,enumerable:!1,configurable:!0})}();
|
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
// ArrayBuffer.prototype.@@toStringTag
|
3
|
+
/* global ArrayBuffer, DataView, Symbol */
|
4
|
+
// 25.1.5.4 ArrayBuffer.prototype [ @@toStringTag ]
|
5
|
+
(function () {
|
6
|
+
Object.defineProperty(ArrayBuffer.prototype, Symbol.toStringTag, {
|
7
|
+
value: 'ArrayBuffer',
|
8
|
+
writable: false,
|
9
|
+
enumerable: false,
|
10
|
+
configurable: true
|
11
|
+
});
|
12
|
+
|
13
|
+
Object.defineProperty(DataView.prototype, Symbol.toStringTag, {
|
14
|
+
value: 'DataView',
|
15
|
+
writable: false,
|
16
|
+
enumerable: false,
|
17
|
+
configurable: true
|
18
|
+
});
|
19
|
+
})();
|
@@ -1 +1 @@
|
|
1
|
-
{"dependencies":["DocumentFragment","Object.getOwnPropertyDescriptor","Event"],"license":"BSD-3-Clause","spec":"https://html.spec.whatwg.org/multipage/scripting.html#the-template-element","repo":"https://github.com/webcomponents/polyfills/tree/master/packages/template","docs":"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template","browsers":{"android":"*","bb":"7 - 10","chrome":"<27","edge":"<13","edge_mob":"<13","firefox":"4 - 22","firefox_mob":"<67","ie":">=11","ie_mob":">=11","opera":"10 - 22","safari":"<9.0","ios_saf":"<9.0","samsung_mob":"<1.5"},"install":{"module":"@webcomponents/template","paths":["template.js"]},"detectSource":"\"HTMLTemplateElement\"in self\n","baseDir":"HTMLTemplateElement","hasTests":true,"isTestable":true,"isPublic":true,"size":
|
1
|
+
{"dependencies":["DocumentFragment","Object.getOwnPropertyDescriptor","Event"],"license":"BSD-3-Clause","spec":"https://html.spec.whatwg.org/multipage/scripting.html#the-template-element","repo":"https://github.com/webcomponents/polyfills/tree/master/packages/template","docs":"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template","browsers":{"android":"*","bb":"7 - 10","chrome":"<27","edge":"<13","edge_mob":"<13","firefox":"4 - 22","firefox_mob":"<67","ie":">=11","ie_mob":">=11","opera":"10 - 22","safari":"<9.0","ios_saf":"<9.0","samsung_mob":"<1.5"},"install":{"module":"@webcomponents/template","paths":["template.min.js"]},"detectSource":"\"HTMLTemplateElement\"in self\n","baseDir":"HTMLTemplateElement","hasTests":true,"isTestable":true,"isPublic":true,"size":7114}
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
(function(){"use strict";!function(){function e(){}function t(e,t){if(!e.childNodes.length)return[];switch(e.nodeType){case Node.DOCUMENT_NODE:return h.call(e,t);case Node.DOCUMENT_FRAGMENT_NODE:return y.call(e,t);default:return f.call(e,t)}}var n="undefined"==typeof HTMLTemplateElement,o=!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment),r=!1;/Trident/.test(navigator.userAgent)&&function(){function e(e,t){if(e instanceof DocumentFragment)for(var o;o=e.firstChild;)n.call(this,o,t);else n.call(this,e,t);return e}r=!0;var t=Node.prototype.cloneNode;Node.prototype.cloneNode=function(e){return e=t.call(this,e),this instanceof DocumentFragment&&(e.__proto__=DocumentFragment.prototype),e},DocumentFragment.prototype.querySelectorAll=HTMLElement.prototype.querySelectorAll,DocumentFragment.prototype.querySelector=HTMLElement.prototype.querySelector,Object.defineProperties(DocumentFragment.prototype,{nodeType:{get:function(){return Node.DOCUMENT_FRAGMENT_NODE},configurable:!0},localName:{get:function(){},configurable:!0},nodeName:{get:function(){return"#document-fragment"},configurable:!0}});var n=Node.prototype.insertBefore;Node.prototype.insertBefore=e;var o=Node.prototype.appendChild;Node.prototype.appendChild=function(t){return t instanceof DocumentFragment?e.call(this,t,null):o.call(this,t),t};var c=Node.prototype.removeChild,a=Node.prototype.replaceChild;Node.prototype.replaceChild=function(t,n){return t instanceof DocumentFragment?(e.call(this,t,n),c.call(this,n)):a.call(this,t,n),n},Document.prototype.createDocumentFragment=function(){var e=this.createElement("df");return e.__proto__=DocumentFragment.prototype,e};var l=Document.prototype.importNode;Document.prototype.importNode=function(e,t){return t=l.call(this,e,t||!1),e instanceof DocumentFragment&&(t.__proto__=DocumentFragment.prototype),t}}();var c=Node.prototype.cloneNode,a=Document.prototype.createElement,l=Document.prototype.importNode,i=Node.prototype.removeChild,p=Node.prototype.appendChild,u=Node.prototype.replaceChild,m=DOMParser.prototype.parseFromString,d=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML")||{get:function(){return this.innerHTML},set:function(e){this.innerHTML=e}},s=Object.getOwnPropertyDescriptor(window.Node.prototype,"childNodes")||{get:function(){return this.childNodes}},f=Element.prototype.querySelectorAll,h=Document.prototype.querySelectorAll,y=DocumentFragment.prototype.querySelectorAll,g=function(){if(!n){var e=document.createElement("template"),t=document.createElement("template");return t.content.appendChild(document.createElement("div")),e.content.appendChild(t),e=e.cloneNode(!0),0===e.content.childNodes.length||0===e.content.firstChild.content.childNodes.length||o}}();if(n){var N=document.implementation.createHTMLDocument("template"),D=!0,v=document.createElement("style");v.textContent="template{display:none;}";var E=document.head;E.insertBefore(v,E.firstElementChild),e.prototype=Object.create(HTMLElement.prototype);var b=!document.createElement("div").hasOwnProperty("innerHTML");e.g=function(t){if(!t.content&&t.namespaceURI===document.documentElement.namespaceURI){t.content=N.createDocumentFragment();for(var n;n=t.firstChild;)p.call(t.content,n);if(b)t.__proto__=e.prototype;else if(t.cloneNode=function(t){return e.i(this,t)},D)try{M(t),C(t)}catch(e){D=!1}e.h(t.content)}};var T={option:["select"],thead:["table"],col:["colgroup","table"],tr:["tbody","table"],th:["tr","tbody","table"],td:["tr","tbody","table"]},M=function(t){Object.defineProperty(t,"innerHTML",{get:function(){return H(this)},set:function(t){var n=T[(/<([a-z][^/\0>\x20\t\r\n\f]+)/i.exec(t)||["",""])[1].toLowerCase()];if(n)for(var o=0;o<n.length;o++)t="<"+n[o]+">"+t+"</"+n[o]+">";for(N.body.innerHTML=t,e.h(N);this.content.firstChild;)i.call(this.content,this.content.firstChild);if(t=N.body,n)for(o=0;o<n.length;o++)t=t.lastChild;for(;t.firstChild;)p.call(this.content,t.firstChild)},configurable:!0})},C=function(e){Object.defineProperty(e,"outerHTML",{get:function(){return"<template>"+this.innerHTML+"</template>"},set:function(e){if(!this.parentNode)throw Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");for(N.body.innerHTML=e,e=this.ownerDocument.createDocumentFragment();N.body.firstChild;)p.call(e,N.body.firstChild);u.call(this.parentNode,e,this)},configurable:!0})};M(e.prototype),C(e.prototype),e.h=function(n){n=t(n,"template");for(var o,r=0,c=n.length;r<c&&(o=n[r]);r++)e.g(o)},document.addEventListener("DOMContentLoaded",function(){e.h(document)}),Document.prototype.createElement=function(){var t=a.apply(this,arguments);return"template"===t.localName&&e.g(t),t},DOMParser.prototype.parseFromString=function(){var t=m.apply(this,arguments);return e.h(t),t},Object.defineProperty(HTMLElement.prototype,"innerHTML",{get:function(){return H(this)},set:function(t){d.set.call(this,t),e.h(this)},configurable:!0,enumerable:!0});var _=/[&\u00A0"]/g,F=/[&\u00A0<>]/g,L=function(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case" ":return" "}};v=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t};var O=v("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),w=v("style script xmp iframe noembed noframes plaintext noscript".split(" ")),H=function(e,t){"template"===e.localName&&(e=e.content);for(var n,o="",r=t?t(e):s.get.call(e),c=0,a=r.length;c<a&&(n=r[c]);c++){e:{var l=n,i=e,p=t;switch(l.nodeType){case Node.ELEMENT_NODE:for(var u=l.localName,m="<"+u,d=l.attributes,f=0;i=d[f];f++)m+=" "+i.name+'="'+i.value.replace(_,L)+'"';m+=">",l=O[u]?m:m+H(l,p)+"</"+u+">";break e;case Node.TEXT_NODE:l=l.data,l=i&&w[i.localName]?l:l.replace(F,L);break e;case Node.COMMENT_NODE:l="\x3c!--"+l.data+"--\x3e";break e;default:throw window.console.error(l),Error("not implemented")}}o+=l}return o}}if(n||g){e.i=function(e,t){var n=c.call(e,!1);return this.g&&this.g(n),t&&(p.call(n.content,c.call(e.content,!0)),A(n.content,e.content)),n};var A=function(n,o){if(o.querySelectorAll&&(o=t(o,"template"),0!==o.length)){n=t(n,"template");for(var r,c,a=0,l=n.length;a<l;a++)c=o[a],r=n[a],e&&e.g&&e.g(c),u.call(r.parentNode,x.call(c,!0),r)}},x=Node.prototype.cloneNode=function(t){if(!r&&o&&this instanceof DocumentFragment){if(!t)return this.ownerDocument.createDocumentFragment();var n=S.call(this.ownerDocument,this,!0)}else n=this.nodeType===Node.ELEMENT_NODE&&"template"===this.localName&&this.namespaceURI==document.documentElement.namespaceURI?e.i(this,t):c.call(this,t);return t&&A(n,this),n},S=Document.prototype.importNode=function(n,o){if(o=o||!1,"template"===n.localName)return e.i(n,o);var r=l.call(this,n,o);if(o){A(r,n),n=t(r,'script:not([type]),script[type="application/javascript"],script[type="text/javascript"]');for(var c,i=0;i<n.length;i++){c=n[i],o=a.call(document,"script"),o.textContent=c.textContent;for(var p,m=c.attributes,d=0;d<m.length;d++)p=m[d],o.setAttribute(p.name,p.value);u.call(c.parentNode,o,c)}}return r}}n&&(window.HTMLTemplateElement=e)}()}).call(self);
|