Skip to content

Commit

Permalink
feat: support nextjs in v4 (#4141)
Browse files Browse the repository at this point in the history
* chore: add nextjs component

* feat: add nextjs

* feat: add functional export

* chore: createApp support options

* feat: test with next

* feat: with sample

* feat: with sample

* test: fix

* test: add next test

* test: add next test

* test: add next test

* fix: circle dep

* fix: lint

* fix: legacy test

* fix: lint

* fix: sync load module

* fix: sync load module

* fix: lint

* fix: lint

* fix: mock test

* test: fix circle

* fix: lock

* chore: remove circle dep

* fix: create app

* fix: create app error

* fix: create app error

* fix: lint

* fix: faas starter

* fix: faas starter

* fix: faas starter

* fix: naming

* fix: create app

* fix: create app

* fix: sequelize

* fix: preload after decorator service

* fix: preload after decorator service

* fix: create app

* fix: create app

* fix: create app

* fix: create app

* fix: create app

* fix: create app

* fix: create app

* fix: create app

* fix: create app

* refactor: async context manager

* refactor: async context manager
  • Loading branch information
czy88840616 authored Dec 15, 2024
1 parent 65cb0c7 commit 3a0651a
Show file tree
Hide file tree
Showing 302 changed files with 5,720 additions and 3,796 deletions.
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

0 comments on commit 3a0651a

Please sign in to comment.