node-osc 6.1.4 → 6.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.yml
CHANGED
|
@@ -32,13 +32,14 @@ jobs:
|
|
|
32
32
|
with:
|
|
33
33
|
ssh-key: ${{ secrets.DEPLOY_KEY }}
|
|
34
34
|
|
|
35
|
-
- name: Setup Node.js
|
|
36
|
-
uses: actions/setup-node@
|
|
35
|
+
- name: Setup Node.js
|
|
36
|
+
uses: actions/setup-node@v2
|
|
37
37
|
with:
|
|
38
|
-
node-version:
|
|
38
|
+
node-version: '16'
|
|
39
|
+
cache: 'npm'
|
|
39
40
|
|
|
40
41
|
- name: Install npm packages
|
|
41
|
-
run: npm
|
|
42
|
+
run: npm ci
|
|
42
43
|
|
|
43
44
|
- name: Setup Git
|
|
44
45
|
run: |
|
|
@@ -11,9 +11,10 @@ jobs:
|
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
steps:
|
|
13
13
|
- uses: actions/checkout@v2
|
|
14
|
-
- uses: actions/setup-node@
|
|
14
|
+
- uses: actions/setup-node@v2
|
|
15
15
|
with:
|
|
16
|
-
node-version:
|
|
16
|
+
node-version: '16'
|
|
17
|
+
cache: 'npm'
|
|
17
18
|
- name: Publish
|
|
18
19
|
run: |
|
|
19
20
|
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
|
|
@@ -11,7 +11,7 @@ jobs:
|
|
|
11
11
|
run-tests:
|
|
12
12
|
strategy:
|
|
13
13
|
matrix:
|
|
14
|
-
node-version: [16
|
|
14
|
+
node-version: ['16', '14', '12']
|
|
15
15
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
16
16
|
|
|
17
17
|
runs-on: ${{ matrix.os }}
|
|
@@ -20,9 +20,10 @@ jobs:
|
|
|
20
20
|
- uses: actions/checkout@v2
|
|
21
21
|
|
|
22
22
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
23
|
-
uses: actions/setup-node@
|
|
23
|
+
uses: actions/setup-node@v2
|
|
24
24
|
with:
|
|
25
25
|
node-version: ${{ matrix.node-version }}
|
|
26
|
+
cache: 'npm'
|
|
26
27
|
|
|
27
28
|
- name: Get npm cache directory
|
|
28
29
|
if: matrix.os != 'windows-latest'
|
package/dist/test/util.js
CHANGED
|
@@ -2,15 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var getPort = require('get-port');
|
|
6
|
-
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var getPort__default = /*#__PURE__*/_interopDefaultLegacy(getPort);
|
|
10
|
-
|
|
11
5
|
async function bootstrap(t) {
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
const {default: getPorts, portNumbers} = await import('get-port');
|
|
7
|
+
t.context.port = await getPorts({
|
|
8
|
+
port: portNumbers(3000, 3500)
|
|
14
9
|
});
|
|
15
10
|
}
|
|
16
11
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-osc",
|
|
3
3
|
"description": "pyOSC inspired library for sending and receiving OSC messages",
|
|
4
|
-
"version": "6.1.
|
|
4
|
+
"version": "6.1.8",
|
|
5
5
|
"exports": {
|
|
6
6
|
"require": "./dist/lib/index.js",
|
|
7
7
|
"default": "./lib/index.mjs"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"c8": "^7.3.0",
|
|
44
44
|
"eslint": "^7.6.0",
|
|
45
|
-
"get-port": "^
|
|
45
|
+
"get-port": "^6.0.0",
|
|
46
46
|
"rollup": "^2.23.0",
|
|
47
47
|
"tap": "^15.0.4"
|
|
48
48
|
}
|
package/rollup.config.mjs
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
import { readdirSync as readdir, statSync as stat } from 'fs';
|
|
2
2
|
|
|
3
|
+
// Borrowed from the rollup docs
|
|
4
|
+
// https://github.com/rollup/rollup/blob/d0db53459be43c5cc806cb91f14e82217950ba42/docs/05-plugin-development.md#renderdynamicimport
|
|
5
|
+
function retainImportExpressionPlugin() {
|
|
6
|
+
return {
|
|
7
|
+
name: 'retain-import-expression',
|
|
8
|
+
resolveDynamicImport(specifier) {
|
|
9
|
+
if (specifier === 'get-port') return false;
|
|
10
|
+
return null;
|
|
11
|
+
},
|
|
12
|
+
renderDynamicImport({ targetModuleId }) {
|
|
13
|
+
if (targetModuleId === 'get-port') {
|
|
14
|
+
return {
|
|
15
|
+
left: 'import(',
|
|
16
|
+
right: ')'
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
3
23
|
function walk(root, result=[]) {
|
|
4
24
|
const rootURL = new URL(root, import.meta.url);
|
|
5
25
|
const paths = readdir(rootURL);
|
|
@@ -45,6 +65,7 @@ function walkTest(config) {
|
|
|
45
65
|
tests.forEach(({input, dir}) => {
|
|
46
66
|
config.push({
|
|
47
67
|
input,
|
|
68
|
+
plugins: [retainImportExpressionPlugin()],
|
|
48
69
|
output: {
|
|
49
70
|
entryFileNames: '[name].js',
|
|
50
71
|
dir,
|
package/test/util.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import getPort from 'get-port';
|
|
2
|
-
|
|
3
1
|
async function bootstrap(t) {
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
const {default: getPorts, portNumbers} = await import('get-port');
|
|
3
|
+
t.context.port = await getPorts({
|
|
4
|
+
port: portNumbers(3000, 3500)
|
|
6
5
|
});
|
|
7
6
|
}
|
|
8
7
|
|