Skip to content

v0.6.0

Choose a tag to compare

@lukeed lukeed released this 24 Sep 00:49
· 29 commits to master since this release

Breaking

  • Removed --client and opts.client options (#11): b167ca1
    Update: Rename any previous usage to --driver and opts.driver
    Please read #11 (comment) for full details.

Features

  • Add custom driver support! (#11): b167ca1
    You may now bring custom client driver implementations, so long as they adhere to the Driver implementation!

    This is available as CLI and API options, and may also be set through a exports.driver key within a ley.config.js file.
    Please refer to the new Drivers documentation for more information.

    # specify internal driver (skips auto-detect)
    $ ley up --driver postgres
    
    # specify local custom driver (skips auto-detect)
    $ ley up --driver path/to/local/driver.js
    
    # use third-party module driver
    $ ley up --driver npm_package_name
  • Add ley status command (#10): 70f9c93..6a7b743
    The status command (available via both CLI and API) checks for outstanding migration files.
    In other words, it tells you how many up migrations have not yet been applied.
    You can think of this like a "dry run" for ley up command.
    (See PR for screenshots.)

  • Allow async config file contents (#9): 5b6aaf0
    Thank you @TehShrike~!

    Allows for a ley.config.js file to directly export a Promise or asynchronous function that yields your config:

    // ley.config.js
    module.exports = import('./env.mjs').then(details => {
      return { ...details, host: 'localhost' };
    });
    
    // or
    module.exports = async function () {
      return { /* whatever */ };
    }

Patches

Chores

  • (deps) Bump kleur version: 11a425b
  • (deps) Bump mk-dirs version: cae451d
  • (deps) Bump totalist version: 0770626
  • (deps) Swap test runner: b90c61c
  • (CI) Update Action job config: 767fd8c
  • (CI) Update badge image: c92818e
  • (tests) Move fixtures into subdirectory: c575213
  • (readme) Update formatting: af93879, 82880f8
  • (readme) Add opts.require docs: 53ac405