Skip to content

Releases: lukeed/ley

v0.8.0

10 Oct 19:26
Compare
Choose a tag to compare

Features

  • Add --esm option to ley new command to generate ESM migration files (#25): 7d99c07
    Thank you @karlhorky~!

Patches

  • Only glob/match TypeScript and JavaScript files when applying migration files (#31): 11deb34
    Thank you @TehShrike~!

Chores


Full Changelog: v0.7.1...v0.8.0

v0.7.1

14 Apr 15:58
Compare
Choose a tag to compare

Patches

  • fix(types): Wrap inline function definition w/ parenthesis (#19): db59295
    Thank you @ryanatkn!

v0.7.0

07 Mar 18:41
Compare
Choose a tag to compare

Features

  • Support Node.js ES Module 🎉 : 93f92a8..0874ea8
    You can now opt into ESM syntax support. Follow the new docs for instructions.

    Note: This was done in a safe way that preserves Node 8.x and 10.x support 😃

Chores

v0.6.0

24 Sep 00:49
Compare
Choose a tag to compare

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

v0.5.0

16 Mar 20:35
Compare
Choose a tag to compare

Features

  • Added new CLI command and Programmatic export (#2): cf9746b

    Using the command line, this is now possible on Linux, OSX, and Windows:

    # Sequential
    $ ley new users  #=> migrations/00000-users.js
    $ ley new teams  #=> migrations/00001-teams.js
    
    # Timestamp
    $ ley new users --timestamp #=> migrations/1584389617-users.js
    $ ley new teams --timestamp #=> migrations/1584389631-teams.js
    
    # Customize Filename / Extension
    $ ley new users.ts #=> migrations/#####-users.ts
    $ ley new create-teams #=> migrations/#####-create-teams.js
    $ ley new "alter admin users" #=> migrations/#####-alter-admin-users.js
    
    # Modify Prefix Length (non-timestamp only)
    $ ley new users.ts --length 3 #=> migrations/###-users.ts
    

Patches

  • Fix filename sorting for numeric/"natural" sorting: 529b2df
    Affects 001.js vs 00002.js – was ['00002.js', '001.js'] now ['001.js', '00002.js']