Replace deprecated assert with import attributes syntax (#1619)

* replace assert with

* assert with

* more ts way for version

* fix: remove JSON import assert syntax for Node.js compatibility

- Replace JSON imports with generated .js imports
- Fixes compatibility between Node.js versions (assert vs with syntax)
- Maintains same functionality while avoiding syntax issues
This commit is contained in:
steflsd
2025-07-27 01:59:54 +04:00
committed by GitHub
parent cdd2f0d53f
commit f61221f73a
4 changed files with 6 additions and 8 deletions
+3 -2
View File
@@ -3,8 +3,9 @@ import axios, { type AxiosRequestConfig } from 'axios'
import { createHash, randomBytes } from 'crypto'
import { platform, release } from 'os'
import { proto } from '../../WAProto/index.js'
import version from '../Defaults/baileys-version.json' assert { type: 'json' }
const baileysVersion = version.version
// @ts-ignore - This file is generated during build
import { version } from '../Defaults/baileys-version.js'
const baileysVersion = version
import type {
BaileysEventEmitter,
BaileysEventMap,