diff --git a/package-lock.json b/package-lock.json index f113ffafa..b1402af02 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "@babel/plugin-proposal-class-properties": "^7.8.3", "@babel/polyfill": "^7.8.7", "@babel/preset-env": "^7.9.0", + "@julusian/midi": "^3.1.0", "@octokit/graphql": "^4.8.0", "@rollup/plugin-babel": "^5.3.0", "@rollup/plugin-replace": "^5.0.2", @@ -38,7 +39,6 @@ "jsdoc-to-markdown": "^7.1.0", "markdown-it": "^12.3.2", "marked": "^4.0.10", - "midi": "^2.0.0", "minimist": "^1.2.5", "mocha": "^10.0.0", "moment": "^2.29.4", @@ -2154,6 +2154,20 @@ "node": ">=v12.0.0" } }, + "node_modules/@julusian/midi": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@julusian/midi/-/midi-3.1.0.tgz", + "integrity": "sha512-sf+SzZXc6r37GJLKPQ2cXlPmWcsD0clyi1GkRVoTsTXwlA3Lc87TBR+9w0+fq6EhSdkTHOdIiUNxyB2AcrXcog==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "node-addon-api": "^5.0.0", + "pkg-prebuilds": "^0.2.1" + }, + "engines": { + "node": ">=14.15" + } + }, "node_modules/@kwsites/file-exists": { "version": "1.1.1", "dev": true, @@ -3920,15 +3934,6 @@ "node": ">=8" } }, - "node_modules/bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dev": true, - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, "node_modules/bl": { "version": "1.2.3", "dev": true, @@ -8460,12 +8465,6 @@ "node": ">=6" } }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "dev": true - }, "node_modules/filename-reserved-regex": { "version": "1.0.0", "dev": true, @@ -13335,20 +13334,6 @@ "node": ">=0.10.0" } }, - "node_modules/midi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/midi/-/midi-2.0.0.tgz", - "integrity": "sha512-HyCLWa+ET8Aqfu/NxdNkxfCx0EfCJrcZgKuhrY4c9UgkfxRt3ChM7RP1oC5vJf7ALXyuAG47jqr5yUlvSodTPQ==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "bindings": "~1.5.0", - "nan": "^2.14.2" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/mime": { "version": "1.6.0", "dev": true, @@ -13651,7 +13636,8 @@ "node_modules/nan": { "version": "2.17.0", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/nanoid": { "version": "3.3.3", @@ -13788,6 +13774,12 @@ "isarray": "0.0.1" } }, + "node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==", + "dev": true + }, "node_modules/node-domexception": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", @@ -15351,6 +15343,93 @@ "node": ">=8" } }, + "node_modules/pkg-prebuilds": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/pkg-prebuilds/-/pkg-prebuilds-0.2.1.tgz", + "integrity": "sha512-FdOlDiRqRL7i9aYzQflhGWCoiJf/8u6Qgzq48gKsRDYejtfjvGb1U5QGSzllcqpNg2a8Swx/9fMgtuVefwU+zw==", + "dev": true, + "dependencies": { + "yargs": "^17.5.1" + }, + "bin": { + "pkg-prebuilds-copy": "bin/copy.mjs", + "pkg-prebuilds-verify": "bin/verify.mjs" + }, + "engines": { + "node": ">= 14.15.0" + } + }, + "node_modules/pkg-prebuilds/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-prebuilds/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/pkg-prebuilds/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-prebuilds/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/pkg-prebuilds/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/pkg-prebuilds/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/pkg-up": { "version": "3.1.0", "dev": true, diff --git a/package.json b/package.json index 53e4e4597..3586e19d5 100644 --- a/package.json +++ b/package.json @@ -101,6 +101,7 @@ "@babel/plugin-proposal-class-properties": "^7.8.3", "@babel/polyfill": "^7.8.7", "@babel/preset-env": "^7.9.0", + "@julusian/midi": "^3.1.0", "@octokit/graphql": "^4.8.0", "@rollup/plugin-babel": "^5.3.0", "@rollup/plugin-replace": "^5.0.2", @@ -121,7 +122,6 @@ "jsdoc-to-markdown": "^7.1.0", "markdown-it": "^12.3.2", "marked": "^4.0.10", - "midi": "^2.0.0", "minimist": "^1.2.5", "mocha": "^10.0.0", "moment": "^2.29.4", diff --git a/test/Forwarder.test.js b/test/Forwarder.test.js index c41cc9d94..0b9e5b0f1 100644 --- a/test/Forwarder.test.js +++ b/test/Forwarder.test.js @@ -1,6 +1,6 @@ const expect = require("chai").expect; const {Message, WebMidi, Note, Forwarder} = require("../dist/cjs/webmidi.cjs.js"); -const midi = require("midi"); +const midi = require("@julusian/midi"); // The virtual port is an "external" device so an input is seen as an output by WebMidi. To avoid // confusion, the naming scheme adopts WebMidi's perspective. diff --git a/test/Input.test.js b/test/Input.test.js index d0f7e3078..724b560db 100644 --- a/test/Input.test.js +++ b/test/Input.test.js @@ -1,5 +1,5 @@ const expect = require("chai").expect; -const midi = require("midi"); +const midi = require("@julusian/midi"); const sinon = require("sinon"); const {WebMidi, Enumerations, Forwarder} = require("../dist/cjs/webmidi.cjs.js"); diff --git a/test/InputChannel.test.js b/test/InputChannel.test.js index 369238f1f..1ccc198f7 100644 --- a/test/InputChannel.test.js +++ b/test/InputChannel.test.js @@ -1,5 +1,5 @@ const expect = require("chai").expect; -const midi = require("midi"); +const midi = require("@julusian/midi"); const {WebMidi, Utilities, Enumerations, Note} = require("../dist/cjs/webmidi.cjs.js"); // Create virtual MIDI input port. Being an external device, the virtual device's output is seen as diff --git a/test/Output.test.js b/test/Output.test.js index 09555ef40..af70013b5 100644 --- a/test/Output.test.js +++ b/test/Output.test.js @@ -1,5 +1,5 @@ const expect = require("chai").expect; -const midi = require("midi"); +const midi = require("@julusian/midi"); const sinon = require("sinon"); const {WebMidi, Message} = require("../dist/cjs/webmidi.cjs.js"); diff --git a/test/OutputChannel.test.js b/test/OutputChannel.test.js index 03fe09006..2c428f2ea 100644 --- a/test/OutputChannel.test.js +++ b/test/OutputChannel.test.js @@ -1,5 +1,5 @@ const expect = require("chai").expect; -const midi = require("midi"); +const midi = require("@julusian/midi"); const sinon = require("sinon"); const {WebMidi, Note, Utilities, Message, Enumerations} = require("../dist/cjs/webmidi.cjs.js"); diff --git a/test/WebMidi.test.js b/test/WebMidi.test.js index af86f1666..984598a47 100644 --- a/test/WebMidi.test.js +++ b/test/WebMidi.test.js @@ -1,6 +1,6 @@ const expect = require("chai").expect; const {WebMidi, Utilities} = require("../dist/cjs/webmidi.cjs.js"); -const midi = require("midi"); +const midi = require("@julusian/midi"); const semver = require("semver"); // The virtual port from the 'midi' library is an "external" device so an output is seen as an input