Skip to content

Commit

Permalink
chore: prepare 2.0 of d2 (#100)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Remove deprecated `d2-cluster seed` command, and update `d2-style` to 4.1.0.

- For changelog of what has changed with cli-style, see https://github.com/dhis2/cli-style/blob/master/CHANGELOG.md#breaking-changes for a list of changes.

- `d2-cluster seed` has been deprecated in favour of `d2-cluster db restore`, see `d2 cluster db --help` for more information on usage.
  • Loading branch information
varl authored Jul 15, 2019
1 parent bd004b1 commit 52d4f00
Show file tree
Hide file tree
Showing 8 changed files with 527 additions and 277 deletions.
38 changes: 2 additions & 36 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,39 +1,5 @@
const SEVERITY = 2
const { config } = require('@dhis2/cli-style')

module.exports = {
root: true,

parser: 'babel-eslint',

env: {
browser: true,
node: true,
jest: true,
},

parserOptions: {
// latest standard is ok, eq. to 9
ecmaVersion: 2018,
ecmaFeatures: {
jsx: true,
modules: true,
},
},

rules: {
'max-params': [
SEVERITY,
{
max: 3,
},
],
'prefer-const': [
SEVERITY,
{
destructuring: 'any',
ignoreReadBeforeAssign: false,
},
],
'no-mixed-spaces-and-tabs': [SEVERITY],
},
extends: [config.eslint],
}
6 changes: 6 additions & 0 deletions .huskyrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
hooks: {
'commit-msg': 'd2-style commit check',
'pre-commit': 'd2-style validate',
},
}
19 changes: 3 additions & 16 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
const { config } = require('@dhis2/cli-style')

module.exports = {
printWidth: 80,
tabWidth: 4,
useTabs: false,
semi: false,
singleQuote: true,
trailingComma: 'es5',
bracketSpacing: true,
jsxBracketSameLine: false,
jsxSingleQuote: false,
arrowParens: 'avoid',
rangeStart: 0,
rangeEnd: Infinity,
proseWrap: 'preserve',
requirePragma: false,
insertPragma: false,
endOfLine: 'lf',
...require(config.prettier),
}
9 changes: 1 addition & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,10 @@
],
"license": "BSD-3-Clause",
"devDependencies": {
"@dhis2/cli-style": "3.3.4",
"husky": "^3.0.0",
"@dhis2/cli-style": "4.1.0",
"tape": "^4.11.0",
"tape-await": "^0.1.2"
},
"husky": {
"hooks": {
"commit-msg": "d2-style commit check",
"pre-commit": "d2-style js apply"
}
},
"scripts": {
"test": "tape packages/**/tests/*.js"
}
Expand Down
47 changes: 0 additions & 47 deletions packages/cluster/src/commands/seed.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@dhis2/cli-cluster": "1.4.0",
"@dhis2/cli-create": "1.4.0",
"@dhis2/cli-helpers-engine": "1.3.0",
"@dhis2/cli-style": "3.3.4",
"@dhis2/cli-style": "4.1.0",
"@dhis2/cli-utils": "1.4.0",
"cli-table3": "^0.5.1",
"envinfo": "^7.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/main/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const command = namespace('d2', {
yargs.command(require('@dhis2/cli-app'))
yargs.command(require('@dhis2/cli-cluster'))
yargs.command(require('@dhis2/cli-create'))
yargs.command(require('@dhis2/cli-style'))
yargs.command(require('@dhis2/cli-style').command)
yargs.command(require('@dhis2/cli-utils'))
yargs.commandDir('commands')
},
Expand Down
Loading

0 comments on commit 52d4f00

Please sign in to comment.