Small tweaks
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
const getFileStats = require("./getFileStats");
|
||||
|
||||
function getEntries(dir) {
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const SRIToolbox = require("sri-toolbox");
|
||||
|
||||
const getFileContentType = require("./getFileContentType");
|
||||
const getFileStats = require("./getFileStats");
|
||||
const getFileType = require("./getFileType");
|
||||
|
||||
@ -2,11 +2,11 @@ const redis = require("redis");
|
||||
|
||||
redis.debug_mode = process.env.DEBUG_REDIS != null;
|
||||
|
||||
const RedisURL =
|
||||
const redisURL =
|
||||
process.env.OPENREDIS_URL ||
|
||||
process.env.REDIS_URL ||
|
||||
"redis://localhost:6379";
|
||||
|
||||
const client = redis.createClient(RedisURL);
|
||||
const client = redis.createClient(redisURL);
|
||||
|
||||
module.exports = client;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
const URL = require("whatwg-url");
|
||||
const warning = require("warning");
|
||||
|
||||
const BareIdentifierFormat = /^((?:@[^\/]+\/)?[^\/]+)(\/.*)?$/;
|
||||
const bareIdentifierFormat = /^((?:@[^\/]+\/)?[^\/]+)(\/.*)?$/;
|
||||
|
||||
function unpkgRewriteBabelPlugin(dependencies = {}) {
|
||||
return {
|
||||
@ -22,7 +22,7 @@ function unpkgRewriteBabelPlugin(dependencies = {}) {
|
||||
path.node.source.value = `${path.node.source.value}?module`;
|
||||
} else {
|
||||
// "bare" identifier
|
||||
const match = BareIdentifierFormat.exec(path.node.source.value);
|
||||
const match = bareIdentifierFormat.exec(path.node.source.value);
|
||||
const packageName = match[1];
|
||||
const file = match[2] || "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user