Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ on:
pull_request:
branches: [master]
merge_group:
branches: [master]

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: '18.19.0, 18, 20, 22, 24'
version: '22, 24'
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/pkg.pr.new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22

- name: Install dependencies
run: npm install
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ lib
package-lock.json
.tshy*
.eslintcache
tsconfig.tsbuildinfo
2 changes: 1 addition & 1 deletion .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,6 @@
"index.d.ts",
"test/fixtures/**",
"__snapshots__",
"example/helloworld.cjs"
"example/cjs/helloworld.js"
]
}
239 changes: 0 additions & 239 deletions AUTHORS

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(The MIT License)

Copyright (c) 2019 Koa contributors
Copyright (c) 2023 EggJS contributors
Copyright (c) 2023-present EggJS contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @eggjs/koa

@eggjs/koa is forked from [Koa v2.x](https://github.com/koajs/koa/tree/v2.x) for LTS and drop Node.js < 18.19.0 support.
@eggjs/koa is forked from [Koa v2.x](https://github.com/koajs/koa/tree/v2.x) for LTS and drop Node.js < 22.17.1 support.

<img height="240px" src="/docs/logo.png" alt="Koa middleware framework for nodejs"/>

Expand All @@ -19,7 +19,7 @@ Koa is not bundled with any middleware.

## Installation

@eggjs/koa requires **node v18.19.0** or higher for Node.js LTS support.
@eggjs/koa@3 requires **node v22.17.1** or higher for Node.js LTS support.

```bash
npm install @eggjs/koa
Expand Down
12 changes: 12 additions & 0 deletions example/cjs/helloworld.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const { Application } = require('@eggjs/koa');

const app = new Application();

// response
app.use(ctx => {
ctx.body = `Hello World, CJS!`;
});

app.listen(3000);

console.log('Server is running on port 3000');
11 changes: 11 additions & 0 deletions example/cjs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "@eggjs/koa-example-cjs",
"version": "1.0.0",
"type": "commonjs",
"scripts": {
"start": "node helloworld.js"
},
"dependencies": {
"@eggjs/koa": "alpha"
}
}
12 changes: 12 additions & 0 deletions example/esm/helloworld.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Application } from '@eggjs/koa';

const app = new Application();

// response
app.use(ctx => {
ctx.body = `Hello World, ESM!`;
});

app.listen(3000);

console.log('Server is running on port 3000');
11 changes: 11 additions & 0 deletions example/esm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "@eggjs/koa-example-esm",
"version": "1.0.0",
"type": "module",
"scripts": {
"start": "node helloworld.js"
},
"dependencies": {
"@eggjs/koa": "alpha"
}
}
2 changes: 1 addition & 1 deletion example/extend/Context.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Context } from '../../src/index.js';
import { Context } from '../../src/index.ts';

export class CustomContext extends Context {
get state() {
Expand Down
2 changes: 1 addition & 1 deletion example/extend/Request.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Request } from '../../src/index.js';
import { Request } from '../../src/index.ts';

const HOST = Symbol('request host');

Expand Down
2 changes: 1 addition & 1 deletion example/extend/middleware.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Context, type MiddlewareFunc } from '../../src/index.js';
import { Context, type MiddlewareFunc } from '../../src/index.ts';

class CustomContext extends Context {
// Add your custom properties and methods here
Expand Down
10 changes: 0 additions & 10 deletions example/helloworld.cjs

This file was deleted.

10 changes: 0 additions & 10 deletions example/helloworld.mjs

This file was deleted.

Loading
Loading