Enforce single quotes

This commit is contained in:
Sebastian Seedorf
2020-11-19 20:40:21 +01:00
parent 7f44df42e7
commit 40b148b7c7
18 changed files with 81 additions and 80 deletions

View File

@@ -22,27 +22,27 @@ export type PolyfillOptions = {
function getRouter(fileToWatch: string, opts?: Partial<PolyfillOptions>): RequestHandler {
const features = new WaitForSync<PolyfillFeatureList>();
(async () => {
const worker = await spawn<WorkerFunction>(new Worker("./polyfill-worker"));
const worker = await spawn<WorkerFunction>(new Worker('./polyfill-worker'));
const feats = await worker(fileToWatch) as PolyfillFeatureList;
await Thread.terminate(worker);
return feats;
})()
.then(feats => {
feats["fetch"] = {};
Logger.debug("Polyfill analysed:", Object.keys(feats));
feats['fetch'] = {};
Logger.debug('Polyfill analysed:', Object.keys(feats));
features.setData(feats);
})
.catch(err => features.setError(err));
const options: Partial<PolyfillOptions> = {
minify: DefaultConfig.isProduction,
unknown: "polyfill",
unknown: 'polyfill',
...opts,
};
return async (req, res) => {
const polyfillBundle = await polyfillLibrary.getPolyfillString({
...options,
uaString: req.header("user-agent"),
uaString: req.header('user-agent'),
features: await features.resolve(),
stream: false,
});