Skip to content

Commit b4b16f8

Browse files
committed
upgrade dependencies
1 parent 2960f0f commit b4b16f8

File tree

7 files changed

+1639
-1381
lines changed

7 files changed

+1639
-1381
lines changed

.eslintrc

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
"extends": "standard",
33
"rules": {
44
"arrow-parens": ["error", "always"],
5-
"comma-dangle": ["error", "always-multiline"],
5+
"comma-dangle": ["error", {
6+
"arrays": "always-multiline",
7+
"objects": "always-multiline",
8+
"imports": "always-multiline",
9+
"exports": "always-multiline"
10+
}],
611
"max-len": [1, 120, 2],
712
"spaced-comment": "off"
813
}

gulp.d/lib/gulp-prettier-eslint.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use strict'
22

3+
const log = require('fancy-log')
34
const { obj: map } = require('through2')
45
const PluginError = require('plugin-error')
56
const prettierEslint = require('prettier-eslint')
@@ -17,9 +18,9 @@ module.exports = () => {
1718
.concat(' file')
1819
.concat(report.unchanged === 1 ? '' : 's')
1920
.concat(' unchanged')
20-
console.log(`prettier-eslint: ${changed}; ${unchanged}`)
21+
log(`prettier-eslint: ${changed}; ${unchanged}`)
2122
} else {
22-
console.log(`prettier-eslint: left ${report.unchanged} file${report.unchanged === 1 ? '' : 's'} unchanged`)
23+
log(`prettier-eslint: left ${report.unchanged} file${report.unchanged === 1 ? '' : 's'} unchanged`)
2324
}
2425
})
2526

gulp.d/tasks/release.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const File = require('vinyl')
44
const fs = require('fs-extra')
55
const { obj: map } = require('through2')
6-
const Octokit = require('@octokit/rest')
6+
const { Octokit } = require('@octokit/rest')
77
const path = require('path')
88
const vfs = require('vinyl-fs')
99
const zip = require('gulp-vinyl-zip')
@@ -60,26 +60,26 @@ module.exports = (dest, bundleName, owner, repo, token, updateBranch) => async (
6060
const message = `Release ${tagName}`
6161
const bundleFileBasename = `${bundleName}-bundle.zip`
6262
const bundleFile = await versionBundle(path.join(dest, bundleFileBasename), tagName)
63-
let commit = await octokit.gitdata.getRef({ owner, repo, ref }).then((result) => result.data.object.sha)
63+
let commit = await octokit.git.getRef({ owner, repo, ref }).then((result) => result.data.object.sha)
6464
const readmeContent = await fs
6565
.readFile('README.adoc', 'utf-8')
6666
.then((contents) => contents.replace(/^(?:\/\/)?(:current-release: ).+$/m, `$1${tagName}`))
67-
const readmeBlob = await octokit.gitdata
67+
const readmeBlob = await octokit.git
6868
.createBlob({ owner, repo, content: readmeContent, encoding: 'utf-8' })
6969
.then((result) => result.data.sha)
70-
let tree = await octokit.gitdata.getCommit({ owner, repo, commit_sha: commit }).then((result) => result.data.tree.sha)
71-
tree = await octokit.gitdata
70+
let tree = await octokit.git.getCommit({ owner, repo, commit_sha: commit }).then((result) => result.data.tree.sha)
71+
tree = await octokit.git
7272
.createTree({
7373
owner,
7474
repo,
7575
tree: [{ path: 'README.adoc', mode: '100644', type: 'blob', sha: readmeBlob }],
7676
base_tree: tree,
7777
})
7878
.then((result) => result.data.sha)
79-
commit = await octokit.gitdata
79+
commit = await octokit.git
8080
.createCommit({ owner, repo, message, tree, parents: [commit] })
8181
.then((result) => result.data.sha)
82-
if (updateBranch) await octokit.gitdata.updateRef({ owner, repo, ref, sha: commit })
82+
if (updateBranch) await octokit.git.updateRef({ owner, repo, ref, sha: commit })
8383
const uploadUrl = await octokit.repos
8484
.createRelease({
8585
owner,

gulpfile.js

+10-3
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ const formatTask = createTask({
5656
const buildTask = createTask({
5757
name: 'build',
5858
desc: 'Build and stage the UI assets for bundling',
59-
call: task.build(srcDir, destDir, process.argv.slice(2).some((name) => name.startsWith('preview'))),
59+
call: task.build(
60+
srcDir,
61+
destDir,
62+
process.argv.slice(2).some((name) => name.startsWith('preview'))
63+
),
6064
})
6165

6266
const bundleBuildTask = createTask({
@@ -67,7 +71,11 @@ const bundleBuildTask = createTask({
6771
const bundlePackTask = createTask({
6872
name: 'bundle:pack',
6973
desc: 'Create a bundle of the staged UI assets for publishing',
70-
call: task.pack(destDir, buildDir, bundleName),
74+
call: task.pack(
75+
destDir,
76+
buildDir,
77+
bundleName
78+
),
7179
})
7280

7381
const bundleTask = createTask({
@@ -83,7 +91,6 @@ const packTask = createTask({
8391
})
8492

8593
const releasePublishTask = createTask({
86-
desc: 'Publish the release to GitHub by attaching it to a new tag',
8794
name: 'release:publish',
8895
call: task.release(buildDir, bundleName, owner, repo, process.env.GITHUB_API_TOKEN, true),
8996
})

0 commit comments

Comments
 (0)