Skip to content

Commit

Permalink
refactor(@angular-devkit/schematics): remove UpdateBuffer and renam…
Browse files Browse the repository at this point in the history
…e `UpdateBuffer2` to `UpdateBuffer`

This PR removes the internally built `UpdateBuffer` and renames
`UpdateBuffer2` (based on magic-string) to `UpdateBuffer`. This
should have little to no impact for consumers.

BREAKING CHANGE:
The depracated `UpdateBuffer` has been removed and `UpdateBuffer2`
is renamed to `UpdateBuffer`. With this change the related and
deprecated symbols `ContentCannotBeRemovedException` and `Chunk`
have also been removed.
  • Loading branch information
kyubisation authored and clydin committed Oct 7, 2022
1 parent f2a0682 commit 9b07b46
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 603 deletions.
6 changes: 0 additions & 6 deletions packages/angular_devkit/schematics/src/tree/recorder_spec.ts
Expand Up @@ -7,7 +7,6 @@
*/

import { normalize } from '@angular-devkit/core';
import { UpdateBuffer2, UpdateBufferBase } from '../utility/update-buffer';
import { SimpleFileEntry } from './entry';
import { UpdateRecorderBase, UpdateRecorderBom } from './recorder';

Expand Down Expand Up @@ -36,11 +35,6 @@ describe('UpdateRecorderBase', () => {
const buffer = Buffer.from('Hello beautiful World');
const entry = new SimpleFileEntry(normalize('/some/path'), buffer);

// TODO: Remove once UpdateBufferBase.create defaults to UpdateBuffer2
spyOn(UpdateBufferBase, 'create').and.callFake(
(originalContent) => new UpdateBuffer2(originalContent),
);

const recorder = new UpdateRecorderBase(entry);
recorder.remove(6, 9);
recorder.insertRight(6, 'amazing');
Expand Down

This file was deleted.

72 changes: 0 additions & 72 deletions packages/angular_devkit/schematics/src/utility/linked-list.ts

This file was deleted.

0 comments on commit 9b07b46

Please sign in to comment.