Skip to content

Commit

Permalink
chore(vite-plugin) update test snapshots (#931)
Browse files Browse the repository at this point in the history
* chore(vite-plugin) update pnpm version

* tests: update snapshots

* chore(vite-plugin) update pnpm version in github action
  • Loading branch information
jacksteamdev authored Oct 20, 2024
1 parent 478f967 commit 5b48ced
Show file tree
Hide file tree
Showing 6 changed files with 3,061 additions and 3,148 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: pnpm/action-setup@v4
with:
# Version of PNPM to install
version: 6.3.0
version: 8.9.0
# Where to store PNPM files
# dest: # optional, default is ~/setup-pnpm
# If specified, run `pnpm install`
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/vite-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
uses: pnpm/action-setup@v4
with:
# Version of PNPM to install
version: 7.9.5
version: 8.9.0
# Where to store PNPM files
# dest: # optional, default is ~/setup-pnpm
# If specified, run `pnpm install`
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
uses: pnpm/action-setup@v4
with:
# Version of PNPM to install
version: 7.9.5
version: 8.9.0
# Where to store PNPM files
# dest: # optional, default is ~/setup-pnpm
# If specified, run `pnpm install`
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
uses: pnpm/action-setup@v4
with:
# Version of PNPM to install
version: 7.9.5
version: 8.9.0
# Where to store PNPM files
# dest: # optional, default is ~/setup-pnpm
# If specified, run `pnpm install`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Array [
"src/content.tsx-loader.js",
"src/content.tsx.js",
"src/popup.html",
"vendor/chunk-MPSAKQTA.js__v--hash.js",
"vendor/chunk-D6CDYV2H.js__v--hash.js",
"vendor/crx-client-port.js",
"vendor/crx-client-preamble.js",
"vendor/id-__x00__react-jsx-dev-runtime.js",
Expand Down Expand Up @@ -170,42 +170,15 @@ export default App;
var _c;
$RefreshReg$(_c, \\"App\\");
if (import.meta.hot) {
let isReactRefreshBoundary = function(mod) {
if (mod == null || typeof mod !== \\"object\\") {
return false;
}
let hasExports = false;
let areAllExportsComponents = true;
for (const exportName in mod) {
hasExports = true;
if (exportName === \\"__esModule\\") {
continue;
}
const desc = Object.getOwnPropertyDescriptor(mod, exportName);
if (desc && desc.get) {
return false;
}
const exportValue = mod[exportName];
if (!RefreshRuntime.isLikelyComponentType(exportValue)) {
areAllExportsComponents = false;
}
}
return hasExports && areAllExportsComponents;
};
window.$RefreshReg$ = prevRefreshReg;
window.$RefreshSig$ = prevRefreshSig;
import.meta.hot.accept((mod) => {
if (isReactRefreshBoundary(mod)) {
if (!window.__vite_plugin_react_timeout) {
window.__vite_plugin_react_timeout = setTimeout(() => {
window.__vite_plugin_react_timeout = 0;
RefreshRuntime.performReactRefresh();
}, 30);
}
} else {
import.meta.hot.invalidate();
}
});
import.meta.hot.accept();
if (!window.__vite_plugin_react_timeout) {
window.__vite_plugin_react_timeout = setTimeout(() => {
window.__vite_plugin_react_timeout = 0;
RefreshRuntime.performReactRefresh();
}, 30);
}
}
"
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Array [
"src/lib/Counter.svelte.js",
"src/lib/Counter.svelte__svelte_type--style_lang.css.js",
"src/popup.html",
"vendor/chunk-GTBF3NP3.js__v--hash.js",
"vendor/chunk-3BFMV3YN.js__v--hash.js",
"vendor/crx-client-port.js",
"vendor/svelte-hmr-runtime-hot-api-esm.js__v--hash.js",
"vendor/svelte-hmr-runtime-hot-api.js__v--hash.js",
Expand Down Expand Up @@ -137,7 +137,7 @@ import 'http://localhost:3000/@crx/client-worker';
`;

exports[`serve fs output > src/App.svelte.js 1`] = `
"import { createHotContext as __vite__createHotContext } from \\"/vendor/vite-client.js\\";import.meta.hot = __vite__createHotContext(\\"/src/App.svelte.js\\");/* src/App.svelte generated by Svelte v3.59.2 */
"import { createHotContext as __vite__createHotContext } from \\"/vendor/vite-client.js\\";import.meta.hot = __vite__createHotContext(\\"/src/App.svelte.js\\");/* src/App.svelte generated by Svelte v3.48.0 */
import {
SvelteComponentDev as SvelteComponentDev$,
add_location as add_location$,
Expand Down Expand Up @@ -304,7 +304,7 @@ class App$ extends SvelteComponentDev$ {
}
}
import * as ___SVELTE_HMR_HOT_API from \\"/vendor/svelte-hmr-runtime-hot-api-esm.js__v--hash.js\\";import { adapter as ___SVELTE_HMR_HOT_API_PROXY_ADAPTER } from \\"/vendor/svelte-hmr-runtime-proxy-adapter-dom.js__v--hash.js\\";if (import.meta && import.meta.hot) { if (false) import.meta.hot.acceptExports(['default']);; App$ = ___SVELTE_HMR_HOT_API.applyHmr({ m: import.meta, id: \\"<root>/src/App.svelte\\", hotOptions: {\\"preserveLocalState\\":false,\\"noPreserveStateKey\\":[\\"@hmr:reset\\",\\"@!hmr\\"],\\"preserveAllLocalStateKey\\":\\"@hmr:keep-all\\",\\"preserveLocalStateKey\\":\\"@hmr:keep\\",\\"noReload\\":false,\\"optimistic\\":false,\\"acceptNamedExports\\":true,\\"acceptAccessors\\":true,\\"injectCss\\":false,\\"cssEjectDelay\\":100,\\"native\\":false,\\"importAdapterName\\":\\"___SVELTE_HMR_HOT_API_PROXY_ADAPTER\\",\\"noOverlay\\":true,\\"allowLiveBinding\\":false,\\"partialAccept\\":true}, Component: App$, ProxyAdapter: ___SVELTE_HMR_HOT_API_PROXY_ADAPTER, acceptable: true, preserveLocalState: false, emitCss: true, }); }
import * as ___SVELTE_HMR_HOT_API from '/vendor/svelte-hmr-runtime-hot-api-esm.js__v--hash.js';import { adapter as ___SVELTE_HMR_HOT_API_PROXY_ADAPTER } from '/vendor/svelte-hmr-runtime-proxy-adapter-dom.js__v--hash.js';if (import.meta && import.meta.hot) { if (false) import.meta.hot.acceptExports(['default']);; App$ = ___SVELTE_HMR_HOT_API.applyHmr({ m: import.meta, id: \\"<root>/src/App.svelte\\", hotOptions: {\\"preserveLocalState\\":false,\\"noPreserveStateKey\\":[\\"@hmr:reset\\",\\"@!hmr\\"],\\"preserveAllLocalStateKey\\":\\"@hmr:keep-all\\",\\"preserveLocalStateKey\\":\\"@hmr:keep\\",\\"noReload\\":false,\\"optimistic\\":false,\\"acceptNamedExports\\":true,\\"acceptAccessors\\":true,\\"injectCss\\":false,\\"cssEjectDelay\\":100,\\"native\\":false,\\"importAdapterName\\":\\"___SVELTE_HMR_HOT_API_PROXY_ADAPTER\\",\\"noOverlay\\":true,\\"allowLiveBinding\\":false,\\"partialAccept\\":true}, Component: App$, ProxyAdapter: ___SVELTE_HMR_HOT_API_PROXY_ADAPTER, acceptable: true, preserveLocalState: false, emitCss: true, }); }
export default App$;
Expand Down Expand Up @@ -365,7 +365,7 @@ exports[`serve fs output > src/content.js-loader.js 1`] = `
`;
exports[`serve fs output > src/lib/Counter.svelte.js 1`] = `
"import { createHotContext as __vite__createHotContext } from \\"/vendor/vite-client.js\\";import.meta.hot = __vite__createHotContext(\\"/src/lib/Counter.svelte.js\\");/* src/lib/Counter.svelte generated by Svelte v3.59.2 */
"import { createHotContext as __vite__createHotContext } from \\"/vendor/vite-client.js\\";import.meta.hot = __vite__createHotContext(\\"/src/lib/Counter.svelte.js\\");/* src/lib/Counter.svelte generated by Svelte v3.48.0 */
import {
SvelteComponentDev as SvelteComponentDev$,
add_location as add_location$,
Expand Down Expand Up @@ -412,7 +412,7 @@ function create_fragment(ctx) {
append_dev$(button$, t1$);
if (!mounted) {
dispose = listen_dev$(button$, \\"click\\", /*increment*/ ctx[1], false, false, false, false);
dispose = listen_dev$(button$, \\"click\\", /*increment*/ ctx[1], false, false, false);
mounted = true;
}
},
Expand Down Expand Up @@ -481,7 +481,7 @@ class Counter$ extends SvelteComponentDev$ {
}
}
import * as ___SVELTE_HMR_HOT_API from \\"/vendor/svelte-hmr-runtime-hot-api-esm.js__v--hash.js\\";import { adapter as ___SVELTE_HMR_HOT_API_PROXY_ADAPTER } from \\"/vendor/svelte-hmr-runtime-proxy-adapter-dom.js__v--hash.js\\";if (import.meta && import.meta.hot) { if (false) import.meta.hot.acceptExports(['default']);; Counter$ = ___SVELTE_HMR_HOT_API.applyHmr({ m: import.meta, id: \\"<root>/src/lib/Counter.svelte\\", hotOptions: {\\"preserveLocalState\\":false,\\"noPreserveStateKey\\":[\\"@hmr:reset\\",\\"@!hmr\\"],\\"preserveAllLocalStateKey\\":\\"@hmr:keep-all\\",\\"preserveLocalStateKey\\":\\"@hmr:keep\\",\\"noReload\\":false,\\"optimistic\\":false,\\"acceptNamedExports\\":true,\\"acceptAccessors\\":true,\\"injectCss\\":false,\\"cssEjectDelay\\":100,\\"native\\":false,\\"importAdapterName\\":\\"___SVELTE_HMR_HOT_API_PROXY_ADAPTER\\",\\"noOverlay\\":true,\\"allowLiveBinding\\":false,\\"partialAccept\\":true}, Component: Counter$, ProxyAdapter: ___SVELTE_HMR_HOT_API_PROXY_ADAPTER, acceptable: true, preserveLocalState: false, emitCss: true, }); }
import * as ___SVELTE_HMR_HOT_API from '/vendor/svelte-hmr-runtime-hot-api-esm.js__v--hash.js';import { adapter as ___SVELTE_HMR_HOT_API_PROXY_ADAPTER } from '/vendor/svelte-hmr-runtime-proxy-adapter-dom.js__v--hash.js';if (import.meta && import.meta.hot) { if (false) import.meta.hot.acceptExports(['default']);; Counter$ = ___SVELTE_HMR_HOT_API.applyHmr({ m: import.meta, id: \\"<root>/src/lib/Counter.svelte\\", hotOptions: {\\"preserveLocalState\\":false,\\"noPreserveStateKey\\":[\\"@hmr:reset\\",\\"@!hmr\\"],\\"preserveAllLocalStateKey\\":\\"@hmr:keep-all\\",\\"preserveLocalStateKey\\":\\"@hmr:keep\\",\\"noReload\\":false,\\"optimistic\\":false,\\"acceptNamedExports\\":true,\\"acceptAccessors\\":true,\\"injectCss\\":false,\\"cssEjectDelay\\":100,\\"native\\":false,\\"importAdapterName\\":\\"___SVELTE_HMR_HOT_API_PROXY_ADAPTER\\",\\"noOverlay\\":true,\\"allowLiveBinding\\":false,\\"partialAccept\\":true}, Component: Counter$, ProxyAdapter: ___SVELTE_HMR_HOT_API_PROXY_ADAPTER, acceptable: true, preserveLocalState: false, emitCss: true, }); }
export default Counter$;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,14 @@ const __vitePreload = function preload(baseModule, deps, importerUrl) {
if (!deps || deps.length === 0) {
return baseModule();
}
const links = document.getElementsByTagName(\\"link\\");
return Promise.all(deps.map((dep) => {
dep = assetsURL(dep);
if (dep in seen)
return;
seen[dep] = true;
const isCss = dep.endsWith(\\".css\\");
const cssSelector = isCss ? '[rel=\\"stylesheet\\"]' : \\"\\";
const isBaseRelative = !!importerUrl;
if (isBaseRelative) {
for (let i = links.length - 1; i >= 0; i--) {
const link2 = links[i];
if (link2.href === dep && (!isCss || link2.rel === \\"stylesheet\\")) {
return;
}
}
} else if (document.querySelector(\`link[href=\\"\${dep}\\"]\${cssSelector}\`)) {
if (document.querySelector(\`link[href=\\"\${dep}\\"]\${cssSelector}\`)) {
return;
}
const link = document.createElement(\\"link\\");
Expand Down
Loading

0 comments on commit 5b48ced

Please sign in to comment.