Comparing version 4.1.4 to 5.0.0-beta.0
/* eslint-disable no-console */ | ||
'use strict'; | ||
const { Client, Message } = require('../lib'); | ||
const { Client, Message } = require('node-osc'); | ||
@@ -6,0 +6,0 @@ const client = new Client('127.0.0.1', 3333); |
/* eslint-disable no-console */ | ||
'use strict'; | ||
var { Server } = require('../lib'); | ||
var { Server } = require('node-osc'); | ||
@@ -6,0 +6,0 @@ var oscServer = new Server(3333, '0.0.0.0'); |
{ | ||
"name": "node-osc", | ||
"description": "pyOSC inspired library", | ||
"version": "4.1.4", | ||
"main": "lib/index.js", | ||
"version": "5.0.0-beta.0", | ||
"main": "./dist/bundle.js", | ||
"exports": { | ||
".": "lib/index.js", | ||
"./": "./", | ||
"esm": "lib/index.mjs" | ||
"default": "./lib/index.mjs", | ||
"require": "./dist/bundle.js" | ||
}, | ||
@@ -16,11 +15,13 @@ "author": { | ||
"engines": { | ||
"node": ">=8" | ||
"node": ">=12" | ||
}, | ||
"license": "LGPL-2.1", | ||
"scripts": { | ||
"test": "npm run lint && npm run tap", | ||
"tap": "tap test/test-*.js", | ||
"build": "rollup --config rollup.config.mjs", | ||
"prepublishOnly": "npm run build", | ||
"test": "npm run lint && npm run build && npm run tap", | ||
"tap": "tap --no-esm --node-arg=--experimental-modules test/test-*{.js,.mjs}", | ||
"coverage": "npm run tap -- --coverage", | ||
"coverage-html": "npm run tap -- --coverage-report=html", | ||
"lint": "eslint **/*.js" | ||
"lint": "eslint lib/* test/* examples/*" | ||
}, | ||
@@ -46,4 +47,5 @@ "contributors": [ | ||
"eslint": "^6.0.1", | ||
"rollup": "^1.27.9", | ||
"tap": "^14.6.1" | ||
} | ||
} |
@@ -11,2 +11,6 @@ # node-osc | ||
## ⚠️ Experimental ⚠️ | ||
This is an experimental ESM version of node-osc make sure to run node with the `--experimental-modules` flag. This version require at minimum Node.js 13.2.0 | ||
## Example | ||
@@ -17,3 +21,3 @@ | ||
```js | ||
const { Client } = require('node-osc'); | ||
import { Client } from 'node-osc'; | ||
@@ -29,3 +33,3 @@ const client = new Client('127.0.0.1', 3333); | ||
```js | ||
var { Server } = require('../lib'); | ||
import { Server } from 'node-osc'; | ||
@@ -40,6 +44,8 @@ var oscServer = new Server(3333, '0.0.0.0'); | ||
### Now with ESM! | ||
### Legacy API | ||
This just works due to conditional exports, isn't that cool! | ||
```js | ||
import { Client, Server } from 'node-osc/esm' | ||
const { Client, Server } = require('node-osc'); | ||
@@ -46,0 +52,0 @@ const client = new Client('127.0.0.1', 3333); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
59312
25
1036
65
3
2
4