Skip to content

Conversation

@huseeiin
Copy link

@huseeiin huseeiin commented Oct 2, 2024

this adds 2 changes:

  1. use native Bun.Glob instead of tiny-glob
  2. update the default compressible types to a wider range using mime-db

@huseeiin
Copy link
Author

huseeiin commented Oct 2, 2024

added some more tiny changes :D

Copy link
Owner

@gornostay25 gornostay25 left a comment

Choose a reason for hiding this comment

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

Looks good, but some minor issues

* @param {'gz' | 'br'} format
*/
async function compress_file(file, format = "gz") {
/*** @param {string} file* @param {'gz' | 'br'} format*/ async function compress_file(
Copy link
Owner

Choose a reason for hiding this comment

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

Looks good but there are some formatting issues

Copy link
Author

Choose a reason for hiding this comment

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

Looks good but there are some formatting issues

i ran bun format before every commit

* @param {string} out
*/
function patchServerWebsocketHandler(out) {
/*** @param {string} out*/ function patchServerWebsocketHandler(out) {
Copy link
Owner

Choose a reason for hiding this comment

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

here

* @param {import('.').CompressOptions} options
*/
async function compress(directory, options) {
/*** @param {string} directory* @param {import('.').CompressOptions} options*/ async function compress(
Copy link
Owner

Choose a reason for hiding this comment

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

here


/** @type {import('.').default} */
export default function (opts = {}) {
/** @type {import('.').default} */ export default function (opts = {}) {
Copy link
Owner

Choose a reason for hiding this comment

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

here


/**
* @default html,js,json,css,svg,xml,wasm
*/
Copy link
Owner

Choose a reason for hiding this comment

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

Why you removed this comment?

Copy link
Author

Choose a reason for hiding this comment

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

Why you removed this comment?

because its way more than those anymore

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.

2 participants