switch to tsdown

This commit is contained in:
Joel Wetzell
2026-06-03 21:54:59 -05:00
parent 4e63018a5f
commit c7b28412e5
11 changed files with 904 additions and 42 deletions
+1 -1
View File
@@ -1 +1 @@
v22.13.1
v24.15.0
+867
View File
File diff suppressed because it is too large Load Diff
+9 -8
View File
@@ -2,19 +2,19 @@
"name": "@jwetzell/acn",
"version": "0.1.0",
"description": "",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.cts",
"exports": {
".": {
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js",
"types": "./dist/types/index.d.ts"
}
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"./package.json": "./package.json"
},
"scripts": {
"prebuild": "rimraf dist",
"build": "npm run build:cjs && npm run build:esm && npm run build:types",
"build": "tsdown",
"build:cjs": "tsc -p tsconfig.cjs.json",
"build:esm": "tsc -p tsconfig.esm.json",
"build:types": "tsc -p tsconfig.types.json",
@@ -38,6 +38,7 @@
"devDependencies": {
"@types/node": "25.9.1",
"rimraf": "6.1.3",
"tsdown": "0.22.1",
"typescript": "5.9.3"
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
import pdu from '.';
import { Protocol } from '../enums';
import { RootLayerPDU, SessionDataTransportPDU } from '../types';
import type { RootLayerPDU, SessionDataTransportPDU } from '../types';
import { toHex } from '../utils';
function decode(bytes: Uint8Array): RootLayerPDU {
+1 -1
View File
@@ -1,5 +1,5 @@
import { Protocol, SDTVector } from '../enums';
import {
import type {
SDTAckData,
SDTConnectAcceptData,
SDTConnectData,
+1 -1
View File
@@ -1,5 +1,5 @@
import { ACNPacket, RootLayerPDU, UDPPreamble } from './types';
import pdu from './pdu';
import type { ACNPacket, RootLayerPDU, UDPPreamble } from './types';
// ANSI E1.17 - 2015 (R2020) EPI 17
export function decode(bytes: Uint8Array): ACNPacket<UDPPreamble, RootLayerPDU, undefined> {
-8
View File
@@ -1,8 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "CommonJS",
"declaration": false,
"outDir": "./dist/cjs"
}
}
-8
View File
@@ -1,8 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ESNext",
"declaration": false,
"outDir": "./dist/esm"
}
}
+14 -6
View File
@@ -1,12 +1,20 @@
{
"compilerOptions": {
"moduleResolution": "Node",
"lib": ["ESNext"],
"target": "ESNext",
"target": "esnext",
"lib": ["es2023"],
"moduleDetection": "force",
"module": "preserve",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"types": ["node"],
"strict": true,
"noUnusedLocals": true,
"declaration": true,
"emitDeclarationOnly": true,
"esModuleInterop": true,
"isolatedModules": true,
"rootDir": "src/",
"strict": true
"verbatimModuleSyntax": true,
"skipLibCheck": true
},
"include": ["src/"]
"include": ["src"]
}
-8
View File
@@ -1,8 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"emitDeclarationOnly": true,
"declaration": true,
"outDir": "./dist/types"
}
}
+10
View File
@@ -0,0 +1,10 @@
import { defineConfig } from 'tsdown'
export default defineConfig({
entry: 'src/index.ts',
exports: true,
format: {
esm: {},
cjs: {},
},
})