-
Notifications
You must be signed in to change notification settings - Fork 51
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: replace slugid with Buffer-less polyfill #1112
Conversation
4be3b86
to
89f35e7
Compare
@@ -101,14 +101,6 @@ export default defineConfig({ | |||
return assetInfo.name; | |||
} | |||
}, | |||
plugins: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Less config makes me happy!
|
||
/** | ||
* | ||
* Returns a randomly generated uuid v4 compliant slug which conforms to a set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you code this yourself?
Any intention to send this to the slugid folks to see if they'll include it in their repo and get rid of the Buffer requirement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did code this myself, yes. I just adapted some of their code, mostly.
I'd probably be able to make a PR, but right now the uuid library I chose @lukeed/uuid
is fast but not cryptographically secure. A PR would probably entail refactoring internals with uuid
as suggested taskcluster/slugid#12.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A+
Description
Aliases
slugid
import with a local./app/bufferless-slugid.js
which does not rely onBuffer
global.Reliance on
Buffer
complicates the Vite build and adds additional bloat to higlass which isn't necessary.Fixes #___
Checklist