Commit Graph

58 Commits

Author SHA1 Message Date
Tobias Koppers d6cf42e4c2 merge used with usedExports
usedExports = false now means module is not used
2018-08-06 21:05:11 +02:00
Tobias Koppers c4e0a9f72e Move Module.used and Module.usedExports into ModuleGraph 2018-08-06 21:04:01 +02:00
Tobias Koppers 381e2db200 replace Module.reasons and Dependency.module with ModuleGraph 2018-08-02 17:54:44 +02:00
Tobias Koppers 11e127d162 pass moduleGraph along with multiple methods 2018-08-02 17:54:42 +02:00
Tobias Koppers 78f01763a2 add getNumberofIdOccurrences to Dependency as override-able method 2018-08-02 16:07:29 +02:00
Tobias Koppers 831e71c797 make argument of DependencyTemplate an object 2018-08-02 16:07:29 +02:00
Tobias Koppers f68c1f7ab6 add additional arguments to updateHash 2018-08-02 16:04:10 +02:00
Tobias Koppers cf5f1d723c format existing code 2018-07-30 21:29:21 +02:00
Florent Cailhol 60ef6a6a30 Make DependencyReference dynamic 2018-07-26 15:31:04 +02:00
Tobias Koppers eba85a491d add types to Dependency and subclasses 2018-07-25 09:33:48 +02:00
Tobias Koppers fcf3f63f0e add DependencyTemplate base class and inherit types from this
fix a few typing issues
2018-07-23 20:11:59 +02:00
Tobias Koppers b4699c0657 add order for DependencyReference
and add types for touched code
2018-06-08 13:20:57 +02:00
Tobias Koppers 115a72ce50 SideEffectsPlugin don't modify cache entries
fixes #7400
2018-05-27 21:53:21 +02:00
Mohsen Azimi 589f40b26a Add missing class member initializations found by TypeScript 2018-04-11 16:48:44 +02:00
Tobias Koppers e65751ac6f
Merge pull request #6932 from mohsen1/hideStack
Add HarmonyLinkingError class
2018-04-04 11:06:39 +02:00
Florent Cailhol 8570165c1f Use a class for dependency references 2018-04-04 09:17:10 +02:00
Mohsen Azimi 3e49fcd0a9
CR feedback 2018-04-03 21:10:07 -07:00
Mohsen Azimi 4ae95a6892
Add HideStackError class for errors that have hideStack = true 2018-04-02 09:58:07 -07:00
Florent Cailhol f1092ad516 Update prettier toolchain 2018-03-26 16:56:10 +02:00
rhysd 81e47b6eaf Fix typos 2018-03-13 18:05:58 +09:00
Tobias Koppers 5238159d21 run prettier on existing code 2018-02-25 02:00:20 +01:00
Tobias Koppers 4d77f847db fix a crash with buildMeta of null 2018-02-09 17:35:28 +01:00
Tobias Koppers da5c8d87aa add tree-shaking for json modules 2017-12-22 19:49:43 +01:00
Tobias Koppers 53a1d6c7b5 replace harmonyModule flag with exportsType 3-state
exportsType falsy: It's non-harmony module
exportsType "namespace": It's a harmony module, the exports is the namespace object
exportsType "default": It's a harmony module, the exports is the default exports, named exports are properties of the default export
2017-12-22 19:42:41 +01:00
Tobias Koppers 2aac6badd5 move generated runtime code to RuntimeTemplate 2017-12-22 19:41:28 +01:00
Tobias Koppers ffb977fed4 refactor meta -> buildMeta, add factoryMeta
add compat layer to Module.meta
2017-12-12 16:57:50 +01:00
Tobias Koppers 758a388f69 pass runtimeTemplate to DependencyTemplate
move outputOptions and requestShortener into runtimeTemplate
2017-12-11 17:59:32 +01:00
Tobias Koppers 21cdc84b71 process imports from mjs to non-esm correctly
give nice error messages when importing non-esm the wrong way
It also disallows using namespace object from non-esm modules

fixes #5686
2017-11-23 14:10:52 +01:00
Tobias Koppers 5c489b6c5d Refactor harmony modules
separate side effects from specifier
fixes TDZ for export let/const
bigger bundles are caused by correct export const/let behavior

BREAKING CHANGE: Internal have changed. Plugins could rely on them.
2017-09-14 09:44:32 +02:00
Tobias Koppers 1ebca7e55d use `Object` constructor to clear context from functions 2017-05-21 20:16:39 +02:00
Tobias Koppers d967a4623c add `module.strictThisContextOnImports` option
to allow spec-comforming behavior this context on
called imported harmony functions
2017-05-21 09:23:35 +02:00
Joe Haddad fa47a39107
Add strictExportPresence option 2017-02-22 21:06:43 -05:00
Tobias Koppers 8e69a80847 code linting 2017-01-11 12:29:01 +01:00
timse 8fd2957417 refactor HarmonyImportSpecifierDependency to es6 (#3734) 2017-01-04 12:50:35 -06:00
Sean Larkin aa8d01bf8d refactor(eslint): Added no-unsed-vars, env specific .eslintrc's for buildin & hot (#3636)
* refactor(eslint): Added no-unsed-vars, env specific .eslintrc's for buildin & hot

* This change allows for buildin to now be part of the lint test by addition of an extra .eslintrc file which extends existing but sets es6 to false
* Turned on no-unused-vars for eslint, and then removed all warnings from turning that feature on
* Was getting notified of errors in "quote" property in eslintrc, so changed to correct value from error to 2.

* beautify

* swap invalid eslint config val
2016-12-30 09:43:49 -06:00
Tobias Koppers 76efbcf801 hide stack trace in export warnings 2016-09-07 09:46:53 +02:00
Tobias Koppers 65b70bf5ed finished refactory of tree shaking
changes format for dll manifest

#2953
fixes #2959
2016-09-07 09:44:53 +02:00
Tobias Koppers 3a6b649016 star import a non-harmony modules behaves like require
fixes #2732
2016-07-04 10:24:04 +02:00
Tobias Koppers 1ee3585fa1 compilation error don't affect parent module
recover after syntax error
assume es6 module on syntax error

#2117
2016-07-03 13:13:01 +02:00
Tobias Koppers c9143d49c7 warn when name is imported that is not exported 2016-06-24 01:52:28 +02:00
Tobias Koppers f4ba0d0f0a support for importing into object shothand
fixed #2522
2016-06-04 15:22:47 +02:00
Tobias Koppers d382b10683 fixed #2570 2016-06-04 14:19:20 +02:00
Tobias Koppers 75b93a1438 fixes #2455, fixes #2460 2016-05-14 14:33:04 +02:00
Tobias Koppers 9f1564d261 fixed some hashing issues with export renaming 2016-02-17 13:15:58 +01:00
Tobias Koppers 2b94afad33 check for not available module 2016-02-16 16:56:03 +01:00
Tobias Koppers d71d58a355 shorter binding 2016-02-13 10:13:39 +01:00
Tobias Koppers 1cf2cb5fef fixed and test edge cases with this scope in harmony imports 2016-02-13 10:00:47 +01:00
Tobias Koppers 84eb9a2741 fixed this scope in harmony imports 2016-02-13 09:33:30 +01:00
Tobias Koppers 22124e5bd4 fixed a few issues 2016-02-04 09:59:28 +01:00
Tobias Koppers 0eb5b20c58 added more stuff to the hash 2016-02-04 00:06:16 +01:00