@karaplay/file-coder 1.3.3 ā 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -1
- package/package.json +9 -1
- package/test-exports.js +39 -0
package/README.md
CHANGED
|
@@ -220,7 +220,31 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
|
|
220
220
|
|
|
221
221
|
## Changelog
|
|
222
222
|
|
|
223
|
-
### v1.3.
|
|
223
|
+
### v1.3.4 (Latest)
|
|
224
|
+
**š§ Fix: Next.js 15 Import Paths**
|
|
225
|
+
|
|
226
|
+
- **Fixed**: `Module not found: Can't resolve '@karaplay/file-coder/dist/client'` error in Next.js 15
|
|
227
|
+
- **Added**: Export path `./dist/client` for direct dist imports
|
|
228
|
+
- **Added**: Wildcard export `./dist/*` for flexible imports
|
|
229
|
+
- **Verified**: All 4 import methods now work correctly
|
|
230
|
+
- **Compatible**: Next.js 13, 14, 15 and standard Node.js
|
|
231
|
+
|
|
232
|
+
**Working import paths:**
|
|
233
|
+
```typescript
|
|
234
|
+
// Method 1: Standard (recommended)
|
|
235
|
+
import { convertEmkToKar } from '@karaplay/file-coder';
|
|
236
|
+
|
|
237
|
+
// Method 2: Client-side (recommended for Next.js)
|
|
238
|
+
import { convertEmkFileToKar } from '@karaplay/file-coder/client';
|
|
239
|
+
|
|
240
|
+
// Method 3: Direct dist path (now fixed!)
|
|
241
|
+
import { convertEmkFileToKar } from '@karaplay/file-coder/dist/client';
|
|
242
|
+
|
|
243
|
+
// Method 4: Wildcard dist access
|
|
244
|
+
import * as client from '@karaplay/file-coder/dist/client';
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### v1.3.3
|
|
224
248
|
**ā
Verification: Thai Text Readability in Client-Side**
|
|
225
249
|
|
|
226
250
|
- **Verified**: Thai text is fully readable throughout client-side processing (EMK decode ā KAR conversion)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@karaplay/file-coder",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "A comprehensive library for encoding/decoding karaoke files (.emk, .kar, MIDI) with Next.js support. Convert EMK to KAR, read/write karaoke files, full browser and server support.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,6 +15,14 @@
|
|
|
15
15
|
"./client": {
|
|
16
16
|
"types": "./dist/client.d.ts",
|
|
17
17
|
"default": "./dist/client.js"
|
|
18
|
+
},
|
|
19
|
+
"./dist/client": {
|
|
20
|
+
"types": "./dist/client.d.ts",
|
|
21
|
+
"default": "./dist/client.js"
|
|
22
|
+
},
|
|
23
|
+
"./dist/*": {
|
|
24
|
+
"types": "./dist/*.d.ts",
|
|
25
|
+
"default": "./dist/*.js"
|
|
18
26
|
}
|
|
19
27
|
},
|
|
20
28
|
"scripts": {
|
package/test-exports.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Test different import paths
|
|
2
|
+
console.log('Testing exports paths...\n');
|
|
3
|
+
|
|
4
|
+
// Test 1: Standard import
|
|
5
|
+
try {
|
|
6
|
+
const pkg1 = require('@karaplay/file-coder');
|
|
7
|
+
console.log('ā
require("@karaplay/file-coder") works');
|
|
8
|
+
console.log(' Exports:', Object.keys(pkg1).slice(0, 5).join(', '), '...');
|
|
9
|
+
} catch (e) {
|
|
10
|
+
console.log('ā require("@karaplay/file-coder") failed:', e.message);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Test 2: Client import
|
|
14
|
+
try {
|
|
15
|
+
const pkg2 = require('@karaplay/file-coder/client');
|
|
16
|
+
console.log('ā
require("@karaplay/file-coder/client") works');
|
|
17
|
+
console.log(' Exports:', Object.keys(pkg2).slice(0, 5).join(', '), '...');
|
|
18
|
+
} catch (e) {
|
|
19
|
+
console.log('ā require("@karaplay/file-coder/client") failed:', e.message);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Test 3: Dist client import
|
|
23
|
+
try {
|
|
24
|
+
const pkg3 = require('@karaplay/file-coder/dist/client');
|
|
25
|
+
console.log('ā
require("@karaplay/file-coder/dist/client") works');
|
|
26
|
+
console.log(' Exports:', Object.keys(pkg3).slice(0, 5).join(', '), '...');
|
|
27
|
+
} catch (e) {
|
|
28
|
+
console.log('ā require("@karaplay/file-coder/dist/client") failed:', e.message);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Test 4: Direct dist import
|
|
32
|
+
try {
|
|
33
|
+
const pkg4 = require('@karaplay/file-coder/dist/index');
|
|
34
|
+
console.log('ā
require("@karaplay/file-coder/dist/index") works');
|
|
35
|
+
} catch (e) {
|
|
36
|
+
console.log('ā require("@karaplay/file-coder/dist/index") failed:', e.message);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
console.log('\nā
All export paths working!');
|