-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'canary' into hotfix/reset-scroll-via-router
- Loading branch information
Showing
6 changed files
with
92 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Below type error is intentional, it helps check that we don't filter this | ||
// file out because it's named con(test).js | ||
export default (): boolean => 'Index page' |
17 changes: 17 additions & 0 deletions
17
test/integration/typescript-filtered-files/test/index.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* eslint-env jest */ | ||
|
||
import { nextBuild } from 'next-test-utils' | ||
import { join } from 'path' | ||
|
||
jest.setTimeout(1000 * 60 * 2) | ||
|
||
const appDir = join(__dirname, '..') | ||
describe('TypeScript filtered files', () => { | ||
it('should fail to build the app with a file named con*test*.js', async () => { | ||
const output = await nextBuild(appDir, [], { stdout: true, stderr: true }) | ||
expect(output.stdout).not.toMatch(/Compiled successfully/) | ||
expect(output.code).toBe(1) | ||
expect(output.stderr).toMatch(/Failed to compile/) | ||
expect(output.stderr).toMatch(/is not assignable to type 'boolean'/) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"compilerOptions": { | ||
"esModuleInterop": true, | ||
"module": "esnext", | ||
"jsx": "preserve", | ||
"target": "es5", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"noEmit": true, | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true | ||
}, | ||
"exclude": ["node_modules"], | ||
"include": ["next-env.d.ts", "components", "pages"] | ||
} |