Upgrade package.json dependencies (#7933)

Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
Björn Harrtell
2023-05-10 05:33:17 +02:00
committed by GitHub
parent 72b56fd081
commit 368428cb94
7 changed files with 321 additions and 156 deletions

View File

@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));

132
tests/ts/foobar/tab.ts Normal file
View File

@@ -0,0 +1,132 @@
// automatically generated by the FlatBuffers compiler, do not modify
import * as flatbuffers from 'flatbuffers';
import { Abc } from '../foobar/abc.js';
import { class_ } from '../foobar/class.js';
export class Tab implements flatbuffers.IUnpackableObject<TabT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):Tab {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsTab(bb:flatbuffers.ByteBuffer, obj?:Tab):Tab {
return (obj || new Tab()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsTab(bb:flatbuffers.ByteBuffer, obj?:Tab):Tab {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new Tab()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
abc():Abc {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.readInt32(this.bb_pos + offset) : Abc.a;
}
mutate_abc(value:Abc):boolean {
const offset = this.bb!.__offset(this.bb_pos, 4);
if (offset === 0) {
return false;
}
this.bb!.writeInt32(this.bb_pos + offset, value);
return true;
}
arg():class_ {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.readInt32(this.bb_pos + offset) : class_.arguments_;
}
mutate_arg(value:class_):boolean {
const offset = this.bb!.__offset(this.bb_pos, 6);
if (offset === 0) {
return false;
}
this.bb!.writeInt32(this.bb_pos + offset, value);
return true;
}
name():string|null
name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
name(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 8);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
static getFullyQualifiedName():string {
return 'foobar.Tab';
}
static startTab(builder:flatbuffers.Builder) {
builder.startObject(3);
}
static addAbc(builder:flatbuffers.Builder, abc:Abc) {
builder.addFieldInt32(0, abc, Abc.a);
}
static addArg(builder:flatbuffers.Builder, arg:class_) {
builder.addFieldInt32(1, arg, class_.arguments_);
}
static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
builder.addFieldOffset(2, nameOffset, 0);
}
static endTab(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createTab(builder:flatbuffers.Builder, abc:Abc, arg:class_, nameOffset:flatbuffers.Offset):flatbuffers.Offset {
Tab.startTab(builder);
Tab.addAbc(builder, abc);
Tab.addArg(builder, arg);
Tab.addName(builder, nameOffset);
return Tab.endTab(builder);
}
unpack(): TabT {
return new TabT(
this.abc(),
this.arg(),
this.name()
);
}
unpackTo(_o: TabT): void {
_o.abc = this.abc();
_o.arg = this.arg();
_o.name = this.name();
}
}
export class TabT implements flatbuffers.IGeneratedObject {
constructor(
public abc: Abc = Abc.a,
public arg: class_ = class_.arguments_,
public name: string|Uint8Array|null = null
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const name = (this.name !== null ? builder.createString(this.name!) : 0);
return Tab.createTab(builder,
this.abc,
this.arg,
name
);
}
}

View File

@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
@@ -928,6 +932,10 @@ var Monster2 = class {
const offset = this.bb.__offset(this.bb_pos, 24);
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
}
/**
* an example documentation comment: this will end up in the generated code
* multiline too
*/
testarrayoftables(index, obj) {
const offset = this.bb.__offset(this.bb_pos, 26);
return offset ? (obj || new Monster2()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;

View File

@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
@@ -246,6 +250,9 @@ var Type = class {
this.bb.writeUint16(this.bb_pos + offset, value);
return true;
}
/**
* The size (octets) of the `base_type` field.
*/
baseSize() {
const offset = this.bb.__offset(this.bb_pos, 12);
return offset ? this.bb.readUint32(this.bb_pos + offset) : 4;
@@ -258,6 +265,9 @@ var Type = class {
this.bb.writeUint32(this.bb_pos + offset, value);
return true;
}
/**
* The size (octets) of the `element` field, if present.
*/
elementSize() {
const offset = this.bb.__offset(this.bb_pos, 14);
return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
@@ -779,6 +789,9 @@ var Field = class {
this.bb.writeInt8(this.bb_pos + offset, +value);
return true;
}
/**
* Number of padding octets to always add after this field. Structs only.
*/
padding() {
const offset = this.bb.__offset(this.bb_pos, 28);
return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
@@ -1551,6 +1564,10 @@ var Schema = class {
this.bb.writeUint64(this.bb_pos + offset, value);
return true;
}
/**
* All the files used in this compilation. Files are relative to where
* flatc was invoked.
*/
fbsFiles(index, obj) {
const offset = this.bb.__offset(this.bb_pos, 18);
return offset ? (obj || new SchemaFile()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;

View File

@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));