Release Notes
0.7.4
grindjs
- Fixed an issue in
SessionMiddlewareBuilder
where passing theapp
instance as part of the config was causing Redis to error
0.7.3
assets
- Explicitly added
Cache-Control: no-cache
toCompileController
in debug mode
grindjs
- Updated
Router.load
to passthrough all group args to the loader
0.7.2
assets
- Added
--published-base-url
option toassets:publish
to allow for specifying a different host to serve published assets on Cache-Control
/Expires
are no longer set when app is in debug mode- Fixed a bug in
CompileController
that cached withexpires
instead oflastModifiedDate
- Changed caching when app is in debug to use
global.__grindAssetsCache
which will maintain memory cache during watch reloads - Removed
ws
optional dependency
grindjs
- Fixed bug in DatabaseStore where it wasn’t getting a valid db connection
stone
StoneEngine
andCompiler
now emit events
0.7.1
assets
- Added CORS headers to allow all requests to assets
db
- Fixed a bug where Postgres passwords wouldn’t be handled correctly
- Added support for using
database
as the db name for Postgres
grindjs
- Added default value to Grind constructor
orm
- Resolved a bug in RelationValidator where the current transaction wasn’t correctly passed through and it could cause queries to leak out of the transaction when checking of their existence.
stone
- Pinning acorn to 5.1.0 pending ternjs/acorn#575
support
- Added conditional check for
fs.lchown
as it doesn‘t exist on all platforms/versions
0.7.0
assets
- 🚀 Added support for live reload to automatically update scss/css files in the browser and reload the window when js files changes (learn more).
- This is turned off by default, but can be turned on by setting the
assets.live_reload
config value totrue
. - Requires the ws package
- Do not use this in production
- This is turned off by default, but can be turned on by setting the
- Added support for Stone
- Removed process.exit in PublishCommand
- Removed unnecessary config files
- Removed dependency on grind-html
- Switched package errors to MissingPackageError
- Updated dependencies:
- dateformat: 1.0.12 => 2.0.0
- ignore: 3.1.5 => 3.3.3
cache
- Updated
ConfigBuilder
to support the new globalredis.json
config file (learn more) - Added
DatabaseStore
that works withgrind-db
- Renamed
Config
toConfigBuilder
andCache
toCacheBuilder
for better consistency with other providers
cli
- Added
SchedulerJob.withTimeout(ms)
andSchedulerJob.withoutTimeout()
- Added
Runner
class that mirrorsHttpServer
in grind-framework - Added
Watcher
to allow commands to opt-in to watch- This will allow for never-ending commands to toggle on
watch
and allow for hot reloading of code during development
- This will allow for never-ending commands to toggle on
- Fixed bug in
SchedulerJob
that didn’t pass expected args when creating an instance ofCommand
- Renamed
SchedulerJob.provider
toSchedulerJob.driver
to reduce confusion - Updated
Command.spawn()
to make the child process accessible
example-api
- Updated to Grind 0.7
- Replaced usage of the
babel-node
cli wrapper by integratingbabel-register
directly into the booters (this should speed things up slightly and remove unnecessary headaches when forking). - Updated
Cli
booter to use the newRunner
class
example-web
- Updated to Grind 0.7
- Updated design to better reflect the official Grind site
- Switched from Nunjucks to Stone, Grind’s new official first party templating engine
- Replaced usage of the
babel-node
cli wrapper by integratingbabel-register
directly into the booters (this should speed things up slightly and remove unnecessary headaches when forking). - Fixed a bug in
ErrorHandler
when comparing error codes - Updated
Cli
booter to use the newRunner
class
grindjs
- The main
Grind
application class now extends EventEmitter and publishes a few events:boot
router:boot
listen
shutdown
- Initial support for using websockets with Grind:
Grind.listen
will now create it‘s own Server instance and make it available to thelisten
event so you can use any ws framework you’d like- Added
Router.upgrade()
to make it easier to support multiplews
instances
- Introduced a pattern for registering middleware builders
- Grind ships with support for the following middleware (off by default in API, configured via a
routing.json
config file):- Compression
- Cookie
- Session + Flash
- Method Override
- Added
RoutingProvider
to hook into Router’s boot process and add custom middleware builders. - Any provider can add middleware builders by listening to the
router:boot
event.
- Grind ships with support for the following middleware (off by default in API, configured via a
- Added
Router.load()
to load routes from a file or directory (learn more) - Added
UrlGenerator.current()
- Added
req.flashInput()
,res.flashInput()
,res.flash()
andres.flashError()
- Added
MissingPackageError
to formalize a pattern to alert of a missing package.MissingPackageError
will detect when the project is using yarn or npm and adjusts it’s recommended command accordingly - Custom error handlers can now send a response
- Added
Log.deprecated
to formally warn of deprecations
ErrorHandler
will now properly handle custom handlers throwing errors- Stripped trailing slash in resource routes from index/create
- Updated
ChalkedConsoleLogger
to use a chalk instance UrlGenerator
bug fixes:- If a URL was passed in with a query string, the parameters object would be ignored
- Passing in a hash would lead to broken URLs
- Routes with optional params would include a trailing slash
ProviderCollection
no longer extends Array- As part of this change,
providers.push()
has been renamed toproviders.add()
- As part of this change,
- Performance improvents throughout
- Updated dependencies:
- body-parser: 1.15.2 => 1.17.2
- chalk: 1.1.3 => 2.0.1
- chokidar: 1.6.0 => 1.7.0
- express: 4.13.x => 4.14.1
- find-root: 1.0.0 => 1.1.0
- json5: 0.4.0 => 0.5.1
html
- Added support for old input to
FormBuilder
- Added trailing slash to
FormBuilder.input()
for consistency withHtmlBuilder
- Fixed
FormBuilder._transforKey()
incorrectly stripping arrays - Fixed
FormBuilder.model
conflicting between property and function - Fixed a bug in
HtmlBuilder.entities()
that wouldn‘t render numbers - Fixed bug in
FormBuilder.textarea()
that would error on null value - Fixed bug in
HtmlBuilder._listing()
- Fixed bug in
HtmlBuilder.attributes()
when passing in null - Fixed errors in
FormBuilder._getSelectedValue()
when nulls are passed in - Fixed incorrect enumeration in
FormBuilder._optionGroup()
causing an error - Fixed incorrect enumeration in
FormBuilder.select()
causing an error - Fixed incorrect values returned from Form
Builder.selectMonth()
- Fixed issue in
FormBuilder._getCheckboxCheckedState()
where it would fail to compare values of different types (1 vs “1”) - Reordered logic in
FormBuilder.getValueAttribute()
to boost performance - Replaced
html-entities
withhe
- Updated CSRF integration with FormBuilder
orm
- Added
QueryBuilder.paginate()
- Added
QueryBuilder.orFail()
- Added
ModelNotFoundError
- Improved date handling:
- Added
Model.useTimestamps
as a way to turn off timestamps - Added
Model.createdAt
+Model.updatedAt
to define timestamp column names - Added
Model.dates
,Model.asDate()
andModel.asDatabaseDate()
to convert DB dates to/from dates
- Added
- Improved
Model.describe()
- Fixed a bug in
QueryBuilder.eager()
that was reassigning filters - Deprecated
QueryBuilder.subset()
- Deprecated support for Objection 0.4.x
queue
- Added
ConfigBuilder
that supports the new globalredis.json
config file (learn more) - Cleaned up legacy code in commands
- Switched to use grind-support’s inflector
- Added implementation for
Queue.destroy()
- Fixed a bug where failed jobs called
done()
twice - Added
isDelayedFor()
function
Substantial changes are coming to Queue, checkout grindjs/queue#4 for more information.
stone
This is the initial release of Stone for Grind. Stone is syntactically based on Laravel’s Blade, however the internally implementation is completely independent.
support
- Added
Obj.filter(obj, callback(key, value))
to allow you to filter the entries in an object by keys and/or values - Added
Obj.only(obj, keys)
as a quick way to filter an object to only the passed in keys - Added
Obj.except(obj, keys)
as a quick way to filter an object to exclude the passed in keys - Added
Str.ascii
to convert or strip unicode characters to ascii - Added
Str.slug
, largely based on theslug
package but avoids the slow call to unicode.org - Dropped dependency on
fs-promise
:- On platforms running Node 8 or later,
FS
takes advantage of the newpromisify
util - On older platforms, each method has been explicitly implemented with promise support
fs-promise
is slow to load, causinggrind-support
to take 40ms+ to load vs 5ms without it
- On platforms running Node 8 or later,
-
recursive-readdir
andmkdirp
are now required as-needed instead of upfront, as most apps won‘t use them
- Added
Watcher
class to abstract logic that requires restarting a piece of code when files change
toolkit
Updated for Grind 0.7
validation
This is the initial release of Validation for Grind. Validation is powered by the popular Joi validation package.
view
- Refactored to support different view engines rather than being tied to Nunjucks.
- The default view engine is now Stone.
- Nunjucks integration is now moved to grindjs/nunjucks.