Skip to content

Commit 87231a4

Browse files
authored
update dependencies (#1310)
* update dependencies * combine all tests * cleanup * update dependencies * fixes * bump version
1 parent 05c4923 commit 87231a4

30 files changed

+781
-1069
lines changed

package-lock.json

+417-708
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"prettier": {
1111
"useTabs": true
1212
},
13-
"version": "1.0.1",
13+
"version": "1.0.2",
1414
"volta": {
1515
"node": "18.10.0"
1616
}

packages/babel-plugin-core-web/lib/injector.js

-49
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
const { addSideEffect } = require("@babel/helper-module-imports");
22
const { get, has } = require("@mrhenry/core-web");
33
const { matchNode } = require("./ast-matcher");
4-
// const toposort = require('toposort');
54

65
const identifierMatcher = require("./matchers/__identifier_matcher");
76
const identifierMatcherMap = require("./matchers/__identifier_matcher_map.json");
@@ -62,54 +61,6 @@ class Injector {
6261
// insert in reverse order
6362
let all = [...this.importSet];
6463

65-
// const graph = all.flatMap((name) => {
66-
// const edges = get(name).deps.map((dep) => {
67-
// return [
68-
// dep,
69-
// name
70-
// ];
71-
// });
72-
73-
// edges.push([name, '~~bundle']);
74-
// return edges;
75-
// });
76-
77-
// // Some polyfills do not have direct dependency - dependant relationship, but still require a fixed loading order.
78-
// if (this.importSet.has('~shadydom')) {
79-
// if (this.importSet.has('~element-qsa-scope')) {
80-
// graph.push([
81-
// '~shadydom',
82-
// '~element-qsa-scope',
83-
// ]);
84-
// }
85-
86-
// if (this.importSet.has('~element-qsa-has')) {
87-
// graph.push([
88-
// '~shadydom',
89-
// '~element-qsa-has',
90-
// ]);
91-
// }
92-
// }
93-
94-
// all = toposort(graph);
95-
96-
all = all.filter((importName) => {
97-
// if (!this.importSet.has(importName)) {
98-
// // "~~bundle" was inserted to create the directed acyclic graph
99-
// // All dependencies and aliases have been added
100-
// // Filtering by the original `importSet` contents restores the intended imports.
101-
// return false;
102-
// }
103-
104-
// Some polyfills can't coexist.
105-
// "golden" should only be imported if "all" doesn't exist.
106-
if (importName === 'Intl.DateTimeFormat.~timeZone.golden') {
107-
return all.indexOf('Intl.DateTimeFormat.~timeZone.all') === -1;
108-
}
109-
110-
return true;
111-
});
112-
11364
while (all.length) {
11465
const importName = all.pop();
11566
addSideEffect(path, `@mrhenry/core-web/modules/${importName}`);
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"Ab":[{"matcher":{"type":"Identifier","name":"AbortController"},"feature":"AbortController"}],"Au":[{"matcher":{"type":"Identifier","name":"AudioContext"},"feature":"AudioContext"}],"Bl":[{"matcher":{"type":"Identifier","name":"Blob"},"feature":"Blob"},{"matcher":{"type":"Identifier","name":"Blob"},"feature":"Blob"},{"matcher":{"type":"Identifier","name":"BlobBuilder"},"feature":"Blob"}],"Cu":[{"matcher":{"type":"Identifier","name":"CustomEvent"},"feature":"CustomEvent"}],"DO":[{"matcher":{"type":"Identifier","name":"DOMRect"},"feature":"DOMRect"},{"matcher":{"type":"Identifier","name":"DOMTokenList"},"feature":"DOMTokenList"},{"matcher":{"type":"Identifier","name":"DOMTokenList"},"feature":"DOMTokenList"}],"Do":[{"matcher":{"type":"Identifier","name":"DocumentFragment"},"feature":"DocumentFragment"}],"Ev":[{"matcher":{"type":"Identifier","name":"Event"},"feature":"Event"},{"matcher":{"type":"Identifier","name":"EventSource"},"feature":"EventSource"}],"HT":[{"matcher":{"type":"Identifier","name":"HTMLDocument"},"feature":"HTMLDocument"},{"matcher":{"type":"Identifier","name":"HTMLPictureElement"},"feature":"HTMLPictureElement"},{"matcher":{"type":"Identifier","name":"HTMLTemplateElement"},"feature":"HTMLTemplateElement"},{"matcher":{"type":"Identifier","name":"HTMLTemplateElement"},"feature":"HTMLTemplateElement"}],"In":[{"matcher":{"type":"Identifier","name":"IntersectionObserver"},"feature":"IntersectionObserver"},{"matcher":{"type":"Identifier","name":"IntersectionObserverEntry"},"feature":"IntersectionObserverEntry"},{"matcher":{"type":"Identifier","name":"IntersectionObserverEntry"},"feature":"IntersectionObserverEntry"}],"ma":[{"matcher":{"type":"Identifier","name":"matchMedia"},"feature":"MediaQueryList.prototype.addEventListener"},{"matcher":{"type":"Identifier","name":"matchMedia"},"feature":"matchMedia"},{"matcher":{"type":"Identifier","name":"matchMedia"},"feature":"matchMedia"}],"Me":[{"matcher":{"type":"Identifier","name":"MediaQueryList"},"feature":"MediaQueryList.prototype.addEventListener"},{"matcher":{"type":"Identifier","name":"MediaQueryList"},"feature":"matchMedia"}],"Mu":[{"matcher":{"type":"Identifier","name":"MutationObserver"},"feature":"MutationObserver"}],"Re":[{"matcher":{"type":"Identifier","name":"ResizeObserver"},"feature":"ResizeObserver"},{"matcher":{"type":"Identifier","name":"Request"},"feature":"fetch"},{"matcher":{"type":"Identifier","name":"Response"},"feature":"fetch"}],"Te":[{"matcher":{"type":"Identifier","name":"TextEncoder"},"feature":"TextEncoder"},{"matcher":{"type":"Identifier","name":"TextDecoder"},"feature":"TextDecoder"}],"Us":[{"matcher":{"type":"Identifier","name":"UserTiming"},"feature":"UserTiming"}],"at":[{"matcher":{"type":"Identifier","name":"atob"},"feature":"atob"}],"co":[{"matcher":{"type":"Identifier","name":"console"},"feature":"console"}],"de":[{"matcher":{"type":"Identifier","name":"devicePixelRatio"},"feature":"devicePixelRatio"}],"fe":[{"matcher":{"type":"Identifier","name":"fetch"},"feature":"fetch"},{"matcher":{"type":"Identifier","name":"fetch"},"feature":"fetch"}],"He":[{"matcher":{"type":"Identifier","name":"Headers"},"feature":"fetch"}],"Bo":[{"matcher":{"type":"Identifier","name":"Body"},"feature":"fetch"}],"re":[{"matcher":{"type":"Identifier","name":"requestAnimationFrame"},"feature":"requestAnimationFrame"},{"matcher":{"type":"Identifier","name":"requestIdleCallback"},"feature":"requestIdleCallback"}],"Sh":[{"matcher":{"type":"Identifier","name":"ShadyDOM"},"feature":"~shadydom"},{"matcher":{"type":"Identifier","name":"ShadyCSS"},"feature":"~shadycss-scoping-shim"},{"matcher":{"type":"Identifier","name":"ShadyCSS"},"feature":"~shadycss-apply-shim"}],"sh":[{"matcher":{"type":"Identifier","name":"shadowRoot"},"feature":"~shadydom"}],"sc":[{"matcher":{"type":"Identifier","name":"scroll"},"feature":"scroll"},{"matcher":{"type":"Identifier","name":"scrollBy"},"feature":"scrollBy"},{"matcher":{"type":"Identifier","name":"scrollIntoView"},"feature":"scrollIntoView"}]}
1+
{"Ab":[{"matcher":{"type":"Identifier","name":"AbortController"},"feature":"AbortController"}],"Au":[{"matcher":{"type":"Identifier","name":"AudioContext"},"feature":"AudioContext"}],"Bl":[{"matcher":{"type":"Identifier","name":"Blob"},"feature":"Blob"},{"matcher":{"type":"Identifier","name":"Blob"},"feature":"Blob"},{"matcher":{"type":"Identifier","name":"BlobBuilder"},"feature":"Blob"}],"Cu":[{"matcher":{"type":"Identifier","name":"CustomEvent"},"feature":"CustomEvent"}],"DO":[{"matcher":{"type":"Identifier","name":"DOMRect"},"feature":"DOMRect"},{"matcher":{"type":"Identifier","name":"DOMTokenList"},"feature":"DOMTokenList"},{"matcher":{"type":"Identifier","name":"DOMTokenList"},"feature":"DOMTokenList"}],"Do":[{"matcher":{"type":"Identifier","name":"DocumentFragment"},"feature":"DocumentFragment"}],"Ev":[{"matcher":{"type":"Identifier","name":"Event"},"feature":"Event"},{"matcher":{"type":"Identifier","name":"EventSource"},"feature":"EventSource"}],"HT":[{"matcher":{"type":"Identifier","name":"HTMLDocument"},"feature":"HTMLDocument"},{"matcher":{"type":"Identifier","name":"HTMLPictureElement"},"feature":"HTMLPictureElement"},{"matcher":{"type":"Identifier","name":"HTMLTemplateElement"},"feature":"HTMLTemplateElement"},{"matcher":{"type":"Identifier","name":"HTMLTemplateElement"},"feature":"HTMLTemplateElement"}],"In":[{"matcher":{"type":"Identifier","name":"IntersectionObserver"},"feature":"IntersectionObserver"},{"matcher":{"type":"Identifier","name":"IntersectionObserverEntry"},"feature":"IntersectionObserverEntry"},{"matcher":{"type":"Identifier","name":"IntersectionObserverEntry"},"feature":"IntersectionObserverEntry"}],"ma":[{"matcher":{"type":"Identifier","name":"matchMedia"},"feature":"MediaQueryList.prototype.addEventListener"},{"matcher":{"type":"Identifier","name":"matchMedia"},"feature":"matchMedia"},{"matcher":{"type":"Identifier","name":"matchMedia"},"feature":"matchMedia"}],"Me":[{"matcher":{"type":"Identifier","name":"MediaQueryList"},"feature":"MediaQueryList.prototype.addEventListener"},{"matcher":{"type":"Identifier","name":"MediaQueryList"},"feature":"matchMedia"}],"Mu":[{"matcher":{"type":"Identifier","name":"MutationObserver"},"feature":"MutationObserver"}],"Re":[{"matcher":{"type":"Identifier","name":"ResizeObserver"},"feature":"ResizeObserver"},{"matcher":{"type":"Identifier","name":"Request"},"feature":"fetch"},{"matcher":{"type":"Identifier","name":"Response"},"feature":"fetch"}],"Te":[{"matcher":{"type":"Identifier","name":"TextEncoder"},"feature":"TextEncoder"},{"matcher":{"type":"Identifier","name":"TextDecoder"},"feature":"TextDecoder"}],"Us":[{"matcher":{"type":"Identifier","name":"UserTiming"},"feature":"UserTiming"}],"at":[{"matcher":{"type":"Identifier","name":"atob"},"feature":"atob"}],"co":[{"matcher":{"type":"Identifier","name":"console"},"feature":"console"}],"de":[{"matcher":{"type":"Identifier","name":"devicePixelRatio"},"feature":"devicePixelRatio"}],"fe":[{"matcher":{"type":"Identifier","name":"fetch"},"feature":"fetch"},{"matcher":{"type":"Identifier","name":"fetch"},"feature":"fetch"}],"He":[{"matcher":{"type":"Identifier","name":"Headers"},"feature":"fetch"}],"Bo":[{"matcher":{"type":"Identifier","name":"Body"},"feature":"fetch"}],"re":[{"matcher":{"type":"Identifier","name":"requestAnimationFrame"},"feature":"requestAnimationFrame"},{"matcher":{"type":"Identifier","name":"requestIdleCallback"},"feature":"requestIdleCallback"}],"Sh":[{"matcher":{"type":"Identifier","name":"ShadyDOM"},"feature":"~shadydom"},{"matcher":{"type":"Identifier","name":"ShadyCSS"},"feature":"~shadycss-scoping-shim"}],"sh":[{"matcher":{"type":"Identifier","name":"shadowRoot"},"feature":"~shadydom"}],"sc":[{"matcher":{"type":"Identifier","name":"scroll"},"feature":"scroll"},{"matcher":{"type":"Identifier","name":"scrollBy"},"feature":"scrollBy"},{"matcher":{"type":"Identifier","name":"scrollIntoView"},"feature":"scrollIntoView"}]}

packages/babel-plugin-core-web/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mrhenry/babel-plugin-core-web",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "browser feature polyfills as a babel plugin",
55
"main": "lib/index.js",
66
"author": "Simon Menke <[email protected]>",
@@ -33,7 +33,7 @@
3333
"dependencies": {
3434
"@babel/helper-module-imports": "^7.15.4",
3535
"@babel/types": "^7.18.13",
36-
"@mrhenry/core-web": "^1.0.1",
36+
"@mrhenry/core-web": "^1.0.2",
3737
"fast-deep-equal": "^3.1.3"
3838
},
3939
"bugs": {

packages/core-web-example/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mrhenry/core-web-example",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"private": true,
55
"scripts": {
66
"build": "babel src -d lib"

packages/core-web-generator/lib/custom-polyfills/generate-element-qsa-has.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core-web-generator/lib/custom-polyfills/generate-element-qsa-has.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core-web-generator/lib/custom-polyfills/generate-webcomponents.js

+42-66
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)