Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Releases: ConjureLabs/route

2.0.0-rc2

13 Dec 23:01
Compare
Choose a tag to compare
2.0.0-rc2 Pre-release
Pre-release
  • support exported array of route handlers
  • support exported array of middleware funcs

2.0.0-rc1

09 Sep 03:15
e0d62c4
Compare
Choose a tag to compare
2.0.0-rc1 Pre-release
Pre-release
Merge pull request #13 from ConjureLabs/v2

V2

1.2.0

01 Aug 21:07
2e53789
Compare
Choose a tag to compare

Patches

  • Changed to supporting .routes.json (not routes.json) for resolved config
  • Added support for .routes.js config

1.1.0

01 Aug 20:45
e44d80f
Compare
Choose a tag to compare

Features

Direct function exports

When using crawSync you can now export functions directly.

module.exports = (req, res) => res.send('works')

Or an array of handlers

const handlers = []
handlers.push((req, res, next) => {
  req.asdf = 123
  next()
})
handlers.push((req, res) => {
  res.send(req.asdf) // '123'
})
module.exports = handlers

Resolved configuration jsons

Another feature added to syncCrawl is support for saving route configs in .json files, which are resolved as files as crawled.

.
└── routes
    ├─── routes.json             # { a: 123 }
    ├─── account                 # resolves { a: 123 }
    │   ├── routes.json          # { b: 456 }
    │   ├── get.js               # resolves { a: 123, b: 456 }
    └── get.js                   # resolves { a: 123 }

Inline config (direct in a Route constructor) overrides any resolved values.

Patches

  • bumped dependencies
  • some general housekeeping
  • restricting node engine to 12.x.x
  • added an examples directory

1.1.0-rc1

01 Aug 20:34
a80871b
Compare
Choose a tag to compare
1.1.0-rc1 Pre-release
Pre-release
Merge pull request #10 from ConjureLabs/dont-always-need-Route

Allow exporting direct functions

1.0.0

29 Dec 00:50
Compare
Choose a tag to compare
release 1.0.0

0.8.1

07 Jan 20:53
Compare
Choose a tag to compare

Patches

  • Fixed bug where multiple wildcard routes, in same dir, would splice out eachother

0.8.0

17 Dec 18:17
Compare
Choose a tag to compare

Features

  • custom file handling now receives a second context argument

0.7.0

13 Dec 11:33
644a08e
Compare
Choose a tag to compare

Features

  • fileHandler option for route crawling, to handle fallback file processing

Changes

  • custom verb filename handling now must be passed as verbs in the options hash (rather than a straight second argument)

0.6.1

24 Nov 20:31
Compare
Choose a tag to compare

Patches

  • Fixed issue with filename matching expression