From 7232a5fbf6888a59ca4aca0329ee3424a1555958 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Tue, 18 Jun 2024 09:25:18 +0800 Subject: [PATCH] feat: refactor with typescript to support cjs ane esm both BREAKING CHANGE: Drop Node.js < 18.19.0 support part of https://github.com/eggjs/egg/issues/3644 Breaking changes: - Drop Node.js < 18.19.0 support - Drop generator function support use @eggjs/core@4 https://github.com/eggjs/egg-core/pull/265 --- .github/PULL_REQUEST_TEMPLATE.md | 29 ------------ .github/workflows/codeql-analysis.yml | 68 --------------------------- .github/workflows/nodejs.yml | 10 ++-- .github/workflows/release.yml | 5 +- package.json | 10 ++-- 5 files changed, 12 insertions(+), 110 deletions(-) delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 999b42b72a..0000000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,29 +0,0 @@ - - -##### Checklist - - -- [ ] `npm test` passes -- [ ] tests and/or benchmarks are included -- [ ] documentation is changed or added -- [ ] commit message follows commit guidelines - -##### Affected core subsystem(s) - - - -##### Description of change - - - \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 0e318168e0..0000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,68 +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, 1.x ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ master ] - -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://git.io/codeql-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. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # 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. - # 📚 https://git.io/JvXDl - - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 68ad9c1ac4..c70132dabd 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -2,10 +2,9 @@ name: CI on: push: - branches: [ master, 2.x, 1.x ] - + branches: [ master ] pull_request: - branches: [ master, 2.x, 1.x ] + branches: [ master ] jobs: Job: @@ -13,5 +12,6 @@ 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, 22' - install: 'npm i -g npminstall && npminstall' + version: '18.19.0, 18, 20, 22' + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d8fbb48f9f..a2bf04a759 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,8 @@ name: Release + on: push: - branches: [ master, 2.x, 1.x ] + branches: [ master ] jobs: release: @@ -10,5 +11,3 @@ jobs: secrets: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} GIT_TOKEN: ${{ secrets.GIT_TOKEN }} - with: - install: 'npm install --legacy-peer-deps --no-package-lock --no-fund' diff --git a/package.json b/package.json index bbf1bf0cf3..6bb6658052 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,11 @@ { "name": "egg", - "version": "3.24.1", + "version": "4.0.0-beta.0", + "engines": { + "node": ">= 18.19.0" + }, "publishConfig": { - "tag": "latest" + "tag": "next" }, "description": "A web framework's framework for Node.js", "keywords": [ @@ -128,8 +131,5 @@ "type": "git", "url": "https://github.com/eggjs/egg.git" }, - "engines": { - "node": ">= 14.20.0" - }, "license": "MIT" }