Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oclif cli upgrade + type fixes #228

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/dist
/tmp
22 changes: 22 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": [
"oclif",
"oclif-typescript",
"prettier"
],
"rules": {
"unicorn/filename-case": "off"
},
"overrides": [
{
"files": [
"test/**/*"
],
"rules": {
"@typescript-eslint/no-explicit-any": [
"off"
]
}
}
]
}
15 changes: 6 additions & 9 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:

strategy:
matrix:
node-version: [16, 18, 20]
node-version: [18, 20]

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
Expand All @@ -48,9 +48,6 @@ jobs:
git config user.name "Ribby"
git config user.email "[email protected]"

- name: Check format
run: yarn format:check

- name: Lint code
run: yarn lint

Expand All @@ -72,12 +69,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: node
node-version: 20
cache: 'yarn'

- name: Run release script
Expand Down
3 changes: 3 additions & 0 deletions bin/dev.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

node "%~dp0\dev" %*
6 changes: 6 additions & 0 deletions bin/dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env ts-node
// eslint-disable-next-line node/shebang, unicorn/prefer-top-level-await
(async () => {
const oclif = await import('@oclif/core')
await oclif.execute({development: true, dir: __dirname})
})()
6 changes: 0 additions & 6 deletions bin/run

This file was deleted.

22 changes: 0 additions & 22 deletions bin/run-dev.sh

This file was deleted.

7 changes: 7 additions & 0 deletions bin/run.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env node

// eslint-disable-next-line unicorn/prefer-top-level-await
(async () => {
const oclif = await import('@oclif/core')
await oclif.execute({development: false, dir: __dirname})
})()
151 changes: 72 additions & 79 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,98 +1,91 @@
{
"name": "@leapfrogtechnology/sync-db",
"description": "Command line utility to synchronize and version control relational database objects across databases",
"version": "2.0.1",
"version": "3.0.0",
"type": "module",
"types": "dist/index.d.ts",
"exports": "./lib/index.js",
"homepage": "https://github.com/leapfrogtechnology/sync-db",
"repository": "leapfrogetchnology/sync-db",
"bugs": "https://github.com/leapfrogtechnology/sync-db/issues",
"license": "MIT",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"main": "",
"bin": {
"sync-db": "./bin/run.js"
},
"files": [
"/bin/run",
"/bin/run.cmd",
"/lib",
"/assets"
"/bin",
"/dist",
"/npm-shrinkwrap.json",
"/oclif.manifest.json"
],
"bin": {
"sync-db": "./bin/run"
"dependencies": {
"@oclif/core": "^3",
"@oclif/plugin-help": "^5",
"@oclif/plugin-plugins": "^3.7.0",
"chalk": "^5.3.0",
"debug": "^4.3.4",
"esm": "^3.2.25",
"knex": "^2.4.2",
"ramda": "^0.29.1",
"yamljs": "^0.3.0"
},
"devDependencies": {
"@oclif/prettier-config": "^0.2.1",
"@oclif/test": "^3",
"@types/chai": "^4",
"@types/debug": "^4.1.10",
"@types/mocha": "^10",
"@types/node": "^18",
"@types/ramda": "^0.29.7",
"@types/yamljs": "^0.2.33",
"chai": "^4.3.10",
"chai-as-promised": "^7.1.1",
"eslint": "^8",
"eslint-config-oclif": "^5",
"eslint-config-oclif-typescript": "^3",
"eslint-config-prettier": "^9.0.0",
"execa": "^8.0.1",
"get-bin-path": "^10.0.0",
"mocha": "^10",
"oclif": "^4.0.3",
"shx": "^0.3.4",
"ts-node": "^10.9.1",
"typescript": "^5"
},
"oclif": {
"bin": "sync-db",
"commands": "./lib/commands",
"dirname": "sync-db",
"commands": "./dist/commands",
"plugins": [
"@oclif/plugin-help"
]
"@oclif/plugin-help",
"@oclif/plugin-plugins"
],
"topicSeparator": " ",
"topics": {
"hello": {
"description": "Say hello to the world and others"
}
}
},
"scripts": {
"build": "shx rm -rf dist && tsc -b",
"lint": "eslint src test --ext .ts",
"postpack": "shx rm -f oclif.manifest.json",
"posttest": "yarn lint",
"prepack": "yarn build && oclif manifest && oclif readme",
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
"test:cli": "mocha ./test/cli/**/*.test.ts",
"test:unit": "mocha ./test/unit/**/*.test.ts",
"version": "oclif readme && git add README.md"
},
"repository": "https://github.com/leapfrogtechnology/sync-db",
"homepage": "https://github.com/leapfrogtechnology/sync-db",
"bugs": "https://github.com/leapfrogtechnology/sync-db/issues",
"keywords": [
"oclif",
"sync-db",
"dbo",
"db-synchronize",
"synchronize-db"
],
"author": "Kabir Baidhya <[email protected]>",
"contributors": [
"Kabir Baidhya <[email protected]>",
"Saugat Acharya <[email protected]>",
"Shraday Shakya <[email protected]>",
"Safal Raj Pandey <[email protected]>"
],
"scripts": {
"build": "rm -rf lib && tsc -b",
"codecov": "codecov",
"prepack": "yarn build",
"lint": "tslint -c tslint.json 'src/**/*.{ts,js}' 'test/**/*.{ts,js}'",
"lint:fix": "tslint --fix -c tslint.json 'src/**/*.{ts,js}' 'test/**/*.{ts,js}'",
"test": "yarn lint && yarn test:cli && yarn test:unit",
"test:coverage": "yarn test:cli && nyc yarn test:unit",
"test:cli": "mocha ./test/cli/**/*.test.ts",
"test:unit": "mocha ./test/unit/**/*.test.ts",
"watch": "tsc --watch",
"changelog": "./release.sh changelog",
"release": "./release.sh bump",
"format": "prettier --write . '**/*.{ts,js,md,yaml,json}'",
"format:check": "prettier --check . '**/*.{ts,js,md,yaml,json}'",
"doc:update": "oclif-dev readme && prettier --write README.md"
},
"dependencies": {
"@oclif/command": "^1",
"@oclif/config": "^1",
"@oclif/plugin-help": "^3",
"chalk": "^4.0.0",
"debug": "^4.1.1",
"esm": "^3.2.25",
"globby": "^10.0.2",
"knex": "^2.4.2",
"ramda": "^0.29.0",
"ts-node": "^8",
"tslib": "^1",
"yamljs": "^0.3.0"
},
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@oclif/dev-cli": "^1.26.0",
"@oclif/test": "^1",
"@oclif/tslint": "^3",
"@types/chai": "^4.2.7",
"@types/chai-as-promised": "^7.1.2",
"@types/debug": "^4.1.4",
"@types/mocha": "^5",
"@types/node": "^10",
"@types/ramda": "^0.29.0",
"@types/yamljs": "^0.2.30",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"codecov": "^3.8.3",
"execa": "^4.0.0",
"get-bin-path": "^5.0.1",
"mocha": "^10.2.0",
"nyc": "^15.0.0",
"prettier": "2.0.2",
"tslint": "^6.1.3",
"tslint-config-leapfrog": "^1.0.3",
"typescript": "^5.0.2"
},
"engines": {
"node": ">= 14.15.0"
"node": ">= 18.0.0"
}
}
1 change: 0 additions & 1 deletion src/@types/get-bin-path/index.d.ts

This file was deleted.

Loading
Loading