Enforce single quotes
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user