fix: fix master tag type

This commit is contained in:
master 2025-03-18 02:46:18 +08:00
parent 11fdb0f2fc
commit 9a5d025f40
24 changed files with 880 additions and 905 deletions

View File

@ -1,66 +1,55 @@
{ {
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"extends": [ "extends": ["ultracite"],
"ultracite" "linter": {
], "rules": {
"linter": { "style": {
"noNonNullAssertion": "off",
"noParameterAssign": "off",
"useFilenamingConvention": "off",
"noParameterProperties": "off",
"useImportType": {
"level": "error",
"fix": "unsafe"
}
},
"suspicious": {
"noExplicitAny": "off"
},
"complexity": {
"noForEach": "off"
},
"correctness": {
"noUnusedImports": {
"fix": "none",
"level": "warn"
}
},
"nursery": {
"noEnum": "off",
"useConsistentMemberAccessibility": "off"
}
}
},
"files": {
"ignore": [".vscode/*.json"]
},
"overrides": [
{
"include": ["tests/**"],
"javascript": {
"globals": ["describe", "beforeEach", "it", "expect"]
},
"linter": {
"rules": { "rules": {
"style": { "performance": {
"noNonNullAssertion": "off", "useTopLevelRegex": "off"
"noParameterAssign": "off", },
"useFilenamingConvention": "off", "suspicious": {
"noParameterProperties": "off", "noMisplacedAssertion": "off"
"useImportType": { }
"level": "error",
"fix": "unsafe"
}
},
"suspicious": {
"noExplicitAny": "off"
},
"complexity": {
"noForEach": "off"
},
"correctness": {
"noUnusedImports": {
"fix": "none",
"level": "warn"
}
},
"nursery": {
"noEnum": "off",
"useConsistentMemberAccessibility": "off"
}
} }
}, }
"files": { }
"ignore": [ ]
".vscode/*.json"
]
},
"overrides": [
{
"include": [
"tests/**"
],
"javascript": {
"globals": [
"describe",
"beforeEach",
"it",
"expect"
]
},
"linter": {
"rules": {
"performance": {
"useTopLevelRegex": "off"
},
"suspicious": {
"noMisplacedAssertion": "off"
}
}
}
}
]
} }

View File

@ -1,8 +1,8 @@
import fs from 'node:fs/promises'; import fs from 'node:fs/promises';
import { import {
ReadableStream, ReadableStream,
WritableStream,
type TransformStream, type TransformStream,
WritableStream,
} from 'node:stream/web'; } from 'node:stream/web';
import { EbmlStreamDecoder } from 'konoebml'; import { EbmlStreamDecoder } from 'konoebml';

View File

@ -1,6 +1,6 @@
{ {
"name": "konoebml", "name": "konoebml",
"version": "0.1.0-rc.4", "version": "0.1.0-rc.5",
"description": "A modern JavaScript implementation of EBML RFC8794", "description": "A modern JavaScript implementation of EBML RFC8794",
"main": "./dist/index.cjs", "main": "./dist/index.cjs",
"module": "./dist/index.js", "module": "./dist/index.js",
@ -20,8 +20,8 @@
"test": "vitest --coverage", "test": "vitest --coverage",
"test-ci": "vitest --watch=false --coverage", "test-ci": "vitest --watch=false --coverage",
"prepublishOnly": "npm run build", "prepublishOnly": "npm run build",
"lint": "ultracite lint", "lint": "biome lint",
"format": "ultracite format", "lint-fix": "biome lint --fix",
"playground": "tsx --tsconfig=./tsconfig.example.json ./examples/playground.ts" "playground": "tsx --tsconfig=./tsconfig.example.json ./examples/playground.ts"
}, },
"repository": "github:dumtruck/konoebml", "repository": "github:dumtruck/konoebml",

View File

@ -1,17 +1,17 @@
import { type EbmlTagIdType, isEbmlMasterTagId } from './models/enums';
import type { DecodeContentOptions, EbmlTagTrait } from './models/tag-trait';
import type { FileDataViewController } from './adapters'; import type { FileDataViewController } from './adapters';
import { UnreachableOrLogicError } from './errors';
import { createEbmlTag } from './factory';
import { type EbmlTagIdType, isEbmlMasterTagId } from './models/enums';
import { EbmlTagPosition } from './models/enums';
import type { DecodeContentOptions, EbmlTagTrait } from './models/tag-trait';
import { import {
type SafeSizeVint,
checkVintSafeSize, checkVintSafeSize,
dataViewSlice, dataViewSlice,
readUnsigned, readUnsigned,
readVint, readVint,
readVintLength, readVintLength,
type SafeSizeVint,
} from './tools'; } from './tools';
import { EbmlTagPosition } from './models/enums';
import { createEbmlTag } from './factory';
import { UnreachableOrLogicError } from './errors';
export async function decodeEbmlTagHeader( export async function decodeEbmlTagHeader(
controller: FileDataViewController controller: FileDataViewController

View File

@ -1,13 +1,13 @@
import { Queue } from 'mnemonist'; import { Queue } from 'mnemonist';
import type { FileDataViewController } from './adapters'; import type { FileDataViewController } from './adapters';
import { decodeEbmlContent } from './decode-utils';
import { StreamFlushReason, UnreachableOrLogicError } from './errors';
import type { EbmlTagType } from './models/tag';
import type { import type {
DecodeContentCollectChildPredicate, DecodeContentCollectChildPredicate,
EbmlTagTrait, EbmlTagTrait,
} from './models/tag-trait'; } from './models/tag-trait';
import { decodeEbmlContent } from './decode-utils';
import { StreamFlushReason, UnreachableOrLogicError } from './errors';
import { dataViewSlice } from './tools'; import { dataViewSlice } from './tools';
import type { EbmlTagType } from './models/tag';
export type EbmlStreamDecoderChunkType = export type EbmlStreamDecoderChunkType =
| Uint8Array | Uint8Array

View File

@ -1,9 +1,9 @@
import { Queue, Stack } from 'mnemonist'; import { Queue, Stack } from 'mnemonist';
import { EbmlTagTrait } from './models/tag-trait';
import { EbmlTagPosition } from './models/enums';
import { EbmlMasterTag } from './models/tag-master';
import { EbmlTreeMasterNotMatchError, UnreachableOrLogicError } from './errors'; import { EbmlTreeMasterNotMatchError, UnreachableOrLogicError } from './errors';
import { EbmlTagPosition } from './models/enums';
import type { EbmlTagType } from './models/tag'; import type { EbmlTagType } from './models/tag';
import { EbmlMasterTag } from './models/tag-master';
import { EbmlTagTrait } from './models/tag-trait';
export class EbmlEncodeStreamTransformer export class EbmlEncodeStreamTransformer
implements Transformer<EbmlTagTrait | EbmlTagType, Uint8Array> implements Transformer<EbmlTagTrait | EbmlTagType, Uint8Array>

View File

@ -1,21 +1,21 @@
import { InconsistentWellKnownEbmlTagTypeError } from './errors'; import { InconsistentWellKnownEbmlTagTypeError } from './errors';
import { import {
type EbmlMasterTagIdType,
type EbmlDataTagIdType,
type EbmlBlockTagIdType, type EbmlBlockTagIdType,
type EbmlSimpleBlockTagIdType, type EbmlDataTagIdType,
EbmlElementType, EbmlElementType,
type EbmlMasterTagIdType,
type EbmlSimpleBlockTagIdType,
EbmlTagIdEnum, EbmlTagIdEnum,
isEbmlBlockTagId,
isEbmlSimpleBlockTagId,
isEbmlMasterTagId,
isEbmlUintDataTagId,
isEbmlIntDataTagId,
isEbmlFloatDataTagId,
isEbmlStringDataTagId,
isEbmlUtf8DataTagId,
isEbmlDateDataTagId,
isEbmlBinaryDataTagId, isEbmlBinaryDataTagId,
isEbmlBlockTagId,
isEbmlDateDataTagId,
isEbmlFloatDataTagId,
isEbmlIntDataTagId,
isEbmlMasterTagId,
isEbmlSimpleBlockTagId,
isEbmlStringDataTagId,
isEbmlUintDataTagId,
isEbmlUtf8DataTagId,
} from './models/enums'; } from './models/enums';
import { import {
type CreateEbmlBlockTagOptions, type CreateEbmlBlockTagOptions,

View File

@ -1,5 +1,3 @@
import { type CreateEbmlDataTagOptions, EbmlDataTag } from './tag-data';
import { EbmlBlockLacing } from './enums';
import { import {
dataViewSlice, dataViewSlice,
dataViewSliceToBuf, dataViewSliceToBuf,
@ -8,12 +6,14 @@ import {
writeSigned, writeSigned,
writeVint, writeVint,
} from '../tools'; } from '../tools';
import { EbmlBlockLacing } from './enums';
import { import {
type EbmlBlockTagIdType, type EbmlBlockTagIdType,
type EbmlSimpleBlockTagIdType, type EbmlSimpleBlockTagIdType,
EbmlTagIdEnum, EbmlTagIdEnum,
} from './enums'; } from './enums';
import { EbmlElementType } from './enums'; import { EbmlElementType } from './enums';
import { type CreateEbmlDataTagOptions, EbmlDataTag } from './tag-data';
import type { DecodeContentOptions } from './tag-trait'; import type { DecodeContentOptions } from './tag-trait';
export interface CreateEbmlBlockTagOptions export interface CreateEbmlBlockTagOptions

View File

@ -1,9 +1,3 @@
import {
type CreateEbmlTagOptions,
type DecodeContentOptions,
EbmlTagTrait,
} from './tag-trait';
import { EbmlElementType } from './enums';
import { import {
dataViewSliceToBuf, dataViewSliceToBuf,
readAscii, readAscii,
@ -17,7 +11,13 @@ import {
writeUnsigned, writeUnsigned,
writeUtf8, writeUtf8,
} from '../tools'; } from '../tools';
import { EbmlElementType } from './enums';
import { EbmlTagPosition } from './enums'; import { EbmlTagPosition } from './enums';
import {
type CreateEbmlTagOptions,
type DecodeContentOptions,
EbmlTagTrait,
} from './tag-trait';
export type CreateEbmlDataTagOptions = Omit<CreateEbmlTagOptions, 'position'>; export type CreateEbmlDataTagOptions = Omit<CreateEbmlTagOptions, 'position'>;

View File

@ -1,12 +1,12 @@
import { createEbmlTag } from 'src/factory';
import { decodeEbmlTagHeader } from '../decode-utils';
import { EbmlElementType, EbmlTagPosition, isEbmlMasterTagId } from './enums';
import type { EbmlMasterTagIdType } from './enums';
import { import {
type CreateEbmlTagOptions, type CreateEbmlTagOptions,
type DecodeContentOptions, type DecodeContentOptions,
EbmlTagTrait, EbmlTagTrait,
} from './tag-trait'; } from './tag-trait';
import { EbmlElementType, EbmlTagPosition, isEbmlMasterTagId } from './enums';
import { decodeEbmlTagHeader } from '../decode-utils';
import { createEbmlTag } from 'src/factory';
import type { EbmlMasterTagIdType } from './enums';
export interface CreateEbmlMasterTagOptions export interface CreateEbmlMasterTagOptions
extends Omit<CreateEbmlTagOptions, 'position' | 'type' | 'id'> { extends Omit<CreateEbmlTagOptions, 'position' | 'type' | 'id'> {

View File

@ -1,6 +1,6 @@
import { readVint } from '../tools'; import { readVint } from '../tools';
import { type CreateEbmlBlockTagOptions, EbmlBlockTag } from './tag-block';
import type { EbmlSimpleBlockTagIdType } from './enums'; import type { EbmlSimpleBlockTagIdType } from './enums';
import { type CreateEbmlBlockTagOptions, EbmlBlockTag } from './tag-block';
import type { DecodeContentOptions } from './tag-trait'; import type { DecodeContentOptions } from './tag-trait';
export interface CreateEbmlSimpleBlockTagOptions export interface CreateEbmlSimpleBlockTagOptions

View File

@ -1,9 +1,9 @@
import type { FileDataViewController } from '../adapters';
import { InconsistentOffsetOnDecodingContentError } from '../errors';
import { UNKNOWN_SIZE_VINT_BUF, hexStringToBuf, writeVint } from '../tools';
import { EbmlTagPosition } from './enums'; import { EbmlTagPosition } from './enums';
import { EbmlTagIdEnum, type EbmlTagIdType } from './enums'; import { EbmlTagIdEnum, type EbmlTagIdType } from './enums';
import type { EbmlElementType } from './enums'; import type { EbmlElementType } from './enums';
import { hexStringToBuf, UNKNOWN_SIZE_VINT_BUF, writeVint } from '../tools';
import type { FileDataViewController } from '../adapters';
import { InconsistentOffsetOnDecodingContentError } from '../errors';
import type { EbmlMasterTag } from './tag-master'; import type { EbmlMasterTag } from './tag-master';
export interface CreateEbmlTagOptions { export interface CreateEbmlTagOptions {

View File

@ -23,7 +23,8 @@ export type EbmlTagExcludeField =
| 'position' | 'position'
| 'parent' | 'parent'
| 'type' | 'type'
| 'data'; | 'data'
| 'children';
export type EbmlUintTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & { export type EbmlUintTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & {
id: EbmlUintDataTagIdType; id: EbmlUintDataTagIdType;
@ -31,6 +32,7 @@ export type EbmlUintTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & {
parent?: EbmlMasterTag; parent?: EbmlMasterTag;
type: EbmlElementType.UnsignedInt; type: EbmlElementType.UnsignedInt;
data: number | bigint; data: number | bigint;
children?: [];
}; };
export type EbmlIntTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & { export type EbmlIntTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & {
@ -39,6 +41,7 @@ export type EbmlIntTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & {
parent?: EbmlMasterTag; parent?: EbmlMasterTag;
type: EbmlElementType.Integer; type: EbmlElementType.Integer;
data: number | bigint; data: number | bigint;
children?: [];
}; };
export type EbmlUtf8TagType = Omit<EbmlDataTag, EbmlTagExcludeField> & { export type EbmlUtf8TagType = Omit<EbmlDataTag, EbmlTagExcludeField> & {
@ -47,6 +50,7 @@ export type EbmlUtf8TagType = Omit<EbmlDataTag, EbmlTagExcludeField> & {
parent?: EbmlMasterTag; parent?: EbmlMasterTag;
type: EbmlElementType.UTF8; type: EbmlElementType.UTF8;
data: string; data: string;
children?: [];
}; };
export type EbmlAsciiTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & { export type EbmlAsciiTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & {
@ -55,6 +59,7 @@ export type EbmlAsciiTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & {
parent?: EbmlMasterTag; parent?: EbmlMasterTag;
type: EbmlElementType.Ascii; type: EbmlElementType.Ascii;
data: string; data: string;
children?: [];
}; };
export type EbmlDateTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & { export type EbmlDateTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & {
@ -63,6 +68,7 @@ export type EbmlDateTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & {
parent?: EbmlMasterTag; parent?: EbmlMasterTag;
type: EbmlElementType.Date; type: EbmlElementType.Date;
data: Uint8Array; data: Uint8Array;
children?: [];
}; };
export type EbmlFloatTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & { export type EbmlFloatTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & {
@ -71,6 +77,7 @@ export type EbmlFloatTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & {
parent?: EbmlMasterTag; parent?: EbmlMasterTag;
type: EbmlElementType.Float; type: EbmlElementType.Float;
data: number; data: number;
children?: [];
}; };
export type EbmlBinaryTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & { export type EbmlBinaryTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & {
@ -79,6 +86,7 @@ export type EbmlBinaryTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & {
parent?: EbmlMasterTag; parent?: EbmlMasterTag;
type: EbmlElementType.Binary; type: EbmlElementType.Binary;
data: Uint8Array; data: Uint8Array;
children?: [];
}; };
export type EbmlUnknownTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & { export type EbmlUnknownTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & {
@ -87,6 +95,7 @@ export type EbmlUnknownTagType = Omit<EbmlDataTag, EbmlTagExcludeField> & {
parent?: EbmlMasterTag; parent?: EbmlMasterTag;
type?: undefined; type?: undefined;
data: Uint8Array; data: Uint8Array;
children?: [];
}; };
export type EbmlDataTagType = export type EbmlDataTagType =
@ -104,6 +113,7 @@ export type EbmlBlockTagType = Omit<EbmlBlockTag, EbmlTagExcludeField> & {
parent?: EbmlMasterTag; parent?: EbmlMasterTag;
type?: undefined; type?: undefined;
data?: undefined; data?: undefined;
children?: [];
}; };
export type EbmlSimpleBlockTagType = Omit< export type EbmlSimpleBlockTagType = Omit<
@ -115,6 +125,7 @@ export type EbmlSimpleBlockTagType = Omit<
parent?: EbmlMasterTag; parent?: EbmlMasterTag;
type?: undefined; type?: undefined;
data?: undefined; data?: undefined;
children?: [];
}; };
export type EbmlMasterTagType = Omit<EbmlMasterTag, EbmlTagExcludeField> & { export type EbmlMasterTagType = Omit<EbmlMasterTag, EbmlTagExcludeField> & {

View File

@ -1,13 +1,13 @@
import { import {
VintOutOfRangeError,
VintLengthOutOfRangeError,
ElementIdVintDataAllOnesError, ElementIdVintDataAllOnesError,
ElementIdVintDataAllZerosError, ElementIdVintDataAllZerosError,
ElementIdVintDataNotShortestError, ElementIdVintDataNotShortestError,
UnsupportLengthForElementTypeError,
OutOfRangeForElementTypeError, OutOfRangeForElementTypeError,
SizeUnitOutOfSafeIntegerRangeError, SizeUnitOutOfSafeIntegerRangeError,
UnreachableOrLogicError, UnreachableOrLogicError,
UnsupportLengthForElementTypeError,
VintLengthOutOfRangeError,
VintOutOfRangeError,
} from './errors'; } from './errors';
import { import {
EbmlElementType, EbmlElementType,

View File

@ -1,11 +1,11 @@
import { assert, describe, it } from 'vitest';
import { import {
EbmlTagPosition,
EbmlElementType,
EbmlStreamDecoder as Decoder, EbmlStreamDecoder as Decoder,
EbmlDataTag, EbmlDataTag,
EbmlElementType,
EbmlTagPosition,
type EbmlTagType, type EbmlTagType,
} from 'konoebml'; } from 'konoebml';
import { assert, describe, it } from 'vitest';
const bufFrom = (data: Uint8Array | readonly number[]): ArrayBuffer => const bufFrom = (data: Uint8Array | readonly number[]): ArrayBuffer =>
new Uint8Array(data).buffer; new Uint8Array(data).buffer;

View File

@ -1,11 +1,11 @@
import { assert, expect, describe, it } from 'vitest';
import { import {
EbmlStreamEncoder,
EbmlTagIdEnum,
EbmlTagPosition, EbmlTagPosition,
type EbmlTagTrait, type EbmlTagTrait,
EbmlTagIdEnum,
createEbmlTagForManuallyBuild, createEbmlTagForManuallyBuild,
EbmlStreamEncoder,
} from 'konoebml'; } from 'konoebml';
import { assert, describe, expect, it } from 'vitest';
const invalidTag: EbmlTagTrait = <EbmlTagTrait>(<any>{ const invalidTag: EbmlTagTrait = <EbmlTagTrait>(<any>{
id: undefined, id: undefined,

View File

@ -1,14 +1,14 @@
import { assert, describe, it, expect } from 'vitest';
import { import {
type EbmlBlockTag,
EbmlStreamDecoder, EbmlStreamDecoder,
EbmlStreamEncoder, EbmlStreamEncoder,
type EbmlTagTrait,
EbmlTagIdEnum, EbmlTagIdEnum,
type EbmlBlockTag, type EbmlTagTrait,
createEbmlTagForManuallyBuild,
type EbmlTagType, type EbmlTagType,
createEbmlTagForManuallyBuild,
} from 'konoebml'; } from 'konoebml';
import { concatArrayBuffers } from 'konoebml/tools'; import { concatArrayBuffers } from 'konoebml/tools';
import { assert, describe, expect, it } from 'vitest';
describe('EBML Pipeline', () => { describe('EBML Pipeline', () => {
async function assertPipelineOutputEquals( async function assertPipelineOutputEquals(

View File

@ -1,4 +1,3 @@
import { assert, describe, it } from 'vitest';
import { import {
readAscii, readAscii,
readElementIdVint, readElementIdVint,
@ -9,6 +8,7 @@ import {
readVint, readVint,
writeVint, writeVint,
} from 'konoebml/tools'; } from 'konoebml/tools';
import { assert, describe, it } from 'vitest';
function bufFrom(data: Uint8Array | readonly number[]): Uint8Array { function bufFrom(data: Uint8Array | readonly number[]): Uint8Array {
return new Uint8Array(data); return new Uint8Array(data);

View File

@ -1,14 +1,14 @@
import fs from 'node:fs'; import fs from 'node:fs';
import { assert, describe, it } from 'vitest';
import {
EbmlStreamDecoder,
EbmlTagIdEnum,
EbmlSimpleBlockTag as SimpleBlock,
EbmlDataTag,
type EbmlTagType,
} from 'konoebml';
import { Readable } from 'node:stream'; import { Readable } from 'node:stream';
import { WritableStream } from 'node:stream/web'; import { WritableStream } from 'node:stream/web';
import {
EbmlDataTag,
EbmlStreamDecoder,
EbmlTagIdEnum,
type EbmlTagType,
EbmlSimpleBlockTag as SimpleBlock,
} from 'konoebml';
import { assert, describe, it } from 'vitest';
process.setMaxListeners(Number.POSITIVE_INFINITY); process.setMaxListeners(Number.POSITIVE_INFINITY);

View File

@ -1,19 +1,15 @@
{ {
"compilerOptions": { "compilerOptions": {
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"esModuleInterop": true, "esModuleInterop": true,
"strict": true, "strict": true,
"skipLibCheck": true, "skipLibCheck": true,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"useDefineForClassFields": true, "useDefineForClassFields": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"moduleResolution": "bundler", "moduleResolution": "bundler",
"target": "ES2021", "target": "ES2021",
"module": "ESNext", "module": "ESNext",
"lib": [ "lib": ["ES2021", "DOM", "DOM.Iterable"]
"ES2021", }
"DOM",
"DOM.Iterable"
]
}
} }

View File

@ -1,28 +1,20 @@
{ {
"extends": "./tsconfig.base.json", "extends": "./tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"composite": true, "composite": true,
"rootDir": ".", "rootDir": ".",
"types": [ "types": ["node"],
"node" "noEmit": true,
], "paths": {
"noEmit": true, "konoebml": ["./src/index.ts"],
"paths": { "konoebml/*": ["./src/*"]
"konoebml": [ }
"./src/index.ts" },
], "files": [],
"konoebml/*": [ "include": ["examples/*"],
"./src/*" "references": [
] {
} "path": "./tsconfig.lib.json"
}, }
"files": [], ]
"include": [
"examples/*"
],
"references": [
{
"path": "./tsconfig.lib.json"
}
]
} }

View File

@ -2,9 +2,7 @@
"extends": "./tsconfig.base.json", "extends": "./tsconfig.base.json",
"files": [], "files": [],
"include": [], "include": [],
"exclude": [ "exclude": ["node_modules"],
"node_modules"
],
"references": [ "references": [
{ {
"path": "./tsconfig.lib.json" "path": "./tsconfig.lib.json"

View File

@ -1,17 +1,15 @@
{ {
"extends": "./tsconfig.base.json", "extends": "./tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"composite": true, "composite": true,
"rootDir": "./src", "rootDir": "./src",
"baseUrl": ".", "baseUrl": ".",
"declarationDir": "./dist", "declarationDir": "./dist",
"outDir": "./dist", "outDir": "./dist",
"declaration": true, "declaration": true,
"declarationMap": true, "declarationMap": true,
"emitDeclarationOnly": true "emitDeclarationOnly": true
}, },
"include": [ "include": ["src"],
"src" "exclude": []
],
"exclude": []
} }

View File

@ -3,24 +3,15 @@
"compilerOptions": { "compilerOptions": {
"composite": true, "composite": true,
"rootDir": ".", "rootDir": ".",
"types": [ "types": ["vitest/globals", "node"],
"vitest/globals",
"node"
],
"noEmit": true, "noEmit": true,
"paths": { "paths": {
"konoebml": [ "konoebml": ["./src/index.ts"],
"./src/index.ts" "konoebml/*": ["./src/*"]
],
"konoebml/*": [
"./src/*"
]
} }
}, },
"files": [], "files": [],
"include": [ "include": ["tests/*"],
"tests/*"
],
"references": [ "references": [
{ {
"path": "./tsconfig.lib.json" "path": "./tsconfig.lib.json"