File tree Expand file tree Collapse file tree
test/hotCases/determinism/issue-10174 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77const Queue = require ( "./util/Queue" ) ;
88
99const addToSet = ( a , b ) => {
10- let changed = false ;
10+ const size = a . size ;
1111 for ( const item of b ) {
12- if ( ! a . has ( item ) ) {
13- a . add ( item ) ;
14- changed = true ;
15- }
12+ a . add ( item ) ;
1613 }
17- return changed ;
14+ return a . size !== size ;
1815} ;
1916
2017class FlagDependencyExportsPlugin {
@@ -114,11 +111,7 @@ class FlagDependencyExportsPlugin {
114111 if ( module . buildMeta . providedExports !== true ) {
115112 moduleWithExports =
116113 module . buildMeta && module . buildMeta . exportsType ;
117- moduleProvidedExports = Array . isArray (
118- module . buildMeta . providedExports
119- )
120- ? new Set ( module . buildMeta . providedExports )
121- : new Set ( ) ;
114+ moduleProvidedExports = new Set ( ) ;
122115 providedExportsAreTemporary = false ;
123116 processDependenciesBlock ( module ) ;
124117 module . buildInfo . temporaryProvidedExports = providedExportsAreTemporary ;
Original file line number Diff line number Diff line change 1+ export * from './b'
Original file line number Diff line number Diff line change 1+ export * from './c'
2+
3+ export function b ( ) {
4+ // this extra export is needed for the issue to reproduce
5+ }
Original file line number Diff line number Diff line change 1+ export function c ( ) {
2+ return 42 ;
3+ }
Original file line number Diff line number Diff line change 1+ export default 1 ;
2+ -- -
3+ export default 2 ;
Original file line number Diff line number Diff line change 1+ import { c } from "./deps/a" ;
2+ import hot from "./hot" ;
3+
4+ it ( "should only register changes for the changed module" , done => {
5+ expect ( hot ) . toBe ( 1 ) ;
6+ expect ( c ( ) ) . toBe ( 42 ) ;
7+ module . hot . accept ( "./hot" , ( ) => {
8+ expect ( hot ) . toBe ( 2 ) ;
9+ expect ( c ( ) ) . toBe ( 42 ) ;
10+ done ( ) ;
11+ } ) ;
12+
13+ NEXT ( require ( "../../update" ) ( done ) ) ;
14+ } ) ;
You can’t perform that action at this time.
0 commit comments