From b05586a76693050c33dad439b1c11943c87318ce Mon Sep 17 00:00:00 2001 From: hyj1991 Date: Wed, 28 Apr 2021 17:20:55 +0800 Subject: [PATCH 1/4] feat: support node-v16.x --- .github/workflows/nodejs.yml | 2 +- README.md | 1 + appveyor.yml | 1 + package.json | 6 +++--- scripts/7u.js | 1 + scripts/common.js | 1 + 6 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 64f6e0f..3d7784e 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: os: [ ubuntu-latest, macOS-latest ] - node-version: [ 8, 9, 10, 11, 12, 13, 14, 15 ] + node-version: [ 8, 9, 10, 11, 12, 13, 14, 15, 16 ] steps: - name: Checkout Git Source uses: actions/checkout@master diff --git a/README.md b/README.md index 228f29d..fb9b114 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ xprofiler 插件支持三大主流操作系统: - v13.x - v14.x - v15.x +- v16.x 更低的版本因为已经不在官方 LTS 计划中,故正常情况下不再支持。 diff --git a/appveyor.yml b/appveyor.yml index d325640..a263f3b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,6 +14,7 @@ environment: - nodejs_version: "13" - nodejs_version: "14" - nodejs_version: "15" + - nodejs_version: "16" # Install scripts. (runs after repo cloning) install: diff --git a/package.json b/package.json index 5f7b765..89eae8f 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ }, "homepage": "https://github.com/X-Profiler/xprofiler#readme", "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.3", + "@mapbox/node-pre-gyp": "^1.0.4", "moment": "^2.29.1", "nan": "^2.14.2", "uuid": "^8.3.2", @@ -73,11 +73,11 @@ "mocha": "^7.2.0", "nyc": "^15.1.0", "tunnel-agent": "^0.6.0", - "urllib": "^2.37.0" + "urllib": "^2.37.1" }, "xctlIpcPath": { "unix": "xprofiler-ctl-uds-path.sock", "win32": "xprofiler-ctl" }, "blurryTag": "__" -} \ No newline at end of file +} diff --git a/scripts/7u.js b/scripts/7u.js index 2d0d2c2..9d6fe41 100644 --- a/scripts/7u.js +++ b/scripts/7u.js @@ -7,6 +7,7 @@ const nodeVersions = [ 'node-v13.14.0', 'node-v14.6.0', 'node-v15.1.0', + 'node-v16.0.0', ]; build(nodeVersions); \ No newline at end of file diff --git a/scripts/common.js b/scripts/common.js index 3b26a6f..ae3c04e 100644 --- a/scripts/common.js +++ b/scripts/common.js @@ -11,6 +11,7 @@ const nodeVersions = [ 'node-v13.14.0', 'node-v14.6.0', 'node-v15.1.0', + 'node-v16.0.0', ]; build(nodeVersions); \ No newline at end of file From fcd3d2ab0cd7ddf746bd30400b378f4095f4c77a Mon Sep 17 00:00:00 2001 From: hyj1991 Date: Wed, 28 Apr 2021 17:35:31 +0800 Subject: [PATCH 2/4] fix --- .github/workflows/nodejs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 3d7784e..fdb1ed4 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -27,4 +27,4 @@ jobs: run: npm i -g npminstall && npminstall - name: Continuous integration - run: npm run ci \ No newline at end of file + run: npm run ci From c3b0771c0b659018cfe4f7e1b873937b4d8474ee Mon Sep 17 00:00:00 2001 From: hyj1991 Date: Fri, 7 May 2021 10:28:51 +0800 Subject: [PATCH 3/4] rollback --- .github/workflows/nodejs.yml | 2 +- test/start.test.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index fdb1ed4..5bd5df1 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-latest, macOS-latest ] + os: [ ubuntu-latest, macos-latest ] node-version: [ 8, 9, 10, 11, 12, 13, 14, 15, 16 ] steps: - name: Checkout Git Source diff --git a/test/start.test.js b/test/start.test.js index 8259bf5..60fa8a2 100644 --- a/test/start.test.js +++ b/test/start.test.js @@ -53,8 +53,8 @@ describe(`xprofiler starting`, function () { expect(aliveProcess[1]).to.be(logdir); }); - it(`.xprofiler cwd: ${aliveProcess[2]} should be ${/^([.\w()/\\:-]+|)$/}`, function () { - expect(/^([.\w()/\\:-]+|)$/.test(aliveProcess[2])).to.be.ok(); + it(`.xprofiler cwd: ${aliveProcess[2]} should be ${/^([.\w()/\\:-@]+|)$/}`, function () { + expect(/^([.\w()/\\:-@]+|)$/.test(aliveProcess[2])).to.be.ok(); }); it(`.xprofiler executable: ${aliveProcess[3]} should be node-${process.version}`, function () { @@ -66,8 +66,8 @@ describe(`xprofiler starting`, function () { expect(version).to.be(process.version); }); - it(`.xprofiler file: ${aliveProcess[4]} should be ${/^([.\w()/\\:-]+|)$/}`, function () { - expect(/^([.\w()/\\:-]+|)$/.test(aliveProcess[4])).to.be.ok(); + it(`.xprofiler file: ${aliveProcess[4]} should be ${/^([.\w()/\\:-@]+|)$/}`, function () { + expect(/^([.\w()/\\:-@]+|)$/.test(aliveProcess[4])).to.be.ok(); }); it(`.xprofiler module path: ${aliveProcess[5]} should be ${path.join(__dirname, '..')}`, function () { From 2f95c0b37f3a24b6731138e7587375f932260220 Mon Sep 17 00:00:00 2001 From: hyj1991 Date: Mon, 10 May 2021 09:28:24 +0800 Subject: [PATCH 4/4] next nodejs image update --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index a263f3b..2c592a9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,7 +19,7 @@ environment: # Install scripts. (runs after repo cloning) install: # Get the latest stable version of Node.js or io.js - - ps: Install-Product node $env:nodejs_version x64 + - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:PLATFORM # install modules - npm install