jshttp / type-is

Infer the content-type of a request.
MIT License
226 stars 32 forks source link

Extend support for media-typer 1.0.1 #39

Closed utkarsh2102 closed 5 years ago

utkarsh2102 commented 5 years ago

https://github.com/jshttp/type-is/blob/dc723b95e2c52c689cf9d4cefbc5d91e74f7524a/package.json#L12

Since media-typer 1.0.1 is available, can the support for the same be extended? Because this breaks with the newer version of media-typer.

dougwilson commented 5 years ago

I'm not sure what the question is? This module cannot use the 1.x series of media-typer because this module uses the features of the old 0.x series. The package.json is correct right now, that this module requires 0.3.0. There is no direct path to upgrade to the 1.x series, and the 0.x series is still supported for any bug fixes etc.

utkarsh2102 commented 5 years ago

@dougwilson, so the type-is would break if media-typer 1.0.1 is installed, no? Could something be done for the same? When could we expect the upgrade for type-is so that it works fine with 1.x series?

dougwilson commented 5 years ago

No, if you install media-typer 1 it won't break this module. Npm will install a second copy of media-typer 0.3.0 just for this module's use, so it doesn't affect what version you can use.

utkarsh2102 commented 5 years ago

@dougwilson, I am not using npm. I am updating the module media-typer in the Debian repositories. And due to that, type-is would break :(

dougwilson commented 5 years ago

There is no way to make this module work with media-typer 1.x. whatever package manager you use needs to honor our dependency versions declared in package.json

utkarsh2102 commented 5 years ago

Ah, okay :(

dougwilson commented 5 years ago

Alright, made some upstream changes and just landed a commit that will upgrade the media-typer to the 1.x series.