Skip to content

Commit 6ec49d2

Browse files
authored
build: Publish NPM package with type commonjs (#2048)
2 parents cada1dd + 49f753a commit 6ec49d2

File tree

5 files changed

+20
-7
lines changed

5 files changed

+20
-7
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coderline/alphatab",
3-
"version": "1.4.3",
3+
"version": "1.4.4",
44
"description": "alphaTab is a music notation and guitar tablature rendering library",
55
"keywords": [
66
"guitar",
@@ -59,7 +59,9 @@
5959
"test": "mocha",
6060
"test-csharp": "cd src.csharp && dotnet test -c Release",
6161
"test-kotlin": "node scripts/gradlew.mjs testReleaseUnitTest --info",
62-
"test-accept-reference": "tsx scripts/accept-new-reference-files.ts"
62+
"test-accept-reference": "tsx scripts/accept-new-reference-files.ts",
63+
"typecheck": "tsc --noEmit",
64+
"prepack": "node scripts/prepack.mjs"
6365
},
6466
"devDependencies": {
6567
"@coderline/alphaskia": "^2.3.120",

scripts/prepack.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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);

src.csharp/Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<PropertyGroup>
33
<DebugType>portable</DebugType>
44
<DebugSymbols>true</DebugSymbols>
5-
<Version>1.4.2</Version>
6-
<AssemblyVersion>1.4.2.0</AssemblyVersion>
5+
<Version>1.4.4</Version>
6+
<AssemblyVersion>1.4.4.0</AssemblyVersion>
77
<FileVersion>$(AssemblyVersion)</FileVersion>
88
<Authors>Danielku15</Authors>
99
<Company>CoderLine</Company>

src.kotlin/alphaTab/android/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var libAuthorId = "danielku15"
3939
var libAuthorName = "Daniel Kuschny"
4040
var libOrgUrl = "https://github.com/coderline"
4141
var libCompany = "CoderLine"
42-
var libVersion = "1.4.3-SNAPSHOT"
42+
var libVersion = "1.4.4-SNAPSHOT"
4343
var libProjectUrl = "https://github.com/CoderLine/alphaTab"
4444
var libGitUrlHttp = "https://github.com/CoderLine/alphaTab.git"
4545
var libGitUrlGit = "scm:git:git://github.com/CoderLine/alphaTab.git"

0 commit comments

Comments
 (0)