Skip to content

Commit a09b1cf

Browse files
authored
feat: refactor with typescript to support cjs ane esm both (#5328)
BREAKING CHANGE: Drop Node.js < 18.19.0 support part of #3644 Breaking changes: - Drop Node.js < 18.19.0 support - Drop generator function support use @eggjs/core@4 eggjs/core#265
1 parent b6861f1 commit a09b1cf

File tree

259 files changed

+4958
-4533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+4958
-4533
lines changed

.eslintrc

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"extends": "eslint-config-egg"
2+
"extends": [
3+
"eslint-config-egg/typescript",
4+
"eslint-config-egg/lib/rules/enforce-node-prefix"
5+
]
36
}

.github/PULL_REQUEST_TEMPLATE.md

-29
This file was deleted.

.github/dependabot.yml

-7
This file was deleted.

.github/workflows/codeql-analysis.yml

-68
This file was deleted.

.github/workflows/gh-pages.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/checkout@master
1818

1919
- name: Setup Node.js
20-
uses: actions/setup-node@v1
20+
uses: actions/setup-node@v4
2121
with:
2222
node-version: ${{ matrix.node-version }}
2323

.github/workflows/nodejs.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ name: CI
22

33
on:
44
push:
5-
branches: [ master, 2.x, 1.x ]
6-
5+
branches: [ master ]
76
pull_request:
8-
branches: [ master, 2.x, 1.x ]
7+
branches: [ master ]
98

109
jobs:
1110
Job:
1211
name: Node.js
1312
uses: node-modules/github-actions/.github/workflows/node-test.yml@master
1413
with:
1514
os: 'ubuntu-latest, macos-latest, windows-latest'
16-
version: '14, 16, 18, 20, 22'
17-
install: 'npm i -g npminstall && npminstall'
15+
version: '18.19.0, 18, 20, 22'
16+
secrets:
17+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/release.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Release
2+
23
on:
34
push:
45
branches: [ skip-releases ]
@@ -10,5 +11,3 @@ jobs:
1011
secrets:
1112
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1213
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
13-
with:
14-
install: 'npm install --legacy-peer-deps --no-package-lock --no-fund'

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/node_modules
1+
node_modules
22
coverage
33
*.log
44
npm-debug.log
@@ -36,3 +36,5 @@ site/dist
3636
.umi-production
3737
.vercel
3838
package-lock.json
39+
.tshy*
40+
dist

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ English | [简体中文](./README.zh-CN.md)
77
[![NPM version](https://img.shields.io/npm/v/egg.svg?style=flat-square)](https://npmjs.org/package/egg)
88
[![NPM quality](http://npm.packagequality.com/shield/egg.svg?style=flat-square)](http://packagequality.com/#?package=egg)
99
[![NPM download](https://img.shields.io/npm/dm/egg.svg?style=flat-square)](https://npmjs.org/package/egg)
10+
[![Node.js Version](https://img.shields.io/node/v/egg.svg?style=flat)](https://nodejs.org/en/download/)
1011
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Feggjs%2Fegg.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Feggjs%2Fegg?ref=badge_shield)
1112

1213
[![Continuous Integration](https://github.com/eggjs/egg/actions/workflows/nodejs.yml/badge.svg)](https://github.com/eggjs/egg/actions?query=branch%3Amaster)
1314
[![Test coverage](https://img.shields.io/codecov/c/github/eggjs/egg.svg?style=flat-square)](https://codecov.io/gh/eggjs/egg)
1415
[![Known Vulnerabilities](https://snyk.io/test/npm/egg/badge.svg?style=flat-square)](https://snyk.io/test/npm/egg)
1516
[![Open Collective backers and sponsors](https://img.shields.io/opencollective/all/eggjs?style=flat-square)](https://opencollective.com/eggjs)
1617

17-
1818
## Features
1919

2020
- Built-in Process Management
@@ -62,5 +62,4 @@ To become a contributor, please follow our [contributing guide](CONTRIBUTING.md)
6262

6363
[MIT](LICENSE)
6464

65-
66-
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Feggjs%2Fegg.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Feggjs%2Fegg?ref=badge_large)
65+
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Feggjs%2Fegg.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Feggjs%2Fegg?ref=badge_large)

README.zh-CN.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
[![NPM version](https://img.shields.io/npm/v/egg.svg?style=flat-square)](https://npmjs.org/package/egg)
88
[![NPM quality](http://npm.packagequality.com/shield/egg.svg?style=flat-square)](http://packagequality.com/#?package=egg)
99
[![NPM download](https://img.shields.io/npm/dm/egg.svg?style=flat-square)](https://npmjs.org/package/egg)
10+
[![Node.js Version](https://img.shields.io/node/v/egg.svg?style=flat)](https://nodejs.org/en/download/)
1011

1112
[![Continuous Integration](https://github.com/eggjs/egg/actions/workflows/nodejs.yml/badge.svg)](https://github.com/eggjs/egg/actions?query=branch%3Amaster)
1213
[![Test coverage](https://img.shields.io/codecov/c/github/eggjs/egg.svg?style=flat-square)](https://codecov.io/gh/eggjs/egg)
@@ -25,11 +26,12 @@
2526
## 快速开始
2627

2728
```bash
28-
$ mkdir showcase && cd showcase
29-
$ npm init egg --type=simple
30-
$ npm install
31-
$ npm run dev
32-
$ open http://localhost:7001
29+
mkdir showcase && cd showcase
30+
npm init egg --type=simple
31+
npm install
32+
npm run dev
33+
34+
open http://localhost:7001
3335
```
3436

3537
## 文档

agent.js

-11
This file was deleted.

0 commit comments

Comments
 (0)