{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/21128","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/21128/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/21128/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/21128/events","html_url":"https://github.com/nodejs/node/pull/21128","id":329227918,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyNTM2NzA3","number":21128,"title":"Introduce `mime` module","user":{"login":"bmeck","id":234659,"node_id":"MDQ6VXNlcjIzNDY1OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/234659?v=4","gravatar_id":"","url":"https://api.github.com/users/bmeck","html_url":"https://github.com/bmeck","followers_url":"https://api.github.com/users/bmeck/followers","following_url":"https://api.github.com/users/bmeck/following{/other_user}","gists_url":"https://api.github.com/users/bmeck/gists{/gist_id}","starred_url":"https://api.github.com/users/bmeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmeck/subscriptions","organizations_url":"https://api.github.com/users/bmeck/orgs","repos_url":"https://api.github.com/users/bmeck/repos","events_url":"https://api.github.com/users/bmeck/events{/privacy}","received_events_url":"https://api.github.com/users/bmeck/received_events","type":"User","site_admin":false},"labels":[{"id":155267502,"node_id":"MDU6TGFiZWwxNTUyNjc1MDI=","url":"https://api.github.com/repos/nodejs/node/labels/C++","name":"C++","color":"e11d21","default":false},{"id":362054330,"node_id":"MDU6TGFiZWwzNjIwNTQzMzA=","url":"https://api.github.com/repos/nodejs/node/labels/blocked","name":"blocked","color":"b60205","default":false},{"id":281232761,"node_id":"MDU6TGFiZWwyODEyMzI3NjE=","url":"https://api.github.com/repos/nodejs/node/labels/lib%20/%20src","name":"lib / src","color":"fad8c7","default":false},{"id":155435814,"node_id":"MDU6TGFiZWwxNTU0MzU4MTQ=","url":"https://api.github.com/repos/nodejs/node/labels/module","name":"module","color":"fbca04","default":false},{"id":169485478,"node_id":"MDU6TGFiZWwxNjk0ODU0Nzg=","url":"https://api.github.com/repos/nodejs/node/labels/semver-minor","name":"semver-minor","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":65,"created_at":"2018-06-04T21:43:35Z","updated_at":"2018-07-06T16:06:13Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/21128","html_url":"https://github.com/nodejs/node/pull/21128","diff_url":"https://github.com/nodejs/node/pull/21128.diff","patch_url":"https://github.com/nodejs/node/pull/21128.patch"},"body":"<!--\r\nThank you for your pull request. Please provide a description above and review\r\nthe requirements below.\r\n\r\nBug fixes and new features should include tests and possibly benchmarks.\r\n\r\nContributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md\r\n-->\r\n\r\n##### Checklist\r\n<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->\r\n\r\n- [x] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes\r\n- [x] tests and/or benchmarks are included\r\n- [x] documentation is changed or added\r\n- [ ] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines)\r\n\r\nThis adds a new module for handling MIME types. It is standalone based upon [the WHATWG MIME standards](https://mimesniff.spec.whatwg.org/) , but is more intended to open up APIs that wish to use MIME for coordinating content types. I have left out the various sniffing for content bodies until a future date as I believe that is a longer discussion than just parsing and serializing. The API is based upon [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) and [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) and intentionally allows us to expand MIMEParams for dealing with multiple parameters with the same name (`.getAll` / `.append` etc.).\r\n\r\nThis PR does not introduce any MIME databases for file paths.\r\n\r\nThe `MIMEParams` are not exposed as a string getter / setter, unlike `url.search`. These manipulations can be done using the map interface provided, and accessors can be added in a follow on if seen as desirable.\r\n\r\nTest cases were pulled from [web platform tests](https://github.com/web-platform-tests/wpt/tree/master/mimesniff/mime-types/resources) , but we don't have a well documented process for keeping such fixtures in sync so I have not done anything except vendor them for now, similar to https://github.com/nodejs/node/blob/master/test/fixtures/url-tests.js ."},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/403077352","html_url":"https://github.com/nodejs/node/pull/21128#issuecomment-403077352","issue_url":"https://api.github.com/repos/nodejs/node/issues/21128","id":403077352,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzA3NzM1Mg==","user":{"login":"jdalton","id":4303,"node_id":"MDQ6VXNlcjQzMDM=","avatar_url":"https://avatars2.githubusercontent.com/u/4303?v=4","gravatar_id":"","url":"https://api.github.com/users/jdalton","html_url":"https://github.com/jdalton","followers_url":"https://api.github.com/users/jdalton/followers","following_url":"https://api.github.com/users/jdalton/following{/other_user}","gists_url":"https://api.github.com/users/jdalton/gists{/gist_id}","starred_url":"https://api.github.com/users/jdalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdalton/subscriptions","organizations_url":"https://api.github.com/users/jdalton/orgs","repos_url":"https://api.github.com/users/jdalton/repos","events_url":"https://api.github.com/users/jdalton/events{/privacy}","received_events_url":"https://api.github.com/users/jdalton/received_events","type":"User","site_admin":false},"created_at":"2018-07-06T16:06:13Z","updated_at":"2018-07-06T16:06:13Z","author_association":"MEMBER","body":"@bmeck \r\n\r\n> That seems ok,\r\n\r\nRock!\r\n\r\n> I think we would need to continue support for any method we produce indefinitely so would prefer we expose it in a sane manner that doesn't require us to ad-hoc add methods\r\n\r\nI dig the deprecate doc, deprecate runtime, and change on major approach but I get your drift. I think focusing on the min viable Node need through small utils is a good way to start this."}}
{"actor":{"display_login":"jdalton"}}