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

Fix missing trace items and migrate required files test #29649

Merged
merged 1 commit into from
Oct 5, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,6 @@ export class TraceEntryPointsPlugin implements webpack.Plugin {
continue
}
const filepath = nodePath.join(root, file)

// don't include transpiled files as they are included
// in the webpack output (e.g. chunks or the entry itself)
if (depModMap.get(filepath)?.originalSource?.()) {
continue
}
tracedDeps.push(filepath)
}

Expand Down
4 changes: 4 additions & 0 deletions test/integration/production/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ describe('Production Usage', () => {
/node_modules\/react\/index\.js/,
/node_modules\/react\/package\.json/,
/node_modules\/react\/cjs\/react\.production\.min\.js/,
/next\/link\.js/,
/next\/dist\/client\/link\.js/,
],
notTests: [/node_modules\/react\/cjs\/react\.development\.js/],
},
Expand All @@ -129,6 +131,8 @@ describe('Production Usage', () => {
/node_modules\/react\/index\.js/,
/node_modules\/react\/package\.json/,
/node_modules\/react\/cjs\/react\.production\.min\.js/,
/next\/router\.js/,
/next\/dist\/client\/router\.js/,
],
notTests: [/node_modules\/react\/cjs\/react\.development\.js/],
},
Expand Down
18 changes: 0 additions & 18 deletions test/integration/required-server-files/app/next.config.js

This file was deleted.

7 changes: 5 additions & 2 deletions test/lib/next-modes/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class NextInstance {
protected nextConfig?: NextConfig
protected dependencies?: { [name: string]: string }
protected events: { [eventName: string]: Set<any> }
protected testDir: string
public testDir: string
protected isStopping: boolean
protected isDestroyed: boolean
protected childProcess: ChildProcess
Expand Down Expand Up @@ -156,7 +156,10 @@ export class NextInstance {
this.isDestroyed = true
this.emit('destroy', [])
await this.stop()
await fs.remove(this.testDir)

if (!process.env.NEXT_TEST_SKIP_CLEANUP) {
await fs.remove(this.testDir)
}
}

public get url() {
Expand Down
Loading