From 6f4ef15673019791ec6662258f3e151787f80aab Mon Sep 17 00:00:00 2001 From: ppoffice <8849362+ppoffice@users.noreply.github.com> Date: Sat, 3 Feb 2024 00:29:06 -0800 Subject: [PATCH] chore: further upgrade dependencies & fix format --- include/config.js | 2 +- include/dependency.js | 2 +- include/migration/v2_v3.js | 2 +- include/register.js | 2 +- layout/common/comment.jsx | 2 +- layout/common/donates.jsx | 2 +- layout/common/plugins.jsx | 2 +- layout/common/search.jsx | 2 +- layout/common/share.jsx | 2 +- layout/common/widgets.jsx | 2 +- package.json | 12 ++++++------ scripts/index.js | 2 +- 12 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/config.js b/include/config.js index 184a733e3..aa05d0e3d 100644 --- a/include/config.js +++ b/include/config.js @@ -9,7 +9,7 @@ const { Migrator } = require('hexo-component-inferno/lib/core/migrate'); const { SchemaLoader } = require('hexo-component-inferno/lib/core/schema'); const { yellow } = require('./util/console'); -const logger = typeof createLogger === "function" ? createLogger() : createLogger.default(); +const logger = typeof createLogger === 'function' ? createLogger() : createLogger.default(); function loadThemeConfig(hexo, cfgPaths) { const configs = cfgPaths.map(cfgPath => fs.readFileSync(cfgPath)) diff --git a/include/dependency.js b/include/dependency.js index 9e860d52e..886380b70 100644 --- a/include/dependency.js +++ b/include/dependency.js @@ -4,7 +4,7 @@ const createLogger = require('hexo-log'); const packageInfo = require('../package.json'); const { yellow, red, green } = require('./util/console'); -const logger = typeof createLogger === "function" ? createLogger() : createLogger.default(); +const logger = typeof createLogger === 'function' ? createLogger() : createLogger.default(); module.exports = hexo => { function checkDependency(name, reqVer) { diff --git a/include/migration/v2_v3.js b/include/migration/v2_v3.js index ab3dd1fe0..0a2fd2dcd 100644 --- a/include/migration/v2_v3.js +++ b/include/migration/v2_v3.js @@ -2,7 +2,7 @@ const createLogger = require('hexo-log'); const deepmerge = require('deepmerge'); const Migration = require('hexo-component-inferno/lib/core/migrate').Migration; -const logger = typeof createLogger === "function" ? createLogger() : createLogger.default(); +const logger = typeof createLogger === 'function' ? createLogger() : createLogger.default(); module.exports = class extends Migration { constructor() { diff --git a/include/register.js b/include/register.js index 719e240da..d7987630f 100644 --- a/include/register.js +++ b/include/register.js @@ -1,6 +1,6 @@ const createLogger = require('hexo-log'); -const logger = typeof createLogger === "function" ? createLogger() : createLogger.default(); +const logger = typeof createLogger === 'function' ? createLogger() : createLogger.default(); module.exports = hexo => { logger.info('=== Registering Hexo extensions ==='); diff --git a/layout/common/comment.jsx b/layout/common/comment.jsx index d3afed2f3..35df4c657 100644 --- a/layout/common/comment.jsx +++ b/layout/common/comment.jsx @@ -2,7 +2,7 @@ const createLogger = require('hexo-log'); const { Component } = require('inferno'); const view = require('hexo-component-inferno/lib/core/view'); -const logger = typeof createLogger === "function" ? createLogger() : createLogger.default(); +const logger = typeof createLogger === 'function' ? createLogger() : createLogger.default(); module.exports = class extends Component { render() { diff --git a/layout/common/donates.jsx b/layout/common/donates.jsx index 05aa5bc03..56c41e40b 100644 --- a/layout/common/donates.jsx +++ b/layout/common/donates.jsx @@ -2,7 +2,7 @@ const createLogger = require('hexo-log'); const { Component } = require('inferno'); const view = require('hexo-component-inferno/lib/core/view'); -const logger = typeof createLogger === "function" ? createLogger() : createLogger.default(); +const logger = typeof createLogger === 'function' ? createLogger() : createLogger.default(); module.exports = class extends Component { render() { diff --git a/layout/common/plugins.jsx b/layout/common/plugins.jsx index baf608287..bd3fc9cd3 100644 --- a/layout/common/plugins.jsx +++ b/layout/common/plugins.jsx @@ -2,7 +2,7 @@ const createLogger = require('hexo-log'); const { Component, Fragment } = require('inferno'); const view = require('hexo-component-inferno/lib/core/view'); -const logger = typeof createLogger === "function" ? createLogger() : createLogger.default(); +const logger = typeof createLogger === 'function' ? createLogger() : createLogger.default(); module.exports = class extends Component { render() { diff --git a/layout/common/search.jsx b/layout/common/search.jsx index f097401a2..fcd729095 100644 --- a/layout/common/search.jsx +++ b/layout/common/search.jsx @@ -2,7 +2,7 @@ const createLogger = require('hexo-log'); const { Component } = require('inferno'); const view = require('hexo-component-inferno/lib/core/view'); -const logger = typeof createLogger === "function" ? createLogger() : createLogger.default(); +const logger = typeof createLogger === 'function' ? createLogger() : createLogger.default(); module.exports = class extends Component { render() { diff --git a/layout/common/share.jsx b/layout/common/share.jsx index a37fe77e0..7b3ed2bfb 100644 --- a/layout/common/share.jsx +++ b/layout/common/share.jsx @@ -2,7 +2,7 @@ const createLogger = require('hexo-log'); const { Component } = require('inferno'); const view = require('hexo-component-inferno/lib/core/view'); -const logger = typeof createLogger === "function" ? createLogger() : createLogger.default(); +const logger = typeof createLogger === 'function' ? createLogger() : createLogger.default(); module.exports = class extends Component { render() { diff --git a/layout/common/widgets.jsx b/layout/common/widgets.jsx index f7c76664a..6f84af6d7 100644 --- a/layout/common/widgets.jsx +++ b/layout/common/widgets.jsx @@ -3,7 +3,7 @@ const { Component } = require('inferno'); const view = require('hexo-component-inferno/lib/core/view'); const classname = require('hexo-component-inferno/lib/util/classname'); -const logger = typeof createLogger === "function" ? createLogger() : createLogger.default(); +const logger = typeof createLogger === 'function' ? createLogger() : createLogger.default(); function formatWidgets(widgets) { const result = {}; diff --git a/package.json b/package.json index f271765e6..6d0848577 100644 --- a/package.json +++ b/package.json @@ -21,23 +21,23 @@ "lint": "eslint --ext .js --ext .jsx --ext .json ." }, "devDependencies": { - "eslint": "^8.6.0", + "eslint": "^8.56.0", "eslint-config-hexo": "^5.0.0", - "eslint-plugin-json": "^3.0.0", - "eslint-plugin-react": "^7.17.0" + "eslint-plugin-json": "^3.1.0", + "eslint-plugin-react": "^7.33.2" }, "dependencies": { "bulma-stylus": "0.8.0", "deepmerge": "^4.3.1", "hexo": "^7.1.1", - "hexo-component-inferno": "^2.0.2", + "hexo-component-inferno": "^2.0.4", "hexo-log": "^4.1.0", "hexo-pagination": "^3.0.0", "hexo-renderer-inferno": "^0.1.3", "hexo-renderer-stylus": "^3.0.1", "hexo-util": "^3.2.0", - "inferno": "^7.3.3", - "inferno-create-element": "^7.3.3", + "inferno": "^7.4.11", + "inferno-create-element": "^7.4.11", "moment": "^2.30.1", "semver": "^7.5.4" } diff --git a/scripts/index.js b/scripts/index.js index 1db65d2c5..b9ac0f76e 100644 --- a/scripts/index.js +++ b/scripts/index.js @@ -1,7 +1,7 @@ /* global hexo */ const createLogger = require('hexo-log'); -const logger = typeof createLogger === "function" ? createLogger() : createLogger.default(); +const logger = typeof createLogger === 'function' ? createLogger() : createLogger.default(); /** * Print welcome message