Commit Graph

286 Commits

Author SHA1 Message Date
Tobias Koppers b443555501 this is a workaround to remove compilation-specific references from modules in the unsafe cache
I'm not proud of this solution, but it fixes it for now
Long term we might move these kind of references out of the module
into some kind of compilation/module graph specific store.
But that's not yet possible for backward-compat reasons.
2021-07-01 11:46:59 +02:00
Tobias Koppers 8e9daad216 track changes and removals correctly
purge filesystem correctly
2021-05-19 19:06:58 +02:00
Tobias Koppers b0fa9ccada pretty files 2021-05-11 09:31:46 +02:00
Tobias Koppers 87c0d1cd94 Merge branch 'master' into johnnyreilly/master 2021-05-07 18:07:23 +02:00
Tobias Koppers f243907fe8 emit assets even when they were cleaned from fs in the meantime 2021-04-30 11:55:56 +02:00
Tobias Koppers 7cc40782b7 fix some internal types 2021-04-22 21:48:25 +02:00
Tobias Koppers 324a46d908 Revert "dispose code generation results after sealing the compilation"
This reverts commit cef2a8fea0.
2021-04-09 19:50:13 +02:00
Tobias Koppers cef2a8fea0 dispose code generation results after sealing the compilation 2021-04-08 18:33:51 +02:00
Tobias Koppers a3be72b24c avoid leaking memory 2021-04-07 20:50:42 +02:00
Tobias Koppers 8074127b98 avoid leaking memory after the compiler has been closed
clear cache on shutdown
2021-04-01 16:59:48 +02:00
Tobias Koppers 18967078cb cleanup modules after compilation to avoid leaking references when they are cached 2021-03-15 11:23:54 +01:00
Tobias Koppers a1515fa9f0 add experimental lazy compilation 2021-01-21 17:39:56 +01:00
Tobias Koppers 013ca3bdd7 add commonjsMagicComments options
move javascript related options from 'module' to 'module.parser.javascript'
2021-01-20 20:19:49 +01:00
Tobias Koppers a2e326129c make filesystem types compatible with memfs and normal fs
fixes #12400
2021-01-13 10:14:58 +01:00
Tobias Koppers 58984b77cb update type annotations 2021-01-11 22:15:31 +01:00
Tobias Koppers 10aa3daede add experiments.layers
add layers to define different module layers
support module layers in stats

add layer support for NormalModules

fixes #11466
2021-01-05 20:50:59 +01:00
Tobias Koppers c2069f8db7 fix handling of multiple identical assets with different querystrings
fixes #11894
2020-12-09 16:10:32 +01:00
Tobias Koppers ccfe01aab4 allow to process assets that are added during processAssets
fix and add processAsset stages

allow to hook into RealContentHashPlugin for custom hashing
2020-11-26 14:00:21 +01:00
Tobias Koppers 214b06645a re-check immutable state when removing a query string
fixes #11820
2020-10-26 16:28:52 +01:00
Tobias Koppers 65eca2e529 expose webpack from Compiler
fix some jsdoc descriptions
2020-10-12 20:16:58 +02:00
Rishabh Chawla bf9ae831bd chore: implement suggestions 2020-09-19 09:53:03 +05:30
Rishabh Chawla 29d17d4dab
feat: add watching property to compiler 2020-09-17 18:31:07 +05:30
Tobias Koppers 8497cd34c6 move start and endTime from Stats to Compilation 2020-09-03 22:01:25 +02:00
Tobias Koppers 2e3a7cda28 setup properties of child compiler before applying plugins 2020-08-28 11:27:34 +02:00
Tobias Koppers 8894916ac0 improve compilerPath 2020-08-24 18:16:57 +02:00
Tobias Koppers 1548080cb9 improve error message 2020-08-14 18:36:09 +02:00
Tobias Koppers ca369f23c5 do cache related tasks after calling handler in watching
improve progress output
2020-08-01 09:00:17 +02:00
Tobias Koppers 5a2fa99055 call invalid hook also when manually invalidating watching 2020-07-15 19:34:23 +02:00
Tobias Koppers fd9b399ae9 Create Cache facade to make it easier to use
add missing serializers for classes used in test suite
2020-07-15 11:14:28 +02:00
Tobias Koppers 95120bdf98
Merge pull request #11135 from webpack/ci/stability
CI stability
2020-07-08 12:19:37 +02:00
Tobias Koppers 6c425546df Avoid using real watchers in MultiWatching test case
add watchFileSystem to MultiCompiler and typings
2020-07-08 11:17:00 +02:00
Tobias Koppers 4866062aed add error when trying to write assets that only differ in casing 2020-07-08 09:27:45 +02:00
Tobias Koppers 5f4c4662dd rename parsePathQueryFragment to parseResource and add caching 2020-07-06 17:39:52 +02:00
Tobias Koppers dc37d6910a add finishMake hook to Compiler 2020-06-10 16:28:59 +02:00
Tobias Koppers 49752a06a8 cleanup asset processing
deprecate writing to compilation.assets after sealing.
merge all asset processing into single hook with stages.
Deprecate additionalChunkAssets and optimizeChunkAssets.
Redirect additionalAssets, optimizeAssets to processAssets for backward-compat.
Remove finishAssets hook without deprecation as it was not in v4.
2020-05-22 10:39:21 +02:00
evilebottnawi dafa4cd69a chore: setup cspell 2020-03-12 19:51:26 +03:00
Tobias Koppers f1dd328779 refactor library system 2020-02-26 17:35:52 +01:00
Tobias Koppers 6477ca56f8 Split options defaulting in normalization and defaults
Apply defaults after plugins are applied to allow plugins to feature their own defaults.
This allows to make preset plugins.
2020-02-17 19:12:54 +01:00
Tobias Koppers 645263f023 make compiler/compilation.cache read-only, to make it easier to find incompatible plugins
fixes #10341
2020-02-05 08:39:12 +01:00
Tobias Koppers 1070ce925b remove Array.prototype.reduce calls to simplify code 2020-01-17 18:31:29 +01:00
Tobias Koppers d57820c53e make RequestShortener simpler, only use relative path 2020-01-15 18:48:37 +01:00
Tobias Koppers 2f1a0176b3 rename filesModified -> modifiedFiles
avoid creating additional arrays by allowing Iterable on WatchFileSystem interface
2019-11-15 13:49:15 +01:00
Max Woo 77f01de81a reset filesModified during compiler construction and watch(), to match removedFiles 2019-11-15 13:49:13 +01:00
Tobias Koppers b401713633 fix problem with snapshotting managed items
add support for child loggers
add logging for snapshot errors
improve FileSystemInfo logging
improve managed item reading performance
upgrade enhanced-resolve for readdir purge fix
2019-11-05 23:12:02 +01:00
Tobias Koppers 07671f3481 allow to disable compareBeforeEmit 2019-11-04 16:46:45 +01:00
Tobias Koppers e8f2a8329d avoid emitting files when they already exits in output filesystem 2019-11-04 09:23:18 +01:00
Tobias Koppers b80174a069 Improve backward-compat for various things
to enable mini-css-extract-plugin
2019-09-26 22:06:54 +02:00
Tobias Koppers 7bde43f47a Merge tag 'v4.40.0' into next
4.40.0
2019-09-13 11:12:26 +02:00
Tobias Koppers 758269e814 add emit/updateAsset to Compilation
add asset info with
* immutable for long term cache-able asset
* size for the asset size in bytes
* development for devtools
* hotModuleReplacement for HMR assets

show asset info in stats
2019-09-11 14:43:42 +02:00
Tobias Koppers ba1a3e6f26 change assetEmitted hook to include more info 2019-09-05 14:10:16 +02:00
Tobias Koppers a2caa36b8e add immutablePaths next to managedPaths for paths in the yarn cache
for PnP support
2019-08-20 14:50:07 +02:00
Tobias Koppers e5cecdad23 store build dependencies snapshot in pack
add snapshot shortcut for package manager managed paths
add cache.managedPaths
2019-08-13 17:02:37 +02:00
Tobias Koppers b73d35bbee Merge tag 'v4.39.0' into next
4.39.0
2019-08-05 13:12:09 +02:00
Tobias Koppers 40755384bf
Merge pull request #9506 from webpack/logging/status
Improve infrastructure logging
2019-08-01 16:45:48 +02:00
Tobias Koppers 0c8d75c151 fix name for log hook 2019-08-01 13:51:20 +02:00
Tobias Koppers 94bcce0b24 fix code and snapshots 2019-08-01 12:21:01 +02:00
jamesgeorge007 164f48f1fd fix: code lint 2019-08-01 12:20:59 +02:00
James George a302cfa8d0 Minor fix 2019-08-01 12:20:57 +02:00
James George de3e609a58 refactor 2019-08-01 12:20:56 +02:00
jamesgeorge007 f9377906ea ease of access for contents of emitted assets 2019-08-01 12:20:55 +02:00
Tobias Koppers db58219346 add logging to Compiler 2019-07-26 14:04:35 +02:00
Tobias Koppers 4afc097a07 add logging to Compiler 2019-07-26 14:03:55 +02:00
Tobias Koppers c17dfde7a8 Merge tag 'v4.37.0' into next
4.37.0
2019-07-24 10:51:04 +02:00
Tobias Koppers 677ccd90ea small fixes 2019-07-23 09:28:06 +02:00
Tobias Koppers d532c4f24f allow to configure the infrastructure logger
rename includeDebugLogging to loggingDebug
rename logToConsole to createConsoleLogger
2019-07-22 09:22:36 +02:00
Tobias Koppers d80989bfbf allow to configure runtime logging 2019-07-21 22:28:46 +02:00
Tobias Koppers 09103af6c4 add runtime logging 2019-07-19 12:31:18 +02:00
Tobias Koppers d849160d3f add logging API
Plugins:
Compiler.getInfrastructureLogger(name)
Compilation.getLogger(name)

Loader:
this.getLogger([name])

API equal to console API with these methods:
error, warn, info, log, debug,
time, timeLog, timeEnd,
group, groupCollapsed, groupEnd,
profile, profileEnd,
clear
2019-07-18 17:13:40 +02:00
Tobias Koppers 35791372c9
Merge branch 'next' into feat_afterDone_hook 2019-07-09 21:14:40 +02:00
Tobias Koppers e9c0d068dd refactor filesystem interfaces
add Compiler.intermediateFileSystem
avoid using `path` and `fs` module when possible
move `join`, `mkdirp` and `dirname` into utils
join and dirname is optional in FileSystem interface
remove mkdirp from Filesystem interface
2019-06-11 17:32:58 +02:00
Florent Cailhol b12f24d20c Update hook types 2019-05-10 09:52:22 +02:00
Matt Jones ea172ec5fd Convert finishModules hook to be an AsyncSeries 2019-04-02 09:25:36 +11:00
Tobias Koppers 1da2c422d6 remove fast-json-stable-stringify 2019-01-27 11:47:31 +01:00
wtgtybhertgeghgtwtg d01ae5ac69 Replace `json-stable-stringify` with `fast-json-stable-stringify`. 2019-01-25 19:33:49 -07:00
Tobias Koppers 8ce18cdeae Merge tag 'v4.29.0' into next
4.29.0
2019-01-20 18:49:21 +01:00
Tobias Koppers 8300425e1c new version of emitting assets
It allows to free memory of Sources with the trade-off of disallowing reading asset content after emitting
2019-01-18 21:56:53 +01:00
Tobias Koppers 0bc0f05fc7 use updated webpack-sources, use new buffer method 2019-01-18 20:46:31 +01:00
Tobias Koppers 6e383cfbab make test for Source.buffer more strict 2019-01-17 15:06:22 +01:00
Tobias Koppers aaf85dbd1c add output.futureEmitAssets
add a new version of emitting assets which allows to free memory of Sources with the trade-off of disallowing reading asset content after emitting

It also uses Source.buffer when available.
2019-01-17 13:33:27 +01:00
mc-zone 4f3e0d27b5 Merge branch 'next' into feat_afterDone_hook 2019-01-13 11:24:32 +08:00
mc-zone 180a7c0d1a Merge branch 'next' into feat_afterDone_hook 2019-01-13 11:16:10 +08:00
Tobias Koppers 0f7355e170 Merge tag 'v4.28.4' into next
4.28.4
2019-01-10 16:51:17 +01:00
Connor Davis 80514cc282
Add ts declarations 2019-01-09 13:53:04 -06:00
Connor Davis 78abf04fc3
Use eachLimit instead even though forEachLimit apears to be an alias... 2019-01-09 13:42:06 -06:00
Connor Davis 9cb42256c6
forEach to forEachLimit 2019-01-09 13:25:44 -06:00
Tobias Koppers ae4a5e67db insert process.nextTick to get cleaner stacks 2019-01-08 15:14:35 +01:00
Tobias Koppers 90baf475af Smaller performance improvements in NormalModuleFactory 2019-01-08 15:14:33 +01:00
Tobias Koppers ef9e25d8ea report dependencies from resolver to the compilation
refactor NormalModuleFactory
2019-01-08 15:14:25 +01:00
Tobias Koppers b5db48291b add caching to FlagDependencyExportsPlugin 2018-12-31 12:29:01 +01:00
mc-zone ee2d69b901 refactor: remove useless return statement 2018-12-25 18:43:34 +08:00
mc-zone 97fdbbb6a9 feat: add compiler.afterDone hook triggered after other callbacks 2018-12-25 15:08:12 +08:00
Florent Cailhol e06b4853d6 Add compiler typings 2018-12-12 10:26:53 +01:00
Shah Kashani 217b2ad7e2 Fix for #8398 - call failed-hook on compilation errors 2018-11-21 11:16:25 -05:00
Florent Cailhol 9ffb4e45dc Replace Source#emitted by a WeakSet 2018-11-08 23:26:31 +01:00
Tobias Koppers d9a0d3a139 Merge tag 'v4.23.0' into next
4.23.0
2018-10-24 20:10:30 +02:00
Tobias Koppers af4cb35784
Merge pull request #8175 from cacheflow/add-tracking-of-removed-files
feat(Compiler): Add file removal tracking in watch-run
2018-10-24 10:44:40 +02:00
renatoagds 7e0ca7193d move watchMode trigger for watch in compiler and close in watching 2018-10-23 14:52:32 -03:00
renatoagds 2f7533202c adding watchMode flag in compiler 2018-10-22 19:23:47 -03:00
Lex Alexander 2cdf04e14b feat(Compiler): Add file removal tracking in watch-run
-Closes 5072.
2018-10-18 15:58:58 -07:00
Tobias Koppers ae72fe3724 fixes timestamp transfer from watcher 2018-09-27 21:28:07 +02:00