Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: wheresrhys/fetch-mock
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: fetch-mock-v10.0.8
Choose a base ref
...
head repository: wheresrhys/fetch-mock
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fetch-mock-v10.1.0
Choose a head ref

Commits on Jun 16, 2024

  1. Copy the full SHA
    5f425f1 View commit details

Commits on Jun 19, 2024

  1. lots of moving fies around

    also removed debug
    wheresrhys committed Jun 19, 2024
    Copy the full SHA
    f5e4182 View commit details
  2. Copy the full SHA
    c4c2c6b View commit details
  3. Copy the full SHA
    1a2d2f1 View commit details
  4. delete teh constructurs test suite

    As long as we run the whole test suite against node fetch 3 then the only real use case fro providing custom constructurs is covered already
    wheresrhys committed Jun 19, 2024
    Copy the full SHA
    f195043 View commit details
  5. Copy the full SHA
    34df893 View commit details
  6. rename lib to src

    wheresrhys committed Jun 19, 2024
    Copy the full SHA
    2a9405e View commit details
  7. got type valdation running

    wheresrhys committed Jun 19, 2024
    Copy the full SHA
    d7f07b0 View commit details
  8. types are flying

    wheresrhys committed Jun 19, 2024
    Copy the full SHA
    440de7b View commit details

Commits on Jun 20, 2024

  1. Copy the full SHA
    f35b432 View commit details
  2. confused

    wheresrhys committed Jun 20, 2024
    Copy the full SHA
    805d506 View commit details
  3. blimey!

    wheresrhys committed Jun 20, 2024
    Copy the full SHA
    d0ffe9c View commit details
  4. Copy the full SHA
    7ba8ed7 View commit details
  5. Copy the full SHA
    9f8a2bf View commit details
  6. Copy the full SHA
    d402973 View commit details
  7. Copy the full SHA
    c350ce3 View commit details
  8. Copy the full SHA
    1798b02 View commit details

Commits on Jun 21, 2024

  1. setting up router types

    wheresrhys committed Jun 21, 2024
    Copy the full SHA
    e24a456 View commit details
  2. Copy the full SHA
    7c89239 View commit details
  3. Copy the full SHA
    cffe443 View commit details
  4. response types

    wheresrhys committed Jun 21, 2024
    Copy the full SHA
    9cdf6d8 View commit details
  5. callhistory reimplemented

    wheresrhys committed Jun 21, 2024
    Copy the full SHA
    82bde77 View commit details
  6. call history is typed

    wheresrhys committed Jun 21, 2024
    Copy the full SHA
    357c904 View commit details
  7. Copy the full SHA
    defd15e View commit details
  8. more callhistory types

    wheresrhys committed Jun 21, 2024
    Copy the full SHA
    6ee3d6b View commit details
  9. Copy the full SHA
    2653f47 View commit details
  10. more type mangling

    wheresrhys committed Jun 21, 2024
    Copy the full SHA
    e822c62 View commit details
  11. Copy the full SHA
    0c3d95f View commit details
  12. more work on headers

    wheresrhys committed Jun 21, 2024
    Copy the full SHA
    92f7d77 View commit details
  13. more typesafety

    wheresrhys committed Jun 21, 2024
    Copy the full SHA
    4f7d392 View commit details

Commits on Jun 22, 2024

  1. Copy the full SHA
    c8e8a7b View commit details

Commits on Jun 23, 2024

  1. Copy the full SHA
    f26b766 View commit details

Commits on Jun 24, 2024

  1. fix FetchMock types

    wheresrhys committed Jun 24, 2024
    Copy the full SHA
    1c94b05 View commit details
  2. much better Route typings

    wheresrhys committed Jun 24, 2024
    Copy the full SHA
    621c665 View commit details
  3. Copy the full SHA
    f579bae View commit details
  4. Copy the full SHA
    3cdd26a View commit details
  5. Copy the full SHA
    9000524 View commit details
  6. Copy the full SHA
    a0f048e View commit details
  7. Copy the full SHA
    39918f0 View commit details
  8. Copy the full SHA
    9726f12 View commit details
  9. Copy the full SHA
    c7b5bb6 View commit details

Commits on Jun 25, 2024

  1. Copy the full SHA
    c0b2ca0 View commit details
  2. Copy the full SHA
    4347e84 View commit details
  3. first set of tests work

    wheresrhys committed Jun 25, 2024
    Copy the full SHA
    e7633c1 View commit details
  4. linting config

    wheresrhys committed Jun 25, 2024
    Copy the full SHA
    4244120 View commit details
  5. header matching

    wheresrhys committed Jun 25, 2024
    Copy the full SHA
    2e0e4d8 View commit details
  6. Copy the full SHA
    b572867 View commit details
  7. matcher tests

    wheresrhys committed Jun 25, 2024
    Copy the full SHA
    e140685 View commit details
  8. url matcher tests

    wheresrhys committed Jun 25, 2024
    Copy the full SHA
    8cfce0d View commit details
  9. query string matcher tests

    wheresrhys committed Jun 25, 2024
    Copy the full SHA
    814c6f6 View commit details
Showing with 19,469 additions and 10,192 deletions.
  1. +7 −7 .circleci/config.yml
  2. +1 −2 .eslintignore
  3. +3 −0 .eslintrc.cjs
  4. +38 −0 .github/workflows/deploy.yml
  5. +1 −1 .gitignore
  6. +2 −1 .release-please-manifest.json
  7. +0 −8 Gemfile
  8. +0 −69 Gemfile.lock
  9. +0 −21 docs/LICENSE
  10. +0 −19 docs/_about/introduction.md
  11. +0 −12 docs/_about/previous-versions.md
  12. +0 −75 docs/_about/quickstart.md
  13. +0 −8 docs/_api-inspection/called.md
  14. +0 −8 docs/_api-inspection/calls.md
  15. +0 −28 docs/_api-inspection/done.md
  16. +0 −106 docs/_api-inspection/fundamentals.md
  17. +0 −8 docs/_api-inspection/lastCall.md
  18. +0 −8 docs/_api-inspection/lastOptions.md
  19. +0 −23 docs/_api-inspection/lastResponse.md
  20. +0 −8 docs/_api-inspection/lastUrl.md
  21. +0 −12 docs/_api-lifecycle/flush.md
  22. +0 −7 docs/_api-lifecycle/resetBehavior.md
  23. +0 −9 docs/_api-lifecycle/resetHistory.md
  24. +0 −10 docs/_api-lifecycle/restore_reset.md
  25. +0 −14 docs/_api-lifecycle/sandbox.md
  26. +0 −69 docs/_api-mocking/add-matcher.md
  27. +0 −11 docs/_api-mocking/catch.md
  28. +0 −29 docs/_api-mocking/combined-shorthands.md
  29. +0 −25 docs/_api-mocking/cookies.md
  30. +0 −21 docs/_api-mocking/get_post.md
  31. +0 −130 docs/_api-mocking/mock.md
  32. +0 −9 docs/_api-mocking/mock_any.md
  33. +0 −220 docs/_api-mocking/mock_matcher.md
  34. +0 −8 docs/_api-mocking/mock_once.md
  35. +0 −43 docs/_api-mocking/mock_options.md
  36. +0 −107 docs/_api-mocking/mock_response.md
  37. +0 −13 docs/_api-mocking/mock_sticky.md
  38. +0 −12 docs/_api-mocking/spy.md
  39. +0 −80 docs/_config.yml
  40. +0 −38 docs/_includes/parameters.html
  41. +0 −1 docs/_includes/relative-src.html
  42. +0 −46 docs/_includes/sidebar.html
  43. +0 −8 docs/_includes/syntax-highlight.html
  44. +0 −7 docs/_includes/tiny-syntax.html
  45. +0 −24 docs/_includes/types.html
  46. +0 −3 docs/_includes/version-added.html
  47. +0 −43 docs/_layouts/default.html
  48. +0 −58 docs/_sass/_borland.scss
  49. +0 −204 docs/_sass/_docs.scss
  50. +0 −122 docs/_sass/_layout.scss
  51. +0 −261 docs/_sass/_main.scss
  52. +0 −156 docs/_sass/_navigation.scss
  53. +0 −28 docs/_sass/_palette.scss
  54. +0 −95 docs/_sass/_tables.scss
  55. +0 −52 docs/_troubleshooting/troubleshooting.md
  56. +0 −86 docs/_usage/configuration.md
  57. +0 −18 docs/_usage/custom-classes.md
  58. +0 −6 docs/_usage/debug-mode.md
  59. +0 −32 docs/_usage/global-non-global.md
  60. +0 −39 docs/_usage/importing.md
  61. +0 −23 docs/_usage/installation.md
  62. +0 −11 docs/_usage/polyfilling.md
  63. +0 −16 docs/_usage/requirements.md
  64. +0 −43 docs/_usage/usage-with-jest.md
  65. +0 −18 docs/_usage/version-10-caveat.md
  66. +0 −24 docs/css/editor.css
  67. +0 −26 docs/css/style.scss
  68. +5 −0 docs/fetch-mock/.astro/settings.json
  69. +332 −0 docs/fetch-mock/.astro/types.d.ts
  70. +54 −0 docs/fetch-mock/README.md
  71. +35 −0 docs/fetch-mock/astro.config.mjs
  72. +17 −0 docs/fetch-mock/package.json
  73. +1 −0 docs/fetch-mock/public/favicon.svg
  74. +5 −0 docs/fetch-mock/src/content/config.ts
  75. +27 −0 docs/fetch-mock/src/content/docs/API/Inspection/done.md
  76. +12 −0 docs/fetch-mock/src/content/docs/API/Inspection/flush.md
  77. +131 −0 docs/fetch-mock/src/content/docs/API/Inspection/inspecting-calls.md
  78. +21 −0 docs/fetch-mock/src/content/docs/API/Lifecycle/resetting.md
  79. +11 −0 docs/fetch-mock/src/content/docs/API/Lifecycle/sandbox.md
  80. +84 −0 docs/fetch-mock/src/content/docs/API/Mocking/Parameters/matcher.md
  81. +126 −0 docs/fetch-mock/src/content/docs/API/Mocking/Parameters/options.md
  82. +79 −0 docs/fetch-mock/src/content/docs/API/Mocking/Parameters/response.md
  83. +69 −0 docs/fetch-mock/src/content/docs/API/Mocking/add-matcher.md
  84. +10 −0 docs/fetch-mock/src/content/docs/API/Mocking/catch.md
  85. +136 −0 docs/fetch-mock/src/content/docs/API/Mocking/mock.md
  86. +60 −0 docs/fetch-mock/src/content/docs/API/Mocking/shorthands.md
  87. +10 −0 docs/fetch-mock/src/content/docs/API/Mocking/spy.md
  88. +20 −0 docs/fetch-mock/src/content/docs/index.mdx
  89. +27 −0 docs/fetch-mock/src/content/docs/troubleshooting/cookies.md
  90. +18 −0 docs/fetch-mock/src/content/docs/troubleshooting/custom-classes.md
  91. +9 −0 docs/fetch-mock/src/content/docs/troubleshooting/debug-mode.md
  92. +34 −0 docs/fetch-mock/src/content/docs/troubleshooting/global-non-global.md
  93. +46 −0 docs/fetch-mock/src/content/docs/troubleshooting/importing.md
  94. +54 −0 docs/fetch-mock/src/content/docs/troubleshooting/troubleshooting.md
  95. +5 −3 docs/{ → fetch-mock/src/content/docs/usage}/cheatsheet.md
  96. +62 −0 docs/fetch-mock/src/content/docs/usage/configuration.md
  97. +29 −0 docs/fetch-mock/src/content/docs/usage/installation.md
  98. +78 −0 docs/fetch-mock/src/content/docs/usage/quickstart.md
  99. +14 −0 docs/fetch-mock/src/content/docs/usage/requirements.md
  100. +29 −0 docs/fetch-mock/src/content/docs/usage/versions.md
  101. +2 −0 docs/fetch-mock/src/env.d.ts
  102. +3 −0 docs/fetch-mock/tsconfig.json
  103. BIN docs/images/github-logo.png
  104. BIN docs/images/logo.png
  105. +0 −11 docs/images/logo.svg
  106. +0 −4 docs/images/menu.svg
  107. +0 −56 docs/index.html
  108. +0 −857 docs/js/lunr.min.js
  109. +0 −112 docs/js/main.js
  110. +0 −109 docs/v6-v7-upgrade-guide.md
  111. +26 −0 jsconfig.json
  112. +11,600 −6,282 package-lock.json
  113. +18 −10 package.json
  114. +91 −0 packages/ARCHITECTURE.md
  115. 0 packages/README.md
  116. +20 −0 packages/core/CHANGELOG.md
  117. +27 −0 packages/core/package.json
  118. +210 −0 packages/core/src/CallHistory.js
  119. +239 −0 packages/core/src/FetchMock.js
  120. +241 −0 packages/core/src/Matchers.js
  121. +133 −0 packages/core/src/RequestUtils.js
  122. +274 −0 packages/core/src/Route.js
  123. +404 −0 packages/core/src/Router.js
  124. +70 −0 packages/core/src/StatusTextMap.js
  125. +469 −0 packages/core/src/__tests__/CallHistory.test.js
  126. +93 −0 packages/core/src/__tests__/FetchMock/flush.test.js
  127. +159 −0 packages/core/src/__tests__/FetchMock/instance-management.test.js
  128. +292 −0 packages/core/src/__tests__/FetchMock/response-construction.test.js
  129. +225 −0 packages/core/src/__tests__/FetchMock/response-negotiation.test.js
  130. +258 −0 packages/core/src/__tests__/FetchMock/routing.test.js
  131. +185 −0 packages/core/src/__tests__/Matchers/body.test.js
  132. +45 −0 packages/core/src/__tests__/Matchers/express.test.js
  133. +62 −0 packages/core/src/__tests__/Matchers/function.test.js
  134. +170 −0 packages/core/src/__tests__/Matchers/header.js
  135. +55 −0 packages/core/src/__tests__/Matchers/method.test.js
  136. +225 −0 packages/core/src/__tests__/Matchers/query-string.test.js
  137. +134 −0 packages/core/src/__tests__/Matchers/route-config-object.test.js
  138. +186 −0 packages/core/src/__tests__/Matchers/url.test.js
  139. +137 −0 packages/core/src/__tests__/router-integration.test.js
  140. 0 packages/core/src/index.js
  141. 0 packages/core/types/FetchHandler.d.ts
  142. +18 −0 packages/core/types/InstanceManagement.d.ts
  143. +38 −0 packages/core/types/Matchers.d.ts
  144. +12 −0 packages/core/types/RequestUtils.d.ts
  145. +145 −0 packages/core/types/Route.d.ts
  146. +219 −0 packages/core/types/Router.d.ts
  147. +14 −0 packages/fetch-mock/CHANGELOG.md
  148. +5 −5 packages/fetch-mock/package.json
  149. +11 −12 packages/fetch-mock/src/Route/matchers.js
  150. +214 −0 packages/standalone/fallbackToNetwork.test.js
  151. +69 −0 packages/standalone/fragments.js
  152. +136 −0 packages/standalone/global-fetch.test.js
  153. +198 −0 packages/standalone/set-up-and-tear-down.test.js
  154. +89 −0 packages/standalone/spy.test.js
  155. +30 −0 packages/standalone/types.ts
  156. +11 −0 packages/wip/generated-types/CallHistory.d.ts
  157. +17 −0 packages/wip/generated-types/FetchHandler.d.ts
  158. +2 −0 packages/wip/generated-types/FetchMockWrapper.d.ts
  159. +16 −0 packages/wip/generated-types/Matchers.d.ts
  160. +27 −0 packages/wip/generated-types/RequestUtils.d.ts
  161. +2 −0 packages/wip/generated-types/ResponseBuilder.d.ts
  162. +44 −0 packages/wip/generated-types/Route.d.ts
  163. +3 −0 packages/wip/generated-types/Router.d.ts
  164. +7 −0 packages/wip/generated-types/StatusTextMap.d.ts
  165. +1 −0 packages/wip/generated-types/__tests__/CallHistory.test.d.ts
  166. +1 −0 packages/wip/generated-types/__tests__/FetchHandler.test.d.ts
  167. +1 −0 packages/wip/generated-types/__tests__/FetchMockWrapper.test.d.ts
  168. +1 −0 packages/wip/generated-types/__tests__/Matchers.test.d.ts
  169. +1 −0 packages/wip/generated-types/__tests__/ResponseBuilder.test.d.ts
  170. +1 −0 packages/wip/generated-types/__tests__/Router/Router.test.d.ts
  171. +1 −0 packages/wip/generated-types/__tests__/Router/body-matching.test.d.ts
  172. +1 −0 packages/wip/generated-types/__tests__/Router/edge-cases.test.d.ts
  173. +1 −0 packages/wip/generated-types/__tests__/Router/function-matching.test.d.ts
  174. +1 −0 packages/wip/generated-types/__tests__/Router/header-matching.test.d.ts
  175. +1 −0 packages/wip/generated-types/__tests__/Router/matchPartialBody.test.d.ts
  176. +1 −0 packages/wip/generated-types/__tests__/Router/matcher-object.test.d.ts
  177. +1 −0 packages/wip/generated-types/__tests__/Router/method-matching.test.d.ts
  178. +1 −0 packages/wip/generated-types/__tests__/Router/multiple-routes.test.d.ts
  179. +1 −0 packages/wip/generated-types/__tests__/Router/naming-routes.test.d.ts
  180. +1 −0 packages/wip/generated-types/__tests__/Router/path-parameter-matching.test.d.ts
  181. +1 −0 packages/wip/generated-types/__tests__/Router/query-string-matching.test.d.ts
  182. +1 −0 packages/wip/generated-types/__tests__/Router/sticky-routes.test.d.ts
  183. +1 −0 packages/wip/generated-types/__tests__/Router/unmatched-calls.test.d.ts
  184. +1 −0 packages/wip/generated-types/__tests__/Router/url-matching.test.d.ts
  185. +159 −0 packages/wip/old-types/CallHistory.d.ts
  186. +84 −0 packages/wip/old-types/FetchMockWrapper.d.ts
  187. +27 −0 packages/wip/old-types/RequestUtils.d.ts
  188. +54 −0 packages/wip/old-types/ResponseBuilder.d.ts
  189. +7 −0 packages/wip/old-types/StatusTextMap.d.ts
  190. +16 −0 packages/wip/old-types/index.d.ts
  191. +3 −1 release-please-config.json
  192. 0 {packages/fetch-mock/types → }/tslint.json
  193. +17 −1 vitest.config.js
14 changes: 7 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -58,31 +58,31 @@ jobs:
- *workspace
- run: npm run lint:ci

typecheck:
typelint:
<<: *nodelts
steps:
- *workspace
- run: npm run lint:types
- run: npm run types:lint

test:
<<: *nodelts
steps:
- *workspace
- run: npm run test:coverage
- run: npm run test:ci

nodefetch3:
<<: *nodelts
steps:
- *workspace
- run: npm install node-fetch@3
- run: TESTING_ENV=node-fetch npm run test
- run: TESTING_ENV=node-fetch npm run test:legacy

commonjs:
<<: *nodelts
steps:
- *workspace
- run: npm run build
- run: TESTING_ENV=commonjs npm run test
- run: TESTING_ENV=commonjs npm run test:legacy
jest:
<<: *nodelts
steps:
@@ -134,7 +134,7 @@ workflows:
# could be parallel with build, lint, and unit but it's a slow job
# And circlecifree tier only has 3 concurrent jobs, so overall faster
# to defer
- typecheck:
- typelint:
<<: *triggerable-by-tag
<<: *run-after-first-jobs
- nodefetch3:
@@ -158,7 +158,7 @@ workflows:
# - chrome
# - firefox
- build
- typecheck
- typelint
- commonjs
- jest
filters:
3 changes: 1 addition & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
packages/standalone/*
packages/*/test/fixtures/*
coverage/*
.nyc_output/
docs/js
docs/_site
packages/*/dist/*
packages/fetch-mock/types/fetch-mock-tests.js
3 changes: 3 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -27,5 +27,8 @@ module.exports = {
},
rules: {
'@lwc/lwc/no-async-await': 0,
'jsdoc/require-param-description': 0,
'jsdoc/require-returns-description': 0,
'jsdoc/require-property-description': 0,
},
};
38 changes: 38 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy to GitHub Pages

on:
# Trigger the workflow every time you push to the `main` branch
# Using a different branch name? Replace `main` with your branch’s name
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:

# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4
- name: Install, build, and upload your site
uses: withastro/action@v2
with:
path: ./docs/fetch-mock
package-manager: npm@9

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -11,5 +11,5 @@ coverage/
.nyc_output

# built files
/docs/_site/
/docs/fetch-mock/dist/
/packages/**/dist
3 changes: 2 additions & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"packages/fetch-mock": "10.0.8-alpha.1"
"packages/core": "0.1.1",
"packages/fetch-mock": "10.1.0"
}
8 changes: 0 additions & 8 deletions Gemfile

This file was deleted.

69 changes: 0 additions & 69 deletions Gemfile.lock

This file was deleted.

21 changes: 0 additions & 21 deletions docs/LICENSE

This file was deleted.

19 changes: 0 additions & 19 deletions docs/_about/introduction.md

This file was deleted.

12 changes: 0 additions & 12 deletions docs/_about/previous-versions.md

This file was deleted.

75 changes: 0 additions & 75 deletions docs/_about/quickstart.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/_api-inspection/called.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/_api-inspection/calls.md

This file was deleted.

28 changes: 0 additions & 28 deletions docs/_api-inspection/done.md

This file was deleted.

Loading