Browse Source

adding context into every native function, changing this to be passed… (#73)

pull/80/head
Jason Williams 6 years ago committed by GitHub
parent
commit
fe42b0c616
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      src/lib/environment/declerative_environment_record.rs
  2. 13
      src/lib/environment/function_environment_record.rs
  3. 15
      src/lib/environment/global_environment_record.rs
  4. 15
      src/lib/environment/object_environment_record.rs
  5. 28
      src/lib/exec.rs
  6. 75
      src/lib/js/array.rs
  7. 5
      src/lib/js/console.rs
  8. 15
      src/lib/js/error.rs
  9. 32
      src/lib/js/function.rs
  10. 5
      src/lib/js/json.rs
  11. 51
      src/lib/js/math.rs
  12. 22
      src/lib/js/object.rs
  13. 108
      src/lib/js/string.rs
  14. 20
      src/lib/js/value.rs
  15. 29
      src/lib/lib.rs
  16. 1
      src/lib/syntax/ast/constant.rs
  17. 1
      src/lib/syntax/ast/expr.rs
  18. 1
      src/lib/syntax/ast/op.rs
  19. 1
      src/lib/syntax/lexer.rs
  20. 4
      tests/js/test.js
  21. 420
      yarn.lock

11
src/lib/environment/declerative_environment_record.rs

@ -5,10 +5,15 @@
//! A declarative Environment Record binds the set of identifiers defined by the declarations contained within its scope.
//! More info: [ECMA-262 sec-declarative-environment-records](https://tc39.github.io/ecma262/#sec-declarative-environment-records)
use crate::environment::environment_record_trait::EnvironmentRecordTrait;
use crate::environment::lexical_environment::{Environment, EnvironmentType};
use crate::js::value::{Value, ValueData};
use crate::{
environment::{
environment_record_trait::EnvironmentRecordTrait,
lexical_environment::{Environment, EnvironmentType},
},
js::value::{Value, ValueData},
};
use gc::Gc;
use gc_derive::{Finalize, Trace};
use std::collections::hash_map::HashMap;
/// Declerative Bindings have a few properties for book keeping purposes, such as mutability (const vs let).

13
src/lib/environment/function_environment_record.rs

@ -8,11 +8,16 @@
//! from within the function.
//! More info: <https://tc39.github.io/ecma262/#sec-function-environment-records>
use crate::environment::declerative_environment_record::DeclerativeEnvironmentRecordBinding;
use crate::environment::environment_record_trait::EnvironmentRecordTrait;
use crate::environment::lexical_environment::{Environment, EnvironmentType};
use crate::js::value::{Value, ValueData};
use crate::{
environment::{
declerative_environment_record::DeclerativeEnvironmentRecordBinding,
environment_record_trait::EnvironmentRecordTrait,
lexical_environment::{Environment, EnvironmentType},
},
js::value::{Value, ValueData},
};
use gc::Gc;
use gc_derive::{Finalize, Trace};
use std::collections::hash_map::HashMap;
/// Different binding status for `this`.

15
src/lib/environment/global_environment_record.rs

@ -7,12 +7,17 @@
//! that occur within a Script.
//! More info: <https://tc39.github.io/ecma262/#sec-global-environment-records>
use crate::environment::declerative_environment_record::DeclerativeEnvironmentRecord;
use crate::environment::environment_record_trait::EnvironmentRecordTrait;
use crate::environment::lexical_environment::{Environment, EnvironmentType};
use crate::environment::object_environment_record::ObjectEnvironmentRecord;
use crate::js::value::{Value, ValueData};
use crate::{
environment::{
declerative_environment_record::DeclerativeEnvironmentRecord,
environment_record_trait::EnvironmentRecordTrait,
lexical_environment::{Environment, EnvironmentType},
object_environment_record::ObjectEnvironmentRecord,
},
js::value::{Value, ValueData},
};
use gc::Gc;
use gc_derive::{Finalize, Trace};
use std::collections::HashSet;
#[derive(Debug, Trace, Finalize, Clone)]

15
src/lib/environment/object_environment_record.rs

@ -6,11 +6,18 @@
//! Property keys that are not strings in the form of an `IdentifierName` are not included in the set of bound identifiers.
//! More info: [Object Records](https://tc39.github.io/ecma262/#sec-object-environment-records)
use crate::environment::environment_record_trait::EnvironmentRecordTrait;
use crate::environment::lexical_environment::{Environment, EnvironmentType};
use crate::js::object::Property;
use crate::js::value::{Value, ValueData};
use crate::{
environment::{
environment_record_trait::EnvironmentRecordTrait,
lexical_environment::{Environment, EnvironmentType},
},
js::{
object::Property,
value::{Value, ValueData},
},
};
use gc::Gc;
use gc_derive::{Finalize, Trace};
#[derive(Debug, Trace, Finalize, Clone)]
pub struct ObjectEnvironmentRecord {

28
src/lib/exec.rs

@ -1,11 +1,19 @@
use crate::environment::lexical_environment::{new_function_environment, LexicalEnvironment};
use crate::js::function::{Function, RegularFunction};
use crate::js::object::{INSTANCE_PROTOTYPE, PROTOTYPE};
use crate::js::value::{from_value, to_value, ResultValue, ValueData};
use crate::js::{array, console, function, json, math, object, string};
use crate::syntax::ast::constant::Const;
use crate::syntax::ast::expr::{Expr, ExprDef};
use crate::syntax::ast::op::{BinOp, BitOp, CompOp, LogOp, NumOp, UnaryOp};
use crate::{
environment::lexical_environment::{new_function_environment, LexicalEnvironment},
js::{
array, console, function,
function::{Function, RegularFunction},
json, math, object,
object::{INSTANCE_PROTOTYPE, PROTOTYPE},
string,
value::{from_value, to_value, ResultValue, ValueData},
},
syntax::ast::{
constant::Const,
expr::{Expr, ExprDef},
op::{BinOp, BitOp, CompOp, LogOp, NumOp, UnaryOp},
},
};
use gc::{Gc, GcCell};
use std::borrow::Borrow;
@ -102,7 +110,7 @@ impl Executor for Interpreter {
ValueData::Function(ref inner_func) => match *inner_func.as_ref().borrow() {
Function::NativeFunc(ref ntv) => {
let func = ntv.data;
func(this, self.run(callee)?, v_args)
func(&this, &v_args, &self)
}
Function::RegularFunc(ref data) => {
let env = &mut self.environment;
@ -296,7 +304,7 @@ impl Executor for Interpreter {
ValueData::Function(ref inner_func) => match inner_func.clone().into_inner() {
Function::NativeFunc(ref ntv) => {
let func = ntv.data;
func(this, self.run(callee)?, v_args)
func(&this, &v_args, &self)
}
Function::RegularFunc(ref data) => {
// Create new scope

75
src/lib/js/array.rs

@ -1,11 +1,16 @@
use crate::js::function::NativeFunctionData;
use crate::js::object::{Property, PROTOTYPE};
use crate::js::value::{from_value, to_value, ResultValue, Value, ValueData};
use crate::{
exec::Interpreter,
js::{
function::NativeFunctionData,
object::{Property, PROTOTYPE},
value::{from_value, to_value, ResultValue, Value, ValueData},
},
};
use gc::Gc;
/// Utility function for creating array objects: `array_obj` can be any array with
/// prototype already set (it will be wiped and recreated from `array_contents`)
fn create_array_object(array_obj: Value, array_contents: Vec<Value>) -> ResultValue {
fn create_array_object(array_obj: &Value, array_contents: &[Value]) -> ResultValue {
let array_obj_ptr = array_obj.clone();
// Wipe existing contents of the array object
@ -15,15 +20,15 @@ fn create_array_object(array_obj: Value, array_contents: Vec<Value>) -> ResultVa
}
array_obj_ptr.set_field_slice("length", to_value(array_contents.len() as i32));
for (n, value) in array_contents.into_iter().enumerate() {
array_obj_ptr.set_field(n.to_string(), value);
for (n, value) in array_contents.iter().enumerate() {
array_obj_ptr.set_field(n.to_string(), value.clone());
}
Ok(array_obj_ptr)
}
/// Utility function which takes an existing array object and puts additional
/// values on the end, correctly rewriting the length
fn add_to_array_object(array_ptr: Value, add_values: Vec<Value>) -> ResultValue {
fn add_to_array_object(array_ptr: &Value, add_values: &[Value]) -> ResultValue {
let orig_length: i32 = from_value(array_ptr.get_field_slice("length")).unwrap();
for (n, value) in add_values.iter().enumerate() {
@ -33,18 +38,18 @@ fn add_to_array_object(array_ptr: Value, add_values: Vec<Value>) -> ResultValue
array_ptr.set_field_slice("length", to_value(orig_length + add_values.len() as i32));
Ok(array_ptr)
Ok(array_ptr.clone())
}
/// Create a new array
pub fn make_array(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn make_array(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
// Make a new Object which will internally represent the Array (mapping
// between indices and values): this creates an Object with no prototype
this.set_field_slice("length", to_value(0_i32));
match args.len() {
0 => create_array_object(this, Vec::new()),
0 => create_array_object(this, &[]),
1 => {
let array = create_array_object(this, Vec::new()).unwrap();
let array = create_array_object(this, &[]).unwrap();
let size: i32 = from_value(args[0].clone()).unwrap();
array.set_field_slice("length", to_value(size));
Ok(array)
@ -54,7 +59,7 @@ pub fn make_array(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
}
/// Get an array's length
pub fn get_array_length(this: Value, _: Value, _: Vec<Value>) -> ResultValue {
pub fn get_array_length(this: &Value, _: &[Value], _: &Interpreter) -> ResultValue {
// Access the inner hash map which represents the actual Array contents
// (mapping between indices and values)
Ok(this.get_field_slice("length"))
@ -66,10 +71,10 @@ pub fn get_array_length(this: Value, _: Value, _: Vec<Value>) -> ResultValue {
/// array containing the array elements of the object followed by the array
/// elements of each argument in order.
/// <https://tc39.es/ecma262/#sec-array.prototype.concat>
pub fn concat(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn concat(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
if args.is_empty() {
// If concat is called with no arguments, it returns the original array
return Ok(this);
return Ok(this.clone());
}
// Make a new array (using this object as the prototype basis for the new
@ -88,7 +93,7 @@ pub fn concat(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
}
}
create_array_object(this, new_values)
create_array_object(this, &new_values)
}
/// Array.prototype.push ( ...items )
@ -97,7 +102,7 @@ pub fn concat(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
/// they appear. The new length of the array is returned as the result of the
/// call.
/// <https://tc39.es/ecma262/#sec-array.prototype.push>
pub fn push(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn push(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
let new_array = add_to_array_object(this, args)?;
Ok(new_array.get_field_slice("length"))
}
@ -106,7 +111,7 @@ pub fn push(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
///
/// The last element of the array is removed from the array and returned.
/// <https://tc39.es/ecma262/#sec-array.prototype.pop>
pub fn pop(this: Value, _: Value, _: Vec<Value>) -> ResultValue {
pub fn pop(this: &Value, _: &[Value], _: &Interpreter) -> ResultValue {
let curr_length: i32 = from_value(this.get_field_slice("length")).unwrap();
if curr_length < 1 {
return Err(to_value(
@ -126,7 +131,7 @@ pub fn pop(this: Value, _: Value, _: Vec<Value>) -> ResultValue {
/// then concatenated, separated by occurrences of the separator. If no
/// separator is provided, a single comma is used as the separator.
/// <https://tc39.es/ecma262/#sec-array.prototype.join>
pub fn join(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn join(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
let separator = if args.is_empty() {
String::from(",")
} else {
@ -147,8 +152,8 @@ pub fn join(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
///
/// The elements of the array are rearranged so as to reverse their order.
/// The object is returned as the result of the call.
/// https://tc39.es/ecma262/#sec-array.prototype.reverse
pub fn reverse(this: Value, _: Value, _: Vec<Value>) -> ResultValue {
/// <https://tc39.es/ecma262/#sec-array.prototype.reverse/>
pub fn reverse(this: &Value, _: &[Value], _: &Interpreter) -> ResultValue {
let len: i32 = from_value(this.get_field_slice("length")).unwrap();
let middle: i32 = len / 2;
@ -173,18 +178,18 @@ pub fn reverse(this: Value, _: Value, _: Vec<Value>) -> ResultValue {
}
}
Ok(this)
Ok(this.clone())
}
/// Array.prototype.shift ( )
///
/// The first element of the array is removed from the array and returned.
/// https://tc39.es/ecma262/#sec-array.prototype.shift
pub fn shift(this: Value, _: Value, _: Vec<Value>) -> ResultValue {
/// <https://tc39.es/ecma262/#sec-array.prototype.shift/>
pub fn shift(this: &Value, _: &[Value], _: &Interpreter) -> ResultValue {
let len: i32 = from_value(this.get_field_slice("length")).unwrap();
if len == 0 {
this.set_field_slice("length", to_value(0i32));
this.set_field_slice("length", to_value(0_i32));
// Since length is 0, this will be an Undefined value
return Ok(this.get_field(&0.to_string()));
}
@ -214,30 +219,30 @@ pub fn shift(this: Value, _: Value, _: Vec<Value>) -> ResultValue {
/// The arguments are prepended to the start of the array, such that their order
/// within the array is the same as the order in which they appear in the
/// argument list.
/// https://tc39.es/ecma262/#sec-array.prototype.unshift
pub fn unshift(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
/// <https://tc39.es/ecma262/#sec-array.prototype.unshift/>
pub fn unshift(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
let len: i32 = from_value(this.get_field_slice("length")).unwrap();
let argc: i32 = args.len() as i32;
let arg_c: i32 = args.len() as i32;
if argc > 0 {
if arg_c > 0 {
for k in (1..=len).rev() {
let from = (k - 1).to_string();
let to = (k + argc - 1).to_string();
let to = (k + arg_c - 1).to_string();
let from_value = this.get_field(&from);
if from_value != Gc::new(ValueData::Undefined) {
this.set_field(to, from_value);
} else {
if from_value == Gc::new(ValueData::Undefined) {
this.remove_prop(&to);
} else {
this.set_field(to, from_value);
}
}
for j in 0..argc {
for j in 0..arg_c {
this.set_field_slice(&j.to_string(), args[j as usize].clone());
}
}
this.set_field_slice("length", to_value(len + argc));
Ok(to_value(len + argc))
this.set_field_slice("length", to_value(len + arg_c));
Ok(to_value(len + arg_c))
}
/// Create a new `Array` object

5
src/lib/js/console.rs

@ -1,3 +1,4 @@
use crate::exec::Interpreter;
use crate::js::function::NativeFunctionData;
use crate::js::object::INSTANCE_PROTOTYPE;
use crate::js::value::{from_value, to_value, ResultValue, Value, ValueData};
@ -8,7 +9,7 @@ use std::iter::FromIterator;
/// Print a javascript value to the standard output stream
/// <https://console.spec.whatwg.org/#logger>
pub fn log(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn log(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
let args: Vec<String> = FromIterator::from_iter(args.iter().map(|x| {
// Welcome to console.log! The output here is what the developer sees, so its best matching through value types and stringifying to the correct output
// The input is a vector of Values, we generate a vector of strings then pass them to println!
@ -49,7 +50,7 @@ pub fn log(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
Ok(Gc::new(ValueData::Undefined))
}
/// Print a javascript value to the standard error stream
pub fn error(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn error(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
let args: Vec<String> = FromIterator::from_iter(
args.iter()
.map(|x| from_value::<String>(x.clone()).unwrap()),

15
src/lib/js/error.rs

@ -1,17 +1,22 @@
use crate::js::function::NativeFunctionData;
use crate::js::object::PROTOTYPE;
use crate::js::value::{to_value, ResultValue, Value, ValueData};
use crate::{
exec::Interpreter,
js::{
function::NativeFunctionData,
object::PROTOTYPE,
value::{to_value, ResultValue, Value, ValueData},
},
};
use gc::Gc;
/// Create a new error
pub fn make_error(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn make_error(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
if !args.is_empty() {
this.set_field_slice("message", to_value(args.get(0).unwrap().to_string()));
}
Ok(Gc::new(ValueData::Undefined))
}
/// Get the string representation of the error
pub fn to_string(this: Value, _: Value, _: Vec<Value>) -> ResultValue {
pub fn to_string(this: &Value, _: &[Value], _: &Interpreter) -> ResultValue {
let name = this.get_field_slice("name");
let message = this.get_field_slice("message");
Ok(to_value(format!("{}: {}", name, message).to_string()))

32
src/lib/js/function.rs

@ -1,10 +1,17 @@
use crate::js::object::{ObjectData, Property};
use crate::js::value::{to_value, ResultValue, Value, ValueData};
use crate::syntax::ast::expr::Expr;
use gc::Gc;
use crate::{
exec::Interpreter,
js::{
object::{ObjectData, Property},
value::{to_value, ResultValue, Value, ValueData},
},
syntax::ast::expr::Expr,
};
use gc::{custom_trace, Gc};
use gc_derive::{Finalize, Trace};
use std::fmt::{self, Debug};
/// fn(this, callee, arguments)
pub type NativeFunctionData = fn(Value, Value, Vec<Value>) -> ResultValue;
/// fn(this, arguments, ctx)
pub type NativeFunctionData = fn(&Value, &[Value], &Interpreter) -> ResultValue;
/// A Javascript function
/// A member of the Object type that may be invoked as a subroutine
@ -43,7 +50,7 @@ impl RegularFunction {
}
}
#[derive(Trace, Finalize, Debug, Clone)]
#[derive(Finalize, Clone)]
/// Represents a native javascript function in memory
pub struct NativeFunction {
/// The fields associated with the function
@ -51,6 +58,7 @@ pub struct NativeFunction {
/// The callable function data
pub data: NativeFunctionData,
}
impl NativeFunction {
/// Make a new native function with the given function data
pub fn new(data: NativeFunctionData) -> Self {
@ -59,6 +67,16 @@ impl NativeFunction {
}
}
impl Debug for NativeFunction {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "({:?})", self.object)
}
}
unsafe impl gc::Trace for NativeFunction {
custom_trace!(this, mark(&this.object));
}
/// Create a new `Function` object
pub fn _create() -> Value {
let function: ObjectData = ObjectData::default();

5
src/lib/js/json.rs

@ -1,3 +1,4 @@
use crate::exec::Interpreter;
use crate::js::function::NativeFunctionData;
/// The JSON Object
/// <https://tc39.github.io/ecma262/#sec-json-object>
@ -6,14 +7,14 @@ use serde_json::{self, to_string_pretty, Value as JSONValue};
/// Parse a JSON string into a Javascript object
/// <https://tc39.github.io/ecma262/#sec-json.parse>
pub fn parse(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn parse(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
match serde_json::from_str::<JSONValue>(&args.get(0).unwrap().clone().to_string()) {
Ok(json) => Ok(to_value(json)),
Err(err) => Err(to_value(err.to_string())),
}
}
/// Process a Javascript object into a JSON string
pub fn stringify(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn stringify(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
let obj = args.get(0).unwrap();
let json = obj.to_json();
Ok(to_value(to_string_pretty(&json).unwrap()))

51
src/lib/js/math.rs

@ -1,12 +1,15 @@
use crate::js::{
function::NativeFunctionData,
value::{from_value, to_value, ResultValue, Value, ValueData},
use crate::{
exec::Interpreter,
js::{
function::NativeFunctionData,
value::{from_value, to_value, ResultValue, Value, ValueData},
},
};
use rand::random;
use std::f64;
/// Get the absolute value of a number
pub fn abs(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn abs(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
Ok(to_value(if args.is_empty() {
f64::NAN
} else {
@ -16,7 +19,7 @@ pub fn abs(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
}))
}
/// Get the arccos of a number
pub fn acos(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn acos(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
Ok(to_value(if args.is_empty() {
f64::NAN
} else {
@ -26,7 +29,7 @@ pub fn acos(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
}))
}
/// Get the arcsine of a number
pub fn asin(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn asin(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
Ok(to_value(if args.is_empty() {
f64::NAN
} else {
@ -36,7 +39,7 @@ pub fn asin(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
}))
}
/// Get the arctangent of a number
pub fn atan(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn atan(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
Ok(to_value(if args.is_empty() {
f64::NAN
} else {
@ -46,7 +49,7 @@ pub fn atan(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
}))
}
/// Get the arctangent of a numbers
pub fn atan2(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn atan2(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
Ok(to_value(if args.is_empty() {
f64::NAN
} else {
@ -56,7 +59,7 @@ pub fn atan2(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
}))
}
/// Get the cubic root of a number
pub fn cbrt(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn cbrt(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
Ok(to_value(if args.is_empty() {
f64::NAN
} else {
@ -66,7 +69,7 @@ pub fn cbrt(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
}))
}
/// Get lowest integer above a number
pub fn ceil(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn ceil(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
Ok(to_value(if args.is_empty() {
f64::NAN
} else {
@ -76,7 +79,7 @@ pub fn ceil(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
}))
}
/// Get the cosine of a number
pub fn cos(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn cos(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
Ok(to_value(if args.is_empty() {
f64::NAN
} else {
@ -86,7 +89,7 @@ pub fn cos(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
}))
}
/// Get the power to raise the natural logarithm to get the number
pub fn exp(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn exp(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
Ok(to_value(if args.is_empty() {
f64::NAN
} else {
@ -96,7 +99,7 @@ pub fn exp(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
}))
}
/// Get the highest integer below a number
pub fn floor(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn floor(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
Ok(to_value(if args.is_empty() {
f64::NAN
} else {
@ -106,7 +109,7 @@ pub fn floor(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
}))
}
/// Get the natural logarithm of a number
pub fn log(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn log(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
Ok(to_value(if args.is_empty() {
f64::NAN
} else {
@ -116,25 +119,25 @@ pub fn log(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
}))
}
/// Get the maximum of several numbers
pub fn max(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn max(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
let mut max = f64::NEG_INFINITY;
for arg in &args {
for arg in args {
let num = arg.to_num();
max = max.max(num);
}
Ok(to_value(max))
}
/// Get the minimum of several numbers
pub fn min(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn min(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
let mut max = f64::INFINITY;
for arg in &args {
for arg in args {
let num = arg.to_num();
max = max.min(num);
}
Ok(to_value(max))
}
/// Raise a number to a power
pub fn pow(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn pow(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
Ok(to_value(if args.len() >= 2 {
let num: f64 = from_value(args.get(0).unwrap().clone()).unwrap();
let power: f64 = from_value(args.get(1).unwrap().clone()).unwrap();
@ -144,11 +147,11 @@ pub fn pow(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
}))
}
/// Generate a random floating-point number between 0 and 1
pub fn _random(_: Value, _: Value, _args: Vec<Value>) -> ResultValue {
pub fn _random(_: &Value, _: &[Value], _: &Interpreter) -> ResultValue {
Ok(to_value(random::<f64>()))
}
/// Round a number to the nearest integer
pub fn round(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn round(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
Ok(to_value(if args.is_empty() {
f64::NAN
} else {
@ -158,7 +161,7 @@ pub fn round(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
}))
}
/// Get the sine of a number
pub fn sin(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn sin(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
Ok(to_value(if args.is_empty() {
f64::NAN
} else {
@ -168,7 +171,7 @@ pub fn sin(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
}))
}
/// Get the square root of a number
pub fn sqrt(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn sqrt(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
Ok(to_value(if args.is_empty() {
f64::NAN
} else {
@ -178,7 +181,7 @@ pub fn sqrt(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
}))
}
/// Get the tangent of a number
pub fn tan(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn tan(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
Ok(to_value(if args.is_empty() {
f64::NAN
} else {

22
src/lib/js/object.rs

@ -1,8 +1,12 @@
use crate::js::{
function::NativeFunctionData,
value::{from_value, to_value, FromValue, ResultValue, ToValue, Value, ValueData},
use crate::{
exec::Interpreter,
js::{
function::NativeFunctionData,
value::{from_value, to_value, FromValue, ResultValue, ToValue, Value, ValueData},
},
};
use gc::Gc;
use gc_derive::{Finalize, Trace};
use std::collections::HashMap;
/// Static `prototype`, usually set on constructors as a key to point to their respective prototype object.
@ -106,18 +110,18 @@ impl FromValue for Property {
}
/// Create a new object
pub fn make_object(_: Value, _: Value, _args: Vec<Value>) -> ResultValue {
pub fn make_object(_: &Value, _: &[Value], _: &Interpreter) -> ResultValue {
Ok(Gc::new(ValueData::Undefined))
}
/// Get the prototype of an object
pub fn get_proto_of(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn get_proto_of(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
let obj = args.get(0).unwrap();
Ok(obj.get_field_slice(INSTANCE_PROTOTYPE))
}
/// Set the prototype of an object
pub fn set_proto_of(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn set_proto_of(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
let obj = args.get(0).unwrap().clone();
let proto = args.get(1).unwrap().clone();
obj.set_field_slice(INSTANCE_PROTOTYPE, proto);
@ -125,7 +129,7 @@ pub fn set_proto_of(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
}
/// Define a property in an object
pub fn define_prop(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn define_prop(_: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
let obj = args.get(0).unwrap();
let prop = from_value::<String>(args.get(1).unwrap().clone()).unwrap();
let desc = from_value::<Property>(args.get(2).unwrap().clone()).unwrap();
@ -134,12 +138,12 @@ pub fn define_prop(_: Value, _: Value, args: Vec<Value>) -> ResultValue {
}
/// To string
pub fn to_string(this: Value, _: Value, _: Vec<Value>) -> ResultValue {
pub fn to_string(this: &Value, _: &[Value], _: &Interpreter) -> ResultValue {
Ok(to_value(this.to_string()))
}
/// Check if it has a property
pub fn has_own_prop(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn has_own_prop(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
let prop = if args.is_empty() {
None
} else {

108
src/lib/js/string.rs

@ -1,9 +1,13 @@
use crate::js::{
function::NativeFunctionData,
object::{Property, PROTOTYPE},
value::{from_value, to_value, ResultValue, Value, ValueData},
use crate::{
exec::Interpreter,
js::{
function::NativeFunctionData,
object::{Property, PROTOTYPE},
value::{from_value, to_value, ResultValue, Value, ValueData},
},
};
use gc::Gc;
use gc_derive::{Finalize, Trace};
use std::{
cmp::{max, min},
f64::NAN,
@ -12,24 +16,24 @@ use std::{
/// Create new string
/// <https://searchfox.org/mozilla-central/source/js/src/vm/StringObject.h#19>
// This gets called when a new String() is created, it's called by exec:346
pub fn make_string(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn make_string(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
// If we're constructing a string, we should set the initial length
// To do this we need to convert the string back to a Rust String, then get the .len()
// let a: String = from_value(args[0].clone()).unwrap();
// this.set_field_slice("length", to_value(a.len() as i32));
this.set_internal_slot("PrimitiveValue", args[0].clone());
Ok(this)
Ok(this.clone())
}
/// Get a string's length
pub fn get_string_length(this: Value, _: Value, _: Vec<Value>) -> ResultValue {
pub fn get_string_length(this: &Value, _: &[Value], _: &Interpreter) -> ResultValue {
let this_str: String = from_value(this.get_internal_slot("PrimitiveValue")).unwrap();
Ok(to_value::<i32>(this_str.chars().count() as i32))
}
/// Get the string value to a primitive string
pub fn to_string(this: Value, _: Value, _: Vec<Value>) -> ResultValue {
pub fn to_string(this: &Value, _: &[Value], _: &Interpreter) -> ResultValue {
// Get String from String Object and send it back as a new value
let primitive_val = this.get_internal_slot("PrimitiveValue");
Ok(to_value(format!("{}", primitive_val).to_string()))
@ -39,7 +43,7 @@ pub fn to_string(this: Value, _: Value, _: Vec<Value>) -> ResultValue {
/// resulting from converting this object to a String. If there is no element at that index, the
/// result is the empty String. The result is a String value, not a String object.
/// <https://tc39.github.io/ecma262/#sec-string.prototype.charat>
pub fn char_at(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn char_at(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
// ^^ represents instance ^^ represents arguments (we only care about the first one in this case)
// First we get it the actual string a private field stored on the object only the engine has access to.
// Then we convert it into a Rust String by wrapping it in from_value
@ -66,7 +70,7 @@ pub fn char_at(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
/// unit at index pos within the String resulting from converting this object to a String. If there
/// is no element at that index, the result is NaN.
/// <https://tc39.github.io/ecma262/#sec-string.prototype.charcodeat>
pub fn char_code_at(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn char_code_at(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
// ^^ represents instance ^^ represents arguments (we only care about the first one in this case)
// First we get it the actual string a private field stored on the object only the engine has access to.
// Then we convert it into a Rust String by wrapping it in from_value
@ -90,7 +94,7 @@ pub fn char_code_at(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
/// Returns a String that is the result of concatenating this String and all strings provided as
/// arguments
/// <https://tc39.github.io/ecma262/#sec-string.prototype.concat>
pub fn concat(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn concat(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
// ^^ represents instance ^^ represents arguments
// First we get it the actual string a private field stored on the object only the engine has access to.
// Then we convert it into a Rust String by wrapping it in from_value
@ -99,7 +103,7 @@ pub fn concat(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
let mut new_str = primitive_val.clone();
for arg in args {
let concat_str: String = from_value(arg).unwrap();
let concat_str: String = from_value(arg.clone()).unwrap();
new_str.push_str(&concat_str);
}
@ -109,7 +113,7 @@ pub fn concat(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
/// Returns a String that is the result of repeating this String the number of times given by the
/// first argument
/// <https://tc39.github.io/ecma262/#sec-string.prototype.repeat>
pub fn repeat(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn repeat(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
// ^^ represents instance ^^ represents arguments (only care about the first one in this case)
// First we get it the actual string a private field stored on the object only the engine has access to.
// Then we convert it into a Rust String by wrapping it in from_value
@ -122,7 +126,7 @@ pub fn repeat(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
/// Returns a String which contains the slice of the JS String from character at "start" index up
/// to but not including character at "end" index
/// <https://tc39.github.io/ecma262/#sec-string.prototype.slice>
pub fn slice(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn slice(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
// ^^ represents instance ^^ represents arguments)
// First we get it the actual string a private field stored on the object only the engine has access to.
// Then we convert it into a Rust String by wrapping it in from_value
@ -159,7 +163,7 @@ pub fn slice(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
/// "search string" is the same as the corresponding code units of this string
/// starting at index "position"
/// <https://tc39.github.io/ecma262/#sec-string.prototype.startswith>
pub fn starts_with(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn starts_with(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
// ^^ represents instance ^^ represents arguments)
// First we get it the actual string a private field stored on the object only the engine has access to.
// Then we convert it into a Rust String by wrapping it in from_value
@ -194,7 +198,7 @@ pub fn starts_with(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
/// "search string" is the same as the corresponding code units of this string
/// starting at position "end position" - length
/// <https://tc39.github.io/ecma262/#sec-string.prototype.endswith>
pub fn ends_with(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn ends_with(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
// ^^ represents instance ^^ represents arguments)
// First we get it the actual string a private field stored on the object only the engine has access to.
// Then we convert it into a Rust String by wrapping it in from_value
@ -231,7 +235,7 @@ pub fn ends_with(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
/// that are greater than or equal to position. If position is undefined, 0 is
/// assumed, so as to search all of the String.
/// <https://tc39.github.io/ecma262/#sec-string.prototype.includes>
pub fn includes(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn includes(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
// ^^ represents instance ^^ represents arguments)
// First we get it the actual string a private field stored on the object only the engine has access to.
// Then we convert it into a Rust String by wrapping it in from_value
@ -263,7 +267,7 @@ pub fn includes(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
/// returned. If position is undefined, 0 is assumed, so as to search all of the
/// String.
/// <https://tc39.github.io/ecma262/#sec-string.prototype.includes>
pub fn index_of(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn index_of(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
// ^^ represents instance ^^ represents arguments)
// First we get it the actual string a private field stored on the object only the engine has access to.
// Then we convert it into a Rust String by wrapping it in from_value
@ -304,7 +308,7 @@ pub fn index_of(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
/// returned. If position is undefined, the length of the String value is
/// assumed, so as to search all of the String.
/// <https://tc39.github.io/ecma262/#sec-string.prototype.lastindexof>
pub fn last_index_of(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
pub fn last_index_of(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
// ^^ represents instance ^^ represents arguments)
// First we get it the actual string a private field stored on the object only the engine has access to.
// Then we convert it into a Rust String by wrapping it in from_value
@ -340,9 +344,9 @@ pub fn last_index_of(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
Ok(to_value(highest_index))
}
/// Abstract method StringPad
/// Abstract method `StringPad`
/// Performs the actual string padding for padStart/End.
/// https://tc39.es/ecma262/#sec-stringpad
/// <https://tc39.es/ecma262/#sec-stringpad/>
fn string_pad(
primitive: String,
max_length: i32,
@ -384,8 +388,8 @@ fn string_pad(
///
/// Pads the string with the given filler at the end of the string.
/// Filler defaults to single space.
/// https://tc39.es/ecma262/#sec-string.prototype.padend
pub fn pad_end(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
/// <https://tc39.es/ecma262/#sec-string.prototype.padend/>
pub fn pad_end(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
let primitive_val: String = from_value(this.get_internal_slot("PrimitiveValue")).unwrap();
if args.is_empty() {
return Err(to_value("padEnd requires maxLength argument"));
@ -403,8 +407,8 @@ pub fn pad_end(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
///
/// Pads the string with the given filler at the start of the string.
/// Filler defaults to single space.
/// https://tc39.es/ecma262/#sec-string.prototype.padstart
pub fn pad_start(this: Value, _: Value, args: Vec<Value>) -> ResultValue {
/// <https://tc39.es/ecma262/#sec-string.prototype.padstart/>
pub fn pad_start(this: &Value, args: &[Value], _: &Interpreter) -> ResultValue {
let primitive_val: String = from_value(this.get_internal_slot("PrimitiveValue")).unwrap();
if args.is_empty() {
return Err(to_value("padStart requires maxLength argument"));
@ -436,19 +440,19 @@ fn is_trimmable_whitespace(c: char) -> bool {
}
}
pub fn trim(this: Value, _: Value, _: Vec<Value>) -> ResultValue {
pub fn trim(this: &Value, _: &[Value], _: &Interpreter) -> ResultValue {
let this_str: String = from_value(this.get_internal_slot("PrimitiveValue")).unwrap();
Ok(to_value(this_str.trim_matches(is_trimmable_whitespace)))
}
pub fn trim_start(this: Value, _: Value, _: Vec<Value>) -> ResultValue {
pub fn trim_start(this: &Value, _: &[Value], _: &Interpreter) -> ResultValue {
let this_str: String = from_value(this.get_internal_slot("PrimitiveValue")).unwrap();
Ok(to_value(
this_str.trim_start_matches(is_trimmable_whitespace),
))
}
pub fn trim_end(this: Value, _: Value, _: Vec<Value>) -> ResultValue {
pub fn trim_end(this: &Value, _: &[Value], _: &Interpreter) -> ResultValue {
let this_str: String = from_value(this.get_internal_slot("PrimitiveValue")).unwrap();
Ok(to_value(this_str.trim_end_matches(is_trimmable_whitespace)))
}
@ -504,30 +508,30 @@ mod tests {
}
#[test]
fn length() {
//TEST262: https://github.com/tc39/test262/blob/master/test/built-ins/String/length.js
let mut engine = Executor::new();
let init = r#"
const a = new String(' ');
const b = new String('\ud834\udf06');
const c = new String(' \b ');
cosnt d = new String('')
"#;
forward(&mut engine, init);
let a = forward(&mut engine, "a.length");
assert_eq!(a, String::from("1"));
let b = forward(&mut engine, "b.length");
// TODO: fix this
// unicode surrogate pair length should be 1
// utf16/usc2 length should be 2
// utf8 length should be 4
//assert_eq!(b, String::from("2"));
let c = forward(&mut engine, "c.length");
assert_eq!(c, String::from("3"));
let d = forward(&mut engine, "d.length");
assert_eq!(d, String::from("4"));
}
// TODO: re-enable when getProperty() is finished;
// fn length() {
// //TEST262: https://github.com/tc39/test262/blob/master/test/built-ins/String/length.js
// let mut engine = Executor::new();
// let init = r#"
// const a = new String(' ');
// const b = new String('\ud834\udf06');
// const c = new String(' \b ');
// cosnt d = new String('中文长度')
// "#;
// forward(&mut engine, init);
// let a = forward(&mut engine, "a.length");
// assert_eq!(a, String::from("1"));
// let b = forward(&mut engine, "b.length");
// // TODO: fix this
// // unicode surrogate pair length should be 1
// // utf16/usc2 length should be 2
// // utf8 length should be 4
// //assert_eq!(b, String::from("2"));
// let c = forward(&mut engine, "c.length");
// assert_eq!(c, String::from("3"));
// let d = forward(&mut engine, "d.length");
// assert_eq!(d, String::from("4"));
// }
#[test]
fn concat() {
let mut engine = Executor::new();

20
src/lib/js/value.rs

@ -3,6 +3,7 @@ use crate::js::{
object::{ObjectData, Property, INSTANCE_PROTOTYPE, PROTOTYPE},
};
use gc::{Gc, GcCell};
use gc_derive::{Finalize, Trace};
use serde_json::{map::Map, Number as JSONNumber, Value as JSONValue};
use std::{
f64::NAN,
@ -65,8 +66,8 @@ impl ValueData {
/// This will tell us if we can exten an object or not, not properly implemented yet, for now always returns true
/// For scalar types it should be false, for objects check the private field for extensibilaty. By default true
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/seal would turn extensible to false
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze would also turn extensible to false
/// <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/seal would turn extensible to false/>
/// <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze would also turn extensible to false/>
pub fn is_extensible(&self) -> bool {
true
}
@ -279,16 +280,8 @@ impl ValueData {
// If the Property has [[Get]] set to a function, we should run that and return the Value
let prop_getter = match *prop.get {
ValueData::Function(ref v) => match *v.borrow() {
Function::NativeFunc(ref ntv) => {
let func = ntv.data;
Some(
func(
Gc::new(self.clone()),
Gc::new(self.clone()),
vec![Gc::new(self.clone())],
)
.unwrap(),
)
Function::NativeFunc(ref _ntv) => {
None // this never worked properly anyway
}
_ => None,
},
@ -416,7 +409,7 @@ impl ValueData {
pub fn to_json(&self) -> JSONValue {
match *self {
ValueData::Null | ValueData::Undefined => JSONValue::Null,
ValueData::Null | ValueData::Undefined | ValueData::Function(_) => JSONValue::Null,
ValueData::Boolean(b) => JSONValue::Bool(b),
ValueData::Object(ref obj) => {
let mut new_obj = Map::new();
@ -430,7 +423,6 @@ impl ValueData {
ValueData::String(ref str) => JSONValue::String(str.clone()),
ValueData::Number(num) => JSONValue::Number(JSONNumber::from_f64(num).unwrap()),
ValueData::Integer(val) => JSONValue::Number(JSONNumber::from(val)),
ValueData::Function(_) => JSONValue::Null,
}
}

29
src/lib/lib.rs

@ -13,29 +13,28 @@
// Debug trait derivation will show an error if forbidden.
#![deny(unused_qualifications)]
#![deny(clippy::all)]
#![warn(clippy::pedantic)]
#![warn(
clippy::pedantic,
clippy::restriction,
clippy::cognitive_complexity,
//missing_docs
)]
#![allow(
unsafe_code,
clippy::many_single_char_names,
clippy::unreadable_literal,
clippy::excessive_precision,
clippy::module_name_repetitions,
clippy::pub_enum_variant_names,
clippy::cognitive_complexity
clippy::missing_docs_in_private_items,
clippy::missing_inline_in_public_items,
clippy::implicit_return,
clippy::wildcard_enum_match_arm
)]
#[macro_use]
extern crate gc_derive;
pub mod environment;
pub mod exec;
pub mod js;
pub mod syntax;
use crate::exec::{Executor, Interpreter};
use crate::syntax::ast::expr::Expr;
use crate::syntax::lexer::Lexer;
use crate::syntax::parser::Parser;
use crate::{
exec::{Executor, Interpreter},
syntax::{ast::expr::Expr, lexer::Lexer, parser::Parser},
};
use wasm_bindgen::prelude::*;
#[wasm_bindgen]

1
src/lib/syntax/ast/constant.rs

@ -1,3 +1,4 @@
use gc_derive::{Finalize, Trace};
use std::fmt::{Display, Formatter, Result};
#[derive(Clone, Debug, Trace, Finalize, PartialEq)]

1
src/lib/syntax/ast/expr.rs

@ -2,6 +2,7 @@ use crate::syntax::ast::{
constant::Const,
op::{BinOp, Operator, UnaryOp},
};
use gc_derive::{Finalize, Trace};
use std::{
collections::btree_map::BTreeMap,
fmt::{Display, Formatter, Result},

1
src/lib/syntax/ast/op.rs

@ -1,3 +1,4 @@
use gc_derive::{Finalize, Trace};
use std::fmt::{Display, Formatter, Result};
/// Represents an operator

1
src/lib/syntax/lexer.rs

@ -6,7 +6,6 @@ use crate::syntax::ast::{
punc::Punctuator,
token::{Token, TokenData},
};
use std::{
char::{decode_utf16, from_u32},
error, fmt,

4
tests/js/test.js

@ -1,2 +1,2 @@
let a = new String("iisiojdou");
a;
const a = new String("12345");
a.length;

420
yarn.lock

@ -2,6 +2,10 @@
# yarn lockfile v1
"@types/anymatch@*":
version "1.3.1"
resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.1.tgz#336badc1beecb9dacc38bea2cf32adf627a8421a"
"@types/events@*":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7"
@ -19,8 +23,28 @@
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
"@types/node@*":
version "12.0.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.0.7.tgz#4f2563bad652b2acb1722d7e7aae2b0ff62d192c"
version "12.6.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.6.2.tgz#a5ccec6abb6060d5f20d256fb03ed743e9774999"
"@types/tapable@*":
version "1.0.4"
resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.4.tgz#b4ffc7dc97b498c969b360a41eee247f82616370"
"@types/uglify-js@*":
version "3.0.4"
resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.0.4.tgz#96beae23df6f561862a830b4288a49e86baac082"
dependencies:
source-map "^0.6.1"
"@types/webpack@^4.4.31":
version "4.4.35"
resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.4.35.tgz#b7088eb2d471d5645e5503d272783cafa753583b"
dependencies:
"@types/anymatch" "*"
"@types/node" "*"
"@types/tapable" "*"
"@types/uglify-js" "*"
source-map "^0.6.0"
"@wasm-tool/wasm-pack-plugin@0.2.1":
version "0.2.1"
@ -177,25 +201,21 @@ accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7:
mime-types "~2.1.24"
negotiator "0.6.2"
acorn-dynamic-import@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz#482210140582a36b83c3e342e1cfebcaa9240948"
acorn@^6.0.5:
version "6.1.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.1.tgz#7d25ae05bb8ad1f9b699108e1094ecd7884adc1f"
acorn@^6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.2.0.tgz#67f0da2fc339d6cfb5d6fb244fd449f33cd8bbe3"
ajv-errors@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d"
ajv-keywords@^3.1.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.0.tgz#4b831e7b531415a7cc518cd404e73f6193c6349d"
version "3.4.1"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da"
ajv@^6.1.0:
version "6.10.0"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1"
version "6.10.2"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52"
dependencies:
fast-deep-equal "^2.0.1"
fast-json-stable-stringify "^2.0.0"
@ -218,7 +238,11 @@ ansi-regex@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
ansi-styles@^3.2.1:
ansi-regex@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
ansi-styles@^3.2.0, ansi-styles@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
dependencies:
@ -343,7 +367,7 @@ binary-extensions@^1.0.0:
version "1.13.1"
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65"
bluebird@^3.5.3:
bluebird@^3.5.5:
version "3.5.5"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f"
@ -497,20 +521,20 @@ bytes@3.1.0:
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"
cacache@^11.3.2:
version "11.3.2"
resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.2.tgz#2d81e308e3d258ca38125b676b98b2ac9ce69bfa"
version "11.3.3"
resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.3.tgz#8bd29df8c6a718a6ebd2d010da4d7972ae3bbadc"
dependencies:
bluebird "^3.5.3"
bluebird "^3.5.5"
chownr "^1.1.1"
figgy-pudding "^3.5.1"
glob "^7.1.3"
glob "^7.1.4"
graceful-fs "^4.1.15"
lru-cache "^5.1.1"
mississippi "^3.0.0"
mkdirp "^0.5.1"
move-concurrently "^1.0.1"
promise-inflight "^1.0.1"
rimraf "^2.6.2"
rimraf "^2.6.3"
ssri "^6.0.1"
unique-filename "^1.1.1"
y18n "^4.0.0"
@ -540,7 +564,7 @@ camelcase@^5.0.0:
version "5.3.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
chalk@^2.4.1:
chalk@2.4.2, chalk@^2.4.1:
version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
dependencies:
@ -567,8 +591,8 @@ chokidar@^2.0.2, chokidar@^2.1.6:
fsevents "^1.2.7"
chownr@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494"
version "1.1.2"
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.2.tgz#a18f1e0b269c8a6a5d3c86eb298beb14c3dd7bf6"
chrome-trace-event@^1.0.0:
version "1.0.2"
@ -598,6 +622,13 @@ clean-css@4.2.x:
dependencies:
source-map "~0.6.0"
clean-webpack-plugin@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/clean-webpack-plugin/-/clean-webpack-plugin-3.0.0.tgz#a99d8ec34c1c628a4541567aa7b457446460c62b"
dependencies:
"@types/webpack" "^4.4.31"
del "^4.1.1"
cliui@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49"
@ -606,6 +637,14 @@ cliui@^4.0.0:
strip-ansi "^4.0.0"
wrap-ansi "^2.0.0"
cliui@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5"
dependencies:
string-width "^3.1.0"
strip-ansi "^5.2.0"
wrap-ansi "^5.1.0"
code-point-at@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
@ -635,7 +674,7 @@ commander@2.17.x:
version "2.17.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf"
commander@^2.19.0:
commander@^2.20.0:
version "2.20.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422"
@ -782,7 +821,7 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
safe-buffer "^5.0.1"
sha.js "^2.4.8"
cross-spawn@^6.0.0, cross-spawn@^6.0.5:
cross-spawn@6.0.5, cross-spawn@^6.0.0:
version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
dependencies:
@ -1024,8 +1063,8 @@ ee-first@1.1.1:
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
elliptic@^6.0.0:
version "6.4.1"
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.1.tgz#c2d0b7776911b86722c632c3c06c60f2f819939a"
version "6.5.0"
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.0.tgz#2b8ed4c891b7de3200e14412a5b8248c7af505ca"
dependencies:
bn.js "^4.4.0"
brorand "^1.0.1"
@ -1035,6 +1074,10 @@ elliptic@^6.0.0:
minimalistic-assert "^1.0.0"
minimalistic-crypto-utils "^1.0.0"
emoji-regex@^7.0.1:
version "7.0.3"
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
emojis-list@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389"
@ -1049,7 +1092,7 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0:
dependencies:
once "^1.4.0"
enhanced-resolve@^4.1.0:
enhanced-resolve@4.1.0, enhanced-resolve@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f"
dependencies:
@ -1242,8 +1285,8 @@ faye-websocket@^0.10.0:
websocket-driver ">=0.5.1"
faye-websocket@~0.11.1:
version "0.11.1"
resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.1.tgz#f0efe18c4f56e4f40afc7e06c719fd5ee6188f38"
version "0.11.3"
resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e"
dependencies:
websocket-driver ">=0.5.1"
@ -1286,12 +1329,12 @@ find-up@^3.0.0:
dependencies:
locate-path "^3.0.0"
findup-sync@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc"
findup-sync@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1"
dependencies:
detect-file "^1.0.0"
is-glob "^3.1.0"
is-glob "^4.0.0"
micromatch "^3.0.4"
resolve-dir "^1.0.1"
@ -1380,6 +1423,10 @@ get-caller-file@^1.0.1:
version "1.0.3"
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a"
get-caller-file@^2.0.1:
version "2.0.5"
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
get-stream@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5"
@ -1397,7 +1444,7 @@ glob-parent@^3.1.0:
is-glob "^3.1.0"
path-dirname "^1.0.0"
glob@^7.0.3, glob@^7.1.2, glob@^7.1.3:
glob@^7.0.3, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4:
version "7.1.4"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
dependencies:
@ -1408,6 +1455,12 @@ glob@^7.0.3, glob@^7.1.2, glob@^7.1.3:
once "^1.3.0"
path-is-absolute "^1.0.0"
global-modules@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780"
dependencies:
global-prefix "^3.0.0"
global-modules@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea"
@ -1426,6 +1479,14 @@ global-prefix@^1.0.1:
is-windows "^1.0.1"
which "^1.2.14"
global-prefix@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97"
dependencies:
ini "^1.3.5"
kind-of "^6.0.2"
which "^1.3.1"
globby@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c"
@ -1448,8 +1509,8 @@ globby@^7.1.1:
slash "^1.0.0"
graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2:
version "4.1.15"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"
version "4.2.0"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b"
handle-thing@^2.0.0:
version "2.0.0"
@ -1584,7 +1645,7 @@ http-deceiver@^1.2.7:
version "1.2.7"
resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87"
http-errors@1.7.2, http-errors@~1.7.2:
http-errors@1.7.2:
version "1.7.2"
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f"
dependencies:
@ -1603,9 +1664,19 @@ http-errors@~1.6.2:
setprototypeof "1.1.0"
statuses ">= 1.4.0 < 2"
http-parser-js@>=0.4.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.0.tgz#d65edbede84349d0dc30320815a15d39cc3cbbd8"
http-errors@~1.7.2:
version "1.7.3"
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06"
dependencies:
depd "~1.1.2"
inherits "2.0.4"
setprototypeof "1.1.1"
statuses ">= 1.5.0 < 2"
toidentifier "1.0.0"
"http-parser-js@>=0.4.0 <0.4.11":
version "0.4.10"
resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.10.tgz#92c9c1374c35085f75db359ec56cc257cbb93fa4"
http-proxy-middleware@^0.19.1:
version "0.19.1"
@ -1652,7 +1723,7 @@ ignore@^3.3.5:
version "3.3.10"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043"
import-local@^2.0.0:
import-local@2.0.0, import-local@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d"
dependencies:
@ -1663,10 +1734,6 @@ imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
indexof@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d"
inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
@ -1674,15 +1741,19 @@ inflight@^1.0.4:
once "^1.3.0"
wrappy "1"
inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3:
version "2.0.4"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
inherits@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1"
ini@^1.3.4, ini@~1.3.0:
inherits@2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
ini@^1.3.4, ini@^1.3.5, ini@~1.3.0:
version "1.3.5"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
@ -1693,7 +1764,7 @@ internal-ip@^4.3.0:
default-gateway "^4.2.0"
ipaddr.js "^1.9.0"
interpret@^1.1.0:
interpret@1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296"
@ -1814,8 +1885,8 @@ is-number@^3.0.0:
kind-of "^3.0.2"
is-path-cwd@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.1.0.tgz#2e0c7e463ff5b7a0eb60852d851a6809347a124c"
version "2.2.0"
resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb"
is-path-in-cwd@^2.0.0:
version "2.1.0"
@ -1829,7 +1900,7 @@ is-path-inside@^2.1.0:
dependencies:
path-is-inside "^1.0.2"
is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4:
is-plain-object@^2.0.3, is-plain-object@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
dependencies:
@ -1933,6 +2004,14 @@ loader-runner@^2.3.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357"
loader-utils@1.2.3, loader-utils@^1.1.0, loader-utils@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7"
dependencies:
big.js "^5.2.2"
emojis-list "^2.0.0"
json5 "^1.0.1"
loader-utils@^0.2.16:
version "0.2.17"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348"
@ -1942,14 +2021,6 @@ loader-utils@^0.2.16:
json5 "^0.5.0"
object-assign "^4.0.1"
loader-utils@^1.1.0, loader-utils@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7"
dependencies:
big.js "^5.2.2"
emojis-list "^2.0.0"
json5 "^1.0.1"
locate-path@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e"
@ -1958,12 +2029,12 @@ locate-path@^3.0.0:
path-exists "^3.0.0"
lodash@^4.17.11, lodash@^4.17.3:
version "4.17.11"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
version "4.17.14"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba"
loglevel@^1.6.2:
version "1.6.2"
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.2.tgz#668c77948a03dbd22502a3513ace1f62a80cc372"
loglevel@^1.6.3:
version "1.6.3"
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.3.tgz#77f2eb64be55a404c9fd04ad16d57c1d6d6b1280"
lower-case@^1.1.1:
version "1.1.4"
@ -2135,8 +2206,8 @@ mississippi@^3.0.0:
through2 "^2.0.0"
mixin-deep@^1.2.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe"
version "1.3.2"
resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566"
dependencies:
for-in "^1.0.2"
is-extendable "^1.0.1"
@ -2232,8 +2303,8 @@ node-forge@0.7.5:
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.5.tgz#6c152c345ce11c52f465c2abd957e8639cd674df"
node-libs-browser@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.0.tgz#c72f60d9d46de08a940dedbb25f3ffa2f9bbaa77"
version "2.2.1"
resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425"
dependencies:
assert "^1.1.1"
browserify-zlib "^0.2.0"
@ -2245,7 +2316,7 @@ node-libs-browser@^2.0.0:
events "^3.0.0"
https-browserify "^1.0.0"
os-browserify "^0.3.0"
path-browserify "0.0.0"
path-browserify "0.0.1"
process "^0.11.10"
punycode "^1.2.4"
querystring-es3 "^0.2.0"
@ -2257,7 +2328,7 @@ node-libs-browser@^2.0.0:
tty-browserify "0.0.0"
url "^0.11.0"
util "^0.11.0"
vm-browserify "0.0.4"
vm-browserify "^1.0.1"
node-pre-gyp@^0.12.0:
version "0.12.0"
@ -2296,8 +2367,8 @@ npm-bundled@^1.0.1:
resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd"
npm-packlist@^1.1.6:
version "1.4.1"
resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.1.tgz#19064cdf988da80ea3cee45533879d90192bbfbc"
version "1.4.4"
resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.4.tgz#866224233850ac534b63d1a6e76050092b5d2f44"
dependencies:
ignore-walk "^3.0.1"
npm-bundled "^1.0.1"
@ -2402,7 +2473,7 @@ os-homedir@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
os-locale@^3.0.0:
os-locale@^3.0.0, os-locale@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a"
dependencies:
@ -2500,9 +2571,9 @@ pascalcase@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
path-browserify@0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a"
path-browserify@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a"
path-dirname@^1.0.0:
version "1.0.2"
@ -2573,8 +2644,8 @@ pkg-dir@^3.0.0:
find-up "^3.0.0"
portfinder@^1.0.20:
version "1.0.20"
resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.20.tgz#bea68632e54b2e13ab7b0c4775e9b41bf270e44a"
version "1.0.21"
resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.21.tgz#60e1397b95ac170749db70034ece306b9a27e324"
dependencies:
async "^1.5.2"
debug "^2.2.0"
@ -2584,10 +2655,6 @@ posix-character-classes@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
prettier@^1.17.0:
version "1.18.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea"
pretty-error@^2.0.2:
version "2.1.1"
resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3"
@ -2596,8 +2663,8 @@ pretty-error@^2.0.2:
utila "~0.4"
process-nextick-args@~2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
version "2.0.1"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
process@^0.11.10:
version "0.11.10"
@ -2783,6 +2850,10 @@ require-main-filename@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
require-main-filename@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b"
requires-port@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
@ -2816,7 +2887,7 @@ retry@^0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b"
rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3:
rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.3:
version "2.6.3"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
dependencies:
@ -2835,10 +2906,14 @@ run-queue@^1.0.0, run-queue@^1.0.3:
dependencies:
aproba "^1.1.1"
safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2:
version "5.2.0"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519"
safe-regex@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
@ -2876,8 +2951,8 @@ semver@^5.3.0, semver@^5.5.0, semver@^5.6.0:
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b"
semver@^6.1.1:
version "6.1.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.1.1.tgz#53f53da9b30b2103cd4f15eab3a18ecbcb210c9b"
version "6.2.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db"
send@0.17.1:
version "0.17.1"
@ -2926,18 +3001,9 @@ set-blocking@^2.0.0, set-blocking@~2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
set-value@^0.4.3:
version "0.4.3"
resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1"
dependencies:
extend-shallow "^2.0.1"
is-extendable "^0.1.1"
is-plain-object "^2.0.1"
to-object-path "^0.3.0"
set-value@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274"
set-value@^2.0.0, set-value@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b"
dependencies:
extend-shallow "^2.0.1"
is-extendable "^0.1.1"
@ -3040,7 +3106,7 @@ source-map-resolve@^0.5.0:
source-map-url "^0.4.0"
urix "^0.1.0"
source-map-support@~0.5.10:
source-map-support@~0.5.12:
version "0.5.12"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599"
dependencies:
@ -3146,6 +3212,14 @@ string-width@^1.0.1:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^4.0.0"
string-width@^3.0.0, string-width@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961"
dependencies:
emoji-regex "^7.0.1"
is-fullwidth-code-point "^2.0.0"
strip-ansi "^5.1.0"
string_decoder@^1.0.0, string_decoder@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d"
@ -3170,6 +3244,12 @@ strip-ansi@^4.0.0:
dependencies:
ansi-regex "^3.0.0"
strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
dependencies:
ansi-regex "^4.1.0"
strip-eof@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
@ -3178,15 +3258,15 @@ strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
supports-color@^5.3.0, supports-color@^5.5.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
supports-color@6.1.0, supports-color@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3"
dependencies:
has-flag "^3.0.0"
supports-color@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3"
supports-color@^5.3.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
dependencies:
has-flag "^3.0.0"
@ -3222,12 +3302,12 @@ terser-webpack-plugin@^1.1.0:
worker-farm "^1.7.0"
terser@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.0.0.tgz#ef356f6f359a963e2cc675517f21c1c382877374"
version "4.1.2"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.1.2.tgz#b2656c8a506f7ce805a3f300a2ff48db022fa391"
dependencies:
commander "^2.19.0"
commander "^2.20.0"
source-map "~0.6.1"
source-map-support "~0.5.10"
source-map-support "~0.5.12"
text-encoding@^0.7.0:
version "0.7.0"
@ -3285,8 +3365,8 @@ toposort@^1.0.0:
resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.7.tgz#2e68442d9f64ec720b8cc89e6443ac6caa950029"
tslib@^1.9.0:
version "1.9.3"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
version "1.10.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
tty-browserify@0.0.0:
version "0.0.0"
@ -3311,13 +3391,13 @@ uglify-js@3.4.x:
source-map "~0.6.1"
union-value@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4"
version "1.0.1"
resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847"
dependencies:
arr-union "^3.1.0"
get-value "^2.0.6"
is-extendable "^0.1.1"
set-value "^0.4.3"
set-value "^2.0.1"
unique-filename@^1.1.1:
version "1.1.1"
@ -3326,8 +3406,8 @@ unique-filename@^1.1.1:
unique-slug "^2.0.0"
unique-slug@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.1.tgz#5e9edc6d1ce8fb264db18a507ef9bd8544451ca6"
version "2.0.2"
resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c"
dependencies:
imurmurhash "^0.1.4"
@ -3413,7 +3493,7 @@ uuid@^3.0.1, uuid@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
v8-compile-cache@^2.0.2:
v8-compile-cache@2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe"
@ -3421,11 +3501,9 @@ vary@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
vm-browserify@0.0.4:
version "0.0.4"
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73"
dependencies:
indexof "0.0.1"
vm-browserify@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.0.tgz#bd76d6a23323e2ca8ffa12028dc04559c75f9019"
watchpack@^1.5.0, watchpack@^1.6.0:
version "1.6.0"
@ -3442,21 +3520,20 @@ wbuf@^1.1.0, wbuf@^1.7.3:
minimalistic-assert "^1.0.0"
webpack-cli@^3.1.1:
version "3.3.3"
resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.3.3.tgz#8b7587dee369a838eb4722f6cfa711c779011e5f"
dependencies:
chalk "^2.4.1"
cross-spawn "^6.0.5"
enhanced-resolve "^4.1.0"
findup-sync "^2.0.0"
global-modules "^1.0.0"
import-local "^2.0.0"
interpret "^1.1.0"
loader-utils "^1.1.0"
prettier "^1.17.0"
supports-color "^5.5.0"
v8-compile-cache "^2.0.2"
yargs "^12.0.5"
version "3.3.6"
resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.3.6.tgz#2c8c399a2642133f8d736a359007a052e060032c"
dependencies:
chalk "2.4.2"
cross-spawn "6.0.5"
enhanced-resolve "4.1.0"
findup-sync "3.0.0"
global-modules "2.0.0"
import-local "2.0.0"
interpret "1.2.0"
loader-utils "1.2.3"
supports-color "6.1.0"
v8-compile-cache "2.0.3"
yargs "13.2.4"
webpack-dev-middleware@^3.7.0:
version "3.7.0"
@ -3468,8 +3545,8 @@ webpack-dev-middleware@^3.7.0:
webpack-log "^2.0.0"
webpack-dev-server@^3.1.0:
version "3.7.1"
resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.7.1.tgz#ce10ca0ad6cf28b03e2ce9808684a8616039155d"
version "3.7.2"
resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.7.2.tgz#f79caa5974b7f8b63268ef5421222a8486d792f5"
dependencies:
ansi-html "0.0.7"
bonjour "^3.5.0"
@ -3485,7 +3562,7 @@ webpack-dev-server@^3.1.0:
internal-ip "^4.3.0"
ip "^1.1.5"
killable "^1.0.1"
loglevel "^1.6.2"
loglevel "^1.6.3"
opn "^5.5.0"
p-retry "^3.0.1"
portfinder "^1.0.20"
@ -3518,15 +3595,14 @@ webpack-sources@^1.3.0:
source-map "~0.6.1"
webpack@^4.29.4:
version "4.33.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.33.0.tgz#c30fc4307db432e5c5e3333aaa7c16a15a3b277e"
version "4.35.3"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.35.3.tgz#66bc35ef215a7b75e8790f84d560013ffecf0ca3"
dependencies:
"@webassemblyjs/ast" "1.8.5"
"@webassemblyjs/helper-module-context" "1.8.5"
"@webassemblyjs/wasm-edit" "1.8.5"
"@webassemblyjs/wasm-parser" "1.8.5"
acorn "^6.0.5"
acorn-dynamic-import "^4.0.0"
acorn "^6.2.0"
ajv "^6.1.0"
ajv-keywords "^3.1.0"
chrome-trace-event "^1.0.0"
@ -3547,10 +3623,11 @@ webpack@^4.29.4:
webpack-sources "^1.3.0"
websocket-driver@>=0.5.1:
version "0.7.0"
resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb"
version "0.7.3"
resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9"
dependencies:
http-parser-js ">=0.4.0"
http-parser-js ">=0.4.0 <0.4.11"
safe-buffer ">=5.1.0"
websocket-extensions ">=0.1.1"
websocket-extensions@>=0.1.1:
@ -3561,7 +3638,7 @@ which-module@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
which@^1.2.14, which@^1.2.9:
which@^1.2.14, which@^1.2.9, which@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
dependencies:
@ -3586,13 +3663,21 @@ wrap-ansi@^2.0.0:
string-width "^1.0.1"
strip-ansi "^3.0.1"
wrap-ansi@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09"
dependencies:
ansi-styles "^3.2.0"
string-width "^3.0.0"
strip-ansi "^5.0.0"
wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
xtend@^4.0.0, xtend@~4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
version "4.0.2"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"
"y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0:
version "4.0.0"
@ -3609,7 +3694,14 @@ yargs-parser@^11.1.1:
camelcase "^5.0.0"
decamelize "^1.2.0"
yargs@12.0.5, yargs@^12.0.5:
yargs-parser@^13.1.0:
version "13.1.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0"
dependencies:
camelcase "^5.0.0"
decamelize "^1.2.0"
yargs@12.0.5:
version "12.0.5"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13"
dependencies:
@ -3625,3 +3717,19 @@ yargs@12.0.5, yargs@^12.0.5:
which-module "^2.0.0"
y18n "^3.2.1 || ^4.0.0"
yargs-parser "^11.1.1"
yargs@13.2.4:
version "13.2.4"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83"
dependencies:
cliui "^5.0.0"
find-up "^3.0.0"
get-caller-file "^2.0.1"
os-locale "^3.1.0"
require-directory "^2.1.1"
require-main-filename "^2.0.0"
set-blocking "^2.0.0"
string-width "^3.0.0"
which-module "^2.0.0"
y18n "^4.0.0"
yargs-parser "^13.1.0"

Loading…
Cancel
Save