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

Experimental rewrite: Es6 modules, BigInt, (un)parsing and validation #317

Closed
wants to merge 6 commits into from

Conversation

broofa
Copy link
Member

@broofa broofa commented Jun 25, 2019

#245 and as well as some of the work we're doing over at https://github.com/bcoe/proposal-standard-module-uuid have had me playing around with what this module might look like if it was rewritten using modern ES features (ES6 modules, BigInt) and with a UUID class for parsing/unparsing and validation.

This is the work-in-progress result. (Posting this mostly because my laptop's logic board decided to crap out and enough work went into it I'd rather not risk losing it while dealing with Apple repair process.)

Feel free to comment, with the caveat that I don't have a concrete plan (yet) for merging to master here.

@DarylThayil
Copy link

how far off is this from landing :D

@broofa
Copy link
Member Author

broofa commented Jul 26, 2019

@DarylThayil: As noted, there's no set plan for landing this. This is just a my take on what the codebase for this [9-year old module] would look like if it was updated to leverage new and coming language features. I don't know that there's a lot of demand for this, either. While it does address a few of the longer-running issues we've had with uuid (ES6 modules, parsing, validation support), none of those are critical.

Probably the biggest issue with this branch is the use of BigInt. It's not supported on Safari or Edge, nor is there a suitable polyfill for it that I'm aware of.

@43081j
Copy link

43081j commented Aug 19, 2019

to be honest a standalone ESM rewrite would do wonders (without the bigint changes, as they should probably be delivered separately).

if there's no plan to at least do the ESM side of things im tempted to fork for now.

in its current state, uuid can't be consumed by es modules and can't be used in TS projects targeting ESM.

i'd personally go as far as saying this needs to be split into a node-only build and a browser-build, possibly in separate repos.

ctavan added a commit to ctavan/node-uuid that referenced this pull request Aug 26, 2019
The service wzrd.in seems to be unmaintained for over a year now, see
browserify/wzrd.in@2f7ea69

It currently throws 502 errors on all packages as reported in
uuidjs#302 or
https://talk.observablehq.com/t/wzrd-in-alternatives/571

As stated in
uuidjs#293 (comment)
there are no plans to support legacy bundlers.

Instead, we may consider to go for properly standardized ES6 modules in
the future as has been teased in uuidjs#317

However for the time being let's at least remove these broken
instructions from the README.

Closes uuidjs#176, uuidjs#302
broofa pushed a commit that referenced this pull request Sep 1, 2019
* chore(doc): re-generate README

* fix(doc): remove wzrd.in instruction from README

The service wzrd.in seems to be unmaintained for over a year now, see
browserify/wzrd.in@2f7ea69

It currently throws 502 errors on all packages as reported in
#302 or
https://talk.observablehq.com/t/wzrd-in-alternatives/571

As stated in
#293 (comment)
there are no plans to support legacy bundlers.

Instead, we may consider to go for properly standardized ES6 modules in
the future as has been teased in #317

However for the time being let's at least remove these broken
instructions from the README.

Closes #176, #302
@ctavan ctavan mentioned this pull request Sep 23, 2019
6 tasks
@ctavan ctavan mentioned this pull request Oct 13, 2019
@broofa
Copy link
Member Author

broofa commented Jan 28, 2020

Closing. The UUID class is interesting, maybe as a separate module in the uuidjs org or something, but not relevant to current development work.

@broofa broofa closed this Jan 28, 2020
@ctavan ctavan mentioned this pull request Feb 12, 2020
1 task
@ctavan
Copy link
Member

ctavan commented Feb 17, 2020

@43081j @DarylThayil @dstaley:

Sorry for taking such a long time but we have finally released uuid@7.0.0-beta.0 which features native ESModules-Support for the browser:

npm install uuid@7.0.0-beta.0

The master branch README already reflects the API of v7.0.0.

It would be awesome to get feedback from you if this release works well for you.

@broofa broofa deleted the es6_modules branch June 24, 2020 14:52
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.

None yet

4 participants