diff --git a/Cargo.lock b/Cargo.lock index c1f20ec73d9..6b9f6961fe2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1695,6 +1695,7 @@ name = "parcel-js-swc-core" version = "0.1.0" dependencies = [ "Inflector", + "bitflags 1.3.2", "data-encoding", "dunce", "indexmap 1.9.3", diff --git a/crates/macros/src/lib.rs b/crates/macros/src/lib.rs index e2e91095d10..aa65097fb25 100644 --- a/crates/macros/src/lib.rs +++ b/crates/macros/src/lib.rs @@ -1,5 +1,6 @@ #![deny(unused_crate_dependencies)] +use serde::{Deserialize, Serialize}; use std::{ collections::{HashMap, HashSet}, sync::Arc, @@ -44,9 +45,8 @@ pub type MacroCallback = pub struct Macros<'a> { /// Mapping of imported identifiers to import metadata. macros: HashMap, - constants: HashMap>, + evaluator: Evaluator<'a>, callback: MacroCallback, - source_map: &'a SourceMap, errors: &'a mut Vec, load_errors: HashSet, assignment_span: Option, @@ -70,10 +70,9 @@ impl<'a> Macros<'a> { ) -> Self { Macros { macros: HashMap::new(), - constants: HashMap::new(), + evaluator: Evaluator::new(source_map), load_errors: HashSet::new(), callback, - source_map, errors, assignment_span: None, in_call: false, @@ -137,7 +136,7 @@ impl<'a> Macros<'a> { // Try to statically evaluate all of the function arguments. let mut args = Vec::with_capacity(call.args.len()); for arg in &call.args { - match self.eval(&*arg.expr) { + match self.evaluator.eval(&*arg.expr) { Ok(val) => { if arg.spread.is_none() { args.push(val); @@ -154,13 +153,13 @@ impl<'a> Macros<'a> { } // If that was successful, call the function callback (on the JS thread). - let loc = self.source_map.lookup_char_pos(call.span.lo); + let loc = self.evaluator.source_map.lookup_char_pos(call.span.lo); let loc = Location { line: loc.line as u32, col: loc.col_display as u32, }; match (self.callback)(src.clone(), export, args, loc) { - Ok(val) => Ok(self.value_to_expr(val)?), + Ok(val) => Ok(self.evaluator.value_to_expr(val)?), Err(err) => match err { MacroError::LoadError(err, _) => { self.load_errors.insert(src); @@ -224,7 +223,7 @@ impl<'a> Fold for Macros<'a> { let imported = match &member.prop { MemberProp::Ident(id) => id.sym.to_string(), MemberProp::Computed(s) => { - if let Ok(JsValue::String(s)) = self.eval(&s.expr) { + if let Ok(JsValue::String(s)) = self.evaluator.eval(&s.expr) { s } else { break 'block; @@ -263,8 +262,8 @@ impl<'a> Fold for Macros<'a> { if node.kind == VarDeclKind::Const { for decl in &node.decls { if let Some(expr) = &decl.init { - let val = self.eval(&*expr); - self.eval_pat(val, &decl.name); + let val = self.evaluator.eval(&*expr); + self.evaluator.eval_pat(val, &decl.name); } } } @@ -286,7 +285,7 @@ impl<'a> Fold for Macros<'a> { // Error when re-assigning a property of a constant that's used in a macro. let node = node.fold_children_with(self); if let Expr::Ident(id) = &*node.obj { - if let Some(constant) = self.constants.get_mut(&id.to_id()) { + if let Some(constant) = self.evaluator.constants.get_mut(&id.to_id()) { if constant.is_ok() { *constant = Err(assignment_span.clone()); } @@ -299,8 +298,9 @@ impl<'a> Fold for Macros<'a> { // If the member expression evaluates to an object, continue traversing so we error in fold_ident. // Otherwise, return early to allow other properties to be accessed without error. let value = self + .evaluator .eval(&*node.obj) - .and_then(|obj| self.eval_member_prop(obj, &node)); + .and_then(|obj| self.evaluator.eval_member_prop(obj, &node)); if !matches!( value, Err(..) | Ok(JsValue::Object(..) | JsValue::Array(..)) @@ -314,7 +314,7 @@ impl<'a> Fold for Macros<'a> { fn fold_ident(&mut self, node: Ident) -> Ident { if self.in_call { - if let Some(constant) = self.constants.get_mut(&node.to_id()) { + if let Some(constant) = self.evaluator.constants.get_mut(&node.to_id()) { if matches!(constant, Ok(JsValue::Object(..) | JsValue::Array(..))) { // Mark access to constant object inside a call as an error since it could potentially be mutated. *constant = Err(node.span.clone()); @@ -362,7 +362,8 @@ fn handle_error(result: Result, errors: &mut Vec) } /// A type that represents a basic JS value. -#[derive(Clone, Debug)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] pub enum JsValue { Undefined, Null, @@ -375,9 +376,21 @@ pub enum JsValue { Function(String), } -impl<'a> Macros<'a> { +pub struct Evaluator<'a> { + constants: HashMap>, + source_map: &'a SourceMap, +} + +impl<'a> Evaluator<'a> { + pub fn new(source_map: &'a SourceMap) -> Evaluator<'_> { + Evaluator { + constants: HashMap::new(), + source_map, + } + } + /// Statically evaluate a JS expression to a value, if possible. - fn eval(&self, expr: &Expr) -> Result { + pub fn eval(&self, expr: &Expr) -> Result { match expr.unwrap_parens() { Expr::Lit(lit) => match lit { Lit::Null(_) => Ok(JsValue::Null), @@ -437,49 +450,7 @@ impl<'a> Macros<'a> { } Ok(JsValue::Array(res)) } - Expr::Object(obj) => { - let mut res = IndexMap::with_capacity(obj.props.len()); - for prop in &obj.props { - match prop { - PropOrSpread::Prop(prop) => match &**prop { - Prop::KeyValue(kv) => { - let v = self.eval(&*kv.value)?; - let k = match &kv.key { - PropName::Ident(IdentName { sym, .. }) - | PropName::Str(Str { value: sym, .. }) => sym.to_string(), - PropName::Num(n) => n.value.to_string(), - PropName::Computed(c) => match self.eval(&*c.expr) { - Err(e) => return Err(e), - Ok(JsValue::String(s)) => s, - Ok(JsValue::Number(n)) => n.to_string(), - Ok(JsValue::Bool(b)) => b.to_string(), - _ => return Err(c.span), - }, - PropName::BigInt(v) => return Err(v.span), - }; - - res.insert(k.to_string(), v); - } - Prop::Shorthand(s) => { - if let Some(val) = self.constants.get(&s.to_id()) { - res.insert(s.sym.to_string(), val.clone()?); - } else { - return Err(s.span); - } - } - _ => return Err(obj.span), - }, - PropOrSpread::Spread(spread) => { - let v = self.eval(&*spread.expr)?; - match v { - JsValue::Object(o) => res.extend(o), - _ => return Err(obj.span), - } - } - } - } - Ok(JsValue::Object(res)) - } + Expr::Object(obj) => self.eval_object(obj), Expr::Bin(bin) => match (bin.op, self.eval(&*bin.left), self.eval(&*bin.right)) { (BinaryOp::Add, Ok(JsValue::String(a)), Ok(JsValue::String(b))) => { Ok(JsValue::String(format!("{}{}", a, b))) @@ -676,7 +647,52 @@ impl<'a> Macros<'a> { } } - fn eval_member_prop(&self, obj: JsValue, member: &MemberExpr) -> Result { + pub fn eval_object(&self, obj: &ObjectLit) -> Result { + let mut res = IndexMap::with_capacity(obj.props.len()); + for prop in &obj.props { + match prop { + PropOrSpread::Prop(prop) => match &**prop { + Prop::KeyValue(kv) => { + let v = self.eval(&*kv.value)?; + let k = match &kv.key { + PropName::Ident(IdentName { sym, .. }) | PropName::Str(Str { value: sym, .. }) => { + sym.to_string() + } + PropName::Num(n) => n.value.to_string(), + PropName::Computed(c) => match self.eval(&*c.expr) { + Err(e) => return Err(e), + Ok(JsValue::String(s)) => s, + Ok(JsValue::Number(n)) => n.to_string(), + Ok(JsValue::Bool(b)) => b.to_string(), + _ => return Err(c.span), + }, + PropName::BigInt(v) => return Err(v.span), + }; + + res.insert(k.to_string(), v); + } + Prop::Shorthand(s) => { + if let Some(val) = self.constants.get(&s.to_id()) { + res.insert(s.sym.to_string(), val.clone()?); + } else { + return Err(s.span); + } + } + _ => return Err(obj.span), + }, + PropOrSpread::Spread(spread) => { + let v = self.eval(&*spread.expr)?; + match v { + JsValue::Object(o) => res.extend(o), + _ => return Err(obj.span), + } + } + } + } + Ok(JsValue::Object(res)) + } + + pub fn eval_member_prop(&self, obj: JsValue, member: &MemberExpr) -> Result { match &member.prop { MemberProp::Ident(id) => obj.get_id(id.as_ref()).ok_or(member.span), MemberProp::Computed(prop) => { @@ -688,7 +704,7 @@ impl<'a> Macros<'a> { } /// Convert JS value to AST. - fn value_to_expr(&self, value: JsValue) -> Result { + pub fn value_to_expr(&self, value: JsValue) -> Result { Ok(match value { JsValue::Null => Expr::Lit(Lit::Null(Null::dummy())), JsValue::Undefined => Expr::Ident(Ident::new_no_ctxt(js_word!("undefined"), DUMMY_SP)), @@ -764,7 +780,7 @@ impl<'a> Macros<'a> { }) } - fn eval_pat(&mut self, value: Result, pat: &Pat) { + pub fn eval_pat(&mut self, value: Result, pat: &Pat) { match pat { Pat::Ident(name) => { self.constants.insert(name.to_id(), value); diff --git a/crates/node-bindings/src/resolver.rs b/crates/node-bindings/src/resolver.rs index d70551f6d9f..c9f2c4bbeb1 100644 --- a/crates/node-bindings/src/resolver.rs +++ b/crates/node-bindings/src/resolver.rs @@ -33,7 +33,7 @@ pub struct JsFileSystemOptions { pub struct JsResolverOptions { pub fs: Option, pub include_node_modules: Option, - pub conditions: Option, + pub conditions: Option, pub module_dir_resolver: Option, pub mode: u8, pub entries: Option, diff --git a/crates/parcel-resolver/src/package_json.rs b/crates/parcel-resolver/src/package_json.rs index b0533400047..f3b63f22a71 100644 --- a/crates/parcel-resolver/src/package_json.rs +++ b/crates/parcel-resolver/src/package_json.rs @@ -136,7 +136,12 @@ pub enum ExportsField { } impl ExportsField { - fn convert_paths(&mut self, base: &CachedPath, cache: &Cache) { + fn convert_paths bool>( + &mut self, + base: &CachedPath, + cache: &Cache, + is_source: &mut F, + ) { match self { ExportsField::String(target) => { if target.starts_with("./") && !target.contains('*') { @@ -162,12 +167,16 @@ impl ExportsField { } ExportsField::Array(arr) => { for item in arr { - item.convert_paths(base, cache); + item.convert_paths(base, cache, is_source); } } ExportsField::Map(map) => { - for val in map.values_mut() { - val.convert_paths(base, cache); + for (key, val) in map.iter_mut() { + if matches!(key, ExportsKey::Condition(ExportsCondition::SOURCE)) && !is_source() { + *val = ExportsField::None; + } else { + val.convert_paths(base, cache, is_source); + } } } _ => {} @@ -177,7 +186,7 @@ impl ExportsField { bitflags! { /// A common package.json "exports" field. - pub struct ExportsCondition: u16 { + pub struct ExportsCondition: u32 { /// The "import" condition. True when the package was referenced using the ESM `import` syntax. const IMPORT = 1 << 0; /// The "require" condition. True when the package was referenced using the CommonJS `require` function. @@ -210,6 +219,10 @@ bitflags! { const LESS = 1 << 14; /// The "stylus" condition. True when the package was referenced from a Stylus stylesheet. const STYLUS = 1 << 15; + /// The "react-server" condition. + const REACT_SERVER = 1 << 16; + /// The "source" condition. + const SOURCE = 1 << 17; } } @@ -239,6 +252,8 @@ impl TryFrom<&str> for ExportsCondition { "sass" => ExportsCondition::SASS, "less" => ExportsCondition::LESS, "stylus" => ExportsCondition::STYLUS, + "react-server" => ExportsCondition::REACT_SERVER, + "source" => ExportsCondition::SOURCE, _ => return Err(()), }) } @@ -322,21 +337,8 @@ pub enum ExportsResolution<'a> { impl PackageJson { pub fn read(path: &CachedPath, cache: &Cache) -> Result { let contents = cache.fs.read_to_string(path.as_path())?; - let mut pkg = PackageJson::parse(path.clone(), contents, cache) + let pkg = PackageJson::parse(path.clone(), contents, cache) .map_err(|e| JsonError::new(path.as_path().into(), e))?; - - // If the package has a `source` field, make sure - // - the package is behind symlinks - // - and the realpath to the packages does not includes `node_modules`. - // Since such package is likely a pre-compiled module - // installed with package managers, rather than including a source code. - if !matches!(pkg.source, SourceField::None) { - let realpath = pkg.path.canonicalize(&cache)?; - if realpath == pkg.path || realpath.in_node_modules() { - pkg.source = SourceField::None; - } - } - Ok(pkg) } @@ -350,7 +352,38 @@ impl PackageJson { mut parsed: SerializedPackageJson, cache: &Cache, ) -> PackageJson { - parsed.exports.convert_paths(&path, cache); + // If the package has a `source` field, make sure + // - the package is behind symlinks + // - and the realpath to the packages does not includes `node_modules`. + // Since such package is likely a pre-compiled module + // installed with package managers, rather than including a source code. + let mut is_source = None; + + let mut check_in_source = || { + if let Some(is_source) = is_source { + return is_source; + } + + if let Ok(realpath) = path.canonicalize(&cache) { + let is_src = realpath != path && !realpath.in_node_modules(); + is_source = Some(is_src); + is_src + } else { + is_source = Some(false); + false + } + }; + + if !matches!(parsed.source, SourceField::None) { + if !check_in_source() { + parsed.source = SourceField::None; + } + } + + parsed + .exports + .convert_paths(&path, cache, &mut check_in_source); + PackageJson { name: parsed.name, module_type: parsed.module_type, @@ -551,7 +584,9 @@ impl PackageJson { for (key, value) in target { let matches = match key { ExportsKey::Condition(key) => { - *key == ExportsCondition::DEFAULT || conditions.contains(*key) + *key == ExportsCondition::SOURCE + || *key == ExportsCondition::DEFAULT + || conditions.contains(*key) } ExportsKey::CustomCondition(key) => custom_conditions.iter().any(|k| k == key), _ => false, diff --git a/packages/bundlers/default/src/DefaultBundler.js b/packages/bundlers/default/src/DefaultBundler.js index f5e0d4987c4..7751cfca74c 100644 --- a/packages/bundlers/default/src/DefaultBundler.js +++ b/packages/bundlers/default/src/DefaultBundler.js @@ -584,7 +584,9 @@ function createIdealGraph( } if ( dependency.priority === 'lazy' || - childAsset.bundleBehavior === 'isolated' // An isolated Dependency, or Bundle must contain all assets it needs to load. + (dependency.priority !== 'parallel' && + (dependency.bundleBehavior === 'isolated' || + childAsset.bundleBehavior === 'isolated')) // An isolated Dependency, or Bundle must contain all assets it needs to load. ) { if (bundleId == null) { let firstBundleGroup = nullthrows( @@ -645,6 +647,16 @@ function createIdealGraph( ), dependencyPriorityEdges[dependency.priority], ); + + // If this is a sync dependency on a JS asset that won't be replaced with a URL runtime, + // add a reference so the bundle is loaded by the parent. This happens with React Server Components. + if ( + dependency.priority === 'sync' && + childAsset.type === 'js' && + childAsset?.meta.jsRuntime !== 'url' + ) { + assetReference.get(childAsset).push([dependency, bundle]); + } } else if ( dependency.priority === 'parallel' || childAsset.bundleBehavior === 'inline' @@ -1089,11 +1101,10 @@ function createIdealGraph( if (assetId == null) return; // deleted let a = assets[assetId]; if ( - entries.has(a) || !a.isBundleSplittable || (bundleRoots.get(a) && - (getBundleFromBundleRoot(a).needsStableName || - getBundleFromBundleRoot(a).bundleBehavior === 'isolated')) + getBundleFromBundleRoot(a).needsStableName && + a.env.context === asset.env.context) ) { // Add asset to non-splittable bundles. addAssetToBundleRoot(asset, a); @@ -1126,7 +1137,7 @@ function createIdealGraph( uniqueKey: manualSharedBundleKey, target: firstSourceBundle.target, type: asset.type, - env: firstSourceBundle.env, + env: asset.env, manualSharedBundle: manualSharedObject?.name, }); bundle.sourceBundles = new Set(sourceBundles); @@ -1233,7 +1244,12 @@ function createIdealGraph( let sourceBundles = reachableArray.map( a => nullthrows(bundleRoots.get(a))[0], ); - let key = reachableArray.map(a => a.id).join(',') + '.' + asset.type; + let key = + reachableArray.map(a => a.id).join(',') + + '.' + + asset.env.context + + '.' + + asset.type; let bundleId = bundles.get(key); let bundle; if (bundleId == null) { @@ -1244,7 +1260,7 @@ function createIdealGraph( bundle = createBundle({ target: firstSourceBundle.target, type: asset.type, - env: firstSourceBundle.env, + env: asset.env, }); bundle.sourceBundles = new Set(sourceBundles); let sharedInternalizedAssets = firstSourceBundle.internalizedAssets @@ -1539,19 +1555,30 @@ function createIdealGraph( let bundle = nullthrows(bundleGraph.getNode(bundleId)); invariant(bundle !== 'root'); - if (asset.type !== bundle.type) { + if ( + asset.type !== bundle.type || + asset.env.context !== bundle.env.context + ) { let bundleGroup = nullthrows(bundleGraph.getNode(bundleGroupId)); invariant(bundleGroup !== 'root'); - let key = nullthrows(bundleGroup.mainEntryAsset).id + '.' + asset.type; + let key = + nullthrows(bundleGroup.mainEntryAsset).id + + '.' + + asset.env.context + + '.' + + asset.type; let typeChangeBundleId = bundles.get(key); if (typeChangeBundleId == null) { let typeChangeBundle = createBundle({ uniqueKey: key, - needsStableName: bundle.needsStableName, + needsStableName: + asset.env.context !== bundle.env.context + ? false + : bundle.needsStableName, bundleBehavior: bundle.bundleBehavior, type: asset.type, target: bundle.target, - env: bundle.env, + env: asset.env, }); typeChangeBundleId = bundleGraph.addNode(typeChangeBundle); bundleGraph.addEdge(bundleId, typeChangeBundleId); diff --git a/packages/bundlers/library/src/LibraryBundler.js b/packages/bundlers/library/src/LibraryBundler.js index d6ee74177ba..5e74f09fe81 100644 --- a/packages/bundlers/library/src/LibraryBundler.js +++ b/packages/bundlers/library/src/LibraryBundler.js @@ -10,26 +10,36 @@ export default (new Bundler({ // Collect dependencies from the graph. // We do not want to mutate the graph while traversing, so this must be done first. let dependencies = []; + let entryDeps = []; bundleGraph.traverse((node, context) => { if (node.type === 'dependency') { let dependency = node.value; if (bundleGraph.isDependencySkipped(dependency)) { return; } + let assets = bundleGraph.getDependencyAssets(dependency); dependencies.push([ dependency, nullthrows(dependency.target ?? context), + assets, ]); if (dependency.target) { + entryDeps.push(dependency); return dependency.target; } } }); + let bundleGroupsByTarget = new Map(); + for (let dep of entryDeps) { + let target = nullthrows(dep.target); + let bundleGroup = bundleGraph.createBundleGroup(dep, target); + bundleGroupsByTarget.set(target, bundleGroup); + } + // Create bundles for each asset. let bundles = new Map(); - for (let [dependency, target] of dependencies) { - let assets = bundleGraph.getDependencyAssets(dependency); + for (let [dependency, target, assets] of dependencies) { if (assets.length === 0) { continue; } @@ -40,14 +50,13 @@ export default (new Bundler({ let parentKey = getBundleKey(parentAsset, target); parentBundle = bundles.get(parentKey); } - let bundleGroup; // Create a separate bundle group/bundle for each asset. for (let asset of assets) { let key = getBundleKey(asset, target); let bundle = bundles.get(key); if (!bundle) { - bundleGroup ??= bundleGraph.createBundleGroup(dependency, target); + let bundleGroup = nullthrows(bundleGroupsByTarget.get(target)); bundle = bundleGraph.createBundle({ entryAsset: asset, needsStableName: dependency.isEntry, diff --git a/packages/core/core/src/BundleGraph.js b/packages/core/core/src/BundleGraph.js index 22847dcf00c..adf0e6eedc5 100644 --- a/packages/core/core/src/BundleGraph.js +++ b/packages/core/core/src/BundleGraph.js @@ -1115,13 +1115,20 @@ export default class BundleGraph { if ( this._graph .getNodeIdsConnectedTo(assetNodeId, bundleGraphEdgeTypes.references) - .map(id => this._graph.getNode(id)) - .some( - node => + .some(id => { + let node = this._graph.getNode(id); + return ( node?.type === 'dependency' && - node.value.priority === Priority.lazy && - node.value.specifierType !== SpecifierType.url, - ) + !node.value.isEntry && + (this._graph + .getNodeIdsConnectedFrom(id) + .some(id => this._graph.getNode(id)?.type === 'bundle_group') || + this._graph.getNodeIdsConnectedTo( + id, + bundleGraphEdgeTypes.internal_async, + ).length > 0) + ); + }) ) { // If this asset is referenced by any async dependency, it's referenced. return true; @@ -1172,7 +1179,7 @@ export default class BundleGraph { if ( descendant.type !== bundle.type || - descendant.env.context !== bundle.env.context + ISOLATED_ENVS.has(descendant.env.context) ) { actions.skipChildren(); return; @@ -1191,7 +1198,13 @@ export default class BundleGraph { hasParentBundleOfType(bundle: Bundle, type: string): boolean { let parents = this.getParentBundles(bundle); - return parents.length > 0 && parents.every(parent => parent.type === type); + return ( + parents.length > 0 && + parents.every( + parent => + parent.type === type && parent.env.context === bundle.env.context, + ) + ); } getParentBundles(bundle: Bundle): Array { @@ -1265,7 +1278,7 @@ export default class BundleGraph { node.type === 'root' || (node.type === 'bundle' && (node.value.id === bundle.id || - node.value.env.context !== bundle.env.context)) + ISOLATED_ENVS.has(node.value.env.context))) ) { isReachable = false; actions.stop(); diff --git a/packages/core/core/src/Environment.js b/packages/core/core/src/Environment.js index 2c471350d60..099f222b8cb 100644 --- a/packages/core/core/src/Environment.js +++ b/packages/core/core/src/Environment.js @@ -12,7 +12,7 @@ import {environmentToInternalEnvironment} from './public/Environment'; const DEFAULT_ENGINES = { browsers: ['> 0.25%'], - node: '>= 8.0.0', + node: '>= 18.0.0', }; type EnvironmentOpts = {| @@ -48,6 +48,7 @@ export function createEnvironment({ switch (context) { case 'node': case 'electron-main': + case 'react-server': engines = { node: DEFAULT_ENGINES.node, }; @@ -56,6 +57,7 @@ export function createEnvironment({ case 'web-worker': case 'service-worker': case 'electron-renderer': + case 'react-client': engines = { browsers: DEFAULT_ENGINES.browsers, }; @@ -86,6 +88,7 @@ export function createEnvironment({ case 'node': case 'electron-main': case 'electron-renderer': + case 'react-server': outputFormat = 'commonjs'; break; default: diff --git a/packages/core/core/src/TargetDescriptor.schema.js b/packages/core/core/src/TargetDescriptor.schema.js index 02d93b5ffcb..7285d892d4e 100644 --- a/packages/core/core/src/TargetDescriptor.schema.js +++ b/packages/core/core/src/TargetDescriptor.schema.js @@ -36,6 +36,8 @@ export const PACKAGE_DESCRIPTOR_SCHEMA: SchemaObject = { 'electron-main', 'electron-renderer', 'service-worker', + 'react-server', + 'react-client', ], }, includeNodeModules: { diff --git a/packages/core/core/src/applyRuntimes.js b/packages/core/core/src/applyRuntimes.js index b8090d3a41d..5c9364af5a3 100644 --- a/packages/core/core/src/applyRuntimes.js +++ b/packages/core/core/src/applyRuntimes.js @@ -38,6 +38,7 @@ type RuntimeConnection = {| assetGroup: AssetGroup, dependency: ?Dependency, isEntry: ?boolean, + shouldReplaceResolution: ?boolean, |}; export default async function applyRuntimes({ @@ -99,10 +100,11 @@ export default async function applyRuntimes({ filePath, isEntry, env, + shouldReplaceResolution, } of runtimeAssets) { let sourceName = path.join( path.dirname(filePath), - `runtime-${hashString(code)}.${bundle.type}`, + `runtime-${hashString(code)}${path.extname(filePath)}`, ); let assetGroup = { @@ -119,6 +121,7 @@ export default async function applyRuntimes({ assetGroup, dependency, isEntry, + shouldReplaceResolution, }); } } @@ -170,7 +173,13 @@ export default async function applyRuntimes({ bundleGraph._assetPublicIds.add(publicId); } - for (let {bundle, assetGroup, dependency, isEntry} of connections) { + for (let { + bundle, + assetGroup, + dependency, + isEntry, + shouldReplaceResolution, + } of connections) { let assetGroupNode = nodeFromAssetGroup(assetGroup); let assetGroupAssetNodeIds = runtimesAssetGraph.getNodeIdsConnectedFrom( runtimesAssetGraph.getNodeIdByContentKey(assetGroupNode.id), @@ -257,6 +266,15 @@ export default async function applyRuntimes({ dependency.id, ); bundleGraph._graph.addEdge(dependencyNodeId, bundleGraphRuntimeNodeId); + + if (shouldReplaceResolution && resolution) { + let resolutionNodeId = bundleGraph._graph.getNodeIdByContentKey( + resolution.id, + ); + bundleGraph._graph.removeEdge(dependencyNodeId, resolutionNodeId); + bundleGraph._graph.addEdge(dependencyNodeId, resolutionNodeId); + // TODO: remove asset from bundle? + } } } diff --git a/packages/core/core/src/public/Environment.js b/packages/core/core/src/public/Environment.js index 8123280447d..c415138ce1e 100644 --- a/packages/core/core/src/public/Environment.js +++ b/packages/core/core/src/public/Environment.js @@ -25,11 +25,13 @@ export const BROWSER_ENVS: Set = new Set([ 'service-worker', 'worklet', 'electron-renderer', + 'react-client', ]); const ELECTRON_ENVS = new Set(['electron-main', 'electron-renderer']); -const NODE_ENVS = new Set(['node', ...ELECTRON_ENVS]); +const NODE_ENVS = new Set(['node', 'react-server', ...ELECTRON_ENVS]); const WORKER_ENVS = new Set(['web-worker', 'service-worker']); export const ISOLATED_ENVS: Set = new Set([...WORKER_ENVS, 'worklet']); +const SERVER_ENVS = new Set(['node', 'react-server']); const ALL_BROWSERS = [ 'chrome', @@ -81,6 +83,7 @@ const supportData = { samsung: '8', and_qq: '10.4', op_mob: '64', + node: '13.2.0', }, 'worker-module': { edge: '80', @@ -105,6 +108,7 @@ const supportData = { samsung: '9.2', and_qq: '10.4', op_mob: '64', + node: '10.4.0', }, 'arrow-functions': { chrome: '47', @@ -232,6 +236,10 @@ export default class Environment implements IEnvironment { return NODE_ENVS.has(this.#environment.context); } + isServer(): boolean { + return SERVER_ENVS.has(this.#environment.context); + } + isElectron(): boolean { return ELECTRON_ENVS.has(this.#environment.context); } diff --git a/packages/core/core/src/requests/TargetRequest.js b/packages/core/core/src/requests/TargetRequest.js index f7e583ac5ed..3dfc3b510b2 100644 --- a/packages/core/core/src/requests/TargetRequest.js +++ b/packages/core/core/src/requests/TargetRequest.js @@ -45,10 +45,10 @@ import { PACKAGE_DESCRIPTOR_SCHEMA, ENGINES_SCHEMA, } from '../TargetDescriptor.schema'; -import {BROWSER_ENVS} from '../public/Environment'; import {optionsProxy, toInternalSourceLocation} from '../utils'; import {fromProjectPath, toProjectPath, joinProjectPath} from '../projectPath'; import {requestTypes} from '../RequestTracker'; +import {BROWSER_ENVS} from '../public/Environment'; type RunOpts = {| input: Entry, @@ -79,7 +79,7 @@ const COMMON_TARGETS = { }; const DEFAULT_ENGINES = { - node: 'current', + node: process.versions.node, browsers: [ 'last 1 Chrome version', 'last 1 Safari version', @@ -340,40 +340,48 @@ export class TargetResolver { }, }); } - if (!BROWSER_ENVS.has(targets[0].env.context)) { - throw new ThrowableDiagnostic({ - diagnostic: { - message: `Only browser targets are supported in serve mode`, - origin: '@parcel/core', - }, - }); - } targets[0].distDir = toProjectPath( this.options.projectRoot, serve.distDir, ); } } else { + targets = Array.from(packageTargets.values()) + .filter(Boolean) + .filter(descriptor => { + return ( + descriptor && + !skipTarget(descriptor.name, exclusiveTarget, descriptor.source) + ); + }); + // Explicit targets were not provided. Either use a modern target for server // mode, or simply use the package.json targets. if (this.options.serveOptions) { // In serve mode, we only support a single browser target. Since the user // hasn't specified a target, use one targeting modern browsers for development + let distDir = toProjectPath( + this.options.projectRoot, + this.options.serveOptions.distDir, + ); + let mainTarget = targets.length === 1 ? targets[0] : null; + let context = mainTarget?.env.context ?? 'browser'; + let engines = BROWSER_ENVS.has(context) + ? {browsers: DEFAULT_ENGINES.browsers} + : {node: DEFAULT_ENGINES.node}; targets = [ { name: 'default', - distDir: toProjectPath( - this.options.projectRoot, - this.options.serveOptions.distDir, - ), + distDir, publicUrl: this.options.defaultTargetOptions.publicUrl ?? '/', env: createEnvironment({ - context: 'browser', - engines: { - browsers: DEFAULT_ENGINES.browsers, - }, + context, + engines, + includeNodeModules: mainTarget?.env.includeNodeModules, shouldOptimize: this.options.defaultTargetOptions.shouldOptimize, - outputFormat: this.options.defaultTargetOptions.outputFormat, + outputFormat: + mainTarget?.env.outputFormat ?? + this.options.defaultTargetOptions.outputFormat, shouldScopeHoist: this.options.defaultTargetOptions.shouldScopeHoist, sourceMap: this.options.defaultTargetOptions.sourceMaps @@ -382,15 +390,6 @@ export class TargetResolver { }), }, ]; - } else { - targets = Array.from(packageTargets.values()) - .filter(Boolean) - .filter(descriptor => { - return ( - descriptor && - !skipTarget(descriptor.name, exclusiveTarget, descriptor.source) - ); - }); } } diff --git a/packages/core/core/test/Environment.test.js b/packages/core/core/test/Environment.test.js index 67643f1e4e1..649d1e5db41 100644 --- a/packages/core/core/test/Environment.test.js +++ b/packages/core/core/test/Environment.test.js @@ -63,10 +63,10 @@ describe('Environment', () => { it('assigns default engines for node', () => { assert.deepEqual(createEnvironment({context: 'node'}), { - id: 'f7c9644283a8698f', + id: 'b9b60fc7dcc0ae9c', context: 'node', engines: { - node: '>= 8.0.0', + node: '>= 18.0.0', }, includeNodeModules: false, outputFormat: 'commonjs', diff --git a/packages/core/integration-tests/package.json b/packages/core/integration-tests/package.json index 44b34981b12..6e1b53e0c1c 100644 --- a/packages/core/integration-tests/package.json +++ b/packages/core/integration-tests/package.json @@ -45,8 +45,8 @@ "posthtml-include": "^2.0.1", "posthtml-obfuscate": "^0.1.5", "preact": "^10.5.9", - "react": "^17.0.2", - "react-dom": "^17.0.2", + "react": "^19", + "react-dom": "^19", "sugarss": "^4.0.1", "tailwindcss": "^3.0.2", "tempy": "^0.3.0", diff --git a/packages/core/integration-tests/test/bundler.js b/packages/core/integration-tests/test/bundler.js index 65c13fdf223..3199d123339 100644 --- a/packages/core/integration-tests/test/bundler.js +++ b/packages/core/integration-tests/test/bundler.js @@ -1226,12 +1226,11 @@ describe('bundler', function () { { assets: [ 'bundle-manifest.js', - 'bundle-url.js', 'cacheLoader.js', 'css-loader.js', 'esmodule-helpers.js', 'index.js', - 'js-loader.js', + 'esm-js-loader.js', ], }, { @@ -1389,12 +1388,11 @@ describe('bundler', function () { { assets: [ 'bundle-manifest.js', - 'bundle-url.js', 'cacheLoader.js', 'css-loader.js', 'esmodule-helpers.js', 'index.js', - 'js-loader.js', + 'esm-js-loader.js', ], }, { @@ -1696,13 +1694,13 @@ describe('bundler', function () { assets: ['index.html'], }, { - assets: ['a.js', 'i.js'], + assets: ['a.js', 'b.js', 'c.js', 'h.js', 'j.js'], }, { - assets: ['vendor.js', 'b.js', 'j.js'], + assets: ['vendor.js', 'd.js', 'i.js'], }, { - assets: ['c.js', 'd.js', 'e.js', 'f.js', 'g.js', 'h.js'], + assets: ['e.js', 'f.js', 'g.js'], }, { assets: ['esmodule-helpers.js', 'index.js'], diff --git a/packages/core/integration-tests/test/hmr.js b/packages/core/integration-tests/test/hmr.js index 094431aafd7..317bbfbb81d 100644 --- a/packages/core/integration-tests/test/hmr.js +++ b/packages/core/integration-tests/test/hmr.js @@ -928,6 +928,14 @@ module.hot.dispose((data) => { let bundleEvent = await getNextBuild(b); assert.equal(bundleEvent.type, 'buildSuccess'); + // JSDOM doesn't support type=module + // https://github.com/jsdom/jsdom/issues/2475 + let htmlPath = nullthrows(bundleEvent.bundleGraph).getBundles()[0] + .filePath; + let html = await outputFS.readFile(htmlPath, 'utf8'); + html = html.replace(/type="module"/g, ''); + await outputFS.writeFile(htmlPath, html); + let window; try { let dom = await JSDOM.JSDOM.fromURL( @@ -991,6 +999,14 @@ module.hot.dispose((data) => { let bundleEvent = await getNextBuild(b); assert.equal(bundleEvent.type, 'buildSuccess'); + // JSDOM doesn't support type=module + // https://github.com/jsdom/jsdom/issues/2475 + let htmlPath = nullthrows(bundleEvent.bundleGraph).getBundles()[0] + .filePath; + let html = await outputFS.readFile(htmlPath, 'utf8'); + html = html.replace(/type="module"/g, ''); + await outputFS.writeFile(htmlPath, html); + let window; try { let dom = await JSDOM.JSDOM.fromURL( diff --git a/packages/core/integration-tests/test/html.js b/packages/core/integration-tests/test/html.js index 11d7e4c1cf9..1829ab9e64e 100644 --- a/packages/core/integration-tests/test/html.js +++ b/packages/core/integration-tests/test/html.js @@ -507,7 +507,7 @@ describe('html', function () { ); assert( - /^\s*\n`; + } + + code += ';\n}\n'; + + let filePath = nullthrows(node.value.sourcePath); + runtimes.push({ + filePath: replaceExtension(filePath), + code, + dependency: node.value, + env: {sourceType: 'module'}, + shouldReplaceResolution: true, + }); + } + } + }); + + // Register server actions in the server entry point. + if ( + bundle.env.isServer() && + bundleGraph.getParentBundles(bundle).length === 0 + ) { + let serverActions = ''; + bundleGraph.traverse(node => { + if ( + node.type === 'asset' && + Array.isArray(node.value.meta?.directives) && + node.value.meta.directives.includes('use server') + ) { + let bundlesWithAsset = bundleGraph.getBundlesWithAsset(node.value); + let bundles = new Set(); + let referenced = bundleGraph.getReferencedBundles( + bundlesWithAsset[0], + ); + bundles.add(normalizeSeparators(bundlesWithAsset[0].name)); + for (let r of referenced) { + if (r.type === 'js' && r.env.context === bundle.env.context) { + bundles.add(normalizeSeparators(r.name)); + } + } + serverActions += ` ${JSON.stringify( + bundleGraph.getAssetPublicId(node.value), + )}: ${JSON.stringify([...bundles])},\n`; + } + }); + + let code = ''; + if (serverActions.length > 0) { + code += + 'import {registerServerActions} from "react-server-dom-parcel/server.edge";\n'; + code += `registerServerActions({\n`; + code += serverActions; + code += '});\n'; + } + + // React needs AsyncLocalStorage defined as a global for the edge environment. + // Without this, preinit scripts won't be inserted during SSR. + code += 'if (typeof AsyncLocalHooks === "undefined") {\n'; + code += ' try {\n'; + code += + ' globalThis.AsyncLocalStorage = require("node:async_hooks").AsyncLocalStorage;\n'; + code += ' } catch {}\n'; + code += '}\n'; + + runtimes.push({ + filePath: replaceExtension( + bundle.getMainEntry()?.filePath ?? __filename, + ), + code, + isEntry: true, + env: {sourceType: 'module'}, + }); + } + + return runtimes; + }, +}): Runtime); + +function replaceExtension(filePath, extension = '.jsx') { + let ext = path.extname(filePath); + return filePath.slice(0, -ext.length) + extension; +} diff --git a/packages/transformers/css/src/CSSTransformer.js b/packages/transformers/css/src/CSSTransformer.js index 32ab86a1396..9f3d30a910c 100644 --- a/packages/transformers/css/src/CSSTransformer.js +++ b/packages/transformers/css/src/CSSTransformer.js @@ -44,7 +44,19 @@ export default (new Transformer({ async transform({asset, config, options, logger}) { // Normalize the asset's environment so that properties that only affect JS don't cause CSS to be duplicated. // For example, with ESModule and CommonJS targets, only a single shared CSS bundle should be produced. - let env = asset.env; + let env = { + context: asset.env.context, + outputFormat: asset.env.outputFormat, + engines: asset.env.engines, + includeNodeModules: asset.env.includeNodeModules, + sourceType: asset.env.sourceType, + isLibrary: asset.env.isLibrary, + shouldOptimize: asset.env.shouldOptimize, + shouldScopeHoist: asset.env.shouldScopeHoist, + sourceMap: asset.env.sourceMap, + loc: asset.env.loc, + }; + asset.setEnvironment({ context: 'browser', engines: { @@ -268,6 +280,7 @@ export default (new Transformer({ symbols: new Map([ [exported, {local: ref.name, isWeak: false, loc: null}], ]), + env, }); } else if (ref.type === 'global') { s += ref.name; @@ -284,6 +297,7 @@ export default (new Transformer({ specifier: ref.specifier, specifierType: 'esm', packageConditions: ['style'], + env, }); } s += '${' + `${d}[${JSON.stringify(ref.name)}]` + '}'; @@ -302,6 +316,7 @@ export default (new Transformer({ symbols: new Map([ [key, {local: exports[key].name, isWeak: false, loc: null}], ]), + env, }); } @@ -338,6 +353,7 @@ export default (new Transformer({ symbols: new Map([ [reference.name, {local: symbol, isWeak: false, loc: null}], ]), + env, }); asset.meta.hasReferences = true; diff --git a/packages/transformers/html/src/dependencies.js b/packages/transformers/html/src/dependencies.js index 1254e2ee9ef..4a0bbb3fa14 100644 --- a/packages/transformers/html/src/dependencies.js +++ b/packages/transformers/html/src/dependencies.js @@ -185,7 +185,10 @@ export default function collectDependencies( : undefined; let outputFormat = 'global'; - if (attrs.type === 'module' && asset.env.shouldScopeHoist) { + if ( + attrs.type === 'module' && + (asset.env.shouldScopeHoist || asset.env.supports('esmodules', true)) + ) { outputFormat = 'esmodule'; } else { if (attrs.type === 'module') { diff --git a/packages/transformers/js/core/Cargo.toml b/packages/transformers/js/core/Cargo.toml index 92c450f121b..96398a10d97 100644 --- a/packages/transformers/js/core/Cargo.toml +++ b/packages/transformers/js/core/Cargo.toml @@ -38,3 +38,4 @@ path-slash = "0.1.4" indexmap = "1.9.2" parcel-macros = { path = "../../../../crates/macros" } parking_lot = "0.12" +bitflags = "1.3.2" diff --git a/packages/transformers/js/core/src/dependency_collector.rs b/packages/transformers/js/core/src/dependency_collector.rs index d90ca352a6e..0ff1004f5bd 100644 --- a/packages/transformers/js/core/src/dependency_collector.rs +++ b/packages/transformers/js/core/src/dependency_collector.rs @@ -1,16 +1,18 @@ use std::{ - collections::{hash_map::DefaultHasher, HashMap}, + collections::hash_map::DefaultHasher, fmt, hash::{Hash, Hasher}, path::Path, }; +use bitflags::bitflags; +use parcel_macros::{Evaluator, JsValue}; use path_slash::PathBufExt; use serde::{Deserialize, Serialize}; use swc_core::{ common::{sync::Lrc, Mark, SourceMap, Span, SyntaxContext, DUMMY_SP}, ecma::{ - ast::{self, Callee, IdentName, MemberProp}, + ast::{self, Callee, MemberProp, Module}, atoms::{js_word, JsWord}, utils::{member_expr, stack_size::maybe_grow_default}, visit::{Fold, FoldWith}, @@ -97,19 +99,32 @@ pub enum DependencyKind { Id, } +bitflags! { + #[derive(Serialize, Deserialize, Default)] + #[serde(transparent)] + pub struct Helpers: u8 { + /// `import.meta.distDir` – a relative path from the current bundle to the distDir + const DIST_DIR = 1 << 0; + /// `import.meta.publicUrl` - absolute public URL + const PUBLIC_URL = 1 << 1; + /// `parcelRequire.load` + const LOAD = 1 << 2; + } +} + impl fmt::Display for DependencyKind { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{:?}", self) } } -#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DependencyDescriptor { pub kind: DependencyKind, pub loc: SourceLocation, /// The text specifier associated with the import/export statement. pub specifier: swc_core::ecma::atoms::JsWord, - pub attributes: Option>, + pub attributes: Option, pub is_optional: bool, pub is_helper: bool, pub source_type: Option, @@ -118,14 +133,15 @@ pub struct DependencyDescriptor { /// This pass collects dependencies in a module and compiles references as needed to work with Parcel's JSRuntime. pub fn dependency_collector<'a>( + module: Module, source_map: Lrc, items: &'a mut Vec, ignore_mark: swc_core::common::Mark, unresolved_mark: swc_core::common::Mark, config: &'a Config, diagnostics: &'a mut Vec, -) -> impl Fold + 'a { - DependencyCollector { +) -> (Module, Helpers) { + let mut collector = DependencyCollector { source_map, items, in_try: false, @@ -136,7 +152,11 @@ pub fn dependency_collector<'a>( config, diagnostics, import_meta: None, - } + helpers: Helpers::empty(), + }; + + let module = module.fold_with(&mut collector); + (module, collector.helpers) } struct DependencyCollector<'a> { @@ -150,6 +170,7 @@ struct DependencyCollector<'a> { config: &'a Config, diagnostics: &'a mut Vec, import_meta: Option, + helpers: Helpers, } impl<'a> DependencyCollector<'a> { @@ -158,7 +179,7 @@ impl<'a> DependencyCollector<'a> { mut specifier: JsWord, span: swc_core::common::Span, kind: DependencyKind, - attributes: Option>, + attributes: Option, is_optional: bool, source_type: SourceType, ) -> Option { @@ -344,11 +365,17 @@ impl<'a> Fold for DependencyCollector<'a> { return node; } + let evaluator = Evaluator::new(&self.source_map); + let attributes = node + .with + .as_ref() + .and_then(|attrs| evaluator.eval_object(&*attrs).ok()); + let rewritten = self.add_dependency( node.src.value.clone(), node.src.span, DependencyKind::Import, - None, + attributes, false, self.config.source_type, ); @@ -366,11 +393,17 @@ impl<'a> Fold for DependencyCollector<'a> { return node; } + let evaluator = Evaluator::new(&self.source_map); + let attributes = node + .with + .as_ref() + .and_then(|attrs| evaluator.eval_object(&*attrs).ok()); + let rewritten = self.add_dependency( src.value.clone(), src.span, DependencyKind::Export, - None, + attributes, false, self.config.source_type, ); @@ -384,11 +417,17 @@ impl<'a> Fold for DependencyCollector<'a> { } fn fold_export_all(&mut self, mut node: ast::ExportAll) -> ast::ExportAll { + let evaluator = Evaluator::new(&self.source_map); + let attributes = node + .with + .as_ref() + .and_then(|attrs| evaluator.eval_object(&*attrs).ok()); + let rewritten = self.add_dependency( node.src.value.clone(), node.src.span, DependencyKind::Export, - None, + attributes, false, self.config.source_type, ); @@ -439,7 +478,7 @@ impl<'a> Fold for DependencyCollector<'a> { } } "importScripts" => { - if self.config.is_worker { + if self.config.is_worker() { let (msg, span) = if self.config.source_type == SourceType::Script { // Ignore if argument is not a string literal. let span = if let Some(ast::ExprOrSpread { expr, .. }) = node.args.first() { @@ -547,9 +586,23 @@ impl<'a> Fold for DependencyCollector<'a> { } } Member(member) => { - if match_member_expr(member, vec!["module", "require"], self.unresolved_mark) { + if match_member_expr(member, vec!["parcelRequire", "load"], self.unresolved_mark) { + let mut call = node.fold_children_with(self); + let callee = if self.config.scope_hoist { + ast::Expr::Ident(ast::Ident::new_no_ctxt("$parcel$import".into(), call.span)) + } else { + ast::Expr::Member(member_expr!( + Default::default(), + call.span, + module.bundle.load + )) + }; + call.callee = ast::Callee::Expr(Box::new(callee)); + self.helpers |= Helpers::DIST_DIR | Helpers::LOAD; + return call; + } else if match_member_expr(member, vec!["module", "require"], self.unresolved_mark) { DependencyKind::Require - } else if self.config.is_browser + } else if self.config.is_browser() && match_member_expr( member, vec!["navigator", "serviceWorker", "register"], @@ -557,7 +610,7 @@ impl<'a> Fold for DependencyCollector<'a> { ) { DependencyKind::ServiceWorker - } else if self.config.is_browser + } else if self.config.is_browser() && match_member_expr( member, vec!["CSS", "paintWorklet", "addModule"], @@ -637,38 +690,14 @@ impl<'a> Fold for DependencyCollector<'a> { let mut attributes = None; if kind == DependencyKind::DynamicImport { if let Some(arg) = node.args.get(1) { - if let Object(arg) = &*arg.expr { - let mut attrs = HashMap::new(); - for key in &arg.props { - let prop = match key { - ast::PropOrSpread::Prop(prop) => prop, - _ => continue, - }; - - let kv = match &**prop { - ast::Prop::KeyValue(kv) => kv, - _ => continue, - }; - - let k = match &kv.key { - ast::PropName::Ident(IdentName { sym, .. }) - | ast::PropName::Str(ast::Str { value: sym, .. }) => sym.clone(), - _ => continue, - }; - - let v = match &*kv.value { - Lit(ast::Lit::Bool(ast::Bool { value, .. })) => *value, - _ => continue, - }; - - attrs.insert(k, v); - } - - attributes = Some(attrs); + if let Object(_) = &*arg.expr { + let evaluator = Evaluator::new(&self.source_map); + attributes = evaluator.eval(&*arg.expr).ok(); } } } + let mut is_specifier_str = false; let node = if let Some(arg) = node.args.first() { if kind == DependencyKind::ServiceWorker || kind == DependencyKind::Worklet { let (source_type, opts) = if kind == DependencyKind::ServiceWorker { @@ -726,6 +755,7 @@ impl<'a> Fold for DependencyCollector<'a> { } if let Some((specifier, span)) = match_str(&arg.expr) { + is_specifier_str = true; // require() calls aren't allowed in scripts, flag as an error. if kind == DependencyKind::Require && self.config.source_type == SourceType::Script { self.add_script_error(node.span); @@ -761,8 +791,8 @@ impl<'a> Fold for DependencyCollector<'a> { // Replace import() with require() if kind == DependencyKind::DynamicImport { - let mut call = node; - if !self.config.scope_hoist && !self.config.standalone { + let mut call = node.fold_children_with(self); + if !self.config.scope_hoist && !self.config.standalone && is_specifier_str { let name = match &self.config.source_type { SourceType::Module => "require", SourceType::Script => "__parcel__require__", @@ -813,7 +843,7 @@ impl<'a> Fold for DependencyCollector<'a> { Ident(id) => { if id.sym == "Worker" || id.sym == "SharedWorker" { // Bail if defined in scope - self.config.is_browser && is_unresolved(&id, self.unresolved_mark) + self.config.is_browser() && is_unresolved(&id, self.unresolved_mark) } else if id.sym == "Promise" { // Match requires inside promises (e.g. Rollup compiled dynamic imports) // new Promise(resolve => resolve(require('foo'))) @@ -920,6 +950,10 @@ impl<'a> Fold for DependencyCollector<'a> { return self.get_import_meta_url(); } + if let Some(expr) = self.match_import_meta_prop(&node) { + return expr; + } + if let Some((specifier, span)) = self.match_new_url(&node) { let url = self.add_url_dependency( specifier, @@ -1343,10 +1377,66 @@ impl<'a> DependencyCollector<'a> { } true } + Expr::Member(member) => { + match_member_expr(member, vec!["parcelRequire", "meta"], self.unresolved_mark) + } _ => false, } } + fn match_import_meta_prop(&mut self, expr: &ast::Expr) -> Option { + use ast::*; + + match expr { + Expr::Member(member) => { + if !self.is_import_meta(&member.obj) { + return None; + } + + let name = match_property_name(member); + + if let Some((name, span)) = name { + match name.as_str() { + "distDir" => { + self.helpers |= Helpers::DIST_DIR; + if self.config.scope_hoist { + Some(Expr::Ident(Ident::new_no_ctxt( + "$parcel$distDir".into(), + span, + ))) + } else { + Some(Expr::Member(member_expr!( + Default::default(), + span, + module.bundle.distDir + ))) + } + } + "publicUrl" => { + self.helpers |= Helpers::PUBLIC_URL; + if self.config.scope_hoist { + Some(Expr::Ident(Ident::new_no_ctxt( + "$parcel$publicUrl".into(), + span, + ))) + } else { + Some(Expr::Member(member_expr!( + Default::default(), + span, + module.bundle.publicUrl + ))) + } + } + _ => None, + } + } else { + None + } + } + _ => None, + } + } + fn get_project_relative_filename(&self) -> String { if let Some(relative) = pathdiff::diff_paths(&self.config.filename, &self.config.project_root) { relative.to_slash_lossy() @@ -1532,13 +1622,12 @@ mod test { config, diagnostics, import_meta: None, + helpers: Helpers::empty(), } } fn make_config() -> Config { - let mut config = Config::default(); - config.is_browser = true; - config + Config::default() } fn make_placeholder_hash(specifier: &str, dependency_kind: DependencyKind) -> String { diff --git a/packages/transformers/js/core/src/lib.rs b/packages/transformers/js/core/src/lib.rs index e0582e8f1f5..b84681709aa 100644 --- a/packages/transformers/js/core/src/lib.rs +++ b/packages/transformers/js/core/src/lib.rs @@ -21,6 +21,7 @@ use std::{ pub use collect::CollectImportedSymbol; use collect::{Collect, CollectResult}; use constant_module::ConstantModule; +use dependency_collector::Helpers; pub use dependency_collector::{dependency_collector, DependencyDescriptor, DependencyKind}; use env_replacer::*; use fs::inline_fs; @@ -39,7 +40,7 @@ use swc_core::{ source_map::SourceMapGenConfig, sync::Lrc, FileName, Globals, Mark, SourceMap, }, ecma::{ - ast::{Module, ModuleItem, Program}, + ast::{Expr, ExprStmt, Lit, Module, ModuleItem, Program, Stmt, Str}, codegen::text_writer::JsWriter, parser::{error::Error, lexer::Lexer, EsSyntax, Parser, StringInput, Syntax, TsSyntax}, preset_env::{preset_env, Mode::Entry, Targets, Version, Versions}, @@ -74,13 +75,9 @@ pub struct Config { pub code: Vec, pub module_id: String, pub project_root: String, - pub replace_env: bool, pub env: HashMap, pub inline_fs: bool, - pub insert_node_globals: bool, - pub node_replacer: bool, - pub is_browser: bool, - pub is_worker: bool, + pub context: EnvContext, pub is_type_script: bool, pub is_jsx: bool, pub jsx_pragma: Option, @@ -104,6 +101,79 @@ pub struct Config { pub inline_constants: bool, } +#[derive(Default, Serialize, Debug, Deserialize)] +#[serde(rename_all = "kebab-case")] +pub enum EnvContext { + #[default] + Browser, + WebWorker, + ServiceWorker, + Worklet, + Node, + ElectronRenderer, + ElectronMain, + EdgeRoutine, + ReactClient, + ReactServer, +} + +impl Config { + fn is_browser(&self) -> bool { + use EnvContext::*; + matches!( + self.context, + Browser | WebWorker | ServiceWorker | Worklet | ElectronRenderer | ReactClient + ) + } + + fn is_node(&self) -> bool { + use EnvContext::*; + matches!( + self.context, + Node | ElectronMain | ElectronRenderer | ReactServer + ) + } + + fn is_server(&self) -> bool { + use EnvContext::*; + matches!(self.context, Node | ReactServer) + } + + fn is_worker(&self) -> bool { + use EnvContext::*; + matches!(self.context, WebWorker | ServiceWorker) + } + + fn is_worklet(&self) -> bool { + use EnvContext::*; + matches!(self.context, Worklet) + } + + fn react_refresh(&self) -> bool { + self.is_browser() + && !self.is_library + && !self.is_worker() + && !self.is_worklet() + && self.react_refresh + } + + fn inline_fs(&self) -> bool { + self.inline_fs && !self.is_node() && self.source_type != SourceType::Script + } + + fn node_replacer(&self) -> bool { + self.is_node() + } + + fn insert_node_globals(&self) -> bool { + !self.is_node() && self.source_type != SourceType::Script + } + + fn replace_env(&self) -> bool { + !self.is_node() || matches!(self.context, EnvContext::ReactServer) + } +} + #[derive(Serialize, Debug, Default)] #[non_exhaustive] pub struct TransformResult { @@ -119,6 +189,8 @@ pub struct TransformResult { pub used_env: HashSet, pub has_node_replacements: bool, pub is_constant_module: bool, + pub directives: Vec, + pub helpers: Helpers, } fn targets_to_versions(targets: &Option>) -> Option { @@ -152,7 +224,7 @@ fn targets_to_versions(targets: &Option>) -> Option, ) -> Result { let mut result = TransformResult::default(); @@ -186,9 +258,48 @@ pub fn transform( Program::Script(script) => script.shebang.take().map(|s| s.to_string()), }; + match &module { + Program::Module(module) => { + for item in &module.body { + if let ModuleItem::Stmt(Stmt::Expr(ExprStmt { expr, .. })) = item { + if let Expr::Lit(Lit::Str(Str { value, .. })) = &**expr { + result.directives.push(value.clone()); + continue; + } + } + break; + } + } + Program::Script(script) => { + for item in &script.body { + if let Stmt::Expr(ExprStmt { expr, .. }) = item { + if let Expr::Lit(Lit::Str(Str { value, .. })) = &**expr { + result.directives.push(value.clone()); + continue; + } + } + break; + } + } + } + + if config.is_server() + && !config.is_library + && result.directives.contains(&"use client".into()) + { + config.context = EnvContext::ReactClient; + config.is_esm_output = true; + } else if !config.is_server() + && !config.is_library + && result.directives.contains(&"use server".into()) + { + config.context = EnvContext::ReactServer; + config.is_esm_output = false; + } + let mut global_deps = vec![]; let mut fs_deps = vec![]; - let should_inline_fs = config.inline_fs + let should_inline_fs = config.inline_fs() && config.source_type != SourceType::Script && code.contains("readFileSync"); let should_import_swc_helpers = match config.source_type { @@ -214,7 +325,7 @@ pub fn transform( react_options.pragma_frag = Some(jsx_pragma_frag.clone()); } react_options.development = Some(config.is_development); - react_options.refresh = if config.react_refresh { + react_options.refresh = if config.react_refresh() { Some(react::RefreshOptions::default()) } else { None @@ -331,15 +442,15 @@ pub fn transform( module.visit_mut_with(&mut ( Optional::new( - TypeofReplacer::new(unresolved_mark), + TypeofReplacer::new(unresolved_mark, config.is_node()), config.source_type != SourceType::Script, ), // Inline process.env and process.browser, Optional::new( EnvReplacer { - replace_env: config.replace_env, + replace_env: config.replace_env(), env: &config.env, - is_browser: config.is_browser, + is_browser: config.is_browser(), used_env: &mut result.used_env, source_map: source_map.clone(), diagnostics: &mut diagnostics, @@ -379,7 +490,7 @@ pub fn transform( unresolved_mark, has_node_replacements: &mut result.has_node_replacements, }, - config.node_replacer, + config.node_replacer(), ), ); @@ -396,7 +507,7 @@ pub fn transform( unresolved_mark, scope_hoist: config.scope_hoist, }, - config.insert_node_globals, + config.insert_node_globals(), ), ); @@ -428,19 +539,19 @@ pub fn transform( .visit_mut_with(&mut (hygiene(), resolver(unresolved_mark, global_mark, false))) } + // Collect dependencies let ignore_mark = Mark::fresh(Mark::root()); - let module = module.fold_with( - // Collect dependencies - &mut dependency_collector( - source_map.clone(), - &mut result.dependencies, - ignore_mark, - unresolved_mark, - &config, - &mut diagnostics, - ), + let (module, helpers) = dependency_collector( + module, + source_map.clone(), + &mut result.dependencies, + ignore_mark, + unresolved_mark, + &config, + &mut diagnostics, ); + result.helpers = helpers; diagnostics.extend(error_buffer_to_diagnostics(&error_buffer, &source_map)); if diagnostics diff --git a/packages/transformers/js/core/src/typeof_replacer.rs b/packages/transformers/js/core/src/typeof_replacer.rs index 03d5dfc9fad..799d7c73721 100644 --- a/packages/transformers/js/core/src/typeof_replacer.rs +++ b/packages/transformers/js/core/src/typeof_replacer.rs @@ -18,11 +18,15 @@ use crate::utils::is_unresolved; /// the global `module`, `exports` and `require` symbols. pub struct TypeofReplacer { unresolved_mark: Mark, + is_node: bool, } impl TypeofReplacer { - pub fn new(unresolved_mark: Mark) -> Self { - Self { unresolved_mark } + pub fn new(unresolved_mark: Mark, is_node: bool) -> Self { + Self { + unresolved_mark, + is_node, + } } } @@ -66,6 +70,18 @@ impl TypeofReplacer { }))); } + // Replace `typeof process` with "undefined" in browser builds to avoid pulling in the polyfill. + if !self.is_node + && ident.sym == js_word!("process") + && is_unresolved(&ident, self.unresolved_mark) + { + return Some(Expr::Lit(Lit::Str(Str { + span: unary.span, + value: js_word!("undefined"), + raw: None, + }))); + } + None } } @@ -93,10 +109,12 @@ mod test { const x = typeof require; const m = typeof module; const e = typeof exports; +const p = typeof process; "#; let output_code = run_visit(code, |context| TypeofReplacer { unresolved_mark: context.unresolved_mark, + is_node: false, }) .output_code; @@ -104,6 +122,7 @@ const e = typeof exports; const x = "function"; const m = "object"; const e = "object"; +const p = "undefined"; "# .trim_start(); assert_eq!(output_code, expected_code); @@ -117,6 +136,7 @@ const x = typeof require === 'function'; let output_code = run_visit(code, |context| TypeofReplacer { unresolved_mark: context.unresolved_mark, + is_node: false, }) .output_code; @@ -139,6 +159,7 @@ function wrapper({ require, exports }) { let output_code = run_visit(code, |context| TypeofReplacer { unresolved_mark: context.unresolved_mark, + is_node: false, }) .output_code; diff --git a/packages/transformers/js/src/JSTransformer.js b/packages/transformers/js/src/JSTransformer.js index c284030b4fc..f1c993ce41e 100644 --- a/packages/transformers/js/src/JSTransformer.js +++ b/packages/transformers/js/src/JSTransformer.js @@ -420,18 +420,15 @@ export default (new Transformer({ used_env, has_node_replacements, is_constant_module, + directives, + helpers, } = await (transformAsync || transform)({ filename: asset.filePath, code, module_id: asset.id, project_root: options.projectRoot, - replace_env: !asset.env.isNode(), - inline_fs: Boolean(config?.inlineFS) && !asset.env.isNode(), - insert_node_globals: - !asset.env.isNode() && asset.env.sourceType !== 'script', - node_replacer: asset.env.isNode(), - is_browser: asset.env.isBrowser(), - is_worker: asset.env.isWorker(), + inline_fs: Boolean(config?.inlineFS), + context: asset.env.context, env, is_type_script: asset.type === 'ts' || asset.type === 'tsx', is_jsx: isJSX, @@ -440,12 +437,7 @@ export default (new Transformer({ automatic_jsx_runtime: Boolean(config?.automaticJSXRuntime), jsx_import_source: config?.jsxImportSource, is_development: options.mode === 'development', - react_refresh: - asset.env.isBrowser() && - !asset.env.isLibrary && - !asset.env.isWorker() && - !asset.env.isWorklet() && - Boolean(config?.reactRefresh), + react_refresh: Boolean(config?.reactRefresh), decorators: Boolean(config?.decorators), use_define_for_class_fields: Boolean(config?.useDefineForClassFields), targets, @@ -687,6 +679,56 @@ export default (new Transformer({ asset.invalidateOnEnvChange(env); } + asset.meta.id = asset.id; + asset.meta.directives = directives; + asset.meta.usedHelpers = helpers; + if ( + asset.env.isServer() && + !asset.env.isLibrary && + (directives.includes('use client') || + directives.includes('use client-entry')) + ) { + asset.setEnvironment({ + context: 'react-client', + sourceType: 'module', + outputFormat: 'esmodule', + engines: asset.env.engines, + includeNodeModules: true, + isLibrary: false, + sourceMap: asset.env.sourceMap, + shouldOptimize: asset.env.shouldOptimize, + shouldScopeHoist: asset.env.shouldScopeHoist, + }); + } else if ( + !asset.env.isServer() && + !asset.env.isLibrary && + directives.includes('use server') + ) { + asset.setEnvironment({ + context: 'react-server', + sourceType: 'module', + outputFormat: 'commonjs', + engines: asset.env.engines, + includeNodeModules: false, + isLibrary: false, + sourceMap: asset.env.sourceMap, + shouldOptimize: asset.env.shouldOptimize, + shouldScopeHoist: asset.env.shouldScopeHoist, + }); + } else if (directives.includes('use server-entry')) { + if (!asset.env.isServer()) { + throw new Error( + 'use server-entry must be imported in a server environment', + ); + } + asset.bundleBehavior = 'isolated'; + } + + // Server actions must always be wrapped so they can be parcelRequired. + if (directives.includes('use server')) { + asset.meta.shouldWrap = true; + } + for (let dep of dependencies) { if (dep.kind === 'WebWorker') { // Use native ES module output if the worker was created with `type: 'module'` and all targets @@ -854,6 +896,25 @@ export default (new Transformer({ range = pkg.dependencies[module]; } + if (dep.attributes?.env === 'react-server') { + env = { + ...env, + context: 'react-server', + outputFormat: 'commonjs', + }; + } else if (dep.attributes?.env === 'react-client') { + env = { + ...env, + context: 'react-client', + outputFormat: 'esmodule', + includeNodeModules: true, + }; + + // This is a hack to prevent creating unnecessary shared bundles between actual client code + // and server code that runs in the client environment (e.g. react). + asset.isBundleSplittable = false; + } + asset.addDependency({ specifier: dep.specifier, specifierType: dep.kind === 'Require' ? 'commonjs' : 'esm', @@ -868,7 +929,6 @@ export default (new Transformer({ } } - asset.meta.id = asset.id; if (hoist_result) { asset.symbols.ensure(); for (let { @@ -979,7 +1039,7 @@ export default (new Transformer({ asset.meta.hasCJSExports = hoist_result.has_cjs_exports; asset.meta.staticExports = hoist_result.static_cjs_exports; - asset.meta.shouldWrap = hoist_result.should_wrap; + asset.meta.shouldWrap ||= hoist_result.should_wrap; } else { if (symbol_result) { let deps = new Map( diff --git a/packages/transformers/raw/src/RawTransformer.js b/packages/transformers/raw/src/RawTransformer.js index cf010820f11..42dfe2eb4e5 100644 --- a/packages/transformers/raw/src/RawTransformer.js +++ b/packages/transformers/raw/src/RawTransformer.js @@ -5,6 +5,7 @@ import {Transformer} from '@parcel/plugin'; export default (new Transformer({ transform({asset}) { asset.bundleBehavior = 'isolated'; + asset.meta.jsRuntime = 'url'; return [asset]; }, }): Transformer); diff --git a/packages/transformers/react-refresh-wrap/src/ReactRefreshWrapTransformer.js b/packages/transformers/react-refresh-wrap/src/ReactRefreshWrapTransformer.js index b0df28bd206..1058e65f5e7 100644 --- a/packages/transformers/react-refresh-wrap/src/ReactRefreshWrapTransformer.js +++ b/packages/transformers/react-refresh-wrap/src/ReactRefreshWrapTransformer.js @@ -41,16 +41,16 @@ export default (new Transformer({ let name = `$parcel$ReactRefreshHelpers$${asset.id.slice(-4)}`; code = `var ${name} = require(${JSON.stringify(wrapperPath)}); -var prevRefreshReg = window.$RefreshReg$; -var prevRefreshSig = window.$RefreshSig$; +var prevRefreshReg = globalThis.$RefreshReg$; +var prevRefreshSig = globalThis.$RefreshSig$; ${name}.prelude(module); try { ${code} ${name}.postlude(module); } finally { - window.$RefreshReg$ = prevRefreshReg; - window.$RefreshSig$ = prevRefreshSig; + globalThis.$RefreshReg$ = prevRefreshReg; + globalThis.$RefreshSig$ = prevRefreshSig; }`; asset.setCode(code); diff --git a/packages/transformers/react-refresh-wrap/src/helpers/helpers.js b/packages/transformers/react-refresh-wrap/src/helpers/helpers.js index 5955e935861..40cd5a405a1 100644 --- a/packages/transformers/react-refresh-wrap/src/helpers/helpers.js +++ b/packages/transformers/react-refresh-wrap/src/helpers/helpers.js @@ -38,25 +38,29 @@ var enqueueUpdate = debounce(function () { // MIT License - Copyright (c) Facebook, Inc. and its affiliates. module.exports.prelude = function (module) { - window.__REACT_REFRESH_VERSION_TRANSFORMER = version; - window.$RefreshReg$ = function (type, id) { + globalThis.__REACT_REFRESH_VERSION_TRANSFORMER = version; + globalThis.$RefreshReg$ = function (type, id) { if ( - window.__REACT_REFRESH_VERSION_TRANSFORMER && - window.__REACT_REFRESH_VERSION_RUNTIME && - window.__REACT_REFRESH_VERSION_TRANSFORMER !== - window.__REACT_REFRESH_VERSION_RUNTIME + globalThis.__REACT_REFRESH_VERSION_TRANSFORMER && + globalThis.__REACT_REFRESH_VERSION_RUNTIME && + globalThis.__REACT_REFRESH_VERSION_TRANSFORMER !== + globalThis.__REACT_REFRESH_VERSION_RUNTIME ) { // Both versions were set and they did not match throw new Error( - `react-refresh versions did not match between transformer and runtime. Please check your dependencies. Transformer: ${window.__REACT_REFRESH_VERSION_TRANSFORMER}, Runtime: ${window.__REACT_REFRESH_VERSION_RUNTIME}`, + `react-refresh versions did not match between transformer and runtime. Please check your dependencies. Transformer: ${globalThis.__REACT_REFRESH_VERSION_TRANSFORMER}, Runtime: ${globalThis.__REACT_REFRESH_VERSION_RUNTIME}`, ); } Refresh.register(type, module.id + ' ' + id); }; - window.$RefreshSig$ = Refresh.createSignatureFunctionForTransform; + globalThis.$RefreshSig$ = Refresh.createSignatureFunctionForTransform; }; module.exports.postlude = function (module) { + if (typeof window === 'undefined') { + return; + } + if (isReactRefreshBoundary(module.exports)) { registerExportsForReactRefresh(module); diff --git a/packages/transformers/worklet/src/WorkletTransformer.js b/packages/transformers/worklet/src/WorkletTransformer.js index 94c66ffd5e5..b1742b77ca5 100644 --- a/packages/transformers/worklet/src/WorkletTransformer.js +++ b/packages/transformers/worklet/src/WorkletTransformer.js @@ -5,6 +5,7 @@ import {Transformer} from '@parcel/plugin'; export default (new Transformer({ transform({asset}) { asset.bundleBehavior = 'isolated'; + asset.meta.jsRuntime = 'url'; asset.setEnvironment({ context: 'worklet', sourceType: 'module', diff --git a/packages/utils/node-resolver-core/src/Wrapper.js b/packages/utils/node-resolver-core/src/Wrapper.js index 6c54a1e1186..db3be2db807 100644 --- a/packages/utils/node-resolver-core/src/Wrapper.js +++ b/packages/utils/node-resolver-core/src/Wrapper.js @@ -252,7 +252,7 @@ export default class NodeResolver { name: string, options: ResolveOptions, ): Promise { - if (options.env.isNode()) { + if (options.env.isNode() || options.env.context === 'react-server') { return {isExcluded: true}; } @@ -779,6 +779,7 @@ function environmentToExportsConditions( const ELECTRON = 1 << 7; const DEVELOPMENT = 1 << 8; const PRODUCTION = 1 << 9; + const REACT_SERVER = 1 << 16; let conditions = 0; if (env.isBrowser()) { @@ -801,6 +802,10 @@ function environmentToExportsConditions( conditions |= NODE; } + if (env.context === 'react-server') { + conditions |= REACT_SERVER; + } + if (mode === 'production') { conditions |= PRODUCTION; } else if (mode === 'development') { diff --git a/yarn.lock b/yarn.lock index 8eb9ee83bc9..b9575f77adf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3038,6 +3038,14 @@ abbrev@^2.0.0: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-2.0.0.tgz#cf59829b8b4f03f89dda2771cb7f3653828c89bf" integrity sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ== +accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" @@ -3312,6 +3320,11 @@ array-each@^1.0.0, array-each@^1.0.1: resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f" integrity sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA== +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== + array-from@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/array-from/-/array-from-2.1.1.tgz#cfe9d8c26628b9dc5aecc62a9f5d8f1f352c1195" @@ -3830,6 +3843,24 @@ bn.js@^5.2.1: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== +body-parser@1.20.3: + version "1.20.3" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.3.tgz#1953431221c6fb5cd63c4b36d53fab0928e548c6" + integrity sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g== + dependencies: + bytes "3.1.2" + content-type "~1.0.5" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.13.0" + raw-body "2.5.2" + type-is "~1.6.18" + unpipe "1.0.0" + boolbase@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" @@ -4035,6 +4066,11 @@ bytes@3.0.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" integrity sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw== +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + cacache@^16.1.0: version "16.1.3" resolved "https://registry.yarnpkg.com/cacache/-/cacache-16.1.3.tgz#a02b9f34ecfaf9a78c9f4bc16fceb94d5d67a38e" @@ -4707,11 +4743,23 @@ content-disposition@0.5.2: resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" integrity sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA== +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== + dependencies: + safe-buffer "5.2.1" + content-security-policy-parser@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/content-security-policy-parser/-/content-security-policy-parser-0.6.0.tgz#b361d8587dee0e92def19d308cb23e8d32cc26f6" integrity sha512-wejtC/p+HLNQ7uaWgg1o3CKHhE8QXC9fJ2GCY0X82L5HUNtZSq1dmUvNSHHEb6R7LS02fpmRBq/vP8i4/+9KCg== +content-type@~1.0.4, content-type@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== + conventional-changelog-angular@5.0.12: version "5.0.12" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz#c979b8b921cbfe26402eb3da5bbfda02d865a2b9" @@ -4804,6 +4852,16 @@ convert-source-map@^2.0.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== + +cookie@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.1.tgz#2f73c42142d5d5cf71310a74fc4ae61670e5dbc9" + integrity sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w== + copy-anything@^2.0.1: version "2.0.6" resolved "https://registry.yarnpkg.com/copy-anything/-/copy-anything-2.0.6.tgz#092454ea9584a7b7ad5573062b2a87f5900fc480" @@ -5333,6 +5391,11 @@ denodeify@^1.2.1: resolved "https://registry.yarnpkg.com/denodeify/-/denodeify-1.2.1.tgz#3a36287f5034e699e7577901052c2e6c94251631" integrity sha512-KNTihKNmQENUZeKu5fzfpzRqR5S2VMp4gl9RFHiWzj9DfvYQPMJ6XHKNaQxaGCXwPk6y9yme3aUoaiAe+KX+vg== +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + deprecation@^2.0.0, deprecation@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" @@ -5346,6 +5409,11 @@ des.js@^1.0.0: inherits "^2.0.1" minimalistic-assert "^1.0.0" +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + detab@2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/detab/-/detab-2.0.4.tgz#b927892069aff405fbb9a186fe97a44a92a94b43" @@ -5643,6 +5711,11 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== +encodeurl@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" + integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg== + encoding-sniffer@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz#799569d66d443babe82af18c9f403498365ef1d5" @@ -6246,6 +6319,11 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== + event-emitter@^0.3.5: version "0.3.5" resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" @@ -6352,6 +6430,43 @@ exponential-backoff@^3.1.1: resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== +express@^4.18.2: + version "4.21.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.21.1.tgz#9dae5dda832f16b4eec941a4e44aa89ec481b281" + integrity sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ== + dependencies: + accepts "~1.3.8" + array-flatten "1.1.1" + body-parser "1.20.3" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.7.1" + cookie-signature "1.0.6" + debug "2.6.9" + depd "2.0.0" + encodeurl "~2.0.0" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.3.1" + fresh "0.5.2" + http-errors "2.0.0" + merge-descriptors "1.0.3" + methods "~1.1.2" + on-finished "2.4.1" + parseurl "~1.3.3" + path-to-regexp "0.1.10" + proxy-addr "~2.0.7" + qs "6.13.0" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.19.0" + serve-static "1.16.2" + setprototypeof "1.2.0" + statuses "2.0.1" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + ext@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" @@ -6573,6 +6688,19 @@ finalhandler@1.1.2: statuses "~1.5.0" unpipe "~1.0.0" +finalhandler@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.3.1.tgz#0c575f1d1d324ddd1da35ad7ece3df7d19088019" + integrity sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ== + dependencies: + debug "2.6.9" + encodeurl "~2.0.0" + escape-html "~1.0.3" + on-finished "2.4.1" + parseurl "~1.3.3" + statuses "2.0.1" + unpipe "~1.0.0" + find-cache-dir@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" @@ -6754,6 +6882,11 @@ format@^0.2.0: resolved "https://registry.yarnpkg.com/format/-/format-0.2.2.tgz#d6170107e9efdc4ed30c9dc39016df942b5cb58b" integrity sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww== +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + fraction.js@^4.3.7: version "4.3.7" resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.3.7.tgz#06ca0085157e42fda7f9e726e79fefc4068840f7" @@ -6766,7 +6899,7 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" -fresh@^0.5.2: +fresh@0.5.2, fresh@^0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== @@ -7730,6 +7863,17 @@ http-cache-semantics@^4.1.0, http-cache-semantics@^4.1.1: resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + http-proxy-agent@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" @@ -7824,6 +7968,13 @@ hyphenate-style-name@^1.0.3: resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.1.0.tgz#1797bf50369588b47b72ca6d5e65374607cf4436" integrity sha512-WDC/ui2VVRrz3jOVi+XtjqkDjiVjTtFaAGiW37k6b+ohyQ5wYDOGkvCZa8+H0nx3gyvv0+BST9xuOgIyGQ00gw== +iconv-lite@0.4.24, iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + iconv-lite@0.6.3, iconv-lite@^0.6.2, iconv-lite@^0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" @@ -7831,13 +7982,6 @@ iconv-lite@0.6.3, iconv-lite@^0.6.2, iconv-lite@^0.6.3: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" -iconv-lite@^0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - icss-utils@^5.0.0, icss-utils@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" @@ -7931,7 +8075,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.0, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: +inherits@2, inherits@2.0.4, inherits@^2.0.0, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -8035,6 +8179,11 @@ ip-address@^9.0.5: jsbn "1.1.0" sprintf-js "^1.1.3" +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + is-absolute@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" @@ -9632,6 +9781,11 @@ mdurl@^1.0.0, mdurl@^1.0.1: resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g== +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== + meow@^8.0.0: version "8.1.2" resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897" @@ -9649,6 +9803,11 @@ meow@^8.0.0: type-fest "^0.18.0" yargs-parser "^20.2.3" +merge-descriptors@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz#d80319a65f3c7935351e5cfdac8f9318504dbed5" + integrity sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ== + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -9659,6 +9818,11 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== + micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" @@ -9711,14 +9875,14 @@ mime-types@2.1.18: dependencies: mime-db "~1.33.0" -mime-types@^2.1.12: +mime-types@^2.1.12, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" -mime@^1.3.4, mime@^1.4.1: +mime@1.6.0, mime@^1.3.4, mime@^1.4.1: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== @@ -10133,6 +10297,11 @@ needle@^3.1.0: iconv-lite "^0.6.3" sax "^1.2.4" +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + negotiator@^0.6.3: version "0.6.4" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.4.tgz#777948e2452651c570b712dd01c23e262713fff7" @@ -10699,6 +10868,13 @@ object.values@^1.1.6, object.values@^1.2.0: define-properties "^1.2.1" es-object-atoms "^1.0.0" +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" @@ -11224,6 +11400,11 @@ path-scurry@^1.11.1, path-scurry@^1.6.1: lru-cache "^10.2.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" +path-to-regexp@0.1.10: + version "0.1.10" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.10.tgz#67e9108c5c0551b9e5326064387de4763c4d5f8b" + integrity sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w== + path-to-regexp@3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-3.3.0.tgz#f7f31d32e8518c2660862b644414b6d5c63a611b" @@ -11862,6 +12043,14 @@ protocols@^2.0.0, protocols@^2.0.1: resolved "https://registry.yarnpkg.com/protocols/-/protocols-2.0.1.tgz#8f155da3fc0f32644e83c5782c8e8212ccf70a86" integrity sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q== +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + proxy-from-env@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" @@ -12034,6 +12223,13 @@ q@^1.5.1: resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw== +qs@6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" + integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== + dependencies: + side-channel "^1.0.6" + qs@^6.12.3: version "6.13.1" resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.1.tgz#3ce5fc72bd3a8171b85c99b93c65dd20b7d1b16e" @@ -12081,14 +12277,20 @@ range-parser@1.2.0: resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" integrity sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A== -react-dom@^17.0.2: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" - integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" + integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler "^0.20.2" + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" react-dom@^18.2.0: version "18.3.1" @@ -12098,6 +12300,13 @@ react-dom@^18.2.0: loose-envify "^1.1.0" scheduler "^0.23.2" +react-dom@^19: + version "19.0.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.0.0.tgz#43446f1f01c65a4cd7f7588083e686a6726cfb57" + integrity sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ== + dependencies: + scheduler "^0.25.0" + react-error-overlay@6.0.9: version "6.0.9" resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.9.tgz#3c743010c9359608c375ecd6bc76f35d93995b0a" @@ -12123,6 +12332,11 @@ react-resizable-panels@^0.0.61: resolved "https://registry.yarnpkg.com/react-resizable-panels/-/react-resizable-panels-0.0.61.tgz#2260ec8ca591431d367d172bced49733cc3308aa" integrity sha512-Vk2a4LEHWkI6hGPnPmXxa/2twLYMAMMUTyA2PtR1ijvH2Nkg/AhGqrPsIi/eI85uVWtYCFNZKEsbR3uGuJl/yg== +react-server-dom-parcel@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/react-server-dom-parcel/-/react-server-dom-parcel-0.0.1.tgz#2653c2b39a857fbd17770d27d6f08bd139803f09" + integrity sha512-f93wv8gycm4ltcQRqpSlgYyT6cJxmjJdRmXw3deQoXowDlP44W4RRzwHQ70u1xseCpHFIORmuHVXk7+Fk8RFtQ== + react-universal-interface@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/react-universal-interface/-/react-universal-interface-0.6.2.tgz#5e8d438a01729a4dbbcbeeceb0b86be146fe2b3b" @@ -12148,14 +12362,6 @@ react-use@^17.4.0: ts-easing "^0.2.0" tslib "^2.1.0" -react@^17.0.2: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" - integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - react@^18.2.0: version "18.3.1" resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891" @@ -12163,6 +12369,11 @@ react@^18.2.0: dependencies: loose-envify "^1.1.0" +react@^19: + version "19.0.0" + resolved "https://registry.yarnpkg.com/react/-/react-19.0.0.tgz#6e1969251b9f108870aa4bff37a0ce9ddfaaabdd" + integrity sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ== + read-cache@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774" @@ -12711,6 +12922,11 @@ rrweb-cssom@^0.7.1: resolved "https://registry.yarnpkg.com/rrweb-cssom/-/rrweb-cssom-0.7.1.tgz#c73451a484b86dd7cfb1e0b2898df4b703183e4b" integrity sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg== +rsc-html-stream@^0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/rsc-html-stream/-/rsc-html-stream-0.0.4.tgz#0ae70518eeac305852533b9ad60aefacce72ed95" + integrity sha512-1isiXIrlTI/vRLTvS3O4fMrO9qIHje1FSphufrIV5QfzHUgBDCZFwP9b8+rH63nbhxtcKTqfyziwM+2khfX0Uw== + rtl-css-js@^1.16.1: version "1.16.1" resolved "https://registry.yarnpkg.com/rtl-css-js/-/rtl-css-js-1.16.1.tgz#4b48b4354b0ff917a30488d95100fbf7219a3e80" @@ -12747,7 +12963,7 @@ safe-array-concat@^1.1.2: has-symbols "^1.0.3" isarray "^2.0.5" -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: +safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -12806,14 +13022,6 @@ saxes@^6.0.0: dependencies: xmlchars "^2.2.0" -scheduler@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" - integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler@^0.23.2: version "0.23.2" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.2.tgz#414ba64a3b282892e944cf2108ecc078d115cdc3" @@ -12821,6 +13029,11 @@ scheduler@^0.23.2: dependencies: loose-envify "^1.1.0" +scheduler@^0.25.0: + version "0.25.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.25.0.tgz#336cd9768e8cceebf52d3c80e3dcf5de23e7e015" + integrity sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA== + screenfull@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/screenfull/-/screenfull-5.2.0.tgz#6533d524d30621fc1283b9692146f3f13a93d1ba" @@ -12867,6 +13080,25 @@ semver@^7.0.0, semver@^7.1.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semve resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== +send@0.19.0: + version "0.19.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" + integrity sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + serialize-javascript@5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" @@ -12887,6 +13119,16 @@ serve-handler@^6.0.0: path-to-regexp "3.3.0" range-parser "1.2.0" +serve-static@1.16.2: + version "1.16.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296" + integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw== + dependencies: + encodeurl "~2.0.0" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.19.0" + set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -12934,6 +13176,11 @@ setimmediate@^1.0.4, setimmediate@^1.0.5, setimmediate@~1.0.4: resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + sha.js@^2.4.0, sha.js@^2.4.8: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" @@ -13369,6 +13616,11 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + statuses@~1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" @@ -13417,7 +13669,7 @@ string-natural-compare@^3.0.1: resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4" integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw== -"string-width-cjs@npm:string-width@^4.2.0": +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -13443,15 +13695,6 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" @@ -13552,7 +13795,7 @@ stringify-object@^3.3.0: is-obj "^1.0.1" is-regexp "^1.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -13573,13 +13816,6 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -14068,6 +14304,11 @@ toggle-selection@^1.0.6: resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32" integrity sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ== +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + token-stream@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/token-stream/-/token-stream-1.0.0.tgz#cc200eab2613f4166d27ff9afc7ca56d49df6eb4" @@ -14244,6 +14485,14 @@ type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + type@^2.7.2: version "2.7.3" resolved "https://registry.yarnpkg.com/type/-/type-2.7.3.tgz#436981652129285cc3ba94f392886c2637ea0486" @@ -14549,7 +14798,7 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== -unpipe@~1.0.0: +unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== @@ -14706,6 +14955,11 @@ value-or-function@^3.0.0: resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813" integrity sha512-jdBB2FrWvQC/pnPtIqcLsMaQgjhdb6B7tk1MMyTKapox+tQZbdRP4uLxu/JY0t7fbfDCUMnuelzEYv5GsxHhdg== +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== + vfile-location@^3.0.0, vfile-location@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/vfile-location/-/vfile-location-3.2.0.tgz#d8e41fbcbd406063669ebf6c33d56ae8721d0f3c" @@ -15083,7 +15337,7 @@ workerpool@6.1.0: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.0.tgz#a8e038b4c94569596852de7a8ea4228eefdeb37b" integrity sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -15109,15 +15363,6 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"