Unverified 提交 5ccd4d0a authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo 提交者: GitHub

Migrate npm-scripts.js to npm-scripts.mjs (ES Module) (#1093)

上级 ad298bf9
...@@ -50,7 +50,7 @@ jobs: ...@@ -50,7 +50,7 @@ jobs:
with: with:
node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
# We need to install some NPM production deps for npm-scripts.js to work. # We need to install some NPM production deps for npm-scripts.mjs to work.
- run: npm ci --ignore-scripts --omit=dev - run: npm ci --ignore-scripts --omit=dev
- run: npm run worker:build - run: npm run worker:build
# Publish prebuild binaries on tag. # Publish prebuild binaries on tag.
......
...@@ -55,7 +55,7 @@ jobs: ...@@ -55,7 +55,7 @@ jobs:
with: with:
node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
# We need to install some NPM production deps for npm-scripts.js to work. # We need to install some NPM production deps for npm-scripts.mjs to work.
- run: npm ci --ignore-scripts --omit=dev - run: npm ci --ignore-scripts --omit=dev
- run: npm run install-clang-tools - run: npm run install-clang-tools
# TODO: Maybe fix this one day. # TODO: Maybe fix this one day.
......
# Changelog # Changelog
### Next
Migrate `npm-scripts.js` to `npm-scripts.mjs` (ES Module) ([PR #1093](https://github.com/versatica/mediasoup/pull/1093)).
### 3.12.2 ### 3.12.2
* CI: Use `ubuntu-20.04` to build mediasoup-worker prebuilt on Linux ([PR #1092](https://github.com/versatica/mediasoup/pull/1092)). * CI: Use `ubuntu-20.04` to build mediasoup-worker prebuilt on Linux ([PR #1092](https://github.com/versatica/mediasoup/pull/1092)).
......
const process = require('process'); import process from 'process';
const os = require('os'); import os from 'os';
const fs = require('fs'); import fs from 'fs';
const { execSync, spawnSync } = require('child_process'); import { execSync, spawnSync } from 'child_process';
const fetch = require('node-fetch'); import fetch from 'node-fetch';
const tar = require('tar'); import tar from 'tar';
const PKG = JSON.parse(fs.readFileSync('./package.json').toString()); const PKG = JSON.parse(fs.readFileSync('./package.json').toString());
const IS_FREEBSD = os.platform() === 'freebsd'; const IS_FREEBSD = os.platform() === 'freebsd';
...@@ -98,8 +98,8 @@ async function run() ...@@ -98,8 +98,8 @@ async function run()
case 'typescript:watch': case 'typescript:watch':
{ {
// NOTE: Load dep here since it's a devDependency. // NOTE: Load dep on demand since it's a devDependency.
const { TscWatchClient } = require('tsc-watch/client'); const { TscWatchClient } = await import('tsc-watch/client.js');
const watch = new TscWatchClient(); const watch = new TscWatchClient();
...@@ -200,8 +200,8 @@ async function run() ...@@ -200,8 +200,8 @@ async function run()
try try
{ {
octokit = getOctokit(); octokit = await getOctokit();
versionChanges = getVersionChanges(); versionChanges = await getVersionChanges();
} }
catch (error) catch (error)
{ {
...@@ -357,7 +357,7 @@ function lintNode() ...@@ -357,7 +357,7 @@ function lintNode()
{ {
logInfo('lintNode()'); logInfo('lintNode()');
executeCmd('eslint -c node/.eslintrc.js --max-warnings 0 node/src node/.eslintrc.js npm-scripts.js worker/scripts/gulpfile.js'); executeCmd('eslint -c node/.eslintrc.js --max-warnings 0 node/src node/.eslintrc.js npm-scripts.mjs worker/scripts/gulpfile.js');
} }
function lintWorker() function lintWorker()
...@@ -599,7 +599,7 @@ async function uploadMacArmPrebuiltWorker() ...@@ -599,7 +599,7 @@ async function uploadMacArmPrebuiltWorker()
return; return;
} }
const octokit = getOctokit(); const octokit = await getOctokit();
logInfo('uploadMacArmPrebuiltWorker() | getting release info'); logInfo('uploadMacArmPrebuiltWorker() | getting release info');
...@@ -623,15 +623,15 @@ async function uploadMacArmPrebuiltWorker() ...@@ -623,15 +623,15 @@ async function uploadMacArmPrebuiltWorker()
}); });
} }
function getOctokit() async function getOctokit()
{ {
if (!process.env.GITHUB_TOKEN) if (!process.env.GITHUB_TOKEN)
{ {
throw new Error('missing GITHUB_TOKEN environment variable'); throw new Error('missing GITHUB_TOKEN environment variable');
} }
// NOTE: Load dep here since it's a devDependency. // NOTE: Load dep on demand since it's a devDependency.
const { Octokit } = require('@octokit/rest'); const { Octokit } = await import('@octokit/rest');
const octokit = new Octokit( const octokit = new Octokit(
{ {
...@@ -641,12 +641,12 @@ function getOctokit() ...@@ -641,12 +641,12 @@ function getOctokit()
return octokit; return octokit;
} }
function getVersionChanges() async function getVersionChanges()
{ {
logInfo('getVersionChanges()'); logInfo('getVersionChanges()');
// NOTE: Load dep here since it's a devDependency. // NOTE: Load dep on demand since it's a devDependency.
const marked = require('marked'); const marked = await import('marked');
const changelog = fs.readFileSync('./CHANGELOG.md').toString(); const changelog = fs.readFileSync('./CHANGELOG.md').toString();
const entries = marked.lexer(changelog); const entries = marked.lexer(changelog);
...@@ -692,19 +692,19 @@ function executeCmd(command, exitOnError = true) ...@@ -692,19 +692,19 @@ function executeCmd(command, exitOnError = true)
function logInfo(message) function logInfo(message)
{ {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.log(`npm-scripts.js \x1b[36m[INFO] [${task}]\x1b\[0m`, message); console.log(`npm-scripts \x1b[36m[INFO] [${task}]\x1b\[0m`, message);
} }
function logWarn(message) function logWarn(message)
{ {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.warn(`npm-scripts.js \x1b[33m[WARN] [${task}]\x1b\[0m`, message); console.warn(`npm-scripts \x1b[33m[WARN] [${task}]\x1b\[0m`, message);
} }
function logError(message) function logError(message)
{ {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.error(`npm-scripts.js \x1b[31m[ERROR] [${task}]\x1b\[0m`, message); console.error(`npm-scripts \x1b[31m[ERROR] [${task}]\x1b\[0m`, message);
} }
function exitWithError() function exitWithError()
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"dependencies": { "dependencies": {
"debug": "^4.3.4", "debug": "^4.3.4",
"h264-profile-level-id": "^1.0.1", "h264-profile-level-id": "^1.0.1",
"node-fetch": "^2.6.11", "node-fetch": "^3.3.1",
"supports-color": "^9.3.1", "supports-color": "^9.3.1",
"tar": "^6.1.15", "tar": "^6.1.15",
"uuid": "^9.0.0" "uuid": "^9.0.0"
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
"@octokit/rest": "^19.0.11", "@octokit/rest": "^19.0.11",
"@types/debug": "^4.1.8", "@types/debug": "^4.1.8",
"@types/jest": "^29.5.1", "@types/jest": "^29.5.1",
"@types/node": "^18.15.11", "@types/node": "^20.2.5",
"@types/uuid": "^9.0.1", "@types/uuid": "^9.0.1",
"@typescript-eslint/eslint-plugin": "^5.59.7", "@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7", "@typescript-eslint/parser": "^5.59.7",
...@@ -1339,6 +1339,26 @@ ...@@ -1339,6 +1339,26 @@
"node": ">= 14" "node": ">= 14"
} }
}, },
"node_modules/@octokit/request/node_modules/node-fetch": {
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz",
"integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==",
"dev": true,
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
},
"peerDependencies": {
"encoding": "^0.1.0"
},
"peerDependenciesMeta": {
"encoding": {
"optional": true
}
}
},
"node_modules/@octokit/rest": { "node_modules/@octokit/rest": {
"version": "19.0.11", "version": "19.0.11",
"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-19.0.11.tgz", "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-19.0.11.tgz",
...@@ -1511,9 +1531,9 @@ ...@@ -1511,9 +1531,9 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "18.15.11", "version": "20.2.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.5.tgz",
"integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==", "integrity": "sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==",
"dev": true "dev": true
}, },
"node_modules/@types/normalize-package-data": { "node_modules/@types/normalize-package-data": {
...@@ -2375,6 +2395,14 @@ ...@@ -2375,6 +2395,14 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/data-uri-to-buffer": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
"integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
"engines": {
"node": ">= 12"
}
},
"node_modules/debug": { "node_modules/debug": {
"version": "4.3.4", "version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
...@@ -2959,6 +2987,28 @@ ...@@ -2959,6 +2987,28 @@
"bser": "2.1.1" "bser": "2.1.1"
} }
}, },
"node_modules/fetch-blob": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
"integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/jimmywarting"
},
{
"type": "paypal",
"url": "https://paypal.me/jimmywarting"
}
],
"dependencies": {
"node-domexception": "^1.0.0",
"web-streams-polyfill": "^3.0.3"
},
"engines": {
"node": "^12.20 || >= 14.13"
}
},
"node_modules/file-entry-cache": { "node_modules/file-entry-cache": {
"version": "6.0.1", "version": "6.0.1",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
...@@ -3035,6 +3085,17 @@ ...@@ -3035,6 +3085,17 @@
"integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==",
"dev": true "dev": true
}, },
"node_modules/formdata-polyfill": {
"version": "4.0.10",
"resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
"integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
"dependencies": {
"fetch-blob": "^3.1.2"
},
"engines": {
"node": ">=12.20.0"
}
},
"node_modules/from": { "node_modules/from": {
"version": "0.1.7", "version": "0.1.7",
"resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz",
...@@ -4632,23 +4693,39 @@ ...@@ -4632,23 +4693,39 @@
"integrity": "sha512-qN8v/s2PAJwGUtr1/hYTpNKlD6Y9rc4p8KSmJXyGdYGZsDGKXrGThikLFP9OCHFeLeEpQzPwiAtdIvBLqm//Hw==", "integrity": "sha512-qN8v/s2PAJwGUtr1/hYTpNKlD6Y9rc4p8KSmJXyGdYGZsDGKXrGThikLFP9OCHFeLeEpQzPwiAtdIvBLqm//Hw==",
"dev": true "dev": true
}, },
"node_modules/node-domexception": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
"integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/jimmywarting"
},
{
"type": "github",
"url": "https://paypal.me/jimmywarting"
}
],
"engines": {
"node": ">=10.5.0"
}
},
"node_modules/node-fetch": { "node_modules/node-fetch": {
"version": "2.6.11", "version": "3.3.1",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz",
"integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==",
"dependencies": { "dependencies": {
"whatwg-url": "^5.0.0" "data-uri-to-buffer": "^4.0.0",
"fetch-blob": "^3.1.4",
"formdata-polyfill": "^4.0.10"
}, },
"engines": { "engines": {
"node": "4.x || >=6.0.0" "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"peerDependencies": {
"encoding": "^0.1.0"
}, },
"peerDependenciesMeta": { "funding": {
"encoding": { "type": "opencollective",
"optional": true "url": "https://opencollective.com/node-fetch"
}
} }
}, },
"node_modules/node-int64": { "node_modules/node-int64": {
...@@ -5992,7 +6069,8 @@ ...@@ -5992,7 +6069,8 @@
"node_modules/tr46": { "node_modules/tr46": {
"version": "0.0.3", "version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
"dev": true
}, },
"node_modules/trim-newlines": { "node_modules/trim-newlines": {
"version": "4.0.2", "version": "4.0.2",
...@@ -6255,15 +6333,25 @@ ...@@ -6255,15 +6333,25 @@
"makeerror": "1.0.12" "makeerror": "1.0.12"
} }
}, },
"node_modules/web-streams-polyfill": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz",
"integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==",
"engines": {
"node": ">= 8"
}
},
"node_modules/webidl-conversions": { "node_modules/webidl-conversions": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
"dev": true
}, },
"node_modules/whatwg-url": { "node_modules/whatwg-url": {
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"dev": true,
"dependencies": { "dependencies": {
"tr46": "~0.0.3", "tr46": "~0.0.3",
"webidl-conversions": "^3.0.0" "webidl-conversions": "^3.0.0"
...@@ -7411,6 +7499,17 @@ ...@@ -7411,6 +7499,17 @@
"is-plain-object": "^5.0.0", "is-plain-object": "^5.0.0",
"node-fetch": "^2.6.7", "node-fetch": "^2.6.7",
"universal-user-agent": "^6.0.0" "universal-user-agent": "^6.0.0"
},
"dependencies": {
"node-fetch": {
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz",
"integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==",
"dev": true,
"requires": {
"whatwg-url": "^5.0.0"
}
}
} }
}, },
"@octokit/request-error": { "@octokit/request-error": {
...@@ -7593,9 +7692,9 @@ ...@@ -7593,9 +7692,9 @@
"dev": true "dev": true
}, },
"@types/node": { "@types/node": {
"version": "18.15.11", "version": "20.2.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.5.tgz",
"integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==", "integrity": "sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==",
"dev": true "dev": true
}, },
"@types/normalize-package-data": { "@types/normalize-package-data": {
...@@ -8197,6 +8296,11 @@ ...@@ -8197,6 +8296,11 @@
} }
} }
}, },
"data-uri-to-buffer": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
"integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A=="
},
"debug": { "debug": {
"version": "4.3.4", "version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
...@@ -8626,6 +8730,15 @@ ...@@ -8626,6 +8730,15 @@
"bser": "2.1.1" "bser": "2.1.1"
} }
}, },
"fetch-blob": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
"integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
"requires": {
"node-domexception": "^1.0.0",
"web-streams-polyfill": "^3.0.3"
}
},
"file-entry-cache": { "file-entry-cache": {
"version": "6.0.1", "version": "6.0.1",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
...@@ -8681,6 +8794,14 @@ ...@@ -8681,6 +8794,14 @@
"integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==",
"dev": true "dev": true
}, },
"formdata-polyfill": {
"version": "4.0.10",
"resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
"integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
"requires": {
"fetch-blob": "^3.1.2"
}
},
"from": { "from": {
"version": "0.1.7", "version": "0.1.7",
"resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz",
...@@ -9856,12 +9977,19 @@ ...@@ -9856,12 +9977,19 @@
"integrity": "sha512-qN8v/s2PAJwGUtr1/hYTpNKlD6Y9rc4p8KSmJXyGdYGZsDGKXrGThikLFP9OCHFeLeEpQzPwiAtdIvBLqm//Hw==", "integrity": "sha512-qN8v/s2PAJwGUtr1/hYTpNKlD6Y9rc4p8KSmJXyGdYGZsDGKXrGThikLFP9OCHFeLeEpQzPwiAtdIvBLqm//Hw==",
"dev": true "dev": true
}, },
"node-domexception": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
"integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ=="
},
"node-fetch": { "node-fetch": {
"version": "2.6.11", "version": "3.3.1",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz",
"integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==",
"requires": { "requires": {
"whatwg-url": "^5.0.0" "data-uri-to-buffer": "^4.0.0",
"fetch-blob": "^3.1.4",
"formdata-polyfill": "^4.0.10"
} }
}, },
"node-int64": { "node-int64": {
...@@ -10790,7 +10918,8 @@ ...@@ -10790,7 +10918,8 @@
"tr46": { "tr46": {
"version": "0.0.3", "version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
"dev": true
}, },
"trim-newlines": { "trim-newlines": {
"version": "4.0.2", "version": "4.0.2",
...@@ -10957,15 +11086,22 @@ ...@@ -10957,15 +11086,22 @@
"makeerror": "1.0.12" "makeerror": "1.0.12"
} }
}, },
"web-streams-polyfill": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz",
"integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q=="
},
"webidl-conversions": { "webidl-conversions": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
"dev": true
}, },
"whatwg-url": { "whatwg-url": {
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"dev": true,
"requires": { "requires": {
"tr46": "~0.0.3", "tr46": "~0.0.3",
"webidl-conversions": "^3.0.0" "webidl-conversions": "^3.0.0"
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
"worker/Makefile", "worker/Makefile",
"worker/meson.build", "worker/meson.build",
"worker/meson_options.txt", "worker/meson_options.txt",
"npm-scripts.js" "npm-scripts.mjs"
], ],
"keywords": [ "keywords": [
"webrtc", "webrtc",
...@@ -48,25 +48,25 @@ ...@@ -48,25 +48,25 @@
"node": ">=16" "node": ">=16"
}, },
"scripts": { "scripts": {
"prepare": "node npm-scripts.js prepare", "prepare": "node npm-scripts.mjs prepare",
"postinstall": "node npm-scripts.js postinstall", "postinstall": "node npm-scripts.mjs postinstall",
"typescript:build": "node npm-scripts.js typescript:build", "typescript:build": "node npm-scripts.mjs typescript:build",
"typescript:watch": "node npm-scripts.js typescript:watch", "typescript:watch": "node npm-scripts.mjs typescript:watch",
"worker:build": "node npm-scripts.js worker:build", "worker:build": "node npm-scripts.mjs worker:build",
"worker:prebuild": "node npm-scripts.js worker:prebuild", "worker:prebuild": "node npm-scripts.mjs worker:prebuild",
"lint": "npm run lint:node && npm run lint:worker", "lint": "npm run lint:node && npm run lint:worker",
"lint:node": "node npm-scripts.js lint:node", "lint:node": "node npm-scripts.mjs lint:node",
"lint:worker": "node npm-scripts.js lint:worker", "lint:worker": "node npm-scripts.mjs lint:worker",
"format:worker": "node npm-scripts.js format:worker", "format:worker": "node npm-scripts.mjs format:worker",
"test": "npm run test:node && npm run test:worker", "test": "npm run test:node && npm run test:worker",
"test:node": "node npm-scripts.js test:node", "test:node": "node npm-scripts.mjs test:node",
"test:worker": "node npm-scripts.js test:worker", "test:worker": "node npm-scripts.mjs test:worker",
"coverage:node": "node npm-scripts.js coverage:node", "coverage:node": "node npm-scripts.mjs coverage:node",
"install-deps:node": "node npm-scripts.js install-deps:node", "install-deps:node": "node npm-scripts.mjs install-deps:node",
"install-clang-tools": "node npm-scripts.js install-clang-tools", "install-clang-tools": "node npm-scripts.mjs install-clang-tools",
"release:check": "node npm-scripts.js release:check", "release:check": "node npm-scripts.mjs release:check",
"release": "node npm-scripts.js release", "release": "node npm-scripts.mjs release",
"release:upload-mac-arm-prebuilt-worker": "node npm-scripts.js release:upload-mac-arm-prebuilt-worker" "release:upload-mac-arm-prebuilt-worker": "node npm-scripts.mjs release:upload-mac-arm-prebuilt-worker"
}, },
"jest": { "jest": {
"verbose": true, "verbose": true,
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
"dependencies": { "dependencies": {
"debug": "^4.3.4", "debug": "^4.3.4",
"h264-profile-level-id": "^1.0.1", "h264-profile-level-id": "^1.0.1",
"node-fetch": "^2.6.11", "node-fetch": "^3.3.1",
"supports-color": "^9.3.1", "supports-color": "^9.3.1",
"tar": "^6.1.15", "tar": "^6.1.15",
"uuid": "^9.0.0" "uuid": "^9.0.0"
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
"@octokit/rest": "^19.0.11", "@octokit/rest": "^19.0.11",
"@types/debug": "^4.1.8", "@types/debug": "^4.1.8",
"@types/jest": "^29.5.1", "@types/jest": "^29.5.1",
"@types/node": "^18.15.11", "@types/node": "^20.2.5",
"@types/uuid": "^9.0.1", "@types/uuid": "^9.0.1",
"@typescript-eslint/eslint-plugin": "^5.59.7", "@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7", "@typescript-eslint/parser": "^5.59.7",
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论