Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(format): add more support for built-in classes #96

Merged
merged 11 commits into from Aug 19, 2022
Merged

Conversation

nkzawa
Copy link
Contributor

@nkzawa nkzawa commented Aug 17, 2022

Fixes #49

For format:

  • add support for Map, Set
  • add support for TypedArray (Uint8Array etc)
  • handle circular references
  • fix format of Error
  • fix format of class
  • fix format of Date to show ISO string
  • fix format of BigInt
  • introduce tsup to bundle files

Many parts of the fixes are brought from Node.js repo, so now it should be easier to extend the code for adding more supports.

I didn't add support for Map/Set Iterators like new Map().keys() since I cannot find a way to get information without consuming them. (Seems node.js is doing that via V8 api)

@vercel
Copy link

vercel bot commented Aug 17, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
edge-runtime ✅ Ready (Inspect) Visit Preview Aug 19, 2022 at 8:12AM (UTC)

@nkzawa nkzawa requested a review from a team August 17, 2022 15:40
packages/format/src/index.ts Outdated Show resolved Hide resolved
Copy link
Member

@javivelasco javivelasco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like CI is failing!

@Kikobeats Kikobeats merged commit 7f405de into main Aug 19, 2022
@Kikobeats Kikobeats deleted the improve-format branch August 19, 2022 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Format: add support for some missing constructors
3 participants