diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index d97e77e1cc..68ad9c1ac4 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -13,5 +13,5 @@ jobs: uses: node-modules/github-actions/.github/workflows/node-test.yml@master with: os: 'ubuntu-latest, macos-latest, windows-latest' - version: '14, 16, 18, 20' + version: '14, 16, 18, 20, 22' install: 'npm i -g npminstall && npminstall' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a2947bc7e2..d8fbb48f9f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,5 +11,4 @@ jobs: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} GIT_TOKEN: ${{ secrets.GIT_TOKEN }} with: - checkTest: false install: 'npm install --legacy-peer-deps --no-package-lock --no-fund' diff --git a/lib/core/dnscache_httpclient.js b/lib/core/dnscache_httpclient.js index 023a59b6c3..ba5e4bcb45 100644 --- a/lib/core/dnscache_httpclient.js +++ b/lib/core/dnscache_httpclient.js @@ -1,7 +1,7 @@ -const dns = require('dns').promises; +const dns = require('node:dns').promises; const LRU = require('ylru'); +const { assign } = require('utility'); const HttpClient = require('./httpclient'); -const utility = require('utility'); const utils = require('./utils'); const IP_REGEX = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; @@ -84,7 +84,7 @@ module.exports = DNSCacheHttpClient; function formatDnsLookupUrl(host, url, address) { if (typeof url === 'string') return url.replace(host, address); - const urlObj = utility.assign({}, url); + const urlObj = assign({}, url); urlObj.hostname = urlObj.hostname.replace(host, address); if (urlObj.host) { urlObj.host = urlObj.host.replace(host, address); diff --git a/package.json b/package.json index b507739bf0..09b0a03734 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "egg-cluster": "^2.0.0", "egg-cookies": "^2.6.1", "egg-core": "^5.4.0", - "egg-development": "^2.7.0", + "egg-development": "^3.0.0", "egg-errors": "^2.3.1", "egg-i18n": "^2.1.1", "egg-jsonp": "^2.0.0", @@ -45,7 +45,7 @@ "extend2": "^1.0.1", "graceful": "^1.1.0", "humanize-ms": "^1.2.1", - "is-type-of": "^1.2.1", + "is-type-of": "^2.1.0", "koa-bodyparser": "^4.4.1", "koa-is-json": "^1.0.0", "koa-override": "^3.0.0", @@ -55,7 +55,7 @@ "sendmessage": "^2.0.0", "urllib": "^2.33.0", "urllib-next": "npm:urllib@^3.22.4", - "utility": "^1.17.0", + "utility": "^2.1.0", "ylru": "^1.3.2" }, "devDependencies": { diff --git a/test/doc.test.js b/test/doc.test.js index 1c855c7c21..de53ea206b 100644 --- a/test/doc.test.js +++ b/test/doc.test.js @@ -18,7 +18,7 @@ describe('test/doc.test.js', () => { const mainNodejsVersion = parseInt(process.versions.node.split('.')[0]); - if (process.platform !== 'win32' && mainNodejsVersion >= 18) { + if (process.platform === 'linux' && mainNodejsVersion >= 18) { const cwd = path.dirname(__dirname); const dumi = path.join(cwd, 'node_modules', '.bin', 'dumi'); await runscript(`cross-env NODE_OPTIONS=--openssl-legacy-provider APP_ROOT=./site ${dumi} build`,