From 0516edc1f0e7cabd74705ada83a6aab8b4444b97 Mon Sep 17 00:00:00 2001 From: Murat Dogan Date: Sat, 20 Apr 2024 21:24:39 +0200 Subject: [PATCH 1/2] add types & copy command --- package.json | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index f364cc1..4efb2ea 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,30 @@ { "name": "node-datachannel", - "version": "0.7.0", + "version": "0.8.0-dev", "description": "libdatachannel node bindings", "type": "module", "exports": { ".": { - "import": "./lib/index.js", - "require": "./lib/index.cjs" + "import": { + "default": "./lib/index.js", + "types": "./lib/index.d.ts" + }, + "require": { + "default": "./lib/index.cjs", + "types": "./lib/index.d.cts" + } }, "./polyfill": { - "import": "./polyfill/index.js", - "require": "./polyfill/polyfill.cjs" + "import": { + "default": "./polyfill/index.js", + "types": "./polyfill/index.d.ts" + }, + "require": { + "default": "./polyfill/index.cjs", + "types": "./polyfill/index.d.cts" + } } }, - "typings": "lib/index.d.ts", "engines": { "node": ">=16.0.0" }, @@ -34,7 +45,7 @@ "test": "NODE_OPTIONS=--experimental-vm-modules jest", "wpt-test": "node test/wpt.js", "test-types": "tsc", - "prepublishOnly": "rollup lib/index.js --file lib/index.cjs --format cjs && rollup polyfill/index.js --file polyfill/polyfill.cjs --format cjs" + "prepublishOnly": "cp lib/index.d.ts lib/index.d.cts && cp polyfill/index.d.ts polyfill/index.d.cts && rollup lib/index.js --file lib/index.cjs --format cjs && rollup polyfill/index.js --file polyfill/index.cjs --format cjs" }, "binary": { "napi_versions": [ From 9803db61b44d73fd371896d1324aa0aaa6ad395d Mon Sep 17 00:00:00 2001 From: Murat Dogan Date: Sat, 20 Apr 2024 21:24:47 +0200 Subject: [PATCH 2/2] dev version --- CMakeLists.txt | 2 +- package-lock.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5454047..48a4171 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.15) cmake_policy(SET CMP0091 NEW) cmake_policy(SET CMP0042 NEW) -project(node_datachannel VERSION 0.7.0) +project(node_datachannel VERSION 0.8.0) # -Dnapi_build_version=8 add_definitions(-DNAPI_VERSION=8) diff --git a/package-lock.json b/package-lock.json index ed87e0b..6063954 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "node-datachannel", - "version": "0.7.0", + "version": "0.8.0-dev", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "node-datachannel", - "version": "0.6.0", + "version": "0.8.0-dev", "hasInstallScript": true, "license": "MPL 2.0", "dependencies": {