Skip to content

Commit

Permalink
chore: update lockfile
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsDenBakker committed Mar 10, 2020
1 parent 796223f commit 21542aa
Show file tree
Hide file tree
Showing 147 changed files with 4,741 additions and 5,663 deletions.
2 changes: 1 addition & 1 deletion packages/building-utils/custom-minify-css.js
Expand Up @@ -21,7 +21,7 @@ const cleanCSS = new CleanCSS({
replaceTimeUnits: true, // controls replacing time units with shorter values; defaults to `true`
replaceZeroUnits: true, // controls replacing zero values with units; defaults to `true`
roundingPrecision: false, // rounds pixel values to `N` decimal places; `false` disables rounding; defaults to `false`
selectorsSortingMethod: false, // denotes selector sorting method; can be `'natural'` or `'standard'`, `'none'`, or false (the last two since 4.1.0); defaults to `'standard'`
selectorsSortingMethod: 'none', // denotes selector sorting method; can be `'natural'` or `'standard'`, `'none'`, or false (the last two since 4.1.0); defaults to `'standard'`
specialComments: 'all', // denotes a number of /*! ... */ comments preserved; defaults to `all`
tidyAtRules: false, // controls at-rules (e.g. `@charset`, `@import`) optimizing; defaults to `true`
tidyBlockScopes: false, // controls block scopes (e.g. `@media`) optimizing; defaults to `true`
Expand Down
@@ -1 +1 @@
<html lang="en-GB"><head><title>My app</title><style>my-app{display:block}</style></head><body><h1><span>Hello world!</span></h1><my-app></my-app><script src="polyfills/core-js.d58f09bfd9f1c0b1682cf4a93be23230.js" nomodule=""></script><script src="./app.js" type="module"></script></body></html>
<html lang="en-GB"><head><title>My app</title><style>my-app{display:block}</style></head><body><h1><span>Hello world!</span></h1><my-app></my-app><script src="polyfills/core-js.577a5602a7262d6256830802d4aaab43.js" nomodule=""></script><script src="./app.js" type="module"></script></body></html>
@@ -1 +1 @@
<html lang="en-GB"><head><title>My app</title><style>my-app{display:block}</style><link rel="preload" href="app.js" as="script" crossorigin="anonymous"></head><body><h1><span>Hello world!</span></h1><my-app></my-app><script src="polyfills/core-js.d58f09bfd9f1c0b1682cf4a93be23230.js" nomodule=""></script><script>!function(){function e(e,o){return new Promise((function(t,n){document.head.appendChild(Object.assign(document.createElement("script"),{src:e,onload:t,onerror:n},o?{type:"module"}:void 0))}))}var o=[];function t(){"noModule"in HTMLScriptElement.prototype?window.importShim("./app.js"):System.import("./legacy/app.js")}"attachShadow"in Element.prototype&&"getRootNode"in Element.prototype&&(!window.ShadyDOM||!window.ShadyDOM.force)||o.push(e("polyfills/webcomponents.dae9f79d9d6992b6582e204c3dd953d3.js",!1)),!("noModule"in HTMLScriptElement.prototype)&&"getRootNode"in Element.prototype&&o.push(e("polyfills/custom-elements-es5-adapter.84b300ee818dce8b351c7cc7c100bcf7.js",!1)),o.length?Promise.all(o).then(t):t()}();</script></body></html>
<html lang="en-GB"><head><title>My app</title><style>my-app{display:block}</style><link rel="preload" href="app.js" as="script" crossorigin="anonymous"></head><body><h1><span>Hello world!</span></h1><my-app></my-app><script src="polyfills/core-js.577a5602a7262d6256830802d4aaab43.js" nomodule=""></script><script>!function(){function e(e,o){return new Promise((function(t,n){document.head.appendChild(Object.assign(document.createElement("script"),{src:e,onload:t,onerror:n},o?{type:"module"}:void 0))}))}var o=[];function t(){"noModule"in HTMLScriptElement.prototype?window.importShim("./app.js"):System.import("./legacy/app.js")}"attachShadow"in Element.prototype&&"getRootNode"in Element.prototype&&(!window.ShadyDOM||!window.ShadyDOM.force)||o.push(e("polyfills/webcomponents.d67d6757b8cd44bc35b021ee0b71d197.js",!1)),!("noModule"in HTMLScriptElement.prototype)&&"getRootNode"in Element.prototype&&o.push(e("polyfills/custom-elements-es5-adapter.84b300ee818dce8b351c7cc7c100bcf7.js",!1)),o.length?Promise.all(o).then(t):t()}();</script></body></html>
@@ -1 +1 @@
<html lang="en-GB"><head><title>My app</title><style>my-app{display:block}</style><link rel="preload" href="app.js" as="script" crossorigin="anonymous"></head><body><h1><span>Hello world!</span></h1><my-app></my-app><script>window.importShim=t=>import(t.startsWith(".")?new URL(t,document.baseURI):t);</script><script src="polyfills/custom-b.36a50cce88edee34c249d0276be6531d.js" nomodule=""></script><script src="polyfills/core-js.d58f09bfd9f1c0b1682cf4a93be23230.js" nomodule=""></script><script>!function(){function e(e,o){return new Promise((function(t,n){document.head.appendChild(Object.assign(document.createElement("script"),{src:e,onload:t,onerror:n},o?{type:"module"}:void 0))}))}var o=[];function t(){window.importShim("./app.js")}"foo"in window&&o.push(e("polyfills/custom-a.612310cce7c28a680112cc9eff6ef77c.js",!1)),"fetch"in window||o.push(e("polyfills/fetch.191258a74d74243758f52065f3d0962a.js",!1)),"noModule"in HTMLScriptElement.prototype&&!("importShim"in window)&&o.push(e("polyfills/dynamic-import.b745cfc9384367cc18b42bbef2bbdcd9.js",!1)),"attachShadow"in Element.prototype&&"getRootNode"in Element.prototype&&(!window.ShadyDOM||!window.ShadyDOM.force)||o.push(e("polyfills/webcomponents.dae9f79d9d6992b6582e204c3dd953d3.js",!1)),!("noModule"in HTMLScriptElement.prototype)&&"getRootNode"in Element.prototype&&o.push(e("polyfills/custom-elements-es5-adapter.84b300ee818dce8b351c7cc7c100bcf7.js",!1)),o.length?Promise.all(o).then(t):t()}();</script></body></html>
<html lang="en-GB"><head><title>My app</title><style>my-app{display:block}</style><link rel="preload" href="app.js" as="script" crossorigin="anonymous"></head><body><h1><span>Hello world!</span></h1><my-app></my-app><script>window.importShim=t=>import(t.startsWith(".")?new URL(t,document.baseURI):t);</script><script src="polyfills/custom-b.36a50cce88edee34c249d0276be6531d.js" nomodule=""></script><script src="polyfills/core-js.577a5602a7262d6256830802d4aaab43.js" nomodule=""></script><script>!function(){function e(e,o){return new Promise((function(t,n){document.head.appendChild(Object.assign(document.createElement("script"),{src:e,onload:t,onerror:n},o?{type:"module"}:void 0))}))}var o=[];function t(){window.importShim("./app.js")}"foo"in window&&o.push(e("polyfills/custom-a.612310cce7c28a680112cc9eff6ef77c.js",!1)),"fetch"in window||o.push(e("polyfills/fetch.191258a74d74243758f52065f3d0962a.js",!1)),"noModule"in HTMLScriptElement.prototype&&!("importShim"in window)&&o.push(e("polyfills/dynamic-import.b745cfc9384367cc18b42bbef2bbdcd9.js",!1)),"attachShadow"in Element.prototype&&"getRootNode"in Element.prototype&&(!window.ShadyDOM||!window.ShadyDOM.force)||o.push(e("polyfills/webcomponents.d67d6757b8cd44bc35b021ee0b71d197.js",!1)),!("noModule"in HTMLScriptElement.prototype)&&"getRootNode"in Element.prototype&&o.push(e("polyfills/custom-elements-es5-adapter.84b300ee818dce8b351c7cc7c100bcf7.js",!1)),o.length?Promise.all(o).then(t):t()}();</script></body></html>
@@ -1 +1 @@
<html lang="en-GB"><head><title>My app</title><style>my-app{display:block}</style><link rel="preload" href="app.js" as="script" crossorigin="anonymous"></head><body><h1><span>Hello world!</span></h1><my-app></my-app><script>!function(){function e(e,o){return new Promise((function(t,n){document.head.appendChild(Object.assign(document.createElement("script"),{src:e,onload:t,onerror:n},o?{type:"module"}:void 0))}))}var o=[];function t(){window.importShim("./app.js")}"attachShadow"in Element.prototype&&"getRootNode"in Element.prototype&&(!window.ShadyDOM||!window.ShadyDOM.force)||o.push(e("polyfills/webcomponents.dae9f79d9d6992b6582e204c3dd953d3.js",!1)),!("noModule"in HTMLScriptElement.prototype)&&"getRootNode"in Element.prototype&&o.push(e("polyfills/custom-elements-es5-adapter.84b300ee818dce8b351c7cc7c100bcf7.js",!1)),o.length?Promise.all(o).then(t):t()}();</script></body></html>
<html lang="en-GB"><head><title>My app</title><style>my-app{display:block}</style><link rel="preload" href="app.js" as="script" crossorigin="anonymous"></head><body><h1><span>Hello world!</span></h1><my-app></my-app><script>!function(){function e(e,o){return new Promise((function(t,n){document.head.appendChild(Object.assign(document.createElement("script"),{src:e,onload:t,onerror:n},o?{type:"module"}:void 0))}))}var o=[];function t(){window.importShim("./app.js")}"attachShadow"in Element.prototype&&"getRootNode"in Element.prototype&&(!window.ShadyDOM||!window.ShadyDOM.force)||o.push(e("polyfills/webcomponents.d67d6757b8cd44bc35b021ee0b71d197.js",!1)),!("noModule"in HTMLScriptElement.prototype)&&"getRootNode"in Element.prototype&&o.push(e("polyfills/custom-elements-es5-adapter.84b300ee818dce8b351c7cc7c100bcf7.js",!1)),o.length?Promise.all(o).then(t):t()}();</script></body></html>
5 changes: 4 additions & 1 deletion packages/dedupe-mixin/demo-typed/no-dedupe/index.js
Expand Up @@ -10,7 +10,7 @@ class Page extends LoggingMixin(HTMLElement) {
connectedCallback() {
super.connectedCallback();
this.shadowRoot.innerHTML = `
<style>
<style>
:host { display: block; background: ${this.name}; width: 100px; height: 100px; }
</style>
<div>
Expand All @@ -26,6 +26,7 @@ class PageRed extends Page {
this.name = 'Red';
}
}
// @ts-ignore
customElements.define('page-red', PageRed);

// ****** here we apply the mixin again ******
Expand All @@ -40,6 +41,7 @@ class PageGreen extends LoggingMixin(Page) {
// this.logString(12);
}
}
// @ts-ignore
customElements.define('page-green', PageGreen);

class PageBlue extends Page {
Expand All @@ -48,4 +50,5 @@ class PageBlue extends Page {
this.name = 'Blue';
}
}
// @ts-ignore
customElements.define('page-blue', PageBlue);
5 changes: 4 additions & 1 deletion packages/dedupe-mixin/demo-typed/with-dedupe/index.js
Expand Up @@ -10,7 +10,7 @@ class Page extends LoggingMixin(HTMLElement) {
connectedCallback() {
super.connectedCallback();
this.shadowRoot.innerHTML = `
<style>
<style>
:host { display: block; background: ${this.name}; width: 100px; height: 100px; }
</style>
<div>
Expand All @@ -26,6 +26,7 @@ class PageRed extends Page {
this.name = 'Red';
}
}
// @ts-ignore
customElements.define('page-red', PageRed);

// ****** here we apply the mixin again ******
Expand All @@ -40,6 +41,7 @@ class PageGreen extends LoggingMixin(Page) {
// this.logString(12);
}
}
// @ts-ignore
customElements.define('page-green', PageGreen);

class PageBlue extends Page {
Expand All @@ -48,4 +50,5 @@ class PageBlue extends Page {
this.name = 'Blue';
}
}
// @ts-ignore
customElements.define('page-blue', PageBlue);
Expand Up @@ -119,7 +119,7 @@ describe('compatibility transform middleware', () => {
/** NOTE: this test can fail over time as browser support improves */
it('does not do any transformation for standard features', async () => {
await expectCompatibilityTransform(userAgents['Chrome 78'], {
objectSpread: true,
objectSpread: false,
templateLiteral: true,
optionalChaining: true,
nullishCoalescing: true,
Expand Down Expand Up @@ -166,7 +166,10 @@ describe('compatibility transform middleware', () => {
});

it('transforms for Chrome 78', async () => {
await expectCompatibilityTransform(userAgents['Chrome 78']);
await expectCompatibilityTransform(userAgents['Chrome 78'], {
optionalChaining: true,
nullishCoalescing: true,
});
});

it('transforms for Chrome 62', async () => {
Expand Down Expand Up @@ -197,7 +200,10 @@ describe('compatibility transform middleware', () => {
});

it('transforms for Firefox 70', async () => {
await expectCompatibilityTransform(userAgents['Firefox 70']);
await expectCompatibilityTransform(userAgents['Firefox 70'], {
optionalChaining: true,
nullishCoalescing: true,
});
});

it('transforms for Safari 12.1.2', async () => {
Expand Down Expand Up @@ -267,7 +273,10 @@ describe('compatibility transform middleware', () => {
});

it('transforms for Chrome 78', async () => {
await expectCompatibilityTransform(userAgents['Chrome 78']);
await expectCompatibilityTransform(userAgents['Chrome 78'], {
optionalChaining: true,
nullishCoalescing: true,
});
});

it('transforms for Chrome 62', async () => {
Expand Down Expand Up @@ -296,7 +305,10 @@ describe('compatibility transform middleware', () => {
});

it('transforms for Firefox 70', async () => {
await expectCompatibilityTransform(userAgents['Firefox 70']);
await expectCompatibilityTransform(userAgents['Firefox 70'], {
optionalChaining: true,
nullishCoalescing: true,
});
});

it('transforms for Safari 12.1.2', async () => {
Expand Down Expand Up @@ -603,7 +615,7 @@ describe('compatibility transform middleware', () => {
port: 8080,
rootDir: path.resolve(__dirname, '..', 'fixtures', 'simple'),
appIndex: path.resolve(__dirname, '..', 'fixtures', 'simple', 'index.html'),
compatibility: compatibilityModes.MIN,
compatibility: compatibilityModes.MAX,
nodeResolve: true,
}),
));
Expand All @@ -619,7 +631,7 @@ describe('compatibility transform middleware', () => {

expect(response.status).to.equal(200);

expect(responseText).to.include('_asyncGenerator = _wrapAsyncGenerator(function* () {');
expect(responseText).to.include('function _classCallCheck(instance, Constructor)');
expect(responseText).to.include(
"import { message } from './node_modules/my-module/index.js'",
);
Expand Down
95 changes: 87 additions & 8 deletions packages/es-dev-server/test/snapshots/polyfills-loader/auto.html
@@ -1,20 +1,99 @@
<html>

<head>
<html><head>
<title>My app</title>
</head>

<body>

<!-- relative path -->
<script type="module" src="./app.js"></script>


<!-- upwards path -->
<script type="module" src="../src/app.js"></script>


<!-- absolute path -->
<script type="module" src="/src/app.js"></script>




<script>(function () {
function polyfillsLoader() {
function loadScript(src, type) {
return new Promise(function (resolve) {
var script = document.createElement('script');

function onLoaded() {
document.head.removeChild(script);
resolve();
}

script.src = src;
script.onload = onLoaded;

script.onerror = function () {
console.error('[polyfills-loader] failed to load: ' + src + ' check the network tab for HTTP status.');
onLoaded();
};

if (type) script.type = type;
document.head.appendChild(script);
});
}

var polyfills = [];

if (!('noModule' in HTMLScriptElement.prototype)) {
polyfills.push(loadScript('./polyfills/regenerator-runtime.js'));
}

if (!('fetch' in window)) {
polyfills.push(loadScript('./polyfills/fetch.js'));
}

if (!('attachShadow' in Element.prototype) || !('getRootNode' in Element.prototype)) {
polyfills.push(loadScript('./polyfills/webcomponents.js'));
}

if (!('noModule' in HTMLScriptElement.prototype) && 'getRootNode' in Element.prototype) {
polyfills.push(loadScript('./polyfills/custom-elements-es5-adapter.js'));
}

function loadFiles() {
[function () {
return loadScript('./app.js', 'module');
}, function () {
return loadScript('../src/app.js', 'module');
}, function () {
return loadScript('/src/app.js', 'module');
}].reduce(function (a, c) {
return a.then(c);
}, Promise.resolve());
}

if (polyfills.length) {
Promise.all(polyfills).then(loadFiles);
} else {
loadFiles();
}
}

if (!('noModule' in HTMLScriptElement.prototype)) {
var s = document.createElement('script');

function onLoaded() {
document.head.removeChild(s);
polyfillsLoader();
}

s.src = "polyfills/core-js.js";
s.onload = onLoaded;

</body>
s.onerror = function () {
console.error('[polyfills-loader] failed to load: ' + s.src + ' check the network tab for HTTP status.');
onLoaded();
};

</html>
document.head.appendChild(s);
} else {
polyfillsLoader();
}
})();</script></body></html>

0 comments on commit 21542aa

Please sign in to comment.