mirror of
https://github.com/Tonejs/Tone.js
synced 2025-01-13 12:28:47 +00:00
Working on getting github actions to run (#1231)
* working on getting actions to run * running all tests * run on CHROME only * Update test.yml * ignoring node_modules * updating typedocs * trying to ignore compiler errors * Update tsconfig.json * running doc tests in parallel * speeding up docs example tests * Update test.yml * testing README * 2 spaces instead of 4 * codecov * remove travis ci * adding token * updating codecov
This commit is contained in:
parent
08df7ad68c
commit
a256ae2e6c
20 changed files with 291 additions and 169 deletions
117
.github/workflows/test.yml
vendored
Normal file
117
.github/workflows/test.yml
vendored
Normal file
|
@ -0,0 +1,117 @@
|
||||||
|
name: Run tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, reopened, synchronize]
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
jobs:
|
||||||
|
run-tests:
|
||||||
|
name: All tests
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
BROWSER: chrome
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
steps:
|
||||||
|
- name: Check out Git repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup Nodejs
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18.12.0
|
||||||
|
cache: 'npm'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
|
- name: All tests
|
||||||
|
run: npm run test
|
||||||
|
- name: Upload coverage
|
||||||
|
uses: codecov/codecov-action@v4
|
||||||
|
with:
|
||||||
|
fail_ci_if_error: true
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
test-code-examples:
|
||||||
|
name: Check typedocs
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out Git repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup Nodejs
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18.12.0
|
||||||
|
cache: 'npm'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
- name: Build Docs
|
||||||
|
run: npm run build && npm run docs:json
|
||||||
|
- name: tsdoc @example checks
|
||||||
|
run: npm run test:examples
|
||||||
|
test-html-examples:
|
||||||
|
name: Run HTML Examples
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out Git repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup Nodejs
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18.12.0
|
||||||
|
cache: 'npm'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
|
- name: Code example tests
|
||||||
|
run: npm run test:html
|
||||||
|
test-lint:
|
||||||
|
name: Linting and environment checks
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out Git repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup Nodejs
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18.12.0
|
||||||
|
cache: 'npm'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
- name: Linting
|
||||||
|
run: npm run lint
|
||||||
|
test-readme:
|
||||||
|
name: Ensure that examples in the README compile
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out Git repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup Nodejs
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18.12.0
|
||||||
|
cache: 'npm'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
|
- name: Test
|
||||||
|
run: npm run test:readme
|
|
@ -1,7 +1,7 @@
|
||||||
Tone.js
|
Tone.js
|
||||||
=========
|
=========
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.com/Tonejs/Tone.js.svg?branch=dev)](https://app.travis-ci.com/github/Tonejs/Tone.js) [![codecov](https://codecov.io/gh/Tonejs/Tone.js/branch/dev/graph/badge.svg)](https://codecov.io/gh/Tonejs/Tone.js)
|
[![codecov](https://codecov.io/gh/Tonejs/Tone.js/branch/dev/graph/badge.svg)](https://codecov.io/gh/Tonejs/Tone.js)
|
||||||
|
|
||||||
|
|
||||||
Tone.js is a Web Audio framework for creating interactive music in the browser. The architecture of Tone.js aims to be familiar to both musicians and audio programmers creating web-based audio applications. On the high-level, Tone offers common DAW (digital audio workstation) features like a global transport for synchronizing and scheduling events as well as prebuilt synths and effects. Additionally, Tone provides high-performance building blocks to create your own synthesizers, effects, and complex control signals.
|
Tone.js is a Web Audio framework for creating interactive music in the browser. The architecture of Tone.js aims to be familiar to both musicians and audio programmers creating web-based audio applications. On the high-level, Tone offers common DAW (digital audio workstation) features like a global transport for synchronizing and scheduling events as well as prebuilt synths and effects. Additionally, Tone provides high-performance building blocks to create your own synthesizers, effects, and complex control signals.
|
||||||
|
|
|
@ -91,7 +91,7 @@ export class Channel extends ToneAudioNode<ChannelOptions> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Solo/unsolo the channel. Soloing is only relative to other [[Channels]] and [[Solo]] instances
|
* Solo/unsolo the channel. Soloing is only relative to other [[Channel]]s and [[Solo]] instances
|
||||||
*/
|
*/
|
||||||
get solo(): boolean {
|
get solo(): boolean {
|
||||||
return this._solo.solo;
|
return this._solo.solo;
|
||||||
|
|
|
@ -475,7 +475,7 @@ export class Context extends BaseContext {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts the audio context from a suspended state. This is required
|
* Starts the audio context from a suspended state. This is required
|
||||||
* to initially start the AudioContext. See [[Tone.start]]
|
* to initially start the AudioContext. See [[start]]
|
||||||
*/
|
*/
|
||||||
resume(): Promise<void> {
|
resume(): Promise<void> {
|
||||||
if (isAudioContext(this._context)) {
|
if (isAudioContext(this._context)) {
|
||||||
|
|
|
@ -385,7 +385,7 @@ export function disconnect(
|
||||||
* const player1 = new Tone.Player("https://tonejs.github.io/audio/drum-samples/conga-rhythm.mp3");
|
* const player1 = new Tone.Player("https://tonejs.github.io/audio/drum-samples/conga-rhythm.mp3");
|
||||||
* const filter = new Tone.Filter("G5").toDestination();
|
* const filter = new Tone.Filter("G5").toDestination();
|
||||||
* // connect nodes to a common destination
|
* // connect nodes to a common destination
|
||||||
* fanIn(player, player1, filter);
|
* Tone.fanIn(player, player1, filter);
|
||||||
*/
|
*/
|
||||||
export function fanIn(...nodes: OutputNode[]): void {
|
export function fanIn(...nodes: OutputNode[]): void {
|
||||||
const dstNode = nodes.pop();
|
const dstNode = nodes.pop();
|
||||||
|
|
|
@ -97,7 +97,7 @@ export abstract class ToneWithContext<Options extends ToneWithContextOptions> ex
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert the incoming time to seconds.
|
* Convert the incoming time to seconds.
|
||||||
* This is calculated against the current [[Tone.Transport]] bpm
|
* This is calculated against the current [[Transport]] bpm
|
||||||
* @example
|
* @example
|
||||||
* const gain = new Tone.Gain();
|
* const gain = new Tone.Gain();
|
||||||
* setInterval(() => console.log(gain.toSeconds("4n")), 100);
|
* setInterval(() => console.log(gain.toSeconds("4n")), 100);
|
||||||
|
|
|
@ -18,7 +18,7 @@ export interface DuoSynthOptions extends MonophonicOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DuoSynth is a monophonic synth composed of two [[MonoSynths]] run in parallel with control over the
|
* DuoSynth is a monophonic synth composed of two [[MonoSynth]]s run in parallel with control over the
|
||||||
* frequency ratio between the two voices and vibrato effect.
|
* frequency ratio between the two voices and vibrato effect.
|
||||||
* @example
|
* @example
|
||||||
* const duoSynth = new Tone.DuoSynth().toDestination();
|
* const duoSynth = new Tone.DuoSynth().toDestination();
|
||||||
|
|
|
@ -285,7 +285,6 @@ export class PolySynth<Voice extends Monophonic<any> = Synth> extends Instrument
|
||||||
* @param notes The notes to play. Accepts a single Frequency or an array of frequencies.
|
* @param notes The notes to play. Accepts a single Frequency or an array of frequencies.
|
||||||
* @param time When the release will be triggered.
|
* @param time When the release will be triggered.
|
||||||
* @example
|
* @example
|
||||||
* @example
|
|
||||||
* const poly = new Tone.PolySynth(Tone.AMSynth).toDestination();
|
* const poly = new Tone.PolySynth(Tone.AMSynth).toDestination();
|
||||||
* poly.triggerAttack(["Ab3", "C4", "F5"]);
|
* poly.triggerAttack(["Ab3", "C4", "F5"]);
|
||||||
* // trigger the release of the given notes.
|
* // trigger the release of the given notes.
|
||||||
|
|
|
@ -709,11 +709,14 @@ describe("Player", () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
player.restart(undefined, undefined, 1);
|
player.restart(undefined, undefined, 1);
|
||||||
const checkStopTimes = new Set();
|
const checkStopTimes = new Set();
|
||||||
|
// @ts-ignore
|
||||||
player._activeSources.forEach(source => {
|
player._activeSources.forEach(source => {
|
||||||
|
// @ts-ignore
|
||||||
checkStopTimes.add(source._stopTime);
|
checkStopTimes.add(source._stopTime);
|
||||||
});
|
});
|
||||||
getContext().lookAhead = originalLookAhead;
|
getContext().lookAhead = originalLookAhead;
|
||||||
// ensure each source has a different stopTime
|
// ensure each source has a different stopTime
|
||||||
|
// @ts-ignore
|
||||||
expect(checkStopTimes.size).to.equal(player._activeSources.size);
|
expect(checkStopTimes.size).to.equal(player._activeSources.size);
|
||||||
done();
|
done();
|
||||||
}, 250);
|
}, 250);
|
||||||
|
|
|
@ -206,7 +206,7 @@ export class Players extends ToneAudioNode<PlayersOptions> {
|
||||||
* const players = new Tone.Players();
|
* const players = new Tone.Players();
|
||||||
* players.add("gong", "https://tonejs.github.io/audio/berklee/gong_1.mp3", () => {
|
* players.add("gong", "https://tonejs.github.io/audio/berklee/gong_1.mp3", () => {
|
||||||
* console.log("gong loaded");
|
* console.log("gong loaded");
|
||||||
* players.get("gong").start();
|
* players.player("gong").start();
|
||||||
* });
|
* });
|
||||||
*/
|
*/
|
||||||
add(name: string, url: string | ToneAudioBuffer | AudioBuffer, callback?: () => void): this {
|
add(name: string, url: string | ToneAudioBuffer | AudioBuffer, callback?: () => void): this {
|
||||||
|
|
|
@ -315,7 +315,7 @@ export class OmniOscillator<OscType extends AnyOscillator>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The width of the oscillator when sourceType === "pulse".
|
* The width of the oscillator when sourceType === "pulse".
|
||||||
* See [[PWMOscillator.width]]
|
* See [[PWMOscillator]]
|
||||||
*/
|
*/
|
||||||
get width(): IsPulseOscillator<OscType, Signal<"audioRange">> {
|
get width(): IsPulseOscillator<OscType, Signal<"audioRange">> {
|
||||||
if (this._getOscType(this._oscillator, "pulse")) {
|
if (this._getOscType(this._oscillator, "pulse")) {
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
}).toDestination();
|
}).toDestination();
|
||||||
|
|
||||||
const toneMeter = new Tone.Meter({
|
const toneMeter = new Tone.Meter({
|
||||||
channels: 2,
|
channelCount: 2,
|
||||||
});
|
});
|
||||||
player.connect(toneMeter);
|
player.connect(toneMeter);
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// create a meter on the destination node
|
// create a meter on the destination node
|
||||||
const toneMeter = new Tone.Meter({ channels: 2 });
|
const toneMeter = new Tone.Meter({ channelCount: 2 });
|
||||||
Tone.Destination.chain(toneMeter);
|
Tone.Destination.chain(toneMeter);
|
||||||
meter({
|
meter({
|
||||||
tone: toneMeter,
|
tone: toneMeter,
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
// play a snare sound through it
|
// play a snare sound through it
|
||||||
const player = new Tone.Player("https://tonejs.github.io/audio/drum-samples/CR78/snare.mp3").connect(feedbackDelay);
|
const player = new Tone.Player("https://tonejs.github.io/audio/drum-samples/CR78/snare.mp3").connect(feedbackDelay);
|
||||||
|
|
||||||
const toneMeter = new Tone.Meter({ channels: 2 });
|
const toneMeter = new Tone.Meter({ channelCount: 2 });
|
||||||
feedbackDelay.connect(toneMeter);
|
feedbackDelay.connect(toneMeter);
|
||||||
|
|
||||||
meter({
|
meter({
|
||||||
|
|
189
package-lock.json
generated
189
package-lock.json
generated
|
@ -1,15 +1,15 @@
|
||||||
{
|
{
|
||||||
"name": "tone",
|
"name": "tone",
|
||||||
"version": "14.8.0",
|
"version": "14.9.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "tone",
|
"name": "tone",
|
||||||
"version": "14.8.0",
|
"version": "14.9.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"standardized-audio-context": "^25.3.37",
|
"standardized-audio-context": "^25.3.70",
|
||||||
"tslib": "^2.3.1"
|
"tslib": "^2.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
"tmp-promise": "^2.1.1",
|
"tmp-promise": "^2.1.1",
|
||||||
"ts-loader": "^7.0.5",
|
"ts-loader": "^7.0.5",
|
||||||
"ts-node": "^8.10.2",
|
"ts-node": "^8.10.2",
|
||||||
"typedoc": "^0.23.24",
|
"typedoc": "^0.25.13",
|
||||||
"typescript": "^4.4.4",
|
"typescript": "^4.4.4",
|
||||||
"ua-parser-js": "^0.7.31",
|
"ua-parser-js": "^0.7.31",
|
||||||
"webpack": "^5.65.0",
|
"webpack": "^5.65.0",
|
||||||
|
@ -417,20 +417,20 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/runtime": {
|
"node_modules/@babel/runtime": {
|
||||||
"version": "7.20.13",
|
"version": "7.24.4",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.13.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.4.tgz",
|
||||||
"integrity": "sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA==",
|
"integrity": "sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"regenerator-runtime": "^0.13.11"
|
"regenerator-runtime": "^0.14.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/runtime/node_modules/regenerator-runtime": {
|
"node_modules/@babel/runtime/node_modules/regenerator-runtime": {
|
||||||
"version": "0.13.11",
|
"version": "0.14.1",
|
||||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
|
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
|
||||||
"integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="
|
"integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw=="
|
||||||
},
|
},
|
||||||
"node_modules/@babel/template": {
|
"node_modules/@babel/template": {
|
||||||
"version": "7.18.10",
|
"version": "7.18.10",
|
||||||
|
@ -1416,6 +1416,12 @@
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/ansi-sequence-parser": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/ansi-styles": {
|
"node_modules/ansi-styles": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
||||||
|
@ -1544,15 +1550,15 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/automation-events": {
|
"node_modules/automation-events": {
|
||||||
"version": "5.0.0",
|
"version": "7.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/automation-events/-/automation-events-5.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/automation-events/-/automation-events-7.0.4.tgz",
|
||||||
"integrity": "sha512-SkYa2YBwgRUJNsR5v6GxeJwP5IGnYtOMW37coplTOWMUpDYYrk5j8gGOhYa765rchRln/HssFzMAck/2P6zTFw==",
|
"integrity": "sha512-uM5VFyhksP/GzzOuGi/ygeI16ked+IA5enGLH9b+BvxUSDnfAWC54RZnnem/iprEKtuWV29FX5gvYcesPAgPAw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.20.7",
|
"@babel/runtime": "^7.24.4",
|
||||||
"tslib": "^2.4.1"
|
"tslib": "^2.6.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.15.4"
|
"node": ">=18.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/available-typed-arrays": {
|
"node_modules/available-typed-arrays": {
|
||||||
|
@ -6292,9 +6298,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jsonc-parser": {
|
"node_modules/jsonc-parser": {
|
||||||
"version": "3.2.0",
|
"version": "3.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz",
|
||||||
"integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==",
|
"integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/jsonfile": {
|
"node_modules/jsonfile": {
|
||||||
|
@ -6842,9 +6848,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/marked": {
|
"node_modules/marked": {
|
||||||
"version": "4.2.12",
|
"version": "4.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/marked/-/marked-4.2.12.tgz",
|
"resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz",
|
||||||
"integrity": "sha512-yr8hSKa3Fv4D3jdZmtMMPghgVt6TWbk86WQaWhDloQjRSQhMMYCAro7jP7VDJrjjdV8pxVxMssXS8B8Y5DZ5aw==",
|
"integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"marked": "bin/marked.js"
|
"marked": "bin/marked.js"
|
||||||
|
@ -8529,11 +8535,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/shiki": {
|
"node_modules/shiki": {
|
||||||
"version": "0.12.1",
|
"version": "0.14.7",
|
||||||
"resolved": "https://registry.npmjs.org/shiki/-/shiki-0.12.1.tgz",
|
"resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz",
|
||||||
"integrity": "sha512-aieaV1m349rZINEBkjxh2QbBvFFQOlgqYTNtCal82hHj4dDZ76oMlQIX+C7ryerBTDiga3e5NfH6smjdJ02BbQ==",
|
"integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"ansi-sequence-parser": "^1.1.0",
|
||||||
"jsonc-parser": "^3.2.0",
|
"jsonc-parser": "^3.2.0",
|
||||||
"vscode-oniguruma": "^1.7.0",
|
"vscode-oniguruma": "^1.7.0",
|
||||||
"vscode-textmate": "^8.0.0"
|
"vscode-textmate": "^8.0.0"
|
||||||
|
@ -8720,13 +8727,13 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/standardized-audio-context": {
|
"node_modules/standardized-audio-context": {
|
||||||
"version": "25.3.37",
|
"version": "25.3.70",
|
||||||
"resolved": "https://registry.npmjs.org/standardized-audio-context/-/standardized-audio-context-25.3.37.tgz",
|
"resolved": "https://registry.npmjs.org/standardized-audio-context/-/standardized-audio-context-25.3.70.tgz",
|
||||||
"integrity": "sha512-lr0+RH/IJXYMts95oYKIJ+orTmstOZN3GXWVGmlkbMj8OLahREkRh7DhNGLYgBGDkBkhhc4ev5pYGSFN3gltHw==",
|
"integrity": "sha512-v07apb+yDztoTrYu6aU4DZGbbO/gkcyC/P+u+SCalDFq+eUp5kbQYnxS8Z/6tA2Vnm/YslhVaR5VzsCYafg3BQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.20.7",
|
"@babel/runtime": "^7.24.4",
|
||||||
"automation-events": "^5.0.0",
|
"automation-events": "^7.0.4",
|
||||||
"tslib": "^2.4.1"
|
"tslib": "^2.6.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/statuses": {
|
"node_modules/statuses": {
|
||||||
|
@ -9367,9 +9374,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tslib": {
|
"node_modules/tslib": {
|
||||||
"version": "2.4.1",
|
"version": "2.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
|
||||||
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
|
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
|
||||||
},
|
},
|
||||||
"node_modules/tsutils": {
|
"node_modules/tsutils": {
|
||||||
"version": "3.21.0",
|
"version": "3.21.0",
|
||||||
|
@ -9445,24 +9452,24 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typedoc": {
|
"node_modules/typedoc": {
|
||||||
"version": "0.23.24",
|
"version": "0.25.13",
|
||||||
"resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.24.tgz",
|
"resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.13.tgz",
|
||||||
"integrity": "sha512-bfmy8lNQh+WrPYcJbtjQ6JEEsVl/ce1ZIXyXhyW+a1vFrjO39t6J8sL/d6FfAGrJTc7McCXgk9AanYBSNvLdIA==",
|
"integrity": "sha512-pQqiwiJ+Z4pigfOnnysObszLiU3mVLWAExSPf+Mu06G/qsc3wzbuM56SZQvONhHLncLUhYzOVkjFFpFfL5AzhQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lunr": "^2.3.9",
|
"lunr": "^2.3.9",
|
||||||
"marked": "^4.2.5",
|
"marked": "^4.3.0",
|
||||||
"minimatch": "^5.1.2",
|
"minimatch": "^9.0.3",
|
||||||
"shiki": "^0.12.1"
|
"shiki": "^0.14.7"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"typedoc": "bin/typedoc"
|
"typedoc": "bin/typedoc"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 14.14"
|
"node": ">= 16"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x"
|
"typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typedoc/node_modules/brace-expansion": {
|
"node_modules/typedoc/node_modules/brace-expansion": {
|
||||||
|
@ -9475,15 +9482,18 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typedoc/node_modules/minimatch": {
|
"node_modules/typedoc/node_modules/minimatch": {
|
||||||
"version": "5.1.6",
|
"version": "9.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
|
||||||
"integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
|
"integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"brace-expansion": "^2.0.1"
|
"brace-expansion": "^2.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10"
|
"node": ">=16 || 14 >=14.17"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/isaacs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
|
@ -10586,17 +10596,17 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@babel/runtime": {
|
"@babel/runtime": {
|
||||||
"version": "7.20.13",
|
"version": "7.24.4",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.13.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.4.tgz",
|
||||||
"integrity": "sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA==",
|
"integrity": "sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"regenerator-runtime": "^0.13.11"
|
"regenerator-runtime": "^0.14.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"regenerator-runtime": {
|
"regenerator-runtime": {
|
||||||
"version": "0.13.11",
|
"version": "0.14.1",
|
||||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
|
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
|
||||||
"integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="
|
"integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -11376,6 +11386,12 @@
|
||||||
"integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==",
|
"integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"ansi-sequence-parser": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"ansi-styles": {
|
"ansi-styles": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
||||||
|
@ -11488,12 +11504,12 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"automation-events": {
|
"automation-events": {
|
||||||
"version": "5.0.0",
|
"version": "7.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/automation-events/-/automation-events-5.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/automation-events/-/automation-events-7.0.4.tgz",
|
||||||
"integrity": "sha512-SkYa2YBwgRUJNsR5v6GxeJwP5IGnYtOMW37coplTOWMUpDYYrk5j8gGOhYa765rchRln/HssFzMAck/2P6zTFw==",
|
"integrity": "sha512-uM5VFyhksP/GzzOuGi/ygeI16ked+IA5enGLH9b+BvxUSDnfAWC54RZnnem/iprEKtuWV29FX5gvYcesPAgPAw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.20.7",
|
"@babel/runtime": "^7.24.4",
|
||||||
"tslib": "^2.4.1"
|
"tslib": "^2.6.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"available-typed-arrays": {
|
"available-typed-arrays": {
|
||||||
|
@ -15284,9 +15300,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"jsonc-parser": {
|
"jsonc-parser": {
|
||||||
"version": "3.2.0",
|
"version": "3.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz",
|
||||||
"integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==",
|
"integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"jsonfile": {
|
"jsonfile": {
|
||||||
|
@ -15733,9 +15749,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"marked": {
|
"marked": {
|
||||||
"version": "4.2.12",
|
"version": "4.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/marked/-/marked-4.2.12.tgz",
|
"resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz",
|
||||||
"integrity": "sha512-yr8hSKa3Fv4D3jdZmtMMPghgVt6TWbk86WQaWhDloQjRSQhMMYCAro7jP7VDJrjjdV8pxVxMssXS8B8Y5DZ5aw==",
|
"integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"md5.js": {
|
"md5.js": {
|
||||||
|
@ -17037,11 +17053,12 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"shiki": {
|
"shiki": {
|
||||||
"version": "0.12.1",
|
"version": "0.14.7",
|
||||||
"resolved": "https://registry.npmjs.org/shiki/-/shiki-0.12.1.tgz",
|
"resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz",
|
||||||
"integrity": "sha512-aieaV1m349rZINEBkjxh2QbBvFFQOlgqYTNtCal82hHj4dDZ76oMlQIX+C7ryerBTDiga3e5NfH6smjdJ02BbQ==",
|
"integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
"ansi-sequence-parser": "^1.1.0",
|
||||||
"jsonc-parser": "^3.2.0",
|
"jsonc-parser": "^3.2.0",
|
||||||
"vscode-oniguruma": "^1.7.0",
|
"vscode-oniguruma": "^1.7.0",
|
||||||
"vscode-textmate": "^8.0.0"
|
"vscode-textmate": "^8.0.0"
|
||||||
|
@ -17192,13 +17209,13 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"standardized-audio-context": {
|
"standardized-audio-context": {
|
||||||
"version": "25.3.37",
|
"version": "25.3.70",
|
||||||
"resolved": "https://registry.npmjs.org/standardized-audio-context/-/standardized-audio-context-25.3.37.tgz",
|
"resolved": "https://registry.npmjs.org/standardized-audio-context/-/standardized-audio-context-25.3.70.tgz",
|
||||||
"integrity": "sha512-lr0+RH/IJXYMts95oYKIJ+orTmstOZN3GXWVGmlkbMj8OLahREkRh7DhNGLYgBGDkBkhhc4ev5pYGSFN3gltHw==",
|
"integrity": "sha512-v07apb+yDztoTrYu6aU4DZGbbO/gkcyC/P+u+SCalDFq+eUp5kbQYnxS8Z/6tA2Vnm/YslhVaR5VzsCYafg3BQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.20.7",
|
"@babel/runtime": "^7.24.4",
|
||||||
"automation-events": "^5.0.0",
|
"automation-events": "^7.0.4",
|
||||||
"tslib": "^2.4.1"
|
"tslib": "^2.6.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"statuses": {
|
"statuses": {
|
||||||
|
@ -17681,9 +17698,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tslib": {
|
"tslib": {
|
||||||
"version": "2.4.1",
|
"version": "2.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
|
||||||
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
|
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
|
||||||
},
|
},
|
||||||
"tsutils": {
|
"tsutils": {
|
||||||
"version": "3.21.0",
|
"version": "3.21.0",
|
||||||
|
@ -17740,15 +17757,15 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"typedoc": {
|
"typedoc": {
|
||||||
"version": "0.23.24",
|
"version": "0.25.13",
|
||||||
"resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.24.tgz",
|
"resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.13.tgz",
|
||||||
"integrity": "sha512-bfmy8lNQh+WrPYcJbtjQ6JEEsVl/ce1ZIXyXhyW+a1vFrjO39t6J8sL/d6FfAGrJTc7McCXgk9AanYBSNvLdIA==",
|
"integrity": "sha512-pQqiwiJ+Z4pigfOnnysObszLiU3mVLWAExSPf+Mu06G/qsc3wzbuM56SZQvONhHLncLUhYzOVkjFFpFfL5AzhQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"lunr": "^2.3.9",
|
"lunr": "^2.3.9",
|
||||||
"marked": "^4.2.5",
|
"marked": "^4.3.0",
|
||||||
"minimatch": "^5.1.2",
|
"minimatch": "^9.0.3",
|
||||||
"shiki": "^0.12.1"
|
"shiki": "^0.14.7"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
|
@ -17761,9 +17778,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimatch": {
|
"minimatch": {
|
||||||
"version": "5.1.6",
|
"version": "9.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
|
||||||
"integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
|
"integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "^2.0.1"
|
"brace-expansion": "^2.0.1"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "tone",
|
"name": "tone",
|
||||||
"version": "14.8.0",
|
"version": "14.9.0",
|
||||||
"description": "A Web Audio framework for making interactive music in the browser.",
|
"description": "A Web Audio framework for making interactive music in the browser.",
|
||||||
"browser": "build/Tone.js",
|
"browser": "build/Tone.js",
|
||||||
"main": "build/esm/index.js",
|
"main": "build/esm/index.js",
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
"build": "npm run increment && rm -rf build && npm run ts:build && npm run webpack:build",
|
"build": "npm run increment && rm -rf build && npm run ts:build && npm run webpack:build",
|
||||||
"codecov": "codecov",
|
"codecov": "codecov",
|
||||||
"docs": "node scripts/generate_docs.cjs",
|
"docs": "node scripts/generate_docs.cjs",
|
||||||
"docs:json": "cross-var typedoc --options \"./scripts/typedoc.json\" --json \"$npm_config_docs_json\"",
|
"docs:json": "cross-var typedoc --options \"./scripts/typedoc.json\" --json \"./docs/tone.json\"",
|
||||||
"increment": "node scripts/increment_version.cjs",
|
"increment": "node scripts/increment_version.cjs",
|
||||||
"karma": "cross-var karma start ./test/karma.conf.cjs --single-run --file $npm_config_file --dir $npm_config_dir",
|
"karma": "cross-var karma start ./test/karma.conf.cjs --single-run --file $npm_config_file --dir $npm_config_dir",
|
||||||
"karma:browser": "cross-var karma start ./test/karma.conf.cjs --auto-watch --browsers OnlineChrome --file $npm_config_file --dir $npm_config_dir",
|
"karma:browser": "cross-var karma start ./test/karma.conf.cjs --auto-watch --browsers OnlineChrome --file $npm_config_file --dir $npm_config_dir",
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
"tmp-promise": "^2.1.1",
|
"tmp-promise": "^2.1.1",
|
||||||
"ts-loader": "^7.0.5",
|
"ts-loader": "^7.0.5",
|
||||||
"ts-node": "^8.10.2",
|
"ts-node": "^8.10.2",
|
||||||
"typedoc": "^0.23.24",
|
"typedoc": "^0.25.13",
|
||||||
"typescript": "^4.4.4",
|
"typescript": "^4.4.4",
|
||||||
"ua-parser-js": "^0.7.31",
|
"ua-parser-js": "^0.7.31",
|
||||||
"webpack": "^5.65.0",
|
"webpack": "^5.65.0",
|
||||||
|
@ -103,7 +103,7 @@
|
||||||
"yargs": "^17.3.0"
|
"yargs": "^17.3.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"standardized-audio-context": "^25.3.37",
|
"standardized-audio-context": "^25.3.70",
|
||||||
"tslib": "^2.3.1"
|
"tslib": "^2.3.1"
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
|
|
|
@ -6,11 +6,11 @@ const { resolve } = require("path");
|
||||||
const { execSync } = require("child_process");
|
const { execSync } = require("child_process");
|
||||||
|
|
||||||
const tsVersion = execSync("npm show tone@next version").toString();
|
const tsVersion = execSync("npm show tone@next version").toString();
|
||||||
const masterVersion = execSync("npm show tone version").toString();
|
const mainVersion = execSync("npm show tone version").toString();
|
||||||
|
|
||||||
// go with whichever is the latest version
|
// go with whichever is the latest version
|
||||||
let version = masterVersion;
|
let version = mainVersion;
|
||||||
if (tsVersion && semver.gt(tsVersion, masterVersion)) {
|
if (tsVersion && semver.gt(tsVersion, mainVersion)) {
|
||||||
version = tsVersion;
|
version = tsVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ if (semver.gt(packageObj.version, version)) {
|
||||||
console.log(`incrementing to version ${version}`);
|
console.log(`incrementing to version ${version}`);
|
||||||
packageObj.version = version;
|
packageObj.version = version;
|
||||||
// only if it's travis, update the package.json
|
// only if it's travis, update the package.json
|
||||||
if (process.env.TRAVIS) {
|
if (process.env.GITHUB_CI) {
|
||||||
fs.writeFileSync(packageFile, JSON.stringify(packageObj, undefined, " "));
|
fs.writeFileSync(packageFile, JSON.stringify(packageObj, undefined, " "));
|
||||||
|
|
||||||
// write a version file
|
// write a version file
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name" : "Tone.js",
|
"name" : "Tone.js",
|
||||||
"mode": "file",
|
"entryPoints": ["../Tone"],
|
||||||
|
"out":"../docs",
|
||||||
"defaultCategory" : "Global",
|
"defaultCategory" : "Global",
|
||||||
"categorizeByGroup" : true,
|
"categorizeByGroup" : true,
|
||||||
"categoryOrder" : ["Core", "Source", "Instrument", "Effect", "Component", "Signal"],
|
"categoryOrder" : ["Core", "Source", "Instrument", "Effect", "Component", "Signal"],
|
||||||
"exclude" : ["./Tone/**/*.test.ts", "./test/**/*.ts"],
|
"externalPattern": ["**/node_modules/**"],
|
||||||
"excludeProtected" : true,
|
"excludeProtected" : true,
|
||||||
"excludePrivate" : true,
|
"excludePrivate" : true,
|
||||||
"listInvalidSymbolLinks" : true,
|
"hideGenerator": true,
|
||||||
"excludeNotExported" : false
|
|
||||||
}
|
}
|
|
@ -2,35 +2,43 @@
|
||||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||||
const { resolve } = require("path");
|
const { resolve } = require("path");
|
||||||
const { exec } = require("child_process");
|
const { exec } = require("child_process");
|
||||||
const { file } = require("tmp-promise");
|
const { dir } = require("tmp-promise");
|
||||||
const { writeFile } = require("fs-extra");
|
const { writeFile } = require("fs-extra");
|
||||||
const toneJson = require("../../docs/tone.json");
|
const toneJson = require("../../docs/tone.json");
|
||||||
|
|
||||||
const testSplit = parseInt(process.env.TEST_EXAMPLES || "0");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all of the examples
|
* Get all of the examples
|
||||||
*/
|
*/
|
||||||
function findExamples(obj) {
|
function findExamples(obj) {
|
||||||
let examples = [];
|
let examples = [];
|
||||||
for (const prop in obj) {
|
|
||||||
if (Array.isArray(obj[prop])) {
|
function traverse(node) {
|
||||||
obj[prop].forEach((child) => {
|
if (node.comment && node.comment.blockTags) {
|
||||||
examples = [...examples, ...findExamples(child)];
|
node.comment.blockTags.forEach((tag) => {
|
||||||
|
if (tag.tag === "@example") {
|
||||||
|
tag.content.forEach((example) => {
|
||||||
|
examples.push(
|
||||||
|
example.text.trim().replace(/^```ts\n|```$/g, "")
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else if (prop === "comment" && obj[prop].tags) {
|
|
||||||
examples = [
|
|
||||||
...examples,
|
|
||||||
...obj[prop].tags
|
|
||||||
.filter((tag) => tag.tag === "example")
|
|
||||||
.map((tag) => tag.text),
|
|
||||||
];
|
|
||||||
} else if (typeof obj[prop] === "object") {
|
|
||||||
examples = [...examples, ...findExamples(obj[prop])];
|
|
||||||
} else {
|
|
||||||
// console.log(prop);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
["children", "getSignature", "setSignature", "signatures"].forEach(
|
||||||
|
(prop) => {
|
||||||
|
if (prop in node) {
|
||||||
|
if (Array.isArray(node[prop])) {
|
||||||
|
node[prop].forEach((child) => traverse(child));
|
||||||
|
} else {
|
||||||
|
traverse(node[prop]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
traverse(obj);
|
||||||
// filter any repeats
|
// filter any repeats
|
||||||
return [...new Set(examples)];
|
return [...new Set(examples)];
|
||||||
}
|
}
|
||||||
|
@ -53,7 +61,7 @@ function execPromise(cmd) {
|
||||||
/**
|
/**
|
||||||
* Run the string through the typescript compiler
|
* Run the string through the typescript compiler
|
||||||
*/
|
*/
|
||||||
async function testExampleString(str) {
|
async function testExampleString(str, tmpDir, index) {
|
||||||
// str = str.replace("from \"tone\"", `from "${resolve(__dirname, "../../")}"`);
|
// str = str.replace("from \"tone\"", `from "${resolve(__dirname, "../../")}"`);
|
||||||
str = `
|
str = `
|
||||||
import * as Tone from "${resolve(__dirname, "../../")}"
|
import * as Tone from "${resolve(__dirname, "../../")}"
|
||||||
|
@ -62,48 +70,24 @@ async function testExampleString(str) {
|
||||||
}
|
}
|
||||||
main();
|
main();
|
||||||
`;
|
`;
|
||||||
const { path, cleanup } = await file({ postfix: ".ts" });
|
await writeFile(resolve(tmpDir, index + ".ts"), str);
|
||||||
try {
|
|
||||||
// work with file here in fd
|
|
||||||
await writeFile(path, str);
|
|
||||||
await execPromise(
|
|
||||||
`tsc --noEmit --target es5 --lib dom,ES2015 ${path}`
|
|
||||||
);
|
|
||||||
} finally {
|
|
||||||
cleanup();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
let examples = findExamples(toneJson);
|
const examples = findExamples(toneJson);
|
||||||
if (testSplit > 0) {
|
|
||||||
// split it in half and choose either the first or second half
|
|
||||||
const halfLength = Math.ceil(examples.length / 2);
|
|
||||||
const splitStart = (testSplit - 1) * halfLength;
|
|
||||||
const splitEnd = testSplit * halfLength;
|
|
||||||
examples = examples.slice(splitStart, splitEnd);
|
|
||||||
console.log(`testing examples ${splitStart} - ${splitEnd}`);
|
|
||||||
}
|
|
||||||
let passed = 0;
|
let passed = 0;
|
||||||
for (let i = 0; i < examples.length; i++) {
|
|
||||||
const example = examples[i];
|
const tmp = await dir({ unsafeCleanup: true });
|
||||||
try {
|
await Promise.all(
|
||||||
await testExampleString(example);
|
examples.map((e, i) => testExampleString(e, tmp.path, i))
|
||||||
passed++;
|
);
|
||||||
// print a dot for each passed example
|
|
||||||
process.stdout.write(".");
|
await execPromise(
|
||||||
// add a new line occasionally
|
`tsc --noEmit --target es5 --lib dom,ES2015 ${tmp.path}/*.ts`
|
||||||
if (passed % 100 === 0) {
|
);
|
||||||
process.stdout.write("\n");
|
|
||||||
}
|
await tmp.cleanup();
|
||||||
} catch (e) {
|
|
||||||
console.log(example + "\n" + e);
|
console.log(`Tested ${examples.length} examples`);
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
console.log(`\nvalid examples ${passed}/${examples.length}`);
|
|
||||||
if (passed !== examples.length) {
|
|
||||||
throw new Error("didn't pass all tests");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
main();
|
main();
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
"removeComments": false,
|
"removeComments": false,
|
||||||
"outDir": "./build/esm",
|
"outDir": "./build/esm",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"strictPropertyInitialization": true,
|
"strictPropertyInitialization": true,
|
||||||
"downlevelIteration": true,
|
"downlevelIteration": true,
|
||||||
|
@ -24,5 +25,6 @@
|
||||||
"include": [
|
"include": [
|
||||||
"Tone/**/*.ts",
|
"Tone/**/*.ts",
|
||||||
"test/**/*.ts"
|
"test/**/*.ts"
|
||||||
]
|
],
|
||||||
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
Loading…
Reference in a new issue