-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Track updates of globals that are exported as default
- Loading branch information
1 parent
67ebd53
commit df0bdb8
Showing
21 changed files
with
82 additions
and
33 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 was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
test/chunking-form/samples/export-default-global/_expected/amd/main.js
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
test/chunking-form/samples/export-default-global/_expected/cjs/main.js
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
test/chunking-form/samples/export-default-global/_expected/es/main.js
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
test/chunking-form/samples/export-default-global/_expected/system/main.js
This file was deleted.
Oops, something went wrong.
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,4 @@ | ||
module.exports = { | ||
description: 'handles default exporting global variables', | ||
options: { output: { name: 'bundle' } } | ||
}; |
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,9 @@ | ||
define(function () { 'use strict'; | ||
|
||
var value = global; | ||
|
||
console.log(value); | ||
|
||
return value; | ||
|
||
}); |
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,7 @@ | ||
'use strict'; | ||
|
||
var value = global; | ||
|
||
console.log(value); | ||
|
||
module.exports = value; |
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,5 @@ | ||
var value = global; | ||
|
||
console.log(value); | ||
|
||
export default value; |
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,10 @@ | ||
var bundle = (function () { | ||
'use strict'; | ||
|
||
var value = global; | ||
|
||
console.log(value); | ||
|
||
return value; | ||
|
||
}()); |
12 changes: 12 additions & 0 deletions
12
test/form/samples/export-default-global/_expected/system.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,12 @@ | ||
System.register('bundle', [], function (exports) { | ||
'use strict'; | ||
return { | ||
execute: function () { | ||
|
||
var value = exports('default', global); | ||
|
||
console.log(value); | ||
|
||
} | ||
}; | ||
}); |
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,13 @@ | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
(global = global || self, global.bundle = factory()); | ||
}(this, (function () { 'use strict'; | ||
|
||
var value = global; | ||
|
||
console.log(value); | ||
|
||
return value; | ||
|
||
}))); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,11 @@ | ||
const assert = require('assert'); | ||
|
||
module.exports = { | ||
description: 'Tracks updates of default exported globals', | ||
context: { | ||
myGlobal: 42 | ||
}, | ||
exports(exports) { | ||
assert.deepStrictEqual(exports, { original: 42, updated: 1 }); | ||
} | ||
}; |
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 @@ | ||
export default myGlobal; | ||
myGlobal = 1; | ||
export const updated = myGlobal; |
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 @@ | ||
export { default as original, updated } from './lib'; |