Skip to content

Commit 38f34c7

Browse files
piehnickytonlineLekoArts
authored
fix: resolve next-server from next app directory and not from plugin (#2059)
Co-authored-by: Nick Taylor <[email protected]> Co-authored-by: LekoArts <[email protected]>
1 parent 4df732b commit 38f34c7

File tree

26 files changed

+628
-187
lines changed

26 files changed

+628
-187
lines changed

.eslintignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ packages/runtime/lib
88
packages/runtime/dist-types
99
jestSetup.js
1010
test/e2e
11-
test/fixtures/broken_next_config/next.config.js
11+
test/fixtures/broken_next_config/next.config.js
12+
test/integration/fixtures

.eslintrc.js

+9
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ module.exports = {
4848
'n/no-unsupported-features/es-syntax': 'off',
4949
'@typescript-eslint/no-extra-semi': 'off',
5050
'n/no-missing-import': 'off',
51+
// https://github.com/typescript-eslint/typescript-eslint/issues/2483
52+
'no-shadow': 'off',
53+
'@typescript-eslint/no-shadow': 'error',
5154
},
5255
},
5356
{
@@ -74,12 +77,18 @@ module.exports = {
7477
'unicorn/no-await-expression-member': 0,
7578
'import/no-anonymous-default-export': 0,
7679
'no-shadow': 0,
80+
'@typescript-eslint/no-shadow': 0,
7781
'@typescript-eslint/no-var-requires': 0,
7882
'require-await': 0,
83+
'n/no-sync': 0,
84+
'promise/prefer-await-to-then': 0,
85+
'no-async-promise-executor': 0,
86+
'import/no-dynamic-require': 0,
7987
// esling-plugin-jest specific rules
8088
'jest/consistent-test-it': ['error', { fn: 'it', withinDescribe: 'it' }],
8189
'jest/no-disabled-tests': 0,
8290
'jest/no-conditional-expect': 0,
91+
'jest/no-standalone-expect': [2, { additionalTestBlockFunctions: ['beforeAll'] }],
8392
},
8493
},
8594
],
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Next Runtime Integration Tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
concurrency:
9+
group: ${{ github.head_ref || github.run_id }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
build:
14+
name: Integration tests
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Installing with LTS Node.js
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: 18
23+
check-latest: true
24+
- name: Install netlify-cli and npm
25+
run: npm install -g netlify-cli npm
26+
- name: NPM Install
27+
run: npm install
28+
- name: Run integration tests
29+
run: npm run test:integration

package-lock.json

+186-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"test:next:all": "RUN_SKIPPED_TESTS=1 jest -c test/e2e/jest.config.all.js",
2525
"test:next:appdir": "jest -c test/e2e/jest.config.appdir.js",
2626
"test:jest": "jest",
27+
"test:integration": "jest -c test/integration/jest.config.js",
2728
"playwright:install": "playwright install --with-deps chromium",
2829
"test:jest:update": "jest --updateSnapshot",
2930
"test:update": "run-s build build:demo test:jest:update"
@@ -79,6 +80,7 @@
7980
"jest-junit": "^14.0.1",
8081
"mock-fs": "^5.2.0",
8182
"netlify-plugin-cypress": "^2.2.1",
83+
"node-fetch": "^2.6.6",
8284
"npm-run-all": "^4.1.5",
8385
"outdent": "^0.8.0",
8486
"pathe": "^1.1.0",
@@ -90,7 +92,8 @@
9092
"sass": "^1.49.0",
9193
"sharp": "^0.30.4",
9294
"tmp-promise": "^3.0.2",
93-
"typescript": "^4.3.4"
95+
"typescript": "^4.3.4",
96+
"wait-on": "^7.0.1"
9497
},
9598
"dependencies": {
9699
"next": "^13.3.0"
@@ -106,6 +109,7 @@
106109
"**/test/**/*.spec.js",
107110
"**/test/**/*.spec.ts",
108111
"!**/test/e2e/**",
112+
"!**/test/integration/**",
109113
"!**/test/fixtures/**",
110114
"!**/test/sample/**",
111115
"!**/test/templates/edge-shared/**"

0 commit comments

Comments
 (0)