Skip to content

Add JavaScript media type shortcut - #104

Open
vibhor-aggr wants to merge 1 commit into
jshttp:masterfrom
vibhor-aggr:feat/js-shortcut-media-types
Open

Add JavaScript media type shortcut#104
vibhor-aggr wants to merge 1 commit into
jshttp:masterfrom
vibhor-aggr:feat/js-shortcut-media-types

Conversation

@vibhor-aggr

Copy link
Copy Markdown

Summary

  • make js and .js match standard and legacy JavaScript media types
  • preserve generic extension normalization and explicit media-type matching
  • document the exception and add request/direct API coverage

Validation

  • npx --no-install vitest run src/index.spec.ts -t "JavaScript"
  • npm test
  • npm run build
  • built artifact smoke test
  • npx --no-install prettier --check README.md src/index.ts src/index.spec.ts
  • git diff --check

Fixes #15.

@kilisamemarisaaa kilisamemarisaaa left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I reviewed the source change at exact head 6133c48. To verify it without changing the PR, I applied the PR's src/index.ts diff to an isolated worktree at the PR base and ran:\n\n-
pm test: 47 passing (100% statements/functions/lines, 95.91% branches)\n-
pm run build\n-
px --no-install prettier --check README.md src/index.ts src/index.spec.ts\n- git diff --check\n\nA built-artifact smoke test confirms is() and
equest() return js/.js for �pplication/javascript, �pplication/x-javascript, and ext/javascript, reject �pplication/json, and preserve existing .png/wildcard behavior. I found no compatibility regression in the covered API. My account cannot submit an approval on this repository, so this is a factual verification comment.

@kilisamemarisaaa kilisamemarisaaa left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I reviewed the source change at exact head 6133c48. To verify it without changing the PR, I applied the PR's src/index.ts diff to an isolated worktree at the PR base and ran:\n\n-
pm test: 47 passing (100% statements/functions/lines, 95.91% branches)\n-
pm run build\n-
px --no-install prettier --check README.md src/index.ts src/index.spec.ts\n- git diff --check\n\nA built-artifact smoke test confirms is() and
equest() return js/.js for �pplication/javascript, �pplication/x-javascript, and ext/javascript, reject �pplication/json, and preserve existing .png/wildcard behavior. I found no compatibility regression in the covered API. My account cannot submit an approval on this repository, so this is a factual verification comment.

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.

Javascript as new special shortcut

2 participants