Socket
Socket
Sign inDemoInstall

node-mini-migrations

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-mini-migrations - npm Package Compare versions

Comparing version 1.0.0 to 1.3.0

.travis.yml

16

bin/migrator.js
#!/usr/bin/env node
const path = require('path')
const fs = require('fs')
const program = require('commander')
const packageJson = require('../package.json')
const prepareRun = require('../src/prepareRun')
const up = require('../src/up')
const down = require('../src/down')
const prepareRun = (dir) => {
dir = path.resolve(dir)
const driver = require(path.join(dir, 'driver.js'))
const migrations = fs.readdirSync(dir)
.filter(file => !['driver.js'].includes(file))
.filter(file => file.endsWith('.js'))
.map(file => ({id: file, ...require(path.join(dir, file))}))
return {driver, migrations}
}
program

@@ -24,0 +10,0 @@ .version(packageJson.version)

@@ -7,2 +7,22 @@ # Changelog

## [1.3.0] - 2019-11-07
### Changed
- Abstracted prepareRun for use outside
## [1.2.1] - 2019-07-18
### Fixed
- Upgraded package-lock.json
## [1.2.0] - 2019-07-18
### Changed
- Upgraded commander
## [1.1.0] - 2019-07-18
### Security
- Fix security vulnerability CVE-2019-10744 by upgrading sinon
### Added
- Added CI runner from travis
- Added badges to README
## [1.0.0] - 2019-03-09

@@ -9,0 +29,0 @@ ### Fixed

{
"name": "node-mini-migrations",
"version": "1.0.0",
"version": "1.3.0",
"description": "A very small, lightweight and flexible migrations library unconcerned with what database you use",

@@ -20,4 +20,4 @@ "main": "index.js",

"dependencies": {
"commander": "^2.19.0"
"commander": "^3.0.0"
}
}
# Mini Migrations for NodeJS
[![Build Status](https://travis-ci.org/markwylde/node-mini-migrations.svg?branch=master)](https://travis-ci.org/markwylde/node-mini-migrations)
[![David DM](https://david-dm.org/markwylde/node-mini-migrations.svg)](https://david-dm.org/markwylde/node-mini-migrations)
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/markwylde/node-mini-migrations)
[![GitHub package.json version](https://img.shields.io/github/package-json/v/markwylde/node-mini-migrations)](https://github.com/markwylde/node-mini-migrations/releases)
[![GitHub](https://img.shields.io/github/license/markwylde/node-mini-migrations)](https://github.com/markwylde/node-mini-migrations/blob/master/LICENSE)
A really simple node migrations library that is completely independant of any database or file system.

@@ -90,3 +96,9 @@

#### Or inside node app
```javascript
const {up, prepareRun} = require('node-mini-migrations')
up(prepareRun('./migrations'))
```
## License
This project is licensed under the terms of the GPLv3 license.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc