Skip to content

Commit fbe54e9

Browse files
committed
Update WebAudio package for bundled TypeScript workflow
1 parent f6ed864 commit fbe54e9

87 files changed

Lines changed: 2235 additions & 1304 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ jobs:
1818
steps:
1919

2020
- name: Fetch Repository
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v6
2222
with:
2323
persist-credentials: false
2424

2525
- name: Install Node.js
26-
uses: actions/setup-node@v4
26+
uses: actions/setup-node@v6
2727
with:
28-
node-version: 22.14.0
28+
node-version: 24.13.0
2929
cache: 'npm'
3030

3131
- name: Get Package Version
@@ -34,7 +34,7 @@ jobs:
3434

3535
- name: Create Draft Release
3636
id: create_release
37-
uses: softprops/action-gh-release@v2
37+
uses: softprops/action-gh-release@v3
3838
env:
3939
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4040
with:
@@ -52,14 +52,14 @@ jobs:
5252
steps:
5353

5454
- name: Fetch Repository
55-
uses: actions/checkout@v4
55+
uses: actions/checkout@v6
5656
with:
5757
persist-credentials: false
5858

5959
- name: Install Node.js
60-
uses: actions/setup-node@v4
60+
uses: actions/setup-node@v6
6161
with:
62-
node-version: 22.14.0
62+
node-version: 24.13.0
6363
cache: 'npm'
6464

6565
- name: Install Modules
@@ -74,10 +74,10 @@ jobs:
7474

7575
- name: Pack Files
7676
id: pack-files
77-
run: node -e "require('addon-tools-raub').actionPack()" >> $GITHUB_OUTPUT
77+
run: node -e "require('@node-3d/addon-tools').actionPack()" >> $GITHUB_OUTPUT
7878

7979
- name: Store Binaries
80-
uses: softprops/action-gh-release@v2
80+
uses: softprops/action-gh-release@v3
8181
env:
8282
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8383
with:

.github/workflows/cpplint.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,28 @@ on:
1212
- master
1313

1414
jobs:
15-
eslint:
15+
cpplint:
1616
name: Cpplint
1717
runs-on: ubuntu-22.04
1818

1919
steps:
2020

2121
- name: Fetch Repository
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6
2323
with:
2424
persist-credentials: false
2525

2626
- name: Install Node.js
27-
uses: actions/setup-node@v4
27+
uses: actions/setup-node@v6
2828
with:
29-
node-version: 22.14.0
29+
node-version: 24.13.0
3030
cache: 'npm'
3131

3232
- name: Install Modules
3333
run: npm ci
3434

3535
- name: Install Python
36-
uses: actions/setup-python@v4
36+
uses: actions/setup-python@v6
3737
with:
3838
python-version: '3.12'
3939

@@ -42,5 +42,5 @@ jobs:
4242

4343
- name: Run Cpplint
4444
run: |
45-
node -e "require('addon-tools-raub').cpcpplint()"
45+
node -e "require('@node-3d/addon-tools').cpcpplint()"
4646
cpplint --recursive ./src/cpp
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ESLint
1+
name: Lint
22
defaults:
33
run:
44
shell: bash
@@ -12,25 +12,25 @@ on:
1212
- master
1313

1414
jobs:
15-
eslint:
16-
name: ESLint
15+
lint:
16+
name: Lint
1717
runs-on: ubuntu-22.04
1818

1919
steps:
2020

2121
- name: Fetch Repository
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6
2323
with:
2424
persist-credentials: false
2525

2626
- name: Install Node.js
27-
uses: actions/setup-node@v4
27+
uses: actions/setup-node@v6
2828
with:
29-
node-version: 22.14.0
29+
node-version: 24.13.0
3030
cache: 'npm'
3131

3232
- name: Install Modules
3333
run: npm ci
3434

35-
- name: Run ESLint
36-
run: npm run eslint
35+
- name: Run Lint
36+
run: npm run lint

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ jobs:
1414
steps:
1515

1616
- name: Fetch Repository
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@v6
1818
with:
1919
persist-credentials: false
2020

2121
- name: Install Node.js
22-
uses: actions/setup-node@v4
22+
uses: actions/setup-node@v6
2323
with:
24-
node-version: 22.14.0
24+
node-version: 24.13.0
2525
cache: 'npm'
2626

2727
- name: Get Package Version
@@ -37,7 +37,7 @@ jobs:
3737

3838
- name: Create Release
3939
id: create_release
40-
uses: softprops/action-gh-release@v2
40+
uses: softprops/action-gh-release@v3
4141
env:
4242
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4343
with:

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ jobs:
2323
steps:
2424

2525
- name: Fetch Repository
26-
uses: actions/checkout@v4
26+
uses: actions/checkout@v6
2727
with:
2828
persist-credentials: false
2929

3030
- name: Install Node.js
31-
uses: actions/setup-node@v4
31+
uses: actions/setup-node@v6
3232
with:
33-
node-version: 22.14.0
33+
node-version: 24.13.0
3434
cache: 'npm'
3535

3636
- name: Install Modules

.vscode/c_cpp_properties.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
"includePath": [
66
"${workspaceFolder}/**",
77
"${workspaceFolder}/node_modules/node-addon-api",
8-
"${workspaceFolder}/node_modules/addon-tools-raub/include",
9-
"${LocalAppData}/node-gyp/Cache/22.14.0/include/node"
8+
"${workspaceFolder}/node_modules/@node-3d/addon-tools/include",
9+
"${workspaceFolder}/../../node_modules/node-addon-api",
10+
"${workspaceFolder}/../../node_modules/@node-3d/addon-tools/include",
11+
"${env:LOCALAPPDATA}/node-gyp/Cache/24.13.0/include/node"
1012
],
1113
"defines": [
1214
"UNICODE",
@@ -19,4 +21,4 @@
1921
}
2022
],
2123
"version": 4
22-
}
24+
}

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22

33
This is a part of [Node3D](https://github.com/node-3d) project.
44

5-
[![NPM](https://badge.fury.io/js/webaudio-raub.svg)](https://badge.fury.io/js/webaudio-raub)
6-
[![ESLint](https://github.com/node-3d/webaudio-raub/actions/workflows/eslint.yml/badge.svg)](https://github.com/node-3d/webaudio-raub/actions/workflows/eslint.yml)
7-
[![Test](https://github.com/node-3d/webaudio-raub/actions/workflows/test.yml/badge.svg)](https://github.com/node-3d/webaudio-raub/actions/workflows/test.yml)
8-
[![Cpplint](https://github.com/node-3d/webaudio-raub/actions/workflows/cpplint.yml/badge.svg)](https://github.com/node-3d/webaudio-raub/actions/workflows/cpplint.yml)
5+
[![NPM](https://badge.fury.io/js/%40node-3d%2Fwebaudio.svg)](https://badge.fury.io/js/@node-3d/webaudio)
6+
[![Lint](https://github.com/node-3d/webaudio/actions/workflows/lint.yml/badge.svg)](https://github.com/node-3d/webaudio/actions/workflows/lint.yml)
7+
[![Test](https://github.com/node-3d/webaudio/actions/workflows/test.yml/badge.svg)](https://github.com/node-3d/webaudio/actions/workflows/test.yml)
8+
[![Cpplint](https://github.com/node-3d/webaudio/actions/workflows/cpplint.yml/badge.svg)](https://github.com/node-3d/webaudio/actions/workflows/cpplint.yml)
99

1010
```console
11-
npm i -s webaudio-raub
11+
npm install @node-3d/webaudio
1212
```
1313

14-
> This addon is ABI-compatible across Node.js versions. **There is no compilation** during `npm i`.
14+
> This addon is ABI-compatible across Node.js versions. **There is no compilation** during `npm install`.
1515
1616

1717
**Node.js** addon implementing the
1818
[Web Audio Api](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API).
1919

20-
Simply require any class you like from the module and then follow the
20+
Import any class you like from the module and then follow the
2121
[doc](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API):
2222

2323
```js
24-
const { AudioContext } = require('webaudio-raub'); // usually this is enough
24+
import { AudioContext } from '@node-3d/webaudio'; // usually this is enough
2525
```
2626

2727
**This module is WORK IN PROGRESS.**

core.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

dist/audio-buffer.d.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { inspect } from 'node:util';
2+
declare const AudioBuffer: import("./native.ts").TNativeEs5Constructor<[context: import("./native.ts").TBaseAudioContext, source?: Readonly<{
3+
length?: number;
4+
numberOfChannels?: number;
5+
sampleRate?: number;
6+
}> | import("./native.ts").TNativeExternal | undefined], import("./native.ts").TAudioBuffer>;
7+
declare class JsAudioBuffer extends AudioBuffer {
8+
[inspect.custom](): string;
9+
toString(): string;
10+
}
11+
export { JsAudioBuffer as AudioBuffer };

dist/audio-context.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import type { TJsBaseAudioContext } from './base-audio-context.ts';
2+
import type { TAudioContext, TAudioContextOptions, TNativeConstructor } from './native.ts';
3+
declare const WrappedAudioContext: TNativeConstructor<[opts?: TAudioContextOptions], TAudioContext & TJsBaseAudioContext>;
4+
export { WrappedAudioContext as AudioContext };

0 commit comments

Comments
 (0)