From 93edcf2ad1a8089732d70c0d354a09b5aea6bdde Mon Sep 17 00:00:00 2001 From: Brian Peiris Date: Sat, 16 Apr 2022 12:20:06 -0400 Subject: [PATCH] Replace ncp with fs-extra copy --- package-lock.json | 59 ++++++++++++++++++++++++++++++++++++----------- package.json | 2 +- scripts/deploy.js | 5 ++-- 3 files changed, 48 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2c0ab72650..11650ebfce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5686,6 +5686,18 @@ "to-regex-range": "^5.0.1" } }, + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, "glob-parent": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", @@ -5695,6 +5707,12 @@ "is-glob": "^4.0.1" } }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -10441,6 +10459,26 @@ } } }, + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + } + } + }, "fsevents": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.1.tgz", @@ -23024,21 +23062,20 @@ } }, "fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", + "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", "dev": true, "requires": { - "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" }, "dependencies": { "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true } } @@ -27663,12 +27700,6 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "ncp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", - "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", - "dev": true - }, "negotiator": { "version": "0.6.1", "resolved": "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz", @@ -38545,4 +38576,4 @@ "dev": true } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index 04621c2dc2..26acc8b420 100644 --- a/package.json +++ b/package.json @@ -183,6 +183,7 @@ "esm": "^3.2.5", "fast-plural-rules": "0.0.3", "file-loader": "^1.1.10", + "fs-extra": "^10.0.1", "glob": "^7.1.6", "html-loader": "^0.5.5", "html-webpack-plugin": "^4.2.0", @@ -192,7 +193,6 @@ "localstorage-memory": "^1.0.3", "mediasoup-client": "^3.6.29", "mini-css-extract-plugin": "^0.8.0", - "ncp": "^2.0.0", "node-fetch": "^2.6.1", "npm-scripts-info": "0.3.9", "ora": "^4.0.2", diff --git a/scripts/deploy.js b/scripts/deploy.js index 1b3c0fa4ad..15a56843d0 100644 --- a/scripts/deploy.js +++ b/scripts/deploy.js @@ -1,7 +1,7 @@ import { createReadStream, readFileSync, existsSync, unlinkSync } from "fs"; import { exec } from "child_process"; import rmdir from "rimraf"; -import ncp from "ncp"; +import { copy } from "fs-extra"; import tar from "tar"; import ora from "ora"; import FormData from "form-data"; @@ -90,12 +90,11 @@ const getTs = (() => { }); await new Promise(res => { - ncp("./admin/dist", "./dist", err => { + copy("./admin/dist", "./dist", err => { if (err) { console.error(err); process.exit(1); } - res(); }); });