Skip to content

Commit

Permalink
[v3.0] New hashing algorithm that "fixes (nearly) everything" (#4543)
Browse files Browse the repository at this point in the history
* Initial new hashing idea

* Simplify external import path generation

197 broken tests left

* Use correct file names in chunk info

197 broken tests left

* Implement first draft for hashing algorithm

189 broken tests left

* Remove active deprecations

this.emitAsset
this.emitChunk
this.getAssetFileName
this.getChunkFileName
import.meta.ROLLUP_ASSET_URL_
import.meta.ROLLUP_CHUNK_URL_

* Reduce render parameters

* Always scan all chunks for hashes

* Fix asset emission and remaining tests

* Reintroduce augmentChunkHash and get OutputChunk by converting RenderedChunk

* Provide chunk graph in renderChunk

* Handle hash collisions

* Remove deprecated hacky asset emission

* Allow to configure hash sizes per file

* Update documentation

* Extend tests

* Minor improvements

* Improve documentation about hashing

* Replace hash in sourcemap file

* Provide ChunkInfo in banner/footer/intro/outro

* Extract hashing logic

* Clean up hashing logic

* Add ExternalChunk wrapper

* Store inputBase on Chunk

* Store snippets on Chunk

* Align chunk interfaces

* Reduce this. property access

* Move dynamicImportFunction warning to options normalization

* Restructure rendering logic

* Do not run on Node 10

* Update documentation

* Try to fix Windows tests

* Improve coverage

* Remove graph background colors

3.0.0-0
  • Loading branch information
lukastaegert committed Jul 30, 2022
1 parent e5b3ba0 commit 2420cf8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
@@ -1,6 +1,10 @@
define(['require'], (function (require) { 'use strict';

console.log('main');
<<<<<<<< HEAD:test/chunking-form/samples/emit-file/filenames-function-patterns/_expected/amd/entry-main-5940aabc-amd.js
new Promise(function (resolve, reject) { require(['./chunk-deb-87ce45a9-amd'], resolve, reject); }).then(console.log);
========
new Promise(function (resolve, reject) { require(['./chunk-deb-faae56f2-amd'], resolve, reject); }).then(console.log);
>>>>>>>> 3030e2f11 ([v3.0] New hashing algorithm that "fixes (nearly) everything" (#4543)):test/chunking-form/samples/emit-file/filenames-function-patterns/_expected/amd/entry-main-aaf15a0c-amd.js

}));
@@ -1,4 +1,8 @@
'use strict';

console.log('main');
<<<<<<<< HEAD:test/chunking-form/samples/emit-file/filenames-function-patterns/_expected/cjs/entry-main-9cf3a232-cjs.js
Promise.resolve().then(function () { return require('./chunk-deb-69905607-cjs.js'); }).then(console.log);
========
Promise.resolve().then(function () { return require('./chunk-deb-2221fa83-cjs.js'); }).then(console.log);
>>>>>>>> 3030e2f11 ([v3.0] New hashing algorithm that "fixes (nearly) everything" (#4543)):test/chunking-form/samples/emit-file/filenames-function-patterns/_expected/cjs/entry-main-69b6552e-cjs.js

0 comments on commit 2420cf8

Please sign in to comment.