* #3874: `TryIntoJs` impl for primitive types
* #3874: `#[derive(TryIntoJs)]`
is it ok to use `create_data_property_or_throw`?
in other words, am I create an object correctly?
* #3874: some (but not enough) tests
* #3874: fix `TryintoJs` derive bug in multi attr case
* #3874: `TryIntoJs` derive macro example
* fix paths in derive macro
* make lint happy
* Add a URL class (with caveats)
Some methods are NOT currently supported (some don' make sense
outside of a browser context). They are still implemented but
will throw a JavaScript Error.
Supported methods should follow the specification perfectly.
* Adding tests and using url::quirks for simpler getters/setters
* clippies
* Address comments
This is not backward compatible but should have minimal impact.
This is also more future proof by passing the ConsoleState
which is more opaque and allows us to update the way the
console object is constructed and passed.
* Add TryFromJs for TypedJsFunction and more tests
Includes adding TryFromJs for "()".
* Fix clippies and fmt
* Prettier
* Add From<TypedJsFunction> for JsValue to allow conversion
* Implement comments
* clippies
* A simple module loader from a function
This will be the foundation for having a combinatoric module loader
system.
* Add more utility module loader types
* clippies
* Remove convenience functions and allow AsRef<Path> for constructing fs
* clippies
* Move FnModuleLoader to return a result, and add a new simpler loader
* Address comment
* Allow dead code for code that is newly detected as unused
* Fix compile errors with nightly rust
* Add missing SAFETY section
* Increase safety of `FutexWaiters`
* Add an "iter()" method to Js*Array for convenience
It might be optimizable, and in either case it should be but this at
least let people use an easy API and enjoy future improvements.
* Fix clippies
---------
Co-authored-by: Theo Paris <theo@tinted.dev>
Co-authored-by: José Julián Espina <julian.espina@canonical.com>
* Allow dead code for code that is newly detected as unused
* Fix compile errors with nightly rust
* Add missing SAFETY section
* Increase safety of `FutexWaiters`
---------
Co-authored-by: Theo Paris <theo@tinted.dev>
Co-authored-by: José Julián Espina <julian.espina@canonical.com>
* Build out partial functionality and with methods
* Use temporal_rs's TinyAsciiStr
* Apply review feedback for specification comments
* Bump temporal-rs and add DateTime::with
* Remove leftover eprintln from JsPromise::await_blocking
* Add clippy for denying print and eprints
And remove usage of println or allow them.
* Address comment
* Add more utility functions around modules and exports
* Use import instead of path
* clippies and fmt
* clippies and fmt
* Add JsPromise::await_blocking and remove ell_and_run
* Fix documentation CI job
* Split default icu data into lazily deserialized parts
* FIx no_std compilation
* Lazily load more ICU tools
* Fix regressions and use more stable constructors
* lazy builtins
* Bump temporal_rs to latest commit
* Fix build
* Begining of plainYearMonth methods
* plainYearMonth: get_in_leap_year, get_months_in_year
* plain_year_month: implement add/subtract
* Addition of MonthDay methods
* toString implementations
* some changes to migrate to FiniteF64
* - bump the temporal version
- Move with implementation to to_temporal_month_day
- review comments
* switch to using as_inner() instead of from
Also use let _ to appease new clippy rules
* get the calendarID from the object
* update temporal ref
* Revert "lazy builtins"
This reverts commit a4e602d129.
* changes from review comments
---------
Co-authored-by: jedel1043 <jedel0124@gmail.com>
* feat: add a way to create `JsString` from ASCII literal
* chore: add todo comment to change `DUMMY_RAW_JS_STRING` to constant
* chore: make `ORIGINAL_JS_STR` a static reference to reduce binary size
* chore: replace `static` to `const` and simplify the code
* chore: add generic parameters to `transmute`
* chore: try to use union to represent
* chore: make miri happy
* Optimize const accesses for static strings
* perf: set LITERAL a constant reference to avoid duplication on data segment
* chore: add comments
* chore: add comments
* chore : fix `refcount` test
* chore: remove unnessnary assertion
* chore: modify definition of `JsString::is_static`
* chore: add more tests
* chore: mark `StaticJsString` as `repr[C]`
* chore: improve comment
* chore: Mark `TaggedLen` as `repr(transparent)`
---------
Co-authored-by: jedel1043 <jedel0124@gmail.com>
* Add a way to add setters/getters in js_class!
* Address cargo clippies
* Add new interface and update doc
* Setters can now return a value, which can be a JsResult
* Remove clippy warning
* Fix having both get and set with a return type fails to match
* Update length and builtin properties
* Split tags and names as two different statics
* Missed YearMonth and MonthDay length
* Fix length on some methods
* Missed one length
* cargo fmt
* Add a js_error! macro to create opaque errors
And as a bonus since I needed it, simplify comparison of strings
and add PartialEq<&str> for JsString.
* Add PartialEq<str> for JsStr. PartialEq<&str> uses the other
* Cargo clippy
* Remove conversion of non-string literals and remove From<String> for JsValue