From 760e3ebb5895d531f882a50c747191abfd93802c Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Tue, 10 Dec 2024 14:04:09 +0800 Subject: [PATCH 1/7] feat: use runscript v2 --- .github/workflows/codeql-analysis.yml | 74 --------------------------- .github/workflows/nodejs.yml | 6 +-- .github/workflows/release.yml | 4 -- .gitignore | 1 + lib/cmd/start.js | 14 +++-- package.json | 16 +++--- 6 files changed, 14 insertions(+), 101 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 4b7e366..0000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,74 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ "master" ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ "master" ] - schedule: - - cron: '24 20 * * 5' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'javascript' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 - with: - category: "/language:${{matrix.language}}" diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 648a735..0dba04e 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -3,16 +3,12 @@ name: CI on: push: branches: [ master ] - pull_request: branches: [ master ] - workflow_dispatch: {} - jobs: Job: name: Node.js uses: node-modules/github-actions/.github/workflows/node-test.yml@master with: - os: 'ubuntu-latest, macos-latest, windows-latest' - version: '16, 18, 20' + version: '16, 18, 20, 22' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 58f7b94..a2bf04a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,8 +4,6 @@ on: push: branches: [ master ] - workflow_dispatch: {} - jobs: release: name: Node.js @@ -13,5 +11,3 @@ jobs: secrets: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} GIT_TOKEN: ${{ secrets.GIT_TOKEN }} - with: - checkTest: false diff --git a/.gitignore b/.gitignore index 03934de..472d43c 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ test/fixtures/ts/app/controller/home.js test/fixtures/ts-pkg/app/controller/home.js !test/fixtures/**/node_modules package-lock.json +.package-lock.json diff --git a/lib/cmd/start.js b/lib/cmd/start.js index 041600a..1b23080 100644 --- a/lib/cmd/start.js +++ b/lib/cmd/start.js @@ -1,17 +1,14 @@ -'use strict'; - const path = require('path'); - -const Command = require('../command'); -const debug = require('debug')('egg-script:start'); +const debug = require('util').debuglog('egg-script:start'); +const spawn = require('child_process').spawn; const { execFile } = require('mz/child_process'); const fs = require('mz/fs'); const homedir = require('node-homedir'); const mkdirp = require('mz-modules/mkdirp'); -const moment = require('moment'); const sleep = require('mz-modules/sleep'); -const spawn = require('child_process').spawn; const utils = require('egg-utils'); +const { getDateStringParts } = require('utility'); +const Command = require('../command'); class StartCommand extends Command { constructor(rawArgv) { @@ -292,7 +289,8 @@ async function getRotatelog(logfile) { if (await fs.exists(logfile)) { // format style: .20150602.193100 - const timestamp = moment().format('.YYYYMMDD.HHmmss'); + const [ YYYY, MM, DD, HH, mm, ss ] = getDateStringParts(); + const timestamp = `${YYYY}${MM}${DD}.${HH}${mm}${ss}`; // Note: rename last log to next start time, not when last log file created await fs.rename(logfile, logfile + timestamp); } diff --git a/package.json b/package.json index 7a2496f..d12aa6e 100644 --- a/package.json +++ b/package.json @@ -10,33 +10,29 @@ "dependencies": { "await-event": "^2.1.0", "common-bin": "^3.0.1", - "debug": "^4.1.0", - "egg-utils": "^2.4.1", - "moment": "^2.23.0", + "egg-utils": "^2.5.0", "mz": "^2.7.0", "mz-modules": "^2.1.0", "node-homedir": "^1.1.1", - "runscript": "^1.3.0", + "runscript": "^2.0.1", "source-map-support": "^0.5.9", + "utility": "^2.2.0", "zlogger": "^1.1.0" }, "devDependencies": { "co": "^4.6.0", "coffee": "^5.1.1", "egg": "^3.9.0", - "egg-bin": "^5.6.1", + "egg-bin": "^6.12.0", "eslint": "^8.30.0", "eslint-config-egg": "^12.1.0", "git-contributor": "^1.0.10", "mm": "^3.2.1", "typescript": "^4.9.4", - "urllib": "^3.9.0" + "urllib": "4" }, "engines": { - "node": ">=6.0.0" - }, - "ci": { - "version": "16, 18, 20" + "node": ">=16.0.0" }, "scripts": { "contributor": "git-contributor", From 228fdbeaa4a6288544593f2f1ca277a142123d06 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Tue, 10 Dec 2024 14:09:59 +0800 Subject: [PATCH 2/7] f --- README.md | 11 ++--------- lib/helper.js | 4 +--- package.json | 7 +++---- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 31d7c29..9e62754 100644 --- a/README.md +++ b/README.md @@ -99,15 +99,8 @@ Please open an issue [here](https://github.com/eggjs/egg/issues?q=is%3Aissue+is% [MIT](LICENSE) - - ## Contributors -|[
atian25](https://github.com/atian25)
|[
popomore](https://github.com/popomore)
|[
fengmk2](https://github.com/fengmk2)
|[
dead-horse](https://github.com/dead-horse)
|[
XadillaX](https://github.com/XadillaX)
|[
hyj1991](https://github.com/hyj1991)
| -| :---: | :---: | :---: | :---: | :---: | :---: | -|[
killagu](https://github.com/killagu)
|[
BaffinLee](https://github.com/BaffinLee)
|[
leoner](https://github.com/leoner)
|[
plusmancn](https://github.com/plusmancn)
|[
shuidian](https://github.com/shuidian)
|[
zhennann](https://github.com/zhennann)
| -[
liyanlong](https://github.com/liyanlong)
- -This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Tue Mar 08 2022 09:52:13 GMT+0800`. +[![Contributors](https://contrib.rocks/image?repo=eggjs/egg-scripts)](https://github.com/eggjs/egg-scripts/graphs/contributors) - +Made with [contributors-img](https://contrib.rocks). diff --git a/lib/helper.js b/lib/helper.js index fbbbc03..4fe853b 100644 --- a/lib/helper.js +++ b/lib/helper.js @@ -1,6 +1,4 @@ -'use strict'; - -const runScript = require('runscript'); +const { runScript } = require('runscript'); const isWin = process.platform === 'win32'; const REGEX = isWin ? /^(.*)\s+(\d+)\s*$/ : /^\s*(\d+)\s+(.*)/; diff --git a/package.json b/package.json index d12aa6e..cae1564 100644 --- a/package.json +++ b/package.json @@ -29,16 +29,15 @@ "git-contributor": "^1.0.10", "mm": "^3.2.1", "typescript": "^4.9.4", - "urllib": "4" + "urllib": "^4.6.6" }, "engines": { "node": ">=16.0.0" }, "scripts": { - "contributor": "git-contributor", "test": "npm run lint -- --fix && npm run test-local", - "test-local": "egg-bin test", - "cov": "egg-bin cov", + "test-local": "egg-bin test --ts false", + "cov": "egg-bin cov --ts false", "lint": "eslint .", "ci": "npm run lint && npm run cov" }, From 164781d083dd73ce1f4737d0409bd5f2f30c1c22 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Tue, 10 Dec 2024 14:27:53 +0800 Subject: [PATCH 3/7] f --- lib/cmd/start.js | 2 +- package.json | 3 +-- test/start.test.js | 5 +++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/cmd/start.js b/lib/cmd/start.js index 1b23080..427ef42 100644 --- a/lib/cmd/start.js +++ b/lib/cmd/start.js @@ -290,7 +290,7 @@ async function getRotatelog(logfile) { if (await fs.exists(logfile)) { // format style: .20150602.193100 const [ YYYY, MM, DD, HH, mm, ss ] = getDateStringParts(); - const timestamp = `${YYYY}${MM}${DD}.${HH}${mm}${ss}`; + const timestamp = `.${YYYY}${MM}${DD}.${HH}${mm}${ss}`; // Note: rename last log to next start time, not when last log file created await fs.rename(logfile, logfile + timestamp); } diff --git a/package.json b/package.json index cae1564..0a0f1d4 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,7 @@ "egg": "^3.9.0", "egg-bin": "^6.12.0", "eslint": "^8.30.0", - "eslint-config-egg": "^12.1.0", - "git-contributor": "^1.0.10", + "eslint-config-egg": "13", "mm": "^3.2.1", "typescript": "^4.9.4", "urllib": "^4.6.6" diff --git a/test/start.test.js b/test/start.test.js index 1989315..503fb93 100644 --- a/test/start.test.js +++ b/test/start.test.js @@ -52,7 +52,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/@@@ inject script/)); assert(app.stdout.match(/@@@ inject script1/)); assert(app.stdout.match(/@@@ inject script2/)); @@ -113,7 +113,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(!app.stdout.includes('DeprecationWarning:')); assert(app.stdout.includes('--title=egg-server-example')); assert(app.stdout.includes('"title":"egg-server-example"')); @@ -723,6 +723,7 @@ describe('test/start.test.js', () => { // should rotate log const fileList = await fs.readdir(logDir); + // console.log(fileList); assert(fileList.some(name => name.match(/master-stdout\.log\.\d+\.\d+/))); assert(fileList.some(name => name.match(/master-stderr\.log\.\d+\.\d+/))); From 2a7d8f72ea346f6cf98c58b2efc23299a41693a9 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Tue, 10 Dec 2024 15:03:05 +0800 Subject: [PATCH 4/7] f --- package.json | 2 +- test/start.test.js | 34 +++++++++++++++++----------------- test/stop.test.js | 8 ++++---- test/ts.test.js | 8 ++++---- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 0a0f1d4..d0696b8 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "eslint-config-egg": "13", "mm": "^3.2.1", "typescript": "^4.9.4", - "urllib": "^4.6.6" + "urllib": "^3.27.1" }, "engines": { "node": ">=16.0.0" diff --git a/test/start.test.js b/test/start.test.js index 503fb93..de5893e 100644 --- a/test/start.test.js +++ b/test/start.test.js @@ -148,7 +148,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.includes('READY!!!')); assert(app.stdout.includes('--title=egg-server-example')); assert(app.stdout.includes('"title":"egg-server-example"')); @@ -201,7 +201,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); assert(result.data.toString() === 'hi, egg'); @@ -227,7 +227,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); assert(result.data.toString() === 'hi, egg'); @@ -253,7 +253,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/yadan started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); assert(result.data.toString() === 'hi, yadan'); @@ -279,7 +279,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.includes('--title=egg-test')); assert(app.stdout.includes('"title":"egg-test"')); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7001/)); @@ -309,7 +309,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7002/)); const result = await httpclient.request('http://127.0.0.1:7002'); assert(result.data.toString() === 'hi, egg'); @@ -335,7 +335,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7002/)); const result = await httpclient.request('http://127.0.0.1:7002'); assert(result.data.toString() === 'hi, egg'); @@ -361,7 +361,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001/env'); assert(result.data.toString() === 'pre, true'); @@ -388,7 +388,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.includes('## EGG_SERVER_ENV is not pass')); assert(app.stdout.includes('## CUSTOM_ENV: pre')); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7001/)); @@ -479,7 +479,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/yadan started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); assert(result.data.toString() === 'hi, yadan'); @@ -503,7 +503,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/yadan started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); assert(result.data.toString() === 'hi, yadan'); @@ -541,7 +541,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/egg started on http:\/\/127\.0\.0\.1:8000/)); assert(!app.stdout.includes('app_worker#3:')); const result = await httpclient.request('http://127.0.0.1:8000'); @@ -570,7 +570,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/maxHeaderSize: 20000/)); }); }); @@ -598,7 +598,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/SECURITY WARNING: Reverting CVE-2023-46809: Marvin attack on PKCS#1 padding/)); }); }); @@ -624,10 +624,10 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/egg started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); - assert(result.data.toString() === 'hi, egg'); + assert.equal(result.data.toString(), 'hi, egg'); }); }); @@ -656,7 +656,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/egg started on http:\/\/127\.0\.0\.1:7002/)); assert(!app.stdout.includes('app_worker#3:')); const result = await httpclient.request('http://127.0.0.1:7002'); diff --git a/test/stop.test.js b/test/stop.test.js index dc72121..dfea1fc 100644 --- a/test/stop.test.js +++ b/test/stop.test.js @@ -40,7 +40,7 @@ describe('test/stop.test.js', () => { app.expect('code', 0); await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); assert(result.data.toString() === 'hi, egg'); @@ -142,7 +142,7 @@ describe('test/stop.test.js', () => { app.expect('code', 0); await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); assert(result.data.toString() === 'hi, egg'); @@ -218,7 +218,7 @@ describe('test/stop.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); assert(result.data.toString() === 'hi, egg'); @@ -280,7 +280,7 @@ describe('test/stop.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); assert(result.data.toString() === 'hi, egg'); diff --git a/test/ts.test.js b/test/ts.test.js index 9d2cfdd..9b443c3 100644 --- a/test/ts.test.js +++ b/test/ts.test.js @@ -45,7 +45,7 @@ describe('test/ts.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/egg started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001', { dataType: 'json' }); // console.log(result.data); @@ -59,7 +59,7 @@ describe('test/ts.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/egg started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001', { dataType: 'json' }); // console.log(result.data); @@ -73,7 +73,7 @@ describe('test/ts.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/egg started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001', { dataType: 'json' }); // console.log(result.data); @@ -102,7 +102,7 @@ describe('test/ts.test.js', () => { await sleep(waitTime); - assert(app.stderr === ''); + assert.equal(app.stderr, ''); assert(app.stdout.match(/egg started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001', { dataType: 'json' }); // console.log(result.data); From 6268fa3dc953e87bf4df2e9877399ee20f367c65 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Tue, 10 Dec 2024 16:32:36 +0800 Subject: [PATCH 5/7] f --- package.json | 2 +- test/start.test.js | 38 +++++++++++++++++++------------------- test/stop.test.js | 10 +++++----- test/ts.test.js | 8 ++++---- test/utils.js | 10 ++++++++-- 5 files changed, 37 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index d0696b8..bf916a7 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "eslint-config-egg": "13", "mm": "^3.2.1", "typescript": "^4.9.4", - "urllib": "^3.27.1" + "urllib": "4" }, "engines": { "node": ">=16.0.0" diff --git a/test/start.test.js b/test/start.test.js index de5893e..d071a23 100644 --- a/test/start.test.js +++ b/test/start.test.js @@ -52,7 +52,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/@@@ inject script/)); assert(app.stdout.match(/@@@ inject script1/)); assert(app.stdout.match(/@@@ inject script2/)); @@ -113,7 +113,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(!app.stdout.includes('DeprecationWarning:')); assert(app.stdout.includes('--title=egg-server-example')); assert(app.stdout.includes('"title":"egg-server-example"')); @@ -148,7 +148,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.includes('READY!!!')); assert(app.stdout.includes('--title=egg-server-example')); assert(app.stdout.includes('"title":"egg-server-example"')); @@ -201,7 +201,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); assert(result.data.toString() === 'hi, egg'); @@ -227,7 +227,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); assert(result.data.toString() === 'hi, egg'); @@ -253,7 +253,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/yadan started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); assert(result.data.toString() === 'hi, yadan'); @@ -279,7 +279,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.includes('--title=egg-test')); assert(app.stdout.includes('"title":"egg-test"')); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7001/)); @@ -309,7 +309,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7002/)); const result = await httpclient.request('http://127.0.0.1:7002'); assert(result.data.toString() === 'hi, egg'); @@ -335,7 +335,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7002/)); const result = await httpclient.request('http://127.0.0.1:7002'); assert(result.data.toString() === 'hi, egg'); @@ -361,7 +361,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001/env'); assert(result.data.toString() === 'pre, true'); @@ -388,7 +388,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.includes('## EGG_SERVER_ENV is not pass')); assert(app.stdout.includes('## CUSTOM_ENV: pre')); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7001/)); @@ -479,7 +479,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/yadan started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); assert(result.data.toString() === 'hi, yadan'); @@ -503,7 +503,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/yadan started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); assert(result.data.toString() === 'hi, yadan'); @@ -541,7 +541,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/egg started on http:\/\/127\.0\.0\.1:8000/)); assert(!app.stdout.includes('app_worker#3:')); const result = await httpclient.request('http://127.0.0.1:8000'); @@ -570,13 +570,13 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/maxHeaderSize: 20000/)); }); }); describe('read egg.revert', () => { - if (version < 18) return; + if (version < 18 || version > 20) return; if (isWin) return; let app; let fixturePath; @@ -598,7 +598,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/SECURITY WARNING: Reverting CVE-2023-46809: Marvin attack on PKCS#1 padding/)); }); }); @@ -624,7 +624,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/egg started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); assert.equal(result.data.toString(), 'hi, egg'); @@ -656,7 +656,7 @@ describe('test/start.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/egg started on http:\/\/127\.0\.0\.1:7002/)); assert(!app.stdout.includes('app_worker#3:')); const result = await httpclient.request('http://127.0.0.1:7002'); diff --git a/test/stop.test.js b/test/stop.test.js index dfea1fc..4ae4f0c 100644 --- a/test/stop.test.js +++ b/test/stop.test.js @@ -40,7 +40,7 @@ describe('test/stop.test.js', () => { app.expect('code', 0); await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); assert(result.data.toString() === 'hi, egg'); @@ -142,7 +142,7 @@ describe('test/stop.test.js', () => { app.expect('code', 0); await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); assert(result.data.toString() === 'hi, egg'); @@ -218,12 +218,12 @@ describe('test/stop.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); assert(result.data.toString() === 'hi, egg'); - assert(app2.stderr === ''); + assert.equal(utils.replaceWeakRefMessage(app2.stderr), ''); assert(app2.stdout.match(/custom-framework started on http:\/\/127\.0\.0\.1:7002/)); const result2 = await httpclient.request('http://127.0.0.1:7002'); assert(result2.data.toString() === 'hi, egg'); @@ -280,7 +280,7 @@ describe('test/stop.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001'); assert(result.data.toString() === 'hi, egg'); diff --git a/test/ts.test.js b/test/ts.test.js index 9b443c3..40de990 100644 --- a/test/ts.test.js +++ b/test/ts.test.js @@ -45,7 +45,7 @@ describe('test/ts.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/egg started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001', { dataType: 'json' }); // console.log(result.data); @@ -59,7 +59,7 @@ describe('test/ts.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/egg started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001', { dataType: 'json' }); // console.log(result.data); @@ -73,7 +73,7 @@ describe('test/ts.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/egg started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001', { dataType: 'json' }); // console.log(result.data); @@ -102,7 +102,7 @@ describe('test/ts.test.js', () => { await sleep(waitTime); - assert.equal(app.stderr, ''); + assert.equal(utils.replaceWeakRefMessage(app.stderr), ''); assert(app.stdout.match(/egg started on http:\/\/127\.0\.0\.1:7001/)); const result = await httpclient.request('http://127.0.0.1:7001', { dataType: 'json' }); // console.log(result.data); diff --git a/test/utils.js b/test/utils.js index 51bde7a..4aa9840 100644 --- a/test/utils.js +++ b/test/utils.js @@ -1,5 +1,3 @@ -'use strict'; - const helper = require('../lib/helper'); const sleep = require('mz-modules/sleep'); const isWin = process.platform === 'win32'; @@ -39,3 +37,11 @@ exports.cleanup = async function(baseDir) { await sleep('5s'); } }; + +exports.replaceWeakRefMessage = function(stderr) { + // Using compatibility WeakRef and FinalizationRegistry\r\n + if (stderr.includes('Using compatibility WeakRef and FinalizationRegistry')) { + stderr = stderr.replace(/Using compatibility WeakRef and FinalizationRegistry[\r\n]*/g, ''); + } + return stderr; +}; From 569412eb9964b9be00863cb272d16b13a593c3fb Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Tue, 10 Dec 2024 17:54:26 +0800 Subject: [PATCH 6/7] f --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bf916a7..3e7831c 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "eslint-config-egg": "13", "mm": "^3.2.1", "typescript": "^4.9.4", - "urllib": "4" + "urllib": "2" }, "engines": { "node": ">=16.0.0" From 27ab9084391789e7e5ee6e2c7caad44993ceb2c6 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Tue, 10 Dec 2024 19:26:30 +0800 Subject: [PATCH 7/7] f --- CHANGELOG.md | 215 +++++++++++++++++++++++++++++++++++++++++++++++++++ History.md | 211 -------------------------------------------------- package.json | 4 +- 3 files changed, 217 insertions(+), 213 deletions(-) delete mode 100644 History.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d0206a..a03d991 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,3 +17,218 @@ ### Features * support configure egg.revert in package.json ([#58](https://github.com/eggjs/egg-scripts/issues/58)) ([a294691](https://github.com/eggjs/egg-scripts/commit/a29469134293a9dec3a7dd5cf6ce71810e913498)) + + +--- + + +2.17.0 / 2022-04-28 +================== + +**features** + * [[`47f8e82`](http://github.com/eggjs/egg-scripts/commit/47f8e823e01b74028bf8dee7123fc3f9469fb3b6)] - feat: eggScriptsConfig support node-options (#54) (TZ | 天猪 <>) + +2.16.0 / 2022-03-27 +================== + +**features** + * [[`bb1ba0a`](http://github.com/eggjs/egg-scripts/commit/bb1ba0a665cab9530639d98f38b76c3c72176f76)] - feat: --trace-warnings (#53) (mansonchor.github.com <>) + +2.15.3 / 2022-03-08 +================== + +**fixes** + * [[`ef5496d`](http://github.com/eggjs/egg-scripts/commit/ef5496d1838a508a859cd5d77886098d7de8fec5)] - fix: ps-cmd result may be truncated (#52) (W <>) + +**others** + * [[`be89f9d`](http://github.com/eggjs/egg-scripts/commit/be89f9d6bb88810ffa3237deab9e4e0d9c4000c2)] - docs(doc): 修改readme文档中的stop脚本处的描述,并增加示例. (#51) (shuidian <<18842643145@163.com>>) + +2.15.2 / 2021-11-17 +================== + +**fixes** + * [[`b122d86`](http://github.com/eggjs/egg-scripts/commit/b122d86d300df4018291d8f8d8e98ab813048f67)] - fix: sourcemap default value should respect eggScriptConfig (#50) (killa <>) + +**others** + * [[`78c3284`](http://github.com/eggjs/egg-scripts/commit/78c3284cb68748f4487141f5481d6e44288c9e47)] - test: case for injecting incorrect script (#49) (hyj1991 <>) + +2.15.1 / 2021-09-15 +================== + +**features** + * [[`1a7f09c`](http://github.com/eggjs/egg-scripts/commit/1a7f09c707becaca42522ee415da0fe5961a6ad5)] - feat: support pkgInfo.eggScriptsConfig.require (#47) (hyj1991 <>) + +**others** + * [[`a68ac67`](http://github.com/eggjs/egg-scripts/commit/a68ac679b0eee4eff19c9e5d40ca80409ddf02eb)] - Revert "feat: support pkgInfo.egg.require (#45)" (#48) (hyj1991 <>) + +2.15.0 / 2021-09-13 +================== + +**features** + * [[`fe179fd`](http://github.com/eggjs/egg-scripts/commit/fe179fda909cd7eb5b6497357202185a4ecf5ec6)] - feat: support pkgInfo.egg.require (#45) (TZ | 天猪 <>) + +2.14.0 / 2021-06-11 +================== + +**features** + * [[`f0a342f`](http://github.com/eggjs/egg-scripts/commit/f0a342ffcd3ec1823eb2d42a9dd96c075cea3754)] - feat: --no-deprecation (#44) (TZ | 天猪 <>) + +2.13.0 / 2020-02-25 +================== + +**features** + * [[`c0ba739`](http://github.com/eggjs/egg-scripts/commit/c0ba73900642e488b0e6306ea028ef547ceedfae)] - feat: support stop timeout (#43) (hui <>) + +2.12.0 / 2019-12-16 +================== + +**features** + * [[`20483fd`](http://github.com/eggjs/egg-scripts/commit/20483fd56ce51238431fb095ede1c768a99470f2)] - feat: support eggScriptsConfig in package.json (#41) (Yiyu He <>) + +2.11.1 / 2019-10-10 +================== + +**fixes** + * [[`de61980`](http://github.com/eggjs/egg-scripts/commit/de61980f772c8a24010d3f078658f8c55b072067)] - fix: start command should exit after child process exit when no daemon mode (#39) (killa <>) + +**others** + * [[`7ae9cb0`](http://github.com/eggjs/egg-scripts/commit/7ae9cb054cb91ea7ac1e615e1e3a7fcdaba5f980)] - test: add egg@1 and egg@2 with travis (#36) (Maledong <>) + +2.11.0 / 2018-12-17 +=================== + + * feat(stop): only sleep when master process exists (#34) + * fix: stop process only if the title matches exactly (#35) + +2.10.0 / 2018-10-10 +================== + +**fixes** + * [[`4768950`](http://github.com/eggjs/egg-scripts/commit/4768950d29398031fd6ae129a981c60e308bff0a)] - fix: replace command by args in ps (#29) (Baffin Lee <>) + +**others** + * [[`f31efb9`](http://github.com/eggjs/egg-scripts/commit/f31efb9133c5edc6176371ca725198f1b43b9aab)] - feat: support customize node path (#32) (Yiyu He <>) + * [[`c2479dc`](http://github.com/eggjs/egg-scripts/commit/c2479dc6416386b654fc6e918a4dbd575cc0639e)] - chore: update version (TZ <>) + +2.9.1 / 2018-08-24 +================== + + * fix: replace command by args in ps (#29) + +2.9.0 / 2018-08-23 +================== + +**features** + * [[`1367883`](http://github.com/eggjs/egg-scripts/commit/1367883804e5ab1ece88831ea4d1a934ee757f81)] - feat: add ipc channel in nonDaemon mode (#28) (Khaidi Chu <>) + +**others** + * [[`262ef4c`](http://github.com/eggjs/egg-scripts/commit/262ef4c97179dbf6f8de2eb0547eef4cbc56bf92)] - chore: add license and issues link (#27) (Haoliang Gao <>) + +2.8.1 / 2018-08-19 +================== + +**fixes** + * [[`b98fd03`](http://github.com/eggjs/egg-scripts/commit/b98fd03d1e3aaed68004b881f0b3d42fe47341dd)] - fix: use execFile instead of exec for security reason (#26) (fengmk2 <>) + +2.8.0 / 2018-08-10 +================== + +**others** + * [[`dac29f7`](http://github.com/eggjs/egg-scripts/commit/dac29f73ed2dfc18edc2e8743ffd509af8ab0f4a)] - refactor: add `this.exit` to instead of `process.exit` (#25) (Khaidi Chu <>) + +2.7.0 / 2018-08-10 +================== + +**features** + * [[`22faa4c`](http://github.com/eggjs/egg-scripts/commit/22faa4cfbb84cc5bc819d981dce962d8f95f8357)] - feat: stop command support windows (#22) (Baffin Lee <>) + +**others** + * [[`e07726c`](http://github.com/eggjs/egg-scripts/commit/e07726c176a89dd63482b588868fd1feaab1fba6)] - refactor: raw spawn call to instead of helper.spawn in start non-daemon mode (#23) (Khaidi Chu <>) + +2.6.0 / 2018-04-03 +================== + + * feat: provides source map support for stack traces (#19) + +2.5.1 / 2018-02-06 +================== + + * chore: add description for ignore-stderr (#18) + +2.5.0 / 2017-12-12 +================== + +**features** + * [[`b5559d5`](http://github.com/eggjs/egg-scripts/commit/b5559d54228543b5422047e6f056829df11f8c87)] - feat: support --ignore-error (#17) (TZ | 天猪 <>) + +2.4.0 / 2017-11-30 +================== + +**features** + * [[`8eda3d1`](https://github.com/eggjs/egg-scripts/commit/8eda3d10cfea5757f220fd82b562fd5fef433440)] - feat: add `${baseDir}/.node/bin` to PATH if exists (#14) (fengmk2 <>) + +**others** + * [[`4dd24a4`](https://github.com/eggjs/egg-scripts/commit/4dd24a45d92b2c2a8e1e450e0f13ba4143550ca9)] - test: add testcase for #12 (#13) (Haoliang Gao <>) + +2.3.0 / 2017-11-29 +================== + +**features** + * [[`4c41319`](http://github.com/eggjs/egg-scripts/commit/4c41319f9e309402b2ccb5c7afd5a6d3cda2453f)] - feat: support stop --title (#16) (TZ | 天猪 <>) + +2.2.0 / 2017-11-22 +================== + +**features** + * [[`ac58d00`](http://github.com/eggjs/egg-scripts/commit/ac58d00a974fdfff6b5c722743e4b32174963c52)] - feat: cwd maybe not baseDir (#15) (zhennann <>) + +2.1.1 / 2017-11-14 +================== + +**fixes** + * [[`7324d99`](http://github.com/eggjs/egg-scripts/commit/7324d99b504cac5fef7dbf280f7d9e6243c16bb7)] - fix: should stop app when baseDir is symlink (#12) (Haoliang Gao <>) + +2.1.0 / 2017-10-16 +================== + +**features** + * [[`ac40135`](http://github.com/eggjs/egg-scripts/commit/ac40135d5b9a3200ea1bdfdb19d0f7e12d0c511a)] - feat: add eggctl bin (#10) (Haoliang Gao <>) + +2.0.0 / 2017-10-13 +================== + +**features** + * [[`0f7ca50`](http://github.com/eggjs/egg-scripts/commit/0f7ca502999c06a9cb05d8e5617f6045704511df)] - feat: [BREAKING_CHANGE] check the status of app when start on daemon (#9) (Haoliang Gao <>) + +**others** + * [[`cfd0d2f`](http://github.com/eggjs/egg-scripts/commit/cfd0d2f67845fffb9d5974514b65e43b22ed8040)] - refactor: modify the directory of logDir (#8) (Haoliang Gao <>) + +1.2.0 / 2017-09-11 +================== + +**features** + * [[`c0300b8`](http://github.com/eggjs/egg-scripts/commit/c0300b8c657fe4f75ca388061f6cb3de9864a743)] - feat: log success at daemon mode (#7) (TZ | 天猪 <>) + +**others** + * [[`fdd273c`](http://github.com/eggjs/egg-scripts/commit/fdd273c2d6f15d104288fef4d699627a7cf701d9)] - test: add cluster-config fixture (#4) (TZ | 天猪 <>) + +1.1.2 / 2017-09-01 +================== + + * fix: should not pass undefined env (#6) + * docs: fix stop typo (#5) + +1.1.1 / 2017-08-29 +================== + + * fix: should set title correct (#3) + +1.1.0 / 2017-08-16 +================== + + * feat: remove env default value (#2) + +1.0.0 / 2017-08-02 +================== + + * feat: first implementation (#1) diff --git a/History.md b/History.md deleted file mode 100644 index bd715b9..0000000 --- a/History.md +++ /dev/null @@ -1,211 +0,0 @@ - -2.17.0 / 2022-04-28 -================== - -**features** - * [[`47f8e82`](http://github.com/eggjs/egg-scripts/commit/47f8e823e01b74028bf8dee7123fc3f9469fb3b6)] - feat: eggScriptsConfig support node-options (#54) (TZ | 天猪 <>) - -2.16.0 / 2022-03-27 -================== - -**features** - * [[`bb1ba0a`](http://github.com/eggjs/egg-scripts/commit/bb1ba0a665cab9530639d98f38b76c3c72176f76)] - feat: --trace-warnings (#53) (mansonchor.github.com <>) - -2.15.3 / 2022-03-08 -================== - -**fixes** - * [[`ef5496d`](http://github.com/eggjs/egg-scripts/commit/ef5496d1838a508a859cd5d77886098d7de8fec5)] - fix: ps-cmd result may be truncated (#52) (W <>) - -**others** - * [[`be89f9d`](http://github.com/eggjs/egg-scripts/commit/be89f9d6bb88810ffa3237deab9e4e0d9c4000c2)] - docs(doc): 修改readme文档中的stop脚本处的描述,并增加示例. (#51) (shuidian <<18842643145@163.com>>) - -2.15.2 / 2021-11-17 -================== - -**fixes** - * [[`b122d86`](http://github.com/eggjs/egg-scripts/commit/b122d86d300df4018291d8f8d8e98ab813048f67)] - fix: sourcemap default value should respect eggScriptConfig (#50) (killa <>) - -**others** - * [[`78c3284`](http://github.com/eggjs/egg-scripts/commit/78c3284cb68748f4487141f5481d6e44288c9e47)] - test: case for injecting incorrect script (#49) (hyj1991 <>) - -2.15.1 / 2021-09-15 -================== - -**features** - * [[`1a7f09c`](http://github.com/eggjs/egg-scripts/commit/1a7f09c707becaca42522ee415da0fe5961a6ad5)] - feat: support pkgInfo.eggScriptsConfig.require (#47) (hyj1991 <>) - -**others** - * [[`a68ac67`](http://github.com/eggjs/egg-scripts/commit/a68ac679b0eee4eff19c9e5d40ca80409ddf02eb)] - Revert "feat: support pkgInfo.egg.require (#45)" (#48) (hyj1991 <>) - -2.15.0 / 2021-09-13 -================== - -**features** - * [[`fe179fd`](http://github.com/eggjs/egg-scripts/commit/fe179fda909cd7eb5b6497357202185a4ecf5ec6)] - feat: support pkgInfo.egg.require (#45) (TZ | 天猪 <>) - -2.14.0 / 2021-06-11 -================== - -**features** - * [[`f0a342f`](http://github.com/eggjs/egg-scripts/commit/f0a342ffcd3ec1823eb2d42a9dd96c075cea3754)] - feat: --no-deprecation (#44) (TZ | 天猪 <>) - -2.13.0 / 2020-02-25 -================== - -**features** - * [[`c0ba739`](http://github.com/eggjs/egg-scripts/commit/c0ba73900642e488b0e6306ea028ef547ceedfae)] - feat: support stop timeout (#43) (hui <>) - -2.12.0 / 2019-12-16 -================== - -**features** - * [[`20483fd`](http://github.com/eggjs/egg-scripts/commit/20483fd56ce51238431fb095ede1c768a99470f2)] - feat: support eggScriptsConfig in package.json (#41) (Yiyu He <>) - -2.11.1 / 2019-10-10 -================== - -**fixes** - * [[`de61980`](http://github.com/eggjs/egg-scripts/commit/de61980f772c8a24010d3f078658f8c55b072067)] - fix: start command should exit after child process exit when no daemon mode (#39) (killa <>) - -**others** - * [[`7ae9cb0`](http://github.com/eggjs/egg-scripts/commit/7ae9cb054cb91ea7ac1e615e1e3a7fcdaba5f980)] - test: add egg@1 and egg@2 with travis (#36) (Maledong <>) - -2.11.0 / 2018-12-17 -=================== - - * feat(stop): only sleep when master process exists (#34) - * fix: stop process only if the title matches exactly (#35) - -2.10.0 / 2018-10-10 -================== - -**fixes** - * [[`4768950`](http://github.com/eggjs/egg-scripts/commit/4768950d29398031fd6ae129a981c60e308bff0a)] - fix: replace command by args in ps (#29) (Baffin Lee <>) - -**others** - * [[`f31efb9`](http://github.com/eggjs/egg-scripts/commit/f31efb9133c5edc6176371ca725198f1b43b9aab)] - feat: support customize node path (#32) (Yiyu He <>) - * [[`c2479dc`](http://github.com/eggjs/egg-scripts/commit/c2479dc6416386b654fc6e918a4dbd575cc0639e)] - chore: update version (TZ <>) - -2.9.1 / 2018-08-24 -================== - - * fix: replace command by args in ps (#29) - -2.9.0 / 2018-08-23 -================== - -**features** - * [[`1367883`](http://github.com/eggjs/egg-scripts/commit/1367883804e5ab1ece88831ea4d1a934ee757f81)] - feat: add ipc channel in nonDaemon mode (#28) (Khaidi Chu <>) - -**others** - * [[`262ef4c`](http://github.com/eggjs/egg-scripts/commit/262ef4c97179dbf6f8de2eb0547eef4cbc56bf92)] - chore: add license and issues link (#27) (Haoliang Gao <>) - -2.8.1 / 2018-08-19 -================== - -**fixes** - * [[`b98fd03`](http://github.com/eggjs/egg-scripts/commit/b98fd03d1e3aaed68004b881f0b3d42fe47341dd)] - fix: use execFile instead of exec for security reason (#26) (fengmk2 <>) - -2.8.0 / 2018-08-10 -================== - -**others** - * [[`dac29f7`](http://github.com/eggjs/egg-scripts/commit/dac29f73ed2dfc18edc2e8743ffd509af8ab0f4a)] - refactor: add `this.exit` to instead of `process.exit` (#25) (Khaidi Chu <>) - -2.7.0 / 2018-08-10 -================== - -**features** - * [[`22faa4c`](http://github.com/eggjs/egg-scripts/commit/22faa4cfbb84cc5bc819d981dce962d8f95f8357)] - feat: stop command support windows (#22) (Baffin Lee <>) - -**others** - * [[`e07726c`](http://github.com/eggjs/egg-scripts/commit/e07726c176a89dd63482b588868fd1feaab1fba6)] - refactor: raw spawn call to instead of helper.spawn in start non-daemon mode (#23) (Khaidi Chu <>) - -2.6.0 / 2018-04-03 -================== - - * feat: provides source map support for stack traces (#19) - -2.5.1 / 2018-02-06 -================== - - * chore: add description for ignore-stderr (#18) - -2.5.0 / 2017-12-12 -================== - -**features** - * [[`b5559d5`](http://github.com/eggjs/egg-scripts/commit/b5559d54228543b5422047e6f056829df11f8c87)] - feat: support --ignore-error (#17) (TZ | 天猪 <>) - -2.4.0 / 2017-11-30 -================== - -**features** - * [[`8eda3d1`](https://github.com/eggjs/egg-scripts/commit/8eda3d10cfea5757f220fd82b562fd5fef433440)] - feat: add `${baseDir}/.node/bin` to PATH if exists (#14) (fengmk2 <>) - -**others** - * [[`4dd24a4`](https://github.com/eggjs/egg-scripts/commit/4dd24a45d92b2c2a8e1e450e0f13ba4143550ca9)] - test: add testcase for #12 (#13) (Haoliang Gao <>) - -2.3.0 / 2017-11-29 -================== - -**features** - * [[`4c41319`](http://github.com/eggjs/egg-scripts/commit/4c41319f9e309402b2ccb5c7afd5a6d3cda2453f)] - feat: support stop --title (#16) (TZ | 天猪 <>) - -2.2.0 / 2017-11-22 -================== - -**features** - * [[`ac58d00`](http://github.com/eggjs/egg-scripts/commit/ac58d00a974fdfff6b5c722743e4b32174963c52)] - feat: cwd maybe not baseDir (#15) (zhennann <>) - -2.1.1 / 2017-11-14 -================== - -**fixes** - * [[`7324d99`](http://github.com/eggjs/egg-scripts/commit/7324d99b504cac5fef7dbf280f7d9e6243c16bb7)] - fix: should stop app when baseDir is symlink (#12) (Haoliang Gao <>) - -2.1.0 / 2017-10-16 -================== - -**features** - * [[`ac40135`](http://github.com/eggjs/egg-scripts/commit/ac40135d5b9a3200ea1bdfdb19d0f7e12d0c511a)] - feat: add eggctl bin (#10) (Haoliang Gao <>) - -2.0.0 / 2017-10-13 -================== - -**features** - * [[`0f7ca50`](http://github.com/eggjs/egg-scripts/commit/0f7ca502999c06a9cb05d8e5617f6045704511df)] - feat: [BREAKING_CHANGE] check the status of app when start on daemon (#9) (Haoliang Gao <>) - -**others** - * [[`cfd0d2f`](http://github.com/eggjs/egg-scripts/commit/cfd0d2f67845fffb9d5974514b65e43b22ed8040)] - refactor: modify the directory of logDir (#8) (Haoliang Gao <>) - -1.2.0 / 2017-09-11 -================== - -**features** - * [[`c0300b8`](http://github.com/eggjs/egg-scripts/commit/c0300b8c657fe4f75ca388061f6cb3de9864a743)] - feat: log success at daemon mode (#7) (TZ | 天猪 <>) - -**others** - * [[`fdd273c`](http://github.com/eggjs/egg-scripts/commit/fdd273c2d6f15d104288fef4d699627a7cf701d9)] - test: add cluster-config fixture (#4) (TZ | 天猪 <>) - -1.1.2 / 2017-09-01 -================== - - * fix: should not pass undefined env (#6) - * docs: fix stop typo (#5) - -1.1.1 / 2017-08-29 -================== - - * fix: should set title correct (#3) - -1.1.0 / 2017-08-16 -================== - - * feat: remove env default value (#2) - -1.0.0 / 2017-08-02 -================== - - * feat: first implementation (#1) diff --git a/package.json b/package.json index 3e7831c..8c90cca 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "eslint-config-egg": "13", "mm": "^3.2.1", "typescript": "^4.9.4", - "urllib": "2" + "urllib": "^4.6.6" }, "engines": { "node": ">=16.0.0" @@ -36,7 +36,7 @@ "scripts": { "test": "npm run lint -- --fix && npm run test-local", "test-local": "egg-bin test --ts false", - "cov": "egg-bin cov --ts false", + "cov": "egg-bin test --ts false", "lint": "eslint .", "ci": "npm run lint && npm run cov" },