DocPad v6.82.0 Release Notes

Release Date: 2018-09-07 // almost 6 years ago
    • ๐Ÿš€ This release focuses on eliminating the situation where DocPad would initiate with invalid configuration that would then need to be overwritten later, this could cause plugins to not load correctly, invalid configuration persisting, and general instability until the correct configuration was loaded. Now the correct configuration is loaded from commencement.
    • ๐Ÿ‘ Due to new dependency requirements, the minimum supported Node version is now Node version 6, which drops support for Node versions 0.10, 0.12, and 4.
    • ๐Ÿ Fix DocPad not working on windows (regression since v6.81.0)
    • Progress indicator will now pause once the action has completed, and resume on new actions, this allows for cleaner shutdowns with no change of ability
    • ๐Ÿ”ง Graceful shutdown is now offered by the destroyOnExit configuration option, which uses process.on('beforeExit', docpad.onBeforeExit) to destroy DocPad gracefully. This is now possible as we don't have to support Node 0.10. Before we had to do graceful shutdowns in a more complex and manual manner, which resulted in less graceful shutdowns.
    • DocPad will now longer output The action completed successfully., as unless an error has displayed, then evidently everything remains successful
    • ๐Ÿšš Debug log file will now only be removed if it needs to be replaced with another one
    • ๐Ÿ”ง Fixed --no-color CLI argument and color configuration option not working
      • Closes issue #938
      • Color now correctly defaults to environment support
      • Also now supports --colour and --no-colour
      • Removed --prompts CLI argument and prompts config option in favour of the --progress CLI argument and progress config option (as that is all prompts did really)
    • The CLI has been rewritten and simplified
      • The commander package has been swapped out for the cac package
      • Customisation of the out path via a CLI option now occurs via --outPath to remove ambiguity with docpad render out file customisation
      • Introduced --verbose and --debug CLI options, such that one can do --silent --debug
      • For docpad render there is no longer a delay to check for stdin, however if you are using stdin, you must now provide the --stdin CLI argument
        • stdin reading abilities has been moved into the docpad renderStdin method, and render has gained support for it, as well as support for writing an output file
      • Global CLI options are now parsed before DocPad is instantiated, to ensure configuration is correct from initiation, rather than incorrect at instantiation then made correct later
        • This removes built in support for customising this, however, no one should be customising global CLI options anyway
        • As expected, consoleSetup event fires after DocPad is ready, and commands can be added to the cac instance in the event options
          • CLI commands are executed after this event resolves
    • ๐Ÿ”ง Configuration parsing improvements
      • Paths will now be resolved when requested, rather than having their resolutions cached, this results in more reliable path resolution across configuration changes
      • Fixed user configuration never actually being applied (regression since v6.80.1)
      • Fixed user configuration never loading if it was in your home folder yet you had Dropbox present
      • Fixed the loaded user and env configuration debug messages still saying loading
      • The method loadConfigPath now receives a string as its first argument
      • The method getConfigPath has been replaced with the new getPath('config')
      • Leftover DocPad configuration and Plugin configuration will now be correctly removed, before it would linger due to new configuration always being merged into the old, now new configuration swaps out the old
    • ๐Ÿ“ฆ Plugins are now determined via your project's package.json dependencies, rather than scanning the node_modules directory
      • This new approach is dramatically faster, and also allows us to concisely warn on plugin skips
    • ๐Ÿšš Instantiation has removed unneeded complexity (and paired with the aforementioned CLI changes) this ensures DocPad always results in a valid state
      • Removed the configuration option loggers that allowed users to swap our caterpillar for something else
        • No one used it, nor is it optimal to do so. It just introduced a lot of unnecessary complexity and fragility
        • Removed the method setLoggers
      • Constructing DocPad will now always perform the load and ready actions
        • Removed the construction option action that allowed one to override the initiation actions
        • Removed the docpadLoaded event. It was poorly named, non-optimal, and only used by a single outdated plugin.
      • Fixed docpad clean not cleaning a custom outPath
        • DocPad now also outputs which paths were cleaned
        • Path cleaning now uses a more robust way of ensuring DocPad doesn't clean a parent outPath
        • Closes issue #727
    • ๐Ÿ”Œ The Plugin Loader class has been abstracted out to pluginloader and made generic
      • Removes require('docpad').PluginLoader use require('@bevry/pluginloader') instead
      • Removes the methods: loadPluginsIn, loadedPlugin
      • Removes the configuration options: pluginsPaths, enableUnlistedPlugins, skipUnsupportedPlugins, warnUncompiledPrivatePlugins, enabledPlugins
      • Closes issue #391
    • ๐Ÿšš Removed the --force CLI option, it was unnecessary customisation
      • Simplified the installer methods: initGitRepo, initNodeModules, installNodeModule, uninstallNodeModule
    • ๐Ÿšš Removed some long standing deprecations
      • Removed require('docpad').BasePlugin use require('docpad-baseplugin') instead
      • Removed require('docpad').createInstance use require('docpad').create instead
      • Removed docpadUtil.setImmediate (existed for node 0.8 compat which hasn't been there since DocPad 6.72) use setImmediate instead
    • ๐Ÿšš Renamed docpad.inspector to docpad.inspect and removed docpadUtil.inspect
    • ๐Ÿšš Removed the unstable node.js version warning from DocPad v6.55.6
    • ๐Ÿ”ง Removed leftover .babelrc file that was causing everything to be compiled against es2015 instead of what we desire from our package.json configuration
    • โšก๏ธ Updated base files and editions using boundation