Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-pg-migrate

Package Overview
Dependencies
Maintainers
3
Versions
179
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-pg-migrate - npm Package Compare versions

Comparing version 2.14.0 to 2.15.0

index.d.ts

10

CHANGELOG.md
# Change Log
## [2.15.0] (2018-01-11)
### Fixed
- Handle rejections in migration actions [#148](https://github.com/salsita/node-pg-migrate/pull/148)
### Added
- TypeScript declaration file [#147](https://github.com/salsita/node-pg-migrate/pull/147) [#150](https://github.com/salsita/node-pg-migrate/pull/150)
## [2.14.0] (2017-11-14)

@@ -4,0 +14,0 @@

4

dist/migration.js

@@ -84,3 +84,3 @@ 'use strict';

return new Promise(function (resolve) {
return new Promise(function (resolve, reject) {
if (action.length === 2) {

@@ -92,3 +92,3 @@ action(pgm, resolve);

if (typeof result === 'object' && typeof result.then === 'function') {
result.then(resolve);
result.then(resolve).catch(reject);
} else {

@@ -95,0 +95,0 @@ resolve();

@@ -41,3 +41,3 @@ 'use strict';

if (role_options.admin) {
options.push(`IN ROLE ${(0, _lodash.isArray)(role_options.admin) ? role_options.admin.join(',') : role_options.admin}`);
options.push(`ADMIN ${(0, _lodash.isArray)(role_options.admin) ? role_options.admin.join(',') : role_options.admin}`);
}

@@ -44,0 +44,0 @@

@@ -13,2 +13,3 @@ {

"main": "dist/runner.js",
"types": "index.d.ts",
"keywords": [

@@ -33,3 +34,3 @@ "db",

],
"version": "2.14.0",
"version": "2.15.0",
"engines": {

@@ -36,0 +37,0 @@ "node": ">=4.0.0"

@@ -125,2 +125,19 @@ # node-pg-migrate

## Transpiling Babel or Typescript
You can use babel or typescript for transpiling migration files. It requires a little setup to use:
1. Update `scripts` section in your `package.json` to contain `'migrate': 'node migrate.js'`
1. Create `migrate.js` file with contents:
```
// require('babel-core/register')( { ... your babel config ... } );
// require('ts-node').register( { ... your typescript config ... } );
require('./node_modules/node-pg-migrate/bin/node-pg-migrate');
```
Uncomment/Use either babel or typescript hook and adjust your config for compiler.
You can then use migration as usual via e.g. `npm run migrate up`. :tada:
## Defining Migrations

@@ -127,0 +144,0 @@

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