forked from ThomWright/postgres-migrations
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow migration table name in config (#1)
* allow migration table name in config * empty commit * fix initial migration integration test * 5.3.1 * add workflow for publishing * prepare for publish * fix validate bin * add npmrc for publish * another attempt at publishing * publish using github token * 5.3.2 * Revert "5.3.2" This reverts commit 24379b9. * publish to npm * scoped publish public * add registry url during node setup * update readme
- Loading branch information
Showing
19 changed files
with
279 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Publish package | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
env: | ||
cache-name: postgres-migrations | ||
|
||
jobs: | ||
test-and-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Nodejs | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14.x | ||
registry-url: "https://registry.npmjs.org" | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- run: npm ci | ||
- run: docker pull postgres:13.2 | ||
- env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npm publish --access public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ node_modules | |
*.log | ||
test-reports | ||
dist/ | ||
.vscode | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
dist | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
module.exports = { | ||
extensions: ["ts"], | ||
require: ["ts-node/register"], | ||
verbose: true, | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
{ | ||
"name": "postgres-migrations", | ||
"version": "5.3.0", | ||
"name": "@nektarai/postgres-migrations", | ||
"version": "5.3.1", | ||
"description": "Stack Overflow style database migrations for PostgreSQL", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"bin": { | ||
"pg-validate-migrations": "./dist/bin/validate.js" | ||
}, | ||
"author": "Thom Wright", | ||
"author": "Nektar AI<[email protected]>", | ||
"keywords": [ | ||
"postgres", | ||
"postgresql", | ||
|
@@ -17,25 +17,24 @@ | |
"database", | ||
"db" | ||
], | ||
"homepage": "https://github.com/thomwright/postgres-migrations#readme", | ||
"homepage": "https://github.com/nektarai/postgres-migrations#readme", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:thomwright/postgres-migrations.git" | ||
"url": "[email protected]:nektarai/postgres-migrations.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/thomwright/postgres-migrations/issues" | ||
"url": "https://github.com/nektarai/postgres-migrations/issues" | ||
}, | ||
"engines": { | ||
"node": ">10.17.0" | ||
}, | ||
"scripts": { | ||
"checkPushed": "[ \"$(git rev-list --count @{upstream}..HEAD)\" -eq 0 ] || (echo You have unpushed commits && exit 1)", | ||
"prepublishOnly": "npm run checkPushed && npm test && npm run build", | ||
"check-formatting": "./node_modules/.bin/prettier '**/*.ts' --list-different", | ||
"fix-formatting": "./node_modules/.bin/prettier '**/*.ts' --write", | ||
"prepublishOnly": "npm test && npm run build", | ||
"check-formatting": "prettier '**/*.ts' --list-different", | ||
"fix-formatting": "prettier '**/*.ts' --write", | ||
"lint": "npm run tslint && npm run check-formatting", | ||
"tslint": "tslint 'src/**/*.ts' --type-check --project tsconfig.json --format verbose", | ||
"tslint": "tslint 'src/**/*.ts' --project tsconfig.json --format verbose", | ||
"test-integration": "ava --config ava.config.integration.cjs", | ||
"test-unit": "ava --config ava.config.unit.cjs", | ||
"test": "npm run test-unit && npm run lint && npm run test-integration", | ||
|
@@ -68,4 +67,4 @@ | |
"typescript": "^4.3.4", | ||
"typescript-tslint-plugin": "^1.0.1" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
CREATE TABLE success ( | ||
id integer | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
CREATE TABLE success ( | ||
id integer | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.