Merged
Conversation
By extracting the `RecordTransformBuffer` from the class that implements it, now called `SimpleRecordTransformBuffer`, we do the following: * Unlock experimentation with other implementations of `RecordTransformBuffer`. * Remove the circular dependency between `sync-record-cache` and `record-transform-buffer`. This cycle, while still "legal", highlighted an issue in esbuild. * Require that an _instance_ of a `RecordTransformBuffer` be passed into record caches on construction, which simplifies the settings. Note: To keep behavior consistent, all the standard derived cache classes now override `_getTransformBuffer` to construct a `SimpleRecordTransformBuffer` if a `transformBuffer` hasn't been provided in settings.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
By extracting the
RecordTransformBufferfrom the class that implements it, now calledSimpleRecordTransformBuffer, we do the following:RecordTransformBuffer.sync-record-cacheandrecord-transform-buffer. This cycle, while still "legal", highlighted an issue in esbuild.RecordTransformBufferbe passed into record caches on construction, which simplifies the settings.Note: To keep behavior consistent, all the standard derived cache classes now override
_getTransformBufferto construct aSimpleRecordTransformBufferif atransformBufferhasn't been provided in settings.