Releases: lukeed/ley
v0.8.0
Features
- Add
--esm
option toley 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
- Recommend
tsm
instead ofts-node
for TS support (#23): 498186a
Thank you @karlhorky~!
Full Changelog: v0.7.1...v0.8.0
v0.7.1
v0.7.0
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
- Upgrade
uvu
version: cd2a5e8 - Enable GitHub Sponsor badge: f28b592
- Add "Typed Migrations" README section (#14): 39f6052
Thank you @karlhorky! - Add basic config examples to README (#12): f5da929
Thank you @karlhorky!
v0.6.0
Breaking
- Removed
--client
andopts.client
options (#11): b167ca1
Update: Rename any previous usage to--driver
andopts.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 theDriver
implementation!This is available as CLI and API options, and may also be set through a
exports.driver
key within aley.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
Thestatus
command (available via both CLI and API) checks for outstanding migration files.
In other words, it tells you how manyup
migrations have not yet been applied.
You can think of this like a "dry run" forley 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
- Remove useless
catch
clauses (#8): c97dc45
Thank you @TehShrike - Remove unnecessary character escapes (#7): 910fb11
Thank you @TehShrike
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
Features
-
Added
new
CLI command and Programmatic export (#2): cf9746bUsing 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
Affects001.js
vs00002.js
– was['00002.js', '001.js']
now['001.js', '00002.js']