Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support nextjs in v4 #4141

Merged
merged 47 commits into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
5153bc4
chore: add nextjs component
czy88840616 Jan 19, 2024
e203709
feat: add nextjs
czy88840616 Oct 23, 2024
98cc116
feat: add functional export
czy88840616 Nov 18, 2024
138f0b4
chore: createApp support options
czy88840616 Nov 22, 2024
2e72443
feat: test with next
czy88840616 Nov 23, 2024
678d869
feat: with sample
czy88840616 Nov 23, 2024
0974147
feat: with sample
czy88840616 Nov 23, 2024
4594719
test: fix
czy88840616 Nov 24, 2024
e4ce069
test: add next test
czy88840616 Nov 30, 2024
66d02dd
test: add next test
czy88840616 Nov 30, 2024
9c653ae
test: add next test
czy88840616 Nov 30, 2024
050b16e
fix: circle dep
czy88840616 Dec 1, 2024
e2661b9
fix: lint
czy88840616 Dec 1, 2024
11de7f9
fix: legacy test
czy88840616 Dec 1, 2024
b4fa937
fix: lint
czy88840616 Dec 1, 2024
f446e2c
fix: sync load module
czy88840616 Dec 1, 2024
53d265f
fix: sync load module
czy88840616 Dec 1, 2024
4d88e5c
fix: lint
czy88840616 Dec 1, 2024
8e8843c
fix: lint
czy88840616 Dec 1, 2024
f5d7129
fix: mock test
czy88840616 Dec 3, 2024
94129c1
test: fix circle
czy88840616 Dec 3, 2024
becbc95
fix: lock
czy88840616 Dec 3, 2024
86c1746
chore: remove circle dep
czy88840616 Dec 7, 2024
6e76e2b
fix: create app
czy88840616 Dec 8, 2024
a454b55
fix: create app error
czy88840616 Dec 11, 2024
b71df7f
fix: create app error
czy88840616 Dec 12, 2024
25bec41
fix: lint
czy88840616 Dec 12, 2024
10c3dfa
fix: faas starter
czy88840616 Dec 13, 2024
9b2708a
fix: faas starter
czy88840616 Dec 13, 2024
4592074
fix: faas starter
czy88840616 Dec 13, 2024
def2ba6
fix: naming
czy88840616 Dec 14, 2024
d79d2fe
fix: create app
czy88840616 Dec 14, 2024
140d941
fix: create app
czy88840616 Dec 14, 2024
8540a91
fix: sequelize
czy88840616 Dec 14, 2024
40987cf
fix: preload after decorator service
czy88840616 Dec 15, 2024
5cc4850
fix: preload after decorator service
czy88840616 Dec 15, 2024
8bcf19e
fix: create app
czy88840616 Dec 15, 2024
fe31c9a
fix: create app
czy88840616 Dec 15, 2024
ba5a14d
fix: create app
czy88840616 Dec 15, 2024
38b741e
fix: create app
czy88840616 Dec 15, 2024
206dafb
fix: create app
czy88840616 Dec 15, 2024
cb68df9
fix: create app
czy88840616 Dec 15, 2024
0d295a2
fix: create app
czy88840616 Dec 15, 2024
2151608
fix: create app
czy88840616 Dec 15, 2024
94f5d41
fix: create app
czy88840616 Dec 15, 2024
67801a7
refactor: async context manager
czy88840616 Dec 15, 2024
d262b31
refactor: async context manager
czy88840616 Dec 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ site/changelog
**/test/*.txt
.audit
packages/**/test/tmp
.swc
.result
14 changes: 14 additions & 0 deletions .run/All Tests in nextjs.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="All Tests in nextjs" type="JavaScriptTestRunnerJest" folderName="midway all test">
<config-file value="$PROJECT_DIR$/packages/nextjs/jest.config.js" />
<node-interpreter value="project" />
<jest-package value="$PROJECT_DIR$/node_modules/jest" />
<working-dir value="$PROJECT_DIR$" />
<jest-options value="--no-cache" />
<envs>
<env name="NODE_DEBUG" value="midway:debug" />
</envs>
<scope-kind value="ALL" />
<method v="2" />
</configuration>
</component>
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"@types/node": "20.16.10",
"@vercel/ncc": "0.38.2",
"autocannon": "7.15.0",
"fs-extra": "11.2.0",
"jest": "29.7.0",
"lerna": "8.1.2",
"lerna-changelog": "2.2.0",
Expand All @@ -20,8 +21,7 @@
"typedoc": "^0.26.8",
"typescript": "5.3.3",
"why-is-node-running": "2.3.0",
"zx": "7.2.3",
"fs-extra": "11.2.0"
"zx": "8.2.2"
},
"scripts": {
"install_npm": "sh scripts/install_npm.sh",
Expand Down
2 changes: 1 addition & 1 deletion packages-resource/midway-test-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
],
"license": "MIT",
"devDependencies": {
"@midwayjs/core": "^3.18.0"
"@midwayjs/core": "workspace:^"
}
}
2 changes: 1 addition & 1 deletion packages-resource/midway-test-inner-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
],
"license": "MIT",
"devDependencies": {
"@midwayjs/core": "^3.18.0"
"@midwayjs/core": "workspace:^"
}
}
5 changes: 2 additions & 3 deletions packages-serverless/midway-fc-starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
"main": "dist/index.js",
"typings": "index.d.ts",
"dependencies": {
"@midwayjs/async-hooks-context-manager": "^3.18.0",
"@midwayjs/faas": "^3.18.0",
"@midwayjs/faas": "workspace:^",
"raw-body": "2.5.2"
},
"devDependencies": {
"@midwayjs/core": "^3.18.0"
"@midwayjs/core": "workspace:^"
},
"engines": {
"node": ">=12"
Expand Down
2 changes: 0 additions & 2 deletions packages-serverless/midway-fc-starter/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
} from '@midwayjs/faas';
import * as getRawBody from 'raw-body';
import { IncomingMessage } from 'http';
import { createContextManager } from '@midwayjs/async-hooks-context-manager';
import { mockContext } from './mock';
import { InitializeContext } from './interface';

Expand Down Expand Up @@ -74,7 +73,6 @@ export class BootstrapStarter extends AbstractBootstrapStarter {
applicationAdapter,
},
},
asyncContextManager: createContextManager(),
...this.options,
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Configuration } from '@midwayjs/core';
import { CommonJSFileDetector, Configuration } from '@midwayjs/core';
import * as faas from '@midwayjs/faas';

@Configuration({
imports: [faas],
detector: new CommonJSFileDetector(),
})
export class MainConfiguration {
}
88 changes: 0 additions & 88 deletions packages/async-hooks-context-manager/CHANGELOG.md

This file was deleted.

34 changes: 0 additions & 34 deletions packages/async-hooks-context-manager/package.json

This file was deleted.

157 changes: 0 additions & 157 deletions packages/async-hooks-context-manager/src/asyncHooksContextManager.ts

This file was deleted.

Loading
Loading