Skip to content

Commit

Permalink
Fix missing trace items and migrate required files test
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Oct 5, 2021
1 parent ce73df8 commit 3a1174e
Show file tree
Hide file tree
Showing 22 changed files with 109 additions and 178 deletions.
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

0 comments on commit 3a1174e

Please sign in to comment.