Skip to content

build: Publish NPM package with type commonjs #2048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coderline/alphatab",
"version": "1.4.3",
"version": "1.4.4",
"description": "alphaTab is a music notation and guitar tablature rendering library",
"keywords": [
"guitar",
Expand Down Expand Up @@ -59,7 +59,9 @@
"test": "mocha",
"test-csharp": "cd src.csharp && dotnet test -c Release",
"test-kotlin": "node scripts/gradlew.mjs testReleaseUnitTest --info",
"test-accept-reference": "tsx scripts/accept-new-reference-files.ts"
"test-accept-reference": "tsx scripts/accept-new-reference-files.ts",
"typecheck": "tsc --noEmit",
"prepack": "node scripts/prepack.mjs"
},
"devDependencies": {
"@coderline/alphaskia": "^2.3.120",
Expand Down
11 changes: 11 additions & 0 deletions scripts/prepack.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import path from 'node:path';
import url from 'node:url';
import fs from 'node:fs';

const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
const packageJsonPath = path.resolve(__dirname, '..', 'package.json');


let packageJsonContent = await fs.promises.readFile(packageJsonPath, 'utf-8');
packageJsonContent = packageJsonContent.replace('"type": "module"', '"type": "commonjs"');
await fs.promises.writeFile(packageJsonPath, packageJsonContent);
4 changes: 2 additions & 2 deletions src.csharp/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<PropertyGroup>
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
<Version>1.4.2</Version>
<AssemblyVersion>1.4.2.0</AssemblyVersion>
<Version>1.4.4</Version>
<AssemblyVersion>1.4.4.0</AssemblyVersion>
<FileVersion>$(AssemblyVersion)</FileVersion>
<Authors>Danielku15</Authors>
<Company>CoderLine</Company>
Expand Down
2 changes: 1 addition & 1 deletion src.kotlin/alphaTab/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var libAuthorId = "danielku15"
var libAuthorName = "Daniel Kuschny"
var libOrgUrl = "https://github.com/coderline"
var libCompany = "CoderLine"
var libVersion = "1.4.3-SNAPSHOT"
var libVersion = "1.4.4-SNAPSHOT"
var libProjectUrl = "https://github.com/CoderLine/alphaTab"
var libGitUrlHttp = "https://github.com/CoderLine/alphaTab.git"
var libGitUrlGit = "scm:git:git://github.com/CoderLine/alphaTab.git"
Expand Down
Loading