Socket
Socket
Sign inDemoInstall

@snowpack/web-test-runner-plugin

Package Overview
Dependencies
429
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.2 to 0.1.3

6

package.json
{
"name": "@snowpack/web-test-runner-plugin",
"version": "0.1.2",
"version": "0.1.3",
"main": "plugin.js",

@@ -11,3 +11,3 @@ "license": "MIT",

"@web/test-runner": "^0.9.0",
"snowpack": "^2.13.0"
"snowpack": "^2.14.3"
},

@@ -17,3 +17,3 @@ "devDependencies": {

},
"gitHead": "9f6a20c5712ab0d2a971b3969077531fe623fcee"
"gitHead": "d18ab798ad123a1668adee02a3457b86d2208f8e"
}

@@ -15,7 +15,7 @@ const {isTestFilePath} = require('@web/test-runner');

const pkgManifest = require(path.join(cwd, 'package.json'));
const config = snowpack.unstable__loadAndValidateConfig(
const config = snowpack.loadAndValidateConfig(
{devOptions: {hmr: false, open: 'none', output: 'stream'}},
pkgManifest,
);
let loadByUrl, shutdownServer;
let server;

@@ -26,3 +26,3 @@ return {

fileWatcher.add(Object.keys(config.mount));
const server = await snowpack.unstable__startServer({
server = await snowpack.startDevServer({
cwd,

@@ -33,7 +33,5 @@ config,

});
loadByUrl = server.loadByUrl;
shutdownServer = server.shutdown;
},
async serverStop() {
return shutdownServer();
return server.shutdown();
},

@@ -45,4 +43,4 @@ async serve({request}) {

const reqPath = request.path;
const result = await loadByUrl(reqPath, {isSSR: false});
return result;
const result = await server.loadUrl(reqPath, {isSSR: false, encoding: 'utf8'});
return result.contents;
},

@@ -53,3 +51,3 @@ transformImport({source}) {

}
// PERF(fks): https://github.com/pikapkg/snowpack/pull/1259/files#r502963818
// PERF(fks): https://github.com/snowpackjs/snowpack/pull/1259/files#r502963818
const reqPath = source.substring(

@@ -60,3 +58,3 @@ 0,

const sourcePath = path.join(cwd, reqPath);
const mountedUrl = snowpack.unstable__getUrlForFile(sourcePath, config);
const mountedUrl = snowpack.getUrlForFile(sourcePath, config);
if (!mountedUrl) {

@@ -63,0 +61,0 @@ throw new Error(`${source} could not be mounted!`);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc