Skip to content

Releases: jaywcjlove/mocker-api

v3.0.2

07 Dec 14:50
Compare
Choose a tag to compare

Buy me a coffee npm version npm bundle size

Documentation v3.0.2: https://raw.githack.com/jaywcjlove/mocker-api/3a616fe/index.html
Comparing Changes: v3.0.1...v3.0.2

v3.0.1

07 Dec 14:44
Compare
Choose a tag to compare

Buy me a coffee npm version npm bundle size

Documentation v3.0.1: https://raw.githack.com/jaywcjlove/mocker-api/c050268/index.html
Comparing Changes: v3.0.1...v3.0.1

npm i mocker-api@

v3.0.0

07 Dec 12:30
Compare
Choose a tag to compare

Buy me a coffee npm version npm bundle size

Documentation v3.0.0: https://raw.githack.com/jaywcjlove/mocker-api/3e4dce7/index.html
Comparing Changes: v2.10.0...v3.0.0

npm i mocker-api@
  • 📖 doc: update document.
  • 🐞 fix: resolve issues caused by path-to-regexp. (#335)
  • 🆎 type: fix pathToRegexp type error. #335
  • 💄 chore(deps): update dependency html-webpack-plugin to ~5.6.0 (#318)
  • 🐞 fix(deps): update dependency path-to-regexp to v8 (#335)
  • 🆎 type: fix watch option type error. #334
  • 🐞 fix(deps): update dependency chokidar to v4 (#334)

After upgrading to path-to-regexp v8, changes were introduced to proxy and mock API routes. The new version enforces stricter syntax rules, eliminates ambiguous patterns, and reserves specific characters to improve clarity. Additionally, updates are required for optional, repeating, or escaped parameters.

⚠️ No wildcard asterisk (.*) - use parameters instead *path, support v3.0.0+

-'GET /api/:owner/:repo/raw/:ref/(.*)'
+'GET /api/:owner/:repo/raw/:ref/*path'
-'GET /api/:owner/:repo/raw/:ref/(.*)': (req, res) => {
+'GET /api/:owner/:repo/raw/:ref/*path': (req, res) => {
  const { owner, repo, ref } = req.params;
  // http://localhost:8081/api/admin/webpack-mock-api/raw/master/add/ddd.md
  // owner => admin
  // repo  => webpack-mock-api
  // ref   => master
-  // req.params[0]   => add/ddd.md
+  // req.params.path => add/ddd.md
  return res.json({
    id: 1,
    owner, repo, ref,
-    path: req.params[0]
+    path: req.params.path
  });
},

v2.10.0

20 Sep 19:34
Compare
Choose a tag to compare

Buy me a coffee npm version npm bundle size

Documentation v2.10.0: https://raw.githack.com/jaywcjlove/mocker-api/e87103a/index.html
Comparing Changes: v2.10.0...v2.10.0

npm i mocker-api@

v2.9.11

24 Jun 12:46
Compare
Choose a tag to compare

Buy me a coffee npm version npm bundle size

Documentation v2.9.11: https://raw.githack.com/jaywcjlove/mocker-api/a3d85da/index.html
Comparing Changes: v2.9.11...v2.9.11

npm i mocker-api@

v2.9.10

26 Nov 11:48
Compare
Choose a tag to compare

Buy me a coffee npm version npm bundle size

Documentation v2.9.10: https://raw.githack.com/jaywcjlove/mocker-api/83e1c19/index.html
Comparing Changes: v2.9.10...v2.9.10

npm i mocker-api@

v2.9.9

25 Nov 10:51
Compare
Choose a tag to compare

npm version npm bundle size

Documentation v2.9.9: https://raw.githack.com/jaywcjlove/mocker-api/ba4e628/index.html
Comparing Changes: v2.9.8...v2.9.9

v2.9.8

17 Feb 10:02
Compare
Choose a tag to compare

npm version npm bundle size

Documentation v2.9.8: https://raw.githack.com/jaywcjlove/mocker-api/be64e9f/index.html
Comparing Changes: v2.9.7...v2.9.8

v2.9.7

17 Feb 09:26
Compare
Choose a tag to compare

npm version npm bundle size

Documentation v2.9.7: https://raw.githack.com/jaywcjlove/mocker-api/b461ffe/index.html
Comparing Changes: v2.9.6...v2.9.7

v2.9.6

06 Dec 05:37
Compare
Choose a tag to compare

npm version npm bundle size

Documentation v2.9.6: https://raw.githack.com/jaywcjlove/mocker-api/e240656/index.html
Comparing Changes: v2.9.5...v2.9.6