File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 13
13
"type" : " git" ,
14
14
"url" : " git+https://github.com/coderline/alphaTab.git"
15
15
},
16
- "type" : " module " ,
16
+ "type" : " commonjs " ,
17
17
"main" : " dist/alphaTab.js" ,
18
18
"module" : " dist/alphaTab.mjs" ,
19
19
"typings" : " dist/alphaTab.d.ts" ,
60
60
"test-csharp" : " cd src.csharp && dotnet test -c Release" ,
61
61
"test-kotlin" : " node scripts/gradlew.mjs testReleaseUnitTest --info" ,
62
62
"test-accept-reference" : " tsx scripts/accept-new-reference-files.ts" ,
63
- "typecheck" : " tsc --noEmit"
63
+ "typecheck" : " tsc --noEmit" ,
64
+ "prepack" : " node scripts/prepack.mjs"
64
65
},
65
66
"devDependencies" : {
66
67
"@biomejs/biome" : " ^1.9.4" ,
Original file line number Diff line number Diff line change
1
+ import path from 'node:path' ;
2
+ import url from 'node:url' ;
3
+ import fs from 'node:fs' ;
4
+
5
+ const __dirname = url . fileURLToPath ( new URL ( '.' , import . meta. url ) ) ;
6
+ const packageJsonPath = path . resolve ( __dirname , '..' , 'package.json' ) ;
7
+
8
+
9
+ let packageJsonContent = await fs . promises . readFile ( packageJsonPath , 'utf-8' ) ;
10
+ packageJsonContent = packageJsonContent . replace ( '"type": "module"' , '"type": "commonjs"' ) ;
11
+ await fs . promises . writeFile ( packageJsonPath , packageJsonContent ) ;
You can’t perform that action at this time.
0 commit comments