Skip to content

Commit

Permalink
feat: upgrade dependencies
Browse files Browse the repository at this point in the history
BREAKING CHANGE: require node v8+
  • Loading branch information
gregberge committed Aug 28, 2019
1 parent b7f6585 commit 2d5d32f
Show file tree
Hide file tree
Showing 8 changed files with 3,177 additions and 1,117 deletions.
11 changes: 7 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"presets": [
["env", {
"targets": {
"node": "6"
[
"@babel/preset-env",
{
"targets": {
"node": "8"
}
}
}]
]
]
}
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
/lib/
package.json
CHANGELOG.md
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"trailingComma": "all",
"semi": false
}
20 changes: 13 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,22 @@
"smooth-code": "./bin/smooth-code"
},
"scripts": {
"prepublish": "npm run build",
"build": "babel -d lib src"
"prepublishOnly": "npm run build",
"format": "prettier --write \"**/*.{js,md,mdx}\"",
"build": "babel -d lib src",
"release": "standard-version && conventional-github-releaser --preset angular"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-preset-env": "^1.6.0"
"@babel/cli": "^7.5.5",
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"conventional-github-releaser": "^3.1.3",
"prettier": "^1.18.2",
"standard-version": "^7.0.0"
},
"dependencies": {
"commander": "^2.11.0",
"mz": "^2.6.0",
"opn": "^5.1.0"
"commander": "^3.0.0",
"mz": "^2.7.0",
"open": "^6.4.0"
}
}
4 changes: 2 additions & 2 deletions src/commands/solution.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { exec } from 'mz/child_process'
import opn from 'opn'
import open from 'open'

async function getProjectUrl() {
const remoteStr = String(await exec('git remote -v'))
Expand All @@ -13,7 +13,7 @@ export default program =>
.description('Get the solution of an exercise')
.action(async (exercise, options) => {
const projectUrl = await getProjectUrl()
opn(
open(
`${projectUrl}/compare/start-exercise-${exercise}...end-exercise-${exercise}`,
{ wait: false },
)
Expand Down
5 changes: 4 additions & 1 deletion src/commands/tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ export default program =>
.description('Tag all exercises [only for trainer]')
.action(async () => {
const logs = String(await exec('git log --pretty=oneline'))
const commits = logs.split('\n').map(parseLogLine).filter(x => x)
const commits = logs
.split('\n')
.map(parseLogLine)
.filter(x => x)
console.log(`${commits.length} valid commits detected`)
for (const commit of commits) {
await exec(`git tag -f end-exercise-${commit.exercise} ${commit.hash} `)
Expand Down
1 change: 0 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import program from 'commander'
import { exec } from 'mz/child_process'
import pkg from '../package.json'
import tag from './commands/tag'
import start from './commands/start'
Expand Down
Loading

0 comments on commit 2d5d32f

Please sign in to comment.