Skip to content

Commit

Permalink
Update packages (#229)
Browse files Browse the repository at this point in the history
* Update rimraf

* Update preact

* Update webpack

* Update typescript

* Audit
  • Loading branch information
whscullin authored Sep 8, 2024
1 parent f58e924 commit 59f2aaa
Show file tree
Hide file tree
Showing 5 changed files with 1,859 additions and 909 deletions.
2 changes: 1 addition & 1 deletion js/components/FileChooser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ const FilePickerChooser = ({
Choose File
</button>
&nbsp;
<span role="label">{selectedFilename}</span>
<label>{selectedFilename}</label>
</>
);
};
Expand Down
4 changes: 2 additions & 2 deletions js/formats/prodos/sapling_file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class SaplingFile extends ProDOSFile {

getBlockPointers() {
const saplingBlock = this.blocks[this.fileEntry.keyPointer];
const seedlingPointers = new DataView(saplingBlock);
const seedlingPointers = new DataView(saplingBlock.buffer);

const pointers = [this.fileEntry.keyPointer];
for (let idx = 0; idx < 256; idx++) {
Expand Down Expand Up @@ -67,7 +67,7 @@ export class SaplingFile extends ProDOSFile {
this.fileEntry.keyPointer = this.bitMap.allocBlock();
this.fileEntry.eof = data.byteLength;
const saplingBlock = this.blocks[this.fileEntry.keyPointer];
const seedlingPointers = new DataView(saplingBlock);
const seedlingPointers = new DataView(saplingBlock.buffer);

let remainingLength = data.byteLength;
let offset = 0;
Expand Down
12 changes: 6 additions & 6 deletions js/formats/prodos/tree_file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class TreeFile extends ProDOSFile {

getBlockPointers() {
const treeBlock = this.blocks[this.fileEntry.keyPointer];
const saplingPointers = new DataView(treeBlock);
const saplingPointers = new DataView(treeBlock.buffer);
const pointers = [];
for (let idx = 0; idx < 256; idx++) {
const saplingPointer =
Expand All @@ -28,7 +28,7 @@ export class TreeFile extends ProDOSFile {
if (saplingPointer) {
pointers.push(saplingPointer);
const seedlingPointers = new DataView(
this.blocks[saplingPointer]
this.blocks[saplingPointer].buffer
);
for (let jdx = 0; jdx < 256; jdx++) {
const seedlingPointer =
Expand All @@ -46,7 +46,7 @@ export class TreeFile extends ProDOSFile {
// TODO(whscullin): Why did I not use getBlockPointers for these...
read() {
const treeBlock = this.blocks[this.fileEntry.keyPointer];
const saplingPointers = new DataView(treeBlock);
const saplingPointers = new DataView(treeBlock.buffer);
let remainingLength = this.fileEntry.eof;
const data = new Uint8Array(remainingLength);
let offset = 0;
Expand All @@ -59,7 +59,7 @@ export class TreeFile extends ProDOSFile {
let jdx = 0;
if (saplingPointer) {
const saplingBlock = this.blocks[saplingPointer];
const seedlingPointers = new DataView(saplingBlock);
const seedlingPointers = new DataView(saplingBlock.buffer);

while (jdx < 256 && remainingLength > 0) {
const seedlingPointer =
Expand Down Expand Up @@ -92,7 +92,7 @@ export class TreeFile extends ProDOSFile {
this.fileEntry.eof = data.byteLength;

const treeBlock = this.blocks[this.fileEntry.keyPointer];
const saplingPointers = new DataView(treeBlock);
const saplingPointers = new DataView(treeBlock.buffer);

let remainingLength = this.fileEntry.eof;
let offset = 0;
Expand All @@ -103,7 +103,7 @@ export class TreeFile extends ProDOSFile {
const saplingBlock = this.blocks[saplingPointer];
saplingPointers.setUint8(idx, saplingPointer & 0xff);
saplingPointers.setUint8(0x100 + idx, saplingPointer >> 8);
const seedlingPointers = new DataView(saplingBlock);
const seedlingPointers = new DataView(saplingBlock.buffer);

let jdx = 0;

Expand Down
Loading

0 comments on commit 59f2aaa

Please sign in to comment.