Hi!
This issue is partialy auto-generated because of a compatibility issue with nodenext in replacement of commonjs in my project when I use dnspacket-ts.
I used patch-package to patch dnspacket-ts@1.0.13 for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/dnspacket-ts/dist/types/decode/index.d.ts b/node_modules/dnspacket-ts/dist/types/decode/index.d.ts
index c6e7f28..5ebdd2f 100644
--- a/node_modules/dnspacket-ts/dist/types/decode/index.d.ts
+++ b/node_modules/dnspacket-ts/dist/types/decode/index.d.ts
@@ -1,2 +1,2 @@
-import { DNSResponse } from '../types';
+import { DNSResponse } from '../types.js';
export default function decode(buffer: ArrayBuffer | Uint8Array | Buffer): DNSResponse;
diff --git a/node_modules/dnspacket-ts/dist/types/encode.d.ts b/node_modules/dnspacket-ts/dist/types/encode.d.ts
index 8085b0f..489ac20 100644
--- a/node_modules/dnspacket-ts/dist/types/encode.d.ts
+++ b/node_modules/dnspacket-ts/dist/types/encode.d.ts
@@ -1,2 +1,2 @@
-import { DNSQuery } from './types';
+import { DNSQuery } from './types.js';
export default function encode(packet: DNSQuery): Uint8Array;
diff --git a/node_modules/dnspacket-ts/dist/types/index.d.ts b/node_modules/dnspacket-ts/dist/types/index.d.ts
index 4443cc9..37a9457 100644
--- a/node_modules/dnspacket-ts/dist/types/index.d.ts
+++ b/node_modules/dnspacket-ts/dist/types/index.d.ts
@@ -1,2 +1,2 @@
-export * from './main'
+export * from './main.js'
export {}
diff --git a/node_modules/dnspacket-ts/dist/types/main.d.ts b/node_modules/dnspacket-ts/dist/types/main.d.ts
index 88cfb22..19c207b 100644
--- a/node_modules/dnspacket-ts/dist/types/main.d.ts
+++ b/node_modules/dnspacket-ts/dist/types/main.d.ts
@@ -1,3 +1,3 @@
-import { default as encode } from './encode';
-import { default as decode } from './decode/index';
+import { default as encode } from './encode.js';
+import { default as decode } from './decode/index.js';
export { encode, decode };
This issue body was partially generated by patch-package.
Hi!
This issue is partialy auto-generated because of a compatibility issue with nodenext in replacement of commonjs in my project when I use dnspacket-ts.
I used patch-package to patch
dnspacket-ts@1.0.13for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.