HISTORY.md
KeystoneJS is maintained by @JedWatson and an amazing team of contributors. All contributions are given credit here except for Jed's.
As of version 4 we have moved our changelog to the GitHub releases page. See there for the latest release notes.
Changes for 3.x releases are included below.
pretty option in the locals settingThis is a hotfix release to allow for adding headers when sending emails.
List.getDataList and Field classesGeoLocation field type, thanks Vintesh_revisions models, thanks Jeffreyheight option for TextArea fields was not respected in the Admin UI, thanks Eóin Martinnot in message, thanks Daniel Cousensutc option for Date and DateTime field types, see #1487 for more details.All is not as quiet as this release implies; we are working aggressively through the next big update in the elemental-integration branch, which will see the Admin UI released as a Single Page Application built with Elemental UI components, and the foundation for much better customisation features to come.
If you are interested in being part of Keystone's development team and aren't in our Slack channel, ping @JedWatson to get an invite!
updates, signin and signout, thanks Camille ReyndersparseFormat option for Date / Datetime field types, and more robust validation in DateArraylogger options setting, thanks Johnny EstillesAlso, our site and documentation have been split out into their own repository: keystonejs/keystonejs-site. Please contribute any changes, additions and issues to that new repo going forward.
object-assign plugin for the Admin UI browserify build processKEYSTONE_DEV=true environment variable[email protected] and you should now just use the less options setting, thanks Francesco Nero. Old options will log warnings if you use them.react-select's less file is now dynamically detected, see #1384href method of localfile/s shouldn't use path.join, see #1406googleLookup fails, thanks Daniel CousensformatString for Datetime fields now includes h:m:s a, thanks Al ConnellyKeystone.prototype.static(app) was removed in 0.3.7, has been reintroduced for backwards-compatibilityreact-alt-text is now its own npm package/admin and many files have moved, thanks to Milos Dakic for helping with this.Also in this release: Keystone is completely free of ESLint warnings thanks to the incredible efforts of Camille Reynders and Jed Watson.
bytes package by downgrading it and including it in the pre-built Admin UI packages bundlelist.schema.path("field") would not return the field schema before the List had been registeredevalDependsOn not working correctly with Boolean field typesformat option for Url fields to prevent stripping http/https, thanks Daniel Zurawskiwysiwyg cloudinary images key is no longer required to be global, can be set per-field, thanks Alberto GasparindoSignin(), now exposed as keystone.session.signinWithUser(), thanks Johnny Estilleseditor Object config option for Code fields, thanks Pat Cavitwysiwyg Object config option for Html fields, thanks Pat Cavitframe guard option, thanks Johnny Estilles{ id: ObjectId } can now be provided as Relationship values in data to keystone.createItems(data, options, callback)options.refs can be provided as an option to keystone.createItems(data, options, callback)lang option because language for the Code field type as per the 0.3.x docsipRangeRestrict option, thanks Johnny EstillesupdatedAt, updatedBy, createdAt and createdBy are no longer set on create w/ tracking if already set, thanks Sebastian McKenziekeystone.connect was broken in 0.3.0, it has been replaced by the keystone.set('express', ...) and keystone.set('mongoose', ...) optionsAlso more tests and general cleanup. Thanks especially to Sebastian McKenzie and Johnny Estilles for their work on this release.
This is a major new version of KeystoneJS. The changes are too many to simply enumerate here, however we've done our best to ensure compatibility and feature parity with 0.2.x. If you experience any unexpected issues or behaviours, please let us know by opening a Github Issue.
For notes regarding breaking changes in the release, please see our 0.2.x to 0.3.x Changes wiki page.
Thanks to all our contributors for the huge amount of effort that went into this release, and the ongoing work designing, programming, testing and documenting KeystoneJS.
Express 4 included several breaking changes from Express 3. Keystone simplifies most of these changes, and if you're using keystone.start() to initialise your web server things will probably just work; however the more complicated your app, the more likely you will need to take these changes into account. Please review the Moving to Express 4 Guide for more information.
The Admin UI forms have been rebuilt from the ground up with React.js. This is part of a larger, ongoing effort to move the Admin UI entirely towards a rich, customisable single page web app.
The UI has been cleaned up and improved, and the field types should support the same features and behaviours as in 0.2.x. If any field types or features don't continue to work as expected, please open a GitHub Issue so we can fix it!
importcss plugin for TinyMCE; set wysiwyg importcss, thanks aschwersenzMONGODB_URL environment variable support, thanks jdr0dn3yBoolean fields to false in the Admin UIcors middleware is now available as Keystone.corsstatic options option to control static middleware configuration, thanks Sebastian McKenzieHuge thanks to @wuhaixing for the Chinese translation in this release.
localfile field typelocalfile.options.format is called with the field contextlocalfile.href is now available as a virtualfs-extra so missing paths for localfile uploads will be created automaticallylocalfiles field type has been completely overhauled, now in line with localfile and supports prefix and format optionslocalfiles field has been removed, use the format option instead (like localfile)callback is now correctly optional in keystone.Email.send(), thanks Brett NewmanReferenceError is now thrown when an invalid list is requested with keystone.list, thanks Sebastian McKenzieThis release fixes an issue in the Admin UI introduced in 0.2.34, our sincere apologies to anyone who was affected by this!
TextArray and NumberArray field types, thanks bardzusnyfilename and format optionss for the s3file field, thanks Aleksej Kamyninless and sass options (allows multiple paths to be specified)track optioncloudinary folders option, thanks Johnny Estillesnoedit and initial options for fieldsnocreatewatch option issues, thanks Markus Padourekmongo replica set for using a MongoDB Replica Set, thanks Ivan Fuyivaracsv field delimiter option to specify a custom CSV field delimiter, thanks Louis-Michel Couturekeystone.mount(), thanks Brett Newmantrack option for List that enables tracking of standard metadata on documents, including createdAt, createdBy, modifiedAt, modifiedBy, thanks Johnny Estilles_req_user property is available on documents in pre('save') middleware when the UpdateHandler is used (which includes updates in the Admin UI), thanks Johnny Estilleslib/core/mount, thanks Johnny EstillesBoolean fields works correctlyadditionalPlugins and additionalOptions options for wysiwyg fieldsRelationship field filters option, thanks Johnny Estillesfolder or defaulting to [prefix (if exists)]/[list path]/[path], thanks Johnny Estillesfile limit option, passed to express.limit middleware, thanks Fabrizio FortunatoUpdateHandler.process(), thanks Heracles Kasimisconnect-mongostore to support MongoDB replica sets as the session store database, thanks Abeconnect-redisdefault: true are now checked when creating new items, thanks Aleksandrless-middleware is now updated to version 1.0.3 (new API)With this release, connect-mongo has been removed from Keystone's package.json and all three supported session store packages are optional. If you specify one, be sure to include it as a dependency in your project's package.json (Keystone will warn you on startup if you haven't).
Because of the way npm resolved paths, if you are using Keystone in development mode (via npm link) and using a session store, you have to npm install <session-store> in your local Keystone folder as well or it won't find the package.
cookie signin option to control session persistencesession options option for better control over keys and stores, also exposes the final configuration after start() is called, thanks killerbobjrCloudinaryImage.updateItem() allows updates from data, thanks Carlos Colonsass option, make sure you include node-sass in your project dependencies to use it. thanks Fabrizio Fortunatokeystone.createItems() now creates items in series, not parallelkeystone.createItems()keystone.createItems()id property as part of a field's autokeyfilename: function() {} option, thanks Stefan Aebischerkeystone.initAPI to work correctly when used directly as middleware'session store': 'mongo' to enable this feature.mongo option as an array. Use a MongoDB connection string instead, e.g. 'mongodb://localhost/db_nameView.render() are now passed err, req, reslogger is false/lib/view.js class, thanks Talonkeystone.createItems() and in update scripts, see this gist for an exampleemptyOption optionEmail.send() wasn't consistently asyncrow in custom List.schema.methods.toCSV implementations, provides the original toCSV data for simpler customisation...as well as several other miscellaneous fixes and improvements, thanks to all our contributors who keep making Keystone better!
Also; all dependencies are up to date with their latest published versions, except for express and less-middleware which require further testing to ensure compatibility.
createItems() method to quickly populate data, see this gist for usage instructions and examples.toCSV() method for lists now uses dependency injection and can be asynchronous (just pass callback as the last argument)perPage option for lists that controls the number of items displayed per page in the Admin UI, thanks Galaczi Endre ElekonHttpServerCreated and onHttpsServerCreated events now fired during keystone.start(), allows for integration of things like socket.io.toCSV() method now supported on schemas to transform data when exported in the Admin UIexpress is now available as a property of keystoneS3_REGION environment variable, thanks DrMoriartytrust proxy setting, thanks Robert MedeirosAzureFile field type, thanks Juan Benavides RomeroMarkdown fields, thanks Thomas Pedersen(emergency version bump from 0.2.9 because of white-space issue with new Jade version)
CloudinaryImages fields, thanks Mike CauserNumber fields can now find null valuesMarkdown and Textarea field typesPUT and DELETE http methods in View.onkeystone.pre, keystone.init, keystone.start, keystone.static, keystone.routes and keystone.bindEmailTestRoutesmarked so you can use markdown syntax if desiredCode, uses the CodeMirror editor in the Admin UI, thanks Juan Benavides RomeroThis version also contains the new docs and website developed by @jossmackison and @jedwatson. To view the docs locally, open keystone/docs and run node docs.
hidden option for fieldsautocreate option for Lists (see issue #21)location.requiredPaths field option supports comma-delimited valuesUpdateHandler now updates noedit fields when they are explicitly provided (issue #194)UpdateHandler (issue #196)nav config optionimage/gif, image/png, image/jpeg, image/bmp, image/x-icon, application/pdf, image/x-tiff, image/x-tiff, application/postscript, image/vnd.adobe.photoshop]multi: true as initial fieldslocalFile field type, thanks Alan Shawhidden: true option for listscloudinaryImages fieldskeystone.import(path) method for recusrively requiring all .js / .coffee files in a path relative to the project root, e.g. keystone.import('models'). Similar to but simpler than keystone.importer().env.MONGO_URI, env.MONGO_URL, env.MONGOLAB_URI and env.MONGOLAB_URL, so whatever default you're using, it should be there.keystone.httpServer, thanks B. Augustpre.upload option, or call {list}.fields.{s3filefield}.pre('upload', ...))A bumper release for the new year! We've moved to v0.2.x because some packages have been updated to new minor versions that may cause compatibility issues, specifically:
KeystoneJS now requires mongoose 3.8.5+. Please test compatibility with your application before deploying this update to production.
This version also requires Jade 1.x, which includes some breaking changes from the 0.x branch, particularly to doctype definition. Updating your app should be simple, but again, be sure to test before deploying to production.
One of the other big changes in this release is the work done by Iulian Meghea breaking up all the field templates into individual files, in preparation for introducing field type plugins in the future.
gravatarUrl underscore method, thanks Mike CauserCloudinaryImage fields are initialised, see #28custom engine option for using view engines not natively supported by express, thanks JeremyFouriauxheading as a field path, thanks mbayfieldkeystone.initAPI)moment and parse underscore methods for the date and datetime fieldspaths option to the UpdateHandler to map custom field names to item field paths for processinguploadFile underscore method, for use outside of an updateHandler, thanks bladeykeystone-utils), thanks itzakss3file field, thanks bladeylist.getUniqueValue(path, generator, limit, callback) methodIf you are currently using the br method in your email templates, make sure it is removed or your templates will break.
Note: To run the docs website locally, go to /docs and run node web. It will start up at http://localhost:8080
markdown field typecloudinaryimage(s) fields, thanks bladeykeystone.content class and the start of a page-content management frameworkreq.body / req.query keys on View.on('post' || 'get')keystone.View class. available callbacks are err (when the first argument returned by the query callback is not null, takes a single argument which is the error), none (when the results array is empty or the results argument is null), then (called unless err or none is present and called, takes three arguments: err, results, next)
view.query(as, query, { err: errorHandlerCallback, none: noResultsCallback }) orview.query(as, query).none(noResultsCallback).then(defaultCallback)unique option
true for unique keys within the whole collection, or a filters object for unique keys within a specific set of documentsalt to see the document idutils library has been moved to its own npm package, keystone-utilsYYYY-MM-DD to Do MMM YYYY, it's friendlier
format option for Date and Datetime fields can be used to override this setting on a per-field basis{ heading: 'Heading with dependency', dependsOn: { field: 'value'} }/keystone/list?update/keystone/list?update={"field":"value"}changedOn value when using the standard meta fieldscloudinaryimage fieldcloudinaryimage underscore shortcuts (limit, fill, etc.)format function for location fields now supports a list of fields to include