Update npm packages (73 packages including @jqhtml 2.3.36)
Update npm registry domain from privatenpm.hanson.xyz to npm.internal.hanson.xyz 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
16
node_modules/webpack/lib/DotenvPlugin.js
generated
vendored
16
node_modules/webpack/lib/DotenvPlugin.js
generated
vendored
@@ -25,9 +25,9 @@ const DEFAULT_OPTIONS = {
|
||||
};
|
||||
|
||||
// Regex for parsing .env files
|
||||
// ported from https://github.com/motdotla/dotenv/blob/master/lib/main.js#L32
|
||||
// ported from https://github.com/motdotla/dotenv/blob/master/lib/main.js#L49
|
||||
const LINE =
|
||||
/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;
|
||||
/^\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?$/gm;
|
||||
|
||||
const PLUGIN_NAME = "DotenvPlugin";
|
||||
|
||||
@@ -60,9 +60,11 @@ function parse(src) {
|
||||
let lines = src.toString();
|
||||
|
||||
// Convert line breaks to same format
|
||||
lines = lines.replace(/\r\n?/gm, "\n");
|
||||
lines = lines.replace(/\r\n?/g, "\n");
|
||||
|
||||
/** @type {null | RegExpExecArray} */
|
||||
let match;
|
||||
|
||||
while ((match = LINE.exec(lines)) !== null) {
|
||||
const key = match[1];
|
||||
|
||||
@@ -112,10 +114,12 @@ function _resolveEscapeSequences(value) {
|
||||
function expandValue(value, processEnv, runningParsed) {
|
||||
const env = { ...runningParsed, ...processEnv }; // process.env wins
|
||||
|
||||
const regex = /(?<!\\)\$\{([^{}]+)\}|(?<!\\)\$([A-Za-z_][A-Za-z0-9_]*)/g;
|
||||
const regex = /(?<!\\)\$\{([^{}]+)\}|(?<!\\)\$([a-z_]\w*)/gi;
|
||||
|
||||
let result = value;
|
||||
/** @type {null | RegExpExecArray} */
|
||||
let match;
|
||||
/** @type {Set<string>} */
|
||||
const seen = new Set(); // self-referential checker
|
||||
|
||||
while ((match = regex.exec(result)) !== null) {
|
||||
@@ -133,7 +137,9 @@ function expandValue(value, processEnv, runningParsed) {
|
||||
const r = expression.split(/** @type {string} */ (splitter));
|
||||
// const r = splitter ? expression.split(splitter) : [expression];
|
||||
|
||||
/** @type {string} */
|
||||
let defaultValue;
|
||||
/** @type {undefined | null | string} */
|
||||
let value;
|
||||
|
||||
const key = r.shift();
|
||||
@@ -303,7 +309,7 @@ class DotenvPlugin {
|
||||
* @param {InputFileSystem} fs input file system
|
||||
* @param {string} dir dir to load `.env` files
|
||||
* @param {string} mode mode
|
||||
* @returns {Promise<{parsed: Env, fileDependencies: string[], missingDependencies: string[]}>} parsed env variables and dependencies
|
||||
* @returns {Promise<{ parsed: Env, fileDependencies: string[], missingDependencies: string[] }>} parsed env variables and dependencies
|
||||
*/
|
||||
async _getParsed(fs, dir, mode) {
|
||||
/** @type {string[]} */
|
||||
|
||||
Reference in New Issue
Block a user