unpack: Move fromFile to fs entry point#250
Conversation
🦋 Changeset detectedLatest commit: e590041 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
delucis
left a comment
There was a problem hiding this comment.
Looks good! My only thoughts:
-
@capsizecss/unpack/nodecould be another naming option vs/server -
The other alternative would be to drop
fromFile()entirely and tell people to migrate to:fromBuffer(await readFile('my-font.ttf'))
Then there would be no need to worry about the module’s compatibility. But I get that it can be handy to have a dedicated API.
|
Yeah the naming for the import path was something I wasnt sold on. Even I think its a good convenience to provide, so i guess just bike-shedding the naming is the last step here. |
I feel like I have, but now I can’t find any examples 😅 (In fact, maybe I’m even just thinking of myself — at one point I played with having a smaller Either way, I’m not too fussed about the naming! Happy to see whichever makes sense to you. |
|
Playing around with some very honest paths: import { fromFile } from '@capsizecss/unpack/file-system';or import { fromFile } from '@capsizecss/unpack/fs';Thoughts? |
|
Oh yeah, |
fromFile to server entry pointfromFile to fs entry point
Create
fsentry point to isolate usage of file system APIs without needing to polyfill.BREAKING CHANGES
Move
fromFiletofsentry point.MIGRATION GUIDE
As an aside, noticed the
lintwasn't being run in CI 🤦♂️ .